From 22e28b0d2550a728e8d9981223e55593b4c0664c Mon Sep 17 00:00:00 2001 From: Jason Del Ponte <961963+jasdel@users.noreply.github.com> Date: Mon, 29 Nov 2021 16:21:49 -0800 Subject: [PATCH] Update API clients with latest model. (#1511) Updates the SDK's API clients from latest version of models. --- .../2f38d632e93e45f2bf04734b9878a379.json | 55 + .../41575353444b40ffbf474f4155544f00.json | 12 + .../aws-models/autoscaling.2011-01-01.json | 268 +- .../aws-models/backup.2018-11-15.json | 150 +- .../aws-models/braket.2019-09-01.json | 1410 +- .../chimesdkmeetings.2021-07-15.json | 69 +- .../aws-models/cloudformation.2010-05-15.json | 499 +- .../computeoptimizer.2019-11-01.json | 958 +- .../aws-models/connect.2017-08-08.json | 1049 +- .../customerprofiles.2020-08-15.json | 829 +- .../databasemigrationservice.2016-01-01.json | 10 +- .../aws-models/dataexchange.2017-07-25.json | 439 +- .../aws-models/dynamodb.2012-08-10.json | 29 +- .../aws-models/ec2.2016-11-15.json | 1189 +- .../aws-models/ecr.2015-09-21.json | 1596 ++- .../aws-models/ecs.2014-11-13.json | 6 +- .../aws-models/eks.2017-11-01.json | 45 +- .../aws-models/elasticache.2015-02-02.json | 159 +- .../elasticloadbalancingv2.2015-12-01.json | 50 +- .../elasticsearchservice.2015-01-01.json | 53 + .../aws-models/evidently.2021-02-01.json | 5315 ++++++++ .../aws-models/finspacedata.2020-07-13.json | 2572 +++- .../aws-models/imagebuilder.2019-12-02.json | 92 +- .../aws-models/inspector2.2020-06-08.json | 6949 ++++++++++ .../aws-models/iot.2015-05-28.json | 411 +- .../iotdeviceadvisor.2020-09-18.json | 229 +- .../aws-models/iotsitewise.2019-12-02.json | 832 +- .../aws-models/iotwireless.2020-11-22.json | 240 +- .../aws-models/lambda.2015-03-31.json | 770 +- .../aws-models/macie2.2020-01-01.json | 70 +- .../aws-models/mgn.2020-02-26.json | 503 +- ...migrationhubrefactorspaces.2021-10-26.json | 4351 ++++++ .../aws-models/opensearch.2021-01-01.json | 53 + .../aws-models/outposts.2019-12-03.json | 1759 ++- .../aws-models/personalize.2018-05-22.json | 995 +- .../personalizeruntime.2018-05-22.json | 39 +- .../aws-models/pinpoint.2016-12-01.json | 304 +- .../aws-models/proton.2020-07-20.json | 3188 ++++- .../aws-models/quicksight.2018-04-01.json | 440 +- .../aws-models/rbin.2021-06-15.json | 1014 ++ .../aws-models/rds.2014-10-31.json | 714 +- .../aws-models/redshift.2012-12-01.json | 434 +- .../aws-models/rum.2018-05-10.json | 1536 +++ .../sdk-codegen/aws-models/s3.2006-03-01.json | 146 +- .../aws-models/s3control.2018-08-20.json | 96 +- .../aws-models/sqs.2012-11-05.json | 56 +- .../aws-models/ssm.2014-11-06.json | 623 +- .../aws-models/sts.2011-06-15.json | 106 +- .../aws-models/textract.2018-06-27.json | 198 +- .../timestreamquery.2018-11-01.json | 2132 ++- .../timestreamwrite.2018-11-01.json | 341 +- .../transcribestreaming.2017-10-26.json | 152 +- .../aws-models/translate.2017-07-01.json | 61 +- .../wellarchitected.2020-03-31.json | 1210 +- .../aws-models/workspaces.2015-04-08.json | 40 +- .../aws/go/codegen/endpoint-prefix.json | 5 + .../smithy/aws/go/codegen/endpoints.json | 34 + .../api_op_AttachLoadBalancerTargetGroups.go | 6 +- .../autoscaling/api_op_AttachLoadBalancers.go | 6 +- .../api_op_CompleteLifecycleAction.go | 10 +- .../api_op_CreateAutoScalingGroup.go | 14 +- .../api_op_DeleteNotificationConfiguration.go | 3 +- .../autoscaling/api_op_PutLifecycleHook.go | 20 +- .../api_op_PutNotificationConfiguration.go | 3 +- .../autoscaling/api_op_PutScalingPolicy.go | 8 +- .../api_op_RecordLifecycleActionHeartbeat.go | 10 +- .../api_op_SetInstanceProtection.go | 4 +- .../api_op_UpdateAutoScalingGroup.go | 13 +- service/autoscaling/deserializers.go | 445 + service/autoscaling/serializers.go | 160 + service/autoscaling/types/types.go | 250 +- service/autoscaling/validators.go | 154 + service/backup/api_op_CreateBackupPlan.go | 3 +- .../backup/api_op_CreateBackupSelection.go | 26 +- service/backup/api_op_CreateBackupVault.go | 4 +- .../backup/api_op_DescribeRegionSettings.go | 5 + .../api_op_PutBackupVaultLockConfiguration.go | 3 +- .../api_op_PutBackupVaultNotifications.go | 21 +- service/backup/api_op_TagResource.go | 3 +- service/backup/api_op_UpdateRegionSettings.go | 5 + service/backup/deserializers.go | 44 + service/backup/serializers.go | 18 + service/backup/types/types.go | 129 +- service/braket/api_op_CancelJob.go | 128 + service/braket/api_op_CreateJob.go | 181 + service/braket/api_op_CreateQuantumTask.go | 3 + service/braket/api_op_GetJob.go | 205 + service/braket/api_op_GetQuantumTask.go | 3 + service/braket/api_op_SearchJobs.go | 223 + service/braket/deserializers.go | 2611 +++- service/braket/generated.json | 4 + service/braket/serializers.go | 583 + service/braket/types/enums.go | 200 + service/braket/types/types.go | 241 + service/braket/validators.go | 433 + .../chimesdkmeetings/api_op_CreateMeeting.go | 4 + .../api_op_CreateMeetingWithAttendees.go | 4 + service/chimesdkmeetings/deserializers.go | 81 + service/chimesdkmeetings/doc.go | 4 +- service/chimesdkmeetings/serializers.go | 40 + service/chimesdkmeetings/types/enums.go | 18 + service/chimesdkmeetings/types/types.go | 26 +- .../api_op_ImportStacksToStackSet.go | 30 +- service/cloudformation/serializers.go | 12 + service/cloudformation/types/types.go | 18 +- service/cloudformation/validators.go | 3 - .../api_op_DeleteRecommendationPreferences.go | 140 + ...api_op_ExportEC2InstanceRecommendations.go | 8 +- ...p_GetEffectiveRecommendationPreferences.go | 135 + .../api_op_GetRecommendationPreferences.go | 152 + .../api_op_PutRecommendationPreferences.go | 144 + service/computeoptimizer/deserializers.go | 2116 ++- service/computeoptimizer/generated.json | 4 + service/computeoptimizer/serializers.go | 339 + service/computeoptimizer/types/enums.go | 311 +- service/computeoptimizer/types/types.go | 237 +- service/computeoptimizer/validators.go | 159 + service/connect/api_op_CreateAgentStatus.go | 2 +- .../connect/api_op_CreateContactFlowModule.go | 181 + .../connect/api_op_CreateHoursOfOperation.go | 3 +- .../api_op_CreateIntegrationAssociation.go | 2 +- service/connect/api_op_CreateQueue.go | 2 +- service/connect/api_op_CreateQuickConnect.go | 2 +- .../connect/api_op_CreateSecurityProfile.go | 2 +- service/connect/api_op_CreateUseCase.go | 2 +- service/connect/api_op_DeleteContactFlow.go | 122 + .../api_op_DeleteContactFlowModule.go} | 64 +- .../connect/api_op_DeleteHoursOfOperation.go | 1 + service/connect/api_op_DescribeContact.go | 4 +- .../api_op_DescribeContactFlowModule.go | 127 + .../api_op_DescribeHoursOfOperation.go | 1 + .../connect/api_op_ListContactFlowModules.go | 220 + .../connect/api_op_ListContactReferences.go | 4 +- .../api_op_ListIntegrationAssociations.go | 2 +- service/connect/api_op_StartTaskContact.go | 3 +- service/connect/api_op_UpdateContact.go | 2 +- .../api_op_UpdateContactFlowMetadata.go | 132 + .../api_op_UpdateContactFlowModuleContent.go | 127 + .../api_op_UpdateContactFlowModuleMetadata.go | 132 + .../connect/api_op_UpdateHoursOfOperation.go | 1 + service/connect/deserializers.go | 3215 +++-- service/connect/generated.json | 8 + service/connect/serializers.go | 672 +- service/connect/types/enums.go | 54 + service/connect/types/errors.go | 44 +- service/connect/types/types.go | 67 +- service/connect/validators.go | 339 + .../customerprofiles/api_op_CreateDomain.go | 25 +- .../api_op_GetAutoMergingPreview.go | 154 + service/customerprofiles/api_op_GetDomain.go | 10 +- .../api_op_GetIdentityResolutionJob.go | 186 + service/customerprofiles/api_op_GetMatches.go | 20 +- .../api_op_GetProfileObjectType.go | 3 + .../api_op_GetProfileObjectTypeTemplate.go | 3 + .../api_op_ListIdentityResolutionJobs.go | 132 + .../api_op_PutProfileObjectType.go | 10 + .../customerprofiles/api_op_UpdateDomain.go | 25 +- service/customerprofiles/deserializers.go | 2499 +++- service/customerprofiles/generated.json | 3 + service/customerprofiles/serializers.go | 381 + service/customerprofiles/types/enums.go | 74 + service/customerprofiles/types/types.go | 223 + service/customerprofiles/validators.go | 254 + .../api_op_StartReplicationTaskAssessment.go | 14 +- .../databasemigrationservice/deserializers.go | 9 + .../databasemigrationservice/serializers.go | 5 + .../databasemigrationservice/types/types.go | 10 + service/dataexchange/api_op_GetAsset.go | 4 +- service/dataexchange/api_op_SendApiAsset.go | 189 + service/dataexchange/api_op_UpdateAsset.go | 8 +- service/dataexchange/deserializers.go | 397 + service/dataexchange/generated.json | 1 + service/dataexchange/serializers.go | 164 + service/dataexchange/types/enums.go | 26 + service/dataexchange/types/types.go | 163 +- service/dataexchange/validators.go | 83 + .../dynamodb/api_op_BatchExecuteStatement.go | 21 + service/dynamodb/api_op_BatchGetItem.go | 14 +- service/dynamodb/api_op_BatchWriteItem.go | 14 +- service/dynamodb/api_op_DeleteItem.go | 14 +- service/dynamodb/api_op_ExecuteStatement.go | 25 + service/dynamodb/api_op_ExecuteTransaction.go | 12 + service/dynamodb/api_op_GetItem.go | 14 +- service/dynamodb/api_op_PutItem.go | 14 +- service/dynamodb/api_op_Query.go | 16 +- service/dynamodb/api_op_Scan.go | 14 +- service/dynamodb/api_op_TransactWriteItems.go | 14 +- service/dynamodb/api_op_UpdateItem.go | 16 +- service/dynamodb/deserializers.go | 15 + service/dynamodb/serializers.go | 15 + .../ec2/api_op_AssociateSubnetCidrBlock.go | 2 +- .../api_op_AuthorizeSecurityGroupEgress.go | 14 +- service/ec2/api_op_CreateDefaultSubnet.go | 5 + service/ec2/api_op_CreateRoute.go | 1 + service/ec2/api_op_CreateSnapshot.go | 10 + service/ec2/api_op_CreateSubnet.go | 18 +- service/ec2/api_op_DeleteTags.go | 2 +- service/ec2/api_op_DescribeInstanceStatus.go | 2 +- .../ec2/api_op_DescribeSnapshotTierStatus.go | 233 + service/ec2/api_op_DescribeSnapshots.go | 26 +- service/ec2/api_op_DescribeSubnets.go | 57 +- .../ec2/api_op_ListSnapshotsInRecycleBin.go | 224 + service/ec2/api_op_ModifyInstanceAttribute.go | 4 +- .../api_op_ModifyInstanceMetadataOptions.go | 10 +- service/ec2/api_op_ModifyInstancePlacement.go | 3 +- .../ec2/api_op_ModifyPrivateDnsNameOptions.go | 136 + service/ec2/api_op_ModifySnapshotTier.go | 139 + service/ec2/api_op_ModifySubnetAttribute.go | 15 + service/ec2/api_op_MonitorInstances.go | 2 +- service/ec2/api_op_RebootInstances.go | 2 +- service/ec2/api_op_ReplaceRoute.go | 1 + .../api_op_RestoreSnapshotFromRecycleBin.go | 161 + service/ec2/api_op_RestoreSnapshotTier.go | 157 + service/ec2/api_op_RunInstances.go | 23 +- service/ec2/api_op_SendDiagnosticInterrupt.go | 3 +- service/ec2/api_op_StartInstances.go | 2 +- service/ec2/api_op_StopInstances.go | 2 +- service/ec2/deserializers.go | 2053 ++- service/ec2/generated.json | 6 + service/ec2/serializers.go | 783 +- service/ec2/types/enums.go | 126 +- service/ec2/types/types.go | 342 +- service/ec2/validators.go | 120 +- ...BatchGetRepositoryScanningConfiguration.go | 124 + .../ecr/api_op_CreatePullThroughCacheRule.go | 144 + service/ecr/api_op_CreateRepository.go | 4 +- .../ecr/api_op_DeletePullThroughCacheRule.go | 136 + .../api_op_DescribePullThroughCacheRules.go | 245 + ...api_op_GetRegistryScanningConfiguration.go | 115 + ...api_op_PutRegistryScanningConfiguration.go | 128 + service/ecr/deserializers.go | 6576 ++++++--- service/ecr/generated.json | 6 + service/ecr/serializers.go | 522 + service/ecr/types/enums.go | 87 +- service/ecr/types/errors.go | 71 + service/ecr/types/types.go | 371 +- service/ecr/validators.go | 235 + service/ecs/types/types.go | 17 +- .../api_op_AssociateIdentityProviderConfig.go | 3 +- service/eks/api_op_CreateAddon.go | 3 +- service/eks/api_op_CreateCluster.go | 21 +- service/eks/api_op_CreateFargateProfile.go | 7 +- service/eks/api_op_CreateNodegroup.go | 6 +- service/eks/api_op_ListClusters.go | 5 +- service/eks/deserializers.go | 82 + service/eks/types/errors.go | 22 + service/eks/types/types.go | 26 +- .../elasticache/api_op_CreateCacheCluster.go | 48 +- .../api_op_CreateCacheParameterGroup.go | 2 +- .../api_op_CreateReplicationGroup.go | 58 +- service/elasticache/api_op_CreateUser.go | 5 +- service/elasticache/api_op_CreateUserGroup.go | 5 +- service/elasticache/api_op_DeleteUser.go | 5 +- service/elasticache/api_op_DeleteUserGroup.go | 5 +- .../api_op_DescribeCacheEngineVersions.go | 10 +- .../api_op_DescribeEngineDefaultParameters.go | 2 +- .../api_op_DescribeReservedCacheNodes.go | 46 +- ..._op_DescribeReservedCacheNodesOfferings.go | 46 +- .../elasticache/api_op_ModifyCacheCluster.go | 4 +- .../api_op_ModifyReplicationGroup.go | 4 +- service/elasticache/api_op_ModifyUser.go | 3 + service/elasticache/api_op_ModifyUserGroup.go | 3 + service/elasticache/api_op_TestFailover.go | 54 +- service/elasticache/deserializers.go | 154 + service/elasticache/serializers.go | 5 + service/elasticache/types/enums.go | 18 + service/elasticache/types/types.go | 269 +- .../api_op_CreateLoadBalancer.go | 2 +- .../api_op_SetIpAddressType.go | 4 +- .../api_op_SetSubnets.go | 2 +- service/elasticloadbalancingv2/types/types.go | 35 +- .../api_op_UpdateElasticsearchDomainConfig.go | 10 + service/elasticsearchservice/deserializers.go | 54 + service/elasticsearchservice/serializers.go | 5 + service/elasticsearchservice/types/types.go | 17 + service/evidently/LICENSE.txt | 202 + service/evidently/api_client.go | 297 + .../evidently/api_op_BatchEvaluateFeature.go | 143 + service/evidently/api_op_CreateExperiment.go | 181 + service/evidently/api_op_CreateFeature.go | 170 + service/evidently/api_op_CreateLaunch.go | 169 + service/evidently/api_op_CreateProject.go | 145 + service/evidently/api_op_DeleteExperiment.go | 123 + service/evidently/api_op_DeleteFeature.go | 121 + service/evidently/api_op_DeleteLaunch.go | 123 + service/evidently/api_op_DeleteProject.go | 119 + service/evidently/api_op_EvaluateFeature.go | 170 + service/evidently/api_op_GetExperiment.go | 128 + .../evidently/api_op_GetExperimentResults.go | 186 + service/evidently/api_op_GetFeature.go | 130 + service/evidently/api_op_GetLaunch.go | 128 + service/evidently/api_op_GetProject.go | 125 + service/evidently/api_op_ListExperiments.go | 221 + service/evidently/api_op_ListFeatures.go | 219 + service/evidently/api_op_ListLaunches.go | 219 + service/evidently/api_op_ListProjects.go | 212 + .../evidently/api_op_ListTagsForResource.go | 120 + service/evidently/api_op_PutProjectEvents.go | 132 + service/evidently/api_op_StartExperiment.go | 132 + service/evidently/api_op_StartLaunch.go | 129 + service/evidently/api_op_StopExperiment.go | 135 + service/evidently/api_op_StopLaunch.go | 137 + service/evidently/api_op_TagResource.go | 133 + service/evidently/api_op_UntagResource.go | 121 + service/evidently/api_op_UpdateExperiment.go | 163 + service/evidently/api_op_UpdateFeature.go | 162 + service/evidently/api_op_UpdateLaunch.go | 151 + service/evidently/api_op_UpdateProject.go | 134 + .../api_op_UpdateProjectDataDelivery.go | 136 + service/evidently/deserializers.go | 8507 ++++++++++++ service/evidently/doc.go | 16 + service/evidently/endpoints.go | 200 + service/evidently/generated.json | 59 + service/evidently/go.mod | 16 + service/evidently/go.sum | 14 + service/evidently/go_module_metadata.go | 6 + .../evidently/internal/endpoints/endpoints.go | 250 + .../internal/endpoints/endpoints_test.go | 11 + service/evidently/protocol_test.go | 3 + service/evidently/serializers.go | 3240 +++++ service/evidently/types/enums.go | 331 + service/evidently/types/errors.go | 177 + service/evidently/types/types.go | 1099 ++ .../evidently/types/types_exported_test.go | 38 + service/evidently/validators.go | 1676 +++ service/finspacedata/api_client.go | 20 + .../finspacedata/api_op_CreateChangeset.go | 95 +- service/finspacedata/api_op_CreateDataView.go | 188 + service/finspacedata/api_op_CreateDataset.go | 198 + service/finspacedata/api_op_DeleteDataset.go | 165 + service/finspacedata/api_op_GetChangeset.go | 178 + service/finspacedata/api_op_GetDataView.go | 193 + service/finspacedata/api_op_GetDataset.go | 173 + ...api_op_GetProgrammaticAccessCredentials.go | 6 +- .../finspacedata/api_op_GetWorkingLocation.go | 6 +- service/finspacedata/api_op_ListChangesets.go | 219 + service/finspacedata/api_op_ListDataViews.go | 216 + service/finspacedata/api_op_ListDatasets.go | 209 + .../finspacedata/api_op_UpdateChangeset.go | 185 + service/finspacedata/api_op_UpdateDataset.go | 193 + service/finspacedata/deserializers.go | 3683 +++++- service/finspacedata/doc.go | 2 +- service/finspacedata/generated.json | 11 + service/finspacedata/serializers.go | 1145 +- service/finspacedata/types/enums.go | 212 +- service/finspacedata/types/errors.go | 38 + service/finspacedata/types/types.go | 322 +- service/finspacedata/validators.go | 455 +- service/imagebuilder/api_op_DeleteImage.go | 4 +- .../api_op_PutContainerRecipePolicy.go | 4 +- service/imagebuilder/deserializers.go | 82 + service/imagebuilder/serializers.go | 36 + service/imagebuilder/types/types.go | 15 +- service/inspector2/LICENSE.txt | 202 + service/inspector2/api_client.go | 316 + service/inspector2/api_op_AssociateMember.go | 124 + .../api_op_BatchGetAccountStatus.go | 125 + .../api_op_BatchGetFreeTrialInfo.go | 130 + .../api_op_CancelFindingsReport.go} | 56 +- service/inspector2/api_op_CreateFilter.go | 141 + .../inspector2/api_op_CreateFindingsReport.go | 129 + service/inspector2/api_op_DeleteFilter.go | 122 + ...pi_op_DescribeOrganizationConfiguration.go | 117 + service/inspector2/api_op_Disable.go | 127 + .../api_op_DisableDelegatedAdminAccount.go | 124 + .../inspector2/api_op_DisassociateMember.go | 122 + service/inspector2/api_op_Enable.go | 171 + .../api_op_EnableDelegatedAdminAccount.go | 165 + .../api_op_GetDelegatedAdminAccount.go | 114 + .../api_op_GetFindingsReportStatus.go | 131 + service/inspector2/api_op_GetMember.go | 122 + .../api_op_ListAccountPermissions.go | 222 + service/inspector2/api_op_ListCoverage.go | 221 + .../api_op_ListCoverageStatistics.go | 216 + .../api_op_ListDelegatedAdminAccounts.go | 219 + service/inspector2/api_op_ListFilters.go | 222 + .../api_op_ListFindingAggregations.go | 237 + service/inspector2/api_op_ListFindings.go | 223 + service/inspector2/api_op_ListMembers.go | 217 + .../inspector2/api_op_ListTagsForResource.go | 120 + service/inspector2/api_op_ListUsageTotals.go | 216 + service/inspector2/api_op_TagResource.go | 121 + service/inspector2/api_op_UntagResource.go | 121 + service/inspector2/api_op_UpdateFilter.go | 137 + .../api_op_UpdateOrganizationConfiguration.go | 125 + service/inspector2/deserializers.go | 10985 ++++++++++++++++ service/inspector2/doc.go | 9 + service/inspector2/endpoints.go | 200 + service/inspector2/generated.json | 57 + service/inspector2/go.mod | 16 + service/inspector2/go.sum | 14 + service/inspector2/go_module_metadata.go | 6 + .../internal/endpoints/endpoints.go | 250 + .../internal/endpoints/endpoints_test.go | 11 + service/inspector2/protocol_test.go | 3 + service/inspector2/serializers.go | 3325 +++++ service/inspector2/types/enums.go | 1057 ++ service/inspector2/types/errors.go | 175 + service/inspector2/types/types.go | 1843 +++ .../inspector2/types/types_exported_test.go | 108 + service/inspector2/validators.go | 1509 +++ service/iot/api_op_AddThingToBillingGroup.go | 3 +- .../iot/api_op_CreateCertificateFromCsr.go | 7 +- service/iot/api_op_CreateJob.go | 4 + service/iot/api_op_CreateStream.go | 3 +- .../iot/api_op_DescribeManagedJobTemplate.go | 144 + service/iot/api_op_GetBucketsAggregation.go | 3 +- service/iot/api_op_ListManagedJobTemplates.go | 126 + .../api_op_RegisterCertificateWithoutCA.go | 4 +- .../iot/api_op_RemoveThingFromBillingGroup.go | 3 +- service/iot/deserializers.go | 762 +- service/iot/generated.json | 2 + service/iot/serializers.go | 141 + service/iot/types/errors.go | 20 + service/iot/types/types.go | 62 +- service/iot/validators.go | 39 + .../api_op_CreateSuiteDefinition.go | 7 +- .../api_op_DeleteSuiteDefinition.go | 7 +- .../iotdeviceadvisor/api_op_GetEndpoint.go | 118 + .../api_op_GetSuiteDefinition.go | 9 +- .../iotdeviceadvisor/api_op_GetSuiteRun.go | 15 +- .../api_op_GetSuiteRunReport.go | 8 +- .../api_op_ListSuiteDefinitions.go | 5 +- .../iotdeviceadvisor/api_op_ListSuiteRuns.go | 9 +- .../api_op_ListTagsForResource.go | 5 +- .../iotdeviceadvisor/api_op_StartSuiteRun.go | 13 +- .../iotdeviceadvisor/api_op_StopSuiteRun.go | 9 +- .../iotdeviceadvisor/api_op_TagResource.go | 5 +- .../iotdeviceadvisor/api_op_UntagResource.go | 5 +- .../api_op_UpdateSuiteDefinition.go | 11 +- service/iotdeviceadvisor/deserializers.go | 166 + service/iotdeviceadvisor/doc.go | 21 +- service/iotdeviceadvisor/generated.json | 1 + service/iotdeviceadvisor/serializers.go | 62 + service/iotdeviceadvisor/types/errors.go | 8 +- service/iotdeviceadvisor/types/types.go | 60 +- ...i_op_AssociateTimeSeriesToAssetProperty.go | 198 + service/iotsitewise/api_op_CreatePortal.go | 7 +- service/iotsitewise/api_op_CreateProject.go | 3 +- .../iotsitewise/api_op_DeleteTimeSeries.go | 204 + ..._DescribeDefaultEncryptionConfiguration.go | 4 +- .../api_op_DescribeStorageConfiguration.go | 35 +- .../iotsitewise/api_op_DescribeTimeSeries.go | 201 + ...DisassociateTimeSeriesFromAssetProperty.go | 198 + ...i_op_GetInterpolatedAssetPropertyValues.go | 35 +- service/iotsitewise/api_op_ListTimeSeries.go | 257 + ...pi_op_PutDefaultEncryptionConfiguration.go | 6 +- .../api_op_PutStorageConfiguration.go | 70 +- service/iotsitewise/deserializers.go | 1067 +- service/iotsitewise/generated.json | 5 + service/iotsitewise/serializers.go | 411 + service/iotsitewise/types/enums.go | 37 + service/iotsitewise/types/types.go | 98 +- service/iotsitewise/validators.go | 90 + .../api_op_GetNetworkAnalyzerConfiguration.go | 127 + ...i_op_UpdateNetworkAnalyzerConfiguration.go | 132 + service/iotwireless/deserializers.go | 385 + service/iotwireless/generated.json | 2 + .../internal/endpoints/endpoints.go | 42 + service/iotwireless/serializers.go | 208 + service/iotwireless/types/enums.go | 18 + service/iotwireless/types/types.go | 12 + service/iotwireless/validators.go | 78 + .../lambda/api_op_CreateEventSourceMapping.go | 19 +- service/lambda/api_op_CreateFunction.go | 14 +- .../lambda/api_op_DeleteEventSourceMapping.go | 6 + .../lambda/api_op_GetEventSourceMapping.go | 6 + service/lambda/api_op_Invoke.go | 4 +- .../lambda/api_op_ListFunctionUrlConfigs.go | 211 - .../lambda/api_op_UpdateEventSourceMapping.go | 19 +- service/lambda/api_op_UpdateFunctionCode.go | 3 +- .../api_op_UpdateFunctionConfiguration.go | 11 +- service/lambda/deserializers.go | 1750 +-- service/lambda/doc.go | 51 +- service/lambda/generated.json | 5 - service/lambda/serializers.go | 505 +- service/lambda/types/enums.go | 18 - service/lambda/types/types.go | 78 +- service/lambda/validators.go | 198 - .../api_op_CreateCustomDataIdentifier.go | 8 +- service/macie2/api_op_CreateFindingsFilter.go | 8 +- service/macie2/api_op_CreateInvitations.go | 12 +- ...pi_op_DescribeOrganizationConfiguration.go | 8 +- service/macie2/api_op_DisableMacie.go | 3 +- .../api_op_DisableOrganizationAdminAccount.go | 2 +- .../api_op_EnableOrganizationAdminAccount.go | 2 +- .../macie2/api_op_GetAdministratorAccount.go | 4 +- service/macie2/api_op_GetBucketStatistics.go | 4 +- service/macie2/api_op_GetMacieSession.go | 15 +- service/macie2/api_op_GetMember.go | 4 +- service/macie2/api_op_ListMembers.go | 3 +- .../api_op_ListOrganizationAdminAccounts.go | 2 +- service/macie2/api_op_UpdateFindingsFilter.go | 9 +- service/macie2/api_op_UpdateMacieSession.go | 4 +- .../api_op_UpdateOrganizationConfiguration.go | 8 +- service/macie2/types/types.go | 30 +- .../mgn/api_op_ChangeServerLifeCycleState.go | 6 + service/mgn/api_op_DeleteVcenterClient.go | 116 + service/mgn/api_op_DescribeVcenterClients.go | 206 + service/mgn/api_op_DisconnectFromService.go | 6 + service/mgn/api_op_FinalizeCutover.go | 6 + service/mgn/api_op_MarkAsArchived.go | 6 + service/mgn/api_op_RetryDataReplication.go | 6 + service/mgn/api_op_StartReplication.go | 148 + ...pi_op_UpdateSourceServerReplicationType.go | 153 + service/mgn/deserializers.go | 1306 +- service/mgn/generated.json | 4 + service/mgn/serializers.go | 302 + service/mgn/types/enums.go | 48 +- service/mgn/types/errors.go | 25 + service/mgn/types/types.go | 48 + service/mgn/validators.go | 120 + .../migrationhubrefactorspaces/LICENSE.txt | 202 + .../migrationhubrefactorspaces/api_client.go | 317 + .../api_op_CreateApplication.go | 232 + .../api_op_CreateEnvironment.go | 208 + .../api_op_CreateRoute.go | 264 + .../api_op_CreateService.go | 248 + .../api_op_DeleteApplication.go | 144 + .../api_op_DeleteEnvironment.go | 136 + .../api_op_DeleteResourcePolicy.go | 116 + .../api_op_DeleteRoute.go | 147 + .../api_op_DeleteService.go | 152 + .../api_op_GetApplication.go | 167 + .../api_op_GetEnvironment.go | 156 + .../api_op_GetResourcePolicy.go | 120 + .../api_op_GetRoute.go | 189 + .../api_op_GetService.go | 183 + .../api_op_ListApplications.go | 220 + .../api_op_ListEnvironmentVpcs.go | 221 + .../api_op_ListEnvironments.go | 212 + .../api_op_ListRoutes.go | 224 + .../api_op_ListServices.go | 224 + .../api_op_ListTagsForResource.go | 121 + .../api_op_PutResourcePolicy.go | 127 + .../api_op_TagResource.go | 125 + .../api_op_UntagResource.go | 124 + .../deserializers.go | 7222 ++++++++++ service/migrationhubrefactorspaces/doc.go | 14 + .../migrationhubrefactorspaces/endpoints.go | 200 + .../migrationhubrefactorspaces/generated.json | 49 + service/migrationhubrefactorspaces/go.mod | 16 + service/migrationhubrefactorspaces/go.sum | 14 + .../go_module_metadata.go | 6 + .../internal/endpoints/endpoints.go | 250 + .../internal/endpoints/endpoints_test.go | 11 + .../protocol_test.go | 3 + .../migrationhubrefactorspaces/serializers.go | 1844 +++ .../migrationhubrefactorspaces/types/enums.go | 317 + .../types/errors.go | 175 + .../migrationhubrefactorspaces/types/types.go | 455 + .../migrationhubrefactorspaces/validators.go | 1007 ++ .../opensearch/api_op_UpdateDomainConfig.go | 8 + service/opensearch/deserializers.go | 54 + service/opensearch/serializers.go | 5 + service/opensearch/types/types.go | 15 + service/outposts/api_op_CancelOrder.go | 116 + service/outposts/api_op_CreateSite.go | 147 + service/outposts/api_op_GetCatalogItem.go | 121 + service/outposts/api_op_GetOrder.go | 121 + service/outposts/api_op_GetSite.go | 121 + service/outposts/api_op_GetSiteAddress.go | 132 + service/outposts/api_op_ListCatalogItems.go | 231 + service/outposts/api_op_ListOrders.go | 212 + service/outposts/api_op_ListOutposts.go | 12 +- service/outposts/api_op_ListSites.go | 2 +- service/outposts/api_op_UpdateSite.go | 130 + service/outposts/api_op_UpdateSiteAddress.go | 137 + ...api_op_UpdateSiteRackPhysicalProperties.go | 230 + service/outposts/deserializers.go | 2868 +++- service/outposts/doc.go | 12 +- service/outposts/generated.json | 11 + service/outposts/serializers.go | 1174 +- service/outposts/types/enums.go | 346 + service/outposts/types/types.go | 220 +- service/outposts/validators.go | 402 + .../api_op_CreateBatchSegmentJob.go | 153 + service/personalize/api_op_CreateCampaign.go | 2 +- .../personalize/api_op_CreateDatasetGroup.go | 59 +- .../personalize/api_op_CreateRecommender.go | 162 + service/personalize/api_op_CreateSchema.go | 14 +- .../api_op_CreateSolutionVersion.go | 34 +- .../personalize/api_op_DeleteRecommender.go | 119 + .../api_op_DescribeBatchSegmentJob.go | 123 + .../personalize/api_op_DescribeRecommender.go | 132 + .../api_op_ListBatchSegmentJobs.go | 218 + service/personalize/api_op_ListRecipes.go | 5 + .../personalize/api_op_ListRecommenders.go | 220 + .../personalize/api_op_UpdateRecommender.go | 126 + service/personalize/deserializers.go | 3083 ++++- service/personalize/generated.json | 8 + service/personalize/serializers.go | 689 +- service/personalize/types/enums.go | 18 + service/personalize/types/types.go | 273 +- service/personalize/validators.go | 301 + .../api_op_GetRecommendations.go | 29 +- service/personalizeruntime/serializers.go | 5 + service/personalizeruntime/validators.go | 39 - service/pinpoint/api_op_SendOTPMessage.go | 129 + service/pinpoint/api_op_VerifyOTPMessage.go | 128 + service/pinpoint/deserializers.go | 370 + service/pinpoint/generated.json | 2 + service/pinpoint/serializers.go | 246 + service/pinpoint/types/types.go | 81 + service/pinpoint/validators.go | 140 + ...i_op_AcceptEnvironmentAccountConnection.go | 8 +- .../api_op_CancelEnvironmentDeployment.go | 20 +- .../api_op_CancelServiceInstanceDeployment.go | 6 +- .../api_op_CancelServicePipelineDeployment.go | 6 +- service/proton/api_op_CreateEnvironment.go | 58 +- ...i_op_CreateEnvironmentAccountConnection.go | 30 +- .../api_op_CreateEnvironmentTemplate.go | 41 +- ...api_op_CreateEnvironmentTemplateVersion.go | 13 +- service/proton/api_op_CreateRepository.go | 146 + service/proton/api_op_CreateService.go | 43 +- .../proton/api_op_CreateServiceTemplate.go | 33 +- .../api_op_CreateServiceTemplateVersion.go | 17 +- .../proton/api_op_CreateTemplateSyncConfig.go | 153 + service/proton/api_op_DeleteEnvironment.go | 2 +- ...i_op_DeleteEnvironmentAccountConnection.go | 16 +- .../api_op_DeleteEnvironmentTemplate.go | 2 +- ...api_op_DeleteEnvironmentTemplateVersion.go | 12 +- service/proton/api_op_DeleteRepository.go | 126 + service/proton/api_op_DeleteService.go | 2 +- .../proton/api_op_DeleteServiceTemplate.go | 2 +- .../api_op_DeleteServiceTemplateVersion.go | 2 +- .../proton/api_op_DeleteTemplateSyncConfig.go | 126 + service/proton/api_op_GetAccountSettings.go | 4 +- service/proton/api_op_GetEnvironment.go | 2 +- .../api_op_GetEnvironmentAccountConnection.go | 4 +- .../proton/api_op_GetEnvironmentTemplate.go | 2 +- .../api_op_GetEnvironmentTemplateVersion.go | 4 +- service/proton/api_op_GetRepository.go | 128 + .../api_op_GetRepositorySyncStatus.go} | 66 +- service/proton/api_op_GetService.go | 2 +- service/proton/api_op_GetServiceInstance.go | 2 +- service/proton/api_op_GetServiceTemplate.go | 2 +- .../api_op_GetServiceTemplateVersion.go | 4 +- .../proton/api_op_GetTemplateSyncConfig.go | 126 + .../proton/api_op_GetTemplateSyncStatus.go | 137 + ...pi_op_ListEnvironmentAccountConnections.go | 4 +- .../proton/api_op_ListEnvironmentOutputs.go | 208 + ..._op_ListEnvironmentProvisionedResources.go | 211 + .../api_op_ListEnvironmentTemplateVersions.go | 4 +- service/proton/api_op_ListRepositories.go | 213 + .../api_op_ListRepositorySyncDefinitions.go | 221 + .../api_op_ListServiceInstanceOutputs.go | 214 + ...ListServiceInstanceProvisionedResources.go | 216 + .../api_op_ListServicePipelineOutputs.go | 209 + ...ListServicePipelineProvisionedResources.go | 211 + .../api_op_ListServiceTemplateVersions.go | 8 +- service/proton/api_op_ListTagsForResource.go | 9 +- ...op_NotifyResourceDeploymentStatusChange.go | 137 + ...i_op_RejectEnvironmentAccountConnection.go | 4 +- service/proton/api_op_TagResource.go | 9 +- service/proton/api_op_UntagResource.go | 9 +- .../proton/api_op_UpdateAccountSettings.go | 21 +- service/proton/api_op_UpdateEnvironment.go | 66 +- ...i_op_UpdateEnvironmentAccountConnection.go | 4 +- .../api_op_UpdateEnvironmentTemplate.go | 2 +- ...api_op_UpdateEnvironmentTemplateVersion.go | 4 +- service/proton/api_op_UpdateService.go | 6 +- .../proton/api_op_UpdateServiceInstance.go | 2 +- .../proton/api_op_UpdateServicePipeline.go | 2 +- .../proton/api_op_UpdateServiceTemplate.go | 2 +- .../api_op_UpdateServiceTemplateVersion.go | 4 +- .../proton/api_op_UpdateTemplateSyncConfig.go | 146 + service/proton/deserializers.go | 7814 ++++++++--- service/proton/doc.go | 73 +- service/proton/generated.json | 18 + service/proton/serializers.go | 2094 ++- service/proton/types/enums.go | 148 + service/proton/types/errors.go | 4 +- service/proton/types/types.go | 431 +- service/proton/validators.go | 814 +- .../api_op_CreateAccountCustomization.go | 27 +- service/quicksight/api_op_CreateDashboard.go | 32 +- service/quicksight/api_op_CreateDataSet.go | 3 +- service/quicksight/api_op_CreateFolder.go | 6 +- .../api_op_CreateFolderMembership.go | 8 +- .../api_op_CreateIAMPolicyAssignment.go | 10 +- service/quicksight/api_op_CreateTheme.go | 3 +- service/quicksight/api_op_DeleteFolder.go | 10 +- .../api_op_DeleteFolderMembership.go | 6 +- .../api_op_DeleteIAMPolicyAssignment.go | 4 +- .../api_op_DescribeAccountCustomization.go | 48 +- .../api_op_DescribeAccountSettings.go | 12 +- .../api_op_DescribeDashboardPermissions.go | 9 +- service/quicksight/api_op_DescribeFolder.go | 8 +- .../api_op_DescribeFolderPermissions.go | 10 +- ...pi_op_DescribeFolderResolvedPermissions.go | 14 +- .../api_op_DescribeIAMPolicyAssignment.go | 5 +- .../api_op_DescribeIpRestriction.go | 15 +- ...pi_op_GenerateEmbedUrlForRegisteredUser.go | 5 +- .../quicksight/api_op_GetDashboardEmbedUrl.go | 10 +- .../quicksight/api_op_GetSessionEmbedUrl.go | 11 +- .../quicksight/api_op_ListFolderMembers.go | 8 +- service/quicksight/api_op_ListFolders.go | 10 +- .../api_op_ListIAMPolicyAssignments.go | 6 +- .../api_op_ListIAMPolicyAssignmentsForUser.go | 2 +- service/quicksight/api_op_RegisterUser.go | 34 +- service/quicksight/api_op_SearchFolders.go | 10 +- service/quicksight/api_op_TagResource.go | 15 +- service/quicksight/api_op_UpdateDashboard.go | 18 +- .../api_op_UpdateDashboardPermissions.go | 9 + service/quicksight/api_op_UpdateDataSet.go | 3 +- service/quicksight/api_op_UpdateFolder.go | 12 +- .../api_op_UpdateFolderPermissions.go | 14 +- .../api_op_UpdateIAMPolicyAssignment.go | 10 +- .../quicksight/api_op_UpdateIpRestriction.go | 16 +- service/quicksight/api_op_UpdateUser.go | 11 +- service/quicksight/deserializers.go | 127 + service/quicksight/serializers.go | 55 + service/quicksight/types/enums.go | 2 + service/quicksight/types/errors.go | 7 +- service/quicksight/types/types.go | 145 +- .../quicksight/types/types_exported_test.go | 4 + service/quicksight/validators.go | 47 + service/rbin/LICENSE.txt | 202 + service/rbin/api_client.go | 296 + service/rbin/api_op_CreateRule.go | 167 + service/rbin/api_op_DeleteRule.go | 119 + service/rbin/api_op_GetRule.go | 139 + service/rbin/api_op_ListRules.go | 228 + service/rbin/api_op_ListTagsForResource.go | 121 + service/rbin/api_op_TagResource.go | 122 + service/rbin/api_op_UntagResource.go | 121 + service/rbin/api_op_UpdateRule.go | 162 + service/rbin/deserializers.go | 1826 +++ service/rbin/doc.go | 20 + service/rbin/endpoints.go | 200 + service/rbin/generated.json | 34 + service/rbin/go.mod | 16 + service/rbin/go.sum | 14 + service/rbin/go_module_metadata.go | 6 + service/rbin/internal/endpoints/endpoints.go | 250 + .../rbin/internal/endpoints/endpoints_test.go | 11 + service/rbin/protocol_test.go | 3 + service/rbin/serializers.go | 692 + service/rbin/types/enums.go | 105 + service/rbin/types/errors.go | 91 + service/rbin/types/types.go | 75 + service/rbin/validators.go | 450 + service/rds/api_op_AddRoleToDBCluster.go | 8 +- .../api_op_AuthorizeDBSecurityGroupIngress.go | 2 +- .../rds/api_op_CopyDBClusterParameterGroup.go | 3 +- service/rds/api_op_CopyDBClusterSnapshot.go | 18 +- .../rds/api_op_CreateCustomDBEngineVersion.go | 47 +- service/rds/api_op_CreateDBCluster.go | 317 +- service/rds/api_op_CreateDBClusterEndpoint.go | 6 +- .../api_op_CreateDBClusterParameterGroup.go | 58 +- service/rds/api_op_CreateDBClusterSnapshot.go | 8 +- service/rds/api_op_CreateDBInstance.go | 149 +- .../rds/api_op_CreateDBInstanceReadReplica.go | 36 +- service/rds/api_op_DeleteDBCluster.go | 28 +- .../api_op_DeleteDBClusterParameterGroup.go | 8 +- service/rds/api_op_DeleteDBClusterSnapshot.go | 8 +- service/rds/api_op_DeleteDBInstance.go | 6 +- .../rds/api_op_DescribeDBClusterBacktracks.go | 2 +- ...api_op_DescribeDBClusterParameterGroups.go | 8 +- .../rds/api_op_DescribeDBClusterParameters.go | 8 +- ..._op_DescribeDBClusterSnapshotAttributes.go | 3 +- .../rds/api_op_DescribeDBClusterSnapshots.go | 9 +- service/rds/api_op_DescribeDBClusters.go | 13 +- ..._DescribeEngineDefaultClusterParameters.go | 2 +- service/rds/api_op_DescribeExportTasks.go | 5 +- service/rds/api_op_DescribeGlobalClusters.go | 2 +- ...i_op_DescribeOrderableDBInstanceOptions.go | 3 +- service/rds/api_op_FailoverDBCluster.go | 55 +- .../rds/api_op_ModifyCustomDBEngineVersion.go | 2 +- service/rds/api_op_ModifyDBCluster.go | 197 +- .../api_op_ModifyDBClusterParameterGroup.go | 39 +- ...api_op_ModifyDBClusterSnapshotAttribute.go | 3 +- service/rds/api_op_ModifyDBInstance.go | 42 +- service/rds/api_op_ModifyGlobalCluster.go | 2 +- service/rds/api_op_PromoteReadReplica.go | 6 +- .../rds/api_op_PromoteReadReplicaDBCluster.go | 23 +- service/rds/api_op_RebootDBCluster.go | 150 + service/rds/api_op_RebootDBInstance.go | 6 +- service/rds/api_op_RemoveFromGlobalCluster.go | 2 +- service/rds/api_op_RemoveRoleFromDBCluster.go | 14 +- .../api_op_ResetDBClusterParameterGroup.go | 11 +- service/rds/api_op_RestoreDBClusterFromS3.go | 26 +- .../api_op_RestoreDBClusterFromSnapshot.go | 191 +- .../api_op_RestoreDBClusterToPointInTime.go | 156 +- .../api_op_RestoreDBInstanceFromDBSnapshot.go | 34 +- service/rds/api_op_RestoreDBInstanceFromS3.go | 34 +- .../api_op_RestoreDBInstanceToPointInTime.go | 36 +- service/rds/api_op_StartDBCluster.go | 20 +- service/rds/api_op_StartDBInstance.go | 6 +- service/rds/api_op_StopDBCluster.go | 20 +- service/rds/api_op_StopDBInstance.go | 6 +- service/rds/deserializers.go | 362 + service/rds/generated.json | 1 + service/rds/serializers.go | 236 + service/rds/types/types.go | 122 +- service/rds/validators.go | 39 + service/redshift/api_op_DescribeDataShares.go | 91 + .../api_op_DescribeDataSharesForConsumer.go | 93 + .../api_op_DescribeDataSharesForProducer.go | 93 + ...i_op_DescribeReservedNodeExchangeStatus.go | 232 + ...eservedNodeExchangeConfigurationOptions.go | 245 + service/redshift/api_op_ResizeCluster.go | 6 + .../api_op_RestoreFromClusterSnapshot.go | 6 + service/redshift/deserializers.go | 883 ++ service/redshift/generated.json | 2 + service/redshift/serializers.go | 217 + service/redshift/types/enums.go | 46 + service/redshift/types/errors.go | 19 + service/redshift/types/types.go | 63 + service/redshift/validators.go | 39 + service/rum/LICENSE.txt | 202 + service/rum/api_client.go | 296 + service/rum/api_op_CreateAppMonitor.go | 164 + .../api_op_DeleteAppMonitor.go} | 37 +- service/rum/api_op_GetAppMonitor.go | 121 + service/rum/api_op_GetAppMonitorData.go | 225 + service/rum/api_op_ListAppMonitors.go | 211 + service/rum/api_op_ListTagsForResource.go | 127 + service/rum/api_op_PutRumEvents.go | 173 + service/rum/api_op_TagResource.go | 133 + service/rum/api_op_UntagResource.go | 121 + service/rum/api_op_UpdateAppMonitor.go | 147 + service/rum/deserializers.go | 2558 ++++ service/rum/doc.go | 17 + service/rum/endpoints.go | 200 + service/rum/generated.json | 36 + service/rum/go.mod | 16 + service/rum/go.sum | 14 + service/rum/go_module_metadata.go | 6 + service/rum/internal/endpoints/endpoints.go | 250 + .../rum/internal/endpoints/endpoints_test.go | 11 + service/rum/protocol_test.go | 3 + service/rum/serializers.go | 1043 ++ service/rum/types/enums.go | 46 + service/rum/types/errors.go | 153 + service/rum/types/types.go | 262 + service/rum/validators.go | 447 + service/s3/api_op_CompleteMultipartUpload.go | 11 +- ...i_op_GetBucketNotificationConfiguration.go | 3 + service/s3/api_op_GetObject.go | 16 +- ...i_op_PutBucketNotificationConfiguration.go | 4 + service/s3/deserializers.go | 150 + service/s3/serializers.go | 89 + service/s3/types/enums.go | 10 + service/s3/types/types.go | 53 +- service/s3/types/types_exported_test.go | 8 + service/s3control/deserializers.go | 58 + service/s3control/serializers.go | 29 + service/s3control/types/types.go | 23 +- service/s3control/validators.go | 27 +- service/sqs/api_op_AddPermission.go | 6 +- service/sqs/api_op_CreateQueue.go | 76 +- service/sqs/api_op_GetQueueAttributes.go | 73 +- service/sqs/api_op_GetQueueUrl.go | 2 +- service/sqs/api_op_ReceiveMessage.go | 8 + service/sqs/api_op_SetQueueAttributes.go | 79 +- service/sqs/types/enums.go | 2 + service/sqs/types/types.go | 2 +- service/ssm/api_op_AddTagsToResource.go | 44 +- service/ssm/api_op_CancelCommand.go | 4 +- service/ssm/api_op_CreateActivation.go | 49 +- service/ssm/api_op_CreateAssociation.go | 44 +- service/ssm/api_op_CreateAssociationBatch.go | 10 +- service/ssm/api_op_CreateDocument.go | 2 +- service/ssm/api_op_CreateMaintenanceWindow.go | 6 +- service/ssm/api_op_CreatePatchBaseline.go | 9 +- service/ssm/api_op_DeleteActivation.go | 4 +- service/ssm/api_op_DeleteAssociation.go | 20 +- service/ssm/api_op_DeleteDocument.go | 6 +- service/ssm/api_op_DeleteResourceDataSync.go | 2 +- .../ssm/api_op_DeregisterManagedInstance.go | 8 +- service/ssm/api_op_DescribeActivations.go | 2 +- service/ssm/api_op_DescribeAssociation.go | 10 +- .../ssm/api_op_DescribeAvailablePatches.go | 4 +- ...p_DescribeEffectiveInstanceAssociations.go | 6 +- ...i_op_DescribeInstanceAssociationsStatus.go | 4 +- .../ssm/api_op_DescribeInstanceInformation.go | 30 +- .../ssm/api_op_DescribeInstancePatchStates.go | 11 +- ...escribeInstancePatchStatesForPatchGroup.go | 6 +- service/ssm/api_op_DescribeInstancePatches.go | 6 +- ...pi_op_DescribeMaintenanceWindowSchedule.go | 2 +- ..._op_DescribeMaintenanceWindowsForTarget.go | 8 +- service/ssm/api_op_DescribePatchGroupState.go | 44 +- service/ssm/api_op_GetCommandInvocation.go | 71 +- service/ssm/api_op_GetConnectionStatus.go | 10 +- ...p_GetDeployablePatchSnapshotForInstance.go | 16 +- service/ssm/api_op_GetInventory.go | 8 +- service/ssm/api_op_GetPatchBaseline.go | 9 +- service/ssm/api_op_ListAssociations.go | 4 +- service/ssm/api_op_ListCommandInvocations.go | 12 +- service/ssm/api_op_ListCommands.go | 6 +- service/ssm/api_op_ListInventoryEntries.go | 10 +- .../api_op_ListResourceComplianceSummaries.go | 7 +- service/ssm/api_op_PutComplianceItems.go | 5 +- service/ssm/api_op_PutInventory.go | 10 +- service/ssm/api_op_PutParameter.go | 18 +- ..._op_RegisterTargetWithMaintenanceWindow.go | 23 +- ...pi_op_RegisterTaskWithMaintenanceWindow.go | 8 +- service/ssm/api_op_RemoveTagsFromResource.go | 8 +- service/ssm/api_op_ResumeSession.go | 15 +- service/ssm/api_op_SendCommand.go | 38 +- service/ssm/api_op_StartSession.go | 14 +- service/ssm/api_op_TerminateSession.go | 2 +- service/ssm/api_op_UpdateAssociation.go | 10 +- service/ssm/api_op_UpdateAssociationStatus.go | 4 +- .../ssm/api_op_UpdateMaintenanceWindowTask.go | 15 +- .../ssm/api_op_UpdateManagedInstanceRole.go | 8 +- service/ssm/api_op_UpdatePatchBaseline.go | 18 +- service/ssm/deserializers.go | 21 + service/ssm/doc.go | 17 +- service/ssm/serializers.go | 37 + service/ssm/types/enums.go | 22 + service/ssm/types/errors.go | 27 +- service/ssm/types/types.go | 568 +- service/ssm/validators.go | 40 + service/sts/api_op_AssumeRole.go | 68 +- service/sts/api_op_AssumeRoleWithSAML.go | 4 +- .../sts/api_op_AssumeRoleWithWebIdentity.go | 4 +- .../sts/api_op_DecodeAuthorizationMessage.go | 22 +- service/sts/api_op_GetFederationToken.go | 70 +- service/sts/api_op_GetSessionToken.go | 12 +- service/sts/types/errors.go | 2 +- service/sts/types/types.go | 3 +- service/textract/api_op_AnalyzeExpense.go | 16 +- service/textract/api_op_AnalyzeID.go | 130 + service/textract/deserializers.go | 471 + service/textract/generated.json | 1 + service/textract/serializers.go | 82 + service/textract/types/enums.go | 16 + service/textract/types/errors.go | 4 +- service/textract/types/types.go | 60 +- service/textract/validators.go | 39 + service/timestreamquery/api_op_CancelQuery.go | 16 +- .../api_op_CreateScheduledQuery.go | 280 + .../api_op_DeleteScheduledQuery.go | 170 + .../api_op_DescribeEndpoints.go | 23 +- .../api_op_DescribeScheduledQuery.go | 177 + .../api_op_ExecuteScheduledQuery.go | 215 + .../api_op_ListScheduledQueries.go | 273 + .../api_op_ListTagsForResource.go | 275 + .../timestreamquery/api_op_PrepareQuery.go | 196 + service/timestreamquery/api_op_Query.go | 132 +- service/timestreamquery/api_op_TagResource.go | 179 + .../timestreamquery/api_op_UntagResource.go | 177 + .../api_op_UpdateScheduledQuery.go | 176 + service/timestreamquery/deserializers.go | 4090 +++++- service/timestreamquery/doc.go | 2 +- service/timestreamquery/generated.json | 10 + service/timestreamquery/serializers.go | 1148 +- service/timestreamquery/types/enums.go | 120 + service/timestreamquery/types/errors.go | 42 +- service/timestreamquery/types/types.go | 483 +- service/timestreamquery/validators.go | 706 + .../timestreamwrite/api_op_CreateDatabase.go | 12 +- service/timestreamwrite/api_op_CreateTable.go | 19 +- .../timestreamwrite/api_op_DeleteDatabase.go | 4 +- service/timestreamwrite/api_op_DeleteTable.go | 4 +- .../api_op_DescribeDatabase.go | 8 +- .../api_op_DescribeEndpoints.go | 23 +- .../timestreamwrite/api_op_DescribeTable.go | 8 +- .../timestreamwrite/api_op_ListDatabases.go | 9 +- service/timestreamwrite/api_op_ListTables.go | 4 +- .../timestreamwrite/api_op_UpdateDatabase.go | 4 +- service/timestreamwrite/api_op_UpdateTable.go | 20 +- .../timestreamwrite/api_op_WriteRecords.go | 49 +- service/timestreamwrite/deserializers.go | 287 +- service/timestreamwrite/doc.go | 26 +- service/timestreamwrite/serializers.go | 116 + service/timestreamwrite/types/enums.go | 30 +- service/timestreamwrite/types/errors.go | 15 +- service/timestreamwrite/types/types.go | 139 +- service/timestreamwrite/validators.go | 72 +- .../api_op_StartStreamTranscription.go | 64 +- service/transcribestreaming/deserializers.go | 141 + service/transcribestreaming/serializers.go | 15 + service/transcribestreaming/types/types.go | 32 +- service/transcribestreaming/validators.go | 3 - service/translate/api_op_GetParallelData.go | 15 +- service/translate/api_op_GetTerminology.go | 11 +- .../api_op_StartTextTranslationJob.go | 4 + service/translate/api_op_TranslateText.go | 7 + service/translate/deserializers.go | 50 + service/translate/serializers.go | 26 + service/translate/types/enums.go | 16 + service/translate/types/types.go | 49 +- .../wellarchitected/api_op_AssociateLenses.go | 14 +- .../wellarchitected/api_op_CreateLensShare.go | 183 + .../api_op_CreateLensVersion.go | 184 + .../wellarchitected/api_op_CreateMilestone.go | 11 +- .../wellarchitected/api_op_CreateWorkload.go | 28 +- .../api_op_CreateWorkloadShare.go | 24 +- service/wellarchitected/api_op_DeleteLens.go | 180 + .../wellarchitected/api_op_DeleteLensShare.go | 178 + .../wellarchitected/api_op_DeleteWorkload.go | 8 +- .../api_op_DeleteWorkloadShare.go | 8 +- .../api_op_DisassociateLenses.go | 12 +- service/wellarchitected/api_op_ExportLens.go | 133 + service/wellarchitected/api_op_GetAnswer.go | 9 +- service/wellarchitected/api_op_GetLens.go | 125 + .../wellarchitected/api_op_GetLensReview.go | 6 +- .../api_op_GetLensReviewReport.go | 6 +- .../api_op_GetLensVersionDifference.go | 17 +- .../wellarchitected/api_op_GetMilestone.go | 6 +- service/wellarchitected/api_op_GetWorkload.go | 3 +- service/wellarchitected/api_op_ImportLens.go | 190 + service/wellarchitected/api_op_ListAnswers.go | 9 +- .../api_op_ListLensReviewImprovements.go | 9 +- .../wellarchitected/api_op_ListLensReviews.go | 6 +- .../wellarchitected/api_op_ListLensShares.go | 217 + service/wellarchitected/api_op_ListLenses.go | 9 + .../wellarchitected/api_op_ListMilestones.go | 6 +- .../api_op_ListNotifications.go | 3 +- .../api_op_ListShareInvitations.go | 7 + .../api_op_ListWorkloadShares.go | 9 +- .../wellarchitected/api_op_UpdateAnswer.go | 9 +- .../api_op_UpdateLensReview.go | 6 +- .../wellarchitected/api_op_UpdateWorkload.go | 16 +- .../api_op_UpdateWorkloadShare.go | 6 +- .../api_op_UpgradeLensReview.go | 8 +- service/wellarchitected/deserializers.go | 2526 +++- service/wellarchitected/doc.go | 11 +- service/wellarchitected/generated.json | 8 + service/wellarchitected/serializers.go | 617 + service/wellarchitected/types/enums.go | 82 + service/wellarchitected/types/errors.go | 2 +- service/wellarchitected/types/types.go | 200 +- service/wellarchitected/validators.go | 342 +- .../api_op_CreateUpdatedWorkspaceImage.go | 14 +- 1029 files changed, 210347 insertions(+), 18815 deletions(-) create mode 100644 .changelog/2f38d632e93e45f2bf04734b9878a379.json create mode 100644 .changelog/41575353444b40ffbf474f4155544f00.json create mode 100644 codegen/sdk-codegen/aws-models/evidently.2021-02-01.json create mode 100644 codegen/sdk-codegen/aws-models/inspector2.2020-06-08.json create mode 100644 codegen/sdk-codegen/aws-models/migrationhubrefactorspaces.2021-10-26.json create mode 100644 codegen/sdk-codegen/aws-models/rbin.2021-06-15.json create mode 100644 codegen/sdk-codegen/aws-models/rum.2018-05-10.json create mode 100644 service/braket/api_op_CancelJob.go create mode 100644 service/braket/api_op_CreateJob.go create mode 100644 service/braket/api_op_GetJob.go create mode 100644 service/braket/api_op_SearchJobs.go create mode 100644 service/computeoptimizer/api_op_DeleteRecommendationPreferences.go create mode 100644 service/computeoptimizer/api_op_GetEffectiveRecommendationPreferences.go create mode 100644 service/computeoptimizer/api_op_GetRecommendationPreferences.go create mode 100644 service/computeoptimizer/api_op_PutRecommendationPreferences.go create mode 100644 service/connect/api_op_CreateContactFlowModule.go create mode 100644 service/connect/api_op_DeleteContactFlow.go rename service/{lambda/api_op_UpdateFunctionUrlConfig.go => connect/api_op_DeleteContactFlowModule.go} (58%) create mode 100644 service/connect/api_op_DescribeContactFlowModule.go create mode 100644 service/connect/api_op_ListContactFlowModules.go create mode 100644 service/connect/api_op_UpdateContactFlowMetadata.go create mode 100644 service/connect/api_op_UpdateContactFlowModuleContent.go create mode 100644 service/connect/api_op_UpdateContactFlowModuleMetadata.go create mode 100644 service/customerprofiles/api_op_GetAutoMergingPreview.go create mode 100644 service/customerprofiles/api_op_GetIdentityResolutionJob.go create mode 100644 service/customerprofiles/api_op_ListIdentityResolutionJobs.go create mode 100644 service/dataexchange/api_op_SendApiAsset.go create mode 100644 service/ec2/api_op_DescribeSnapshotTierStatus.go create mode 100644 service/ec2/api_op_ListSnapshotsInRecycleBin.go create mode 100644 service/ec2/api_op_ModifyPrivateDnsNameOptions.go create mode 100644 service/ec2/api_op_ModifySnapshotTier.go create mode 100644 service/ec2/api_op_RestoreSnapshotFromRecycleBin.go create mode 100644 service/ec2/api_op_RestoreSnapshotTier.go create mode 100644 service/ecr/api_op_BatchGetRepositoryScanningConfiguration.go create mode 100644 service/ecr/api_op_CreatePullThroughCacheRule.go create mode 100644 service/ecr/api_op_DeletePullThroughCacheRule.go create mode 100644 service/ecr/api_op_DescribePullThroughCacheRules.go create mode 100644 service/ecr/api_op_GetRegistryScanningConfiguration.go create mode 100644 service/ecr/api_op_PutRegistryScanningConfiguration.go create mode 100644 service/evidently/LICENSE.txt create mode 100644 service/evidently/api_client.go create mode 100644 service/evidently/api_op_BatchEvaluateFeature.go create mode 100644 service/evidently/api_op_CreateExperiment.go create mode 100644 service/evidently/api_op_CreateFeature.go create mode 100644 service/evidently/api_op_CreateLaunch.go create mode 100644 service/evidently/api_op_CreateProject.go create mode 100644 service/evidently/api_op_DeleteExperiment.go create mode 100644 service/evidently/api_op_DeleteFeature.go create mode 100644 service/evidently/api_op_DeleteLaunch.go create mode 100644 service/evidently/api_op_DeleteProject.go create mode 100644 service/evidently/api_op_EvaluateFeature.go create mode 100644 service/evidently/api_op_GetExperiment.go create mode 100644 service/evidently/api_op_GetExperimentResults.go create mode 100644 service/evidently/api_op_GetFeature.go create mode 100644 service/evidently/api_op_GetLaunch.go create mode 100644 service/evidently/api_op_GetProject.go create mode 100644 service/evidently/api_op_ListExperiments.go create mode 100644 service/evidently/api_op_ListFeatures.go create mode 100644 service/evidently/api_op_ListLaunches.go create mode 100644 service/evidently/api_op_ListProjects.go create mode 100644 service/evidently/api_op_ListTagsForResource.go create mode 100644 service/evidently/api_op_PutProjectEvents.go create mode 100644 service/evidently/api_op_StartExperiment.go create mode 100644 service/evidently/api_op_StartLaunch.go create mode 100644 service/evidently/api_op_StopExperiment.go create mode 100644 service/evidently/api_op_StopLaunch.go create mode 100644 service/evidently/api_op_TagResource.go create mode 100644 service/evidently/api_op_UntagResource.go create mode 100644 service/evidently/api_op_UpdateExperiment.go create mode 100644 service/evidently/api_op_UpdateFeature.go create mode 100644 service/evidently/api_op_UpdateLaunch.go create mode 100644 service/evidently/api_op_UpdateProject.go create mode 100644 service/evidently/api_op_UpdateProjectDataDelivery.go create mode 100644 service/evidently/deserializers.go create mode 100644 service/evidently/doc.go create mode 100644 service/evidently/endpoints.go create mode 100644 service/evidently/generated.json create mode 100644 service/evidently/go.mod create mode 100644 service/evidently/go.sum create mode 100644 service/evidently/go_module_metadata.go create mode 100644 service/evidently/internal/endpoints/endpoints.go create mode 100644 service/evidently/internal/endpoints/endpoints_test.go create mode 100644 service/evidently/protocol_test.go create mode 100644 service/evidently/serializers.go create mode 100644 service/evidently/types/enums.go create mode 100644 service/evidently/types/errors.go create mode 100644 service/evidently/types/types.go create mode 100644 service/evidently/types/types_exported_test.go create mode 100644 service/evidently/validators.go create mode 100644 service/finspacedata/api_op_CreateDataView.go create mode 100644 service/finspacedata/api_op_CreateDataset.go create mode 100644 service/finspacedata/api_op_DeleteDataset.go create mode 100644 service/finspacedata/api_op_GetChangeset.go create mode 100644 service/finspacedata/api_op_GetDataView.go create mode 100644 service/finspacedata/api_op_GetDataset.go create mode 100644 service/finspacedata/api_op_ListChangesets.go create mode 100644 service/finspacedata/api_op_ListDataViews.go create mode 100644 service/finspacedata/api_op_ListDatasets.go create mode 100644 service/finspacedata/api_op_UpdateChangeset.go create mode 100644 service/finspacedata/api_op_UpdateDataset.go create mode 100644 service/inspector2/LICENSE.txt create mode 100644 service/inspector2/api_client.go create mode 100644 service/inspector2/api_op_AssociateMember.go create mode 100644 service/inspector2/api_op_BatchGetAccountStatus.go create mode 100644 service/inspector2/api_op_BatchGetFreeTrialInfo.go rename service/{lambda/api_op_GetFunctionUrlConfig.go => inspector2/api_op_CancelFindingsReport.go} (60%) create mode 100644 service/inspector2/api_op_CreateFilter.go create mode 100644 service/inspector2/api_op_CreateFindingsReport.go create mode 100644 service/inspector2/api_op_DeleteFilter.go create mode 100644 service/inspector2/api_op_DescribeOrganizationConfiguration.go create mode 100644 service/inspector2/api_op_Disable.go create mode 100644 service/inspector2/api_op_DisableDelegatedAdminAccount.go create mode 100644 service/inspector2/api_op_DisassociateMember.go create mode 100644 service/inspector2/api_op_Enable.go create mode 100644 service/inspector2/api_op_EnableDelegatedAdminAccount.go create mode 100644 service/inspector2/api_op_GetDelegatedAdminAccount.go create mode 100644 service/inspector2/api_op_GetFindingsReportStatus.go create mode 100644 service/inspector2/api_op_GetMember.go create mode 100644 service/inspector2/api_op_ListAccountPermissions.go create mode 100644 service/inspector2/api_op_ListCoverage.go create mode 100644 service/inspector2/api_op_ListCoverageStatistics.go create mode 100644 service/inspector2/api_op_ListDelegatedAdminAccounts.go create mode 100644 service/inspector2/api_op_ListFilters.go create mode 100644 service/inspector2/api_op_ListFindingAggregations.go create mode 100644 service/inspector2/api_op_ListFindings.go create mode 100644 service/inspector2/api_op_ListMembers.go create mode 100644 service/inspector2/api_op_ListTagsForResource.go create mode 100644 service/inspector2/api_op_ListUsageTotals.go create mode 100644 service/inspector2/api_op_TagResource.go create mode 100644 service/inspector2/api_op_UntagResource.go create mode 100644 service/inspector2/api_op_UpdateFilter.go create mode 100644 service/inspector2/api_op_UpdateOrganizationConfiguration.go create mode 100644 service/inspector2/deserializers.go create mode 100644 service/inspector2/doc.go create mode 100644 service/inspector2/endpoints.go create mode 100644 service/inspector2/generated.json create mode 100644 service/inspector2/go.mod create mode 100644 service/inspector2/go.sum create mode 100644 service/inspector2/go_module_metadata.go create mode 100644 service/inspector2/internal/endpoints/endpoints.go create mode 100644 service/inspector2/internal/endpoints/endpoints_test.go create mode 100644 service/inspector2/protocol_test.go create mode 100644 service/inspector2/serializers.go create mode 100644 service/inspector2/types/enums.go create mode 100644 service/inspector2/types/errors.go create mode 100644 service/inspector2/types/types.go create mode 100644 service/inspector2/types/types_exported_test.go create mode 100644 service/inspector2/validators.go create mode 100644 service/iot/api_op_DescribeManagedJobTemplate.go create mode 100644 service/iot/api_op_ListManagedJobTemplates.go create mode 100644 service/iotdeviceadvisor/api_op_GetEndpoint.go create mode 100644 service/iotsitewise/api_op_AssociateTimeSeriesToAssetProperty.go create mode 100644 service/iotsitewise/api_op_DeleteTimeSeries.go create mode 100644 service/iotsitewise/api_op_DescribeTimeSeries.go create mode 100644 service/iotsitewise/api_op_DisassociateTimeSeriesFromAssetProperty.go create mode 100644 service/iotsitewise/api_op_ListTimeSeries.go create mode 100644 service/iotwireless/api_op_GetNetworkAnalyzerConfiguration.go create mode 100644 service/iotwireless/api_op_UpdateNetworkAnalyzerConfiguration.go delete mode 100644 service/lambda/api_op_ListFunctionUrlConfigs.go create mode 100644 service/mgn/api_op_DeleteVcenterClient.go create mode 100644 service/mgn/api_op_DescribeVcenterClients.go create mode 100644 service/mgn/api_op_StartReplication.go create mode 100644 service/mgn/api_op_UpdateSourceServerReplicationType.go create mode 100644 service/migrationhubrefactorspaces/LICENSE.txt create mode 100644 service/migrationhubrefactorspaces/api_client.go create mode 100644 service/migrationhubrefactorspaces/api_op_CreateApplication.go create mode 100644 service/migrationhubrefactorspaces/api_op_CreateEnvironment.go create mode 100644 service/migrationhubrefactorspaces/api_op_CreateRoute.go create mode 100644 service/migrationhubrefactorspaces/api_op_CreateService.go create mode 100644 service/migrationhubrefactorspaces/api_op_DeleteApplication.go create mode 100644 service/migrationhubrefactorspaces/api_op_DeleteEnvironment.go create mode 100644 service/migrationhubrefactorspaces/api_op_DeleteResourcePolicy.go create mode 100644 service/migrationhubrefactorspaces/api_op_DeleteRoute.go create mode 100644 service/migrationhubrefactorspaces/api_op_DeleteService.go create mode 100644 service/migrationhubrefactorspaces/api_op_GetApplication.go create mode 100644 service/migrationhubrefactorspaces/api_op_GetEnvironment.go create mode 100644 service/migrationhubrefactorspaces/api_op_GetResourcePolicy.go create mode 100644 service/migrationhubrefactorspaces/api_op_GetRoute.go create mode 100644 service/migrationhubrefactorspaces/api_op_GetService.go create mode 100644 service/migrationhubrefactorspaces/api_op_ListApplications.go create mode 100644 service/migrationhubrefactorspaces/api_op_ListEnvironmentVpcs.go create mode 100644 service/migrationhubrefactorspaces/api_op_ListEnvironments.go create mode 100644 service/migrationhubrefactorspaces/api_op_ListRoutes.go create mode 100644 service/migrationhubrefactorspaces/api_op_ListServices.go create mode 100644 service/migrationhubrefactorspaces/api_op_ListTagsForResource.go create mode 100644 service/migrationhubrefactorspaces/api_op_PutResourcePolicy.go create mode 100644 service/migrationhubrefactorspaces/api_op_TagResource.go create mode 100644 service/migrationhubrefactorspaces/api_op_UntagResource.go create mode 100644 service/migrationhubrefactorspaces/deserializers.go create mode 100644 service/migrationhubrefactorspaces/doc.go create mode 100644 service/migrationhubrefactorspaces/endpoints.go create mode 100644 service/migrationhubrefactorspaces/generated.json create mode 100644 service/migrationhubrefactorspaces/go.mod create mode 100644 service/migrationhubrefactorspaces/go.sum create mode 100644 service/migrationhubrefactorspaces/go_module_metadata.go create mode 100644 service/migrationhubrefactorspaces/internal/endpoints/endpoints.go create mode 100644 service/migrationhubrefactorspaces/internal/endpoints/endpoints_test.go create mode 100644 service/migrationhubrefactorspaces/protocol_test.go create mode 100644 service/migrationhubrefactorspaces/serializers.go create mode 100644 service/migrationhubrefactorspaces/types/enums.go create mode 100644 service/migrationhubrefactorspaces/types/errors.go create mode 100644 service/migrationhubrefactorspaces/types/types.go create mode 100644 service/migrationhubrefactorspaces/validators.go create mode 100644 service/outposts/api_op_CancelOrder.go create mode 100644 service/outposts/api_op_CreateSite.go create mode 100644 service/outposts/api_op_GetCatalogItem.go create mode 100644 service/outposts/api_op_GetOrder.go create mode 100644 service/outposts/api_op_GetSite.go create mode 100644 service/outposts/api_op_GetSiteAddress.go create mode 100644 service/outposts/api_op_ListCatalogItems.go create mode 100644 service/outposts/api_op_ListOrders.go create mode 100644 service/outposts/api_op_UpdateSite.go create mode 100644 service/outposts/api_op_UpdateSiteAddress.go create mode 100644 service/outposts/api_op_UpdateSiteRackPhysicalProperties.go create mode 100644 service/personalize/api_op_CreateBatchSegmentJob.go create mode 100644 service/personalize/api_op_CreateRecommender.go create mode 100644 service/personalize/api_op_DeleteRecommender.go create mode 100644 service/personalize/api_op_DescribeBatchSegmentJob.go create mode 100644 service/personalize/api_op_DescribeRecommender.go create mode 100644 service/personalize/api_op_ListBatchSegmentJobs.go create mode 100644 service/personalize/api_op_ListRecommenders.go create mode 100644 service/personalize/api_op_UpdateRecommender.go create mode 100644 service/pinpoint/api_op_SendOTPMessage.go create mode 100644 service/pinpoint/api_op_VerifyOTPMessage.go create mode 100644 service/proton/api_op_CreateRepository.go create mode 100644 service/proton/api_op_CreateTemplateSyncConfig.go create mode 100644 service/proton/api_op_DeleteRepository.go create mode 100644 service/proton/api_op_DeleteTemplateSyncConfig.go create mode 100644 service/proton/api_op_GetRepository.go rename service/{lambda/api_op_CreateFunctionUrlConfig.go => proton/api_op_GetRepositorySyncStatus.go} (59%) create mode 100644 service/proton/api_op_GetTemplateSyncConfig.go create mode 100644 service/proton/api_op_GetTemplateSyncStatus.go create mode 100644 service/proton/api_op_ListEnvironmentOutputs.go create mode 100644 service/proton/api_op_ListEnvironmentProvisionedResources.go create mode 100644 service/proton/api_op_ListRepositories.go create mode 100644 service/proton/api_op_ListRepositorySyncDefinitions.go create mode 100644 service/proton/api_op_ListServiceInstanceOutputs.go create mode 100644 service/proton/api_op_ListServiceInstanceProvisionedResources.go create mode 100644 service/proton/api_op_ListServicePipelineOutputs.go create mode 100644 service/proton/api_op_ListServicePipelineProvisionedResources.go create mode 100644 service/proton/api_op_NotifyResourceDeploymentStatusChange.go create mode 100644 service/proton/api_op_UpdateTemplateSyncConfig.go create mode 100644 service/rbin/LICENSE.txt create mode 100644 service/rbin/api_client.go create mode 100644 service/rbin/api_op_CreateRule.go create mode 100644 service/rbin/api_op_DeleteRule.go create mode 100644 service/rbin/api_op_GetRule.go create mode 100644 service/rbin/api_op_ListRules.go create mode 100644 service/rbin/api_op_ListTagsForResource.go create mode 100644 service/rbin/api_op_TagResource.go create mode 100644 service/rbin/api_op_UntagResource.go create mode 100644 service/rbin/api_op_UpdateRule.go create mode 100644 service/rbin/deserializers.go create mode 100644 service/rbin/doc.go create mode 100644 service/rbin/endpoints.go create mode 100644 service/rbin/generated.json create mode 100644 service/rbin/go.mod create mode 100644 service/rbin/go.sum create mode 100644 service/rbin/go_module_metadata.go create mode 100644 service/rbin/internal/endpoints/endpoints.go create mode 100644 service/rbin/internal/endpoints/endpoints_test.go create mode 100644 service/rbin/protocol_test.go create mode 100644 service/rbin/serializers.go create mode 100644 service/rbin/types/enums.go create mode 100644 service/rbin/types/errors.go create mode 100644 service/rbin/types/types.go create mode 100644 service/rbin/validators.go create mode 100644 service/rds/api_op_RebootDBCluster.go create mode 100644 service/redshift/api_op_DescribeReservedNodeExchangeStatus.go create mode 100644 service/redshift/api_op_GetReservedNodeExchangeConfigurationOptions.go create mode 100644 service/rum/LICENSE.txt create mode 100644 service/rum/api_client.go create mode 100644 service/rum/api_op_CreateAppMonitor.go rename service/{lambda/api_op_DeleteFunctionUrlConfig.go => rum/api_op_DeleteAppMonitor.go} (63%) create mode 100644 service/rum/api_op_GetAppMonitor.go create mode 100644 service/rum/api_op_GetAppMonitorData.go create mode 100644 service/rum/api_op_ListAppMonitors.go create mode 100644 service/rum/api_op_ListTagsForResource.go create mode 100644 service/rum/api_op_PutRumEvents.go create mode 100644 service/rum/api_op_TagResource.go create mode 100644 service/rum/api_op_UntagResource.go create mode 100644 service/rum/api_op_UpdateAppMonitor.go create mode 100644 service/rum/deserializers.go create mode 100644 service/rum/doc.go create mode 100644 service/rum/endpoints.go create mode 100644 service/rum/generated.json create mode 100644 service/rum/go.mod create mode 100644 service/rum/go.sum create mode 100644 service/rum/go_module_metadata.go create mode 100644 service/rum/internal/endpoints/endpoints.go create mode 100644 service/rum/internal/endpoints/endpoints_test.go create mode 100644 service/rum/protocol_test.go create mode 100644 service/rum/serializers.go create mode 100644 service/rum/types/enums.go create mode 100644 service/rum/types/errors.go create mode 100644 service/rum/types/types.go create mode 100644 service/rum/validators.go create mode 100644 service/textract/api_op_AnalyzeID.go create mode 100644 service/timestreamquery/api_op_CreateScheduledQuery.go create mode 100644 service/timestreamquery/api_op_DeleteScheduledQuery.go create mode 100644 service/timestreamquery/api_op_DescribeScheduledQuery.go create mode 100644 service/timestreamquery/api_op_ExecuteScheduledQuery.go create mode 100644 service/timestreamquery/api_op_ListScheduledQueries.go create mode 100644 service/timestreamquery/api_op_ListTagsForResource.go create mode 100644 service/timestreamquery/api_op_PrepareQuery.go create mode 100644 service/timestreamquery/api_op_TagResource.go create mode 100644 service/timestreamquery/api_op_UntagResource.go create mode 100644 service/timestreamquery/api_op_UpdateScheduledQuery.go create mode 100644 service/wellarchitected/api_op_CreateLensShare.go create mode 100644 service/wellarchitected/api_op_CreateLensVersion.go create mode 100644 service/wellarchitected/api_op_DeleteLens.go create mode 100644 service/wellarchitected/api_op_DeleteLensShare.go create mode 100644 service/wellarchitected/api_op_ExportLens.go create mode 100644 service/wellarchitected/api_op_GetLens.go create mode 100644 service/wellarchitected/api_op_ImportLens.go create mode 100644 service/wellarchitected/api_op_ListLensShares.go diff --git a/.changelog/2f38d632e93e45f2bf04734b9878a379.json b/.changelog/2f38d632e93e45f2bf04734b9878a379.json new file mode 100644 index 00000000000..c8589beee5e --- /dev/null +++ b/.changelog/2f38d632e93e45f2bf04734b9878a379.json @@ -0,0 +1,55 @@ +{ + "id": "2f38d632-e93e-45f2-bf04-734b9878a379", + "type": "feature", + "description": "API client updated", + "modules": [ + "service/autoscaling", + "service/backup", + "service/braket", + "service/chimesdkmeetings", + "service/cloudformation", + "service/computeoptimizer", + "service/connect", + "service/customerprofiles", + "service/databasemigrationservice", + "service/dataexchange", + "service/dynamodb", + "service/ec2", + "service/ecr", + "service/ecs", + "service/eks", + "service/elasticache", + "service/elasticloadbalancingv2", + "service/elasticsearchservice", + "service/finspacedata", + "service/imagebuilder", + "service/iot", + "service/iotdeviceadvisor", + "service/iotsitewise", + "service/iotwireless", + "service/lambda", + "service/macie2", + "service/mgn", + "service/opensearch", + "service/outposts", + "service/personalize", + "service/personalizeruntime", + "service/pinpoint", + "service/proton", + "service/quicksight", + "service/rds", + "service/redshift", + "service/s3", + "service/s3control", + "service/sqs", + "service/ssm", + "service/sts", + "service/textract", + "service/timestreamquery", + "service/timestreamwrite", + "service/transcribestreaming", + "service/translate", + "service/wellarchitected", + "service/workspaces" + ] +} diff --git a/.changelog/41575353444b40ffbf474f4155544f00.json b/.changelog/41575353444b40ffbf474f4155544f00.json new file mode 100644 index 00000000000..2db79239fb8 --- /dev/null +++ b/.changelog/41575353444b40ffbf474f4155544f00.json @@ -0,0 +1,12 @@ +{ + "id": "41575353-444b-40ff-bf47-4f4155544f00", + "type": "release", + "description": "New AWS service client module", + "modules": [ + "service/evidently", + "service/inspector2", + "service/migrationhubrefactorspaces", + "service/rbin", + "service/rum" + ] +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/autoscaling.2011-01-01.json b/codegen/sdk-codegen/aws-models/autoscaling.2011-01-01.json index cda3cef35c2..83ddeaad248 100644 --- a/codegen/sdk-codegen/aws-models/autoscaling.2011-01-01.json +++ b/codegen/sdk-codegen/aws-models/autoscaling.2011-01-01.json @@ -441,7 +441,7 @@ } ], "traits": { - "smithy.api#documentation": "
Attaches one or more target groups to the specified Auto Scaling group.
\nThis operation is used with the following load balancer types:
\nApplication Load Balancer - Operates at the application layer (layer 7) and\n supports HTTP and HTTPS.
\nNetwork Load Balancer - Operates at the transport layer (layer 4) and\n supports TCP, TLS, and UDP.
\nGateway Load Balancer - Operates at the network layer (layer 3).
\nTo describe the target groups for an Auto Scaling group, call the DescribeLoadBalancerTargetGroups API. To detach the target group from\n the Auto Scaling group, call the DetachLoadBalancerTargetGroups API.
\nFor more information, see Elastic Load Balancing and\n Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.
" + "smithy.api#documentation": "Attaches one or more target groups to the specified Auto Scaling group.
\nThis operation is used with the following load balancer types:
\nApplication Load Balancer - Operates at the application layer (layer 7) and\n supports HTTP and HTTPS.
\nNetwork Load Balancer - Operates at the transport layer (layer 4) and\n supports TCP, TLS, and UDP.
\nGateway Load Balancer - Operates at the network layer (layer 3).
\nTo describe the target groups for an Auto Scaling group, call the DescribeLoadBalancerTargetGroups API. To detach the target group from\n the Auto Scaling group, call the DetachLoadBalancerTargetGroups API.
\nThis operation is additive and does not detach existing target groups or Classic Load\n Balancers from the Auto Scaling group.
\nFor more information, see Elastic Load Balancing and\n Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.
" } }, "com.amazonaws.autoscaling#AttachLoadBalancerTargetGroupsResultType": { @@ -484,7 +484,7 @@ } ], "traits": { - "smithy.api#documentation": "To attach an Application Load Balancer, Network Load Balancer, or Gateway Load\n Balancer, use the AttachLoadBalancerTargetGroups API operation\n instead.
\nAttaches one or more Classic Load Balancers to the specified Auto Scaling group. Amazon EC2 Auto Scaling\n registers the running instances with these Classic Load Balancers.
\nTo describe the load balancers for an Auto Scaling group, call the DescribeLoadBalancers API. To detach the load balancer from the Auto Scaling\n group, call the DetachLoadBalancers API.
\nFor more information, see Elastic Load Balancing and\n Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.
" + "smithy.api#documentation": "To attach an Application Load Balancer, Network Load Balancer, or Gateway Load\n Balancer, use the AttachLoadBalancerTargetGroups API operation\n instead.
\nAttaches one or more Classic Load Balancers to the specified Auto Scaling group. Amazon EC2 Auto Scaling\n registers the running instances with these Classic Load Balancers.
\nTo describe the load balancers for an Auto Scaling group, call the DescribeLoadBalancers API. To detach the load balancer from the Auto Scaling\n group, call the DetachLoadBalancers API.
\nThis operation is additive and does not detach existing Classic Load Balancers or\n target groups from the Auto Scaling group.
\nFor more information, see Elastic Load Balancing and\n Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.
" } }, "com.amazonaws.autoscaling#AttachLoadBalancersResultType": { @@ -607,7 +607,7 @@ "HealthCheckGracePeriod": { "target": "com.amazonaws.autoscaling#HealthCheckGracePeriod", "traits": { - "smithy.api#documentation": "The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health status\n of an EC2 instance that has come into service.
" + "smithy.api#documentation": "The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health status\n of an EC2 instance that has come into service and marking it unhealthy due to a failed\n health check.
" } }, "Instances": { @@ -1426,7 +1426,7 @@ "Timestamps": { "target": "com.amazonaws.autoscaling#PredictiveScalingForecastTimestamps", "traits": { - "smithy.api#documentation": "The time stamps for the data points, in UTC format.
", + "smithy.api#documentation": "The timestamps for the data points, in UTC format.
", "smithy.api#required": {} } }, @@ -1484,7 +1484,7 @@ } ], "traits": { - "smithy.api#documentation": "Completes the lifecycle action for the specified token or instance with the specified\n result.
\nThis step is a part of the procedure for adding a lifecycle hook to an Auto Scaling\n group:
\n(Optional) Create a Lambda function and a rule that allows CloudWatch Events to\n invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates\n instances.
\n(Optional) Create a notification target and an IAM role. The target can be\n either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon EC2 Auto Scaling to\n publish lifecycle notifications to the target.
\nCreate the lifecycle hook. Specify whether the hook is used when the instances\n launch or terminate.
\nIf you need more time, record the lifecycle action heartbeat to keep the\n instance in a pending state.
\n\n If you finish before the timeout period ends, complete the\n lifecycle action.\n
\nFor more information, see Amazon EC2 Auto Scaling lifecycle\n hooks in the Amazon EC2 Auto Scaling User Guide.
" + "smithy.api#documentation": "Completes the lifecycle action for the specified token or instance with the specified\n result.
\nThis step is a part of the procedure for adding a lifecycle hook to an Auto Scaling\n group:
\n(Optional) Create a Lambda function and a rule that allows Amazon EventBridge to\n invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates\n instances.
\n(Optional) Create a notification target and an IAM role. The target can be\n either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon EC2 Auto Scaling to publish\n lifecycle notifications to the target.
\nCreate the lifecycle hook. Specify whether the hook is used when the instances\n launch or terminate.
\nIf you need more time, record the lifecycle action heartbeat to keep the\n instance in a pending state.
\n\n If you finish before the timeout period ends, send a\n callback by using the CompleteLifecycleAction API\n call.\n
\nFor more information, see Amazon EC2 Auto Scaling lifecycle\n hooks in the Amazon EC2 Auto Scaling User Guide.
" } }, "com.amazonaws.autoscaling#CompleteLifecycleActionAnswer": { @@ -1611,7 +1611,7 @@ "MixedInstancesPolicy": { "target": "com.amazonaws.autoscaling#MixedInstancesPolicy", "traits": { - "smithy.api#documentation": "An embedded object that specifies a mixed instances policy.
\n \n \n \nFor more information, see Auto Scaling groups with multiple\n instance types and purchase options in the Amazon EC2 Auto Scaling User\n Guide.
" + "smithy.api#documentation": "An embedded object that specifies a mixed instances policy.
\n \n \n \nFor more information, see Auto Scaling groups with multiple\n instance types and purchase options in the Amazon EC2 Auto Scaling User\n Guide.
" } }, "InstanceId": { @@ -1673,7 +1673,7 @@ "HealthCheckGracePeriod": { "target": "com.amazonaws.autoscaling#HealthCheckGracePeriod", "traits": { - "smithy.api#documentation": "The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health status\n of an EC2 instance that has come into service. During this time, any health check\n failures for the instance are ignored. The default value is 0
. For more\n information, see Health\n check grace period in the Amazon EC2 Auto Scaling User Guide.
Conditional: Required if you are adding an ELB
health check.
The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health status\n of an EC2 instance that has come into service and marking it unhealthy due to a failed\n health check. The default value is 0
. For more information, see Health\n check grace period in the Amazon EC2 Auto Scaling User Guide.
Conditional: Required if you are adding an ELB
health check.
Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling\n when scaling in. For more information about preventing instances from terminating on\n scale in, see Instance scale-in protection in the\n Amazon EC2 Auto Scaling User Guide.
" + "smithy.api#documentation": "Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling\n when scaling in. For more information about preventing instances from terminating on\n scale in, see Using\n instance scale-in protection in the\n Amazon EC2 Auto Scaling User Guide.
" } }, "CapacityRebalance": { "target": "com.amazonaws.autoscaling#CapacityRebalanceEnabled", "traits": { - "smithy.api#documentation": "Indicates whether Capacity Rebalancing is enabled. Otherwise, Capacity Rebalancing is\n disabled. When you turn on Capacity Rebalancing, Amazon EC2 Auto Scaling attempts to launch a Spot\n Instance whenever Amazon EC2 notifies that a Spot Instance is at an elevated risk of\n interruption. After launching a new instance, it then terminates an old instance. For\n more information, see Amazon EC2 Auto Scaling Capacity\n Rebalancing in the Amazon EC2 Auto Scaling User Guide.
" + "smithy.api#documentation": "Indicates whether Capacity Rebalancing is enabled. Otherwise, Capacity Rebalancing is\n disabled. When you turn on Capacity Rebalancing, Amazon EC2 Auto Scaling attempts to launch a Spot\n Instance whenever Amazon EC2 notifies that a Spot Instance is at an elevated risk of\n interruption. After launching a new instance, it then terminates an old instance. For\n more information, see Amazon EC2 Auto Scaling\n Capacity Rebalancing in the Amazon EC2 Auto Scaling User Guide.
" } }, "LifecycleHookSpecificationList": { @@ -1925,7 +1925,7 @@ "MetricName": { "target": "com.amazonaws.autoscaling#MetricName", "traits": { - "smithy.api#documentation": "The name of the metric.
", + "smithy.api#documentation": "The name of the metric. To get the exact metric name, namespace, and dimensions,\n inspect the Metric object\n that is returned by a call to ListMetrics.
", "smithy.api#required": {} } }, @@ -1952,12 +1952,12 @@ "Unit": { "target": "com.amazonaws.autoscaling#MetricUnit", "traits": { - "smithy.api#documentation": "The unit of the metric.
" + "smithy.api#documentation": "The unit of the metric. For a complete list of the units that CloudWatch supports, see the\n MetricDatum\n data type in the Amazon CloudWatch API Reference.
" } } }, "traits": { - "smithy.api#documentation": "Represents a CloudWatch metric of your choosing for a target tracking scaling policy to use\n with Amazon EC2 Auto Scaling.
\nTo create your customized metric specification:
\nAdd values for each required parameter from CloudWatch. You can use an existing\n metric, or a new metric that you create. To use your own metric, you must first\n publish the metric to CloudWatch. For more information, see Publish\n Custom Metrics in the Amazon CloudWatch User\n Guide.
\nChoose a metric that changes proportionally with capacity. The value of the\n metric should increase or decrease in inverse proportion to the number of\n capacity units. That is, the value of the metric should decrease when capacity\n increases.
\nFor more information about CloudWatch, see Amazon CloudWatch\n Concepts.
" + "smithy.api#documentation": "Represents a CloudWatch metric of your choosing for a target tracking scaling policy to use\n with Amazon EC2 Auto Scaling.
\nTo create your customized metric specification:
\nAdd values for each required parameter from CloudWatch. You can use an existing\n metric, or a new metric that you create. To use your own metric, you must first\n publish the metric to CloudWatch. For more information, see Publish\n custom metrics in the Amazon CloudWatch User\n Guide.
\nChoose a metric that changes proportionally with capacity. The value of the\n metric should increase or decrease in inverse proportion to the number of\n capacity units. That is, the value of the metric should decrease when capacity\n increases.
\nFor more information about the CloudWatch terminology below, see Amazon CloudWatch\n concepts.
\nEach individual service provides information about the metrics, namespace, and\n dimensions they use. For more information, see Amazon Web Services services that publish CloudWatch metrics in the Amazon CloudWatch User\n Guide.
\nThe Amazon Resource Name (ARN) of the Amazon Simple Notification Service (Amazon SNS)\n topic.
", + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the Amazon SNS topic.
", "smithy.api#required": {} } } @@ -4704,13 +4704,13 @@ "WeightedCapacity": { "target": "com.amazonaws.autoscaling#XmlStringMaxLen32", "traits": { - "smithy.api#documentation": "The number of capacity units provided by the instance type specified in\n InstanceType
in terms of virtual CPUs, memory, storage, throughput, or\n other relative performance characteristic. When a Spot or On-Demand Instance is\n launched, the capacity units count toward the desired capacity. Amazon EC2 Auto Scaling launches\n instances until the desired capacity is totally fulfilled, even if this results in an\n overage. For example, if there are two units remaining to fulfill capacity, and Amazon EC2 Auto Scaling\n can only launch an instance with a WeightedCapacity
of five units, the\n instance is launched, and the desired capacity is exceeded by three units. For more\n information, see Instance weighting for\n Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide. Value must be in the\n range of 1–999.
The number of capacity units provided by the instance type specified in\n InstanceType
in terms of virtual CPUs, memory, storage, throughput, or\n other relative performance characteristic. When a Spot or On-Demand Instance is\n launched, the capacity units count toward the desired capacity. Amazon EC2 Auto Scaling launches\n instances until the desired capacity is totally fulfilled, even if this results in an\n overage. For example, if there are two units remaining to fulfill capacity, and Amazon EC2 Auto Scaling\n can only launch an instance with a WeightedCapacity
of five units, the\n instance is launched, and the desired capacity is exceeded by three units. For more\n information, see Instance weighting for\n Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide. Value must be in the\n range of 1–999.
Provides the launch template to be used when launching the instance type specified in\n InstanceType
. For example, some instance types might require a launch\n template with a different AMI. If not provided, Amazon EC2 Auto Scaling uses the launch template that's\n defined for your mixed instances policy. For more information, see Specifying a\n different launch template for an instance type in the\n Amazon EC2 Auto Scaling User Guide.
Provides the launch template to be used when launching the instance type specified in\n InstanceType
. For example, some instance types might require a launch\n template with a different AMI. If not provided, Amazon EC2 Auto Scaling uses the launch template that's\n defined for your mixed instances policy. For more information, see Specifying a\n different launch template for an instance type in the\n Amazon EC2 Auto Scaling User Guide.
Describes an override for a launch template. For more information, see Configuring overrides in the Amazon EC2 Auto Scaling User Guide.
" + "smithy.api#documentation": "Describes an override for a launch template. For more information, see Configuring overrides in the Amazon EC2 Auto Scaling User Guide.
" } }, "com.amazonaws.autoscaling#LaunchTemplateSpecification": { @@ -4821,7 +4821,7 @@ } }, "traits": { - "smithy.api#documentation": "Describes a lifecycle hook, which tells Amazon EC2 Auto Scaling that you want to perform an action\n whenever it launches instances or terminates\n instances.
" + "smithy.api#documentation": "Describes a lifecycle hook, which enables an Auto Scaling group to be aware of events in the\n Auto Scaling instance lifecycle, and then perform a custom action when the corresponding\n lifecycle event occurs.
" } }, "com.amazonaws.autoscaling#LifecycleHookNames": { @@ -4885,7 +4885,7 @@ } }, "traits": { - "smithy.api#documentation": "Describes information used to specify a lifecycle hook for an Auto Scaling\n group.
\nA lifecycle hook tells Amazon EC2 Auto Scaling to perform an action on an instance when the instance\n launches (before it is put into service) or as the instance terminates (before it is\n fully terminated).
\nThis step is a part of the procedure for creating a lifecycle hook for an Auto Scaling\n group:
\n(Optional) Create a Lambda function and a rule that allows CloudWatch Events to\n invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates\n instances.
\n(Optional) Create a notification target and an IAM role. The target can be\n either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon EC2 Auto Scaling to\n publish lifecycle notifications to the target.
\n\n Create the lifecycle hook. Specify whether the hook is\n used when the instances launch or terminate.\n
\nIf you need more time, record the lifecycle action heartbeat to keep the\n instance in a pending state.
\nIf you finish before the timeout period ends, complete the lifecycle\n action.
\nFor more information, see Amazon EC2 Auto Scaling lifecycle\n hooks in the Amazon EC2 Auto Scaling User Guide.
" + "smithy.api#documentation": "Describes information used to specify a lifecycle hook for an Auto Scaling\n group.
\n \n \n \nFor more information, see Amazon EC2 Auto Scaling lifecycle\n hooks in the Amazon EC2 Auto Scaling User Guide.
" } }, "com.amazonaws.autoscaling#LifecycleHookSpecifications": { @@ -5082,7 +5082,7 @@ "Timestamps": { "target": "com.amazonaws.autoscaling#PredictiveScalingForecastTimestamps", "traits": { - "smithy.api#documentation": "The time stamps for the data points, in UTC format.
", + "smithy.api#documentation": "The timestamps for the data points, in UTC format.
", "smithy.api#required": {} } }, @@ -5225,6 +5225,34 @@ "smithy.api#documentation": "Specifies the minimum and maximum for the MemoryMiB
object when you\n specify InstanceRequirements for an Auto Scaling group.
The namespace of the metric. For more information, see the table in Amazon Web Services\n services that publish CloudWatch metrics in the Amazon CloudWatch User\n Guide.
", + "smithy.api#required": {} + } + }, + "MetricName": { + "target": "com.amazonaws.autoscaling#MetricName", + "traits": { + "smithy.api#documentation": "The name of the metric.
", + "smithy.api#required": {} + } + }, + "Dimensions": { + "target": "com.amazonaws.autoscaling#MetricDimensions", + "traits": { + "smithy.api#documentation": "The dimensions for the metric. For the list of available dimensions, see the Amazon Web Services\n documentation available from the table in Amazon Web Services\n services that publish CloudWatch metrics in the Amazon CloudWatch User\n Guide.
\nConditional: If you published your metric with dimensions, you must specify the same\n dimensions in your scaling policy.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Represents a specific metric.
" + } + }, "com.amazonaws.autoscaling#MetricCollectionType": { "type": "structure", "members": { @@ -5245,6 +5273,51 @@ "target": "com.amazonaws.autoscaling#MetricCollectionType" } }, + "com.amazonaws.autoscaling#MetricDataQueries": { + "type": "list", + "member": { + "target": "com.amazonaws.autoscaling#MetricDataQuery" + } + }, + "com.amazonaws.autoscaling#MetricDataQuery": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.autoscaling#XmlStringMaxLen255", + "traits": { + "smithy.api#documentation": "A short name that identifies the object's results in the response. This name must be\n unique among all MetricDataQuery
objects specified for a single scaling\n policy. If you are performing math expressions on this set of data, this name represents\n that data and can serve as a variable in the mathematical expression. The valid\n characters are letters, numbers, and underscores. The first character must be a\n lowercase letter.
The math expression to perform on the returned data, if this object is performing a\n math expression. This expression can use the Id
of the other metrics to\n refer to those metrics, and can also use the Id
of other expressions to use\n the result of those expressions.
Conditional: Within each MetricDataQuery
object, you must specify either\n Expression
or MetricStat
, but not both.
Information about the metric data to return.
\nConditional: Within each MetricDataQuery
object, you must specify either\n Expression
or MetricStat
, but not both.
A human-readable label for this metric or expression. This is especially useful if\n this is a math expression, so that you know what the value represents.
" + } + }, + "ReturnData": { + "target": "com.amazonaws.autoscaling#ReturnData", + "traits": { + "smithy.api#documentation": "Indicates whether to return the timestamps and raw data values of this metric.
\nIf you use any math expressions, specify true
for this value for only the\n final math expression that the metric specification is based on. You must specify\n false
for ReturnData
for all the other metrics and\n expressions used in the metric specification.
If you are only retrieving metrics and not performing any math expressions, do not\n specify anything for ReturnData
. This sets it to its default\n (true
).
The metric data to return. Also defines whether this call is returning data for one\n metric only, or whether it is performing a math expression on the values of returned\n metric statistics to create a new time series. A time series is a series of data points,\n each of which is associated with a timestamp.
\n \n \nFor more information and examples, see Advanced predictive scaling policy configurations using custom metrics in\n the Amazon EC2 Auto Scaling User Guide.
" + } + }, "com.amazonaws.autoscaling#MetricDimension": { "type": "structure", "members": { @@ -5311,6 +5384,34 @@ "smithy.api#box": {} } }, + "com.amazonaws.autoscaling#MetricStat": { + "type": "structure", + "members": { + "Metric": { + "target": "com.amazonaws.autoscaling#Metric", + "traits": { + "smithy.api#documentation": "The CloudWatch metric to return, including the metric name, namespace, and dimensions. To\n get the exact metric name, namespace, and dimensions, inspect the Metric object that is returned by a call to ListMetrics.
", + "smithy.api#required": {} + } + }, + "Stat": { + "target": "com.amazonaws.autoscaling#XmlStringMetricStat", + "traits": { + "smithy.api#documentation": "The statistic to return. It can include any CloudWatch statistic or extended statistic. For\n a list of valid values, see the table in Statistics in the Amazon CloudWatch User Guide.
\nThe most commonly used metrics for predictive scaling are Average
and\n Sum
.
The unit to use for the returned data points. For a complete list of the units that\n CloudWatch supports, see the MetricDatum\n data type in the Amazon CloudWatch API Reference.
" + } + } + }, + "traits": { + "smithy.api#documentation": "This structure defines the CloudWatch metric to return, along with the statistic, period,\n and unit.
\n \nFor more information about the CloudWatch terminology below, see Amazon CloudWatch\n concepts in the Amazon CloudWatch User Guide.
" + } + }, "com.amazonaws.autoscaling#MetricStatistic": { "type": "string", "traits": { @@ -5409,7 +5510,7 @@ } }, "traits": { - "smithy.api#documentation": "Describes a mixed instances policy. A mixed instances policy contains the instance\n types that Amazon EC2 Auto Scaling can launch and other information that Amazon EC2 Auto Scaling can use to launch\n instances and help optimize your costs. For more information, see Auto Scaling\n groups with multiple instance types and purchase options in the\n Amazon EC2 Auto Scaling User Guide.
" + "smithy.api#documentation": "Describes a mixed instances policy. A mixed instances policy contains the instance\n types that Amazon EC2 Auto Scaling can launch and other information that Amazon EC2 Auto Scaling can use to launch\n instances and help optimize your costs. For more information, see Auto Scaling\n groups with multiple instance types and purchase options in the\n Amazon EC2 Auto Scaling User Guide.
" } }, "com.amazonaws.autoscaling#MonitoringEnabled": { @@ -5466,7 +5567,7 @@ "TopicARN": { "target": "com.amazonaws.autoscaling#XmlStringMaxLen255", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (Amazon SNS)\n topic.
" + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the Amazon SNS topic.
" } }, "NotificationType": { @@ -5734,6 +5835,51 @@ "smithy.api#documentation": "Represents a predictive scaling policy configuration to use with Amazon EC2 Auto Scaling.
" } }, + "com.amazonaws.autoscaling#PredictiveScalingCustomizedCapacityMetric": { + "type": "structure", + "members": { + "MetricDataQueries": { + "target": "com.amazonaws.autoscaling#MetricDataQueries", + "traits": { + "smithy.api#documentation": "One or more metric data queries to provide the data points for a capacity metric. Use\n multiple metric data queries only if you are performing a math expression on returned\n data.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Describes a customized capacity metric for a predictive scaling policy.
" + } + }, + "com.amazonaws.autoscaling#PredictiveScalingCustomizedLoadMetric": { + "type": "structure", + "members": { + "MetricDataQueries": { + "target": "com.amazonaws.autoscaling#MetricDataQueries", + "traits": { + "smithy.api#documentation": "One or more metric data queries to provide the data points for a load metric. Use\n multiple metric data queries only if you are performing a math expression on returned\n data.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Describes a custom load metric for a predictive scaling policy.
" + } + }, + "com.amazonaws.autoscaling#PredictiveScalingCustomizedScalingMetric": { + "type": "structure", + "members": { + "MetricDataQueries": { + "target": "com.amazonaws.autoscaling#MetricDataQueries", + "traits": { + "smithy.api#documentation": "One or more metric data queries to provide the data points for a scaling metric. Use\n multiple metric data queries only if you are performing a math expression on returned\n data.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Describes a custom scaling metric for a predictive scaling policy.
" + } + }, "com.amazonaws.autoscaling#PredictiveScalingForecastTimestamps": { "type": "list", "member": { @@ -5777,31 +5923,49 @@ "TargetValue": { "target": "com.amazonaws.autoscaling#MetricScale", "traits": { - "smithy.api#documentation": "Specifies the target utilization.
", + "smithy.api#documentation": "Specifies the target utilization.
\nSome metrics are based on a count instead of a percentage, such as the request\n count for an Application Load Balancer or the number of messages in an SQS queue. If the scaling policy\n specifies one of these metrics, specify the target utilization as the optimal\n average request or message count per instance during any one-minute interval.\n
\nThe metric pair specification from which Amazon EC2 Auto Scaling determines the appropriate scaling\n metric and load metric to use.
" + "smithy.api#documentation": "The predefined metric pair specification from which Amazon EC2 Auto Scaling determines the\n appropriate scaling metric and load metric to use.
" } }, "PredefinedScalingMetricSpecification": { "target": "com.amazonaws.autoscaling#PredictiveScalingPredefinedScalingMetric", "traits": { - "smithy.api#documentation": "The scaling metric specification.
" + "smithy.api#documentation": "The predefined scaling metric specification.
" } }, "PredefinedLoadMetricSpecification": { "target": "com.amazonaws.autoscaling#PredictiveScalingPredefinedLoadMetric", "traits": { - "smithy.api#documentation": "The load metric specification.
" + "smithy.api#documentation": "The predefined load metric specification.
" + } + }, + "CustomizedScalingMetricSpecification": { + "target": "com.amazonaws.autoscaling#PredictiveScalingCustomizedScalingMetric", + "traits": { + "smithy.api#documentation": "The customized scaling metric specification.
" + } + }, + "CustomizedLoadMetricSpecification": { + "target": "com.amazonaws.autoscaling#PredictiveScalingCustomizedLoadMetric", + "traits": { + "smithy.api#documentation": "The customized load metric specification.
" + } + }, + "CustomizedCapacityMetricSpecification": { + "target": "com.amazonaws.autoscaling#PredictiveScalingCustomizedCapacityMetric", + "traits": { + "smithy.api#documentation": "The customized capacity metric specification.
" } } }, "traits": { - "smithy.api#documentation": "This structure specifies the metrics and target utilization settings for a predictive\n scaling policy.
\nYou must specify either a metric pair, or a load metric and a scaling metric\n individually. Specifying a metric pair instead of individual metrics provides a simpler\n way to configure metrics for a scaling policy. You choose the metric pair, and the\n policy automatically knows the correct sum and average statistics to use for the load\n metric and the scaling metric.
\nExample
\nYou create a predictive scaling policy and specify\n ALBRequestCount
as the value for the metric pair and\n 1000.0
as the target value. For this type of metric, you must\n provide the metric dimension for the corresponding target group, so you also\n provide a resource label for the Application Load Balancer target group that is\n attached to your Auto Scaling group.
The number of requests the target group receives per minute provides the load\n metric, and the request count averaged between the members of the target group\n provides the scaling metric. In CloudWatch, this refers to the\n RequestCount
and RequestCountPerTarget
metrics,\n respectively.
For optimal use of predictive scaling, you adhere to the best practice of\n using a dynamic scaling policy to automatically scale between the minimum\n capacity and maximum capacity in response to real-time changes in resource\n utilization.
\nAmazon EC2 Auto Scaling consumes data points for the load metric over the last 14 days and\n creates an hourly load forecast for predictive scaling. (A minimum of 24 hours\n of data is required.)
\nAfter creating the load forecast, Amazon EC2 Auto Scaling determines when to reduce or\n increase the capacity of your Auto Scaling group in each hour of the forecast period so\n that the average number of requests received by each instance is as close to\n 1000 requests per minute as possible at all times.
\nThis structure specifies the metrics and target utilization settings for a predictive\n scaling policy.
\nYou must specify either a metric pair, or a load metric and a scaling metric\n individually. Specifying a metric pair instead of individual metrics provides a simpler\n way to configure metrics for a scaling policy. You choose the metric pair, and the\n policy automatically knows the correct sum and average statistics to use for the load\n metric and the scaling metric.
\nExample
\nYou create a predictive scaling policy and specify\n ALBRequestCount
as the value for the metric pair and\n 1000.0
as the target value. For this type of metric, you must\n provide the metric dimension for the corresponding target group, so you also\n provide a resource label for the Application Load Balancer target group that is\n attached to your Auto Scaling group.
The number of requests the target group receives per minute provides the load\n metric, and the request count averaged between the members of the target group\n provides the scaling metric. In CloudWatch, this refers to the\n RequestCount
and RequestCountPerTarget
metrics,\n respectively.
For optimal use of predictive scaling, you adhere to the best practice of\n using a dynamic scaling policy to automatically scale between the minimum\n capacity and maximum capacity in response to real-time changes in resource\n utilization.
\nAmazon EC2 Auto Scaling consumes data points for the load metric over the last 14 days and\n creates an hourly load forecast for predictive scaling. (A minimum of 24 hours\n of data is required.)
\nAfter creating the load forecast, Amazon EC2 Auto Scaling determines when to reduce or\n increase the capacity of your Auto Scaling group in each hour of the forecast period so\n that the average number of requests received by each instance is as close to\n 1000 requests per minute as possible at all times.
\nFor information about using custom metrics with predictive scaling, see Advanced predictive scaling policy configurations using custom metrics in\n the Amazon EC2 Auto Scaling User Guide.
" } }, "com.amazonaws.autoscaling#PredictiveScalingMetricSpecifications": { @@ -5838,7 +6002,7 @@ "ResourceLabel": { "target": "com.amazonaws.autoscaling#XmlStringMaxLen1023", "traits": { - "smithy.api#documentation": "A label that uniquely identifies a specific Application Load Balancer target group from which to determine\n the request count served by your Auto Scaling group. You can't specify a resource label\n unless the target group is attached to the Auto Scaling group.
\nYou create the resource label by appending the final portion of the load balancer ARN\n and the final portion of the target group ARN into a single value, separated by a forward\n slash (/). The format of the resource label is:
\n\n app/my-alb/778d41231b141a0f/targetgroup/my-alb-target-group/943f017f100becff
.
Where:
\napp/
targetgroup/
To find the ARN for an Application Load Balancer, use the DescribeLoadBalancers API operation. To find the ARN for the target group, use\n the DescribeTargetGroups API operation.
" + "smithy.api#documentation": "A label that uniquely identifies a specific Application Load Balancer target group from which to determine\n the request count served by your Auto Scaling group. You can't specify a resource label unless\n the target group is attached to the Auto Scaling group.
\nYou create the resource label by appending the final portion of the load balancer ARN\n and the final portion of the target group ARN into a single value, separated by a forward\n slash (/). The format of the resource label is:
\n\n app/my-alb/778d41231b141a0f/targetgroup/my-alb-target-group/943f017f100becff
.
Where:
\napp/
targetgroup/
To find the ARN for an Application Load Balancer, use the DescribeLoadBalancers API operation. To find the ARN for the target group, use\n the DescribeTargetGroups API operation.
" } } }, @@ -5880,7 +6044,7 @@ "ResourceLabel": { "target": "com.amazonaws.autoscaling#XmlStringMaxLen1023", "traits": { - "smithy.api#documentation": "A label that uniquely identifies a specific Application Load Balancer target group from which to determine\n the average request count served by your Auto Scaling group. You can't specify a resource\n label unless the target group is attached to the Auto Scaling group.
\nYou create the resource label by appending the final portion of the load balancer ARN\n and the final portion of the target group ARN into a single value, separated by a forward\n slash (/). The format of the resource label is:
\n\n app/my-alb/778d41231b141a0f/targetgroup/my-alb-target-group/943f017f100becff
.
Where:
\napp/
targetgroup/
To find the ARN for an Application Load Balancer, use the DescribeLoadBalancers API operation. To find the ARN for the target group, use\n the DescribeTargetGroups API operation.
" + "smithy.api#documentation": "A label that uniquely identifies a specific Application Load Balancer target group from which to determine\n the average request count served by your Auto Scaling group. You can't specify a resource label\n unless the target group is attached to the Auto Scaling group.
\nYou create the resource label by appending the final portion of the load balancer ARN\n and the final portion of the target group ARN into a single value, separated by a forward\n slash (/). The format of the resource label is:
\n\n app/my-alb/778d41231b141a0f/targetgroup/my-alb-target-group/943f017f100becff
.
Where:
\napp/
targetgroup/
To find the ARN for an Application Load Balancer, use the DescribeLoadBalancers API operation. To find the ARN for the target group, use\n the DescribeTargetGroups API operation.
" } } }, @@ -5967,7 +6131,7 @@ } ], "traits": { - "smithy.api#documentation": "Creates or updates a lifecycle hook for the specified Auto Scaling group.
\nA lifecycle hook tells Amazon EC2 Auto Scaling to perform an action on an instance when the instance\n launches (before it is put into service) or as the instance terminates (before it is\n fully terminated).
\nThis step is a part of the procedure for adding a lifecycle hook to an Auto Scaling\n group:
\n(Optional) Create a Lambda function and a rule that allows CloudWatch Events to\n invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates\n instances.
\n(Optional) Create a notification target and an IAM role. The target can be\n either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon EC2 Auto Scaling to\n publish lifecycle notifications to the target.
\n\n Create the lifecycle hook. Specify whether the hook is\n used when the instances launch or terminate.\n
\nIf you need more time, record the lifecycle action heartbeat to keep the\n instance in a pending state using the RecordLifecycleActionHeartbeat API call.
\nIf you finish before the timeout period ends, complete the lifecycle action\n using the CompleteLifecycleAction API call.
\nFor more information, see Amazon EC2 Auto Scaling lifecycle\n hooks in the Amazon EC2 Auto Scaling User Guide.
\nIf you exceed your maximum limit of lifecycle hooks, which by default is 50 per Auto Scaling\n group, the call fails.
\nYou can view the lifecycle hooks for an Auto Scaling group using the DescribeLifecycleHooks API call. If you are no longer using a lifecycle\n hook, you can delete it by calling the DeleteLifecycleHook API.
" + "smithy.api#documentation": "Creates or updates a lifecycle hook for the specified Auto Scaling group.
\nA lifecycle hook enables an Auto Scaling group to be aware of events in the Auto Scaling instance\n lifecycle, and then perform a custom action when the corresponding lifecycle event\n occurs.
\nThis step is a part of the procedure for adding a lifecycle hook to an Auto Scaling\n group:
\n(Optional) Create a Lambda function and a rule that allows Amazon EventBridge to\n invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates\n instances.
\n(Optional) Create a notification target and an IAM role. The target can be\n either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon EC2 Auto Scaling to publish\n lifecycle notifications to the target.
\n\n Create the lifecycle hook. Specify whether the hook is\n used when the instances launch or terminate.\n
\nIf you need more time, record the lifecycle action heartbeat to keep the\n instance in a pending state using the RecordLifecycleActionHeartbeat API call.
\nIf you finish before the timeout period ends, send a callback by using the\n CompleteLifecycleAction API call.
\nFor more information, see Amazon EC2 Auto Scaling lifecycle\n hooks in the Amazon EC2 Auto Scaling User Guide.
\nIf you exceed your maximum limit of lifecycle hooks, which by default is 50 per Auto Scaling\n group, the call fails.
\nYou can view the lifecycle hooks for an Auto Scaling group using the DescribeLifecycleHooks API call. If you are no longer using a lifecycle\n hook, you can delete it by calling the DeleteLifecycleHook API.
" } }, "com.amazonaws.autoscaling#PutLifecycleHookAnswer": { @@ -6006,7 +6170,7 @@ "NotificationTargetARN": { "target": "com.amazonaws.autoscaling#NotificationTargetResourceName", "traits": { - "smithy.api#documentation": "The ARN of the notification target that Amazon EC2 Auto Scaling uses to notify you when an instance\n is in the transition state for the lifecycle hook. This target can be either an SQS\n queue or an SNS topic.
\nIf you specify an empty string, this overrides the current ARN.
\nThis operation uses the JSON format when sending notifications to an Amazon SQS queue,\n and an email key-value pair format when sending notifications to an Amazon SNS\n topic.
\nWhen you specify a notification target, Amazon EC2 Auto Scaling sends it a test message. Test\n messages contain the following additional key-value pair: \"Event\":\n \"autoscaling:TEST_NOTIFICATION\"
.
The ARN of the notification target that Amazon EC2 Auto Scaling uses to notify you when an instance\n is in the transition state for the lifecycle hook. This target can be either an SQS\n queue or an SNS topic.
\nIf you specify an empty string, this overrides the current ARN.
\nThis operation uses the JSON format when sending notifications to an Amazon SQS queue, and\n an email key-value pair format when sending notifications to an Amazon SNS topic.
\nWhen you specify a notification target, Amazon EC2 Auto Scaling sends it a test message. Test\n messages contain the following additional key-value pair: \"Event\":\n \"autoscaling:TEST_NOTIFICATION\"
.
The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (Amazon SNS)\n topic.
", + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the Amazon SNS topic.
", "smithy.api#required": {} } }, @@ -6172,7 +6336,7 @@ "TargetTrackingConfiguration": { "target": "com.amazonaws.autoscaling#TargetTrackingConfiguration", "traits": { - "smithy.api#documentation": "A target tracking scaling policy. Provides support for predefined or customized\n metrics.
\nThe following predefined metrics are available:
\n\n ASGAverageCPUUtilization
\n
\n ASGAverageNetworkIn
\n
\n ASGAverageNetworkOut
\n
\n ALBRequestCountPerTarget
\n
If you specify ALBRequestCountPerTarget
for the metric, you must specify\n the ResourceLabel
parameter with the\n PredefinedMetricSpecification
.
For more information, see TargetTrackingConfiguration in the Amazon EC2 Auto Scaling API\n Reference.
\nRequired if the policy type is TargetTrackingScaling
.
A target tracking scaling policy. Provides support for predefined or custom\n metrics.
\nThe following predefined metrics are available:
\n\n ASGAverageCPUUtilization
\n
\n ASGAverageNetworkIn
\n
\n ASGAverageNetworkOut
\n
\n ALBRequestCountPerTarget
\n
If you specify ALBRequestCountPerTarget
for the metric, you must specify\n the ResourceLabel
parameter with the\n PredefinedMetricSpecification
.
For more information, see TargetTrackingConfiguration in the Amazon EC2 Auto Scaling API\n Reference.
\nRequired if the policy type is TargetTrackingScaling
.
A predictive scaling policy. Provides support for only predefined metrics.
\nPredictive scaling works with CPU utilization, network in/out, and the Application\n Load Balancer request count.
\nFor more information, see PredictiveScalingConfiguration in the Amazon EC2 Auto Scaling API\n Reference.
\nRequired if the policy type is PredictiveScaling
.
A predictive scaling policy. Provides support for predefined and custom\n metrics.
\nPredefined metrics include CPU utilization, network in/out, and the Application Load\n Balancer request count.
\nFor more information, see PredictiveScalingConfiguration in the Amazon EC2 Auto Scaling API\n Reference.
\nRequired if the policy type is PredictiveScaling
.
Records a heartbeat for the lifecycle action associated with the specified token or\n instance. This extends the timeout by the length of time defined using the PutLifecycleHook API call.
\n\nThis step is a part of the procedure for adding a lifecycle hook to an Auto Scaling\n group:
\n(Optional) Create a Lambda function and a rule that allows CloudWatch Events to\n invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates\n instances.
\n(Optional) Create a notification target and an IAM role. The target can be\n either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon EC2 Auto Scaling to\n publish lifecycle notifications to the target.
\nCreate the lifecycle hook. Specify whether the hook is used when the instances\n launch or terminate.
\n\n If you need more time, record the lifecycle action\n heartbeat to keep the instance in a pending state.\n
\nIf you finish before the timeout period ends, complete the lifecycle\n action.
\nFor more information, see Amazon EC2 Auto Scaling lifecycle\n hooks in the Amazon EC2 Auto Scaling User Guide.
" + "smithy.api#documentation": "Records a heartbeat for the lifecycle action associated with the specified token or\n instance. This extends the timeout by the length of time defined using the PutLifecycleHook API call.
\nThis step is a part of the procedure for adding a lifecycle hook to an Auto Scaling\n group:
\n(Optional) Create a Lambda function and a rule that allows Amazon EventBridge to\n invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates\n instances.
\n(Optional) Create a notification target and an IAM role. The target can be\n either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon EC2 Auto Scaling to publish\n lifecycle notifications to the target.
\nCreate the lifecycle hook. Specify whether the hook is used when the instances\n launch or terminate.
\n\n If you need more time, record the lifecycle action\n heartbeat to keep the instance in a pending state.\n
\nIf you finish before the timeout period ends, send a callback by using the\n CompleteLifecycleAction API call.
\nFor more information, see Amazon EC2 Auto Scaling lifecycle\n hooks in the Amazon EC2 Auto Scaling User Guide.
" } }, "com.amazonaws.autoscaling#RecordLifecycleActionHeartbeatAnswer": { @@ -6507,6 +6671,12 @@ "smithy.api#documentation": "Resumes the specified suspended auto scaling processes, or all suspended process, for\n the specified Auto Scaling group.
\nFor more information, see Suspending and\n resuming scaling processes in the Amazon EC2 Auto Scaling User Guide.
" } }, + "com.amazonaws.autoscaling#ReturnData": { + "type": "boolean", + "traits": { + "smithy.api#box": {} + } + }, "com.amazonaws.autoscaling#ScalingActivityInProgressFault": { "type": "structure", "members": { @@ -7003,7 +7173,7 @@ } ], "traits": { - "smithy.api#documentation": "Updates the instance protection settings of the specified instances. This operation\n cannot be called on instances in a warm pool.
\nFor more information about preventing instances that are part of an Auto Scaling group from\n terminating on scale in, see Instance scale-in protection in the\n Amazon EC2 Auto Scaling User Guide.
\nIf you exceed your maximum limit of instance IDs, which is 50 per Auto Scaling group, the call\n fails.
" + "smithy.api#documentation": "Updates the instance protection settings of the specified instances. This operation\n cannot be called on instances in a warm pool.
\nFor more information about preventing instances that are part of an Auto Scaling group from\n terminating on scale in, see Using\n instance scale-in protection in the\n Amazon EC2 Auto Scaling User Guide.
\nIf you exceed your maximum limit of instance IDs, which is 50 per Auto Scaling group, the call\n fails.
" } }, "com.amazonaws.autoscaling#SetInstanceProtectionAnswer": { @@ -7487,7 +7657,7 @@ "MixedInstancesPolicy": { "target": "com.amazonaws.autoscaling#MixedInstancesPolicy", "traits": { - "smithy.api#documentation": "An embedded object that specifies a mixed instances policy. For more information, see\n Auto Scaling groups with multiple\n instance types and purchase options in the Amazon EC2 Auto Scaling User\n Guide.
" + "smithy.api#documentation": "An embedded object that specifies a mixed instances policy. For more information, see\n Auto Scaling groups with multiple\n instance types and purchase options in the Amazon EC2 Auto Scaling User\n Guide.
" } }, "MinSize": { @@ -7529,7 +7699,7 @@ "HealthCheckGracePeriod": { "target": "com.amazonaws.autoscaling#HealthCheckGracePeriod", "traits": { - "smithy.api#documentation": "The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health status\n of an EC2 instance that has come into service. The default value is 0
. For\n more information, see Health\n check grace period in the Amazon EC2 Auto Scaling User Guide.
Conditional: Required if you are adding an ELB
health check.
The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health status\n of an EC2 instance that has come into service and marking it unhealthy due to a failed\n health check. The default value is 0
. For more information, see Health\n check grace period in the Amazon EC2 Auto Scaling User Guide.
Conditional: Required if you are adding an ELB
health check.
Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling\n when scaling in. For more information about preventing instances from terminating on\n scale in, see Instance scale-in protection in the\n Amazon EC2 Auto Scaling User Guide.
" + "smithy.api#documentation": "Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling\n when scaling in. For more information about preventing instances from terminating on\n scale in, see Using\n instance scale-in protection in the\n Amazon EC2 Auto Scaling User Guide.
" } }, "ServiceLinkedRoleARN": { @@ -7571,7 +7741,7 @@ "CapacityRebalance": { "target": "com.amazonaws.autoscaling#CapacityRebalanceEnabled", "traits": { - "smithy.api#documentation": "Enables or disables Capacity Rebalancing. For more information, see Amazon EC2 Auto Scaling Capacity Rebalancing in the\n Amazon EC2 Auto Scaling User Guide.
" + "smithy.api#documentation": "Enables or disables Capacity Rebalancing. For more information, see Amazon EC2 Auto Scaling\n Capacity Rebalancing in the Amazon EC2 Auto Scaling User Guide.
" } }, "Context": { @@ -7774,6 +7944,26 @@ "smithy.api#pattern": "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$" } }, + "com.amazonaws.autoscaling#XmlStringMetricLabel": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2047 + }, + "smithy.api#pattern": "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$" + } + }, + "com.amazonaws.autoscaling#XmlStringMetricStat": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + }, + "smithy.api#pattern": "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$" + } + }, "com.amazonaws.autoscaling#XmlStringUserData": { "type": "string", "traits": { diff --git a/codegen/sdk-codegen/aws-models/backup.2018-11-15.json b/codegen/sdk-codegen/aws-models/backup.2018-11-15.json index cb2df7ee1bc..567c15b1e31 100644 --- a/codegen/sdk-codegen/aws-models/backup.2018-11-15.json +++ b/codegen/sdk-codegen/aws-models/backup.2018-11-15.json @@ -303,7 +303,7 @@ "BackupPlanName": { "target": "com.amazonaws.backup#BackupPlanName", "traits": { - "smithy.api#documentation": "The display name of a backup plan.
", + "smithy.api#documentation": "The display name of a backup plan. Must contain 1 to 50 alphanumeric or '-_.'\n characters.
", "smithy.api#required": {} } }, @@ -331,7 +331,7 @@ "BackupPlanName": { "target": "com.amazonaws.backup#BackupPlanName", "traits": { - "smithy.api#documentation": "The optional display name of a backup plan.
", + "smithy.api#documentation": "The display name of a backup plan. Must contain 1 to 50 alphanumeric or '-_.'\n characters.
", "smithy.api#required": {} } }, @@ -436,7 +436,7 @@ "CreatorRequestId": { "target": "com.amazonaws.backup#string", "traits": { - "smithy.api#documentation": "A unique string that identifies the request and allows failed requests to be retried\n without the risk of running the operation twice.
" + "smithy.api#documentation": "A unique string that identifies the request and allows failed requests to be retried\n without the risk of running the operation twice. This parameter is optional.
\nIf used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters.
" } }, "LastExecutionDate": { @@ -462,7 +462,7 @@ "RuleName": { "target": "com.amazonaws.backup#BackupRuleName", "traits": { - "smithy.api#documentation": "An optional display name for a backup rule.
", + "smithy.api#documentation": "A display name for a backup rule. Must contain 1 to 50 alphanumeric or '-_.'\n characters.
", "smithy.api#required": {} } }, @@ -476,7 +476,7 @@ "ScheduleExpression": { "target": "com.amazonaws.backup#CronExpression", "traits": { - "smithy.api#documentation": "A cron expression in UTC specifying when Backup initiates a backup job. For\n more information about cron expressions, see Schedule Expressions for Rules in the Amazon CloudWatch Events User\n Guide.. Prior to specifying a value for this parameter, we recommend testing\n your cron expression using one of the many available cron generator and testing\n tools.
" + "smithy.api#documentation": "A cron expression in UTC specifying when Backup initiates a backup job. For\n more information about Amazon Web Services cron expressions, see Schedule Expressions for Rules in the Amazon CloudWatch Events User\n Guide.. Two examples of Amazon Web Services cron expressions are 15 * ?\n * * *
(take a backup every hour at 15 minutes past the hour) and 0 12 * * ?\n *
(take a backup every day at 12 noon UTC). For a table of examples, click the\n preceding link and scroll down the page.
An optional display name for a backup rule.
", + "smithy.api#documentation": "A display name for a backup rule. Must contain 1 to 50 alphanumeric or '-_.'\n characters.
", "smithy.api#required": {} } }, @@ -614,7 +614,7 @@ "SelectionName": { "target": "com.amazonaws.backup#BackupSelectionName", "traits": { - "smithy.api#documentation": "The display name of a resource selection document.
", + "smithy.api#documentation": "The display name of a resource selection document. Must contain 1 to 50 alphanumeric or\n '-_.' characters.
", "smithy.api#required": {} } }, @@ -628,20 +628,26 @@ "Resources": { "target": "com.amazonaws.backup#ResourceArns", "traits": { - "smithy.api#documentation": "An array of strings that contain Amazon Resource Names (ARNs)\n \n of resources to assign to a backup plan.
" + "smithy.api#documentation": "A list of Amazon Resource Names (ARNs) to assign to a backup plan. The maximum number of\n ARNs is 500 without wildcards, or 30 ARNs with wildcards.
\nIf you need to assign many resources to a backup plan, consider a different resource\n selection strategy, such as assigning all resources of a resource type or refining your\n resource selection using tags.
" } }, "ListOfTags": { "target": "com.amazonaws.backup#ListOfTags", "traits": { - "smithy.api#documentation": "An array of conditions used to specify a set of resources to assign to a backup plan;\n for example, \"StringEquals\": {\"ec2:ResourceTag/Department\": \"accounting\"
.\n Assigns the backup plan to every resource with at least one matching tag.
A list of conditions that you define to assign resources to your backup plans using\n tags. For example, \"StringEquals\": {\"Department\": \"accounting\"
. Condition\n operators are case sensitive.
\n ListOfTags
differs from Conditions
as follows:
When you specify more than one condition, you assign all resources that match AT\n LEAST ONE condition (using OR logic).
\n\n ListOfTags
only supports StringEquals
.\n Conditions
supports StringEquals
,\n StringLike
, StringNotEquals
, and\n StringNotLike
.
A list of Amazon Resource Names (ARNs) to exclude from a backup plan. The maximum number\n of ARNs is 500 without wildcards, or 30 ARNs with wildcards.
\nIf you need to exclude many resources from a backup plan, consider a different resource\n selection strategy, such as assigning only one or a few resource types or refining your\n resource selection using tags.
" + } }, "Conditions": { - "target": "com.amazonaws.backup#Conditions" + "target": "com.amazonaws.backup#Conditions", + "traits": { + "smithy.api#documentation": "A list of conditions that you define to assign resources to your backup plans using\n tags. For example, \"StringEquals\": {\"Department\": \"accounting\"
. Condition\n operators are case sensitive.
\n Conditions
differs from ListOfTags
as follows:
When you specify more than one condition, you only assign the resources that match\n ALL conditions (using AND logic).
\n\n Conditions
supports StringEquals
,\n StringLike
, StringNotEquals
, and\n StringNotLike
. ListOfTags
only supports\n StringEquals
.
A unique string that identifies the request and allows failed requests to be retried\n without the risk of running the operation twice.
" + "smithy.api#documentation": "A unique string that identifies the request and allows failed requests to be retried\n without the risk of running the operation twice. This parameter is optional.
\nIf used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters.
" } }, "IamRoleArn": { @@ -813,7 +819,7 @@ "CreatorRequestId": { "target": "com.amazonaws.backup#string", "traits": { - "smithy.api#documentation": "A unique string that identifies the request and allows failed requests to be retried\n without the risk of running the operation twice.
" + "smithy.api#documentation": "A unique string that identifies the request and allows failed requests to be retried\n without the risk of running the operation twice. This parameter is optional.
\nIf used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters.
" } }, "NumberOfRecoveryPoints": { @@ -904,27 +910,27 @@ "ConditionType": { "target": "com.amazonaws.backup#ConditionType", "traits": { - "smithy.api#documentation": "An operation, such as StringEquals
, that is applied to a key-value pair\n used to filter resources in a selection.
An operation applied to a key-value pair used to assign resources to your backup plan.\n Condition only supports StringEquals
. For more flexible assignment options,\n incluidng StringLike
and the ability to exclude resources from your backup\n plan, use Conditions
(with an \"s\" on the end) for your \n BackupSelection
\n .
The key in a key-value pair. For example, in \"ec2:ResourceTag/Department\":\n \"accounting\"
, \"ec2:ResourceTag/Department\"
is the key.
The key in a key-value pair. For example, in the tag Department:\n Accounting
, Department
is the key.
The value in a key-value pair. For example, in \"ec2:ResourceTag/Department\":\n \"accounting\"
, \"accounting\"
is the value.
The value in a key-value pair. For example, in the tag Department:\n Accounting
, Accounting
is the value.
Contains an array of triplets made up of a condition type (such as\n StringEquals
), a key, and a value. Conditions are used to filter resources\n in a selection that is assigned to a backup plan.
Contains an array of triplets made up of a condition type (such as\n StringEquals
), a key, and a value. Used to filter resources using their\n tags and assign them to a backup plan. Case sensitive.
The key in a key-value pair. For example, in the tag Department:\n Accounting
, Department
is the key.
The value in a key-value pair. For example, in the tag Department:\n Accounting
, Accounting
is the value.
Includes information about tags you define to assign tagged resources to a backup\n plan.
" } }, "com.amazonaws.backup#ConditionParameters": { @@ -965,17 +980,32 @@ "type": "structure", "members": { "StringEquals": { - "target": "com.amazonaws.backup#ConditionParameters" + "target": "com.amazonaws.backup#ConditionParameters", + "traits": { + "smithy.api#documentation": "Filters the values of your tagged resources for only those resources that you tagged\n with the same value. Also called \"exact matching.\"
" + } }, "StringNotEquals": { - "target": "com.amazonaws.backup#ConditionParameters" + "target": "com.amazonaws.backup#ConditionParameters", + "traits": { + "smithy.api#documentation": "Filters the values of your tagged resources for only those resources that you tagged\n that do not have the same value. Also called \"negated matching.\"
" + } }, "StringLike": { - "target": "com.amazonaws.backup#ConditionParameters" + "target": "com.amazonaws.backup#ConditionParameters", + "traits": { + "smithy.api#documentation": "Filters the values of your tagged resources for matching tag values with the use of a\n wildcard character (*) anywhere in the string. For example, \"prod*\" or \"*rod*\" matches the\n tag value \"production\".
" + } }, "StringNotLike": { - "target": "com.amazonaws.backup#ConditionParameters" + "target": "com.amazonaws.backup#ConditionParameters", + "traits": { + "smithy.api#documentation": "Filters the values of your tagged resources for non-matching tag values with the use of\n a wildcard character (*) anywhere in the string.
" + } } + }, + "traits": { + "smithy.api#documentation": "Contains information about which resources to include or exclude from a backup plan\n using their tags. Conditions are case sensitive.
" } }, "com.amazonaws.backup#ConflictException": { @@ -1057,12 +1087,12 @@ "Tags": { "target": "com.amazonaws.backup#stringMap", "traits": { - "smithy.api#documentation": "Describes whether the control scope includes resources with one or more tags. Each tag\n is a key-value pair.
" + "smithy.api#documentation": "The tag key-value pair applied to those Amazon Web Services resources that you want to\n trigger an evaluation for a rule. A maximum of one key-value pair can be provided. The tag\n value is optional, but it cannot be an empty string. The structure to assign a tag is:\n [{\"Key\":\"string\",\"Value\":\"string\"}]
.
A framework consists of one or more controls. Each control has its own control scope.\n The control scope defines what the control will evaluate. Three examples of control scopes\n are: a specific backup plan, all backup plans with a specific tag, or all backup\n plans.
\nTo set a control scope that includes all of a particular resource, leave the\n ControlScope
empty or do not pass it when calling\n CreateFramework
.
A framework consists of one or more controls. Each control has its own control scope.\n The control scope can include one or more resource types, a combination of a tag key and\n value, or a combination of one resource type and one resource ID. If no scope is specified,\n evaluations for the rule are triggered when any resource in your recording group changes in\n configuration.
\nTo set a control scope that includes all of a particular resource, leave the\n ControlScope
empty or do not pass it when calling\n CreateFramework
.
Identifies the request and allows failed requests to be retried without the risk of\n running the operation twice. If the request includes a CreatorRequestId
that\n matches an existing backup plan, that plan is returned. This parameter is optional.
Identifies the request and allows failed requests to be retried without the risk of\n running the operation twice. If the request includes a CreatorRequestId
that\n matches an existing backup plan, that plan is returned. This parameter is optional.
If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters.
" } } } @@ -1333,7 +1363,7 @@ } ], "traits": { - "smithy.api#documentation": "Creates a JSON document that specifies a set of resources to assign to a backup plan.\n Resources can be included by specifying patterns for a ListOfTags
and selected\n Resources
.
For example, consider the following patterns:
\n\n Resources: \"arn:aws:ec2:region:account-id:volume/volume-id\"
\n
\n ConditionKey:\"department\"
\n
\n ConditionValue:\"finance\"
\n
\n ConditionType:\"StringEquals\"
\n
\n ConditionKey:\"importance\"
\n
\n ConditionValue:\"critical\"
\n
\n ConditionType:\"StringEquals\"
\n
Using these patterns would back up all Amazon Elastic Block Store (Amazon EBS)\n volumes that are tagged as \"department=finance\"
,\n \"importance=critical\"
, in addition to an EBS volume with the specified\n volume ID.
Resources and conditions are additive in that all resources that match the pattern are\n selected. This shouldn't be confused with a logical AND, where all conditions must match.\n The matching patterns are logically put together using the OR operator.\n In other words, all patterns that match are selected for backup.
", + "smithy.api#documentation": "Creates a JSON document that specifies a set of resources to assign to a backup plan.\n For examples, see Assigning resources\n programmatically.
", "smithy.api#http": { "method": "PUT", "uri": "/backup/plans/{BackupPlanId}/selections", @@ -1363,7 +1393,7 @@ "CreatorRequestId": { "target": "com.amazonaws.backup#string", "traits": { - "smithy.api#documentation": "A unique string that identifies the request and allows failed requests to be retried\n without the risk of running the operation twice.
" + "smithy.api#documentation": "A unique string that identifies the request and allows failed requests to be retried\n without the risk of running the operation twice. This parameter is optional.
\nIf used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters.
" } } } @@ -1452,7 +1482,7 @@ "CreatorRequestId": { "target": "com.amazonaws.backup#string", "traits": { - "smithy.api#documentation": "A unique string that identifies the request and allows failed requests to be retried\n without the risk of running the operation twice.
" + "smithy.api#documentation": "A unique string that identifies the request and allows failed requests to be retried\n without the risk of running the operation twice. This parameter is optional.
\nIf used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters.
" } } } @@ -1678,6 +1708,21 @@ }, "com.amazonaws.backup#CryoControllerUserManager": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "Backup", + "arnNamespace": "backup", + "cloudFormationName": "Backup", + "cloudTrailEventSource": "backup.amazonaws.com", + "endpointPrefix": "backup" + }, + "aws.auth#sigv4": { + "name": "backup" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "Backup is a unified backup service designed to protect Amazon Web Services\n services and their associated data. Backup simplifies the creation, migration,\n restoration, and deletion of backups, while also providing reporting and\n auditing.
", + "smithy.api#title": "AWS Backup" + }, "version": "2018-11-15", "operations": [ { @@ -1878,22 +1923,7 @@ { "target": "com.amazonaws.backup#UpdateReportPlan" } - ], - "traits": { - "aws.api#service": { - "sdkId": "Backup", - "arnNamespace": "backup", - "cloudFormationName": "Backup", - "cloudTrailEventSource": "backup.amazonaws.com", - "endpointPrefix": "backup" - }, - "aws.auth#sigv4": { - "name": "backup" - }, - "aws.protocols#restJson1": {}, - "smithy.api#documentation": "Backup is a unified backup service designed to protect Amazon Web Services\n services and their associated data. Backup simplifies the creation, migration,\n restoration, and deletion of backups, while also providing reporting and\n auditing.
", - "smithy.api#title": "AWS Backup" - } + ] }, "com.amazonaws.backup#DeleteBackupPlan": { "type": "operation", @@ -3121,6 +3151,12 @@ "traits": { "smithy.api#documentation": "Returns a list of all services along with the opt-in preferences in the Region.
" } + }, + "ResourceTypeManagementPreference": { + "target": "com.amazonaws.backup#ResourceTypeManagementPreference", + "traits": { + "smithy.api#documentation": "Returns whether a DynamoDB recovery point was taken using \n \n Backup's advanced DynamoDB backup features.\n
" + } } } }, @@ -5771,7 +5807,7 @@ } ], "traits": { - "smithy.api#documentation": "Applies Backup Vault Lock to a backup vault, preventing attempts to delete\n any recovery point stored in or created in a backup vault. Vault Lock also prevents\n attempts to update the lifecycle policy that controls the retention period of any recovery\n point currently stored in a backup vault. If specified, Vault Lock enforces a minimum and\n maximum retention period for future backup and copy jobs that target a backup vault.
", + "smithy.api#documentation": "Applies Backup Vault Lock to a backup vault, preventing attempts to delete\n any recovery point stored in or created in a backup vault. Vault Lock also prevents\n attempts to update the lifecycle policy that controls the retention period of any recovery\n point currently stored in a backup vault. If specified, Vault Lock enforces a minimum and\n maximum retention period for future backup and copy jobs that target a backup vault.
\nBackup Vault Lock has yet to receive a third-party assessment for SEC\n 17a-4(f) and CFTC.
\nAn array of events that indicate the status of jobs to back up resources to the backup\n vault.
\nThe following events are supported:
\n\n BACKUP_JOB_STARTED
, BACKUP_JOB_COMPLETED
,
\n COPY_JOB_STARTED
, COPY_JOB_SUCCESSFUL
,\n COPY_JOB_FAILED
,
\n RESTORE_JOB_STARTED
, RESTORE_JOB_COMPLETED
, and\n RECOVERY_POINT_MODIFIED
.
To find failed backup jobs, use BACKUP_JOB_COMPLETED
and filter using\n event metadata.
Other events in the following list are deprecated.
\nAn array of events that indicate the status of jobs to back up resources to the backup\n vault.
\nFor common use cases and code samples, see Using Amazon SNS to\n track Backup events.
\nThe following events are supported:
\n\n BACKUP_JOB_STARTED
| BACKUP_JOB_COMPLETED
\n
\n COPY_JOB_STARTED
| COPY_JOB_SUCCESSFUL
|\n COPY_JOB_FAILED
\n
\n RESTORE_JOB_STARTED
| RESTORE_JOB_COMPLETED
|\n RECOVERY_POINT_MODIFIED
\n
Ignore the list below because it includes deprecated events. Refer to the list\n above.
\nKey-value pairs that are used to help organize your resources. You can assign your own\n metadata to the resources you create.
", + "smithy.api#documentation": "Key-value pairs that are used to help organize your resources. You can assign your own\n metadata to the resources you create. For clarity, this is the structure to assign tags:\n [{\"Key\":\"string\",\"Value\":\"string\"}]
.
Updates the list of services along with the opt-in preferences for the Region.
" } + }, + "ResourceTypeManagementPreference": { + "target": "com.amazonaws.backup#ResourceTypeManagementPreference", + "traits": { + "smithy.api#documentation": "Enables or disables \n \n Backup's advanced DynamoDB backup features for the\n Region.
" + } } } }, diff --git a/codegen/sdk-codegen/aws-models/braket.2019-09-01.json b/codegen/sdk-codegen/aws-models/braket.2019-09-01.json index 209a8dadc6e..ff7d804a7f0 100644 --- a/codegen/sdk-codegen/aws-models/braket.2019-09-01.json +++ b/codegen/sdk-codegen/aws-models/braket.2019-09-01.json @@ -14,31 +14,28 @@ "smithy.api#httpError": 403 } }, - "com.amazonaws.braket#Braket": { - "type": "service", - "version": "2019-09-01", - "operations": [ - { - "target": "com.amazonaws.braket#ListTagsForResource" - }, - { - "target": "com.amazonaws.braket#TagResource" - }, - { - "target": "com.amazonaws.braket#UntagResource" - } - ], - "resources": [ - { - "target": "com.amazonaws.braket#DeviceResource" - }, - { - "target": "com.amazonaws.braket#JobResource" + "com.amazonaws.braket#AlgorithmSpecification": { + "type": "structure", + "members": { + "scriptModeConfig": { + "target": "com.amazonaws.braket#ScriptModeConfig", + "traits": { + "smithy.api#documentation": "Configures the paths to the Python scripts used for entry and training.
" + } }, - { - "target": "com.amazonaws.braket#QuantumTaskResource" + "containerImage": { + "target": "com.amazonaws.braket#ContainerImage", + "traits": { + "smithy.api#documentation": "The container image used to create an Amazon Braket job.
" + } } - ], + }, + "traits": { + "smithy.api#documentation": "Defines the Amazon Braket job to be created. Specifies the container image the job uses and the paths to\n the Python scripts used for entry and training.
" + } + }, + "com.amazonaws.braket#Braket": { + "type": "service", "traits": { "aws.api#service": { "sdkId": "Braket", @@ -71,6 +68,99 @@ }, "smithy.api#documentation": "The Amazon Braket API Reference provides information about the operations and structures supported in Amazon Braket.
", "smithy.api#title": "Braket" + }, + "version": "2019-09-01", + "operations": [ + { + "target": "com.amazonaws.braket#ListTagsForResource" + }, + { + "target": "com.amazonaws.braket#TagResource" + }, + { + "target": "com.amazonaws.braket#UntagResource" + } + ], + "resources": [ + { + "target": "com.amazonaws.braket#DeviceResource" + }, + { + "target": "com.amazonaws.braket#JobResource" + }, + { + "target": "com.amazonaws.braket#QuantumTaskResource" + } + ] + }, + "com.amazonaws.braket#CancelJob": { + "type": "operation", + "input": { + "target": "com.amazonaws.braket#CancelJobRequest" + }, + "output": { + "target": "com.amazonaws.braket#CancelJobResponse" + }, + "errors": [ + { + "target": "com.amazonaws.braket#AccessDeniedException" + }, + { + "target": "com.amazonaws.braket#ConflictException" + }, + { + "target": "com.amazonaws.braket#InternalServiceException" + }, + { + "target": "com.amazonaws.braket#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.braket#ThrottlingException" + }, + { + "target": "com.amazonaws.braket#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Cancels an Amazon Braket job.
", + "smithy.api#http": { + "method": "PUT", + "uri": "/job/{jobArn}/cancel", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.braket#CancelJobRequest": { + "type": "structure", + "members": { + "jobArn": { + "target": "com.amazonaws.braket#JobArn", + "traits": { + "smithy.api#documentation": "The ARN of the Amazon Braket job to cancel.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.braket#CancelJobResponse": { + "type": "structure", + "members": { + "jobArn": { + "target": "com.amazonaws.braket#JobArn", + "traits": { + "smithy.api#documentation": "The ARN of the Amazon Braket job.
", + "smithy.api#required": {} + } + }, + "cancellationStatus": { + "target": "com.amazonaws.braket#CancellationStatus", + "traits": { + "smithy.api#documentation": "The status of the job cancellation request.
", + "smithy.api#required": {} + } + } } }, "com.amazonaws.braket#CancelQuantumTask": { @@ -166,6 +256,21 @@ ] } }, + "com.amazonaws.braket#CompressionType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "NONE", + "name": "NONE" + }, + { + "value": "GZIP", + "name": "GZIP" + } + ] + } + }, "com.amazonaws.braket#ConflictException": { "type": "structure", "members": { @@ -179,6 +284,167 @@ "smithy.api#httpError": 409 } }, + "com.amazonaws.braket#ContainerImage": { + "type": "structure", + "members": { + "uri": { + "target": "com.amazonaws.braket#Uri", + "traits": { + "smithy.api#documentation": "The URI locating the container image.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The container image used to create an Amazon Braket job.
" + } + }, + "com.amazonaws.braket#CreateJob": { + "type": "operation", + "input": { + "target": "com.amazonaws.braket#CreateJobRequest" + }, + "output": { + "target": "com.amazonaws.braket#CreateJobResponse" + }, + "errors": [ + { + "target": "com.amazonaws.braket#AccessDeniedException" + }, + { + "target": "com.amazonaws.braket#ConflictException" + }, + { + "target": "com.amazonaws.braket#DeviceRetiredException" + }, + { + "target": "com.amazonaws.braket#InternalServiceException" + }, + { + "target": "com.amazonaws.braket#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.braket#ThrottlingException" + }, + { + "target": "com.amazonaws.braket#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Creates an Amazon Braket job.
", + "smithy.api#http": { + "method": "POST", + "uri": "/job", + "code": 201 + } + } + }, + "com.amazonaws.braket#CreateJobRequest": { + "type": "structure", + "members": { + "clientToken": { + "target": "com.amazonaws.braket#String64", + "traits": { + "smithy.api#documentation": "A unique token that guarantees that the call to this API is idempotent.
", + "smithy.api#idempotencyToken": {}, + "smithy.api#required": {} + } + }, + "algorithmSpecification": { + "target": "com.amazonaws.braket#AlgorithmSpecification", + "traits": { + "smithy.api#documentation": "Definition of the Amazon Braket job to be created. Specifies the container image the job uses and information\n about the Python scripts used for entry and training.
", + "smithy.api#required": {} + } + }, + "inputDataConfig": { + "target": "com.amazonaws.braket#InputConfigList", + "traits": { + "smithy.api#documentation": "A list of parameters that specify the name and type of input data and where it is\n located.
", + "smithy.api#length": { + "min": 0, + "max": 20 + } + } + }, + "outputDataConfig": { + "target": "com.amazonaws.braket#JobOutputDataConfig", + "traits": { + "smithy.api#documentation": "The path to the S3 location where you want to store job artifacts and the\n encryption key used to store them.
", + "smithy.api#required": {} + } + }, + "checkpointConfig": { + "target": "com.amazonaws.braket#JobCheckpointConfig", + "traits": { + "smithy.api#documentation": "Information about the output locations for job checkpoint data.
" + } + }, + "jobName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the Amazon Braket job.
", + "smithy.api#length": { + "min": 1, + "max": 50 + }, + "smithy.api#pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9]){0,50}$", + "smithy.api#required": {} + } + }, + "roleArn": { + "target": "com.amazonaws.braket#RoleArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of an IAM role that Amazon Braket can assume to perform\n tasks on behalf of a user. It can access user resources, run an Amazon Braket job container\n on behalf of user, and output resources to the users' s3 buckets.
", + "smithy.api#required": {} + } + }, + "stoppingCondition": { + "target": "com.amazonaws.braket#JobStoppingCondition", + "traits": { + "smithy.api#documentation": "The user-defined criteria that specifies when a job stops running.
" + } + }, + "instanceConfig": { + "target": "com.amazonaws.braket#InstanceConfig", + "traits": { + "smithy.api#documentation": "Configuration of the resource instances to use while running the hybrid job on Amazon\n Braket.
", + "smithy.api#required": {} + } + }, + "hyperParameters": { + "target": "com.amazonaws.braket#HyperParameters", + "traits": { + "smithy.api#documentation": "Algorithm-specific parameters used by an Amazon Braket job that influence the quality of\n the training job. The values are set with a string of JSON key:value pairs, where the key is the\n name of the hyperparameter and the value is the value of th hyperparameter.
" + } + }, + "deviceConfig": { + "target": "com.amazonaws.braket#DeviceConfig", + "traits": { + "smithy.api#documentation": "The quantum processing unit (QPU) or simulator used to create an Amazon Braket job.
", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.braket#TagsMap", + "traits": { + "smithy.api#documentation": "A tag object that consists of a key and an optional value, used to manage metadata for Amazon Braket resources.
" + } + } + } + }, + "com.amazonaws.braket#CreateJobResponse": { + "type": "structure", + "members": { + "jobArn": { + "target": "com.amazonaws.braket#JobArn", + "traits": { + "smithy.api#documentation": "The ARN of the Amazon Braket job created.
", + "smithy.api#required": {} + } + } + } + }, "com.amazonaws.braket#CreateQuantumTask": { "type": "operation", "input": { @@ -194,6 +460,9 @@ { "target": "com.amazonaws.braket#DeviceOfflineException" }, + { + "target": "com.amazonaws.braket#DeviceRetiredException" + }, { "target": "com.amazonaws.braket#InternalServiceException" }, @@ -288,6 +557,12 @@ "traits": { "smithy.api#documentation": "Tags to be added to the quantum task you're creating.
" } + }, + "jobToken": { + "target": "com.amazonaws.braket#JobToken", + "traits": { + "smithy.api#documentation": "The token for an Amazon Braket job that associates it with the quantum task.
" + } } } }, @@ -303,6 +578,21 @@ } } }, + "com.amazonaws.braket#DataSource": { + "type": "structure", + "members": { + "s3DataSource": { + "target": "com.amazonaws.braket#S3DataSource", + "traits": { + "smithy.api#documentation": "Information about the data stored in Amazon S3 used by the Amazon Braket job.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Information about the source of the data used by the Amazon Braket job.
" + } + }, "com.amazonaws.braket#DeviceArn": { "type": "string", "traits": { @@ -316,10 +606,25 @@ } } }, - "com.amazonaws.braket#DeviceOfflineException": { + "com.amazonaws.braket#DeviceConfig": { "type": "structure", "members": { - "message": { + "device": { + "target": "com.amazonaws.braket#String256", + "traits": { + "smithy.api#documentation": "The primary quantum processing unit (QPU) or simulator used to create and run an Amazon Braket job.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Configures the quantum processing units (QPUs) or simulator used to create and run an Amazon Braket job.
" + } + }, + "com.amazonaws.braket#DeviceOfflineException": { + "type": "structure", + "members": { + "message": { "target": "smithy.api#String" } }, @@ -459,12 +764,6 @@ { "target": "com.amazonaws.braket#AccessDeniedException" }, - { - "target": "com.amazonaws.braket#DeviceOfflineException" - }, - { - "target": "com.amazonaws.braket#DeviceRetiredException" - }, { "target": "com.amazonaws.braket#InternalServiceException" }, @@ -548,6 +847,189 @@ } } }, + "com.amazonaws.braket#GetJob": { + "type": "operation", + "input": { + "target": "com.amazonaws.braket#GetJobRequest" + }, + "output": { + "target": "com.amazonaws.braket#GetJobResponse" + }, + "errors": [ + { + "target": "com.amazonaws.braket#AccessDeniedException" + }, + { + "target": "com.amazonaws.braket#InternalServiceException" + }, + { + "target": "com.amazonaws.braket#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.braket#ThrottlingException" + }, + { + "target": "com.amazonaws.braket#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Retrieves the specified Amazon Braket job.
", + "smithy.api#http": { + "method": "GET", + "uri": "/job/{jobArn}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.braket#GetJobRequest": { + "type": "structure", + "members": { + "jobArn": { + "target": "com.amazonaws.braket#JobArn", + "traits": { + "smithy.api#documentation": "The ARN of the job to retrieve.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.braket#GetJobResponse": { + "type": "structure", + "members": { + "status": { + "target": "com.amazonaws.braket#JobPrimaryStatus", + "traits": { + "smithy.api#documentation": "The status of the Amazon Braket job.
", + "smithy.api#required": {} + } + }, + "jobArn": { + "target": "com.amazonaws.braket#JobArn", + "traits": { + "smithy.api#documentation": "The ARN of the Amazon Braket job.
", + "smithy.api#required": {} + } + }, + "roleArn": { + "target": "com.amazonaws.braket#RoleArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of an IAM role that Amazon Braket can assume to perform\n tasks on behalf of a user. It can access user resources, run an Amazon Braket job container\n on behalf of user, and output resources to the s3 buckets of a user.
", + "smithy.api#required": {} + } + }, + "failureReason": { + "target": "com.amazonaws.braket#String1024", + "traits": { + "smithy.api#documentation": "A description of the reason why an Amazon Braket job failed, if it failed.
" + } + }, + "jobName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the Amazon Braket job.
", + "smithy.api#length": { + "min": 1, + "max": 50 + }, + "smithy.api#pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9]){0,50}$", + "smithy.api#required": {} + } + }, + "hyperParameters": { + "target": "com.amazonaws.braket#HyperParameters", + "traits": { + "smithy.api#documentation": "Algorithm-specific parameters used by an Amazon Braket job that influence the quality of\n the traiing job. The values are set with a string of JSON key:value pairs, where the key is the\n name of the hyperparameter and the value is the value of th hyperparameter.
" + } + }, + "inputDataConfig": { + "target": "com.amazonaws.braket#InputConfigList", + "traits": { + "smithy.api#documentation": "A list of parameters that specify the name and type of input data and where it is\n located.
" + } + }, + "outputDataConfig": { + "target": "com.amazonaws.braket#JobOutputDataConfig", + "traits": { + "smithy.api#documentation": "The path to the S3 location where job artifacts are stored and the encryption\n key used to store them there.
", + "smithy.api#required": {} + } + }, + "stoppingCondition": { + "target": "com.amazonaws.braket#JobStoppingCondition", + "traits": { + "smithy.api#documentation": "The user-defined criteria that specifies when to stop a job running.
" + } + }, + "checkpointConfig": { + "target": "com.amazonaws.braket#JobCheckpointConfig", + "traits": { + "smithy.api#documentation": "Information about the output locations for job checkpoint data.
" + } + }, + "algorithmSpecification": { + "target": "com.amazonaws.braket#AlgorithmSpecification", + "traits": { + "smithy.api#documentation": "Definition of the Amazon Braket job created. Specifies the container image the job uses, information about\n the Python scripts used for entry and training, and the user-defined metrics used to\n evaluation the job.
", + "smithy.api#required": {} + } + }, + "instanceConfig": { + "target": "com.amazonaws.braket#InstanceConfig", + "traits": { + "smithy.api#documentation": "The resource instances to use while running the hybrid job on Amazon\n Braket.
", + "smithy.api#required": {} + } + }, + "createdAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that the Amazon Braket job was created.
", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "date-time" + } + }, + "startedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that the Amazon Braket job was started.
", + "smithy.api#timestampFormat": "date-time" + } + }, + "endedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that the Amazon Braket job ended.
", + "smithy.api#timestampFormat": "date-time" + } + }, + "billableDuration": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The billable time the Amazon Braket job used to complete.
" + } + }, + "deviceConfig": { + "target": "com.amazonaws.braket#DeviceConfig", + "traits": { + "smithy.api#documentation": "The quantum processing unit (QPU) or simulator used to run the Amazon Braket job.
" + } + }, + "events": { + "target": "com.amazonaws.braket#JobEvents", + "traits": { + "smithy.api#documentation": "Details about the type and time events occurred related to the Amazon Braket job.
" + } + }, + "tags": { + "target": "com.amazonaws.braket#TagsMap", + "traits": { + "smithy.api#documentation": "A tag object that consists of a key and an optional value, used to manage metadata for Amazon Braket resources.
" + } + } + } + }, "com.amazonaws.braket#GetQuantumTask": { "type": "operation", "input": { @@ -629,86 +1111,618 @@ "deviceParameters": { "target": "com.amazonaws.braket#JsonValue", "traits": { - "smithy.api#documentation": "The parameters for the device on which the task ran.
", + "smithy.api#documentation": "The parameters for the device on which the task ran.
", + "smithy.api#required": {} + } + }, + "shots": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#documentation": "The number of shots used in the task.
", + "smithy.api#required": {} + } + }, + "outputS3Bucket": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The S3 bucket where task results are stored.
", + "smithy.api#required": {} + } + }, + "outputS3Directory": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The folder in the S3 bucket where task results are stored.
", + "smithy.api#required": {} + } + }, + "createdAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The time at which the task was created.
", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "date-time" + } + }, + "endedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The time at which the task ended.
", + "smithy.api#timestampFormat": "date-time" + } + }, + "tags": { + "target": "com.amazonaws.braket#TagsMap", + "traits": { + "smithy.api#documentation": "The tags that belong to this task.
" + } + }, + "jobArn": { + "target": "com.amazonaws.braket#JobArn", + "traits": { + "smithy.api#documentation": "The ARN of the Amazon Braket job associated with the quantum task.
" + } + } + } + }, + "com.amazonaws.braket#HyperParameters": { + "type": "map", + "key": { + "target": "com.amazonaws.braket#String256" + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2500 + } + } + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, + "com.amazonaws.braket#InputConfigList": { + "type": "list", + "member": { + "target": "com.amazonaws.braket#InputFileConfig" + } + }, + "com.amazonaws.braket#InputFileConfig": { + "type": "structure", + "members": { + "channelName": { + "target": "com.amazonaws.braket#String64", + "traits": { + "smithy.api#documentation": "A named input source that an Amazon Braket job can consume.
", + "smithy.api#pattern": "^[A-Za-z0-9\\.\\-_]+$", + "smithy.api#required": {} + } + }, + "contentType": { + "target": "com.amazonaws.braket#String256", + "traits": { + "smithy.api#documentation": "The MIME type of the data.
" + } + }, + "dataSource": { + "target": "com.amazonaws.braket#DataSource", + "traits": { + "smithy.api#documentation": "The location of the channel data.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A list of parameters that specify the input channels, type of input data, and where it\n is located.
" + } + }, + "com.amazonaws.braket#InstanceConfig": { + "type": "structure", + "members": { + "instanceType": { + "target": "com.amazonaws.braket#InstanceType", + "traits": { + "smithy.api#documentation": "Configures the type resource instances to use while running an Amazon Braket hybrid job.
", + "smithy.api#required": {} + } + }, + "volumeSizeInGb": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The size of the storage volume, in GB, that user wants to provision.
", + "smithy.api#range": { + "min": 1 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Configures the resource instances to use while running the Amazon Braket hybrid job on Amazon\n Braket.
" + } + }, + "com.amazonaws.braket#InstanceType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ml.m4.xlarge", + "name": "ML_M4_XLARGE" + }, + { + "value": "ml.m4.2xlarge", + "name": "ML_M4_2XLARGE" + }, + { + "value": "ml.m4.4xlarge", + "name": "ML_M4_4XLARGE" + }, + { + "value": "ml.m4.10xlarge", + "name": "ML_M4_10XLARGE" + }, + { + "value": "ml.m4.16xlarge", + "name": "ML_M4_16XLARGE" + }, + { + "value": "ml.g4dn.xlarge", + "name": "ML_G4DN_XLARGE" + }, + { + "value": "ml.g4dn.2xlarge", + "name": "ML_G4DN_2XLARGE" + }, + { + "value": "ml.g4dn.4xlarge", + "name": "ML_G4DN_4XLARGE" + }, + { + "value": "ml.g4dn.8xlarge", + "name": "ML_G4DN_8XLARGE" + }, + { + "value": "ml.g4dn.12xlarge", + "name": "ML_G4DN_12XLARGE" + }, + { + "value": "ml.g4dn.16xlarge", + "name": "ML_G4DN_16XLARGE" + }, + { + "value": "ml.m5.large", + "name": "ML_M5_LARGE" + }, + { + "value": "ml.m5.xlarge", + "name": "ML_M5_XLARGE" + }, + { + "value": "ml.m5.2xlarge", + "name": "ML_M5_2XLARGE" + }, + { + "value": "ml.m5.4xlarge", + "name": "ML_M5_4XLARGE" + }, + { + "value": "ml.m5.12xlarge", + "name": "ML_M5_12XLARGE" + }, + { + "value": "ml.m5.24xlarge", + "name": "ML_M5_24XLARGE" + }, + { + "value": "ml.c4.xlarge", + "name": "ML_C4_XLARGE" + }, + { + "value": "ml.c4.2xlarge", + "name": "ML_C4_2XLARGE" + }, + { + "value": "ml.c4.4xlarge", + "name": "ML_C4_4XLARGE" + }, + { + "value": "ml.c4.8xlarge", + "name": "ML_C4_8XLARGE" + }, + { + "value": "ml.p2.xlarge", + "name": "ML_P2_XLARGE" + }, + { + "value": "ml.p2.8xlarge", + "name": "ML_P2_8XLARGE" + }, + { + "value": "ml.p2.16xlarge", + "name": "ML_P2_16XLARGE" + }, + { + "value": "ml.p3.2xlarge", + "name": "ML_P3_2XLARGE" + }, + { + "value": "ml.p3.8xlarge", + "name": "ML_P3_8XLARGE" + }, + { + "value": "ml.p3.16xlarge", + "name": "ML_P3_16XLARGE" + }, + { + "value": "ml.p3dn.24xlarge", + "name": "ML_P3DN_24XLARGE" + }, + { + "value": "ml.p4d.24xlarge", + "name": "ML_P4D_24XLARGE" + }, + { + "value": "ml.c5.xlarge", + "name": "ML_C5_XLARGE" + }, + { + "value": "ml.c5.2xlarge", + "name": "ML_C5_2XLARGE" + }, + { + "value": "ml.c5.4xlarge", + "name": "ML_C5_4XLARGE" + }, + { + "value": "ml.c5.9xlarge", + "name": "ML_C5_9XLARGE" + }, + { + "value": "ml.c5.18xlarge", + "name": "ML_C5_18XLARGE" + }, + { + "value": "ml.c5n.xlarge", + "name": "ML_C5N_XLARGE" + }, + { + "value": "ml.c5n.2xlarge", + "name": "ML_C5N_2XLARGE" + }, + { + "value": "ml.c5n.4xlarge", + "name": "ML_C5N_4XLARGE" + }, + { + "value": "ml.c5n.9xlarge", + "name": "ML_C5N_9XLARGE" + }, + { + "value": "ml.c5n.18xlarge", + "name": "ML_C5N_18XLARGE" + } + ] + } + }, + "com.amazonaws.braket#InternalServiceException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "The request processing has failed because of an unknown error, exception, or failure.
", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.braket#JobArn": { + "type": "string", + "traits": { + "aws.api#arnReference": { + "service": "com.amazonaws.braket#Braket", + "resource": "com.amazonaws.braket#JobResource" + }, + "smithy.api#pattern": "^arn:aws[a-z\\-]*:braket:[a-z0-9\\-]*:[0-9]{12}:job/.*$" + } + }, + "com.amazonaws.braket#JobCheckpointConfig": { + "type": "structure", + "members": { + "localPath": { + "target": "com.amazonaws.braket#String4096", + "traits": { + "smithy.api#documentation": "(Optional) The local directory where checkpoints are written. The default directory is /opt/braket/checkpoints/
.
Identifies the S3 path where you want Amazon Braket to store checkpoints. For example, s3://bucket-name/key-name-prefix
.
Contains information about the output locations for job checkpoint data.
" + } + }, + "com.amazonaws.braket#JobEventDetails": { + "type": "structure", + "members": { + "eventType": { + "target": "com.amazonaws.braket#JobEventType", + "traits": { + "smithy.api#documentation": "The type of event that occurred related to the Amazon Braket job.
" + } + }, + "timeOfEvent": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "TThe type of event that occurred related to the Amazon Braket job.
", + "smithy.api#timestampFormat": "date-time" + } + }, + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A message describing the event that occurred related to the Amazon Braket job.
", + "smithy.api#length": { + "min": 0, + "max": 2500 + } + } + } + }, + "traits": { + "smithy.api#documentation": "Details about the type and time events occurred related to the Amazon Braket job.
" + } + }, + "com.amazonaws.braket#JobEventType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "WAITING_FOR_PRIORITY", + "name": "WAITING_FOR_PRIORITY" + }, + { + "value": "QUEUED_FOR_EXECUTION", + "name": "QUEUED_FOR_EXECUTION" + }, + { + "value": "STARTING_INSTANCE", + "name": "STARTING_INSTANCE" + }, + { + "value": "DOWNLOADING_DATA", + "name": "DOWNLOADING_DATA" + }, + { + "value": "RUNNING", + "name": "RUNNING" + }, + { + "value": "DEPRIORITIZED_DUE_TO_INACTIVITY", + "name": "DEPRIORITIZED_DUE_TO_INACTIVITY" + }, + { + "value": "UPLOADING_RESULTS", + "name": "UPLOADING_RESULTS" + }, + { + "value": "COMPLETED", + "name": "COMPLETED" + }, + { + "value": "FAILED", + "name": "FAILED" + }, + { + "value": "MAX_RUNTIME_EXCEEDED", + "name": "MAX_RUNTIME_EXCEEDED" + }, + { + "value": "CANCELLED", + "name": "CANCELLED" + } + ] + } + }, + "com.amazonaws.braket#JobEvents": { + "type": "list", + "member": { + "target": "com.amazonaws.braket#JobEventDetails" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 20 + } + } + }, + "com.amazonaws.braket#JobOutputDataConfig": { + "type": "structure", + "members": { + "kmsKeyId": { + "target": "com.amazonaws.braket#String2048", + "traits": { + "smithy.api#documentation": "The AWS Key Management Service (AWS KMS) key that Amazon Braket uses to encrypt the\n job training artifacts at rest using Amazon S3 server-side encryption.
" + } + }, + "s3Path": { + "target": "com.amazonaws.braket#S3Path", + "traits": { + "smithy.api#documentation": "Identifies the S3 path where you want Amazon Braket to store the job training artifacts. For\n example, s3://bucket-name/key-name-prefix
.
Specifies the path to the S3 location where you want to store job artifacts and the\n encryption key used to store them.
" + } + }, + "com.amazonaws.braket#JobPrimaryStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "QUEUED", + "name": "QUEUED" + }, + { + "value": "RUNNING", + "name": "RUNNING" + }, + { + "value": "COMPLETED", + "name": "COMPLETED" + }, + { + "value": "FAILED", + "name": "FAILED" + }, + { + "value": "CANCELLING", + "name": "CANCELLING" + }, + { + "value": "CANCELLED", + "name": "CANCELLED" + } + ] + } + }, + "com.amazonaws.braket#JobResource": { + "type": "resource", + "identifiers": { + "jobArn": { + "target": "com.amazonaws.braket#JobArn" + } + }, + "create": { + "target": "com.amazonaws.braket#CreateJob" + }, + "read": { + "target": "com.amazonaws.braket#GetJob" + }, + "update": { + "target": "com.amazonaws.braket#CancelJob" + }, + "collectionOperations": [ + { + "target": "com.amazonaws.braket#SearchJobs" + } + ], + "traits": { + "aws.api#arn": { + "template": "{jobArn}", + "absolute": true, + "noAccount": false, + "noRegion": false + } + } + }, + "com.amazonaws.braket#JobStoppingCondition": { + "type": "structure", + "members": { + "maxRuntimeInSeconds": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The maximum length of time, in seconds, that an Amazon Braket job can run.
", + "smithy.api#range": { + "min": 1, + "max": 432000 + } + } + } + }, + "traits": { + "smithy.api#documentation": "Specifies limits for how long an Amazon Braket job can run.
" + } + }, + "com.amazonaws.braket#JobSummary": { + "type": "structure", + "members": { + "status": { + "target": "com.amazonaws.braket#JobPrimaryStatus", + "traits": { + "smithy.api#documentation": "The status of the Amazon Braket job.
", "smithy.api#required": {} } }, - "shots": { - "target": "smithy.api#Long", + "jobArn": { + "target": "com.amazonaws.braket#JobArn", "traits": { - "smithy.api#documentation": "The number of shots used in the task.
", + "smithy.api#documentation": "The ARN of the Amazon Braket job.
", "smithy.api#required": {} } }, - "outputS3Bucket": { + "jobName": { "target": "smithy.api#String", "traits": { - "smithy.api#documentation": "The S3 bucket where task results are stored.
", + "smithy.api#documentation": "The name of the Amazon Braket job.
", "smithy.api#required": {} } }, - "outputS3Directory": { - "target": "smithy.api#String", + "device": { + "target": "com.amazonaws.braket#String256", "traits": { - "smithy.api#documentation": "The folder in the S3 bucket where task results are stored.
", + "smithy.api#documentation": "Provides summary information about the primary device used by an Amazon Braket job.
", "smithy.api#required": {} } }, "createdAt": { "target": "smithy.api#Timestamp", "traits": { - "smithy.api#documentation": "The time at which the task was created.
", + "smithy.api#documentation": "The date and time that the Amazon Braket job was created.
", "smithy.api#required": {}, "smithy.api#timestampFormat": "date-time" } }, + "startedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that the Amazon Braket job was started.
", + "smithy.api#timestampFormat": "date-time" + } + }, "endedAt": { "target": "smithy.api#Timestamp", "traits": { - "smithy.api#documentation": "The time at which the task ended.
", + "smithy.api#documentation": "The date and time that the Amazon Braket job ended.
", "smithy.api#timestampFormat": "date-time" } }, "tags": { "target": "com.amazonaws.braket#TagsMap", "traits": { - "smithy.api#documentation": "The tags that belong to this task.
" + "smithy.api#documentation": "A tag object that consists of a key and an optional value, used to manage metadata for Amazon Braket resources.
" } } - } - }, - "com.amazonaws.braket#InternalServiceException": { - "type": "structure", - "members": { - "message": { - "target": "smithy.api#String" - } }, "traits": { - "smithy.api#documentation": "The request processing has failed because of an unknown error, exception, or failure.
", - "smithy.api#error": "server", - "smithy.api#httpError": 500 + "smithy.api#documentation": "Provides summary information about an Amazon Braket job.
" } }, - "com.amazonaws.braket#JobArn": { - "type": "string", - "traits": { - "smithy.api#pattern": "^arn:aws[a-z\\-]*:braket:[a-z0-9\\-]*:[0-9]{12}:job/.*$" + "com.amazonaws.braket#JobSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.braket#JobSummary" } }, - "com.amazonaws.braket#JobResource": { - "type": "resource", - "identifiers": { - "jobArn": { - "target": "com.amazonaws.braket#JobArn" - } - }, + "com.amazonaws.braket#JobToken": { + "type": "string", "traits": { - "aws.api#arn": { - "template": "{jobArn}", - "absolute": true, - "noAccount": false, - "noRegion": false + "smithy.api#length": { + "min": 1, + "max": 128 } } }, @@ -937,6 +1951,64 @@ "smithy.api#httpError": 404 } }, + "com.amazonaws.braket#RoleArn": { + "type": "string", + "traits": { + "smithy.api#pattern": "^arn:aws[a-z\\-]*:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+$" + } + }, + "com.amazonaws.braket#S3DataSource": { + "type": "structure", + "members": { + "s3Uri": { + "target": "com.amazonaws.braket#S3Path", + "traits": { + "smithy.api#documentation": "Depending on the value specified for the S3DataType
, identifies either a\n key name prefix or a manifest that locates the S3 data source.
Information about the data stored in Amazon S3 used by the Amazon Braket job.
" + } + }, + "com.amazonaws.braket#S3Path": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 1024 + }, + "smithy.api#pattern": "^(https|s3)://([^/]+)/?(.*)$" + } + }, + "com.amazonaws.braket#ScriptModeConfig": { + "type": "structure", + "members": { + "entryPoint": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The path to the Python script that serves as the entry point for an Amazon Braket\n job.
", + "smithy.api#required": {} + } + }, + "s3Uri": { + "target": "com.amazonaws.braket#S3Path", + "traits": { + "smithy.api#documentation": "The URI that specifies the S3 path to the Python script module that contains the\n training script used by an Amazon Braket job.
", + "smithy.api#required": {} + } + }, + "compressionType": { + "target": "com.amazonaws.braket#CompressionType", + "traits": { + "smithy.api#documentation": "The type of compression used by the Python scripts for an Amazon Braket job.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Contains information about the Python scripts used for entry and by an Amazon Braket job.
" + } + }, "com.amazonaws.braket#SearchDevices": { "type": "operation", "input": { @@ -1061,6 +2133,167 @@ } } }, + "com.amazonaws.braket#SearchJobs": { + "type": "operation", + "input": { + "target": "com.amazonaws.braket#SearchJobsRequest" + }, + "output": { + "target": "com.amazonaws.braket#SearchJobsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.braket#AccessDeniedException" + }, + { + "target": "com.amazonaws.braket#InternalServiceException" + }, + { + "target": "com.amazonaws.braket#ThrottlingException" + }, + { + "target": "com.amazonaws.braket#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Searches for Amazon Braket jobs that match the specified filter values.
", + "smithy.api#http": { + "method": "POST", + "uri": "/jobs", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "jobs", + "pageSize": "maxResults" + } + } + }, + "com.amazonaws.braket#SearchJobsFilter": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.braket#String64", + "traits": { + "smithy.api#documentation": "The name to use for the jobs filter.
", + "smithy.api#required": {} + } + }, + "values": { + "target": "com.amazonaws.braket#String256List", + "traits": { + "smithy.api#documentation": "The values to use for the jobs filter.
", + "smithy.api#length": { + "min": 1, + "max": 10 + }, + "smithy.api#required": {} + } + }, + "operator": { + "target": "com.amazonaws.braket#SearchJobsFilterOperator", + "traits": { + "smithy.api#documentation": "An operator to use for the jobs filter.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A filter used to search for Amazon Braket jobs.
" + } + }, + "com.amazonaws.braket#SearchJobsFilterList": { + "type": "list", + "member": { + "target": "com.amazonaws.braket#SearchJobsFilter" + } + }, + "com.amazonaws.braket#SearchJobsFilterOperator": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "LT", + "name": "LT" + }, + { + "value": "LTE", + "name": "LTE" + }, + { + "value": "EQUAL", + "name": "EQUAL" + }, + { + "value": "GT", + "name": "GT" + }, + { + "value": "GTE", + "name": "GTE" + }, + { + "value": "BETWEEN", + "name": "BETWEEN" + }, + { + "value": "CONTAINS", + "name": "CONTAINS" + } + ] + } + }, + "com.amazonaws.braket#SearchJobsRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A token used for pagination of results returned in the response. Use the token returned\n from the previous request to continue results where the previous request ended.
" + } + }, + "maxResults": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The maximum number of results to return in the response.
", + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "filters": { + "target": "com.amazonaws.braket#SearchJobsFilterList", + "traits": { + "smithy.api#documentation": "The filter values to use when searching for a job.
", + "smithy.api#length": { + "min": 0, + "max": 10 + }, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.braket#SearchJobsResponse": { + "type": "structure", + "members": { + "jobs": { + "target": "com.amazonaws.braket#JobSummaryList", + "traits": { + "smithy.api#documentation": "An array of JobSummary
objects for devices that match the specified filter\n values.
A token used for pagination of results, or null
if there are no additional results. Use\n the token value in a subsequent request to continue results where the previous request\n ended.
Makes echo reduction available to clients who connect to the meeting.
" + } + } + }, + "traits": { + "smithy.api#documentation": "An optional category of meeting features that contains audio-specific configurations, such as operating parameters for Amazon Voice Focus.
" + } + }, "com.amazonaws.chimesdkmeetings#BadRequestException": { "type": "structure", "members": { @@ -191,7 +205,7 @@ "name": "chime" }, "aws.protocols#restJson1": {}, - "smithy.api#documentation": "The Amazon Chime SDK meetings APIs in this section allow software developers to create Amazon Chime SDK meetings, set the AWS Regions for meetings, create and manage users, and send and \n receive meeting notifications.
", + "smithy.api#documentation": "The Amazon Chime SDK meetings APIs in this section allow software developers to create Amazon Chime SDK meetings, set the AWS Regions for meetings, create and manage users, and send and \n receive meeting notifications. For more information \n about the meeting APIs, see Amazon Chime SDK meetings.
", "smithy.api#title": "Amazon Chime SDK Meetings" }, "version": "2021-07-15", @@ -433,6 +447,12 @@ "traits": { "smithy.api#documentation": "The configuration for resource targets to receive notifications when meeting and attendee events occur.
" } + }, + "MeetingFeatures": { + "target": "com.amazonaws.chimesdkmeetings#MeetingFeaturesConfiguration", + "traits": { + "smithy.api#documentation": "Lists the audio and video features enabled for a meeting, such as echo reduction.
" + } } } }, @@ -509,6 +529,12 @@ "smithy.api#required": {} } }, + "MeetingFeatures": { + "target": "com.amazonaws.chimesdkmeetings#MeetingFeaturesConfiguration", + "traits": { + "smithy.api#documentation": "Lists the audio and video features enabled for a meeting, such as echo reduction.
" + } + }, "NotificationsConfiguration": { "target": "com.amazonaws.chimesdkmeetings#NotificationsConfiguration", "traits": { @@ -733,19 +759,19 @@ "ContentIdentificationType": { "target": "com.amazonaws.chimesdkmeetings#TranscribeContentIdentificationType", "traits": { - "smithy.api#documentation": "Set this field to PII
to identify personal health information in the transcription output.
Set this field to PII
to identify personally identifiable information in the transcription output.
Set this field to PII
to redact personally identifiable information in the transcription output. Content redaction is performed only upon complete transcription of the audio segments.
You can’t set both ContentRedactionType
and ContentIdentificationType
in the same request. If you set both, your request returns a BadRequestException
.
Set this field to PII
to redact personally identifiable information in the transcription output. Content redaction is performed only upon complete transcription of the audio segments.
You can’t set ContentRedactionType
and ContentIdentificationType
in the same request. If you set both, your request returns a BadRequestException
.
Lists the PII entity types you want to identify or redact. To specify entity types, you must enable ContentIdentificationType
or ContentRedactionType
.
\n PIIEntityTypes
must be comma-separated. The available values are: \n BANK_ACCOUNT_NUMBER
, BANK_ROUTING, CREDIT_DEBIT_NUMBER
, CREDIT_DEBIT_CVV
, CREDIT_DEBIT_EXPIRY
, PIN
, EMAIL
, \n ADDRESS
, NAME
, PHONE
, SSN
, and ALL
.
\n PiiEntityTypes
is an optional parameter with a default value of ALL
.
Lists the PII entity types you want to identify or redact. To specify entity types, you must enable ContentIdentificationType
or ContentRedactionType
.
PIIEntityTypes must be comma-separated. The available values are: \n BANK_ACCOUNT_NUMBER
, BANK_ROUTING, CREDIT_DEBIT_NUMBER
, CREDIT_DEBIT_CVV
, CREDIT_DEBIT_EXPIRY
, PIN
, EMAIL
, \n ADDRESS
, NAME
, PHONE
, SSN
, and ALL
.
\n PiiEntityTypes
is an optional parameter with a default value of ALL
.
The media placement for the meeting.
" } + }, + "MeetingFeatures": { + "target": "com.amazonaws.chimesdkmeetings#MeetingFeaturesConfiguration", + "traits": { + "smithy.api#documentation": "The features available to a meeting, such as Amazon Voice Focus.
" + } } }, "traits": { "smithy.api#documentation": "A meeting created using the Amazon Chime SDK.
" } }, + "com.amazonaws.chimesdkmeetings#MeetingFeatureStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "AVAILABLE", + "name": "AVAILABLE" + }, + { + "value": "UNAVAILABLE", + "name": "UNAVAILABLE" + } + ] + } + }, + "com.amazonaws.chimesdkmeetings#MeetingFeaturesConfiguration": { + "type": "structure", + "members": { + "Audio": { + "target": "com.amazonaws.chimesdkmeetings#AudioFeatures", + "traits": { + "smithy.api#documentation": "The configuration settings for the audio features available to a meeting.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The configuration settings of the features available to a meeting.
" + } + }, "com.amazonaws.chimesdkmeetings#NotFoundException": { "type": "structure", "members": { diff --git a/codegen/sdk-codegen/aws-models/cloudformation.2010-05-15.json b/codegen/sdk-codegen/aws-models/cloudformation.2010-05-15.json index 8b84f83cd76..71c44d2c7d4 100644 --- a/codegen/sdk-codegen/aws-models/cloudformation.2010-05-15.json +++ b/codegen/sdk-codegen/aws-models/cloudformation.2010-05-15.json @@ -47,18 +47,18 @@ "Status": { "target": "com.amazonaws.cloudformation#AccountGateStatus", "traits": { - "smithy.api#documentation": "The status of the account gate function.
\n\n SUCCEEDED
: The account gate function has determined that the\n account and Region passes any requirements for a stack set operation to occur.\n CloudFormation proceeds with the stack operation in that account and Region.\n
\n FAILED
: The account gate function has determined that the account\n and Region does not meet the requirements for a stack set operation to occur. AWS\n CloudFormation cancels the stack set operation in that account and Region, and sets\n the stack set operation result status for that account and Region to\n FAILED
.
\n SKIPPED
: CloudFormation has skipped calling the account gate\n function for this account and Region, for one of the following reasons:
An account gate function has not been specified for the account and\n Region. CloudFormation proceeds with the stack set operation in this\n account and Region.
\nThe AWSCloudFormationStackSetExecutionRole
of the stack set\n adminstration account lacks permissions to invoke the function.\n CloudFormation proceeds with the stack set operation in this account and\n Region.
Either no action is necessary, or no action is possible, on the stack.\n CloudFormation skips the stack set operation in this account and\n Region.
\nThe status of the account gate function.
\n\n SUCCEEDED
: The account gate function has determined that the account\n and Region passes any requirements for a stack set operation to occur. CloudFormation proceeds with the stack operation in that account and Region.\n
\n FAILED
: The account gate function has determined that the account and\n Region does not meet the requirements for a stack set operation to occur. AWS CloudFormation cancels the stack set operation in that account and Region, and\n sets the stack set operation result status for that account and Region to\n FAILED
.
\n SKIPPED
: CloudFormation has skipped calling the account gate\n function for this account and Region, for one of the following reasons:
An account gate function has not been specified for the account and Region.\n CloudFormation proceeds with the stack set operation in this account\n and Region.
\nThe AWSCloudFormationStackSetExecutionRole
of the stack set\n adminstration account lacks permissions to invoke the function. CloudFormation proceeds with the stack set operation in this account and\n Region.
Either no action is necessary, or no action is possible, on the stack.\n CloudFormation skips the stack set operation in this account and\n Region.
\nThe reason for the account gate status assigned to this account and Region for the\n stack set operation.
" + "smithy.api#documentation": "The reason for the account gate status assigned to this account and Region for the stack\n set operation.
" } } }, "traits": { - "smithy.api#documentation": "Structure that contains the results of the account gate function which CloudFormation invokes, if present, before proceeding with a stack set operation in an\n account and Region.
\nFor each account and Region, CloudFormation lets you specify a Lambda\n function that encapsulates any requirements that must be met before CloudFormation\n can proceed with a stack set operation in that account and Region. CloudFormation\n invokes the function each time a stack set operation is requested for that account and\n Region; if the function returns FAILED
, CloudFormation cancels the\n operation in that account and Region, and sets the stack set operation result status for\n that account and Region to FAILED
.
For more information, see Configuring a\n target account gate.
" + "smithy.api#documentation": "Structure that contains the results of the account gate function which CloudFormation invokes, if present, before proceeding with a stack set operation in an\n account and Region.
\nFor each account and Region, CloudFormation lets you specify a Lambda function\n that encapsulates any requirements that must be met before CloudFormation can\n proceed with a stack set operation in that account and Region. CloudFormation\n invokes the function each time a stack set operation is requested for that account and\n Region; if the function returns FAILED
, CloudFormation cancels the\n operation in that account and Region, and sets the stack set operation result status for\n that account and Region to FAILED
.
For more information, see Configuring a\n target account gate.
" } }, "com.amazonaws.cloudformation#AccountGateStatus": { @@ -423,7 +423,7 @@ } ], "traits": { - "smithy.api#documentation": "Cancels an update on the specified stack. If the call completes successfully, the\n stack rolls back the update and reverts to the previous stack configuration.
\nYou can cancel only stacks that are in the UPDATE_IN_PROGRESS state.
\nCancels an update on the specified stack. If the call completes successfully, the stack\n rolls back the update and reverts to the previous stack configuration.
\nYou can cancel only stacks that are in the UPDATE_IN_PROGRESS state.
\nA unique identifier for this CancelUpdateStack
request. Specify this\n token if you plan to retry requests so that CloudFormation knows that you're not\n attempting to cancel an update on a stack with the same name. You might retry\n CancelUpdateStack
requests to ensure that CloudFormation successfully\n received them.
A unique identifier for this CancelUpdateStack
request. Specify this token\n if you plan to retry requests so that CloudFormation knows that you're not\n attempting to cancel an update on a stack with the same name. You might retry\n CancelUpdateStack
requests to ensure that CloudFormation\n successfully received them.
A ResourceChange
structure that describes the resource and action that\n CloudFormation will perform.
A ResourceChange
structure that describes the resource and action that\n CloudFormation will perform.
The specified change set name or ID doesn't exit. To view valid change sets for a\n stack, use the ListChangeSets
action.
The specified change set name or ID doesn't exit. To view valid change sets for a stack,\n use the ListChangeSets
action.
If the change set execution status is AVAILABLE
, you can execute the\n change set. If you can’t execute the change set, the status indicates why. For example, a\n change set might be in an UNAVAILABLE
state because CloudFormation is\n still creating it or in an OBSOLETE
state because the stack was already\n updated.
If the change set execution status is AVAILABLE
, you can execute the change\n set. If you can’t execute the change set, the status indicates why. For example, a change\n set might be in an UNAVAILABLE
state because CloudFormation is still\n creating it or in an OBSOLETE
state because the stack was already\n updated.
The ChangeSetSummary
structure describes a change set, its status, and\n the stack with which it's associated.
The ChangeSetSummary
structure describes a change set, its status, and the\n stack with which it's associated.
CloudFormation allows you to create and manage Amazon Web Services infrastructure deployments\n predictably and repeatedly. You can use CloudFormation to leverage Amazon Web Services products, such\n as Amazon Elastic Compute Cloud, Amazon Elastic Block Store, Amazon Simple Notification\n Service, Elastic Load Balancing, and Auto Scaling to build highly-reliable, highly\n scalable, cost-effective applications without creating or configuring the underlying Amazon Web Services\n infrastructure.
\nWith CloudFormation, you declare all of your resources and dependencies in a\n template file. The template defines a collection of resources as a single unit called a\n stack. CloudFormation creates and deletes all member resources of the stack together\n and manages all dependencies between the resources for you.
\nFor more information about CloudFormation, see the CloudFormation Product Page.
\nCloudFormation makes use of other Amazon Web Services products. If you need additional\n technical information about a specific Amazon Web Services product, you can find the product's technical\n documentation at \n docs.aws.amazon.com
\n .
CloudFormation allows you to create and manage Amazon Web Services infrastructure\n deployments predictably and repeatedly. You can use CloudFormation to leverage\n Amazon Web Services products, such as Amazon Elastic Compute Cloud, Amazon Elastic Block\n Store, Amazon Simple Notification Service, Elastic Load Balancing, and Auto Scaling to\n build highly-reliable, highly scalable, cost-effective applications without creating or\n configuring the underlying Amazon Web Services infrastructure.
\nWith CloudFormation, you declare all of your resources and dependencies in a\n template file. The template defines a collection of resources as a single unit called a\n stack. CloudFormation creates and deletes all member resources of the stack\n together and manages all dependencies between the resources for you.
\nFor more information about CloudFormation, see the CloudFormation Product Page.
\nCloudFormation makes use of other Amazon Web Services products. If you need\n additional technical information about a specific Amazon Web Services product, you can find\n the product's technical documentation at \n docs.aws.amazon.com
\n .
For a specified stack that is in the UPDATE_ROLLBACK_FAILED
state,\n continues rolling it back to the UPDATE_ROLLBACK_COMPLETE
state. Depending on\n the cause of the failure, you can manually fix the error and continue the rollback. By continuing the rollback, you can\n return your stack to a working state (the UPDATE_ROLLBACK_COMPLETE
state), and\n then try to update the stack again.
A stack goes into the UPDATE_ROLLBACK_FAILED
state when\n CloudFormation cannot roll back all changes after a failed stack update. For example, you\n might have a stack that is rolling back to an old database instance that was deleted\n outside of CloudFormation. Because CloudFormation doesn't know the database was\n deleted, it assumes that the database instance still exists and attempts to roll back to\n it, causing the update rollback to fail.
For a specified stack that is in the UPDATE_ROLLBACK_FAILED
state,\n continues rolling it back to the UPDATE_ROLLBACK_COMPLETE
state. Depending on\n the cause of the failure, you can manually fix the error and continue the rollback. By continuing the rollback, you can\n return your stack to a working state (the UPDATE_ROLLBACK_COMPLETE
state), and\n then try to update the stack again.
A stack goes into the UPDATE_ROLLBACK_FAILED
state when CloudFormation cannot roll back all changes after a failed stack update. For example,\n you might have a stack that is rolling back to an old database instance that was deleted\n outside of CloudFormation. Because CloudFormation doesn't know the database\n was deleted, it assumes that the database instance still exists and attempts to roll back\n to it, causing the update rollback to fail.
The name or the unique ID of the stack that you want to continue rolling\n back.
\nDon't specify the name of a nested stack (a stack that was created by using the\n AWS::CloudFormation::Stack
resource). Instead, use this operation on the\n parent stack (the stack that contains the AWS::CloudFormation::Stack
\n resource).
The name or the unique ID of the stack that you want to continue rolling back.
\nDon't specify the name of a nested stack (a stack that was created by using the\n AWS::CloudFormation::Stack
resource). Instead, use this operation on the\n parent stack (the stack that contains the AWS::CloudFormation::Stack
\n resource).
The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role\n that CloudFormation assumes to roll back the stack. CloudFormation uses the role's\n credentials to make calls on your behalf. CloudFormation always uses this role for all\n future operations on the stack. As long as users have permission to operate on the stack,\n CloudFormation uses this role even if the users don't have permission to pass it.\n Ensure that the role grants least privilege.
\nIf you don't specify a value, CloudFormation uses the role that was previously\n associated with the stack. If no role is available, CloudFormation uses a temporary\n session that is generated from your user credentials.
" + "smithy.api#documentation": "The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role that CloudFormation assumes to roll back the stack. CloudFormation uses the role's\n credentials to make calls on your behalf. CloudFormation always uses this role for\n all future operations on the stack. As long as users have permission to operate on the\n stack, CloudFormation uses this role even if the users don't have permission to\n pass it. Ensure that the role grants least privilege.
\nIf you don't specify a value, CloudFormation uses the role that was previously\n associated with the stack. If no role is available, CloudFormation uses a temporary\n session that is generated from your user credentials.
" } }, "ResourcesToSkip": { @@ -1085,7 +1085,7 @@ "ClientRequestToken": { "target": "com.amazonaws.cloudformation#ClientRequestToken", "traits": { - "smithy.api#documentation": "A unique identifier for this ContinueUpdateRollback
request. Specify\n this token if you plan to retry requests so that CloudFormationknows that you're not\n attempting to continue the rollback to a stack with the same name. You might retry\n ContinueUpdateRollback
requests to ensure that CloudFormation\n successfully received them.
A unique identifier for this ContinueUpdateRollback
request. Specify this\n token if you plan to retry requests so that CloudFormationknows that you're not\n attempting to continue the rollback to a stack with the same name. You might retry\n ContinueUpdateRollback
requests to ensure that CloudFormation\n successfully received them.
Creates a list of changes that will be applied to a stack so that you can review the\n changes before executing them. You can create a change set for a stack that doesn't exist\n or an existing stack. If you create a change set for a stack that doesn't exist, the change\n set shows all of the resources that CloudFormation will create. If you create a change\n set for an existing stack, CloudFormation compares the stack's information with the\n information that you submit in the change set and lists the differences. Use change sets to\n understand which resources CloudFormation will create or change, and how it will change\n resources in an existing stack, before you create or update a stack.
\nTo create a change set for a stack that doesn't exist, for the\n ChangeSetType
parameter, specify CREATE
. To create a change\n set for an existing stack, specify UPDATE
for the ChangeSetType
\n parameter. To create a change set for an import operation, specify IMPORT
for\n the ChangeSetType
parameter. After the CreateChangeSet
call\n successfully completes, CloudFormation starts creating the change set. To check the\n status of the change set or to review it, use the DescribeChangeSet\n action.
When you are satisfied with the changes the change set will make, execute the change\n set by using the ExecuteChangeSet action. CloudFormation doesn't make\n changes until you execute the change set.
\nTo create a change set for the entire stack hierachy, set\n IncludeNestedStacks
to True
.
Creates a list of changes that will be applied to a stack so that you can review the\n changes before executing them. You can create a change set for a stack that doesn't exist\n or an existing stack. If you create a change set for a stack that doesn't exist, the change\n set shows all of the resources that CloudFormation will create. If you create a\n change set for an existing stack, CloudFormation compares the stack's information\n with the information that you submit in the change set and lists the differences. Use\n change sets to understand which resources CloudFormation will create or change, and\n how it will change resources in an existing stack, before you create or update a\n stack.
\nTo create a change set for a stack that doesn't exist, for the\n ChangeSetType
parameter, specify CREATE
. To create a change\n set for an existing stack, specify UPDATE
for the ChangeSetType
\n parameter. To create a change set for an import operation, specify IMPORT
for\n the ChangeSetType
parameter. After the CreateChangeSet
call\n successfully completes, CloudFormation starts creating the change set. To check the\n status of the change set or to review it, use the DescribeChangeSet\n action.
When you are satisfied with the changes the change set will make, execute the change set\n by using the ExecuteChangeSet action. CloudFormation doesn't make\n changes until you execute the change set.
\nTo create a change set for the entire stack hierachy, set\n IncludeNestedStacks
to True
.
The name or the unique ID of the stack for which you are creating a change set.\n CloudFormation generates the change set by comparing this stack's information with the\n information that you submit, such as a modified template or different parameter input\n values.
", + "smithy.api#documentation": "The name or the unique ID of the stack for which you are creating a change set. CloudFormation generates the change set by comparing this stack's information with the\n information that you submit, such as a modified template or different parameter input\n values.
", "smithy.api#required": {} } }, "TemplateBody": { "target": "com.amazonaws.cloudformation#TemplateBody", "traits": { - "smithy.api#documentation": "A structure that contains the body of the revised template, with a minimum length of\n 1 byte and a maximum length of 51,200 bytes. CloudFormation generates the change set by\n comparing this template with the template of the stack that you specified.
\nConditional: You must specify only TemplateBody
or\n TemplateURL
.
A structure that contains the body of the revised template, with a minimum length of 1\n byte and a maximum length of 51,200 bytes. CloudFormation generates the change set\n by comparing this template with the template of the stack that you specified.
\nConditional: You must specify only TemplateBody
or\n TemplateURL
.
The location of the file that contains the revised template. The URL must point to a\n template (max size: 460,800 bytes) that is located in an S3 bucket or a Systems Manager\n document. CloudFormation generates the change set by comparing this template with the\n stack that you specified.
\nConditional: You must specify only TemplateBody
or\n TemplateURL
.
The location of the file that contains the revised template. The URL must point to a\n template (max size: 460,800 bytes) that is located in an S3 bucket or a Systems Manager\n document. CloudFormation generates the change set by comparing this template with\n the stack that you specified.
\nConditional: You must specify only TemplateBody
or\n TemplateURL
.
A list of Parameter
structures that specify input parameters for the\n change set. For more information, see the Parameter data type.
A list of Parameter
structures that specify input parameters for the change\n set. For more information, see the Parameter data type.
In some cases, you must explicitly acknowledge that your stack template contains certain\n capabilities in order for CloudFormation to create the stack.
\n\n CAPABILITY_IAM
and CAPABILITY_NAMED_IAM
\n
Some stack templates might include resources that can affect permissions in\n your Amazon Web Services account; for example, by creating new Identity and Access Management\n (IAM) users. For those stacks, you must explicitly acknowledge this by specifying one\n of these capabilities.
\nThe following IAM resources require you to specify either the\n CAPABILITY_IAM
or CAPABILITY_NAMED_IAM
\n capability.
If you have IAM resources, you can specify either\n capability.
\nIf you have IAM resources with custom names, you\n must specify CAPABILITY_NAMED_IAM
.
If you don't specify either of these capabilities, CloudFormation returns an\n InsufficientCapabilities
error.
If your stack template contains these resources, we recommend that you review\n all permissions associated with them and edit their permissions if\n necessary.
\n\n \n AWS::IAM::Group\n
\n\n \n AWS::IAM::Policy\n
\n\n \n AWS::IAM::Role\n
\n\n \n AWS::IAM::User\n
\nFor more information, see Acknowledging IAM\n Resources in CloudFormation Templates.
\n\n CAPABILITY_AUTO_EXPAND
\n
Some template contain macros. Macros perform custom processing on templates; this\n can include simple actions like find-and-replace operations, all the way to extensive\n transformations of entire templates. Because of this, users typically create a change\n set from the processed template, so that they can review the changes resulting from\n the macros before actually creating the stack. If your stack template contains one or\n more macros, and you choose to create a stack directly from the processed template,\n without first reviewing the resulting changes in a change set, you must acknowledge\n this capability. This includes the AWS::Include and AWS::Serverless transforms, which are macros hosted by CloudFormation.
\nThis capacity does not apply to creating change sets, and specifying it when\n creating change sets has no effect.
\nIf you want to create a stack from a stack template that contains macros\n and nested stacks, you must create or update the stack\n directly from the template using the CreateStack or UpdateStack action, and specifying this capability.
\nFor more information on macros, see Using CloudFormation Macros to\n Perform Custom Processing on Templates.
\nIn some cases, you must explicitly acknowledge that your stack template contains certain\n capabilities in order for CloudFormation to create the stack.
\n\n CAPABILITY_IAM
and CAPABILITY_NAMED_IAM
\n
Some stack templates might include resources that can affect permissions in your\n Amazon Web Services account; for example, by creating new Identity and Access Management\n (IAM) users. For those stacks, you must explicitly acknowledge this by specifying one\n of these capabilities.
\nThe following IAM resources require you to specify either the\n CAPABILITY_IAM
or CAPABILITY_NAMED_IAM
\n capability.
If you have IAM resources, you can specify either\n capability.
\nIf you have IAM resources with custom names, you\n must specify CAPABILITY_NAMED_IAM
.
If you don't specify either of these capabilities, CloudFormation returns an\n InsufficientCapabilities
error.
If your stack template contains these resources, we recommend that you review all\n permissions associated with them and edit their permissions if necessary.
\n\n \n AWS::IAM::Group\n
\n\n \n AWS::IAM::Policy\n
\n\n \n AWS::IAM::Role\n
\n\n \n AWS::IAM::User\n
\nFor more information, see Acknowledging IAM\n Resources in CloudFormation Templates.
\n\n CAPABILITY_AUTO_EXPAND
\n
Some template contain macros. Macros perform custom processing on templates; this\n can include simple actions like find-and-replace operations, all the way to extensive\n transformations of entire templates. Because of this, users typically create a change\n set from the processed template, so that they can review the changes resulting from\n the macros before actually creating the stack. If your stack template contains one or\n more macros, and you choose to create a stack directly from the processed template,\n without first reviewing the resulting changes in a change set, you must acknowledge\n this capability. This includes the AWS::Include and AWS::Serverless transforms, which are macros hosted by CloudFormation.
\nThis capacity does not apply to creating change sets, and specifying it when\n creating change sets has no effect.
\nIf you want to create a stack from a stack template that contains macros\n and nested stacks, you must create or update the stack\n directly from the template using the CreateStack or UpdateStack action, and specifying this capability.
\nFor more information on macros, see Using CloudFormation Macros to\n Perform Custom Processing on Templates.
\nThe template resource types that you have permissions to work with if you execute\n this change set, such as AWS::EC2::Instance
, AWS::EC2::*
, or\n Custom::MyCustomInstance
.
If the list of resource types doesn't include a resource type that you're updating,\n the stack update fails. By default, CloudFormation grants permissions to all resource\n types. Identity and Access Management (IAM) uses this parameter for condition keys in\n IAM policies for CloudFormation. For more information, see Controlling Access with\n Identity and Access Management in the CloudFormation User\n Guide.
" + "smithy.api#documentation": "The template resource types that you have permissions to work with if you execute this\n change set, such as AWS::EC2::Instance
, AWS::EC2::*
, or\n Custom::MyCustomInstance
.
If the list of resource types doesn't include a resource type that you're updating, the\n stack update fails. By default, CloudFormation grants permissions to all resource\n types. Identity and Access Management (IAM) uses this parameter for condition keys in IAM policies\n for CloudFormation. For more information, see Controlling Access with\n Identity and Access Management in the CloudFormation User Guide.
" } }, "RoleARN": { "target": "com.amazonaws.cloudformation#RoleARN", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role\n that CloudFormation assumes when executing the change set. CloudFormation uses the\n role's credentials to make calls on your behalf. CloudFormation uses this role for all\n future operations on the stack. As long as users have permission to operate on the stack,\n CloudFormation uses this role even if the users don't have permission to pass it.\n Ensure that the role grants least privilege.
\nIf you don't specify a value, CloudFormation uses the role that was previously\n associated with the stack. If no role is available, CloudFormation uses a temporary\n session that is generated from your user credentials.
" + "smithy.api#documentation": "The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role\n that CloudFormation assumes when executing the change set. CloudFormation\n uses the role's credentials to make calls on your behalf. CloudFormation uses this\n role for all future operations on the stack. As long as users have permission to operate on\n the stack, CloudFormation uses this role even if the users don't have permission to\n pass it. Ensure that the role grants least privilege.
\nIf you don't specify a value, CloudFormation uses the role that was previously\n associated with the stack. If no role is available, CloudFormation uses a temporary\n session that is generated from your user credentials.
" } }, "RollbackConfiguration": { @@ -1196,14 +1196,14 @@ "ChangeSetName": { "target": "com.amazonaws.cloudformation#ChangeSetName", "traits": { - "smithy.api#documentation": "The name of the change set. The name must be unique among all change sets that are\n associated with the specified stack.
\nA change set name can contain only alphanumeric, case sensitive characters and\n hyphens. It must start with an alphabetic character and cannot exceed 128\n characters.
", + "smithy.api#documentation": "The name of the change set. The name must be unique among all change sets that are\n associated with the specified stack.
\nA change set name can contain only alphanumeric, case sensitive characters and hyphens.\n It must start with an alphabetic character and cannot exceed 128 characters.
", "smithy.api#required": {} } }, "ClientToken": { "target": "com.amazonaws.cloudformation#ClientToken", "traits": { - "smithy.api#documentation": "A unique identifier for this CreateChangeSet
request. Specify this token\n if you plan to retry requests so that CloudFormation knows that you're not attempting\n to create another change set with the same name. You might retry\n CreateChangeSet
requests to ensure that CloudFormation successfully\n received them.
A unique identifier for this CreateChangeSet
request. Specify this token if\n you plan to retry requests so that CloudFormation knows that you're not attempting\n to create another change set with the same name. You might retry\n CreateChangeSet
requests to ensure that CloudFormation successfully\n received them.
The type of change set operation. To create a change set for a new stack, specify\n CREATE
. To create a change set for an existing stack, specify\n UPDATE
. To create a change set for an import operation, specify\n IMPORT
.
If you create a change set for a new stack, CloudFormation creates a stack with a\n unique stack ID, but no template or resources. The stack will be in the \n REVIEW_IN_PROGRESS
\n state until you execute the change\n set.
By default, CloudFormation specifies UPDATE
. You can't use the\n UPDATE
type to create a change set for a new stack or the\n CREATE
type to create a change set for an existing stack.
The type of change set operation. To create a change set for a new stack, specify\n CREATE
. To create a change set for an existing stack, specify\n UPDATE
. To create a change set for an import operation, specify\n IMPORT
.
If you create a change set for a new stack, CloudFormation creates a stack with\n a unique stack ID, but no template or resources. The stack will be in the \n REVIEW_IN_PROGRESS
\n state until you execute the change\n set.
By default, CloudFormation specifies UPDATE
. You can't use the\n UPDATE
type to create a change set for a new stack or the\n CREATE
type to create a change set for an existing stack.
Creates a stack as specified in the template. After the call completes successfully,\n the stack creation starts. You can check the status of the stack via the DescribeStacks API.
" + "smithy.api#documentation": "Creates a stack as specified in the template. After the call completes successfully, the\n stack creation starts. You can check the status of the stack via the DescribeStacks API.
" } }, "com.amazonaws.cloudformation#CreateStackInput": { @@ -1306,13 +1306,13 @@ "Parameters": { "target": "com.amazonaws.cloudformation#Parameters", "traits": { - "smithy.api#documentation": "A list of Parameter
structures that specify input parameters for the\n stack. For more information, see the Parameter data\n type.
A list of Parameter
structures that specify input parameters for the stack.\n For more information, see the Parameter data\n type.
Set to true
to disable rollback of the stack if stack creation failed.\n You can specify either DisableRollback
or OnFailure
, but not\n both.
Default: false
\n
Set to true
to disable rollback of the stack if stack creation failed. You\n can specify either DisableRollback
or OnFailure
, but not\n both.
Default: false
\n
In some cases, you must explicitly acknowledge that your stack template contains certain\n capabilities in order for CloudFormation to create the stack.
\n\n CAPABILITY_IAM
and CAPABILITY_NAMED_IAM
\n
Some stack templates might include resources that can affect permissions in\n your Amazon Web Services account; for example, by creating new Identity and Access Management\n (IAM) users. For those stacks, you must explicitly acknowledge this by specifying one\n of these capabilities.
\nThe following IAM resources require you to specify either the\n CAPABILITY_IAM
or CAPABILITY_NAMED_IAM
\n capability.
If you have IAM resources, you can specify either capability.
\nIf you have IAM resources with custom names, you must\n specify CAPABILITY_NAMED_IAM
.
If you don't specify either of these capabilities, CloudFormation returns an\n InsufficientCapabilities
error.
If your stack template contains these resources, we recommend that you review\n all permissions associated with them and edit their permissions if\n necessary.
\n\n \n AWS::IAM::Group\n
\n\n \n AWS::IAM::Policy\n
\n\n \n AWS::IAM::Role\n
\n\n \n AWS::IAM::User\n
\nFor more information, see Acknowledging IAM\n Resources in CloudFormation Templates.
\n\n CAPABILITY_AUTO_EXPAND
\n
Some template contain macros. Macros perform custom processing on templates; this\n can include simple actions like find-and-replace operations, all the way to extensive\n transformations of entire templates. Because of this, users typically create a change\n set from the processed template, so that they can review the changes resulting from\n the macros before actually creating the stack. If your stack template contains one or\n more macros, and you choose to create a stack directly from the processed template,\n without first reviewing the resulting changes in a change set, you must acknowledge\n this capability. This includes the AWS::Include and AWS::Serverless transforms, which are macros hosted by CloudFormation.
\nIf you want to create a stack from a stack template that contains macros\n and nested stacks, you must create the stack directly from\n the template using this capability.
\nYou should only create stacks directly from a stack template that contains\n macros if you know what processing the macro performs.
\nEach macro relies on an underlying Lambda service function for processing stack\n templates. Be aware that the Lambda function owner can update the function\n operation without CloudFormation being notified.
\nFor more information, see Using\n CloudFormation Macros to Perform Custom Processing on\n Templates.
\nIn some cases, you must explicitly acknowledge that your stack template contains certain\n capabilities in order for CloudFormation to create the stack.
\n\n CAPABILITY_IAM
and CAPABILITY_NAMED_IAM
\n
Some stack templates might include resources that can affect permissions in your\n Amazon Web Services account; for example, by creating new Identity and Access Management\n (IAM) users. For those stacks, you must explicitly acknowledge this by specifying one\n of these capabilities.
\nThe following IAM resources require you to specify either the\n CAPABILITY_IAM
or CAPABILITY_NAMED_IAM
\n capability.
If you have IAM resources, you can specify either capability.
\nIf you have IAM resources with custom names, you must\n specify CAPABILITY_NAMED_IAM
.
If you don't specify either of these capabilities, CloudFormation returns an\n InsufficientCapabilities
error.
If your stack template contains these resources, we recommend that you review all\n permissions associated with them and edit their permissions if necessary.
\n\n \n AWS::IAM::Group\n
\n\n \n AWS::IAM::Policy\n
\n\n \n AWS::IAM::Role\n
\n\n \n AWS::IAM::User\n
\nFor more information, see Acknowledging IAM\n Resources in CloudFormation Templates.
\n\n CAPABILITY_AUTO_EXPAND
\n
Some template contain macros. Macros perform custom processing on templates; this\n can include simple actions like find-and-replace operations, all the way to extensive\n transformations of entire templates. Because of this, users typically create a change\n set from the processed template, so that they can review the changes resulting from\n the macros before actually creating the stack. If your stack template contains one or\n more macros, and you choose to create a stack directly from the processed template,\n without first reviewing the resulting changes in a change set, you must acknowledge\n this capability. This includes the AWS::Include and AWS::Serverless transforms, which are macros hosted by CloudFormation.
\nIf you want to create a stack from a stack template that contains macros\n and nested stacks, you must create the stack directly from\n the template using this capability.
\nYou should only create stacks directly from a stack template that contains\n macros if you know what processing the macro performs.
\nEach macro relies on an underlying Lambda service function for processing stack\n templates. Be aware that the Lambda function owner can update the function\n operation without CloudFormation being notified.
\nFor more information, see Using\n CloudFormation Macros to Perform Custom Processing on\n Templates.
\nThe template resource types that you have permissions to work with for this create\n stack action, such as AWS::EC2::Instance
, AWS::EC2::*
, or\n Custom::MyCustomInstance
. Use the following syntax to describe template\n resource types: AWS::*
(for all Amazon Web Services resources),\n Custom::*
(for all custom resources),\n Custom::logical_ID\n
(for a specific custom resource),\n AWS::service_name::*
(for all resources of a\n particular Amazon Web Services service), and\n AWS::service_name::resource_logical_ID\n
(for a specific Amazon Web Services resource).
If the list of resource types doesn't include a resource that you're creating, the\n stack creation fails. By default, CloudFormation grants permissions to all resource\n types. Identity and Access Management (IAM) uses this parameter for CloudFormation-specific condition keys in IAM policies. For more information, see Controlling Access with Identity and Access Management.
" + "smithy.api#documentation": "The template resource types that you have permissions to work with for this create stack\n action, such as AWS::EC2::Instance
, AWS::EC2::*
, or\n Custom::MyCustomInstance
. Use the following syntax to describe template\n resource types: AWS::*
(for all Amazon Web Services resources),\n Custom::*
(for all custom resources),\n Custom::logical_ID\n
(for a specific custom resource),\n AWS::service_name::*
(for all resources of a\n particular Amazon Web Services service), and\n AWS::service_name::resource_logical_ID\n
(for a specific Amazon Web Services resource).
If the list of resource types doesn't include a resource that you're creating, the stack\n creation fails. By default, CloudFormation grants permissions to all resource\n types. Identity and Access Management (IAM) uses this parameter for CloudFormation-specific\n condition keys in IAM policies. For more information, see Controlling Access with\n Identity and Access Management.
" } }, "RoleARN": { "target": "com.amazonaws.cloudformation#RoleARN", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role\n that CloudFormation assumes to create the stack. CloudFormation uses the role's\n credentials to make calls on your behalf. CloudFormation always uses this role for all\n future operations on the stack. As long as users have permission to operate on the stack,\n CloudFormation uses this role even if the users don't have permission to pass it.\n Ensure that the role grants least privilege.
\nIf you don't specify a value, CloudFormation uses the role that was previously\n associated with the stack. If no role is available, CloudFormation uses a temporary\n session that is generated from your user credentials.
" + "smithy.api#documentation": "The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role that CloudFormation assumes to create the stack. CloudFormation uses the role's\n credentials to make calls on your behalf. CloudFormation always uses this role for\n all future operations on the stack. As long as users have permission to operate on the\n stack, CloudFormation uses this role even if the users don't have permission to\n pass it. Ensure that the role grants least privilege.
\nIf you don't specify a value, CloudFormation uses the role that was previously\n associated with the stack. If no role is available, CloudFormation uses a temporary\n session that is generated from your user credentials.
" } }, "OnFailure": { @@ -1360,13 +1360,13 @@ "StackPolicyBody": { "target": "com.amazonaws.cloudformation#StackPolicyBody", "traits": { - "smithy.api#documentation": "Structure containing the stack policy body. For more information, go to Prevent Updates\n to Stack Resources in the CloudFormation User Guide.\n You can specify either the StackPolicyBody
or the StackPolicyURL
\n parameter, but not both.
Structure containing the stack policy body. For more information, go to Prevent Updates\n to Stack Resources in the CloudFormation User\n Guide. You can specify either the StackPolicyBody
or the\n StackPolicyURL
parameter, but not both.
Location of a file containing the stack policy. The URL must point to a policy\n (maximum size: 16 KB) located in an S3 bucket in the same\n Region as the stack. You can specify either the StackPolicyBody
or the\n StackPolicyURL
parameter, but not both.
Location of a file containing the stack policy. The URL must point to a policy (maximum\n size: 16 KB) located in an S3 bucket in the same Region as the stack. You can specify\n either the StackPolicyBody
or the StackPolicyURL
parameter, but\n not both.
A unique identifier for this CreateStack
request. Specify this token if\n you plan to retry requests so that CloudFormation knows that you're not attempting to\n create a stack with the same name. You might retry CreateStack
requests to\n ensure that CloudFormation successfully received them.
All events triggered by a given stack operation are assigned the same client request\n token, which you can use to track operations. For example, if you execute a\n CreateStack
operation with the token token1
, then all the\n StackEvents
generated by that operation will have\n ClientRequestToken
set as token1
.
In the console, stack operations display the client request token on the Events tab.\n Stack operations that are initiated from the console use the token format\n Console-StackOperation-ID, which helps you easily identify the\n stack operation . For example, if you create a stack using the console, each stack event\n would be assigned the same token in the following format:\n Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002
.
A unique identifier for this CreateStack
request. Specify this token if you\n plan to retry requests so that CloudFormation knows that you're not attempting to\n create a stack with the same name. You might retry CreateStack
requests to\n ensure that CloudFormation successfully received them.
All events triggered by a given stack operation are assigned the same client request\n token, which you can use to track operations. For example, if you execute a\n CreateStack
operation with the token token1
, then all the\n StackEvents
generated by that operation will have\n ClientRequestToken
set as token1
.
In the console, stack operations display the client request token on the Events tab.\n Stack operations that are initiated from the console use the token format\n Console-StackOperation-ID, which helps you easily identify the\n stack operation . For example, if you create a stack using the console, each stack event\n would be assigned the same token in the following format:\n Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002
.
Creates stack instances for the specified accounts, within the specified Regions. A\n stack instance refers to a stack in a specific account and Region. You must specify at least one value for either Accounts
or DeploymentTargets
, and you must specify at least one value for Regions
.
Creates stack instances for the specified accounts, within the specified Regions. A\n stack instance refers to a stack in a specific account and Region. You must specify at\n least one value for either Accounts
or DeploymentTargets
, and you\n must specify at least one value for Regions
.
[Self-managed permissions] The names of one or more Amazon Web Services accounts that you want to create stack instances in the\n specified Region(s) for.
\nYou can specify Accounts
or DeploymentTargets
, but not both.
[Self-managed permissions] The names of one or more Amazon Web Services accounts that you\n want to create stack instances in the specified Region(s) for.
\nYou can specify Accounts
or DeploymentTargets
, but not\n both.
A list of stack set parameters whose values you want to override in the selected\n stack instances.
\nAny overridden parameter values will be applied to all stack instances in the\n specified accounts and Regions. When specifying parameters and their values, be aware of\n how CloudFormation sets parameter values during stack instance operations:
\nTo override the current value for a parameter, include the parameter and\n specify its value.
\nTo leave an overridden parameter set to its present value, include the parameter and specify UsePreviousValue
as\n true
. (You cannot specify both a value and set\n UsePreviousValue
to true
.)
To set an overridden parameter back to the value specified in the stack set,\n specify a parameter list but do not include the parameter in the list.
\nTo leave all parameters set to their present values, do not specify this\n property at all.
\nDuring stack set updates, any parameter values overridden for a stack instance are\n not updated, but retain their overridden value.
\nYou can only override the parameter values that are specified in\n the stack set; to add or delete a parameter itself, use UpdateStackSet to update the stack set template.
" + "smithy.api#documentation": "A list of stack set parameters whose values you want to override in the selected stack\n instances.
\nAny overridden parameter values will be applied to all stack instances in the specified\n accounts and Regions. When specifying parameters and their values, be aware of how CloudFormation sets parameter values during stack instance operations:
\nTo override the current value for a parameter, include the parameter and specify\n its value.
\nTo leave an overridden parameter set to its present value, include the parameter\n and specify UsePreviousValue
as true
. (You cannot specify\n both a value and set UsePreviousValue
to true
.)
To set an overridden parameter back to the value specified in the stack set,\n specify a parameter list but do not include the parameter in the list.
\nTo leave all parameters set to their present values, do not specify this property\n at all.
\nDuring stack set updates, any parameter values overridden for a stack instance are not\n updated, but retain their overridden value.
\nYou can only override the parameter values that are specified in\n the stack set; to add or delete a parameter itself, use UpdateStackSet to update the stack set template.
" } }, "OperationPreferences": { @@ -1468,14 +1468,14 @@ "OperationId": { "target": "com.amazonaws.cloudformation#ClientRequestToken", "traits": { - "smithy.api#documentation": "The unique identifier for this stack set operation.
\nThe operation ID also functions as an idempotency token, to ensure that\n CloudFormation performs the stack set operation only once, even if you retry the request\n multiple times. You might retry stack set operation requests to ensure that\n CloudFormation successfully received them.
\nIf you don't specify an operation ID, the SDK generates one\n automatically.
\nRepeating this stack set operation with a new operation ID retries all stack instances\n whose status is OUTDATED
.
The unique identifier for this stack set operation.
\nThe operation ID also functions as an idempotency token, to ensure that CloudFormation performs the stack set operation only once, even if you retry the request\n multiple times. You might retry stack set operation requests to ensure that CloudFormation successfully received them.
\nIf you don't specify an operation ID, the SDK generates one\n automatically.
\nRepeating this stack set operation with a new operation ID retries all stack instances\n whose status is OUTDATED
.
[Service-managed permissions] Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account.
\nBy default, SELF
is specified. Use SELF
for stack sets with self-managed permissions.
If you are signed in to the management account, specify SELF
.
If you are signed in to a delegated administrator account, specify DELEGATED_ADMIN
.
Your Amazon Web Services account must be registered as a delegated administrator in the management account. For more information, see Register a delegated administrator in the CloudFormation User Guide.
\n[Service-managed permissions] Specifies whether you are acting as an account\n administrator in the organization's management account or as a delegated\n administrator in a member account.
\nBy default, SELF
is specified. Use SELF
for stack sets with\n self-managed permissions.
If you are signed in to the management account, specify\n SELF
.
If you are signed in to a delegated administrator account, specify\n DELEGATED_ADMIN
.
Your Amazon Web Services account must be registered as a delegated administrator in\n the management account. For more information, see Register a delegated administrator in the CloudFormation User Guide.
\nThe name to associate with the stack set. The name must be unique in the Region where\n you create your stack set.
\nA stack name can contain only alphanumeric characters (case-sensitive) and\n hyphens. It must start with an alphabetic character and can't be longer than 128\n characters.
\nThe name to associate with the stack set. The name must be unique in the Region where\n you create your stack set.
\nA stack name can contain only alphanumeric characters (case-sensitive) and hyphens.\n It must start with an alphabetic character and can't be longer than 128\n characters.
\nA description of the stack set. You can use the description to identify the stack\n set's purpose or other important information.
" + "smithy.api#documentation": "A description of the stack set. You can use the description to identify the stack set's\n purpose or other important information.
" } }, "TemplateBody": { "target": "com.amazonaws.cloudformation#TemplateBody", "traits": { - "smithy.api#documentation": "The structure that contains the template body, with a minimum length of 1 byte and a\n maximum length of 51,200 bytes. For more information, see Template Anatomy\n in the CloudFormation User Guide.
\nConditional: You must specify either the TemplateBody or the TemplateURL parameter,\n but not both.
" + "smithy.api#documentation": "The structure that contains the template body, with a minimum length of 1 byte and a\n maximum length of 51,200 bytes. For more information, see Template Anatomy\n in the CloudFormation User Guide.
\nConditional: You must specify either the TemplateBody or the TemplateURL parameter, but\n not both.
" } }, "TemplateURL": { "target": "com.amazonaws.cloudformation#TemplateURL", "traits": { - "smithy.api#documentation": "The location of the file that contains the template body. The URL must point to a\n template (maximum size: 460,800 bytes) that's located in an Amazon S3 bucket or a Systems\n Manager document. For more information, see Template Anatomy\n in the CloudFormation User Guide.
\nConditional: You must specify either the TemplateBody or the TemplateURL parameter,\n but not both.
" + "smithy.api#documentation": "The location of the file that contains the template body. The URL must point to a\n template (maximum size: 460,800 bytes) that's located in an Amazon S3 bucket or a Systems\n Manager document. For more information, see Template Anatomy\n in the CloudFormation User Guide.
\nConditional: You must specify either the TemplateBody or the TemplateURL parameter, but\n not both.
" } }, "StackId": { @@ -1571,13 +1571,13 @@ "Capabilities": { "target": "com.amazonaws.cloudformation#Capabilities", "traits": { - "smithy.api#documentation": "In some cases, you must explicitly acknowledge that your stack set template contains\n certain capabilities in order for CloudFormation to create the stack set and related stack\n instances.
\n\n CAPABILITY_IAM
and CAPABILITY_NAMED_IAM
\n
Some stack templates might include resources that can affect permissions in\n your Amazon Web Services account; for example, by creating new Identity and Access Management\n (IAM) users. For those stack sets, you must explicitly acknowledge this by specifying\n one of these capabilities.
\nThe following IAM resources require you to specify either the\n CAPABILITY_IAM
or CAPABILITY_NAMED_IAM
\n capability.
If you have IAM resources, you can specify either capability.
\nIf you have IAM resources with custom names, you must\n specify CAPABILITY_NAMED_IAM
.
If you don't specify either of these capabilities, CloudFormation returns an\n InsufficientCapabilities
error.
If your stack template contains these resources, we recommend that you review\n all permissions associated with them and edit their permissions if\n necessary.
\n\n \n AWS::IAM::Group\n
\n\n \n AWS::IAM::Policy\n
\n\n \n AWS::IAM::Role\n
\n\n \n AWS::IAM::User\n
\nFor more information, see Acknowledging IAM\n Resources in CloudFormation Templates.
\n\n CAPABILITY_AUTO_EXPAND
\n
Some templates reference macros. If your stack set template references one or more\n macros, you must create the stack set directly from the processed template, without\n first reviewing the resulting changes in a change set. To create the stack set\n directly, you must acknowledge this capability. For more information, see Using CloudFormation Macros to\n Perform Custom Processing on Templates.
\nStack sets with service-managed permissions do not currently support the use of\n macros in templates. (This includes the AWS::Include and AWS::Serverless\n transforms, which are macros hosted by CloudFormation.) Even if you specify this capability\n for a stack set with service-managed permissions, if you reference a macro in your\n template the stack set operation will fail.
\nIn some cases, you must explicitly acknowledge that your stack set template contains\n certain capabilities in order for CloudFormation to create the stack set and related stack\n instances.
\n\n CAPABILITY_IAM
and CAPABILITY_NAMED_IAM
\n
Some stack templates might include resources that can affect permissions in your\n Amazon Web Services account; for example, by creating new Identity and Access Management\n (IAM) users. For those stack sets, you must explicitly acknowledge this by specifying\n one of these capabilities.
\nThe following IAM resources require you to specify either the\n CAPABILITY_IAM
or CAPABILITY_NAMED_IAM
\n capability.
If you have IAM resources, you can specify either capability.
\nIf you have IAM resources with custom names, you must\n specify CAPABILITY_NAMED_IAM
.
If you don't specify either of these capabilities, CloudFormation returns an\n InsufficientCapabilities
error.
If your stack template contains these resources, we recommend that you review all\n permissions associated with them and edit their permissions if necessary.
\n\n \n AWS::IAM::Group\n
\n\n \n AWS::IAM::Policy\n
\n\n \n AWS::IAM::Role\n
\n\n \n AWS::IAM::User\n
\nFor more information, see Acknowledging IAM\n Resources in CloudFormation Templates.
\n\n CAPABILITY_AUTO_EXPAND
\n
Some templates reference macros. If your stack set template references one or more\n macros, you must create the stack set directly from the processed template, without\n first reviewing the resulting changes in a change set. To create the stack set\n directly, you must acknowledge this capability. For more information, see Using CloudFormation Macros to\n Perform Custom Processing on Templates.
\nStack sets with service-managed permissions do not currently support the use of\n macros in templates. (This includes the AWS::Include and AWS::Serverless\n transforms, which are macros hosted by CloudFormation.) Even if you specify this capability\n for a stack set with service-managed permissions, if you reference a macro in your\n template the stack set operation will fail.
\nThe key-value pairs to associate with this stack set and the stacks created from it.\n CloudFormation also propagates these tags to supported resources that are created in\n the stacks. A maximum number of 50 tags can be specified.
\nIf you specify tags as part of a CreateStackSet
action,\n CloudFormation checks to see if you have the required IAM permission to tag resources. If\n you don't, the entire CreateStackSet
action fails with an access\n denied
error, and the stack set is not created.
The key-value pairs to associate with this stack set and the stacks created from it.\n CloudFormation also propagates these tags to supported resources that are\n created in the stacks. A maximum number of 50 tags can be specified.
\nIf you specify tags as part of a CreateStackSet
action, CloudFormation checks to see if you have the required IAM permission to tag resources.\n If you don't, the entire CreateStackSet
action fails with an access\n denied
error, and the stack set is not created.
A unique identifier for this CreateStackSet
request. Specify this token\n if you plan to retry requests so that CloudFormation knows that you're not attempting\n to create another stack set with the same name. You might retry CreateStackSet
\n requests to ensure that CloudFormation successfully received them.
If you don't specify an operation ID, the SDK generates one\n automatically.
", + "smithy.api#documentation": "A unique identifier for this CreateStackSet
request. Specify this token if\n you plan to retry requests so that CloudFormation knows that you're not attempting\n to create another stack set with the same name. You might retry CreateStackSet
\n requests to ensure that CloudFormation successfully received them.
If you don't specify an operation ID, the SDK generates one\n automatically.
", "smithy.api#idempotencyToken": {} } }, "ManagedExecution": { "target": "com.amazonaws.cloudformation#ManagedExecution", "traits": { - "smithy.api#documentation": "Describes whether StackSets performs non-conflicting operations concurrently and queues conflicting operations.
" + "smithy.api#documentation": "Describes whether StackSets performs non-conflicting operations concurrently and queues\n conflicting operations.
" } } } @@ -1718,7 +1718,7 @@ } ], "traits": { - "smithy.api#documentation": "Deletes the specified change set. Deleting change sets ensures that no one executes\n the wrong change set.
\nIf the call successfully completes, CloudFormation successfully deleted the\n change set.
\nIf IncludeNestedStacks
specifies True
during the creation of\n the nested change set, then DeleteChangeSet
will delete all change sets that\n belong to the stacks hierarchy and will also delete all change sets for nested stacks with\n the status of REVIEW_IN_PROGRESS
.
Deletes the specified change set. Deleting change sets ensures that no one executes the\n wrong change set.
\nIf the call successfully completes, CloudFormation successfully deleted the\n change set.
\nIf IncludeNestedStacks
specifies True
during the creation of\n the nested change set, then DeleteChangeSet
will delete all change sets that\n belong to the stacks hierarchy and will also delete all change sets for nested stacks with\n the status of REVIEW_IN_PROGRESS
.
The name or Amazon Resource Name (ARN) of the change set that you want to\n delete.
", + "smithy.api#documentation": "The name or Amazon Resource Name (ARN) of the change set that you want to delete.
", "smithy.api#required": {} } }, "StackName": { "target": "com.amazonaws.cloudformation#StackNameOrId", "traits": { - "smithy.api#documentation": "If you specified the name of a change set to delete, specify the stack name or ID\n (ARN) that is associated with it.
" + "smithy.api#documentation": "If you specified the name of a change set to delete, specify the stack name or ID (ARN)\n that is associated with it.
" } } }, @@ -1760,7 +1760,7 @@ } ], "traits": { - "smithy.api#documentation": "Deletes a specified stack. Once the call completes successfully, stack deletion\n starts. Deleted stacks do not show up in the DescribeStacks API if the\n deletion has been completed successfully.
" + "smithy.api#documentation": "Deletes a specified stack. Once the call completes successfully, stack deletion starts.\n Deleted stacks do not show up in the DescribeStacks API if the deletion\n has been completed successfully.
" } }, "com.amazonaws.cloudformation#DeleteStackInput": { @@ -1776,19 +1776,19 @@ "RetainResources": { "target": "com.amazonaws.cloudformation#RetainResources", "traits": { - "smithy.api#documentation": "For stacks in the DELETE_FAILED
state, a list of resource logical IDs\n that are associated with the resources you want to retain. During deletion,\n CloudFormation deletes the stack but does not delete the retained resources.
Retaining resources is useful when you cannot delete a resource, such as a non-empty\n S3 bucket, but you want to delete the stack.
" + "smithy.api#documentation": "For stacks in the DELETE_FAILED
state, a list of resource logical IDs that\n are associated with the resources you want to retain. During deletion, CloudFormation deletes the stack but does not delete the retained resources.
Retaining resources is useful when you cannot delete a resource, such as a non-empty S3\n bucket, but you want to delete the stack.
" } }, "RoleARN": { "target": "com.amazonaws.cloudformation#RoleARN", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role\n that CloudFormation assumes to delete the stack. CloudFormation uses the role's\n credentials to make calls on your behalf.
\nIf you don't specify a value, CloudFormation uses the role that was previously\n associated with the stack. If no role is available, CloudFormation uses a temporary\n session that is generated from your user credentials.
" + "smithy.api#documentation": "The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role that CloudFormation assumes to delete the stack. CloudFormation uses the role's\n credentials to make calls on your behalf.
\nIf you don't specify a value, CloudFormation uses the role that was previously\n associated with the stack. If no role is available, CloudFormation uses a temporary\n session that is generated from your user credentials.
" } }, "ClientRequestToken": { "target": "com.amazonaws.cloudformation#ClientRequestToken", "traits": { - "smithy.api#documentation": "A unique identifier for this DeleteStack
request. Specify this token if\n you plan to retry requests so that CloudFormation knows that you're not attempting to\n delete a stack with the same name. You might retry DeleteStack
requests to\n ensure that CloudFormation successfully received them.
All events triggered by a given stack operation are assigned the same client request\n token, which you can use to track operations. For example, if you execute a\n CreateStack
operation with the token token1
, then all the\n StackEvents
generated by that operation will have\n ClientRequestToken
set as token1
.
In the console, stack operations display the client request token on the Events tab.\n Stack operations that are initiated from the console use the token format\n Console-StackOperation-ID, which helps you easily identify the\n stack operation . For example, if you create a stack using the console, each stack event\n would be assigned the same token in the following format:\n Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002
.
A unique identifier for this DeleteStack
request. Specify this token if you\n plan to retry requests so that CloudFormation knows that you're not attempting to\n delete a stack with the same name. You might retry DeleteStack
requests to\n ensure that CloudFormation successfully received them.
All events triggered by a given stack operation are assigned the same client request\n token, which you can use to track operations. For example, if you execute a\n CreateStack
operation with the token token1
, then all the\n StackEvents
generated by that operation will have\n ClientRequestToken
set as token1
.
In the console, stack operations display the client request token on the Events tab.\n Stack operations that are initiated from the console use the token format\n Console-StackOperation-ID, which helps you easily identify the\n stack operation . For example, if you create a stack using the console, each stack event\n would be assigned the same token in the following format:\n Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002
.
[Self-managed permissions] The names of the Amazon Web Services accounts that you want to delete stack instances for.
\nYou can specify Accounts
or DeploymentTargets
, but not both.
[Self-managed permissions] The names of the Amazon Web Services accounts that you want to\n delete stack instances for.
\nYou can specify Accounts
or DeploymentTargets
, but not\n both.
Removes the stack instances from the specified stack set, but doesn't delete the\n stacks. You can't reassociate a retained stack or add an existing, saved stack to a new\n stack set.
\nFor more information, see Stack set operation options.
", + "smithy.api#documentation": "Removes the stack instances from the specified stack set, but doesn't delete the stacks.\n You can't reassociate a retained stack or add an existing, saved stack to a new stack\n set.
\nFor more information, see Stack set operation options.
", "smithy.api#required": {} } }, "OperationId": { "target": "com.amazonaws.cloudformation#ClientRequestToken", "traits": { - "smithy.api#documentation": "The unique identifier for this stack set operation.
\nIf you don't specify an operation ID, the SDK generates one\n automatically.
\nThe operation ID also functions as an idempotency token, to ensure that\n CloudFormation performs the stack set operation only once, even if you retry the request\n multiple times. You can retry stack set operation requests to ensure that\n CloudFormation successfully received them.
\nRepeating this stack set operation with a new operation ID retries all stack instances\n whose status is OUTDATED
.
The unique identifier for this stack set operation.
\nIf you don't specify an operation ID, the SDK generates one\n automatically.
\nThe operation ID also functions as an idempotency token, to ensure that CloudFormation performs the stack set operation only once, even if you retry the request\n multiple times. You can retry stack set operation requests to ensure that CloudFormation successfully received them.
\nRepeating this stack set operation with a new operation ID retries all stack instances\n whose status is OUTDATED
.
The name or unique ID of the stack set that you're deleting. You can obtain this\n value by running ListStackSets.
", + "smithy.api#documentation": "The name or unique ID of the stack set that you're deleting. You can obtain this value\n by running ListStackSets.
", "smithy.api#required": {} } }, @@ -2042,7 +2042,7 @@ "target": "com.amazonaws.cloudformation#DescribeAccountLimitsOutput" }, "traits": { - "smithy.api#documentation": "Retrieves your account's CloudFormation limits, such as the maximum number of\n stacks that you can create in your account. For more information about account limits, see\n CloudFormation\n Limits in the CloudFormation User Guide.
", + "smithy.api#documentation": "Retrieves your account's CloudFormation limits, such as the maximum number of\n stacks that you can create in your account. For more information about account limits, see\n CloudFormation Limits in the CloudFormation User Guide.
", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -2076,7 +2076,7 @@ "NextToken": { "target": "com.amazonaws.cloudformation#NextToken", "traits": { - "smithy.api#documentation": "If the output exceeds 1 MB in size, a string that identifies the next page of limits.\n If no additional page exists, this value is null.
" + "smithy.api#documentation": "If the output exceeds 1 MB in size, a string that identifies the next page of limits. If\n no additional page exists, this value is null.
" } } }, @@ -2213,7 +2213,7 @@ "ExecutionStatus": { "target": "com.amazonaws.cloudformation#ExecutionStatus", "traits": { - "smithy.api#documentation": "If the change set execution status is AVAILABLE
, you can execute the\n change set. If you can’t execute the change set, the status indicates why. For example, a\n change set might be in an UNAVAILABLE
state because CloudFormation is\n still creating it or in an OBSOLETE
state because the stack was already\n updated.
If the change set execution status is AVAILABLE
, you can execute the change\n set. If you can’t execute the change set, the status indicates why. For example, a change\n set might be in an UNAVAILABLE
state because CloudFormation is still\n creating it or in an OBSOLETE
state because the stack was already\n updated.
If you execute the change set, the tags that will be associated with the\n stack.
" + "smithy.api#documentation": "If you execute the change set, the tags that will be associated with the stack.
" } }, "Changes": { "target": "com.amazonaws.cloudformation#Changes", "traits": { - "smithy.api#documentation": "A list of Change
structures that describes the resources\n CloudFormation changes if you execute the change set.
A list of Change
structures that describes the resources CloudFormation changes if you execute the change set.
If the output exceeds 1 MB, a string that identifies the next page of changes. If\n there is no additional page, this value is null.
" + "smithy.api#documentation": "If the output exceeds 1 MB, a string that identifies the next page of changes. If there\n is no additional page, this value is null.
" } }, "IncludeNestedStacks": { @@ -2382,20 +2382,20 @@ "StackDriftDetectionId": { "target": "com.amazonaws.cloudformation#StackDriftDetectionId", "traits": { - "smithy.api#documentation": "The ID of the drift detection results of this operation.
\nCloudFormation generates new results, with a new drift detection ID, each time this operation\n is run. However, the number of reports CloudFormation retains for any given stack, and for how long,\n may vary.
", + "smithy.api#documentation": "The ID of the drift detection results of this operation.
\nCloudFormation generates new results, with a new drift detection ID, each time this operation is\n run. However, the number of reports CloudFormation retains for any given stack, and for how long,\n may vary.
", "smithy.api#required": {} } }, "StackDriftStatus": { "target": "com.amazonaws.cloudformation#StackDriftStatus", "traits": { - "smithy.api#documentation": "Status of the stack's actual configuration compared to its expected\n configuration.
\n\n DRIFTED
: The stack differs from its expected template\n configuration. A stack is considered to have drifted if one or more of its resources\n have drifted.
\n NOT_CHECKED
: CloudFormation has not checked if the stack differs from its\n expected template configuration.
\n IN_SYNC
: The stack's actual configuration matches its expected\n template configuration.
\n UNKNOWN
: This value is reserved for future use.
Status of the stack's actual configuration compared to its expected\n configuration.
\n\n DRIFTED
: The stack differs from its expected template configuration.\n A stack is considered to have drifted if one or more of its resources have\n drifted.
\n NOT_CHECKED
: CloudFormation has not checked if the stack differs from its\n expected template configuration.
\n IN_SYNC
: The stack's actual configuration matches its expected\n template configuration.
\n UNKNOWN
: This value is reserved for future use.
The status of the stack drift detection operation.
\n\n DETECTION_COMPLETE
: The stack drift detection operation has\n successfully completed for all resources in the stack that support drift detection.\n (Resources that do not currently support stack detection remain unchecked.)
If you specified logical resource IDs for CloudFormation to use as a filter for the\n stack drift detection operation, only the resources with those logical IDs are\n checked for drift.
\n\n DETECTION_FAILED
: The stack drift detection operation has failed\n for at least one resource in the stack. Results will be available for resources on\n which CloudFormation successfully completed drift detection.
\n DETECTION_IN_PROGRESS
: The stack drift detection operation is\n currently in progress.
The status of the stack drift detection operation.
\n\n DETECTION_COMPLETE
: The stack drift detection operation has\n successfully completed for all resources in the stack that support drift detection.\n (Resources that do not currently support stack detection remain unchecked.)
If you specified logical resource IDs for CloudFormation to use as a filter for the stack\n drift detection operation, only the resources with those logical IDs are checked for\n drift.
\n\n DETECTION_FAILED
: The stack drift detection operation has failed for\n at least one resource in the stack. Results will be available for resources on which\n CloudFormation successfully completed drift detection.
\n DETECTION_IN_PROGRESS
: The stack drift detection operation is\n currently in progress.
Returns all stack related events for a specified stack in reverse chronological\n order. For more information about a stack's event history, go to Stacks in the CloudFormation User Guide.
\nYou can list events for stacks that have failed to create or have been deleted by\n specifying the unique stack identifier (stack ID).
\nReturns all stack related events for a specified stack in reverse chronological order.\n For more information about a stack's event history, go to Stacks in the\n CloudFormation User Guide.
\nYou can list events for stacks that have failed to create or have been deleted by\n specifying the unique stack identifier (stack ID).
\nThe name or the unique stack ID that is associated with the stack, which are not\n always interchangeable:
\nRunning stacks: You can specify either the stack's name or its unique stack\n ID.
\nDeleted stacks: You must specify the unique stack ID.
\nDefault: There is no default value.
" + "smithy.api#documentation": "The name or the unique stack ID that is associated with the stack, which are not always\n interchangeable:
\nRunning stacks: You can specify either the stack's name or its unique stack\n ID.
\nDeleted stacks: You must specify the unique stack ID.
\nDefault: There is no default value.
" } }, "NextToken": { @@ -2469,7 +2469,7 @@ "NextToken": { "target": "com.amazonaws.cloudformation#NextToken", "traits": { - "smithy.api#documentation": "If the output exceeds 1 MB in size, a string that identifies the next page of events.\n If no additional page exists, this value is null.
" + "smithy.api#documentation": "If the output exceeds 1 MB in size, a string that identifies the next page of events. If\n no additional page exists, this value is null.
" } } }, @@ -2494,7 +2494,7 @@ } ], "traits": { - "smithy.api#documentation": "Returns the stack instance that's associated with the specified stack set, Amazon Web Services account, and Region.
\nFor a list of stack instances that are associated with a specific stack set, use\n ListStackInstances.
" + "smithy.api#documentation": "Returns the stack instance that's associated with the specified stack set, Amazon Web Services account, and Region.
\nFor a list of stack instances that are associated with a specific stack set, use ListStackInstances.
" } }, "com.amazonaws.cloudformation#DescribeStackInstanceInput": { @@ -2510,7 +2510,7 @@ "StackInstanceAccount": { "target": "com.amazonaws.cloudformation#Account", "traits": { - "smithy.api#documentation": "The ID of an Amazon Web Services account that's associated with this stack instance.
", + "smithy.api#documentation": "The ID of an Amazon Web Services account that's associated with this stack\n instance.
", "smithy.api#required": {} } }, @@ -2549,7 +2549,7 @@ "target": "com.amazonaws.cloudformation#DescribeStackResourceOutput" }, "traits": { - "smithy.api#documentation": "Returns a description of the specified resource in the specified stack.
\nFor deleted stacks, DescribeStackResource returns resource information for up to 90\n days after the stack has been deleted.
" + "smithy.api#documentation": "Returns a description of the specified resource in the specified stack.
\nFor deleted stacks, DescribeStackResource returns resource information for up to 90 days\n after the stack has been deleted.
" } }, "com.amazonaws.cloudformation#DescribeStackResourceDrifts": { @@ -2561,7 +2561,7 @@ "target": "com.amazonaws.cloudformation#DescribeStackResourceDriftsOutput" }, "traits": { - "smithy.api#documentation": "Returns drift information for the resources that have been checked for drift in the\n specified stack. This includes actual and expected configuration values for resources where\n CloudFormation detects configuration drift.
\nFor a given stack, there will be one StackResourceDrift
for each stack\n resource that has been checked for drift. Resources that haven't yet been checked for drift\n are not included. Resources that do not currently support drift detection are not checked,\n and so not included. For a list of resources that support drift detection, see Resources that Support Drift Detection.
Use DetectStackResourceDrift to detect drift on individual\n resources, or DetectStackDrift to detect drift on all supported resources\n for a given stack.
", + "smithy.api#documentation": "Returns drift information for the resources that have been checked for drift in the\n specified stack. This includes actual and expected configuration values for resources where\n CloudFormation detects configuration drift.
\nFor a given stack, there will be one StackResourceDrift
for each stack\n resource that has been checked for drift. Resources that haven't yet been checked for drift\n are not included. Resources that do not currently support drift detection are not checked,\n and so not included. For a list of resources that support drift detection, see Resources that Support Drift Detection.
Use DetectStackResourceDrift to detect drift on individual resources,\n or DetectStackDrift to detect drift on all supported resources for a\n given stack.
", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -2582,7 +2582,7 @@ "StackResourceDriftStatusFilters": { "target": "com.amazonaws.cloudformation#StackResourceDriftStatusFilters", "traits": { - "smithy.api#documentation": "The resource drift status values to use as filters for the resource drift results\n returned.
\n\n DELETED
: The resource differs from its expected template\n configuration in that the resource has been deleted.
\n MODIFIED
: One or more resource properties differ from their\n expected template values.
\n IN_SYNC
: The resources's actual configuration matches its expected\n template configuration.
\n NOT_CHECKED
: CloudFormation does not currently return this value.
The resource drift status values to use as filters for the resource drift results\n returned.
\n\n DELETED
: The resource differs from its expected template\n configuration in that the resource has been deleted.
\n MODIFIED
: One or more resource properties differ from their expected\n template values.
\n IN_SYNC
: The resources's actual configuration matches its expected\n template configuration.
\n NOT_CHECKED
: CloudFormation does not currently return this value.
The name or the unique stack ID that is associated with the stack, which are not\n always interchangeable:
\nRunning stacks: You can specify either the stack's name or its unique stack\n ID.
\nDeleted stacks: You must specify the unique stack ID.
\nDefault: There is no default value.
", + "smithy.api#documentation": "The name or the unique stack ID that is associated with the stack, which are not always\n interchangeable:
\nRunning stacks: You can specify either the stack's name or its unique stack\n ID.
\nDeleted stacks: You must specify the unique stack ID.
\nDefault: There is no default value.
", "smithy.api#required": {} } }, @@ -2645,7 +2645,7 @@ "StackResourceDetail": { "target": "com.amazonaws.cloudformation#StackResourceDetail", "traits": { - "smithy.api#documentation": "A StackResourceDetail
structure containing the description of the\n specified resource in the specified stack.
A StackResourceDetail
structure containing the description of the specified\n resource in the specified stack.
Returns Amazon Web Services resource descriptions for running and deleted stacks. If\n StackName
is specified, all the associated resources that are part of the\n stack are returned. If PhysicalResourceId
is specified, the associated\n resources of the stack that the resource belongs to are returned.
Only the first 100 resources will be returned. If your stack has more resources\n than this, you should use ListStackResources
instead.
For deleted stacks, DescribeStackResources
returns resource information\n for up to 90 days after the stack has been deleted.
You must specify either StackName
or PhysicalResourceId
,\n but not both. In addition, you can specify LogicalResourceId
to filter the\n returned result. For more information about resources, the LogicalResourceId
\n and PhysicalResourceId
, go to the CloudFormation User\n Guide.
A ValidationError
is returned if you specify both\n StackName
and PhysicalResourceId
in the same\n request.
Returns Amazon Web Services resource descriptions for running and deleted stacks. If\n StackName
is specified, all the associated resources that are part of the\n stack are returned. If PhysicalResourceId
is specified, the associated\n resources of the stack that the resource belongs to are returned.
Only the first 100 resources will be returned. If your stack has more resources than\n this, you should use ListStackResources
instead.
For deleted stacks, DescribeStackResources
returns resource information for\n up to 90 days after the stack has been deleted.
You must specify either StackName
or PhysicalResourceId
, but\n not both. In addition, you can specify LogicalResourceId
to filter the\n returned result. For more information about resources, the LogicalResourceId
\n and PhysicalResourceId
, go to the CloudFormation User\n Guide.
A ValidationError
is returned if you specify both StackName
\n and PhysicalResourceId
in the same request.
The name or the unique stack ID that is associated with the stack, which are not\n always interchangeable:
\nRunning stacks: You can specify either the stack's name or its unique stack\n ID.
\nDeleted stacks: You must specify the unique stack ID.
\nDefault: There is no default value.
\nRequired: Conditional. If you do not specify StackName
, you must specify\n PhysicalResourceId
.
The name or the unique stack ID that is associated with the stack, which are not always\n interchangeable:
\nRunning stacks: You can specify either the stack's name or its unique stack\n ID.
\nDeleted stacks: You must specify the unique stack ID.
\nDefault: There is no default value.
\nRequired: Conditional. If you do not specify StackName
, you must specify\n PhysicalResourceId
.
The name or unique identifier that corresponds to a physical instance ID of a\n resource supported by CloudFormation.
\nFor example, for an Amazon Elastic Compute Cloud (EC2) instance,\n PhysicalResourceId
corresponds to the InstanceId
. You can pass\n the EC2 InstanceId
to DescribeStackResources
to find which stack\n the instance belongs to and what other resources are part of the stack.
Required: Conditional. If you do not specify PhysicalResourceId
, you\n must specify StackName
.
Default: There is no default value.
" + "smithy.api#documentation": "The name or unique identifier that corresponds to a physical instance ID of a resource\n supported by CloudFormation.
\nFor example, for an Amazon Elastic Compute Cloud (EC2) instance,\n PhysicalResourceId
corresponds to the InstanceId
. You can pass\n the EC2 InstanceId
to DescribeStackResources
to find which stack\n the instance belongs to and what other resources are part of the stack.
Required: Conditional. If you do not specify PhysicalResourceId
, you must\n specify StackName
.
Default: There is no default value.
" } } }, @@ -2816,7 +2816,7 @@ "target": "com.amazonaws.cloudformation#DescribeStacksOutput" }, "traits": { - "smithy.api#documentation": "Returns the description for the specified stack; if no stack name was specified, then\n it returns the description for all the stacks created.
\nIf the stack does not exist, an ValidationError
is\n returned.
Returns the description for the specified stack; if no stack name was specified, then it\n returns the description for all the stacks created.
\nIf the stack does not exist, an ValidationError
is returned.
The name or the unique stack ID that is associated with the stack, which are not\n always interchangeable:
\nRunning stacks: You can specify either the stack's name or its unique stack\n ID.
\nDeleted stacks: You must specify the unique stack ID.
\nDefault: There is no default value.
" + "smithy.api#documentation": "The name or the unique stack ID that is associated with the stack, which are not always\n interchangeable:
\nRunning stacks: You can specify either the stack's name or its unique stack\n ID.
\nDeleted stacks: You must specify the unique stack ID.
\nDefault: There is no default value.
" } }, "NextToken": { @@ -3208,7 +3208,7 @@ "NextToken": { "target": "com.amazonaws.cloudformation#NextToken", "traits": { - "smithy.api#documentation": "If the output exceeds 1 MB in size, a string that identifies the next page of stacks.\n If no additional page exists, this value is null.
" + "smithy.api#documentation": "If the output exceeds 1 MB in size, a string that identifies the next page of stacks. If\n no additional page exists, this value is null.
" } } }, @@ -3550,7 +3550,7 @@ "target": "com.amazonaws.cloudformation#DetectStackDriftOutput" }, "traits": { - "smithy.api#documentation": "Detects whether a stack's actual configuration differs, or has\n drifted, from it's expected configuration, as defined in the stack\n template and any values specified as template parameters. For each resource in the stack\n that supports drift detection, CloudFormation compares the actual configuration of the resource with\n its expected template configuration. Only resource properties explicitly defined in the\n stack template are checked for drift. A stack is considered to have drifted if one or more\n of its resources differ from their expected template configurations. For more information,\n see Detecting\n Unregulated Configuration Changes to Stacks and Resources.
\nUse DetectStackDrift
to detect drift on all supported resources for a\n given stack, or DetectStackResourceDrift to detect drift on individual\n resources.
For a list of stack resources that currently support drift detection, see Resources that Support Drift Detection.
\n\n DetectStackDrift
can take up to several minutes, depending on the number\n of resources contained within the stack. Use DescribeStackDriftDetectionStatus to monitor the progress of a detect stack\n drift operation. Once the drift detection operation has completed, use DescribeStackResourceDrifts to return drift information about the stack and\n its resources.
When detecting drift on a stack, CloudFormation does not detect drift on any nested stacks\n belonging to that stack. Perform DetectStackDrift
directly on the nested stack\n itself.
Detects whether a stack's actual configuration differs, or has\n drifted, from it's expected configuration, as defined in the stack\n template and any values specified as template parameters. For each resource in the stack\n that supports drift detection, CloudFormation compares the actual configuration of the resource with\n its expected template configuration. Only resource properties explicitly defined in the\n stack template are checked for drift. A stack is considered to have drifted if one or more\n of its resources differ from their expected template configurations. For more information,\n see Detecting\n Unregulated Configuration Changes to Stacks and Resources.
\nUse DetectStackDrift
to detect drift on all supported resources for a given\n stack, or DetectStackResourceDrift to detect drift on individual\n resources.
For a list of stack resources that currently support drift detection, see Resources that Support Drift Detection.
\n\n DetectStackDrift
can take up to several minutes, depending on the number of\n resources contained within the stack. Use DescribeStackDriftDetectionStatus to monitor the progress of a detect stack drift operation. Once the drift detection\n operation has completed, use DescribeStackResourceDrifts to return drift\n information about the stack and its resources.
When detecting drift on a stack, CloudFormation does not detect drift on any nested stacks\n belonging to that stack. Perform DetectStackDrift
directly on the nested stack\n itself.
Returns information about whether a resource's actual configuration differs, or has\n drifted, from it's expected configuration, as defined in the stack\n template and any values specified as template parameters. This information includes actual\n and expected property values for resources in which CloudFormation detects drift. Only resource\n properties explicitly defined in the stack template are checked for drift. For more\n information about stack and resource drift, see Detecting\n Unregulated Configuration Changes to Stacks and Resources.
\nUse DetectStackResourceDrift
to detect drift on individual resources, or\n DetectStackDrift to detect drift on all resources in a given stack\n that support drift detection.
Resources that do not currently support drift detection cannot be checked. For a list\n of resources that support drift detection, see Resources that Support Drift Detection.
" + "smithy.api#documentation": "Returns information about whether a resource's actual configuration differs, or has\n drifted, from it's expected configuration, as defined in the stack\n template and any values specified as template parameters. This information includes actual\n and expected property values for resources in which CloudFormation detects drift. Only resource\n properties explicitly defined in the stack template are checked for drift. For more\n information about stack and resource drift, see Detecting\n Unregulated Configuration Changes to Stacks and Resources.
\nUse DetectStackResourceDrift
to detect drift on individual resources, or\n DetectStackDrift to detect drift on all resources in a given stack\n that support drift detection.
Resources that do not currently support drift detection cannot be checked. For a list of\n resources that support drift detection, see Resources that Support Drift Detection.
" } }, "com.amazonaws.cloudformation#DetectStackResourceDriftInput": { @@ -3754,7 +3754,7 @@ "target": "com.amazonaws.cloudformation#EstimateTemplateCostOutput" }, "traits": { - "smithy.api#documentation": "Returns the estimated monthly cost of a template. The return value is an Amazon Web Services Simple\n Monthly Calculator URL with a query string that describes the resources required to run the\n template.
" + "smithy.api#documentation": "Returns the estimated monthly cost of a template. The return value is an Amazon Web Services Simple Monthly Calculator URL with a query string that describes the\n resources required to run the template.
" } }, "com.amazonaws.cloudformation#EstimateTemplateCostInput": { @@ -3769,7 +3769,7 @@ "TemplateURL": { "target": "com.amazonaws.cloudformation#TemplateURL", "traits": { - "smithy.api#documentation": "Location of file containing the template body. The URL must point to a template that\n is located in an Amazon S3 bucket or a Systems Manager document. For more information, go to\n Template Anatomy\n in the CloudFormation User Guide.
\nConditional: You must pass TemplateURL
or TemplateBody
. If\n both are passed, only TemplateBody
is used.
Location of file containing the template body. The URL must point to a template that is\n located in an Amazon S3 bucket or a Systems Manager document. For more information, go to\n Template Anatomy\n in the CloudFormation User Guide.
\nConditional: You must pass TemplateURL
or TemplateBody
. If\n both are passed, only TemplateBody
is used.
An Amazon Web Services Simple Monthly Calculator URL with a query string that describes the resources\n required to run the template.
" + "smithy.api#documentation": "An Amazon Web Services Simple Monthly Calculator URL with a query string that describes\n the resources required to run the template.
" } } }, @@ -3838,7 +3838,7 @@ } ], "traits": { - "smithy.api#documentation": "Updates a stack using the input information that was provided when the specified\n change set was created. After the call successfully completes, CloudFormation starts\n updating the stack. Use the DescribeStacks action to view the status of\n the update.
\nWhen you execute a change set, CloudFormation deletes all other change sets\n associated with the stack because they aren't valid for the updated stack.
\nIf a stack policy is associated with the stack, CloudFormation enforces the\n policy during the update. You can't specify a temporary stack policy that overrides the\n current policy.
\nTo create a change set for the entire stack hierachy, IncludeNestedStacks
\n must have been set to True
.
Updates a stack using the input information that was provided when the specified change\n set was created. After the call successfully completes, CloudFormation starts\n updating the stack. Use the DescribeStacks action to view the status of\n the update.
\nWhen you execute a change set, CloudFormation deletes all other change sets\n associated with the stack because they aren't valid for the updated stack.
\nIf a stack policy is associated with the stack, CloudFormation enforces the\n policy during the update. You can't specify a temporary stack policy that overrides the\n current policy.
\nTo create a change set for the entire stack hierachy, IncludeNestedStacks
\n must have been set to True
.
A unique identifier for this ExecuteChangeSet
request. Specify this\n token if you plan to retry requests so that CloudFormation knows that you're not\n attempting to execute a change set to update a stack with the same name. You might retry\n ExecuteChangeSet
requests to ensure that CloudFormation successfully\n received them.
A unique identifier for this ExecuteChangeSet
request. Specify this token\n if you plan to retry requests so that CloudFormation knows that you're not\n attempting to execute a change set to update a stack with the same name. You might retry\n ExecuteChangeSet
requests to ensure that CloudFormation\n successfully received them.
The name of exported output value. Use this name and the Fn::ImportValue
\n function to import the associated value into other stacks. The name is defined in the\n Export
field in the associated stack's Outputs
\n section.
The name of exported output value. Use this name and the Fn::ImportValue
\n function to import the associated value into other stacks. The name is defined in the\n Export
field in the associated stack's Outputs
section.
The value of the exported output, such as a resource physical ID. This value is\n defined in the Export
field in the associated stack's Outputs
\n section.
The value of the exported output, such as a resource physical ID. This value is defined\n in the Export
field in the associated stack's Outputs
\n section.
Returns the stack policy for a specified stack. If a stack doesn't have a policy, a\n null value is returned.
" + "smithy.api#documentation": "Returns the stack policy for a specified stack. If a stack doesn't have a policy, a null\n value is returned.
" } }, "com.amazonaws.cloudformation#GetStackPolicyInput": { @@ -4005,7 +4005,7 @@ "StackName": { "target": "com.amazonaws.cloudformation#StackName", "traits": { - "smithy.api#documentation": "The name or unique stack ID that is associated with the stack whose policy you want\n to get.
", + "smithy.api#documentation": "The name or unique stack ID that is associated with the stack whose policy you want to\n get.
", "smithy.api#required": {} } } @@ -4042,7 +4042,7 @@ } ], "traits": { - "smithy.api#documentation": "Returns the template body for a specified stack. You can get the template for running\n or deleted stacks.
\nFor deleted stacks, GetTemplate returns the template for up to 90 days after the\n stack has been deleted.
\nIf the template does not exist, a ValidationError
is returned.
Returns the template body for a specified stack. You can get the template for running or\n deleted stacks.
\nFor deleted stacks, GetTemplate returns the template for up to 90 days after the stack\n has been deleted.
\nIf the template does not exist, a ValidationError
is returned.
The name or the unique stack ID that is associated with the stack, which are not\n always interchangeable:
\nRunning stacks: You can specify either the stack's name or its unique stack\n ID.
\nDeleted stacks: You must specify the unique stack ID.
\nDefault: There is no default value.
" + "smithy.api#documentation": "The name or the unique stack ID that is associated with the stack, which are not always\n interchangeable:
\nRunning stacks: You can specify either the stack's name or its unique stack\n ID.
\nDeleted stacks: You must specify the unique stack ID.
\nDefault: There is no default value.
" } }, "ChangeSetName": { @@ -4083,7 +4083,7 @@ "StagesAvailable": { "target": "com.amazonaws.cloudformation#StageList", "traits": { - "smithy.api#documentation": "The stage of the template that you can retrieve. For stacks, the\n Original
and Processed
templates are always available. For\n change sets, the Original
template is always available. After\n CloudFormation finishes creating the change set, the Processed
template\n becomes available.
The stage of the template that you can retrieve. For stacks, the Original
\n and Processed
templates are always available. For change sets, the\n Original
template is always available. After CloudFormation\n finishes creating the change set, the Processed
template becomes\n available.
Returns information about a new or existing template. The\n GetTemplateSummary
action is useful for viewing parameter information, such\n as default parameter values and parameter types, before you create or update a stack or\n stack set.
You can use the GetTemplateSummary
action when you submit a template, or\n you can get template information for a stack set, or a running or deleted stack.
For deleted stacks, GetTemplateSummary
returns the template information\n for up to 90 days after the stack has been deleted. If the template does not exist, a\n ValidationError
is returned.
Returns information about a new or existing template. The\n GetTemplateSummary
action is useful for viewing parameter information, such\n as default parameter values and parameter types, before you create or update a stack or\n stack set.
You can use the GetTemplateSummary
action when you submit a template, or\n you can get template information for a stack set, or a running or deleted stack.
For deleted stacks, GetTemplateSummary
returns the template information for\n up to 90 days after the stack has been deleted. If the template does not exist, a\n ValidationError
is returned.
The capabilities found within the template. If your template contains IAM resources,\n you must specify the CAPABILITY_IAM
or CAPABILITY_NAMED_IAM
value for this parameter when\n you use the CreateStack or UpdateStack actions with\n your template; otherwise, those actions return an InsufficientCapabilities
error.
For more information, see Acknowledging IAM Resources in CloudFormation Templates.
" + "smithy.api#documentation": "The capabilities found within the template. If your template contains IAM\n resources, you must specify the CAPABILITY_IAM
or\n CAPABILITY_NAMED_IAM
value for this parameter when you use the CreateStack or UpdateStack actions with your template;\n otherwise, those actions return an InsufficientCapabilities
error.
For more information, see Acknowledging IAM Resources in CloudFormation\n Templates.
" } }, "CapabilitiesReason": { @@ -4188,7 +4188,7 @@ "Metadata": { "target": "com.amazonaws.cloudformation#Metadata", "traits": { - "smithy.api#documentation": "The value that is defined for the Metadata
property of the\n template.
The value that is defined for the Metadata
property of the template.
Import existing stacks into a new stack sets. Use the stack import operation to import\n up to 10 stacks into a new stack set in the same account as the source stack or in a\n different administrator account and Region, by specifying the stack ID of the stack you\n intend to import.
\n\n ImportStacksToStackSet
is only supported by self-managed permissions.
Use the stack import operations for self-managed or service-managed StackSets. For\n self-managed StackSets, the import operation can import stacks in the administrator account\n or in different target accounts and Amazon Web Services Regions. For service-managed\n StackSets, the import operation can import any stack in the same AWS Organizations as the\n management account. The import operation can import up to 10 stacks using inline stack IDs\n or up to 10,000 stacks using an Amazon S3 object.
" } }, "com.amazonaws.cloudformation#ImportStacksToStackSetInput": { @@ -4342,8 +4342,19 @@ "StackIds": { "target": "com.amazonaws.cloudformation#StackIdList", "traits": { - "smithy.api#documentation": "The IDs of the stacks you are importing into a stack set. You import up to 10 stacks per\n stack set at a time.
", - "smithy.api#required": {} + "smithy.api#documentation": "The IDs of the stacks you are importing into a stack set. You import up to 10 stacks per\n stack set at a time.
\nSpecify either StackIds
or StackIdsUrl
.
The Amazon S3 URL which contains list of stack ids to be inputted.
\nSpecify either StackIds
or StackIdsUrl
.
The list of OU ID’s to which the stacks being imported has to be mapped as deployment\n target.
" } }, "OperationPreferences": { @@ -4432,7 +4443,7 @@ "code": "InvalidChangeSetStatus", "httpResponseCode": 400 }, - "smithy.api#documentation": "The specified change set can't be used to update the stack. For example, the change\n set status might be CREATE_IN_PROGRESS
, or the stack status might be\n UPDATE_IN_PROGRESS
.
The specified change set can't be used to update the stack. For example, the change set\n status might be CREATE_IN_PROGRESS
, or the stack status might be\n UPDATE_IN_PROGRESS
.
Returns the ID and status of each active change set for a stack. For example,\n CloudFormation lists change sets that are in the CREATE_IN_PROGRESS
or\n CREATE_PENDING
state.
Returns the ID and status of each active change set for a stack. For example, CloudFormation lists change sets that are in the CREATE_IN_PROGRESS
or\n CREATE_PENDING
state.
A string (provided by the ListExports response output) that\n identifies the next page of exported output values that you asked to retrieve.
" + "smithy.api#documentation": "A string (provided by the ListExports response output) that identifies\n the next page of exported output values that you asked to retrieve.
" } } } @@ -4619,7 +4630,7 @@ "NextToken": { "target": "com.amazonaws.cloudformation#NextToken", "traits": { - "smithy.api#documentation": "If the output exceeds 100 exported output values, a string that identifies the next\n page of exports. If there is no additional page, this value is null.
" + "smithy.api#documentation": "If the output exceeds 100 exported output values, a string that identifies the next page\n of exports. If there is no additional page, this value is null.
" } } } @@ -4671,7 +4682,7 @@ "NextToken": { "target": "com.amazonaws.cloudformation#NextToken", "traits": { - "smithy.api#documentation": "A string that identifies the next page of exports. If there is no additional page,\n this value is null.
" + "smithy.api#documentation": "A string that identifies the next page of exports. If there is no additional page, this\n value is null.
" } } } @@ -4690,7 +4701,7 @@ } ], "traits": { - "smithy.api#documentation": "Returns summary information about stack instances that are associated with the\n specified stack set. You can filter for stack instances that are associated with a specific\n Amazon Web Services account name or Region, or that have a specific status.
", + "smithy.api#documentation": "Returns summary information about stack instances that are associated with the specified\n stack set. You can filter for stack instances that are associated with a specific Amazon Web Services account name or Region, or that have a specific status.
", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -4705,7 +4716,7 @@ "StackSetName": { "target": "com.amazonaws.cloudformation#StackSetName", "traits": { - "smithy.api#documentation": "The name or unique ID of the stack set that you want to list stack instances\n for.
", + "smithy.api#documentation": "The name or unique ID of the stack set that you want to list stack instances for.
", "smithy.api#required": {} } }, @@ -4730,7 +4741,7 @@ "StackInstanceAccount": { "target": "com.amazonaws.cloudformation#Account", "traits": { - "smithy.api#documentation": "The name of the Amazon Web Services account that you want to list stack instances for.
" + "smithy.api#documentation": "The name of the Amazon Web Services account that you want to list stack instances\n for.
" } }, "StackInstanceRegion": { @@ -4759,7 +4770,7 @@ "NextToken": { "target": "com.amazonaws.cloudformation#NextToken", "traits": { - "smithy.api#documentation": "If the request doesn't return all of the remaining results, NextToken
is\n set to a token. To retrieve the next set of results, call ListStackInstances
\n again and assign that token to the request object's NextToken
parameter. If\n the request returns all results, NextToken
is set to\n null
.
If the request doesn't return all of the remaining results, NextToken
is\n set to a token. To retrieve the next set of results, call ListStackInstances
\n again and assign that token to the request object's NextToken
parameter. If\n the request returns all results, NextToken
is set to null
.
The name or the unique stack ID that is associated with the stack, which are not\n always interchangeable:
\nRunning stacks: You can specify either the stack's name or its unique stack\n ID.
\nDeleted stacks: You must specify the unique stack ID.
\nDefault: There is no default value.
", + "smithy.api#documentation": "The name or the unique stack ID that is associated with the stack, which are not always\n interchangeable:
\nRunning stacks: You can specify either the stack's name or its unique stack\n ID.
\nDeleted stacks: You must specify the unique stack ID.
\nDefault: There is no default value.
", "smithy.api#required": {} } }, @@ -4814,7 +4825,7 @@ "NextToken": { "target": "com.amazonaws.cloudformation#NextToken", "traits": { - "smithy.api#documentation": "If the output exceeds 1 MB, a string that identifies the next page of stack\n resources. If no additional page exists, this value is null.
" + "smithy.api#documentation": "If the output exceeds 1 MB, a string that identifies the next page of stack resources.\n If no additional page exists, this value is null.
" } } }, @@ -4897,7 +4908,7 @@ "NextToken": { "target": "com.amazonaws.cloudformation#NextToken", "traits": { - "smithy.api#documentation": "If the request doesn't return all results, NextToken
is set to a token.\n To retrieve the next set of results, call ListOperationResults
again and\n assign that token to the request object's NextToken
parameter. If there are no\n remaining results, NextToken
is set to null
.
If the request doesn't return all results, NextToken
is set to a token. To\n retrieve the next set of results, call ListOperationResults
again and assign\n that token to the request object's NextToken
parameter. If there are no\n remaining results, NextToken
is set to null
.
If the request doesn't return all results, NextToken
is set to a token.\n To retrieve the next set of results, call ListOperationResults
again and\n assign that token to the request object's NextToken
parameter. If there are no\n remaining results, NextToken
is set to null
.
If the request doesn't return all results, NextToken
is set to a token. To\n retrieve the next set of results, call ListOperationResults
again and assign\n that token to the request object's NextToken
parameter. If there are no\n remaining results, NextToken
is set to null
.
Returns summary information about stack sets that are associated with the\n user.
\n[Self-managed permissions] If you set the CallAs
parameter to\n SELF
while signed in to your Amazon Web Services account,\n ListStackSets
returns all self-managed stack sets in your Amazon Web Services account.
[Service-managed permissions] If you set the CallAs
parameter to\n SELF
while signed in to the organization's management account,\n ListStackSets
returns all stack sets in the management\n account.
[Service-managed permissions] If you set the CallAs
parameter to\n DELEGATED_ADMIN
while signed in to your member account,\n ListStackSets
returns all stack sets with service-managed permissions\n in the management account.
Returns summary information about stack sets that are associated with the user.
\n[Self-managed permissions] If you set the CallAs
parameter to\n SELF
while signed in to your Amazon Web Services account,\n ListStackSets
returns all self-managed stack sets in your Amazon Web Services account.
[Service-managed permissions] If you set the CallAs
parameter to\n SELF
while signed in to the organization's management account,\n ListStackSets
returns all stack sets in the management\n account.
[Service-managed permissions] If you set the CallAs
parameter to\n DELEGATED_ADMIN
while signed in to your member account,\n ListStackSets
returns all stack sets with service-managed permissions\n in the management account.
The status of the stack sets that you want to get summary information\n about.
" + "smithy.api#documentation": "The status of the stack sets that you want to get summary information about.
" } }, "CallAs": { @@ -5031,7 +5042,7 @@ "NextToken": { "target": "com.amazonaws.cloudformation#NextToken", "traits": { - "smithy.api#documentation": "If the request doesn't return all of the remaining results, NextToken
is\n set to a token. To retrieve the next set of results, call ListStackInstances
\n again and assign that token to the request object's NextToken
parameter. If\n the request returns all results, NextToken
is set to\n null
.
If the request doesn't return all of the remaining results, NextToken
is\n set to a token. To retrieve the next set of results, call ListStackInstances
\n again and assign that token to the request object's NextToken
parameter. If\n the request returns all results, NextToken
is set to null
.
If the output exceeds 1 MB in size, a string that identifies the next page of stacks.\n If no additional page exists, this value is null.
" + "smithy.api#documentation": "If the output exceeds 1 MB in size, a string that identifies the next page of stacks. If\n no additional page exists, this value is null.
" } } }, @@ -5315,7 +5326,7 @@ "Filters": { "target": "com.amazonaws.cloudformation#TypeFilters", "traits": { - "smithy.api#documentation": "Filter criteria to use in determining which extensions to return.
\nFilters must be compatible with Visibility
to return valid results. For example, specifying AWS_TYPES
for Category
and PRIVATE
for Visibility
returns an empty list of types, but specifying PUBLIC
for Visibility
returns the desired list.
Filter criteria to use in determining which extensions to return.
\nFilters must be compatible with Visibility
to return valid results. For\n example, specifying AWS_TYPES
for Category
and\n PRIVATE
for Visibility
returns an empty list of types, but\n specifying PUBLIC
for Visibility
returns the desired list.
When true
, StackSets performs non-conflicting operations concurrently and queues conflicting operations. After conflicting operations finish, StackSets starts queued operations in request order.
If there are already running or queued operations, StackSets queues all incoming operations even if they are non-conflicting.
\nYou can't modify your stack set's execution configuration while there are running or queued operations for that stack set.
\nWhen false
(default), StackSets performs one operation at a time in request order.
When true
, StackSets performs non-conflicting operations concurrently and\n queues conflicting operations. After conflicting operations finish, StackSets starts queued\n operations in request order.
If there are already running or queued operations, StackSets queues all incoming\n operations even if they are non-conflicting.
\nYou can't modify your stack set's execution configuration while there are running or\n queued operations for that stack set.
\nWhen false
(default), StackSets performs one operation at a time in request\n order.
Describes whether StackSets performs non-conflicting operations concurrently and queues conflicting operations.
" + "smithy.api#documentation": "Describes whether StackSets performs non-conflicting operations concurrently and queues\n conflicting operations.
" } }, "com.amazonaws.cloudformation#ManagedExecutionNullable": { @@ -5586,7 +5597,7 @@ "code": "OperationInProgressException", "httpResponseCode": 409 }, - "smithy.api#documentation": "Another operation is currently in progress for this stack set. Only one operation can\n be performed for a stack set at a given time.
", + "smithy.api#documentation": "Another operation is currently in progress for this stack set. Only one operation can be\n performed for a stack set at a given time.
", "smithy.api#error": "client", "smithy.api#httpError": 409 } @@ -5719,7 +5730,7 @@ "ParameterKey": { "target": "com.amazonaws.cloudformation#ParameterKey", "traits": { - "smithy.api#documentation": "The key associated with the parameter. If you don't specify a key and value for a\n particular parameter, CloudFormation uses the default value that is specified in your\n template.
" + "smithy.api#documentation": "The key associated with the parameter. If you don't specify a key and value for a\n particular parameter, CloudFormation uses the default value that is specified in\n your template.
" } }, "ParameterValue": { @@ -5737,7 +5748,7 @@ "ResolvedValue": { "target": "com.amazonaws.cloudformation#ParameterValue", "traits": { - "smithy.api#documentation": "Read-only. The value that corresponds to a Systems Manager parameter key. This field\n is returned only for \n SSM
parameter types in the template.
Read-only. Read-only. The value that corresponds to a SSM parameter key.\n This field is returned only for \n SSM
\n parameter types in the template.
A set of criteria that CloudFormation uses to validate parameter values. Although\n other constraints might be defined in the stack template, CloudFormation returns only\n the AllowedValues
property.
A set of criteria that CloudFormation uses to validate parameter values.\n Although other constraints might be defined in the stack template, CloudFormation\n returns only the AllowedValues
property.
The expected property value of the resource property, as defined in the stack\n template and any values specified as template parameters.
", + "smithy.api#documentation": "The expected property value of the resource property, as defined in the stack template\n and any values specified as template parameters.
", "smithy.api#required": {} } }, @@ -5916,7 +5927,7 @@ "DifferenceType": { "target": "com.amazonaws.cloudformation#DifferenceType", "traits": { - "smithy.api#documentation": "The type of property difference.
\n\n ADD
: A value has been added to a resource property that is an\n array or list data type.
\n REMOVE
: The property has been removed from the current resource\n configuration.
\n NOT_EQUAL
: The current property value differs from its expected\n value (as defined in the stack template and any values specified as template\n parameters).
The type of property difference.
\n\n ADD
: A value has been added to a resource property that is an array\n or list data type.
\n REMOVE
: The property has been removed from the current resource\n configuration.
\n NOT_EQUAL
: The current property value differs from its expected value\n (as defined in the stack template and any values specified as template\n parameters).
The version number to assign to this version of the extension.
\nUse the following format, and adhere to semantic versioning when assigning a version\n number to your extension:
\n\n MAJOR.MINOR.PATCH
\n
For more information, see Semantic Versioning\n 2.0.0.
\nIf you do not specify a version number, CloudFormation increments the version number by\n one minor version release.
\nYou cannot specify a version number the first time you publish a type. CloudFormation automatically sets the first version number to be 1.0.0
.
The version number to assign to this version of the extension.
\nUse the following format, and adhere to semantic versioning when assigning a version\n number to your extension:
\n\n MAJOR.MINOR.PATCH
\n
For more information, see Semantic Versioning\n 2.0.0.
\nIf you do not specify a version number, CloudFormation increments the version number by\n one minor version release.
\nYou cannot specify a version number the first time you publish a type. CloudFormation\n automatically sets the first version number to be 1.0.0
.
For the Modify
action, indicates whether CloudFormation will replace\n the resource by creating a new one and deleting the old one. This value depends on the\n value of the RequiresRecreation
property in the\n ResourceTargetDefinition
structure. For example, if the\n RequiresRecreation
field is Always
and the\n Evaluation
field is Static
, Replacement
is\n True
. If the RequiresRecreation
field is Always
\n and the Evaluation
field is Dynamic
, Replacement
is\n Conditionally
.
If you have multiple changes with different RequiresRecreation
values,\n the Replacement
value depends on the change with the most impact. A\n RequiresRecreation
value of Always
has the most impact,\n followed by Conditionally
, and then Never
.
For the Modify
action, indicates whether CloudFormation will\n replace the resource by creating a new one and deleting the old one. This value depends on\n the value of the RequiresRecreation
property in the\n ResourceTargetDefinition
structure. For example, if the\n RequiresRecreation
field is Always
and the\n Evaluation
field is Static
, Replacement
is\n True
. If the RequiresRecreation
field is Always
\n and the Evaluation
field is Dynamic
, Replacement
is\n Conditionally
.
If you have multiple changes with different RequiresRecreation
values, the\n Replacement
value depends on the change with the most impact. A\n RequiresRecreation
value of Always
has the most impact,\n followed by Conditionally
, and then Never
.
For the Modify
action, a list of ResourceChangeDetail
\n structures that describes the changes that CloudFormation will make to the resource.\n
For the Modify
action, a list of ResourceChangeDetail
\n structures that describes the changes that CloudFormation will make to the\n resource.
The ResourceChange
structure describes the resource and the action that\n CloudFormation will perform on it if you execute this change set.
The ResourceChange
structure describes the resource and the action that\n CloudFormation will perform on it if you execute this change set.
A ResourceTargetDefinition
structure that describes the field that\n CloudFormation will change and whether the resource will be recreated.
A ResourceTargetDefinition
structure that describes the field that CloudFormation will change and whether the resource will be recreated.
Indicates whether CloudFormation can determine the target value, and whether the\n target value will change before you execute a change set.
\nFor Static
evaluations, CloudFormation can determine that the target\n value will change, and its value. For example, if you directly modify the\n InstanceType
property of an EC2 instance, CloudFormation knows that\n this property value will change, and its value, so this is a Static
\n evaluation.
For Dynamic
evaluations, cannot determine the target value because it\n depends on the result of an intrinsic function, such as a Ref
or\n Fn::GetAtt
intrinsic function, when the stack is updated. For example, if\n your template includes a reference to a resource that is conditionally recreated, the value\n of the reference (the physical ID of the resource) might change, depending on if the\n resource is recreated. If the resource is recreated, it will have a new physical ID, so all\n references to that resource will also be updated.
Indicates whether CloudFormation can determine the target value, and whether the\n target value will change before you execute a change set.
\nFor Static
evaluations, CloudFormation can determine that the\n target value will change, and its value. For example, if you directly modify the\n InstanceType
property of an EC2 instance, CloudFormation knows that\n this property value will change, and its value, so this is a Static
\n evaluation.
For Dynamic
evaluations, cannot determine the target value because it\n depends on the result of an intrinsic function, such as a Ref
or\n Fn::GetAtt
intrinsic function, when the stack is updated. For example, if\n your template includes a reference to a resource that is conditionally recreated, the value\n of the reference (the physical ID of the resource) might change, depending on if the\n resource is recreated. If the resource is recreated, it will have a new physical ID, so all\n references to that resource will also be updated.
The group to which the CausingEntity
value belongs. There are five\n entity groups:
\n ResourceReference
entities are Ref
intrinsic functions that\n refer to resources in the template, such as { \"Ref\" : \"MyEC2InstanceResource\"\n }
.
\n ParameterReference
entities are Ref
intrinsic functions\n that get template parameter values, such as { \"Ref\" : \"MyPasswordParameter\"\n }
.
\n ResourceAttribute
entities are Fn::GetAtt
intrinsic\n functions that get resource attribute values, such as { \"Fn::GetAtt\" : [\n \"MyEC2InstanceResource\", \"PublicDnsName\" ] }
.
\n DirectModification
entities are changes that are made directly to the\n template.
\n Automatic
entities are AWS::CloudFormation::Stack
resource\n types, which are also known as nested stacks. If you made no changes to the\n AWS::CloudFormation::Stack
resource, CloudFormation sets the\n ChangeSource
to Automatic
because the nested stack's\n template might have changed. Changes to a nested stack's template aren't visible to\n CloudFormation until you run an update on the parent stack.
The group to which the CausingEntity
value belongs. There are five entity\n groups:
\n ResourceReference
entities are Ref
intrinsic functions that\n refer to resources in the template, such as { \"Ref\" : \"MyEC2InstanceResource\"\n }
.
\n ParameterReference
entities are Ref
intrinsic functions\n that get template parameter values, such as { \"Ref\" : \"MyPasswordParameter\"\n }
.
\n ResourceAttribute
entities are Fn::GetAtt
intrinsic\n functions that get resource attribute values, such as { \"Fn::GetAtt\" : [\n \"MyEC2InstanceResource\", \"PublicDnsName\" ] }
.
\n DirectModification
entities are changes that are made directly to the\n template.
\n Automatic
entities are AWS::CloudFormation::Stack
resource\n types, which are also known as nested stacks. If you made no changes to the\n AWS::CloudFormation::Stack
resource, CloudFormation sets the\n ChangeSource
to Automatic
because the nested stack's\n template might have changed. Changes to a nested stack's template aren't visible to\n CloudFormation until you run an update on the parent stack.
The identity of the entity that triggered this change. This entity is a member of the\n group that is specified by the ChangeSource
field. For example, if you\n modified the value of the KeyPairName
parameter, the\n CausingEntity
is the name of the parameter\n (KeyPairName
).
If the ChangeSource
value is DirectModification
, no value\n is given for CausingEntity
.
The identity of the entity that triggered this change. This entity is a member of the\n group that is specified by the ChangeSource
field. For example, if you\n modified the value of the KeyPairName
parameter, the\n CausingEntity
is the name of the parameter\n (KeyPairName
).
If the ChangeSource
value is DirectModification
, no value is\n given for CausingEntity
.
For a resource with Modify
as the action, the\n ResourceChange
structure describes the changes CloudFormation will make\n to that resource.
For a resource with Modify
as the action, the ResourceChange
\n structure describes the changes CloudFormation will make to that resource.
The triggers to monitor during stack creation or update actions.
\nBy default, CloudFormation saves the rollback triggers specified for a stack and applies them\n to any subsequent update operations for the stack, unless you specify otherwise. If you do\n specify rollback triggers for this parameter, those triggers replace any list of triggers\n previously specified for the stack. This means:
\nTo use the rollback triggers previously specified for this stack, if any, don't\n specify this parameter.
\nTo specify new or updated rollback triggers, you must specify\n all the triggers that you want used for this stack, even\n triggers you've specifed before (for example, when creating the stack or during a\n previous stack update). Any triggers that you don't include in the updated list of\n triggers are no longer applied to the stack.
\nTo remove all currently specified triggers, specify an empty list for this\n parameter.
\nIf a specified trigger is missing, the entire stack operation fails and is rolled\n back.
" + "smithy.api#documentation": "The triggers to monitor during stack creation or update actions.
\nBy default, CloudFormation saves the rollback triggers specified for a stack and applies them to\n any subsequent update operations for the stack, unless you specify otherwise. If you do\n specify rollback triggers for this parameter, those triggers replace any list of triggers\n previously specified for the stack. This means:
\nTo use the rollback triggers previously specified for this stack, if any, don't\n specify this parameter.
\nTo specify new or updated rollback triggers, you must specify\n all the triggers that you want used for this stack, even\n triggers you've specifed before (for example, when creating the stack or during a\n previous stack update). Any triggers that you don't include in the updated list of\n triggers are no longer applied to the stack.
\nTo remove all currently specified triggers, specify an empty list for this\n parameter.
\nIf a specified trigger is missing, the entire stack operation fails and is rolled back.\n
" } }, "MonitoringTimeInMinutes": { "target": "com.amazonaws.cloudformation#MonitoringTimeInMinutes", "traits": { - "smithy.api#documentation": "The amount of time, in minutes, during which CloudFormation should monitor all the\n rollback triggers after the stack creation or update operation deploys all necessary\n resources.
\nThe default is 0 minutes.
\nIf you specify a monitoring period but do not specify any rollback triggers,\n CloudFormation still waits the specified period of time before cleaning up old resources\n after update operations. You can use this monitoring period to perform any manual stack\n validation desired, and manually cancel the stack creation or update (using CancelUpdateStack, for example) as necessary.
\nIf you specify 0 for this parameter, CloudFormation still monitors the specified\n rollback triggers during stack creation and update operations. Then, for update operations,\n it begins disposing of old resources immediately once the operation completes.
" + "smithy.api#documentation": "The amount of time, in minutes, during which CloudFormation should monitor all\n the rollback triggers after the stack creation or update operation deploys all necessary\n resources.
\nThe default is 0 minutes.
\nIf you specify a monitoring period but do not specify any rollback triggers, CloudFormation still waits the specified period of time before cleaning up old\n resources after update operations. You can use this monitoring period to perform any manual\n stack validation desired, and manually cancel the stack creation or update (using CancelUpdateStack, for example) as necessary.
\nIf you specify 0 for this parameter, CloudFormation still monitors the\n specified rollback triggers during stack creation and update operations. Then, for update\n operations, it begins disposing of old resources immediately once the operation\n completes.
" } } }, "traits": { - "smithy.api#documentation": "Structure containing the rollback triggers for CloudFormation to monitor during stack creation\n and updating operations, and for the specified monitoring period afterwards.
\nRollback triggers enable you to have CloudFormation monitor the state of your application\n during stack creation and updating, and to roll back that operation if the application\n breaches the threshold of any of the alarms you've specified. For more information, see\n Monitor and Roll Back Stack\n Operations.
" + "smithy.api#documentation": "Structure containing the rollback triggers for CloudFormation to monitor during stack creation\n and updating operations, and for the specified monitoring period afterwards.
\nRollback triggers enable you to have CloudFormation monitor the state of your application during\n stack creation and updating, and to roll back that operation if the application breaches\n the threshold of any of the alarms you've specified. For more information, see Monitor and Roll Back Stack\n Operations.
" } }, "com.amazonaws.cloudformation#RollbackStack": { @@ -6936,7 +6947,7 @@ } ], "traits": { - "smithy.api#documentation": "When specifying RollbackStack
, you preserve the state of previously provisioned resources when an operation fails. You can check the status of the stack through the DescribeStacks API.
Rolls back the specified stack to the last known stable state from CREATE_FAILED
or UPDATE_FAILED
stack statuses.
This operation will delete a stack if it doesn't contain a last known stable state. A last known stable state includes any status in a *_COMPLETE
. This includes the following stack statuses.
\n CREATE_COMPLETE
\n
\n UPDATE_COMPLETE
\n
\n UPDATE_ROLLBACK_COMPLETE
\n
\n IMPORT_COMPLETE
\n
\n IMPORT_ROLLBACK_COMPLETE
\n
When specifying RollbackStack
, you preserve the state of previously\n provisioned resources when an operation fails. You can check the status of the stack\n through the DescribeStacks API.
Rolls back the specified stack to the last known stable state from\n CREATE_FAILED
or UPDATE_FAILED
stack statuses.
This operation will delete a stack if it doesn't contain a last known stable state. A\n last known stable state includes any status in a *_COMPLETE
. This includes the\n following stack statuses.
\n CREATE_COMPLETE
\n
\n UPDATE_COMPLETE
\n
\n UPDATE_ROLLBACK_COMPLETE
\n
\n IMPORT_COMPLETE
\n
\n IMPORT_ROLLBACK_COMPLETE
\n
The Amazon Resource Name (ARN) of an Identity and Access Management role that CloudFormation assumes to rollback the stack.
" + "smithy.api#documentation": "The Amazon Resource Name (ARN) of an Identity and Access Management role that CloudFormation\n assumes to rollback the stack.
" } }, "ClientRequestToken": { @@ -6980,20 +6991,20 @@ "Arn": { "target": "com.amazonaws.cloudformation#Arn", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) of the rollback trigger.
\nIf a specified trigger is missing, the entire stack operation fails and is rolled\n back.
", + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the rollback trigger.
\nIf a specified trigger is missing, the entire stack operation fails and is rolled back.\n
", "smithy.api#required": {} } }, "Type": { "target": "com.amazonaws.cloudformation#Type", "traits": { - "smithy.api#documentation": "The resource type of the rollback trigger. Currently, AWS::CloudWatch::Alarm is the only supported resource type.
", + "smithy.api#documentation": "The resource type of the rollback trigger. Specify either AWS::CloudWatch::Alarm or AWS::CloudWatch::CompositeAlarm resource types.
", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "A rollback trigger CloudFormation monitors during creation and updating of stacks. If any of\n the alarms you specify goes to ALARM state during the stack operation or within the\n specified monitoring period afterwards, CloudFormation rolls back the entire stack\n operation.
" + "smithy.api#documentation": "A rollback trigger CloudFormation monitors during creation and updating of stacks. If any of the\n alarms you specify goes to ALARM state during the stack operation or within the specified\n monitoring period afterwards, CloudFormation rolls back the entire stack\n operation.
" } }, "com.amazonaws.cloudformation#RollbackTriggers": { @@ -7055,13 +7066,13 @@ "StackPolicyBody": { "target": "com.amazonaws.cloudformation#StackPolicyBody", "traits": { - "smithy.api#documentation": "Structure containing the stack policy body. For more information, go to Prevent Updates\n to Stack Resources in the CloudFormation User Guide. You can specify either\n the StackPolicyBody
or the StackPolicyURL
parameter, but not\n both.
Structure containing the stack policy body. For more information, go to Prevent Updates\n to Stack Resources in the CloudFormation User Guide. You can specify\n either the StackPolicyBody
or the StackPolicyURL
parameter, but\n not both.
Location of a file containing the stack policy. The URL must point to a policy\n (maximum size: 16 KB) located in an S3 bucket in the same\n Region as the stack. You can specify either the StackPolicyBody
or the\n StackPolicyURL
parameter, but not both.
Location of a file containing the stack policy. The URL must point to a policy (maximum\n size: 16 KB) located in an S3 bucket in the same Region as the stack. You can specify\n either the StackPolicyBody
or the StackPolicyURL
parameter, but\n not both.
Sends a signal to the specified resource with a success or failure status. You can\n use the SignalResource API in conjunction with a creation policy or update policy.\n CloudFormation doesn't proceed with a stack creation or update until resources receive the\n required number of signals or the timeout period is exceeded. The SignalResource API is\n useful in cases where you want to send signals from anywhere other than an Amazon EC2\n instance.
" + "smithy.api#documentation": "Sends a signal to the specified resource with a success or failure status. You can use\n the SignalResource API in conjunction with a creation policy or update policy. CloudFormation doesn't proceed with a stack creation or update until resources receive\n the required number of signals or the timeout period is exceeded. The SignalResource API is\n useful in cases where you want to send signals from anywhere other than an Amazon EC2\n instance.
" } }, "com.amazonaws.cloudformation#SignalResourceInput": { @@ -7219,14 +7230,14 @@ "UniqueId": { "target": "com.amazonaws.cloudformation#ResourceSignalUniqueId", "traits": { - "smithy.api#documentation": "A unique ID of the signal. When you signal Amazon EC2 instances or Auto Scaling\n groups, specify the instance ID that you are signaling as the unique ID. If you send\n multiple signals to a single resource (such as signaling a wait condition), each signal\n requires a different unique ID.
", + "smithy.api#documentation": "A unique ID of the signal. When you signal Amazon EC2 instances or Auto Scaling groups,\n specify the instance ID that you are signaling as the unique ID. If you send multiple\n signals to a single resource (such as signaling a wait condition), each signal requires a\n different unique ID.
", "smithy.api#required": {} } }, "Status": { "target": "com.amazonaws.cloudformation#ResourceSignalStatus", "traits": { - "smithy.api#documentation": "The status of the signal, which is either success or failure. A failure signal causes\n CloudFormation to immediately fail the stack creation or update.
", + "smithy.api#documentation": "The status of the signal, which is either success or failure. A failure signal causes\n CloudFormation to immediately fail the stack creation or update.
", "smithy.api#required": {} } } @@ -7285,7 +7296,7 @@ "LastUpdatedTime": { "target": "com.amazonaws.cloudformation#LastUpdatedTime", "traits": { - "smithy.api#documentation": "The time the stack was last updated. This field will only be returned if the stack\n has been updated at least once.
" + "smithy.api#documentation": "The time the stack was last updated. This field will only be returned if the stack has\n been updated at least once.
" } }, "RollbackConfiguration": { @@ -7340,7 +7351,7 @@ "RoleARN": { "target": "com.amazonaws.cloudformation#RoleARN", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role\n that is associated with the stack. During a stack operation, CloudFormation uses this\n role's credentials to make calls on your behalf.
" + "smithy.api#documentation": "The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role that is\n associated with the stack. During a stack operation, CloudFormation uses this\n role's credentials to make calls on your behalf.
" } }, "Tags": { @@ -7358,13 +7369,13 @@ "ParentId": { "target": "com.amazonaws.cloudformation#StackId", "traits": { - "smithy.api#documentation": "For nested stacks--stacks created as resources for another stack--the stack ID of the\n direct parent of this stack. For the first level of nested stacks, the root stack is also\n the parent stack.
\nFor more information, see Working with Nested Stacks in the\n CloudFormation User Guide.
" + "smithy.api#documentation": "For nested stacks--stacks created as resources for another stack--the stack ID of the\n direct parent of this stack. For the first level of nested stacks, the root stack is also\n the parent stack.
\nFor more information, see Working with Nested Stacks in the CloudFormation User Guide.
" } }, "RootId": { "target": "com.amazonaws.cloudformation#StackId", "traits": { - "smithy.api#documentation": "For nested stacks--stacks created as resources for another stack--the stack ID of the\n top-level stack to which the nested stack ultimately belongs.
\nFor more information, see Working with Nested Stacks in the\n CloudFormation User Guide.
" + "smithy.api#documentation": "For nested stacks--stacks created as resources for another stack--the stack ID of the\n top-level stack to which the nested stack ultimately belongs.
\nFor more information, see Working with Nested Stacks in the CloudFormation User Guide.
" } }, "DriftInformation": { @@ -7415,14 +7426,14 @@ "StackDriftStatus": { "target": "com.amazonaws.cloudformation#StackDriftStatus", "traits": { - "smithy.api#documentation": "Status of the stack's actual configuration compared to its expected template\n configuration.
\n\n DRIFTED
: The stack differs from its expected template\n configuration. A stack is considered to have drifted if one or more of its resources\n have drifted.
\n NOT_CHECKED
: CloudFormation has not checked if the stack differs from its\n expected template configuration.
\n IN_SYNC
: The stack's actual configuration matches its expected\n template configuration.
\n UNKNOWN
: This value is reserved for future use.
Status of the stack's actual configuration compared to its expected template\n configuration.
\n\n DRIFTED
: The stack differs from its expected template configuration.\n A stack is considered to have drifted if one or more of its resources have\n drifted.
\n NOT_CHECKED
: CloudFormation has not checked if the stack differs from its\n expected template configuration.
\n IN_SYNC
: The stack's actual configuration matches its expected\n template configuration.
\n UNKNOWN
: This value is reserved for future use.
Most recent time when a drift detection operation was initiated on the stack, or any\n of its individual resources that support drift detection.
" + "smithy.api#documentation": "Most recent time when a drift detection operation was initiated on the stack, or any of\n its individual resources that support drift detection.
" } } }, @@ -7436,14 +7447,14 @@ "StackDriftStatus": { "target": "com.amazonaws.cloudformation#StackDriftStatus", "traits": { - "smithy.api#documentation": "Status of the stack's actual configuration compared to its expected template\n configuration.
\n\n DRIFTED
: The stack differs from its expected template\n configuration. A stack is considered to have drifted if one or more of its resources\n have drifted.
\n NOT_CHECKED
: CloudFormation has not checked if the stack differs from its\n expected template configuration.
\n IN_SYNC
: The stack's actual configuration matches its expected\n template configuration.
\n UNKNOWN
: This value is reserved for future use.
Status of the stack's actual configuration compared to its expected template\n configuration.
\n\n DRIFTED
: The stack differs from its expected template configuration.\n A stack is considered to have drifted if one or more of its resources have\n drifted.
\n NOT_CHECKED
: CloudFormation has not checked if the stack differs from its\n expected template configuration.
\n IN_SYNC
: The stack's actual configuration matches its expected\n template configuration.
\n UNKNOWN
: This value is reserved for future use.
Most recent time when a drift detection operation was initiated on the stack, or any\n of its individual resources that support drift detection.
" + "smithy.api#documentation": "Most recent time when a drift detection operation was initiated on the stack, or any of\n its individual resources that support drift detection.
" } } }, @@ -7513,7 +7524,7 @@ "ResourceType": { "target": "com.amazonaws.cloudformation#ResourceType", "traits": { - "smithy.api#documentation": "Type of resource. (For more information, go to Amazon Web Services\n Resource Types Reference in the CloudFormation User Guide.)
" + "smithy.api#documentation": "Type of resource. (For more information, go to Amazon Web Services Resource Types Reference in the CloudFormation User\n Guide.)
" } }, "Timestamp": { @@ -7544,7 +7555,7 @@ "ClientRequestToken": { "target": "com.amazonaws.cloudformation#ClientRequestToken", "traits": { - "smithy.api#documentation": "The token passed to the operation that generated this event.
\nAll events triggered by a given stack operation are assigned the same client request\n token, which you can use to track operations. For example, if you execute a\n CreateStack
operation with the token token1
, then all the\n StackEvents
generated by that operation will have\n ClientRequestToken
set as token1
.
In the console, stack operations display the client request token on the Events tab.\n Stack operations that are initiated from the console use the token format\n Console-StackOperation-ID, which helps you easily identify the\n stack operation . For example, if you create a stack using the console, each stack event\n would be assigned the same token in the following format:\n Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002
.
The token passed to the operation that generated this event.
\nAll events triggered by a given stack operation are assigned the same client request\n token, which you can use to track operations. For example, if you execute a\n CreateStack
operation with the token token1
, then all the\n StackEvents
generated by that operation will have\n ClientRequestToken
set as token1
.
In the console, stack operations display the client request token on the Events tab.\n Stack operations that are initiated from the console use the token format\n Console-StackOperation-ID, which helps you easily identify the\n stack operation . For example, if you create a stack using the console, each stack event\n would be assigned the same token in the following format:\n Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002
.
The name of the Amazon Web Services Region that the stack instance is associated with.
" + "smithy.api#documentation": "The name of the Amazon Web Services Region that the stack instance is associated\n with.
" } }, "Account": { "target": "com.amazonaws.cloudformation#Account", "traits": { - "smithy.api#documentation": "[Self-managed permissions] The name of the Amazon Web Services account that the stack instance is associated with.
" + "smithy.api#documentation": "[Self-managed permissions] The name of the Amazon Web Services account that the stack\n instance is associated with.
" } }, "StackId": { @@ -7603,7 +7624,7 @@ "Status": { "target": "com.amazonaws.cloudformation#StackInstanceStatus", "traits": { - "smithy.api#documentation": "The status of the stack instance, in terms of its synchronization with its associated\n stack set.
\n\n INOPERABLE
: A DeleteStackInstances
operation has\n failed and left the stack in an unstable state. Stacks in this state are excluded\n from further UpdateStackSet
operations. You might need to perform a\n DeleteStackInstances
operation, with RetainStacks
set to\n true
, to delete the stack instance, and then delete the stack\n manually.
\n OUTDATED
: The stack isn't currently up to date with the stack set\n because:
The associated stack failed during a CreateStackSet
or\n UpdateStackSet
operation.
The stack was part of a CreateStackSet
or\n UpdateStackSet
operation that failed or was stopped before the\n stack was created or updated.
\n CURRENT
: The stack is currently up to date with the stack\n set.
The status of the stack instance, in terms of its synchronization with its associated\n stack set.
\n\n INOPERABLE
: A DeleteStackInstances
operation has failed\n and left the stack in an unstable state. Stacks in this state are excluded from\n further UpdateStackSet
operations. You might need to perform a\n DeleteStackInstances
operation, with RetainStacks
set to\n true
, to delete the stack instance, and then delete the stack\n manually.
\n OUTDATED
: The stack isn't currently up to date with the stack set\n because:
The associated stack failed during a CreateStackSet
or\n UpdateStackSet
operation.
The stack was part of a CreateStackSet
or\n UpdateStackSet
operation that failed or was stopped before the\n stack was created or updated.
\n CURRENT
: The stack is currently up to date with the stack set.
An CloudFormation stack, in a specific account and Region, that's part of a stack\n set operation. A stack instance is a reference to an attempted or actual stack in a given\n account within a given Region. A stack instance can exist without a stack—for example, if\n the stack couldn't be created for some reason. A stack instance is associated with only one\n stack set. Each stack instance contains the ID of its associated stack set, as well as the\n ID of the actual stack and the stack status.
" + "smithy.api#documentation": "An CloudFormation stack, in a specific account and Region, that's part of a\n stack set operation. A stack instance is a reference to an attempted or actual stack in a\n given account within a given Region. A stack instance can exist without a stack—for\n example, if the stack couldn't be created for some reason. A stack instance is associated\n with only one stack set. Each stack instance contains the ID of its associated stack set,\n as well as the ID of the actual stack and the stack status.
" } }, "com.amazonaws.cloudformation#StackInstanceComprehensiveStatus": { @@ -7792,13 +7813,13 @@ "Region": { "target": "com.amazonaws.cloudformation#Region", "traits": { - "smithy.api#documentation": "The name of the Amazon Web Services Region that the stack instance is associated with.
" + "smithy.api#documentation": "The name of the Amazon Web Services Region that the stack instance is associated\n with.
" } }, "Account": { "target": "com.amazonaws.cloudformation#Account", "traits": { - "smithy.api#documentation": "[Self-managed permissions] The name of the Amazon Web Services account that the stack instance is associated with.
" + "smithy.api#documentation": "[Self-managed permissions] The name of the Amazon Web Services account that the stack\n instance is associated with.
" } }, "StackId": { @@ -7810,13 +7831,13 @@ "Status": { "target": "com.amazonaws.cloudformation#StackInstanceStatus", "traits": { - "smithy.api#documentation": "The status of the stack instance, in terms of its synchronization with its associated\n stack set.
\n\n INOPERABLE
: A DeleteStackInstances
operation has\n failed and left the stack in an unstable state. Stacks in this state are excluded\n from further UpdateStackSet
operations. You might need to perform a\n DeleteStackInstances
operation, with RetainStacks
set to\n true
, to delete the stack instance, and then delete the stack\n manually.
\n OUTDATED
: The stack isn't currently up to date with the stack set\n because:
The associated stack failed during a CreateStackSet
or\n UpdateStackSet
operation.
The stack was part of a CreateStackSet
or\n UpdateStackSet
operation that failed or was stopped before the\n stack was created or updated.
\n CURRENT
: The stack is currently up to date with the stack\n set.
The status of the stack instance, in terms of its synchronization with its associated\n stack set.
\n\n INOPERABLE
: A DeleteStackInstances
operation has failed\n and left the stack in an unstable state. Stacks in this state are excluded from\n further UpdateStackSet
operations. You might need to perform a\n DeleteStackInstances
operation, with RetainStacks
set to\n true
, to delete the stack instance, and then delete the stack\n manually.
\n OUTDATED
: The stack isn't currently up to date with the stack set\n because:
The associated stack failed during a CreateStackSet
or\n UpdateStackSet
operation.
The stack was part of a CreateStackSet
or\n UpdateStackSet
operation that failed or was stopped before the\n stack was created or updated.
\n CURRENT
: The stack is currently up to date with the stack set.
The explanation for the specific status code assigned to this stack\n instance.
" + "smithy.api#documentation": "The explanation for the specific status code assigned to this stack instance.
" } }, "StackInstanceStatus": { @@ -7938,13 +7959,13 @@ "PhysicalResourceId": { "target": "com.amazonaws.cloudformation#PhysicalResourceId", "traits": { - "smithy.api#documentation": "The name or unique identifier that corresponds to a physical instance ID of a\n resource supported by CloudFormation.
" + "smithy.api#documentation": "The name or unique identifier that corresponds to a physical instance ID of a resource\n supported by CloudFormation.
" } }, "ResourceType": { "target": "com.amazonaws.cloudformation#ResourceType", "traits": { - "smithy.api#documentation": "Type of resource. (For more information, go to Amazon Web Services\n Resource Types Reference in the CloudFormation User Guide.)
", + "smithy.api#documentation": "Type of resource. (For more information, go to Amazon Web Services Resource Types Reference in the CloudFormation User\n Guide.)
", "smithy.api#required": {} } }, @@ -8016,13 +8037,13 @@ "PhysicalResourceId": { "target": "com.amazonaws.cloudformation#PhysicalResourceId", "traits": { - "smithy.api#documentation": "The name or unique identifier that corresponds to a physical instance ID of a\n resource supported by CloudFormation.
" + "smithy.api#documentation": "The name or unique identifier that corresponds to a physical instance ID of a resource\n supported by CloudFormation.
" } }, "ResourceType": { "target": "com.amazonaws.cloudformation#ResourceType", "traits": { - "smithy.api#documentation": "Type of resource. ((For more information, go to Amazon Web Services\n Resource Types Reference in the CloudFormation User Guide.)
", + "smithy.api#documentation": "Type of resource. ((For more information, go to Amazon Web Services Resource Types Reference in the CloudFormation User\n Guide.)
", "smithy.api#required": {} } }, @@ -8055,7 +8076,7 @@ "Metadata": { "target": "com.amazonaws.cloudformation#Metadata", "traits": { - "smithy.api#documentation": "The content of the Metadata
attribute declared for the resource. For\n more information, see Metadata\n Attribute in the CloudFormation User Guide.
The content of the Metadata
attribute declared for the resource. For more\n information, see Metadata\n Attribute in the CloudFormation User Guide.
The name or unique identifier that corresponds to a physical instance ID of a\n resource supported by CloudFormation.
" + "smithy.api#documentation": "The name or unique identifier that corresponds to a physical instance ID of a resource\n supported by CloudFormation.
" } }, "PhysicalResourceIdContext": { @@ -8114,25 +8135,25 @@ "ExpectedProperties": { "target": "com.amazonaws.cloudformation#Properties", "traits": { - "smithy.api#documentation": "A JSON structure containing the expected property values of the stack resource, as\n defined in the stack template and any values specified as template parameters.
\nFor resources whose StackResourceDriftStatus
is DELETED
,\n this structure will not be present.
A JSON structure containing the expected property values of the stack resource, as\n defined in the stack template and any values specified as template parameters.
\nFor resources whose StackResourceDriftStatus
is DELETED
, this\n structure will not be present.
A JSON structure containing the actual property values of the stack\n resource.
\nFor resources whose StackResourceDriftStatus
is DELETED
,\n this structure will not be present.
A JSON structure containing the actual property values of the stack resource.
\nFor resources whose StackResourceDriftStatus
is DELETED
, this\n structure will not be present.
A collection of the resource properties whose actual values differ from their\n expected values. These will be present only for resources whose\n StackResourceDriftStatus
is MODIFIED
.\n
A collection of the resource properties whose actual values differ from their expected\n values. These will be present only for resources whose\n StackResourceDriftStatus
is MODIFIED
.\n
Status of the resource's actual configuration compared to its expected\n configuration
\n\n DELETED
: The resource differs from its expected template\n configuration because the resource has been deleted.
\n MODIFIED
: One or more resource properties differ from their\n expected values (as defined in the stack template and any values specified as\n template parameters).
\n IN_SYNC
: The resources's actual configuration matches its expected\n template configuration.
\n NOT_CHECKED
: CloudFormation does not currently return this value.
Status of the resource's actual configuration compared to its expected\n configuration
\n\n DELETED
: The resource differs from its expected template\n configuration because the resource has been deleted.
\n MODIFIED
: One or more resource properties differ from their expected\n values (as defined in the stack template and any values specified as template\n parameters).
\n IN_SYNC
: The resources's actual configuration matches its expected\n template configuration.
\n NOT_CHECKED
: CloudFormation does not currently return this value.
Contains the drift information for a resource that has been checked for drift. This\n includes actual and expected property values for resources in which CloudFormation has detected\n drift. Only resource properties explicitly defined in the stack template are checked for\n drift. For more information, see Detecting\n Unregulated Configuration Changes to Stacks and Resources.
\nResources that do not currently support drift detection cannot be checked. For a list\n of resources that support drift detection, see Resources that Support\n Drift Detection.
\nUse DetectStackResourceDrift to detect drift on individual\n resources, or DetectStackDrift to detect drift on all resources in a\n given stack that support drift detection.
" + "smithy.api#documentation": "Contains the drift information for a resource that has been checked for drift. This\n includes actual and expected property values for resources in which CloudFormation has detected\n drift. Only resource properties explicitly defined in the stack template are checked for\n drift. For more information, see Detecting\n Unregulated Configuration Changes to Stacks and Resources.
\nResources that do not currently support drift detection cannot be checked. For a list of\n resources that support drift detection, see Resources that Support\n Drift Detection.
\nUse DetectStackResourceDrift to detect drift on individual resources,\n or DetectStackDrift to detect drift on all resources in a given stack\n that support drift detection.
" } }, "com.amazonaws.cloudformation#StackResourceDriftInformation": { @@ -8160,7 +8181,7 @@ "StackResourceDriftStatus": { "target": "com.amazonaws.cloudformation#StackResourceDriftStatus", "traits": { - "smithy.api#documentation": "Status of the resource's actual configuration compared to its expected\n configuration
\n\n DELETED
: The resource differs from its expected configuration in\n that it has been deleted.
\n MODIFIED
: The resource differs from its expected\n configuration.
\n NOT_CHECKED
: CloudFormation has not checked if the resource differs from\n its expected configuration.
Any resources that do not currently support drift detection have a status of\n NOT_CHECKED
. For more information, see Resources that Support Drift Detection.
\n IN_SYNC
: The resources's actual configuration matches its expected\n configuration.
Status of the resource's actual configuration compared to its expected\n configuration
\n\n DELETED
: The resource differs from its expected configuration in that\n it has been deleted.
\n MODIFIED
: The resource differs from its expected\n configuration.
\n NOT_CHECKED
: CloudFormation has not checked if the resource differs from its\n expected configuration.
Any resources that do not currently support drift detection have a status of\n NOT_CHECKED
. For more information, see Resources that Support Drift Detection.
\n IN_SYNC
: The resources's actual configuration matches its expected\n configuration.
Contains information about whether the resource's actual configuration differs, or\n has drifted, from its expected configuration.
" + "smithy.api#documentation": "Contains information about whether the resource's actual configuration differs, or has\n drifted, from its expected configuration.
" } }, "com.amazonaws.cloudformation#StackResourceDriftInformationSummary": { @@ -8181,7 +8202,7 @@ "StackResourceDriftStatus": { "target": "com.amazonaws.cloudformation#StackResourceDriftStatus", "traits": { - "smithy.api#documentation": "Status of the resource's actual configuration compared to its expected\n configuration
\n\n DELETED
: The resource differs from its expected configuration in\n that it has been deleted.
\n MODIFIED
: The resource differs from its expected\n configuration.
\n NOT_CHECKED
: CloudFormation has not checked if the resource differs from\n its expected configuration.
Any resources that do not currently support drift detection have a status of\n NOT_CHECKED
. For more information, see Resources that Support Drift Detection. If you performed an ContinueUpdateRollback operation on a stack, any resources included in\n ResourcesToSkip
will also have a status of NOT_CHECKED
.\n For more information on skipping resources during rollback operations, see Continue Rolling Back an Update in the CloudFormation User Guide.
\n IN_SYNC
: The resources's actual configuration matches its expected\n configuration.
Status of the resource's actual configuration compared to its expected\n configuration
\n\n DELETED
: The resource differs from its expected configuration in that\n it has been deleted.
\n MODIFIED
: The resource differs from its expected\n configuration.
\n NOT_CHECKED
: CloudFormation has not checked if the resource differs from its\n expected configuration.
Any resources that do not currently support drift detection have a status of\n NOT_CHECKED
. For more information, see Resources that Support Drift Detection. If you performed an ContinueUpdateRollback operation on a stack, any resources included in\n ResourcesToSkip
will also have a status of NOT_CHECKED
.\n For more information on skipping resources during rollback operations, see Continue Rolling Back an Update in the CloudFormation User Guide.
\n IN_SYNC
: The resources's actual configuration matches its expected\n configuration.
Summarizes information about whether the resource's actual configuration differs, or\n has drifted, from its expected configuration.
" + "smithy.api#documentation": "Summarizes information about whether the resource's actual configuration differs, or has\n drifted, from its expected configuration.
" } }, "com.amazonaws.cloudformation#StackResourceDriftStatus": { @@ -8262,7 +8283,7 @@ "ResourceType": { "target": "com.amazonaws.cloudformation#ResourceType", "traits": { - "smithy.api#documentation": "Type of resource. (For more information, go to Amazon Web Services\n Resource Types Reference in the CloudFormation User Guide.)
", + "smithy.api#documentation": "Type of resource. (For more information, go to Amazon Web Services Resource Types Reference in the CloudFormation User\n Guide.)
", "smithy.api#required": {} } }, @@ -8339,7 +8360,7 @@ "TemplateBody": { "target": "com.amazonaws.cloudformation#TemplateBody", "traits": { - "smithy.api#documentation": "The structure that contains the body of the template that was used to create or\n update the stack set.
" + "smithy.api#documentation": "The structure that contains the body of the template that was used to create or update\n the stack set.
" } }, "Parameters": { @@ -8351,13 +8372,13 @@ "Capabilities": { "target": "com.amazonaws.cloudformation#Capabilities", "traits": { - "smithy.api#documentation": "The capabilities that are allowed in the stack set. Some stack set templates might\n include resources that can affect permissions in your Amazon Web Services account—for example, by creating\n new Identity and Access Management (IAM) users. For more information, see Acknowledging IAM Resources in CloudFormation Templates.\n
" + "smithy.api#documentation": "The capabilities that are allowed in the stack set. Some stack set templates might\n include resources that can affect permissions in your Amazon Web Services account—for\n example, by creating new Identity and Access Management (IAM) users. For more information, see\n Acknowledging IAM Resources in CloudFormation Templates.\n
" } }, "Tags": { "target": "com.amazonaws.cloudformation#Tags", "traits": { - "smithy.api#documentation": "A list of tags that specify information about the stack set. A maximum number of 50\n tags can be specified.
" + "smithy.api#documentation": "A list of tags that specify information about the stack set. A maximum number of 50 tags\n can be specified.
" } }, "StackSetARN": { @@ -8405,12 +8426,12 @@ "ManagedExecution": { "target": "com.amazonaws.cloudformation#ManagedExecution", "traits": { - "smithy.api#documentation": "Describes whether StackSets performs non-conflicting operations concurrently and queues conflicting operations.
" + "smithy.api#documentation": "Describes whether StackSets performs non-conflicting operations concurrently and queues\n conflicting operations.
" } } }, "traits": { - "smithy.api#documentation": "A structure that contains information about a stack set. A stack set enables you to\n provision stacks into Amazon Web Services accounts and across Regions by using a single CloudFormation\n template. In the stack set, you specify the template to use, as well as any parameters and\n capabilities that the template requires.
" + "smithy.api#documentation": "A structure that contains information about a stack set. A stack set enables you to\n provision stacks into Amazon Web Services accounts and across Regions by using a single\n CloudFormation template. In the stack set, you specify the template to use, as\n well as any parameters and capabilities that the template requires.
" } }, "com.amazonaws.cloudformation#StackSetARN": { @@ -8588,19 +8609,19 @@ "Status": { "target": "com.amazonaws.cloudformation#StackSetOperationStatus", "traits": { - "smithy.api#documentation": "The status of the operation.
\n\n FAILED
: The operation exceeded the specified failure tolerance.\n The failure tolerance value that you've set for an operation is applied for each\n Region during stack create and update operations. If the number of failed stacks\n within a Region exceeds the failure tolerance, the status of the operation in the\n Region is set to FAILED
. This in turn sets the status of the operation\n as a whole to FAILED
, and CloudFormation cancels the operation in\n any remaining Regions.
\n QUEUED
: [Service-managed permissions] For automatic deployments that\n require a sequence of operations, the operation is queued to be performed. For more\n information, see the stack set operation status codes in the CloudFormation User\n Guide.
\n RUNNING
: The operation is currently being performed.
\n STOPPED
: The user has cancelled the operation.
\n STOPPING
: The operation is in the process of stopping, at user\n request.
\n SUCCEEDED
: The operation completed creating or updating all the\n specified stacks without exceeding the failure tolerance for the operation.
The status of the operation.
\n\n FAILED
: The operation exceeded the specified failure tolerance. The\n failure tolerance value that you've set for an operation is applied for each Region\n during stack create and update operations. If the number of failed stacks within a\n Region exceeds the failure tolerance, the status of the operation in the Region is\n set to FAILED
. This in turn sets the status of the operation as a whole\n to FAILED
, and CloudFormation cancels the operation in any\n remaining Regions.
\n QUEUED
: [Service-managed permissions] For automatic deployments that\n require a sequence of operations, the operation is queued to be performed. For more\n information, see the stack set operation status codes in the CloudFormation User\n Guide.
\n RUNNING
: The operation is currently being performed.
\n STOPPED
: The user has cancelled the operation.
\n STOPPING
: The operation is in the process of stopping, at user\n request.
\n SUCCEEDED
: The operation completed creating or updating all the\n specified stacks without exceeding the failure tolerance for the operation.
The preferences for how CloudFormation performs this stack set\n operation.
" + "smithy.api#documentation": "The preferences for how CloudFormation performs this stack set operation.
" } }, "RetainStacks": { "target": "com.amazonaws.cloudformation#RetainStacksNullable", "traits": { - "smithy.api#documentation": "For stack set operations of action type DELETE
, specifies whether to\n remove the stack instances from the specified stack set, but doesn't delete the stacks. You\n can't reassociate a retained stack, or add an existing, saved stack to a new stack\n set.
For stack set operations of action type DELETE
, specifies whether to remove\n the stack instances from the specified stack set, but doesn't delete the stacks. You can't\n reassociate a retained stack, or add an existing, saved stack to a new stack set.
The time at which the operation was initiated. Note that the creation times for the\n stack set operation might differ from the creation time of the individual stacks\n themselves. This is because CloudFormation needs to perform preparatory work for the\n operation, such as dispatching the work to the requested Regions, before actually creating\n the first stacks.
" + "smithy.api#documentation": "The time at which the operation was initiated. Note that the creation times for the\n stack set operation might differ from the creation time of the individual stacks\n themselves. This is because CloudFormation needs to perform preparatory work for\n the operation, such as dispatching the work to the requested Regions, before actually\n creating the first stacks.
" } }, "EndTimestamp": { @@ -8685,25 +8706,25 @@ "FailureToleranceCount": { "target": "com.amazonaws.cloudformation#FailureToleranceCount", "traits": { - "smithy.api#documentation": "The number of accounts, per Region, for which this operation can fail before\n CloudFormation stops the operation in that Region. If the operation is stopped in a Region,\n CloudFormation doesn't attempt the operation in any subsequent Regions.
\nConditional: You must specify either FailureToleranceCount
or\n FailureTolerancePercentage
(but not both).
By default, 0
is specified.
The number of accounts, per Region, for which this operation can fail before CloudFormation stops the operation in that Region. If the operation is stopped in a\n Region, CloudFormation doesn't attempt the operation in any subsequent\n Regions.
\nConditional: You must specify either FailureToleranceCount
or\n FailureTolerancePercentage
(but not both).
By default, 0
is specified.
The percentage of accounts, per Region, for which this stack operation can fail\n before CloudFormation stops the operation in that Region. If the operation is stopped\n in a Region, CloudFormation doesn't attempt the operation in any subsequent\n Regions.
\nWhen calculating the number of accounts based on the specified percentage,\n CloudFormation rounds down to the next whole number.
\nConditional: You must specify either FailureToleranceCount
or\n FailureTolerancePercentage
, but not both.
By default, 0
is specified.
The percentage of accounts, per Region, for which this stack operation can fail before\n CloudFormation stops the operation in that Region. If the operation is stopped\n in a Region, CloudFormation doesn't attempt the operation in any subsequent\n Regions.
\nWhen calculating the number of accounts based on the specified percentage, CloudFormation rounds down to the next whole number.
\nConditional: You must specify either FailureToleranceCount
or\n FailureTolerancePercentage
, but not both.
By default, 0
is specified.
The maximum number of accounts in which to perform this operation at one time. This\n is dependent on the value of\n FailureToleranceCount
. MaxConcurrentCount
is at most one more\n than the FailureToleranceCount
.
Note that this setting lets you specify the maximum for\n operations. For large deployments, under certain circumstances the actual number of\n accounts acted upon concurrently may be lower due to service throttling.
\nConditional: You must specify either MaxConcurrentCount
or\n MaxConcurrentPercentage
, but not both.
By default, 1
is specified.
The maximum number of accounts in which to perform this operation at one time. This is\n dependent on the value of FailureToleranceCount
.\n MaxConcurrentCount
is at most one more than the\n FailureToleranceCount
.
Note that this setting lets you specify the maximum for operations.\n For large deployments, under certain circumstances the actual number of accounts acted upon\n concurrently may be lower due to service throttling.
\nConditional: You must specify either MaxConcurrentCount
or\n MaxConcurrentPercentage
, but not both.
By default, 1
is specified.
The maximum percentage of accounts in which to perform this operation at one\n time.
\nWhen calculating the number of accounts based on the specified percentage,\n CloudFormation rounds down to the next whole number. This is true except in cases where\n rounding down would result is zero. In this case, CloudFormation sets the number as one\n instead.
\nNote that this setting lets you specify the maximum for\n operations. For large deployments, under certain circumstances the actual number of\n accounts acted upon concurrently may be lower due to service throttling.
\nConditional: You must specify either MaxConcurrentCount
or\n MaxConcurrentPercentage
, but not both.
By default, 1
is specified.
The maximum percentage of accounts in which to perform this operation at one\n time.
\nWhen calculating the number of accounts based on the specified percentage, CloudFormation rounds down to the next whole number. This is true except in cases where\n rounding down would result is zero. In this case, CloudFormation sets the number\n as one instead.
\nNote that this setting lets you specify the maximum for operations.\n For large deployments, under certain circumstances the actual number of accounts acted upon\n concurrently may be lower due to service throttling.
\nConditional: You must specify either MaxConcurrentCount
or\n MaxConcurrentPercentage
, but not both.
By default, 1
is specified.
[Self-managed permissions] The name of the Amazon Web Services account for this operation result.
" + "smithy.api#documentation": "[Self-managed permissions] The name of the Amazon Web Services account for this operation\n result.
" } }, "Region": { @@ -8762,7 +8783,7 @@ "Status": { "target": "com.amazonaws.cloudformation#StackSetOperationResultStatus", "traits": { - "smithy.api#documentation": "The result status of the stack set operation for the given account in the given\n Region.
\n\n CANCELLED
: The operation in the specified account and Region has\n been cancelled. This is either because a user has stopped the stack set operation, or\n because the failure tolerance of the stack set operation has been exceeded.
\n FAILED
: The operation in the specified account and Region failed.
If the stack set operation fails in enough accounts within a Region, the\n failure tolerance for the stack set operation as a whole might be exceeded.\n
\n\n RUNNING
: The operation in the specified account and Region is\n currently in progress.
\n PENDING
: The operation in the specified account and Region has yet\n to start.
\n SUCCEEDED
: The operation in the specified account and Region\n completed successfully.
The result status of the stack set operation for the given account in the given\n Region.
\n\n CANCELLED
: The operation in the specified account and Region has been\n cancelled. This is either because a user has stopped the stack set operation, or\n because the failure tolerance of the stack set operation has been exceeded.
\n FAILED
: The operation in the specified account and Region failed.
If the stack set operation fails in enough accounts within a Region, the failure\n tolerance for the stack set operation as a whole might be exceeded.
\n\n RUNNING
: The operation in the specified account and Region is\n currently in progress.
\n PENDING
: The operation in the specified account and Region has yet to\n start.
\n SUCCEEDED
: The operation in the specified account and Region\n completed successfully.
The type of operation: CREATE
, UPDATE
, or\n DELETE
. Create and delete operations affect only the specified stack\n instances that are associated with the specified stack set. Update operations affect both\n the stack set itself as well as all associated stack set\n instances.
The type of operation: CREATE
, UPDATE
, or DELETE
.\n Create and delete operations affect only the specified stack instances that are associated\n with the specified stack set. Update operations affect both the stack set itself as well as\n all associated stack set instances.
The overall status of the operation.
\n\n FAILED
: The operation exceeded the specified failure tolerance.\n The failure tolerance value that you've set for an operation is applied for each\n Region during stack create and update operations. If the number of failed stacks\n within a Region exceeds the failure tolerance, the status of the operation in the\n Region is set to FAILED
. This in turn sets the status of the operation\n as a whole to FAILED
, and CloudFormation cancels the operation in\n any remaining Regions.
\n QUEUED
: [Service-managed permissions] For automatic deployments that\n require a sequence of operations, the operation is queued to be performed. For more\n information, see the stack set operation status codes in the CloudFormation User\n Guide.
\n RUNNING
: The operation is currently being performed.
\n STOPPED
: The user has cancelled the operation.
\n STOPPING
: The operation is in the process of stopping, at user\n request.
\n SUCCEEDED
: The operation completed creating or updating all the\n specified stacks without exceeding the failure tolerance for the operation.
The overall status of the operation.
\n\n FAILED
: The operation exceeded the specified failure tolerance. The\n failure tolerance value that you've set for an operation is applied for each Region\n during stack create and update operations. If the number of failed stacks within a\n Region exceeds the failure tolerance, the status of the operation in the Region is\n set to FAILED
. This in turn sets the status of the operation as a whole\n to FAILED
, and CloudFormation cancels the operation in any\n remaining Regions.
\n QUEUED
: [Service-managed permissions] For automatic deployments that\n require a sequence of operations, the operation is queued to be performed. For more\n information, see the stack set operation status codes in the CloudFormation User\n Guide.
\n RUNNING
: The operation is currently being performed.
\n STOPPED
: The user has cancelled the operation.
\n STOPPING
: The operation is in the process of stopping, at user\n request.
\n SUCCEEDED
: The operation completed creating or updating all the\n specified stacks without exceeding the failure tolerance for the operation.
The time at which the operation was initiated. Note that the creation times for the\n stack set operation might differ from the creation time of the individual stacks\n themselves. This is because CloudFormation needs to perform preparatory work for the\n operation, such as dispatching the work to the requested Regions, before actually creating\n the first stacks.
" + "smithy.api#documentation": "The time at which the operation was initiated. Note that the creation times for the\n stack set operation might differ from the creation time of the individual stacks\n themselves. This is because CloudFormation needs to perform preparatory work for\n the operation, such as dispatching the work to the requested Regions, before actually\n creating the first stacks.
" } }, "EndTimestamp": { @@ -8860,7 +8881,7 @@ } }, "traits": { - "smithy.api#documentation": "The structures that contain summary information about the specified\n operation.
" + "smithy.api#documentation": "The structures that contain summary information about the specified operation.
" } }, "com.amazonaws.cloudformation#StackSetStatus": { @@ -8938,12 +8959,12 @@ "ManagedExecution": { "target": "com.amazonaws.cloudformation#ManagedExecution", "traits": { - "smithy.api#documentation": "Describes whether StackSets performs non-conflicting operations concurrently and queues conflicting operations.
" + "smithy.api#documentation": "Describes whether StackSets performs non-conflicting operations concurrently and queues\n conflicting operations.
" } } }, "traits": { - "smithy.api#documentation": "The structures that contain summary information about the specified stack\n set.
" + "smithy.api#documentation": "The structures that contain summary information about the specified stack set.
" } }, "com.amazonaws.cloudformation#StackStatus": { @@ -9092,7 +9113,7 @@ "LastUpdatedTime": { "target": "com.amazonaws.cloudformation#LastUpdatedTime", "traits": { - "smithy.api#documentation": "The time the stack was last updated. This field will only be returned if the stack\n has been updated at least once.
" + "smithy.api#documentation": "The time the stack was last updated. This field will only be returned if the stack has\n been updated at least once.
" } }, "DeletionTime": { @@ -9117,13 +9138,13 @@ "ParentId": { "target": "com.amazonaws.cloudformation#StackId", "traits": { - "smithy.api#documentation": "For nested stacks--stacks created as resources for another stack--the stack ID of the\n direct parent of this stack. For the first level of nested stacks, the root stack is also\n the parent stack.
\nFor more information, see Working with Nested Stacks in the\n CloudFormation User Guide.
" + "smithy.api#documentation": "For nested stacks--stacks created as resources for another stack--the stack ID of the\n direct parent of this stack. For the first level of nested stacks, the root stack is also\n the parent stack.
\nFor more information, see Working with Nested Stacks in the CloudFormation User Guide.
" } }, "RootId": { "target": "com.amazonaws.cloudformation#StackId", "traits": { - "smithy.api#documentation": "For nested stacks--stacks created as resources for another stack--the stack ID of the\n top-level stack to which the nested stack ultimately belongs.
\nFor more information, see Working with Nested Stacks in the\n CloudFormation User Guide.
" + "smithy.api#documentation": "For nested stacks--stacks created as resources for another stack--the stack ID of the\n top-level stack to which the nested stack ultimately belongs.
\nFor more information, see Working with Nested Stacks in the CloudFormation User Guide.
" } }, "DriftInformation": { @@ -9161,7 +9182,7 @@ "code": "StaleRequestException", "httpResponseCode": 409 }, - "smithy.api#documentation": "Another operation has been performed on this stack set since the specified operation\n was performed.
", + "smithy.api#documentation": "Another operation has been performed on this stack set since the specified operation was\n performed.
", "smithy.api#error": "client", "smithy.api#httpError": 409 } @@ -9204,7 +9225,7 @@ "StackSetName": { "target": "com.amazonaws.cloudformation#StackSetName", "traits": { - "smithy.api#documentation": "The name or unique ID of the stack set that you want to stop the operation\n for.
", + "smithy.api#documentation": "The name or unique ID of the stack set that you want to stop the operation for.
", "smithy.api#required": {} } }, @@ -9249,7 +9270,7 @@ "Key": { "target": "com.amazonaws.cloudformation#TagKey", "traits": { - "smithy.api#documentation": "\n Required. A string used to identify this tag. You can specify a\n maximum of 128 characters for a tag key. Tags owned by Amazon Web Services (Amazon Web Services) have the\n reserved prefix: aws:
.
\n Required. A string used to identify this tag. You can specify a\n maximum of 128 characters for a tag key. Tags owned by Amazon Web Services (Amazon Web Services) have the reserved prefix: aws:
.
The category of extensions to return.
\n\n REGISTERED
: Private extensions that have been registered for this\n account and region.
\n ACTIVATED
: Public extensions that have been activated for this\n account and region.
\n THIRD-PARTY
: Extensions available for use from publishers other than\n Amazon. This includes:
Private extensions registered in the account.
\nPublic extensions from publishers other than Amazon, whether activated or\n not.
\n\n AWS-TYPES
: Extensions available for use from Amazon.
The category of extensions to return.
\n\n REGISTERED
: Private extensions that have been registered for this\n account and region.
\n ACTIVATED
: Public extensions that have been activated for this\n account and region.
\n THIRD_PARTY
: Extensions available for use from publishers other than\n Amazon. This includes:
Private extensions registered in the account.
\nPublic extensions from publishers other than Amazon, whether activated or\n not.
\n\n AWS_TYPES
: Extensions available for use from Amazon.
The id of the publisher of the extension.
\nExtensions published by Amazon are not assigned a publisher ID. Use the\n AWS-TYPES
category to specify a list of types published by Amazon.
The id of the publisher of the extension.
\nExtensions published by Amazon are not assigned a publisher ID. Use the\n AWS_TYPE
category to specify a list of types published by Amazon.
Updates a stack as specified in the template. After the call completes successfully,\n the stack update starts. You can check the status of the stack via the DescribeStacks action.
\nTo get a copy of the template for an existing stack, you can use the GetTemplate action.
\nFor more information about creating an update template, updating a stack, and\n monitoring the progress of the update, see Updating a\n Stack.
" + "smithy.api#documentation": "Updates a stack as specified in the template. After the call completes successfully, the\n stack update starts. You can check the status of the stack via the DescribeStacks action.
\nTo get a copy of the template for an existing stack, you can use the GetTemplate action.
\nFor more information about creating an update template, updating a stack, and monitoring\n the progress of the update, see Updating a\n Stack.
" } }, "com.amazonaws.cloudformation#UpdateStackInput": { @@ -9988,7 +10009,7 @@ "TemplateURL": { "target": "com.amazonaws.cloudformation#TemplateURL", "traits": { - "smithy.api#documentation": "Location of file containing the template body. The URL must point to a template that\n is located in an Amazon S3 bucket or a Systems Manager document. For more information, go to\n Template Anatomy\n in the CloudFormation User Guide.
\nConditional: You must specify only one of the following parameters:\n TemplateBody
, TemplateURL
, or set the\n UsePreviousTemplate
to true
.
Location of file containing the template body. The URL must point to a template that is\n located in an Amazon S3 bucket or a Systems Manager document. For more information, go to\n Template Anatomy\n in the CloudFormation User Guide.
\nConditional: You must specify only one of the following parameters:\n TemplateBody
, TemplateURL
, or set the\n UsePreviousTemplate
to true
.
Structure containing the temporary overriding stack policy body. You can specify\n either the StackPolicyDuringUpdateBody
or the\n StackPolicyDuringUpdateURL
parameter, but not both.
If you want to update protected resources, specify a temporary overriding stack\n policy during this update. If you do not specify a stack policy, the current policy that is\n associated with the stack will be used.
" + "smithy.api#documentation": "Structure containing the temporary overriding stack policy body. You can specify either\n the StackPolicyDuringUpdateBody
or the StackPolicyDuringUpdateURL
\n parameter, but not both.
If you want to update protected resources, specify a temporary overriding stack policy\n during this update. If you do not specify a stack policy, the current policy that is\n associated with the stack will be used.
" } }, "StackPolicyDuringUpdateURL": { "target": "com.amazonaws.cloudformation#StackPolicyDuringUpdateURL", "traits": { - "smithy.api#documentation": "Location of a file containing the temporary overriding stack policy. The URL must\n point to a policy (max size: 16KB) located in an S3 bucket in\n the same Region as the stack. You can specify either the\n StackPolicyDuringUpdateBody
or the StackPolicyDuringUpdateURL
\n parameter, but not both.
If you want to update protected resources, specify a temporary overriding stack\n policy during this update. If you do not specify a stack policy, the current policy that is\n associated with the stack will be used.
" + "smithy.api#documentation": "Location of a file containing the temporary overriding stack policy. The URL must point\n to a policy (max size: 16KB) located in an S3 bucket in the same Region as the stack. You\n can specify either the StackPolicyDuringUpdateBody
or the\n StackPolicyDuringUpdateURL
parameter, but not both.
If you want to update protected resources, specify a temporary overriding stack policy\n during this update. If you do not specify a stack policy, the current policy that is\n associated with the stack will be used.
" } }, "Parameters": { "target": "com.amazonaws.cloudformation#Parameters", "traits": { - "smithy.api#documentation": "A list of Parameter
structures that specify input parameters for the\n stack. For more information, see the Parameter data\n type.
A list of Parameter
structures that specify input parameters for the stack.\n For more information, see the Parameter data\n type.
In some cases, you must explicitly acknowledge that your stack template contains certain\n capabilities in order for CloudFormation to update the stack.
\n\n CAPABILITY_IAM
and CAPABILITY_NAMED_IAM
\n
Some stack templates might include resources that can affect permissions in\n your Amazon Web Services account; for example, by creating new Identity and Access Management\n (IAM) users. For those stacks, you must explicitly acknowledge this by specifying one\n of these capabilities.
\nThe following IAM resources require you to specify either the\n CAPABILITY_IAM
or CAPABILITY_NAMED_IAM
\n capability.
If you have IAM resources, you can specify either capability.
\nIf you have IAM resources with custom names, you must\n specify CAPABILITY_NAMED_IAM
.
If you don't specify either of these capabilities, CloudFormation returns an\n InsufficientCapabilities
error.
If your stack template contains these resources, we recommend that you review\n all permissions associated with them and edit their permissions if\n necessary.
\n\n \n AWS::IAM::Group\n
\n\n \n AWS::IAM::Policy\n
\n\n \n AWS::IAM::Role\n
\n\n \n AWS::IAM::User\n
\nFor more information, see Acknowledging IAM\n Resources in CloudFormation Templates.
\n\n CAPABILITY_AUTO_EXPAND
\n
Some template contain macros. Macros perform custom processing on templates; this\n can include simple actions like find-and-replace operations, all the way to extensive\n transformations of entire templates. Because of this, users typically create a change\n set from the processed template, so that they can review the changes resulting from\n the macros before actually updating the stack. If your stack template contains one or\n more macros, and you choose to update a stack directly from the processed template,\n without first reviewing the resulting changes in a change set, you must acknowledge\n this capability. This includes the AWS::Include and AWS::Serverless transforms, which are macros hosted by CloudFormation.
\nIf you want to update a stack from a stack template that contains macros\n and nested stacks, you must update the stack directly from\n the template using this capability.
\nYou should only update stacks directly from a stack template that contains\n macros if you know what processing the macro performs.
\nEach macro relies on an underlying Lambda service function for processing stack\n templates. Be aware that the Lambda function owner can update the function\n operation without CloudFormation being notified.
\nFor more information, see Using\n CloudFormation Macros to Perform Custom Processing on\n Templates.
\nIn some cases, you must explicitly acknowledge that your stack template contains certain\n capabilities in order for CloudFormation to update the stack.
\n\n CAPABILITY_IAM
and CAPABILITY_NAMED_IAM
\n
Some stack templates might include resources that can affect permissions in your\n Amazon Web Services account; for example, by creating new Identity and Access Management\n (IAM) users. For those stacks, you must explicitly acknowledge this by specifying one\n of these capabilities.
\nThe following IAM resources require you to specify either the\n CAPABILITY_IAM
or CAPABILITY_NAMED_IAM
\n capability.
If you have IAM resources, you can specify either capability.
\nIf you have IAM resources with custom names, you must\n specify CAPABILITY_NAMED_IAM
.
If you don't specify either of these capabilities, CloudFormation returns an\n InsufficientCapabilities
error.
If your stack template contains these resources, we recommend that you review all\n permissions associated with them and edit their permissions if necessary.
\n\n \n AWS::IAM::Group\n
\n\n \n AWS::IAM::Policy\n
\n\n \n AWS::IAM::Role\n
\n\n \n AWS::IAM::User\n
\nFor more information, see Acknowledging IAM\n Resources in CloudFormation Templates.
\n\n CAPABILITY_AUTO_EXPAND
\n
Some template contain macros. Macros perform custom processing on templates; this\n can include simple actions like find-and-replace operations, all the way to extensive\n transformations of entire templates. Because of this, users typically create a change\n set from the processed template, so that they can review the changes resulting from\n the macros before actually updating the stack. If your stack template contains one or\n more macros, and you choose to update a stack directly from the processed template,\n without first reviewing the resulting changes in a change set, you must acknowledge\n this capability. This includes the AWS::Include and AWS::Serverless transforms, which are macros hosted by CloudFormation.
\nIf you want to update a stack from a stack template that contains macros\n and nested stacks, you must update the stack directly from\n the template using this capability.
\nYou should only update stacks directly from a stack template that contains\n macros if you know what processing the macro performs.
\nEach macro relies on an underlying Lambda service function for processing stack\n templates. Be aware that the Lambda function owner can update the function\n operation without CloudFormation being notified.
\nFor more information, see Using\n CloudFormation Macros to Perform Custom Processing on\n Templates.
\nThe template resource types that you have permissions to work with for this update\n stack action, such as AWS::EC2::Instance
, AWS::EC2::*
, or\n Custom::MyCustomInstance
.
If the list of resource types doesn't include a resource that you're updating, the\n stack update fails. By default, CloudFormation grants permissions to all resource\n types. Identity and Access Management (IAM) uses this parameter for CloudFormation-specific condition keys in IAM policies. For more information, see Controlling Access with Identity and Access Management.
" + "smithy.api#documentation": "The template resource types that you have permissions to work with for this update stack\n action, such as AWS::EC2::Instance
, AWS::EC2::*
, or\n Custom::MyCustomInstance
.
If the list of resource types doesn't include a resource that you're updating, the stack\n update fails. By default, CloudFormation grants permissions to all resource types.\n Identity and Access Management (IAM) uses this parameter for CloudFormation-specific\n condition keys in IAM policies. For more information, see Controlling Access with\n Identity and Access Management.
" } }, "RoleARN": { "target": "com.amazonaws.cloudformation#RoleARN", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role\n that CloudFormation assumes to update the stack. CloudFormation uses the role's\n credentials to make calls on your behalf. CloudFormation always uses this role for all\n future operations on the stack. As long as users have permission to operate on the stack,\n CloudFormation uses this role even if the users don't have permission to pass it.\n Ensure that the role grants least privilege.
\nIf you don't specify a value, CloudFormation uses the role that was previously\n associated with the stack. If no role is available, CloudFormation uses a temporary\n session that is generated from your user credentials.
" + "smithy.api#documentation": "The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role that CloudFormation assumes to update the stack. CloudFormation uses the role's\n credentials to make calls on your behalf. CloudFormation always uses this role for\n all future operations on the stack. As long as users have permission to operate on the\n stack, CloudFormation uses this role even if the users don't have permission to\n pass it. Ensure that the role grants least privilege.
\nIf you don't specify a value, CloudFormation uses the role that was previously\n associated with the stack. If no role is available, CloudFormation uses a temporary\n session that is generated from your user credentials.
" } }, "RollbackConfiguration": { @@ -10042,19 +10063,19 @@ "StackPolicyBody": { "target": "com.amazonaws.cloudformation#StackPolicyBody", "traits": { - "smithy.api#documentation": "Structure containing a new stack policy body. You can specify either the\n StackPolicyBody
or the StackPolicyURL
parameter, but not\n both.
You might update the stack policy, for example, in order to protect a new resource\n that you created during a stack update. If you do not specify a stack policy, the current\n policy that is associated with the stack is unchanged.
" + "smithy.api#documentation": "Structure containing a new stack policy body. You can specify either the\n StackPolicyBody
or the StackPolicyURL
parameter, but not\n both.
You might update the stack policy, for example, in order to protect a new resource that\n you created during a stack update. If you do not specify a stack policy, the current policy\n that is associated with the stack is unchanged.
" } }, "StackPolicyURL": { "target": "com.amazonaws.cloudformation#StackPolicyURL", "traits": { - "smithy.api#documentation": "Location of a file containing the updated stack policy. The URL must point to a\n policy (max size: 16KB) located in an S3 bucket in the same\n Region as the stack. You can specify either the StackPolicyBody
or the\n StackPolicyURL
parameter, but not both.
You might update the stack policy, for example, in order to protect a new resource\n that you created during a stack update. If you do not specify a stack policy, the current\n policy that is associated with the stack is unchanged.
" + "smithy.api#documentation": "Location of a file containing the updated stack policy. The URL must point to a policy\n (max size: 16KB) located in an S3 bucket in the same Region as the stack. You can specify\n either the StackPolicyBody
or the StackPolicyURL
parameter, but\n not both.
You might update the stack policy, for example, in order to protect a new resource that\n you created during a stack update. If you do not specify a stack policy, the current policy\n that is associated with the stack is unchanged.
" } }, "NotificationARNs": { "target": "com.amazonaws.cloudformation#NotificationARNs", "traits": { - "smithy.api#documentation": "Amazon Simple Notification Service topic Amazon Resource Names (ARNs) that\n CloudFormation associates with the stack. Specify an empty list to remove all notification\n topics.
" + "smithy.api#documentation": "Amazon Simple Notification Service topic Amazon Resource Names (ARNs) that CloudFormation associates with the stack. Specify an empty list to remove all\n notification topics.
" } }, "Tags": { @@ -10072,7 +10093,7 @@ "ClientRequestToken": { "target": "com.amazonaws.cloudformation#ClientRequestToken", "traits": { - "smithy.api#documentation": "A unique identifier for this UpdateStack
request. Specify this token if\n you plan to retry requests so that CloudFormation knows that you're not attempting to\n update a stack with the same name. You might retry UpdateStack
requests to\n ensure that CloudFormation successfully received them.
All events triggered by a given stack operation are assigned the same client request\n token, which you can use to track operations. For example, if you execute a\n CreateStack
operation with the token token1
, then all the\n StackEvents
generated by that operation will have\n ClientRequestToken
set as token1
.
In the console, stack operations display the client request token on the Events tab.\n Stack operations that are initiated from the console use the token format\n Console-StackOperation-ID, which helps you easily identify the\n stack operation . For example, if you create a stack using the console, each stack event\n would be assigned the same token in the following format:\n Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002
.
A unique identifier for this UpdateStack
request. Specify this token if you\n plan to retry requests so that CloudFormation knows that you're not attempting to\n update a stack with the same name. You might retry UpdateStack
requests to\n ensure that CloudFormation successfully received them.
All events triggered by a given stack operation are assigned the same client request\n token, which you can use to track operations. For example, if you execute a\n CreateStack
operation with the token token1
, then all the\n StackEvents
generated by that operation will have\n ClientRequestToken
set as token1
.
In the console, stack operations display the client request token on the Events tab.\n Stack operations that are initiated from the console use the token format\n Console-StackOperation-ID, which helps you easily identify the\n stack operation . For example, if you create a stack using the console, each stack event\n would be assigned the same token in the following format:\n Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002
.
Updates the parameter values for stack instances for the specified accounts, within\n the specified Regions. A stack instance refers to a stack in a specific account and Region.
\nYou can only update stack instances in Regions and accounts where they already exist;\n to create additional stack instances, use CreateStackInstances.
\nDuring stack set updates, any parameters overridden for a stack instance are not\n updated, but retain their overridden value.
\nYou can only update the parameter values that are specified in\n the stack set; to add or delete a parameter itself, use UpdateStackSet to update the stack set template. If you add a parameter to a\n template, before you can override the parameter value specified in the stack set you must\n first use UpdateStackSet to update all stack instances with the updated template and\n parameter value specified in the stack set. Once a stack instance has been updated with the\n new parameter, you can then override the parameter value using\n UpdateStackInstances
.
Updates the parameter values for stack instances for the specified accounts, within the\n specified Regions. A stack instance refers to a stack in a specific account and Region.
\nYou can only update stack instances in Regions and accounts where they already exist; to\n create additional stack instances, use CreateStackInstances.
\nDuring stack set updates, any parameters overridden for a stack instance are not\n updated, but retain their overridden value.
\nYou can only update the parameter values that are specified in the\n stack set; to add or delete a parameter itself, use UpdateStackSet to update the stack set template. If you add a parameter to a\n template, before you can override the parameter value specified in the stack set you must\n first use UpdateStackSet to update all stack instances with the updated template and\n parameter value specified in the stack set. Once a stack instance has been updated with the\n new parameter, you can then override the parameter value using\n UpdateStackInstances
.
[Self-managed permissions] The names of one or more Amazon Web Services accounts for which you want to update parameter values\n for stack instances. The overridden parameter values will be applied to all stack instances\n in the specified accounts and Regions.
\nYou can specify Accounts
or DeploymentTargets
, but not both.
[Self-managed permissions] The names of one or more Amazon Web Services accounts for\n which you want to update parameter values for stack instances. The overridden parameter\n values will be applied to all stack instances in the specified accounts and Regions.
\nYou can specify Accounts
or DeploymentTargets
, but not\n both.
The names of one or more Regions in which you want to update parameter values for\n stack instances. The overridden parameter values will be applied to all stack instances in\n the specified accounts and Regions.
", + "smithy.api#documentation": "The names of one or more Regions in which you want to update parameter values for stack\n instances. The overridden parameter values will be applied to all stack instances in the\n specified accounts and Regions.
", "smithy.api#required": {} } }, "ParameterOverrides": { "target": "com.amazonaws.cloudformation#Parameters", "traits": { - "smithy.api#documentation": "A list of input parameters whose values you want to update for the specified stack\n instances.
\nAny overridden parameter values will be applied to all stack instances in the\n specified accounts and Regions. When specifying parameters and their values, be aware of\n how CloudFormation sets parameter values during stack instance update\n operations:
\nTo override the current value for a parameter, include the parameter and\n specify its value.
\nTo leave an overridden parameter set to its present value, include the parameter and specify UsePreviousValue
as\n true
. (You cannot specify both a value and set\n UsePreviousValue
to true
.)
To set an overridden parameter back to the value specified in the stack set,\n specify a parameter list but do not include the parameter in the list.
\nTo leave all parameters set to their present values, do not specify this\n property at all.
\nDuring stack set updates, any parameter values overridden for a stack instance are\n not updated, but retain their overridden value.
\nYou can only override the parameter values that are specified in\n the stack set; to add or delete a parameter itself, use UpdateStackSet
to\n update the stack set template. If you add a parameter to a template, before you can\n override the parameter value specified in the stack set you must first use UpdateStackSet to update all stack instances with the updated template and\n parameter value specified in the stack set. Once a stack instance has been updated with the\n new parameter, you can then override the parameter value using\n UpdateStackInstances
.
A list of input parameters whose values you want to update for the specified stack\n instances.
\nAny overridden parameter values will be applied to all stack instances in the specified\n accounts and Regions. When specifying parameters and their values, be aware of how CloudFormation sets parameter values during stack instance update operations:
\nTo override the current value for a parameter, include the parameter and specify\n its value.
\nTo leave an overridden parameter set to its present value, include the parameter\n and specify UsePreviousValue
as true
. (You cannot specify\n both a value and set UsePreviousValue
to true
.)
To set an overridden parameter back to the value specified in the stack set,\n specify a parameter list but do not include the parameter in the list.
\nTo leave all parameters set to their present values, do not specify this property\n at all.
\nDuring stack set updates, any parameter values overridden for a stack instance are not\n updated, but retain their overridden value.
\nYou can only override the parameter values that are specified in\n the stack set; to add or delete a parameter itself, use UpdateStackSet
to\n update the stack set template. If you add a parameter to a template, before you can\n override the parameter value specified in the stack set you must first use UpdateStackSet to update all stack instances with the updated template and\n parameter value specified in the stack set. Once a stack instance has been updated with the\n new parameter, you can then override the parameter value using\n UpdateStackInstances
.
The unique identifier for this stack set operation.
\nThe operation ID also functions as an idempotency token, to ensure that\n CloudFormation performs the stack set operation only once, even if you retry the request\n multiple times. You might retry stack set operation requests to ensure that\n CloudFormation successfully received them.
\nIf you don't specify an operation ID, the SDK generates one automatically.\n
", + "smithy.api#documentation": "The unique identifier for this stack set operation.
\nThe operation ID also functions as an idempotency token, to ensure that CloudFormation performs the stack set operation only once, even if you retry the request\n multiple times. You might retry stack set operation requests to ensure that CloudFormation successfully received them.
\nIf you don't specify an operation ID, the SDK generates one automatically.\n
", "smithy.api#idempotencyToken": {} } }, @@ -10222,7 +10243,7 @@ } ], "traits": { - "smithy.api#documentation": "Updates the stack set, and associated stack instances in the specified accounts and\n Regions.
\nEven if the stack set operation created by updating the stack set fails (completely\n or partially, below or above a specified failure tolerance), the stack set is updated with\n your changes. Subsequent CreateStackInstances calls on the specified\n stack set use the updated stack set.
" + "smithy.api#documentation": "Updates the stack set, and associated stack instances in the specified accounts and\n Regions.
\nEven if the stack set operation created by updating the stack set fails (completely or\n partially, below or above a specified failure tolerance), the stack set is updated with\n your changes. Subsequent CreateStackInstances calls on the specified\n stack set use the updated stack set.
" } }, "com.amazonaws.cloudformation#UpdateStackSetInput": { @@ -10268,13 +10289,13 @@ "Capabilities": { "target": "com.amazonaws.cloudformation#Capabilities", "traits": { - "smithy.api#documentation": "In some cases, you must explicitly acknowledge that your stack template contains certain\n capabilities in order for CloudFormation to update the stack set and its associated stack\n instances.
\n\n CAPABILITY_IAM
and CAPABILITY_NAMED_IAM
\n
Some stack templates might include resources that can affect permissions in\n your Amazon Web Services account; for example, by creating new Identity and Access Management\n (IAM) users. For those stacks sets, you must explicitly acknowledge this by\n specifying one of these capabilities.
\nThe following IAM resources require you to specify either the\n CAPABILITY_IAM
or CAPABILITY_NAMED_IAM
\n capability.
If you have IAM resources, you can specify either capability.
\nIf you have IAM resources with custom names, you must\n specify CAPABILITY_NAMED_IAM
.
If you don't specify either of these capabilities, CloudFormation returns an\n InsufficientCapabilities
error.
If your stack template contains these resources, we recommend that you review\n all permissions associated with them and edit their permissions if\n necessary.
\n\n \n AWS::IAM::Group\n
\n\n \n AWS::IAM::Policy\n
\n\n \n AWS::IAM::Role\n
\n\n \n AWS::IAM::User\n
\nFor more information, see Acknowledging IAM\n Resources in CloudFormation Templates.
\n\n CAPABILITY_AUTO_EXPAND
\n
Some templates reference macros. If your stack set template references one or more\n macros, you must update the stack set directly from the processed template, without\n first reviewing the resulting changes in a change set. To update the stack set\n directly, you must acknowledge this capability. For more information, see Using CloudFormation Macros to\n Perform Custom Processing on Templates.
\nStack sets with service-managed permissions do not currently support the use of\n macros in templates. (This includes the AWS::Include and AWS::Serverless\n transforms, which are macros hosted by CloudFormation.) Even if you specify this capability\n for a stack set with service-managed permissions, if you reference a macro in your\n template the stack set operation will fail.
\nIn some cases, you must explicitly acknowledge that your stack template contains certain\n capabilities in order for CloudFormation to update the stack set and its associated stack\n instances.
\n\n CAPABILITY_IAM
and CAPABILITY_NAMED_IAM
\n
Some stack templates might include resources that can affect permissions in your\n Amazon Web Services account; for example, by creating new Identity and Access Management\n (IAM) users. For those stacks sets, you must explicitly acknowledge this by\n specifying one of these capabilities.
\nThe following IAM resources require you to specify either the\n CAPABILITY_IAM
or CAPABILITY_NAMED_IAM
\n capability.
If you have IAM resources, you can specify either capability.
\nIf you have IAM resources with custom names, you must\n specify CAPABILITY_NAMED_IAM
.
If you don't specify either of these capabilities, CloudFormation returns an\n InsufficientCapabilities
error.
If your stack template contains these resources, we recommend that you review all\n permissions associated with them and edit their permissions if necessary.
\n\n \n AWS::IAM::Group\n
\n\n \n AWS::IAM::Policy\n
\n\n \n AWS::IAM::Role\n
\n\n \n AWS::IAM::User\n
\nFor more information, see Acknowledging IAM\n Resources in CloudFormation Templates.
\n\n CAPABILITY_AUTO_EXPAND
\n
Some templates reference macros. If your stack set template references one or more\n macros, you must update the stack set directly from the processed template, without\n first reviewing the resulting changes in a change set. To update the stack set\n directly, you must acknowledge this capability. For more information, see Using CloudFormation Macros to\n Perform Custom Processing on Templates.
\nStack sets with service-managed permissions do not currently support the use of\n macros in templates. (This includes the AWS::Include and AWS::Serverless\n transforms, which are macros hosted by CloudFormation.) Even if you specify this capability\n for a stack set with service-managed permissions, if you reference a macro in your\n template the stack set operation will fail.
\nThe key-value pairs to associate with this stack set and the stacks created from it.\n CloudFormation also propagates these tags to supported resources that are created in\n the stacks. You can specify a maximum number of 50 tags.
\nIf you specify tags for this parameter, those tags replace any list of tags that are\n currently associated with this stack set. This means:
\nIf you don't specify this parameter, CloudFormation doesn't modify the\n stack's tags.
\nIf you specify any tags using this parameter, you must\n specify all the tags that you want associated with this stack\n set, even tags you've specifed before (for example, when creating the stack set or\n during a previous update of the stack set.). Any tags that you don't include in the\n updated list of tags are removed from the stack set, and therefore from the stacks\n and resources as well.
\nIf you specify an empty value, CloudFormation removes all currently\n associated tags.
\nIf you specify new tags as part of an UpdateStackSet
action,\n CloudFormation checks to see if you have the required IAM permission to tag resources. If\n you omit tags that are currently associated with the stack set from the list of tags you\n specify, CloudFormation assumes that you want to remove those tags from the stack set,\n and checks to see if you have permission to untag resources. If you don't have the\n necessary permission(s), the entire UpdateStackSet
action fails with an\n access denied
error, and the stack set is not updated.
The key-value pairs to associate with this stack set and the stacks created from it.\n CloudFormation also propagates these tags to supported resources that are\n created in the stacks. You can specify a maximum number of 50 tags.
\nIf you specify tags for this parameter, those tags replace any list of tags that are\n currently associated with this stack set. This means:
\nIf you don't specify this parameter, CloudFormation doesn't modify the\n stack's tags.
\nIf you specify any tags using this parameter, you must\n specify all the tags that you want associated with this stack\n set, even tags you've specifed before (for example, when creating the stack set or\n during a previous update of the stack set.). Any tags that you don't include in the\n updated list of tags are removed from the stack set, and therefore from the stacks\n and resources as well.
\nIf you specify an empty value, CloudFormation removes all currently\n associated tags.
\nIf you specify new tags as part of an UpdateStackSet
action, CloudFormation checks to see if you have the required IAM permission to tag resources.\n If you omit tags that are currently associated with the stack set from the list of tags you\n specify, CloudFormation assumes that you want to remove those tags from the stack\n set, and checks to see if you have permission to untag resources. If you don't have the\n necessary permission(s), the entire UpdateStackSet
action fails with an\n access denied
error, and the stack set is not updated.
The unique ID for this stack set operation.
\nThe operation ID also functions as an idempotency token, to ensure that\n CloudFormation performs the stack set operation only once, even if you retry the request\n multiple times. You might retry stack set operation requests to ensure that\n CloudFormation successfully received them.
\nIf you don't specify an operation ID, CloudFormation generates one\n automatically.
\nRepeating this stack set operation with a new operation ID retries all stack\n instances whose status is OUTDATED
.
The unique ID for this stack set operation.
\nThe operation ID also functions as an idempotency token, to ensure that CloudFormation performs the stack set operation only once, even if you retry the request\n multiple times. You might retry stack set operation requests to ensure that CloudFormation successfully received them.
\nIf you don't specify an operation ID, CloudFormation generates one\n automatically.
\nRepeating this stack set operation with a new operation ID retries all stack instances\n whose status is OUTDATED
.
Describes whether StackSets performs non-conflicting operations concurrently and queues conflicting operations.
" + "smithy.api#documentation": "Describes whether StackSets performs non-conflicting operations concurrently and queues\n conflicting operations.
" } } } @@ -10366,7 +10387,7 @@ "target": "com.amazonaws.cloudformation#UpdateTerminationProtectionOutput" }, "traits": { - "smithy.api#documentation": "Updates termination protection for the specified stack. If a user attempts to delete\n a stack with termination protection enabled, the operation fails and the stack remains\n unchanged. For more information, see Protecting a\n Stack From Being Deleted in the CloudFormation User Guide.
\nFor nested\n stacks, termination protection is set on the root stack and cannot be changed\n directly on the nested stack.
" + "smithy.api#documentation": "Updates termination protection for the specified stack. If a user attempts to delete a\n stack with termination protection enabled, the operation fails and the stack remains\n unchanged. For more information, see Protecting a\n Stack From Being Deleted in the CloudFormation User Guide.
\nFor nested\n stacks, termination protection is set on the root stack and cannot be changed\n directly on the nested stack.
" } }, "com.amazonaws.cloudformation#UpdateTerminationProtectionInput": { @@ -10423,7 +10444,7 @@ "target": "com.amazonaws.cloudformation#ValidateTemplateOutput" }, "traits": { - "smithy.api#documentation": "Validates a specified template. CloudFormation first checks if the template is\n valid JSON. If it isn't, CloudFormation checks if the template is valid YAML. If both\n these checks fail, CloudFormation returns a template validation error.
" + "smithy.api#documentation": "Validates a specified template. CloudFormation first checks if the template is\n valid JSON. If it isn't, CloudFormation checks if the template is valid YAML. If\n both these checks fail, CloudFormation returns a template validation error.
" } }, "com.amazonaws.cloudformation#ValidateTemplateInput": { @@ -10464,7 +10485,7 @@ "Capabilities": { "target": "com.amazonaws.cloudformation#Capabilities", "traits": { - "smithy.api#documentation": "The capabilities found within the template. If your template contains IAM resources,\n you must specify the CAPABILITY_IAM or CAPABILITY_NAMED_IAM value for this parameter when\n you use the CreateStack or UpdateStack actions with\n your template; otherwise, those actions return an InsufficientCapabilities error.
\nFor more information, see Acknowledging IAM Resources in CloudFormation Templates.
" + "smithy.api#documentation": "The capabilities found within the template. If your template contains IAM resources, you\n must specify the CAPABILITY_IAM or CAPABILITY_NAMED_IAM value for this parameter when you\n use the CreateStack or UpdateStack actions with your\n template; otherwise, those actions return an InsufficientCapabilities error.
\nFor more information, see Acknowledging IAM Resources in CloudFormation Templates.
" } }, "CapabilitiesReason": { diff --git a/codegen/sdk-codegen/aws-models/computeoptimizer.2019-11-01.json b/codegen/sdk-codegen/aws-models/computeoptimizer.2019-11-01.json index c82e32c79d9..0d06b593e15 100644 --- a/codegen/sdk-codegen/aws-models/computeoptimizer.2019-11-01.json +++ b/codegen/sdk-codegen/aws-models/computeoptimizer.2019-11-01.json @@ -60,7 +60,7 @@ "statusReason": { "target": "com.amazonaws.computeoptimizer#StatusReason", "traits": { - "smithy.api#documentation": "The reason for the account enrollment status.
\n\nFor example, an account might show a status of Pending
because member\n accounts of an organization require more time to be enrolled in the service.
The reason for the account enrollment status.
\nFor example, an account might show a status of Pending
because member\n accounts of an organization require more time to be enrolled in the service.
The finding classification of the Auto Scaling group.
\n\nFindings for Auto Scaling groups include:
\n\n\n \n NotOptimized
\n —An Auto Scaling group is considered not optimized when Compute Optimizer identifies a\n recommendation that can provide better performance for your workload.
\n \n Optimized
\n —An Auto Scaling\n group is considered optimized when Compute Optimizer determines that the group\n is correctly provisioned to run your workload based on the chosen instance type.\n For optimized resources, Compute Optimizer might recommend a new generation\n instance type.
The finding classification of the Auto Scaling group.
\nFindings for Auto Scaling groups include:
\n\n \n NotOptimized
\n —An Auto Scaling group is considered not optimized when Compute Optimizer identifies a\n recommendation that can provide better performance for your workload.
\n \n Optimized
\n —An Auto Scaling\n group is considered optimized when Compute Optimizer determines that the group\n is correctly provisioned to run your workload based on the chosen instance type.\n For optimized resources, Compute Optimizer might recommend a new generation\n instance type.
The timestamp of when the Auto Scaling group recommendation was last\n refreshed.
" + "smithy.api#documentation": "The timestamp of when the Auto Scaling group recommendation was last\n generated.
" + } + }, + "currentPerformanceRisk": { + "target": "com.amazonaws.computeoptimizer#CurrentPerformanceRisk", + "traits": { + "smithy.api#documentation": "The risk of the current Auto Scaling group not meeting the performance needs of\n its workloads. The higher the risk, the more likely the current Auto Scaling group\n configuration has insufficient capacity and cannot meet workload requirements.
" + } + }, + "effectiveRecommendationPreferences": { + "target": "com.amazonaws.computeoptimizer#EffectiveRecommendationPreferences", + "traits": { + "smithy.api#documentation": "An object that describes the effective recommendation preferences for the Auto Scaling group.
" } } }, @@ -207,19 +219,25 @@ "projectedUtilizationMetrics": { "target": "com.amazonaws.computeoptimizer#ProjectedUtilizationMetrics", "traits": { - "smithy.api#documentation": "An array of objects that describe the projected utilization metrics of the Auto Scaling group recommendation option.
\n\nThe Cpu
and Memory
metrics are the only projected\n utilization metrics returned. Additionally, the Memory
metric is\n returned only for resources that have the unified CloudWatch agent installed\n on them. For more information, see Enabling Memory\n Utilization with the CloudWatch Agent.
An array of objects that describe the projected utilization metrics of the Auto Scaling group recommendation option.
\nThe Cpu
and Memory
metrics are the only projected\n utilization metrics returned. Additionally, the Memory
metric is\n returned only for resources that have the unified CloudWatch agent installed\n on them. For more information, see Enabling Memory\n Utilization with the CloudWatch Agent.
The performance risk of the Auto Scaling group configuration\n recommendation.
\n\nPerformance risk indicates the likelihood of the recommended instance type not meeting\n the resource needs of your workload. Compute Optimizer calculates an individual\n performance risk score for each specification of the recommended instance, including\n CPU, memory, EBS throughput, EBS IOPS, disk throughput, disk IOPS, network throughput,\n and network PPS.\n The performance\n risk of the recommended instance is calculated as the maximum performance risk score\n across the analyzed resource specifications.
\n\nThe value ranges from 0
- 4
, with 0
meaning\n that the recommended resource is predicted to always provide enough hardware capability.\n The higher the performance risk is, the more likely you should validate whether the\n recommendation will meet the performance requirements of your workload before migrating\n your resource.
The performance risk of the Auto Scaling group configuration\n recommendation.
\nPerformance risk indicates the likelihood of the recommended instance type not meeting\n the resource needs of your workload. Compute Optimizer calculates an individual\n performance risk score for each specification of the recommended instance, including\n CPU, memory, EBS throughput, EBS IOPS, disk throughput, disk IOPS, network throughput,\n and network PPS.\n The performance\n risk of the recommended instance is calculated as the maximum performance risk score\n across the analyzed resource specifications.
\nThe value ranges from 0
- 4
, with 0
meaning\n that the recommended resource is predicted to always provide enough hardware capability.\n The higher the performance risk is, the more likely you should validate whether the\n recommendation will meet the performance requirements of your workload before migrating\n your resource.
The rank of the Auto Scaling group recommendation option.
\n\nThe top recommendation option is ranked as 1
.
The rank of the Auto Scaling group recommendation option.
\nThe top recommendation option is ranked as 1
.
An object that describes the savings opportunity for the Auto Scaling group\n recommendation option. Savings opportunity includes the estimated monthly savings amount\n and percentage.
" } } }, @@ -244,8 +262,26 @@ }, "com.amazonaws.computeoptimizer#ComputeOptimizerService": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "Compute Optimizer", + "arnNamespace": "compute-optimizer", + "cloudFormationName": "ComputeOptimizer", + "cloudTrailEventSource": "computeoptimizer.amazonaws.com", + "endpointPrefix": "compute-optimizer" + }, + "aws.auth#sigv4": { + "name": "compute-optimizer" + }, + "aws.protocols#awsJson1_0": {}, + "smithy.api#documentation": "Compute Optimizer is a service that analyzes the configuration and utilization\n metrics of your Amazon Web Services compute resources, such as Amazon EC2\n instances, Amazon EC2 Auto Scaling groups, Lambda functions, and Amazon EBS volumes. It reports whether your resources are optimal, and generates\n optimization recommendations to reduce the cost and improve the performance of your\n workloads. Compute Optimizer also provides recent utilization metric data, in addition\n to projected utilization metric data for the recommendations, which you can use to\n evaluate which recommendation provides the best price-performance trade-off. The\n analysis of your usage patterns can help you decide when to move or resize your running\n resources, and still meet your performance and capacity requirements. For more\n information about Compute Optimizer, including the required permissions to use the\n service, see the Compute Optimizer User Guide.
", + "smithy.api#title": "AWS Compute Optimizer" + }, "version": "2019-11-01", "operations": [ + { + "target": "com.amazonaws.computeoptimizer#DeleteRecommendationPreferences" + }, { "target": "com.amazonaws.computeoptimizer#DescribeRecommendationExportJobs" }, @@ -273,6 +309,9 @@ { "target": "com.amazonaws.computeoptimizer#GetEC2RecommendationProjectedMetrics" }, + { + "target": "com.amazonaws.computeoptimizer#GetEffectiveRecommendationPreferences" + }, { "target": "com.amazonaws.computeoptimizer#GetEnrollmentStatus" }, @@ -282,28 +321,19 @@ { "target": "com.amazonaws.computeoptimizer#GetLambdaFunctionRecommendations" }, + { + "target": "com.amazonaws.computeoptimizer#GetRecommendationPreferences" + }, { "target": "com.amazonaws.computeoptimizer#GetRecommendationSummaries" }, + { + "target": "com.amazonaws.computeoptimizer#PutRecommendationPreferences" + }, { "target": "com.amazonaws.computeoptimizer#UpdateEnrollmentStatus" } - ], - "traits": { - "aws.api#service": { - "sdkId": "Compute Optimizer", - "arnNamespace": "compute-optimizer", - "cloudFormationName": "ComputeOptimizer", - "cloudTrailEventSource": "computeoptimizer.amazonaws.com", - "endpointPrefix": "compute-optimizer" - }, - "aws.auth#sigv4": { - "name": "compute-optimizer" - }, - "aws.protocols#awsJson1_0": {}, - "smithy.api#documentation": "Compute Optimizer is a service that analyzes the configuration and utilization\n metrics of your Amazon Web Services compute resources, such as Amazon EC2\n instances, Amazon EC2 Auto Scaling groups, Lambda functions, and Amazon EBS volumes. It reports whether your resources are optimal, and generates\n optimization recommendations to reduce the cost and improve the performance of your\n workloads. Compute Optimizer also provides recent utilization metric data, in addition\n to projected utilization metric data for the recommendations, which you can use to\n evaluate which recommendation provides the best price-performance trade-off. The\n analysis of your usage patterns can help you decide when to move or resize your running\n resources, and still meet your performance and capacity requirements. For more\n information about Compute Optimizer, including the required permissions to use the\n service, see the Compute Optimizer User Guide.
", - "smithy.api#title": "AWS Compute Optimizer" - } + ] }, "com.amazonaws.computeoptimizer#CpuVendorArchitecture": { "type": "string", @@ -329,9 +359,146 @@ "com.amazonaws.computeoptimizer#CreationTimestamp": { "type": "timestamp" }, + "com.amazonaws.computeoptimizer#Currency": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "USD", + "name": "USD" + }, + { + "value": "CNY", + "name": "CNY" + } + ] + } + }, "com.amazonaws.computeoptimizer#CurrentInstanceType": { "type": "string" }, + "com.amazonaws.computeoptimizer#CurrentPerformanceRisk": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "VeryLow", + "name": "VERY_LOW" + }, + { + "value": "Low", + "name": "LOW" + }, + { + "value": "Medium", + "name": "MEDIUM" + }, + { + "value": "High", + "name": "HIGH" + } + ] + } + }, + "com.amazonaws.computeoptimizer#CurrentPerformanceRiskRatings": { + "type": "structure", + "members": { + "high": { + "target": "com.amazonaws.computeoptimizer#High", + "traits": { + "smithy.api#documentation": "A count of the applicable resource types with a high performance risk rating.
" + } + }, + "medium": { + "target": "com.amazonaws.computeoptimizer#Medium", + "traits": { + "smithy.api#documentation": "A count of the applicable resource types with a medium performance risk rating.
" + } + }, + "low": { + "target": "com.amazonaws.computeoptimizer#Low", + "traits": { + "smithy.api#documentation": "A count of the applicable resource types with a low performance risk rating.
" + } + }, + "veryLow": { + "target": "com.amazonaws.computeoptimizer#VeryLow", + "traits": { + "smithy.api#documentation": "A count of the applicable resource types with a very low performance risk\n rating.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Describes the performance risk ratings for a given resource type.
\nResources with a high
or medium
rating are at risk of not\n meeting the performance needs of their workloads, while resources with a\n low
rating are performing well in their workloads.
Deletes a recommendation preference, such as enhanced infrastructure metrics.
\nFor more information, see Activating\n enhanced infrastructure metrics in the Compute Optimizer User\n Guide.
" + } + }, + "com.amazonaws.computeoptimizer#DeleteRecommendationPreferencesRequest": { + "type": "structure", + "members": { + "resourceType": { + "target": "com.amazonaws.computeoptimizer#ResourceType", + "traits": { + "smithy.api#documentation": "The target resource type of the recommendation preference to delete.
\nThe Ec2Instance
option encompasses standalone instances and instances\n that are part of Auto Scaling groups. The AutoScalingGroup
option\n encompasses only instances that are part of an Auto Scaling group.
An object that describes the scope of the recommendation preference to delete.
\nYou can delete recommendation preferences that are created at the organization level\n (for management accounts of an organization only), account level, and resource level.\n For more information, see Activating\n enhanced infrastructure metrics in the Compute Optimizer User\n Guide.
" + } + }, + "recommendationPreferenceNames": { + "target": "com.amazonaws.computeoptimizer#RecommendationPreferenceNames", + "traits": { + "smithy.api#documentation": "The name of the recommendation preference to delete.
\nEnhanced infrastructure metrics (EnhancedInfrastructureMetrics
) is the\n only feature that can be activated through preferences. Therefore, it is also the only\n recommendation preference that can be deleted.
Describes recommendation export jobs created in the last seven days.
\n\nUse the ExportAutoScalingGroupRecommendations or ExportEC2InstanceRecommendations actions to request an export of your\n recommendations. Then use the DescribeRecommendationExportJobs action\n to view your export jobs.
" + "smithy.api#documentation": "Describes recommendation export jobs created in the last seven days.
\nUse the ExportAutoScalingGroupRecommendations or ExportEC2InstanceRecommendations actions to request an export of your\n recommendations. Then use the DescribeRecommendationExportJobs action\n to view your export jobs.
" } }, "com.amazonaws.computeoptimizer#DescribeRecommendationExportJobsRequest": { @@ -376,7 +543,7 @@ "jobIds": { "target": "com.amazonaws.computeoptimizer#JobIds", "traits": { - "smithy.api#documentation": "The identification numbers of the export jobs to return.
\n\nAn export job ID is returned when you create an export using the ExportAutoScalingGroupRecommendations or ExportEC2InstanceRecommendations actions.
\n\nAll export jobs created in the last seven days are returned if this parameter is\n omitted.
" + "smithy.api#documentation": "The identification numbers of the export jobs to return.
\nAn export job ID is returned when you create an export using the ExportAutoScalingGroupRecommendations or ExportEC2InstanceRecommendations actions.
\nAll export jobs created in the last seven days are returned if this parameter is\n omitted.
" } }, "filters": { @@ -394,7 +561,7 @@ "maxResults": { "target": "com.amazonaws.computeoptimizer#MaxResults", "traits": { - "smithy.api#documentation": "The maximum number of export jobs to return with a single request.
\n\nTo retrieve the remaining results, make another request with the returned\n nextToken
value.
The maximum number of export jobs to return with a single request.
\nTo retrieve the remaining results, make another request with the returned\n nextToken
value.
The token to use to advance to the next page of export jobs.
\n\nThis value is null when there are no more pages of export jobs to return.
" + "smithy.api#documentation": "The token to use to advance to the next page of export jobs.
\nThis value is null when there are no more pages of export jobs to return.
" } } } @@ -434,18 +601,18 @@ "name": { "target": "com.amazonaws.computeoptimizer#EBSFilterName", "traits": { - "smithy.api#documentation": "The name of the filter.
\n\nSpecify Finding
to return recommendations with a specific finding\n classification (for example, NotOptimized
).
The name of the filter.
\nSpecify Finding
to return recommendations with a specific finding\n classification (for example, NotOptimized
).
The value of the filter.
\n\nThe valid values are Optimized
, or NotOptimized
.
The value of the filter.
\nThe valid values are Optimized
, or NotOptimized
.
Describes a filter that returns a more specific list of Amazon Elastic Block Store\n (Amazon EBS) volume recommendations. Use this filter with the GetEBSVolumeRecommendations action.
\n\nYou can use LambdaFunctionRecommendationFilter
with the GetLambdaFunctionRecommendations action, JobFilter
with the\n DescribeRecommendationExportJobs action, and Filter
\n with the GetAutoScalingGroupRecommendations and GetEC2InstanceRecommendations actions.
Describes a filter that returns a more specific list of Amazon Elastic Block Store\n (Amazon EBS) volume recommendations. Use this filter with the GetEBSVolumeRecommendations action.
\nYou can use LambdaFunctionRecommendationFilter
with the GetLambdaFunctionRecommendations action, JobFilter
with the\n DescribeRecommendationExportJobs action, and Filter
\n with the GetAutoScalingGroupRecommendations and GetEC2InstanceRecommendations actions.
The name of the utilization metric.
\n\nThe following utilization metrics are available:
\n\n VolumeReadOpsPerSecond
- The completed read operations per second\n from the volume in a specified period of time.
Unit: Count
\n\n VolumeWriteOpsPerSecond
- The completed write operations per\n second to the volume in a specified period of time.
Unit: Count
\n\n VolumeReadBytesPerSecond
- The bytes read per second from the\n volume in a specified period of time.
Unit: Bytes
\n\n VolumeWriteBytesPerSecond
- The bytes written to the volume in a\n specified period of time.
Unit: Bytes
\nThe name of the utilization metric.
\nThe following utilization metrics are available:
\n\n VolumeReadOpsPerSecond
- The completed read operations per second\n from the volume in a specified period of time.
Unit: Count
\n\n VolumeWriteOpsPerSecond
- The completed write operations per\n second to the volume in a specified period of time.
Unit: Count
\n\n VolumeReadBytesPerSecond
- The bytes read per second from the\n volume in a specified period of time.
Unit: Bytes
\n\n VolumeWriteBytesPerSecond
- The bytes written to the volume in a\n specified period of time.
Unit: Bytes
\nThe statistic of the utilization metric.
\n\nThe Compute Optimizer API, Command Line Interface (CLI), and SDKs\n return utilization metrics using only the Maximum
statistic, which is the\n highest value observed during the specified period.
The Compute Optimizer console displays graphs for some utilization metrics using the\n Average
statistic, which is the value of Sum
/\n SampleCount
during the specified period. For more information, see\n Viewing resource\n recommendations in the Compute Optimizer User\n Guide. You can also get averaged utilization metric data for your resources\n using Amazon CloudWatch. For more information, see the Amazon CloudWatch\n User Guide.
The statistic of the utilization metric.
\nThe Compute Optimizer API, Command Line Interface (CLI), and SDKs\n return utilization metrics using only the Maximum
statistic, which is the\n highest value observed during the specified period.
The Compute Optimizer console displays graphs for some utilization metrics using the\n Average
statistic, which is the value of Sum
/\n SampleCount
during the specified period. For more information, see\n Viewing resource\n recommendations in the Compute Optimizer User\n Guide. You can also get averaged utilization metric data for your resources\n using Amazon CloudWatch. For more information, see the Amazon CloudWatch\n User Guide.
Describes a utilization metric of an Amazon Elastic Block Store (Amazon EBS)\n volume.
\n\nCompare the utilization metric data of your resource against its projected utilization\n metric data to determine the performance difference between your current resource and\n the recommended option.
" + "smithy.api#documentation": "Describes a utilization metric of an Amazon Elastic Block Store (Amazon EBS)\n volume.
\nCompare the utilization metric data of your resource against its projected utilization\n metric data to determine the performance difference between your current resource and\n the recommended option.
" } }, "com.amazonaws.computeoptimizer#EBSUtilizationMetrics": { @@ -535,19 +702,54 @@ "target": "com.amazonaws.computeoptimizer#EBSUtilizationMetric" } }, + "com.amazonaws.computeoptimizer#EffectiveRecommendationPreferences": { + "type": "structure", + "members": { + "cpuVendorArchitectures": { + "target": "com.amazonaws.computeoptimizer#CpuVendorArchitectures", + "traits": { + "smithy.api#documentation": "Describes the CPU vendor and architecture for an instance or Auto Scaling group\n recommendations.
\nFor example, when you specify AWS_ARM64
with:
A GetEC2InstanceRecommendations or GetAutoScalingGroupRecommendations request, Compute Optimizer\n returns recommendations that consist of Graviton2 instance types only.
\nA GetEC2RecommendationProjectedMetrics request, Compute Optimizer returns projected utilization metrics for Graviton2 instance type\n recommendations only.
\nA ExportEC2InstanceRecommendations or ExportAutoScalingGroupRecommendations request, Compute Optimizer\n exports recommendations that consist of Graviton2 instance types only.
\nDescribes the activation status of the enhanced infrastructure metrics\n preference.
\nA status of Active
confirms that the preference is applied in the latest\n recommendation refresh, and a status of Inactive
confirms that it's not yet\n applied.
Describes the effective recommendation preferences for a resource.
" + } + }, + "com.amazonaws.computeoptimizer#EnhancedInfrastructureMetrics": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "Active", + "name": "ACTIVE" + }, + { + "value": "Inactive", + "name": "INACTIVE" + } + ] + } + }, "com.amazonaws.computeoptimizer#EnrollmentFilter": { "type": "structure", "members": { "name": { "target": "com.amazonaws.computeoptimizer#EnrollmentFilterName", "traits": { - "smithy.api#documentation": "The name of the filter.
\n\nSpecify Status
to return accounts with a specific enrollment status (for\n example, Active
).
The name of the filter.
\nSpecify Status
to return accounts with a specific enrollment status (for\n example, Active
).
The value of the filter.
\n\nThe valid values are Active
, Inactive
, Pending
,\n and Failed
.
The value of the filter.
\nThe valid values are Active
, Inactive
, Pending
,\n and Failed
.
The currency of the estimated monthly\n savings.
" + } + }, + "value": { + "target": "com.amazonaws.computeoptimizer#Value", + "traits": { + "smithy.api#documentation": "The value of the estimated monthly savings.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Describes the estimated monthly savings amount possible for a given resource based on\n On-Demand instance pricing
\nFor more information, see Estimated monthly savings and savings opportunities in the\n Compute Optimizer User Guide.
" + } + }, "com.amazonaws.computeoptimizer#ExportAutoScalingGroupRecommendations": { "type": "operation", "input": { @@ -610,7 +832,7 @@ } ], "traits": { - "smithy.api#documentation": "Exports optimization recommendations for Auto Scaling groups.
\n\nRecommendations are exported in a comma-separated values (.csv) file, and its metadata\n in a JavaScript Object Notation (JSON) (.json) file, to an existing Amazon Simple Storage Service (Amazon S3) bucket that you specify. For more information, see Exporting\n Recommendations in the Compute Optimizer User\n Guide.
\n\nYou can have only one Auto Scaling group export job in progress per Amazon Web Services Region.
" + "smithy.api#documentation": "Exports optimization recommendations for Auto Scaling groups.
\nRecommendations are exported in a comma-separated values (.csv) file, and its metadata\n in a JavaScript Object Notation (JSON) (.json) file, to an existing Amazon Simple Storage Service (Amazon S3) bucket that you specify. For more information, see Exporting\n Recommendations in the Compute Optimizer User\n Guide.
\nYou can have only one Auto Scaling group export job in progress per Amazon Web Services Region.
" } }, "com.amazonaws.computeoptimizer#ExportAutoScalingGroupRecommendationsRequest": { @@ -619,7 +841,7 @@ "accountIds": { "target": "com.amazonaws.computeoptimizer#AccountIds", "traits": { - "smithy.api#documentation": "The IDs of the Amazon Web Services accounts for which to export Auto Scaling group\n recommendations.
\n\nIf your account is the management account of an organization, use this parameter to\n specify the member account for which you want to export recommendations.
\n\nThis parameter cannot be specified together with the include member accounts\n parameter. The parameters are mutually exclusive.
\n\nRecommendations for member accounts are not included in the export if this parameter,\n or the include member accounts parameter, is omitted.
\n\nYou can specify multiple account IDs per request.
" + "smithy.api#documentation": "The IDs of the Amazon Web Services accounts for which to export Auto Scaling group\n recommendations.
\nIf your account is the management account of an organization, use this parameter to\n specify the member account for which you want to export recommendations.
\nThis parameter cannot be specified together with the include member accounts\n parameter. The parameters are mutually exclusive.
\nRecommendations for member accounts are not included in the export if this parameter,\n or the include member accounts parameter, is omitted.
\nYou can specify multiple account IDs per request.
" } }, "filters": { @@ -637,20 +859,20 @@ "s3DestinationConfig": { "target": "com.amazonaws.computeoptimizer#S3DestinationConfig", "traits": { - "smithy.api#documentation": "An object to specify the destination Amazon Simple Storage Service (Amazon S3) bucket\n name and key prefix for the export job.
\n\nYou must create the destination Amazon S3 bucket for your recommendations\n export before you create the export job. Compute Optimizer does not create the S3 bucket\n for you. After you create the S3 bucket, ensure that it has the required permissions\n policy to allow Compute Optimizer to write the export file to it. If you plan to\n specify an object prefix when you create the export job, you must include the object\n prefix in the policy that you add to the S3 bucket. For more information, see Amazon S3 Bucket Policy for Compute Optimizer in the\n Compute Optimizer User Guide.
", + "smithy.api#documentation": "An object to specify the destination Amazon Simple Storage Service (Amazon S3) bucket\n name and key prefix for the export job.
\nYou must create the destination Amazon S3 bucket for your recommendations\n export before you create the export job. Compute Optimizer does not create the S3 bucket\n for you. After you create the S3 bucket, ensure that it has the required permissions\n policy to allow Compute Optimizer to write the export file to it. If you plan to specify\n an object prefix when you create the export job, you must include the object prefix in\n the policy that you add to the S3 bucket. For more information, see Amazon S3 Bucket Policy for Compute Optimizer in the\n Compute Optimizer User Guide.
", "smithy.api#required": {} } }, "fileFormat": { "target": "com.amazonaws.computeoptimizer#FileFormat", "traits": { - "smithy.api#documentation": "The format of the export file.
\n\nThe only export file format currently supported is Csv
.
The format of the export file.
\nThe only export file format currently supported is Csv
.
Indicates whether to include recommendations for resources in all member accounts of\n the organization if your account is the management account of an organization.
\n\nThe member accounts must also be opted in to Compute Optimizer, and trusted access for\n Compute Optimizer must be enabled in the organization account. For more information,\n see Compute Optimizer and Amazon Web Services Organizations trusted access in the\n Compute Optimizer User Guide.
\n\nRecommendations for member accounts of the organization are not included in the export\n file if this parameter is omitted.
\n\nThis parameter cannot be specified together with the account IDs parameter. The\n parameters are mutually exclusive.
\n\nRecommendations for member accounts are not included in the export if this parameter,\n or the account IDs parameter, is omitted.
" + "smithy.api#documentation": "Indicates whether to include recommendations for resources in all member accounts of\n the organization if your account is the management account of an organization.
\nThe member accounts must also be opted in to Compute Optimizer, and trusted access for\n Compute Optimizer must be enabled in the organization account. For more information,\n see Compute Optimizer and Amazon Web Services Organizations trusted access in the\n Compute Optimizer User Guide.
\nRecommendations for member accounts of the organization are not included in the export\n file if this parameter is omitted.
\nThis parameter cannot be specified together with the account IDs parameter. The\n parameters are mutually exclusive.
\nRecommendations for member accounts are not included in the export if this parameter,\n or the account IDs parameter, is omitted.
" } }, "recommendationPreferences": { @@ -667,7 +889,7 @@ "jobId": { "target": "com.amazonaws.computeoptimizer#JobId", "traits": { - "smithy.api#documentation": "The identification number of the export job.
\n\nUse the DescribeRecommendationExportJobs action, and specify the job\n ID to view the status of an export job.
" + "smithy.api#documentation": "The identification number of the export job.
\nUse the DescribeRecommendationExportJobs action, and specify the job\n ID to view the status of an export job.
" } }, "s3Destination": { @@ -727,7 +949,7 @@ } ], "traits": { - "smithy.api#documentation": "Exports optimization recommendations for Amazon EBS volumes.
\n\nRecommendations are exported in a comma-separated values (.csv) file, and its metadata\n in a JavaScript Object Notation (JSON) (.json) file, to an existing Amazon Simple Storage Service (Amazon S3) bucket that you specify. For more information, see\n Exporting\n Recommendations in the Compute Optimizer User\n Guide.
\n\nYou can have only one Amazon EBS volume export job in progress per Amazon Web Services Region.
" + "smithy.api#documentation": "Exports optimization recommendations for Amazon EBS volumes.
\nRecommendations are exported in a comma-separated values (.csv) file, and its metadata\n in a JavaScript Object Notation (JSON) (.json) file, to an existing Amazon Simple Storage Service (Amazon S3) bucket that you specify. For more information, see Exporting\n Recommendations in the Compute Optimizer User\n Guide.
\nYou can have only one Amazon EBS volume export job in progress per Amazon Web Services Region.
" } }, "com.amazonaws.computeoptimizer#ExportEBSVolumeRecommendationsRequest": { @@ -736,7 +958,7 @@ "accountIds": { "target": "com.amazonaws.computeoptimizer#AccountIds", "traits": { - "smithy.api#documentation": "The IDs of the Amazon Web Services accounts for which to export Amazon EBS\n volume recommendations.
\n\nIf your account is the management account of an organization, use this parameter to\n specify the member account for which you want to export recommendations.
\n\nThis parameter cannot be specified together with the include member accounts\n parameter. The parameters are mutually exclusive.
\n\nRecommendations for member accounts are not included in the export if this parameter,\n or the include member accounts parameter, is omitted.
\n\nYou can specify multiple account IDs per request.
" + "smithy.api#documentation": "The IDs of the Amazon Web Services accounts for which to export Amazon EBS\n volume recommendations.
\nIf your account is the management account of an organization, use this parameter to\n specify the member account for which you want to export recommendations.
\nThis parameter cannot be specified together with the include member accounts\n parameter. The parameters are mutually exclusive.
\nRecommendations for member accounts are not included in the export if this parameter,\n or the include member accounts parameter, is omitted.
\nYou can specify multiple account IDs per request.
" } }, "filters": { @@ -760,13 +982,13 @@ "fileFormat": { "target": "com.amazonaws.computeoptimizer#FileFormat", "traits": { - "smithy.api#documentation": "The format of the export file.
\n\nThe only export file format currently supported is Csv
.
The format of the export file.
\nThe only export file format currently supported is Csv
.
Indicates whether to include recommendations for resources in all member accounts of\n the organization if your account is the management account of an organization.
\n\nThe member accounts must also be opted in to Compute Optimizer, and trusted access for\n Compute Optimizer must be enabled in the organization account. For more information,\n see Compute Optimizer and Amazon Web Services Organizations trusted access in the\n Compute Optimizer User Guide.
\n\nRecommendations for member accounts of the organization are not included in the export\n file if this parameter is omitted.
\n\nThis parameter cannot be specified together with the account IDs parameter. The\n parameters are mutually exclusive.
\n\nRecommendations for member accounts are not included in the export if this parameter,\n or the account IDs parameter, is omitted.
" + "smithy.api#documentation": "Indicates whether to include recommendations for resources in all member accounts of\n the organization if your account is the management account of an organization.
\nThe member accounts must also be opted in to Compute Optimizer, and trusted access for\n Compute Optimizer must be enabled in the organization account. For more information,\n see Compute Optimizer and Amazon Web Services Organizations trusted access in the\n Compute Optimizer User Guide.
\nRecommendations for member accounts of the organization are not included in the export\n file if this parameter is omitted.
\nThis parameter cannot be specified together with the account IDs parameter. The\n parameters are mutually exclusive.
\nRecommendations for member accounts are not included in the export if this parameter,\n or the account IDs parameter, is omitted.
" } } } @@ -777,7 +999,7 @@ "jobId": { "target": "com.amazonaws.computeoptimizer#JobId", "traits": { - "smithy.api#documentation": "The identification number of the export job.
\n\nUse the DescribeRecommendationExportJobs action, and specify the job\n ID to view the status of an export job.
" + "smithy.api#documentation": "The identification number of the export job.
\nUse the DescribeRecommendationExportJobs action, and specify the job\n ID to view the status of an export job.
" } }, "s3Destination": { @@ -820,7 +1042,7 @@ } ], "traits": { - "smithy.api#documentation": "Exports optimization recommendations for Amazon EC2 instances.
\n\nRecommendations are exported in a comma-separated values (.csv) file, and its metadata\n in a JavaScript Object Notation (JSON) (.json) file, to an existing Amazon Simple Storage Service (Amazon S3) bucket that you specify. For more information, see\n Exporting\n Recommendations in the Compute Optimizer User\n Guide.
\n\nYou can have only one Amazon EC2 instance export job in progress per Amazon Web Services Region.
" + "smithy.api#documentation": "Exports optimization recommendations for Amazon EC2 instances.
\nRecommendations are exported in a comma-separated values (.csv) file, and its metadata\n in a JavaScript Object Notation (JSON) (.json) file, to an existing Amazon Simple Storage Service (Amazon S3) bucket that you specify. For more information, see Exporting\n Recommendations in the Compute Optimizer User\n Guide.
\nYou can have only one Amazon EC2 instance export job in progress per Amazon Web Services Region.
" } }, "com.amazonaws.computeoptimizer#ExportEC2InstanceRecommendationsRequest": { @@ -829,7 +1051,7 @@ "accountIds": { "target": "com.amazonaws.computeoptimizer#AccountIds", "traits": { - "smithy.api#documentation": "The IDs of the Amazon Web Services accounts for which to export instance\n recommendations.
\n\nIf your account is the management account of an organization, use this parameter to\n specify the member account for which you want to export recommendations.
\n\nThis parameter cannot be specified together with the include member accounts\n parameter. The parameters are mutually exclusive.
\n\nRecommendations for member accounts are not included in the export if this parameter,\n or the include member accounts parameter, is omitted.
\n\nYou can specify multiple account IDs per request.
" + "smithy.api#documentation": "The IDs of the Amazon Web Services accounts for which to export instance\n recommendations.
\nIf your account is the management account of an organization, use this parameter to\n specify the member account for which you want to export recommendations.
\nThis parameter cannot be specified together with the include member accounts\n parameter. The parameters are mutually exclusive.
\nRecommendations for member accounts are not included in the export if this parameter,\n or the include member accounts parameter, is omitted.
\nYou can specify multiple account IDs per request.
" } }, "filters": { @@ -847,20 +1069,20 @@ "s3DestinationConfig": { "target": "com.amazonaws.computeoptimizer#S3DestinationConfig", "traits": { - "smithy.api#documentation": "An object to specify the destination Amazon Simple Storage Service (Amazon S3) bucket\n name and key prefix for the export job.
\n\nYou must create the destination Amazon S3 bucket for your recommendations\n export before you create the export job. Compute Optimizer does not create the S3 bucket\n for you. After you create the S3 bucket, ensure that it has the required permissions\n policy policy to allow Compute Optimizer to write the export file to it. If you plan to\n specify an object prefix when you create the export job, you must include the object\n prefix in the that you add to the S3 bucket. For more information, see Amazon S3 Bucket Policy for Compute Optimizer in the\n Compute Optimizer User Guide.
", + "smithy.api#documentation": "An object to specify the destination Amazon Simple Storage Service (Amazon S3) bucket\n name and key prefix for the export job.
\nYou must create the destination Amazon S3 bucket for your recommendations\n export before you create the export job. Compute Optimizer does not create the S3 bucket\n for you. After you create the S3 bucket, ensure that it has the required permissions\n policy to allow Compute Optimizer to write the export file to it.\n If you plan to\n specify an object prefix when you create the export job, you must include the object\n prefix in the policy that you add to the S3 bucket. For more information, see Amazon S3 Bucket Policy for Compute Optimizer in the\n Compute Optimizer User Guide.
", "smithy.api#required": {} } }, "fileFormat": { "target": "com.amazonaws.computeoptimizer#FileFormat", "traits": { - "smithy.api#documentation": "The format of the export file.
\n\nThe only export file format currently supported is Csv
.
The format of the export file.
\nThe only export file format currently supported is Csv
.
Indicates whether to include recommendations for resources in all member accounts of\n the organization if your account is the management account of an organization.
\n\nThe member accounts must also be opted in to Compute Optimizer, and trusted access for\n Compute Optimizer must be enabled in the organization account. For more information,\n see Compute Optimizer and Amazon Web Services Organizations trusted access in the\n Compute Optimizer User Guide.
\n\nRecommendations for member accounts of the organization are not included in the export\n file if this parameter is omitted.
\n\nRecommendations for member accounts are not included in the export if this parameter,\n or the account IDs parameter, is omitted.
" + "smithy.api#documentation": "Indicates whether to include recommendations for resources in all member accounts of\n the organization if your account is the management account of an organization.
\nThe member accounts must also be opted in to Compute Optimizer, and trusted access for\n Compute Optimizer must be enabled in the organization account. For more information,\n see Compute Optimizer and Amazon Web Services Organizations trusted access in the\n Compute Optimizer User Guide.
\nRecommendations for member accounts of the organization are not included in the export\n file if this parameter is omitted.
\nRecommendations for member accounts are not included in the export if this parameter,\n or the account IDs parameter, is omitted.
" } }, "recommendationPreferences": { @@ -877,7 +1099,7 @@ "jobId": { "target": "com.amazonaws.computeoptimizer#JobId", "traits": { - "smithy.api#documentation": "The identification number of the export job.
\n\nUse the DescribeRecommendationExportJobs action, and specify the job\n ID to view the status of an export job.
" + "smithy.api#documentation": "The identification number of the export job.
\nUse the DescribeRecommendationExportJobs action, and specify the job\n ID to view the status of an export job.
" } }, "s3Destination": { @@ -923,7 +1145,7 @@ } ], "traits": { - "smithy.api#documentation": "Exports optimization recommendations for Lambda functions.
\n\nRecommendations are exported in a comma-separated values (.csv) file, and its metadata\n in a JavaScript Object Notation (JSON) (.json) file, to an existing Amazon Simple Storage Service (Amazon S3) bucket that you specify. For more information, see\n Exporting\n Recommendations in the Compute Optimizer User\n Guide.
\n\nYou can have only one Lambda function export job in progress per Amazon Web Services Region.
" + "smithy.api#documentation": "Exports optimization recommendations for Lambda functions.
\nRecommendations are exported in a comma-separated values (.csv) file, and its metadata\n in a JavaScript Object Notation (JSON) (.json) file, to an existing Amazon Simple Storage Service (Amazon S3) bucket that you specify. For more information, see Exporting\n Recommendations in the Compute Optimizer User\n Guide.
\nYou can have only one Lambda function export job in progress per Amazon Web Services Region.
" } }, "com.amazonaws.computeoptimizer#ExportLambdaFunctionRecommendationsRequest": { @@ -932,7 +1154,7 @@ "accountIds": { "target": "com.amazonaws.computeoptimizer#AccountIds", "traits": { - "smithy.api#documentation": "The IDs of the Amazon Web Services accounts for which to export Lambda\n function recommendations.
\n\nIf your account is the management account of an organization, use this parameter to\n specify the member account for which you want to export recommendations.
\n\nThis parameter cannot be specified together with the include member accounts\n parameter. The parameters are mutually exclusive.
\n\nRecommendations for member accounts are not included in the export if this parameter,\n or the include member accounts parameter, is omitted.
\n\nYou can specify multiple account IDs per request.
" + "smithy.api#documentation": "The IDs of the Amazon Web Services accounts for which to export Lambda\n function recommendations.
\nIf your account is the management account of an organization, use this parameter to\n specify the member account for which you want to export recommendations.
\nThis parameter cannot be specified together with the include member accounts\n parameter. The parameters are mutually exclusive.
\nRecommendations for member accounts are not included in the export if this parameter,\n or the include member accounts parameter, is omitted.
\nYou can specify multiple account IDs per request.
" } }, "filters": { @@ -956,13 +1178,13 @@ "fileFormat": { "target": "com.amazonaws.computeoptimizer#FileFormat", "traits": { - "smithy.api#documentation": "The format of the export file.
\n\nThe only export file format currently supported is Csv
.
The format of the export file.
\nThe only export file format currently supported is Csv
.
Indicates whether to include recommendations for resources in all member accounts of\n the organization if your account is the management account of an organization.
\n\nThe member accounts must also be opted in to Compute Optimizer, and trusted access for\n Compute Optimizer must be enabled in the organization account. For more information,\n see Compute Optimizer and Amazon Web Services Organizations trusted access in the\n Compute Optimizer User Guide.
\n\nRecommendations for member accounts of the organization are not included in the export\n file if this parameter is omitted.
\n\nThis parameter cannot be specified together with the account IDs parameter. The\n parameters are mutually exclusive.
\n\nRecommendations for member accounts are not included in the export if this parameter,\n or the account IDs parameter, is omitted.
" + "smithy.api#documentation": "Indicates whether to include recommendations for resources in all member accounts of\n the organization if your account is the management account of an organization.
\nThe member accounts must also be opted in to Compute Optimizer, and trusted access for\n Compute Optimizer must be enabled in the organization account. For more information,\n see Compute Optimizer and Amazon Web Services Organizations trusted access in the\n Compute Optimizer User Guide.
\nRecommendations for member accounts of the organization are not included in the export\n file if this parameter is omitted.
\nThis parameter cannot be specified together with the account IDs parameter. The\n parameters are mutually exclusive.
\nRecommendations for member accounts are not included in the export if this parameter,\n or the account IDs parameter, is omitted.
" } } } @@ -973,7 +1195,7 @@ "jobId": { "target": "com.amazonaws.computeoptimizer#JobId", "traits": { - "smithy.api#documentation": "The identification number of the export job.
\n\nUse the DescribeRecommendationExportJobs action, and specify the job\n ID to view the status of an export job.
" + "smithy.api#documentation": "The identification number of the export job.
\nUse the DescribeRecommendationExportJobs action, and specify the job\n ID to view the status of an export job.
" } }, "s3Destination": { @@ -1164,6 +1386,30 @@ { "value": "LastRefreshTimestamp", "name": "LAST_REFRESH_TIMESTAMP" + }, + { + "value": "CurrentPerformanceRisk", + "name": "CURRENT_PERFORMANCE_RISK" + }, + { + "value": "RecommendationOptionsSavingsOpportunityPercentage", + "name": "RECOMMENDATION_OPTIONS_SAVINGS_OPPORTUNITY_PERCENTAGE" + }, + { + "value": "RecommendationOptionsEstimatedMonthlySavingsCurrency", + "name": "RECOMMENDATION_OPTIONS_ESTIMATED_MONTHLY_SAVINGS_CURRENCY" + }, + { + "value": "RecommendationOptionsEstimatedMonthlySavingsValue", + "name": "RECOMMENDATION_OPTIONS_ESTIMATED_MONTHLY_SAVINGS_VALUE" + }, + { + "value": "EffectiveRecommendationPreferencesCpuVendorArchitectures", + "name": "EFFECTIVE_RECOMMENDATION_PREFERENCES_CPU_VENDOR_ARCHITECTURES" + }, + { + "value": "EffectiveRecommendationPreferencesEnhancedInfrastructureMetrics", + "name": "EFFECTIVE_RECOMMENDATION_PREFERENCES_ENHANCED_INFRASTRUCTURE_METRICS" } ] } @@ -1349,6 +1595,30 @@ { "value": "LastRefreshTimestamp", "name": "LAST_REFRESH_TIMESTAMP" + }, + { + "value": "CurrentPerformanceRisk", + "name": "CURRENT_PERFORMANCE_RISK" + }, + { + "value": "RecommendationOptionsSavingsOpportunityPercentage", + "name": "RECOMMENDATION_OPTIONS_SAVINGS_OPPORTUNITY_PERCENTAGE" + }, + { + "value": "RecommendationOptionsEstimatedMonthlySavingsCurrency", + "name": "RECOMMENDATION_OPTIONS_ESTIMATED_MONTHLY_SAVINGS_CURRENCY" + }, + { + "value": "RecommendationOptionsEstimatedMonthlySavingsValue", + "name": "RECOMMENDATION_OPTIONS_ESTIMATED_MONTHLY_SAVINGS_VALUE" + }, + { + "value": "EffectiveRecommendationPreferencesCpuVendorArchitectures", + "name": "EFFECTIVE_RECOMMENDATION_PREFERENCES_CPU_VENDOR_ARCHITECTURES" + }, + { + "value": "EffectiveRecommendationPreferencesEnhancedInfrastructureMetrics", + "name": "EFFECTIVE_RECOMMENDATION_PREFERENCES_ENHANCED_INFRASTRUCTURE_METRICS" } ] } @@ -1450,6 +1720,22 @@ { "value": "LastRefreshTimestamp", "name": "LAST_REFRESH_TIMESTAMP" + }, + { + "value": "CurrentPerformanceRisk", + "name": "CURRENT_PERFORMANCE_RISK" + }, + { + "value": "RecommendationOptionsSavingsOpportunityPercentage", + "name": "RECOMMENDATION_OPTIONS_SAVINGS_OPPORTUNITY_PERCENTAGE" + }, + { + "value": "RecommendationOptionsEstimatedMonthlySavingsCurrency", + "name": "RECOMMENDATION_OPTIONS_ESTIMATED_MONTHLY_SAVINGS_CURRENCY" + }, + { + "value": "RecommendationOptionsEstimatedMonthlySavingsValue", + "name": "RECOMMENDATION_OPTIONS_ESTIMATED_MONTHLY_SAVINGS_VALUE" } ] } @@ -1559,6 +1845,22 @@ { "value": "LastRefreshTimestamp", "name": "LAST_REFRESH_TIMESTAMP" + }, + { + "value": "CurrentPerformanceRisk", + "name": "CURRENT_PERFORMANCE_RISK" + }, + { + "value": "RecommendationOptionsSavingsOpportunityPercentage", + "name": "RECOMMENDATION_OPTIONS_SAVINGS_OPPORTUNITY_PERCENTAGE" + }, + { + "value": "RecommendationOptionsEstimatedMonthlySavingsCurrency", + "name": "RECOMMENDATION_OPTIONS_ESTIMATED_MONTHLY_SAVINGS_CURRENCY" + }, + { + "value": "RecommendationOptionsEstimatedMonthlySavingsValue", + "name": "RECOMMENDATION_OPTIONS_ESTIMATED_MONTHLY_SAVINGS_VALUE" } ] } @@ -1589,18 +1891,18 @@ "name": { "target": "com.amazonaws.computeoptimizer#FilterName", "traits": { - "smithy.api#documentation": "The name of the filter.
\n\nSpecify Finding
to return recommendations with a specific finding\n classification (for example, Underprovisioned
).
Specify RecommendationSourceType
to return recommendations of a specific\n resource type (for example, Ec2Instance
).
Specify FindingReasonCodes
to return recommendations with a specific\n finding reason code (for example, CPUUnderprovisioned
).
The name of the filter.
\nSpecify Finding
to return recommendations with a specific finding\n classification (for example, Underprovisioned
).
Specify RecommendationSourceType
to return recommendations of a specific\n resource type (for example, Ec2Instance
).
Specify FindingReasonCodes
to return recommendations with a specific\n finding reason code (for example, CPUUnderprovisioned
).
The value of the filter.
\n\nThe valid values for this parameter are as follows, depending on what you specify for\n the name
parameter and the resource type that you wish to filter results\n for:
Specify Optimized
or NotOptimized
if you specify the\n name
parameter as Finding
and you want to filter\n results for Auto Scaling groups.
Specify Underprovisioned
, Overprovisioned
, or\n Optimized
if you specify the name
parameter as\n Finding
and you want to filter results for EC2\n instances.
Specify Ec2Instance
or AutoScalingGroup
if you\n specify the name
parameter as\n RecommendationSourceType
.
Specify one of the following options if you specify the name
\n parameter as FindingReasonCodes
:
\n \n CPUOverprovisioned
\n — The\n instance’s CPU configuration can be sized down while still meeting the\n performance requirements of your workload.
\n \n CPUUnderprovisioned
\n —\n The instance’s CPU configuration doesn't meet the performance\n requirements of your workload and there is an alternative instance type\n that provides better CPU performance.
\n \n MemoryOverprovisioned
\n —\n The instance’s memory configuration can be sized down while still\n meeting the performance requirements of your workload.
\n \n MemoryUnderprovisioned
\n —\n The instance’s memory configuration doesn't meet the performance\n requirements of your workload and there is an alternative instance type\n that provides better memory performance.
\n \n EBSThroughputOverprovisioned
\n — The\n instance’s EBS throughput configuration can be sized down while still\n meeting the performance requirements of your workload.
\n \n EBSThroughputUnderprovisioned
\n — The\n instance’s EBS throughput configuration doesn't meet the performance\n requirements of your workload and there is an alternative instance type\n that provides better EBS throughput performance.
\n \n EBSIOPSOverprovisioned
\n —\n The instance’s EBS IOPS configuration can be sized down while still\n meeting the performance requirements of your workload.
\n \n EBSIOPSUnderprovisioned
\n \n — The instance’s EBS IOPS configuration doesn't meet the performance\n requirements of your workload and there is an alternative instance type\n that provides better EBS IOPS performance.
\n \n NetworkBandwidthOverprovisioned
\n — The\n instance’s network bandwidth configuration can be sized down while still\n meeting the performance requirements of your workload.
\n \n NetworkBandwidthUnderprovisioned
\n — The\n instance’s network bandwidth configuration doesn't meet the performance\n requirements of your workload and there is an alternative instance type\n that provides better network bandwidth performance. This finding reason\n happens when the NetworkIn
or NetworkOut
\n performance of an instance is impacted.
\n \n NetworkPPSOverprovisioned
\n — The instance’s\n network PPS (packets per second) configuration can be sized down while\n still meeting the performance requirements of your workload.
\n \n NetworkPPSUnderprovisioned
\n — The instance’s\n network PPS (packets per second) configuration doesn't meet the\n performance requirements of your workload and there is an alternative\n instance type that provides better network PPS performance.
\n \n DiskIOPSOverprovisioned
\n \n — The instance’s disk IOPS configuration can be sized down while still\n meeting the performance requirements of your workload.
\n \n DiskIOPSUnderprovisioned
\n \n — The instance’s disk IOPS configuration doesn't meet the performance\n requirements of your workload and there is an alternative instance type\n that provides better disk IOPS performance.
\n \n DiskThroughputOverprovisioned
\n — The\n instance’s disk throughput configuration can be sized down while still\n meeting the performance requirements of your workload.
\n \n DiskThroughputUnderprovisioned
\n — The\n instance’s disk throughput configuration doesn't meet the performance\n requirements of your workload and there is an alternative instance type\n that provides better disk throughput performance.
The value of the filter.
\nThe valid values for this parameter are as follows, depending on what you specify for\n the name
parameter and the resource type that you wish to filter results\n for:
Specify Optimized
or NotOptimized
if you specify the\n name
parameter as Finding
and you want to filter\n results for Auto Scaling groups.
Specify Underprovisioned
, Overprovisioned
, or\n Optimized
if you specify the name
parameter as\n Finding
and you want to filter results for EC2\n instances.
Specify Ec2Instance
or AutoScalingGroup
if you\n specify the name
parameter as\n RecommendationSourceType
.
Specify one of the following options if you specify the name
\n parameter as FindingReasonCodes
:
\n \n CPUOverprovisioned
\n — The\n instance’s CPU configuration can be sized down while still meeting the\n performance requirements of your workload.
\n \n CPUUnderprovisioned
\n —\n The instance’s CPU configuration doesn't meet the performance\n requirements of your workload and there is an alternative instance type\n that provides better CPU performance.
\n \n MemoryOverprovisioned
\n —\n The instance’s memory configuration can be sized down while still\n meeting the performance requirements of your workload.
\n \n MemoryUnderprovisioned
\n —\n The instance’s memory configuration doesn't meet the performance\n requirements of your workload and there is an alternative instance type\n that provides better memory performance.
\n \n EBSThroughputOverprovisioned
\n — The\n instance’s EBS throughput configuration can be sized down while still\n meeting the performance requirements of your workload.
\n \n EBSThroughputUnderprovisioned
\n — The\n instance’s EBS throughput configuration doesn't meet the performance\n requirements of your workload and there is an alternative instance type\n that provides better EBS throughput performance.
\n \n EBSIOPSOverprovisioned
\n —\n The instance’s EBS IOPS configuration can be sized down while still\n meeting the performance requirements of your workload.
\n \n EBSIOPSUnderprovisioned
\n \n — The instance’s EBS IOPS configuration doesn't meet the performance\n requirements of your workload and there is an alternative instance type\n that provides better EBS IOPS performance.
\n \n NetworkBandwidthOverprovisioned
\n — The\n instance’s network bandwidth configuration can be sized down while still\n meeting the performance requirements of your workload.
\n \n NetworkBandwidthUnderprovisioned
\n — The\n instance’s network bandwidth configuration doesn't meet the performance\n requirements of your workload and there is an alternative instance type\n that provides better network bandwidth performance. This finding reason\n happens when the NetworkIn
or NetworkOut
\n performance of an instance is impacted.
\n \n NetworkPPSOverprovisioned
\n — The instance’s\n network PPS (packets per second) configuration can be sized down while\n still meeting the performance requirements of your workload.
\n \n NetworkPPSUnderprovisioned
\n — The instance’s\n network PPS (packets per second) configuration doesn't meet the\n performance requirements of your workload and there is an alternative\n instance type that provides better network PPS performance.
\n \n DiskIOPSOverprovisioned
\n \n — The instance’s disk IOPS configuration can be sized down while still\n meeting the performance requirements of your workload.
\n \n DiskIOPSUnderprovisioned
\n \n — The instance’s disk IOPS configuration doesn't meet the performance\n requirements of your workload and there is an alternative instance type\n that provides better disk IOPS performance.
\n \n DiskThroughputOverprovisioned
\n — The\n instance’s disk throughput configuration can be sized down while still\n meeting the performance requirements of your workload.
\n \n DiskThroughputUnderprovisioned
\n — The\n instance’s disk throughput configuration doesn't meet the performance\n requirements of your workload and there is an alternative instance type\n that provides better disk throughput performance.
Describes a filter that returns a more specific list of recommendations. Use this\n filter with the GetAutoScalingGroupRecommendations and GetEC2InstanceRecommendations actions.
\n\nYou can use EBSFilter
with the GetEBSVolumeRecommendations action,\n LambdaFunctionRecommendationFilter
with the GetLambdaFunctionRecommendations action, and JobFilter
with\n the DescribeRecommendationExportJobs action.
Describes a filter that returns a more specific list of recommendations. Use this\n filter with the GetAutoScalingGroupRecommendations and GetEC2InstanceRecommendations actions.
\nYou can use EBSFilter
with the GetEBSVolumeRecommendations action,\n LambdaFunctionRecommendationFilter
with the GetLambdaFunctionRecommendations action, and JobFilter
with\n the DescribeRecommendationExportJobs action.
Returns Auto Scaling group recommendations.
\n\nCompute Optimizer generates recommendations for Amazon EC2 Auto Scaling groups that\n meet a specific set of requirements. For more information, see the Supported\n resources and requirements in the Compute Optimizer User\n Guide.
" + "smithy.api#documentation": "Returns Auto Scaling group recommendations.
\nCompute Optimizer generates recommendations for Amazon EC2 Auto Scaling groups that\n meet a specific set of requirements. For more information, see the Supported\n resources and requirements in the Compute Optimizer User\n Guide.
" } }, "com.amazonaws.computeoptimizer#GetAutoScalingGroupRecommendationsRequest": { @@ -1731,7 +2033,7 @@ "accountIds": { "target": "com.amazonaws.computeoptimizer#AccountIds", "traits": { - "smithy.api#documentation": "The ID of the Amazon Web Services account for which to return Auto Scaling group\n recommendations.
\n\nIf your account is the management account of an organization, use this parameter to\n specify the member account for which you want to return Auto Scaling group\n recommendations.
\n\nOnly one account ID can be specified per request.
" + "smithy.api#documentation": "The ID of the Amazon Web Services account for which to return Auto Scaling group\n recommendations.
\nIf your account is the management account of an organization, use this parameter to\n specify the member account for which you want to return Auto Scaling group\n recommendations.
\nOnly one account ID can be specified per request.
" } }, "autoScalingGroupArns": { @@ -1749,7 +2051,7 @@ "maxResults": { "target": "com.amazonaws.computeoptimizer#MaxResults", "traits": { - "smithy.api#documentation": "The maximum number of Auto Scaling group recommendations to return with a single\n request.
\n\nTo retrieve the remaining results, make another request with the returned\n nextToken
value.
The maximum number of Auto Scaling group recommendations to return with a single\n request.
\nTo retrieve the remaining results, make another request with the returned\n nextToken
value.
The token to use to advance to the next page of Auto Scaling group\n recommendations.
\n\nThis value is null when there are no more pages of Auto Scaling group\n recommendations to return.
" + "smithy.api#documentation": "The token to use to advance to the next page of Auto Scaling group\n recommendations.
\nThis value is null when there are no more pages of Auto Scaling group\n recommendations to return.
" } }, "autoScalingGroupRecommendations": { @@ -1784,7 +2086,7 @@ "errors": { "target": "com.amazonaws.computeoptimizer#GetRecommendationErrors", "traits": { - "smithy.api#documentation": "An array of objects that describe errors of the request.
\n\nFor example, an error is returned if you request recommendations for an unsupported\n Auto Scaling group.
" + "smithy.api#documentation": "An array of objects that describe errors of the request.
\nFor example, an error is returned if you request recommendations for an unsupported\n Auto Scaling group.
" } } } @@ -1824,7 +2126,7 @@ } ], "traits": { - "smithy.api#documentation": "Returns Amazon Elastic Block Store (Amazon EBS) volume recommendations.
\n\nCompute Optimizer generates recommendations for Amazon EBS volumes that\n meet a specific set of requirements. For more information, see the Supported\n resources and requirements in the Compute Optimizer User\n Guide.
" + "smithy.api#documentation": "Returns Amazon Elastic Block Store (Amazon EBS) volume recommendations.
\nCompute Optimizer generates recommendations for Amazon EBS volumes that\n meet a specific set of requirements. For more information, see the Supported\n resources and requirements in the Compute Optimizer User\n Guide.
" } }, "com.amazonaws.computeoptimizer#GetEBSVolumeRecommendationsRequest": { @@ -1845,7 +2147,7 @@ "maxResults": { "target": "com.amazonaws.computeoptimizer#MaxResults", "traits": { - "smithy.api#documentation": "The maximum number of volume recommendations to return with a single request.
\n\nTo retrieve the remaining results, make another request with the returned\n nextToken
value.
The maximum number of volume recommendations to return with a single request.
\nTo retrieve the remaining results, make another request with the returned\n nextToken
value.
The ID of the Amazon Web Services account for which to return volume\n recommendations.
\n\nIf your account is the management account of an organization, use this parameter to\n specify the member account for which you want to return volume recommendations.
\n\nOnly one account ID can be specified per request.
" + "smithy.api#documentation": "The ID of the Amazon Web Services account for which to return volume\n recommendations.
\nIf your account is the management account of an organization, use this parameter to\n specify the member account for which you want to return volume recommendations.
\nOnly one account ID can be specified per request.
" } } } @@ -1868,7 +2170,7 @@ "nextToken": { "target": "com.amazonaws.computeoptimizer#NextToken", "traits": { - "smithy.api#documentation": "The token to use to advance to the next page of volume recommendations.
\n\nThis value is null when there are no more pages of volume recommendations to\n return.
" + "smithy.api#documentation": "The token to use to advance to the next page of volume recommendations.
\nThis value is null when there are no more pages of volume recommendations to\n return.
" } }, "volumeRecommendations": { @@ -1880,7 +2182,7 @@ "errors": { "target": "com.amazonaws.computeoptimizer#GetRecommendationErrors", "traits": { - "smithy.api#documentation": "An array of objects that describe errors of the request.
\n\nFor example, an error is returned if you request recommendations for an unsupported\n volume.
" + "smithy.api#documentation": "An array of objects that describe errors of the request.
\nFor example, an error is returned if you request recommendations for an unsupported\n volume.
" } } } @@ -1920,7 +2222,7 @@ } ], "traits": { - "smithy.api#documentation": "Returns Amazon EC2 instance recommendations.
\n\nCompute Optimizer generates recommendations for Amazon Elastic Compute Cloud (Amazon EC2) instances that meet a specific set of requirements. For more\n information, see the Supported resources and\n requirements in the Compute Optimizer User\n Guide.
" + "smithy.api#documentation": "Returns Amazon EC2 instance recommendations.
\nCompute Optimizer generates recommendations for Amazon Elastic Compute Cloud (Amazon EC2) instances that meet a specific set of requirements. For more\n information, see the Supported resources and\n requirements in the Compute Optimizer User\n Guide.
" } }, "com.amazonaws.computeoptimizer#GetEC2InstanceRecommendationsRequest": { @@ -1941,7 +2243,7 @@ "maxResults": { "target": "com.amazonaws.computeoptimizer#MaxResults", "traits": { - "smithy.api#documentation": "The maximum number of instance recommendations to return with a single request.
\n\nTo retrieve the remaining results, make another request with the returned\n nextToken
value.
The maximum number of instance recommendations to return with a single request.
\nTo retrieve the remaining results, make another request with the returned\n nextToken
value.
The ID of the Amazon Web Services account for which to return instance\n recommendations.
\n\nIf your account is the management account of an organization, use this parameter to\n specify the member account for which you want to return instance recommendations.
\n\nOnly one account ID can be specified per request.
" + "smithy.api#documentation": "The ID of the Amazon Web Services account for which to return instance\n recommendations.
\nIf your account is the management account of an organization, use this parameter to\n specify the member account for which you want to return instance recommendations.
\nOnly one account ID can be specified per request.
" } }, "recommendationPreferences": { @@ -1970,7 +2272,7 @@ "nextToken": { "target": "com.amazonaws.computeoptimizer#NextToken", "traits": { - "smithy.api#documentation": "The token to use to advance to the next page of instance recommendations.
\n\nThis value is null when there are no more pages of instance recommendations to\n return.
" + "smithy.api#documentation": "The token to use to advance to the next page of instance recommendations.
\nThis value is null when there are no more pages of instance recommendations to\n return.
" } }, "instanceRecommendations": { @@ -1982,7 +2284,7 @@ "errors": { "target": "com.amazonaws.computeoptimizer#GetRecommendationErrors", "traits": { - "smithy.api#documentation": "An array of objects that describe errors of the request.
\n\nFor example, an error is returned if you request recommendations for an instance of an\n unsupported instance family.
" + "smithy.api#documentation": "An array of objects that describe errors of the request.
\nFor example, an error is returned if you request recommendations for an instance of an\n unsupported instance family.
" } } } @@ -2022,7 +2324,7 @@ } ], "traits": { - "smithy.api#documentation": "Returns the projected utilization metrics of Amazon EC2 instance\n recommendations.
\n\nThe Cpu
and Memory
metrics are the only projected\n utilization metrics returned when you run this action. Additionally, the\n Memory
metric is returned only for resources that have the unified\n CloudWatch agent installed on them. For more information, see Enabling Memory Utilization with the CloudWatch Agent.
Returns the projected utilization metrics of Amazon EC2 instance\n recommendations.
\nThe Cpu
and Memory
metrics are the only projected\n utilization metrics returned when you run this action. Additionally, the\n Memory
metric is returned only for resources that have the unified\n CloudWatch agent installed on them. For more information, see Enabling Memory Utilization with the CloudWatch Agent.
Returns the recommendation preferences that are in effect for a given resource, such\n as enhanced infrastructure metrics. Considers all applicable preferences that you might\n have set at the resource, account, and organization level.
\nWhen you create a recommendation preference, you can set its status to\n Active
or Inactive
. Use this action to view the\n recommendation preferences that are in effect, or Active
.
The Amazon Resource Name (ARN) of the resource for which to confirm effective\n recommendation preferences. Only EC2 instance and Auto Scaling group ARNs are\n currently supported.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.computeoptimizer#GetEffectiveRecommendationPreferencesResponse": { + "type": "structure", + "members": { + "enhancedInfrastructureMetrics": { + "target": "com.amazonaws.computeoptimizer#EnhancedInfrastructureMetrics", + "traits": { + "smithy.api#documentation": "The status of the enhanced infrastructure metrics recommendation preference. Considers\n all applicable preferences that you might have set at the resource, account, and\n organization level.
\nA status of Active
confirms that the preference is applied in the latest\n recommendation refresh, and a status of Inactive
confirms that it's not yet\n applied.
To validate whether the preference is applied to your last generated set of\n recommendations, review the effectiveRecommendationPreferences
value in the\n response of the GetAutoScalingGroupRecommendations and GetEC2InstanceRecommendations actions.
Returns the enrollment (opt in) status of an account to the Compute Optimizer\n service.
\n\nIf the account is the management account of an organization, this action also confirms\n the enrollment status of member accounts of the organization. Use the GetEnrollmentStatusesForOrganization action to get detailed information\n about the enrollment status of member accounts of an organization.
" + "smithy.api#documentation": "Returns the enrollment (opt in) status of an account to the Compute Optimizer\n service.
\nIf the account is the management account of an organization, this action also confirms\n the enrollment status of member accounts of the organization. Use the GetEnrollmentStatusesForOrganization action to get detailed information\n about the enrollment status of member accounts of an organization.
" } }, "com.amazonaws.computeoptimizer#GetEnrollmentStatusRequest": { @@ -2130,7 +2493,7 @@ "statusReason": { "target": "com.amazonaws.computeoptimizer#StatusReason", "traits": { - "smithy.api#documentation": "The reason for the enrollment status of the account.
\n\nFor example, an account might show a status of Pending
because member\n accounts of an organization require more time to be enrolled in the service.
The reason for the enrollment status of the account.
\nFor example, an account might show a status of Pending
because member\n accounts of an organization require more time to be enrolled in the service.
Returns the Compute Optimizer enrollment (opt-in) status of organization member\n accounts, if your account is an organization management account.
\n\nTo get the enrollment status of standalone accounts, use the GetEnrollmentStatus action.
" + "smithy.api#documentation": "Returns the Compute Optimizer enrollment (opt-in) status of organization member\n accounts, if your account is an organization management account.
\nTo get the enrollment status of standalone accounts, use the GetEnrollmentStatus action.
" } }, "com.amazonaws.computeoptimizer#GetEnrollmentStatusesForOrganizationRequest": { @@ -2203,7 +2566,7 @@ "maxResults": { "target": "com.amazonaws.computeoptimizer#MaxResults", "traits": { - "smithy.api#documentation": "The maximum number of account enrollment statuses to return with a single request. You\n can specify up to 100 statuses to return with each request.
\n\nTo retrieve the remaining results, make another request with the returned\n nextToken
value.
The maximum number of account enrollment statuses to return with a single request. You\n can specify up to 100 statuses to return with each request.
\nTo retrieve the remaining results, make another request with the returned\n nextToken
value.
The token to use to advance to the next page of account enrollment statuses.
\n\nThis value is null when there are no more pages of account enrollment statuses to\n return.
" + "smithy.api#documentation": "The token to use to advance to the next page of account enrollment statuses.
\nThis value is null when there are no more pages of account enrollment statuses to\n return.
" } } } @@ -2260,7 +2623,7 @@ } ], "traits": { - "smithy.api#documentation": "Returns Lambda function recommendations.
\n\nCompute Optimizer generates recommendations for functions that meet a specific set\n of requirements. For more information, see the Supported resources and\n requirements in the Compute Optimizer User\n Guide.
" + "smithy.api#documentation": "Returns Lambda function recommendations.
\nCompute Optimizer generates recommendations for functions that meet a specific set\n of requirements. For more information, see the Supported resources and\n requirements in the Compute Optimizer User\n Guide.
" } }, "com.amazonaws.computeoptimizer#GetLambdaFunctionRecommendationsRequest": { @@ -2269,13 +2632,13 @@ "functionArns": { "target": "com.amazonaws.computeoptimizer#FunctionArns", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) of the functions for which to return\n recommendations.
\n\nYou can specify a qualified or unqualified ARN. If you specify an unqualified ARN\n without a function version suffix, Compute Optimizer will return recommendations for the\n latest ($LATEST
) version of the function. If you specify a qualified ARN\n with a version suffix, Compute Optimizer will return recommendations for the specified\n function version. For more information about using function versions, see Using\n versions in the Lambda Developer\n Guide.
The Amazon Resource Name (ARN) of the functions for which to return\n recommendations.
\nYou can specify a qualified or unqualified ARN. If you specify an unqualified ARN\n without a function version suffix, Compute Optimizer will return recommendations for the\n latest ($LATEST
) version of the function. If you specify a qualified ARN\n with a version suffix, Compute Optimizer will return recommendations for the specified\n function version. For more information about using function versions, see Using\n versions in the Lambda Developer\n Guide.
The ID of the Amazon Web Services account for which to return function\n recommendations.
\n\nIf your account is the management account of an organization, use this parameter to\n specify the member account for which you want to return function recommendations.
\n\nOnly one account ID can be specified per request.
" + "smithy.api#documentation": "The ID of the Amazon Web Services account for which to return function\n recommendations.
\nIf your account is the management account of an organization, use this parameter to\n specify the member account for which you want to return function recommendations.
\nOnly one account ID can be specified per request.
" } }, "filters": { @@ -2293,7 +2656,7 @@ "maxResults": { "target": "com.amazonaws.computeoptimizer#MaxResults", "traits": { - "smithy.api#documentation": "The maximum number of function recommendations to return with a single request.
\n\nTo retrieve the remaining results, make another request with the returned\n nextToken
value.
The maximum number of function recommendations to return with a single request.
\nTo retrieve the remaining results, make another request with the returned\n nextToken
value.
The token to use to advance to the next page of function recommendations.
\n\nThis value is null when there are no more pages of function recommendations to\n return.
" + "smithy.api#documentation": "The token to use to advance to the next page of function recommendations.
\nThis value is null when there are no more pages of function recommendations to\n return.
" } }, "lambdaFunctionRecommendations": { @@ -2338,7 +2701,7 @@ } }, "traits": { - "smithy.api#documentation": "Describes an error experienced when getting recommendations.
\n\nFor example, an error is returned if you request recommendations for an unsupported\n Auto Scaling group, or if you request recommendations for an instance of an\n unsupported instance family.
" + "smithy.api#documentation": "Describes an error experienced when getting recommendations.
\nFor example, an error is returned if you request recommendations for an unsupported\n Auto Scaling group, or if you request recommendations for an instance of an\n unsupported instance family.
" } }, "com.amazonaws.computeoptimizer#GetRecommendationErrors": { @@ -2347,6 +2710,91 @@ "target": "com.amazonaws.computeoptimizer#GetRecommendationError" } }, + "com.amazonaws.computeoptimizer#GetRecommendationPreferences": { + "type": "operation", + "input": { + "target": "com.amazonaws.computeoptimizer#GetRecommendationPreferencesRequest" + }, + "output": { + "target": "com.amazonaws.computeoptimizer#GetRecommendationPreferencesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.computeoptimizer#AccessDeniedException" + }, + { + "target": "com.amazonaws.computeoptimizer#InternalServerException" + }, + { + "target": "com.amazonaws.computeoptimizer#InvalidParameterValueException" + }, + { + "target": "com.amazonaws.computeoptimizer#MissingAuthenticationToken" + }, + { + "target": "com.amazonaws.computeoptimizer#OptInRequiredException" + }, + { + "target": "com.amazonaws.computeoptimizer#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.computeoptimizer#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.computeoptimizer#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "Returns existing recommendation preferences, such as enhanced infrastructure\n metrics.
\nUse the scope
parameter to specify which preferences to return. You can\n specify to return preferences for an organization, a specific account ID, or a specific\n EC2 instance or Auto Scaling group Amazon Resource Name (ARN).
For more information, see Activating\n enhanced infrastructure metrics in the Compute Optimizer User\n Guide.
" + } + }, + "com.amazonaws.computeoptimizer#GetRecommendationPreferencesRequest": { + "type": "structure", + "members": { + "resourceType": { + "target": "com.amazonaws.computeoptimizer#ResourceType", + "traits": { + "smithy.api#documentation": "The target resource type of the recommendation preference for which to return\n preferences.
\nThe Ec2Instance
option encompasses standalone instances and instances\n that are part of Auto Scaling groups. The AutoScalingGroup
option\n encompasses only instances that are part of an Auto Scaling group.
An object that describes the scope of the recommendation preference to return.
\nYou can return recommendation preferences that are created at the organization level\n (for management accounts of an organization only), account level, and resource level.\n For more information, see Activating\n enhanced infrastructure metrics in the Compute Optimizer User\n Guide.
" + } + }, + "nextToken": { + "target": "com.amazonaws.computeoptimizer#NextToken", + "traits": { + "smithy.api#documentation": "The token to advance to the next page of recommendation preferences.
" + } + }, + "maxResults": { + "target": "com.amazonaws.computeoptimizer#MaxResults", + "traits": { + "smithy.api#documentation": "The maximum number of recommendation preferences to return with a single\n request.
\nTo retrieve the remaining results, make another request with the returned\n nextToken
value.
The token to use to advance to the next page of recommendation preferences.
\nThis value is null when there are no more pages of recommendation preferences to\n return.
" + } + }, + "recommendationPreferencesDetails": { + "target": "com.amazonaws.computeoptimizer#RecommendationPreferencesDetails", + "traits": { + "smithy.api#documentation": "An array of objects that describe recommendation preferences.
" + } + } + } + }, "com.amazonaws.computeoptimizer#GetRecommendationSummaries": { "type": "operation", "input": { @@ -2379,7 +2827,7 @@ } ], "traits": { - "smithy.api#documentation": "Returns the optimization findings for an account.
\n\nIt returns the number of:
\n\nAmazon EC2 instances in an account that are\n Underprovisioned
, Overprovisioned
, or\n Optimized
.
Auto Scaling groups in an account that are NotOptimized
, or\n Optimized
.
Amazon EBS volumes in an account that are NotOptimized
,\n or Optimized
.
Lambda functions in an account that are NotOptimized
,\n or Optimized
.
Returns the optimization findings for an account.
\nIt returns the number of:
\nAmazon EC2 instances in an account that are\n Underprovisioned
, Overprovisioned
, or\n Optimized
.
Auto Scaling groups in an account that are NotOptimized
, or\n Optimized
.
Amazon EBS volumes in an account that are NotOptimized
,\n or Optimized
.
Lambda functions in an account that are NotOptimized
,\n or Optimized
.
The ID of the Amazon Web Services account for which to return recommendation\n summaries.
\n\nIf your account is the management account of an organization, use this parameter to\n specify the member account for which you want to return recommendation summaries.
\n\nOnly one account ID can be specified per request.
" + "smithy.api#documentation": "The ID of the Amazon Web Services account for which to return recommendation\n summaries.
\nIf your account is the management account of an organization, use this parameter to\n specify the member account for which you want to return recommendation summaries.
\nOnly one account ID can be specified per request.
" } }, "nextToken": { @@ -2400,7 +2848,7 @@ "maxResults": { "target": "com.amazonaws.computeoptimizer#MaxResults", "traits": { - "smithy.api#documentation": "The maximum number of recommendation summaries to return with a single request.
\n\nTo retrieve the remaining results, make another request with the returned\n nextToken
value.
The maximum number of recommendation summaries to return with a single request.
\nTo retrieve the remaining results, make another request with the returned\n nextToken
value.
The token to use to advance to the next page of recommendation summaries.
\n\nThis value is null when there are no more pages of recommendation summaries to\n return.
" + "smithy.api#documentation": "The token to use to advance to the next page of recommendation summaries.
\nThis value is null when there are no more pages of recommendation summaries to\n return.
" } }, "recommendationSummaries": { @@ -2422,6 +2870,9 @@ } } }, + "com.amazonaws.computeoptimizer#High": { + "type": "long" + }, "com.amazonaws.computeoptimizer#Identifier": { "type": "string" }, @@ -2470,13 +2921,13 @@ "finding": { "target": "com.amazonaws.computeoptimizer#Finding", "traits": { - "smithy.api#documentation": "The finding classification of the instance.
\n\nFindings for instances include:
\n\n\n \n Underprovisioned
\n —An instance is\n considered under-provisioned when at least one specification of your instance,\n such as CPU, memory, or network, does not meet the performance requirements of\n your workload. Under-provisioned instances may lead to poor application\n performance.
\n \n Overprovisioned
\n —An instance is\n considered over-provisioned when at least one specification of your instance,\n such as CPU, memory, or network, can be sized down while still meeting the\n performance requirements of your workload, and no specification is\n under-provisioned. Over-provisioned instances may lead to unnecessary\n infrastructure cost.
\n \n Optimized
\n —An instance is\n considered optimized when all specifications of your instance, such as CPU,\n memory, and network, meet the performance requirements of your workload and is\n not over provisioned. For optimized resources, Compute Optimizer might\n recommend a new generation instance type.
The finding classification of the instance.
\nFindings for instances include:
\n\n \n Underprovisioned
\n —An instance is\n considered under-provisioned when at least one specification of your instance,\n such as CPU, memory, or network, does not meet the performance requirements of\n your workload. Under-provisioned instances may lead to poor application\n performance.
\n \n Overprovisioned
\n —An instance is\n considered over-provisioned when at least one specification of your instance,\n such as CPU, memory, or network, can be sized down while still meeting the\n performance requirements of your workload, and no specification is\n under-provisioned. Over-provisioned instances may lead to unnecessary\n infrastructure cost.
\n \n Optimized
\n —An instance is\n considered optimized when all specifications of your instance, such as CPU,\n memory, and network, meet the performance requirements of your workload and is\n not over provisioned. For optimized resources, Compute Optimizer might\n recommend a new generation instance type.
The reason for the finding classification of the instance.
\n\nFinding reason codes for instances include:
\n\n\n \n CPUOverprovisioned
\n — The\n instance’s CPU configuration can be sized down while still meeting the\n performance requirements of your workload. This is identified by analyzing the\n CPUUtilization
metric of the current instance during the\n look-back period.
\n \n CPUUnderprovisioned
\n — The\n instance’s CPU configuration doesn't meet the performance requirements of your\n workload and there is an alternative instance type that provides better CPU\n performance. This is identified by analyzing the CPUUtilization
\n metric of the current instance during the look-back period.
\n \n MemoryOverprovisioned
\n — The\n instance’s memory configuration can be sized down while still meeting the\n performance requirements of your workload. This is identified by analyzing the\n memory utilization metric of the current instance during the look-back\n period.
\n \n MemoryUnderprovisioned
\n — The\n instance’s memory configuration doesn't meet the performance requirements of\n your workload and there is an alternative instance type that provides better\n memory performance. This is identified by analyzing the memory utilization\n metric of the current instance during the look-back period.
Memory utilization is analyzed only for resources that have the unified\n CloudWatch agent installed on them. For more information, see\n Enabling memory\n utilization with the Amazon CloudWatch Agent in the\n Compute Optimizer User Guide. On Linux\n instances, Compute Optimizer analyses the mem_used_percent
\n metric in the CWAgent
namespace, or the legacy\n MemoryUtilization
metric in the System/Linux
\n namespace. On Windows instances, Compute Optimizer analyses the Memory\n % Committed Bytes In Use
metric in the CWAgent
\n namespace.
\n \n EBSThroughputOverprovisioned
\n —\n The instance’s EBS throughput configuration can be sized down while still\n meeting the performance requirements of your workload. This is identified by\n analyzing the VolumeReadOps
and VolumeWriteOps
metrics\n of EBS volumes attached to the current instance during the look-back\n period.
\n \n EBSThroughputUnderprovisioned
\n —\n The instance’s EBS throughput configuration doesn't meet the performance\n requirements of your workload and there is an alternative instance type that\n provides better EBS throughput performance. This is identified by analyzing the\n VolumeReadOps
and VolumeWriteOps
metrics of EBS\n volumes attached to the current instance during the look-back period.
\n \n EBSIOPSOverprovisioned
\n — The\n instance’s EBS IOPS configuration can be sized down while still meeting the\n performance requirements of your workload. This is identified by analyzing the\n VolumeReadBytes
and VolumeWriteBytes
metric of EBS\n volumes attached to the current instance during the look-back period.
\n \n EBSIOPSUnderprovisioned
\n — The\n instance’s EBS IOPS configuration doesn't meet the performance requirements of\n your workload and there is an alternative instance type that provides better EBS\n IOPS performance. This is identified by analyzing the\n VolumeReadBytes
and VolumeWriteBytes
metric of EBS\n volumes attached to the current instance during the look-back period.
\n \n NetworkBandwidthOverprovisioned
\n \n — The instance’s network bandwidth configuration can be sized down while still\n meeting the performance requirements of your workload. This is identified by\n analyzing the NetworkIn
and NetworkOut
metrics of the\n current instance during the look-back period.
\n \n NetworkBandwidthUnderprovisioned
\n \n — The instance’s network bandwidth configuration doesn't meet the performance\n requirements of your workload and there is an alternative instance type that\n provides better network bandwidth performance. This is identified by analyzing\n the NetworkIn
and NetworkOut
metrics of the current\n instance during the look-back period. This finding reason happens when the\n NetworkIn
or NetworkOut
performance of an instance\n is impacted.
\n \n NetworkPPSOverprovisioned
\n — The\n instance’s network PPS (packets per second) configuration can be sized down\n while still meeting the performance requirements of your workload. This is\n identified by analyzing the NetworkPacketsIn
and\n NetworkPacketsIn
metrics of the current instance during the\n look-back period.
\n \n NetworkPPSUnderprovisioned
\n — The\n instance’s network PPS (packets per second) configuration doesn't meet the\n performance requirements of your workload and there is an alternative instance\n type that provides better network PPS performance. This is identified by\n analyzing the NetworkPacketsIn
and NetworkPacketsIn
\n metrics of the current instance during the look-back period.
\n \n DiskIOPSOverprovisioned
\n — The\n instance’s disk IOPS configuration can be sized down while still meeting the\n performance requirements of your workload. This is identified by analyzing the\n DiskReadOps
and DiskWriteOps
metrics of the\n current instance during the look-back period.
\n \n DiskIOPSUnderprovisioned
\n — The\n instance’s disk IOPS configuration doesn't meet the performance requirements of\n your workload and there is an alternative instance type that provides better\n disk IOPS performance. This is identified by analyzing the\n DiskReadOps
and DiskWriteOps
metrics of the\n current instance during the look-back period.
\n \n DiskThroughputOverprovisioned
\n —\n The instance’s disk throughput configuration can be sized down while still\n meeting the performance requirements of your workload. This is identified by\n analyzing the DiskReadBytes
and DiskWriteBytes
metrics\n of the current instance during the look-back period.
\n \n DiskThroughputUnderprovisioned
\n —\n The instance’s disk throughput configuration doesn't meet the performance\n requirements of your workload and there is an alternative instance type that\n provides better disk throughput performance. This is identified by analyzing the\n DiskReadBytes
and DiskWriteBytes
metrics of the\n current instance during the look-back period.
For more information about instance metrics, see List the\n available CloudWatch metrics for your instances in the\n Amazon Elastic Compute Cloud User Guide. For more information\n about EBS volume metrics, see Amazon CloudWatch\n metrics for Amazon EBS in the Amazon Elastic Compute Cloud\n User Guide.
\nThe reason for the finding classification of the instance.
\nFinding reason codes for instances include:
\n\n \n CPUOverprovisioned
\n — The\n instance’s CPU configuration can be sized down while still meeting the\n performance requirements of your workload. This is identified by analyzing the\n CPUUtilization
metric of the current instance during the\n look-back period.
\n \n CPUUnderprovisioned
\n — The\n instance’s CPU configuration doesn't meet the performance requirements of your\n workload and there is an alternative instance type that provides better CPU\n performance. This is identified by analyzing the CPUUtilization
\n metric of the current instance during the look-back period.
\n \n MemoryOverprovisioned
\n — The\n instance’s memory configuration can be sized down while still meeting the\n performance requirements of your workload. This is identified by analyzing the\n memory utilization metric of the current instance during the look-back\n period.
\n \n MemoryUnderprovisioned
\n — The\n instance’s memory configuration doesn't meet the performance requirements of\n your workload and there is an alternative instance type that provides better\n memory performance. This is identified by analyzing the memory utilization\n metric of the current instance during the look-back period.
Memory utilization is analyzed only for resources that have the unified\n CloudWatch agent installed on them. For more information, see\n Enabling memory\n utilization with the Amazon CloudWatch Agent in the\n Compute Optimizer User Guide. On Linux\n instances, Compute Optimizer analyses the mem_used_percent
\n metric in the CWAgent
namespace, or the legacy\n MemoryUtilization
metric in the System/Linux
\n namespace. On Windows instances, Compute Optimizer analyses the Memory\n % Committed Bytes In Use
metric in the CWAgent
\n namespace.
\n \n EBSThroughputOverprovisioned
\n —\n The instance’s EBS throughput configuration can be sized down while still\n meeting the performance requirements of your workload. This is identified by\n analyzing the VolumeReadOps
and VolumeWriteOps
metrics\n of EBS volumes attached to the current instance during the look-back\n period.
\n \n EBSThroughputUnderprovisioned
\n —\n The instance’s EBS throughput configuration doesn't meet the performance\n requirements of your workload and there is an alternative instance type that\n provides better EBS throughput performance. This is identified by analyzing the\n VolumeReadOps
and VolumeWriteOps
metrics of EBS\n volumes attached to the current instance during the look-back period.
\n \n EBSIOPSOverprovisioned
\n — The\n instance’s EBS IOPS configuration can be sized down while still meeting the\n performance requirements of your workload. This is identified by analyzing the\n VolumeReadBytes
and VolumeWriteBytes
metric of EBS\n volumes attached to the current instance during the look-back period.
\n \n EBSIOPSUnderprovisioned
\n — The\n instance’s EBS IOPS configuration doesn't meet the performance requirements of\n your workload and there is an alternative instance type that provides better EBS\n IOPS performance. This is identified by analyzing the\n VolumeReadBytes
and VolumeWriteBytes
metric of EBS\n volumes attached to the current instance during the look-back period.
\n \n NetworkBandwidthOverprovisioned
\n \n — The instance’s network bandwidth configuration can be sized down while still\n meeting the performance requirements of your workload. This is identified by\n analyzing the NetworkIn
and NetworkOut
metrics of the\n current instance during the look-back period.
\n \n NetworkBandwidthUnderprovisioned
\n \n — The instance’s network bandwidth configuration doesn't meet the performance\n requirements of your workload and there is an alternative instance type that\n provides better network bandwidth performance. This is identified by analyzing\n the NetworkIn
and NetworkOut
metrics of the current\n instance during the look-back period. This finding reason happens when the\n NetworkIn
or NetworkOut
performance of an instance\n is impacted.
\n \n NetworkPPSOverprovisioned
\n — The\n instance’s network PPS (packets per second) configuration can be sized down\n while still meeting the performance requirements of your workload. This is\n identified by analyzing the NetworkPacketsIn
and\n NetworkPacketsIn
metrics of the current instance during the\n look-back period.
\n \n NetworkPPSUnderprovisioned
\n — The\n instance’s network PPS (packets per second) configuration doesn't meet the\n performance requirements of your workload and there is an alternative instance\n type that provides better network PPS performance. This is identified by\n analyzing the NetworkPacketsIn
and NetworkPacketsIn
\n metrics of the current instance during the look-back period.
\n \n DiskIOPSOverprovisioned
\n — The\n instance’s disk IOPS configuration can be sized down while still meeting the\n performance requirements of your workload. This is identified by analyzing the\n DiskReadOps
and DiskWriteOps
metrics of the\n current instance during the look-back period.
\n \n DiskIOPSUnderprovisioned
\n — The\n instance’s disk IOPS configuration doesn't meet the performance requirements of\n your workload and there is an alternative instance type that provides better\n disk IOPS performance. This is identified by analyzing the\n DiskReadOps
and DiskWriteOps
metrics of the\n current instance during the look-back period.
\n \n DiskThroughputOverprovisioned
\n —\n The instance’s disk throughput configuration can be sized down while still\n meeting the performance requirements of your workload. This is identified by\n analyzing the DiskReadBytes
and DiskWriteBytes
metrics\n of the current instance during the look-back period.
\n \n DiskThroughputUnderprovisioned
\n —\n The instance’s disk throughput configuration doesn't meet the performance\n requirements of your workload and there is an alternative instance type that\n provides better disk throughput performance. This is identified by analyzing the\n DiskReadBytes
and DiskWriteBytes
metrics of the\n current instance during the look-back period.
For more information about instance metrics, see List the\n available CloudWatch metrics for your instances in the\n Amazon Elastic Compute Cloud User Guide. For more information\n about EBS volume metrics, see Amazon CloudWatch\n metrics for Amazon EBS in the Amazon Elastic Compute Cloud\n User Guide.
\nThe timestamp of when the instance recommendation was last refreshed.
" + "smithy.api#documentation": "The timestamp of when the instance recommendation was last generated.
" + } + }, + "currentPerformanceRisk": { + "target": "com.amazonaws.computeoptimizer#CurrentPerformanceRisk", + "traits": { + "smithy.api#documentation": "The risk of the current instance not meeting the performance needs of its workloads.\n The higher the risk, the more likely the current Lambda function requires\n more memory.
" + } + }, + "effectiveRecommendationPreferences": { + "target": "com.amazonaws.computeoptimizer#EffectiveRecommendationPreferences", + "traits": { + "smithy.api#documentation": "An object that describes the effective recommendation preferences for the\n instance.
" } } }, @@ -2603,25 +3066,31 @@ "projectedUtilizationMetrics": { "target": "com.amazonaws.computeoptimizer#ProjectedUtilizationMetrics", "traits": { - "smithy.api#documentation": "An array of objects that describe the projected utilization metrics of the instance\n recommendation option.
\n\nThe Cpu
and Memory
metrics are the only projected\n utilization metrics returned. Additionally, the Memory
metric is\n returned only for resources that have the unified CloudWatch agent installed\n on them. For more information, see Enabling Memory\n Utilization with the CloudWatch Agent.
An array of objects that describe the projected utilization metrics of the instance\n recommendation option.
\nThe Cpu
and Memory
metrics are the only projected\n utilization metrics returned. Additionally, the Memory
metric is\n returned only for resources that have the unified CloudWatch agent installed\n on them. For more information, see Enabling Memory\n Utilization with the CloudWatch Agent.
Describes the configuration differences between the current instance and the\n recommended instance type. You should consider the configuration differences before\n migrating your workloads from the current instance to the recommended instance type. The\n Change the instance type guide for Linux and Change the instance type\n guide for Windows provide general guidance for getting started with an\n instance migration.
\n\nPlatform differences include:
\n\n\n \n Hypervisor
\n — The hypervisor of\n the recommended instance type is different than that of the current instance.\n For example, the recommended instance type uses a Nitro hypervisor and the\n current instance uses a Xen hypervisor. The differences that you should consider\n between these hypervisors are covered in the Nitro Hypervisor section of the\n Amazon EC2 frequently asked questions. For more information, see\n Instances built on the Nitro System in the Amazon EC2\n User Guide for Linux, or Instances built on the Nitro System in the Amazon EC2\n User Guide for Windows.
\n \n NetworkInterface
\n — The network\n interface of the recommended instance type is different than that of the current\n instance. For example, the recommended instance type supports enhanced\n networking and the current instance might not. To enable enhanced networking for\n the recommended instance type, you must install the Elastic Network Adapter\n (ENA) driver or the Intel 82599 Virtual Function driver. For more information,\n see Networking and storage features and Enhanced networking\n on Linux in the Amazon EC2 User Guide for\n Linux, or Networking and storage features and Enhanced\n networking on Windows in the Amazon EC2 User Guide for\n Windows.
\n \n StorageInterface
\n — The storage\n interface of the recommended instance type is different than that of the current\n instance. For example, the recommended instance type uses an NVMe storage\n interface and the current instance does not. To access NVMe volumes for the\n recommended instance type, you will need to install or upgrade the NVMe driver.\n For more information, see Networking and storage features and Amazon EBS and NVMe on\n Linux instances in the Amazon EC2 User Guide for\n Linux, or Networking and storage features and Amazon EBS and NVMe\n on Windows instances in the Amazon EC2 User Guide for\n Windows.
\n \n InstanceStoreAvailability
\n — The\n recommended instance type does not support instance store volumes and the\n current instance does. Before migrating, you might need to back up the data on\n your instance store volumes if you want to preserve them. For more information,\n see How do I back up an instance store volume on my Amazon EC2 instance\n to Amazon EBS? in the Amazon Web Services Premium\n Support Knowledge Base. For more information, see Networking and storage features and Amazon EC2\n instance store in the Amazon EC2 User Guide for\n Linux, or see Networking and storage features and Amazon EC2\n instance store in the Amazon EC2 User Guide for\n Windows.
\n \n VirtualizationType
\n — The\n recommended instance type uses the hardware virtual machine (HVM) virtualization\n type and the current instance uses the paravirtual (PV) virtualization type. For\n more information about the differences between these virtualization types, see\n Linux AMI\n virtualization types in the Amazon EC2 User Guide for\n Linux, or Windows AMI virtualization types in the Amazon EC2 User\n Guide for Windows.
\n \n Architecture
\n — The CPU\n architecture between the recommended instance type and the current instance is\n different. For example, the recommended instance type might use an Arm CPU\n architecture and the current instance type might use a different one, such as\n x86. Before migrating, you should consider recompiling the software on your\n instance for the new architecture. Alternatively, you might switch to an Amazon\n Machine Image (AMI) that supports the new architecture. For more information\n about the CPU architecture for each instance type, see Amazon EC2 Instance Types.
Describes the configuration differences between the current instance and the\n recommended instance type. You should consider the configuration differences before\n migrating your workloads from the current instance to the recommended instance type. The\n Change the instance type guide for Linux and Change the instance type\n guide for Windows provide general guidance for getting started with an\n instance migration.
\nPlatform differences include:
\n\n \n Hypervisor
\n — The hypervisor of\n the recommended instance type is different than that of the current instance.\n For example, the recommended instance type uses a Nitro hypervisor and the\n current instance uses a Xen hypervisor. The differences that you should consider\n between these hypervisors are covered in the Nitro Hypervisor section of the\n Amazon EC2 frequently asked questions. For more information, see\n Instances built on the Nitro System in the Amazon EC2\n User Guide for Linux, or Instances built on the Nitro System in the Amazon EC2\n User Guide for Windows.
\n \n NetworkInterface
\n — The network\n interface of the recommended instance type is different than that of the current\n instance. For example, the recommended instance type supports enhanced\n networking and the current instance might not. To enable enhanced networking for\n the recommended instance type, you must install the Elastic Network Adapter\n (ENA) driver or the Intel 82599 Virtual Function driver. For more information,\n see Networking and storage features and Enhanced networking\n on Linux in the Amazon EC2 User Guide for\n Linux, or Networking and storage features and Enhanced\n networking on Windows in the Amazon EC2 User Guide for\n Windows.
\n \n StorageInterface
\n — The storage\n interface of the recommended instance type is different than that of the current\n instance. For example, the recommended instance type uses an NVMe storage\n interface and the current instance does not. To access NVMe volumes for the\n recommended instance type, you will need to install or upgrade the NVMe driver.\n For more information, see Networking and storage features and Amazon EBS and NVMe on\n Linux instances in the Amazon EC2 User Guide for\n Linux, or Networking and storage features and Amazon EBS and NVMe\n on Windows instances in the Amazon EC2 User Guide for\n Windows.
\n \n InstanceStoreAvailability
\n — The\n recommended instance type does not support instance store volumes and the\n current instance does. Before migrating, you might need to back up the data on\n your instance store volumes if you want to preserve them. For more information,\n see How do I back up an instance store volume on my Amazon EC2 instance\n to Amazon EBS? in the Amazon Web Services Premium\n Support Knowledge Base. For more information, see Networking and storage features and Amazon EC2\n instance store in the Amazon EC2 User Guide for\n Linux, or see Networking and storage features and Amazon EC2\n instance store in the Amazon EC2 User Guide for\n Windows.
\n \n VirtualizationType
\n — The\n recommended instance type uses the hardware virtual machine (HVM) virtualization\n type and the current instance uses the paravirtual (PV) virtualization type. For\n more information about the differences between these virtualization types, see\n Linux AMI\n virtualization types in the Amazon EC2 User Guide for\n Linux, or Windows AMI virtualization types in the Amazon EC2 User\n Guide for Windows.
\n \n Architecture
\n — The CPU\n architecture between the recommended instance type and the current instance is\n different. For example, the recommended instance type might use an Arm CPU\n architecture and the current instance type might use a different one, such as\n x86. Before migrating, you should consider recompiling the software on your\n instance for the new architecture. Alternatively, you might switch to an Amazon\n Machine Image (AMI) that supports the new architecture. For more information\n about the CPU architecture for each instance type, see Amazon EC2 Instance Types.
The performance risk of the instance recommendation option.
\n\nPerformance risk indicates the likelihood of the recommended instance type not meeting\n the resource needs of your workload. Compute Optimizer calculates an individual\n performance risk score for each specification of the recommended instance, including\n CPU, memory, EBS throughput, EBS IOPS, disk throughput, disk IOPS, network throughput,\n and network PPS.\n The performance\n risk of the recommended instance is calculated as the maximum performance risk score\n across the analyzed resource specifications.
\n\nThe value ranges from 0
- 4
, with 0
meaning\n that the recommended resource is predicted to always provide enough hardware capability.\n The higher the performance risk is, the more likely you should validate whether the\n recommendation will meet the performance requirements of your workload before migrating\n your resource.
The performance risk of the instance recommendation option.
\nPerformance risk indicates the likelihood of the recommended instance type not meeting\n the resource needs of your workload. Compute Optimizer calculates an individual\n performance risk score for each specification of the recommended instance, including\n CPU, memory, EBS throughput, EBS IOPS, disk throughput, disk IOPS, network throughput,\n and network PPS.\n The performance\n risk of the recommended instance is calculated as the maximum performance risk score\n across the analyzed resource specifications.
\nThe value ranges from 0
- 4
, with 0
meaning\n that the recommended resource is predicted to always provide enough hardware capability.\n The higher the performance risk is, the more likely you should validate whether the\n recommendation will meet the performance requirements of your workload before migrating\n your resource.
The rank of the instance recommendation option.
\n\nThe top recommendation option is ranked as 1
.
The rank of the instance recommendation option.
\nThe top recommendation option is ranked as 1
.
An object that describes the savings opportunity for the instance recommendation\n option. Savings opportunity includes the estimated monthly savings amount and\n percentage.
" } } }, @@ -2670,18 +3139,18 @@ "name": { "target": "com.amazonaws.computeoptimizer#JobFilterName", "traits": { - "smithy.api#documentation": "The name of the filter.
\n\nSpecify ResourceType
to return export jobs of a specific resource type\n (for example, Ec2Instance
).
Specify JobStatus
to return export jobs with a specific status (e.g,\n Complete
).
The name of the filter.
\nSpecify ResourceType
to return export jobs of a specific resource type\n (for example, Ec2Instance
).
Specify JobStatus
to return export jobs with a specific status (e.g,\n Complete
).
The value of the filter.
\n\nThe valid values for this parameter are as follows, depending on what you specify for\n the name
parameter:
Specify Ec2Instance
or AutoScalingGroup
if you\n specify the name
parameter as ResourceType
. There is\n no filter for EBS volumes because volume recommendations cannot be exported at\n this time.
Specify Queued
, InProgress
, Complete
,\n or Failed
if you specify the name
parameter as\n JobStatus
.
The value of the filter.
\nThe valid values for this parameter are as follows, depending on what you specify for\n the name
parameter:
Specify Ec2Instance
or AutoScalingGroup
if you\n specify the name
parameter as ResourceType
. There is\n no filter for EBS volumes because volume recommendations cannot be exported at\n this time.
Specify Queued
, InProgress
, Complete
,\n or Failed
if you specify the name
parameter as\n JobStatus
.
Describes a filter that returns a more specific list of recommendation export jobs.\n Use this filter with the DescribeRecommendationExportJobs\n action.
\n\nYou can use EBSFilter
with the GetEBSVolumeRecommendations action,\n LambdaFunctionRecommendationFilter
with the GetLambdaFunctionRecommendations action, and Filter
with\n the GetAutoScalingGroupRecommendations and GetEC2InstanceRecommendations actions.
Describes a filter that returns a more specific list of recommendation export jobs.\n Use this filter with the DescribeRecommendationExportJobs\n action.
\nYou can use EBSFilter
with the GetEBSVolumeRecommendations action,\n LambdaFunctionRecommendationFilter
with the GetLambdaFunctionRecommendations action, and Filter
with\n the GetAutoScalingGroupRecommendations and GetEC2InstanceRecommendations actions.
The rank of the function recommendation option.
\n\nThe top recommendation option is ranked as 1
.
The rank of the function recommendation option.
\nThe top recommendation option is ranked as 1
.
An array of objects that describe the projected utilization metrics of the function\n recommendation option.
" } + }, + "savingsOpportunity": { + "target": "com.amazonaws.computeoptimizer#SavingsOpportunity", + "traits": { + "smithy.api#documentation": "An object that describes the savings opportunity for the Lambda function\n recommendation option. Savings opportunity includes the estimated monthly savings amount\n and percentage.
" + } } }, "traits": { @@ -2909,13 +3384,13 @@ "lastRefreshTimestamp": { "target": "com.amazonaws.computeoptimizer#LastRefreshTimestamp", "traits": { - "smithy.api#documentation": "The timestamp of when the function recommendation was last refreshed.
" + "smithy.api#documentation": "The timestamp of when the function recommendation was last generated.
" } }, "finding": { "target": "com.amazonaws.computeoptimizer#LambdaFunctionRecommendationFinding", "traits": { - "smithy.api#documentation": "The finding classification of the function.
\n\nFindings for functions include:
\n\n \n Optimized
\n — The function is\n correctly provisioned to run your workload based on its current configuration\n and its utilization history. This finding classification does not include\n finding reason codes.
\n \n NotOptimized
\n — The function is\n performing at a higher level (over-provisioned) or at a lower level\n (under-provisioned) than required for your workload because its current\n configuration is not optimal. Over-provisioned resources might lead to\n unnecessary infrastructure cost, and under-provisioned resources might lead to\n poor application performance. This finding classification can include the\n MemoryUnderprovisioned
and MemoryUnderprovisioned
\n finding reason codes.
\n \n Unavailable
\n — Compute Optimizer\n was unable to generate a recommendation for the function. This could be because\n the function has not accumulated sufficient metric data, or the function does\n not qualify for a recommendation. This finding classification can include the\n InsufficientData
and Inconclusive
finding reason\n codes.
Functions with a finding of unavailable are not returned unless you\n specify the filter
parameter with a value of\n Unavailable
in your\n GetLambdaFunctionRecommendations
request.
The finding classification of the function.
\nFindings for functions include:
\n\n \n Optimized
\n — The function is\n correctly provisioned to run your workload based on its current configuration\n and its utilization history. This finding classification does not include\n finding reason codes.
\n \n NotOptimized
\n — The function is\n performing at a higher level (over-provisioned) or at a lower level\n (under-provisioned) than required for your workload because its current\n configuration is not optimal. Over-provisioned resources might lead to\n unnecessary infrastructure cost, and under-provisioned resources might lead to\n poor application performance. This finding classification can include the\n MemoryUnderprovisioned
and MemoryUnderprovisioned
\n finding reason codes.
\n \n Unavailable
\n — Compute Optimizer\n was unable to generate a recommendation for the function. This could be because\n the function has not accumulated sufficient metric data, or the function does\n not qualify for a recommendation. This finding classification can include the\n InsufficientData
and Inconclusive
finding reason\n codes.
Functions with a finding of unavailable are not returned unless you\n specify the filter
parameter with a value of\n Unavailable
in your\n GetLambdaFunctionRecommendations
request.
An array of objects that describe the memory configuration recommendation options for\n the function.
" } + }, + "currentPerformanceRisk": { + "target": "com.amazonaws.computeoptimizer#CurrentPerformanceRisk", + "traits": { + "smithy.api#documentation": "The risk of the current Lambda function not meeting the performance needs\n of its workloads. The higher the risk, the more likely the current Lambda\n function configuration is underperforming in its workload.
" + } } }, "traits": { @@ -2941,18 +3422,18 @@ "name": { "target": "com.amazonaws.computeoptimizer#LambdaFunctionRecommendationFilterName", "traits": { - "smithy.api#documentation": "The name of the filter.
\n\nSpecify Finding
to return recommendations with a specific finding\n classification (for example, NotOptimized
).
Specify FindingReasonCode
to return recommendations with a specific\n finding reason code (for example, MemoryUnderprovisioned
).
The name of the filter.
\nSpecify Finding
to return recommendations with a specific finding\n classification (for example, NotOptimized
).
Specify FindingReasonCode
to return recommendations with a specific\n finding reason code (for example, MemoryUnderprovisioned
).
The value of the filter.
\n\nThe valid values for this parameter are as follows, depending on what you specify for\n the name
parameter:
Specify Optimized
, NotOptimized
, or\n Unavailable
if you specify the name
parameter as\n Finding
.
Specify MemoryOverprovisioned
,\n MemoryUnderprovisioned
, InsufficientData
, or\n Inconclusive
if you specify the name
parameter as\n FindingReasonCode
.
The value of the filter.
\nThe valid values for this parameter are as follows, depending on what you specify for\n the name
parameter:
Specify Optimized
, NotOptimized
, or\n Unavailable
if you specify the name
parameter as\n Finding
.
Specify MemoryOverprovisioned
,\n MemoryUnderprovisioned
, InsufficientData
, or\n Inconclusive
if you specify the name
parameter as\n FindingReasonCode
.
Describes a filter that returns a more specific list of Lambda\n function recommendations. Use this filter with the GetLambdaFunctionRecommendations action.
\n\nYou can use EBSFilter
with the GetEBSVolumeRecommendations action, JobFilter
with the\n DescribeRecommendationExportJobs action, and Filter
\n with the GetAutoScalingGroupRecommendations and GetEC2InstanceRecommendations actions.
Describes a filter that returns a more specific list of Lambda\n function recommendations. Use this filter with the GetLambdaFunctionRecommendations action.
\nYou can use EBSFilter
with the GetEBSVolumeRecommendations action, JobFilter
with the\n DescribeRecommendationExportJobs action, and Filter
\n with the GetAutoScalingGroupRecommendations and GetEC2InstanceRecommendations actions.
The name of the utilization metric.
\n\nThe following utilization metrics are available:
\n\n Duration
- The amount of time that your function code spends\n processing an event.
\n Memory
- The amount of memory used per invocation.
The name of the utilization metric.
\nThe following utilization metrics are available:
\n\n Duration
- The amount of time that your function code spends\n processing an event.
\n Memory
- The amount of memory used per invocation.
The statistic of the utilization metric.
\n\nThe Compute Optimizer API, Command Line Interface (CLI), and SDKs\n return utilization metrics using only the Maximum
statistic, which is the\n highest value observed during the specified period.
The Compute Optimizer console displays graphs for some utilization metrics using the\n Average
statistic, which is the value of Sum
/\n SampleCount
during the specified period. For more information, see\n Viewing resource\n recommendations in the Compute Optimizer User\n Guide. You can also get averaged utilization metric data for your resources\n using Amazon CloudWatch. For more information, see the Amazon CloudWatch\n User Guide.
The statistic of the utilization metric.
\nThe Compute Optimizer API, Command Line Interface (CLI), and SDKs\n return utilization metrics using only the Maximum
statistic, which is the\n highest value observed during the specified period.
The Compute Optimizer console displays graphs for some utilization metrics using the\n Average
statistic, which is the value of Sum
/\n SampleCount
during the specified period. For more information, see\n Viewing resource\n recommendations in the Compute Optimizer User\n Guide. You can also get averaged utilization metric data for your resources\n using Amazon CloudWatch. For more information, see the Amazon CloudWatch\n User Guide.
The name of the projected utilization metric.
\n\nThe following projected utilization metrics are returned:
\n\n Cpu
- The projected percentage of allocated EC2 compute units\n that would be in use on the recommendation option had you used that resource\n during the analyzed period. This metric identifies the processing power required\n to run an application on the recommendation option.
Depending on the instance type, tools in your operating system can show a\n lower percentage than CloudWatch when the instance is not allocated a full\n processor core.
\nUnits: Percent
\n\n Memory
- The percentage of memory that would be in use on the\n recommendation option had you used that resource during the analyzed period.\n This metric identifies the amount of memory required to run an application on\n the recommendation option.
Units: Percent
\nThe Memory
metric is returned only for resources that have\n the unified CloudWatch agent installed on them. For more information,\n see Enabling Memory\n Utilization with the CloudWatch Agent.
The name of the projected utilization metric.
\nThe following projected utilization metrics are returned:
\n\n Cpu
- The projected percentage of allocated EC2 compute units\n that would be in use on the recommendation option had you used that resource\n during the analyzed period. This metric identifies the processing power required\n to run an application on the recommendation option.
Depending on the instance type, tools in your operating system can show a\n lower percentage than CloudWatch when the instance is not allocated a full\n processor core.
\nUnits: Percent
\n\n Memory
- The percentage of memory that would be in use on the\n recommendation option had you used that resource during the analyzed period.\n This metric identifies the amount of memory required to run an application on\n the recommendation option.
Units: Percent
\nThe Memory
metric is returned only for resources that have\n the unified CloudWatch agent installed on them. For more information,\n see Enabling Memory\n Utilization with the CloudWatch Agent.
Describes a projected utilization metric of a recommendation option, such as an\n Amazon EC2 instance. This represents the projected utilization of a\n recommendation option had you used that resource during the analyzed period.
\n\nCompare the utilization metric data of your resource against its projected utilization\n metric data to determine the performance difference between your current resource and\n the recommended option.
\n\nThe Cpu
and Memory
metrics are the only projected\n utilization metrics returned when you run the GetEC2RecommendationProjectedMetrics action. Additionally, the\n Memory
metric is returned only for resources that have the unified\n CloudWatch agent installed on them. For more information, see Enabling Memory Utilization with the CloudWatch Agent.
Describes a projected utilization metric of a recommendation option, such as an\n Amazon EC2 instance. This represents the projected utilization of a\n recommendation option had you used that resource during the analyzed period.
\nCompare the utilization metric data of your resource against its projected utilization\n metric data to determine the performance difference between your current resource and\n the recommended option.
\nThe Cpu
and Memory
metrics are the only projected\n utilization metrics returned when you run the GetEC2RecommendationProjectedMetrics action. Additionally, the\n Memory
metric is returned only for resources that have the unified\n CloudWatch agent installed on them. For more information, see Enabling Memory Utilization with the CloudWatch Agent.
Creates a new recommendation preference or updates an existing recommendation\n preference, such as enhanced infrastructure metrics.
\nFor more information, see Activating\n enhanced infrastructure metrics in the Compute Optimizer User\n Guide.
" + } + }, + "com.amazonaws.computeoptimizer#PutRecommendationPreferencesRequest": { + "type": "structure", + "members": { + "resourceType": { + "target": "com.amazonaws.computeoptimizer#ResourceType", + "traits": { + "smithy.api#documentation": "The target resource type of the recommendation preference to create.
\nThe Ec2Instance
option encompasses standalone instances and instances\n that are part of Auto Scaling groups. The AutoScalingGroup
option\n encompasses only instances that are part of an Auto Scaling group.
An object that describes the scope of the recommendation preference to create.
\nYou can create recommendation preferences at the organization level (for management\n accounts of an organization only), account level, and resource level. For more\n information, see Activating\n enhanced infrastructure metrics in the Compute Optimizer User\n Guide.
\nYou cannot create recommendation preferences for Auto Scaling groups at the\n organization and account levels. You can create recommendation preferences for\n Auto Scaling groups only at the resource level by specifying a scope name\n of ResourceArn
and a scope value of the Auto Scaling group Amazon\n Resource Name (ARN). This will configure the preference for all instances that are\n part of the specified the Auto Scaling group.
The status of the enhanced infrastructure metrics recommendation preference to create\n or update.
\nA status of Active
confirms that the preference is applied in the latest\n recommendation refresh, and a status of Inactive
confirms that it's not yet\n applied.
Describes a recommendation export job.
\n\n\nUse the DescribeRecommendationExportJobs action to view your\n recommendation export jobs.
\n\n\nUse the ExportAutoScalingGroupRecommendations or ExportEC2InstanceRecommendations actions to request an export of your\n recommendations.
" + "smithy.api#documentation": "Describes a recommendation export job.
\nUse the DescribeRecommendationExportJobs action to view your\n recommendation export jobs.
\nUse the ExportAutoScalingGroupRecommendations or ExportEC2InstanceRecommendations actions to request an export of your\n recommendations.
" } }, "com.amazonaws.computeoptimizer#RecommendationExportJobs": { @@ -3411,18 +3964,67 @@ "target": "com.amazonaws.computeoptimizer#InstanceRecommendationOption" } }, + "com.amazonaws.computeoptimizer#RecommendationPreferenceName": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "EnhancedInfrastructureMetrics", + "name": "ENHANCED_INFRASTRUCTURE_METRICS" + } + ] + } + }, + "com.amazonaws.computeoptimizer#RecommendationPreferenceNames": { + "type": "list", + "member": { + "target": "com.amazonaws.computeoptimizer#RecommendationPreferenceName" + } + }, "com.amazonaws.computeoptimizer#RecommendationPreferences": { "type": "structure", "members": { "cpuVendorArchitectures": { "target": "com.amazonaws.computeoptimizer#CpuVendorArchitectures", "traits": { - "smithy.api#documentation": "Specifies the CPU vendor and architecture for Amazon EC2 instance and Auto Scaling group recommendations.
\n\nFor example, when you specify AWS_ARM64
with:
A GetEC2InstanceRecommendations or GetAutoScalingGroupRecommendations request, Compute Optimizer\n returns recommendations that consist of Graviton2 instance types only.
\nA GetEC2RecommendationProjectedMetrics request, Compute Optimizer returns projected utilization metrics for Graviton2 instance type\n recommendations only.
\nA ExportEC2InstanceRecommendations or ExportAutoScalingGroupRecommendations request, Compute Optimizer\n exports recommendations that consist of Graviton2 instance types only.
\nSpecifies the CPU vendor and architecture for Amazon EC2 instance and Auto Scaling group recommendations.
\nFor example, when you specify AWS_ARM64
with:
A GetEC2InstanceRecommendations or GetAutoScalingGroupRecommendations request, Compute Optimizer\n returns recommendations that consist of Graviton2 instance types only.
\nA GetEC2RecommendationProjectedMetrics request, Compute Optimizer returns projected utilization metrics for Graviton2 instance type\n recommendations only.
\nA ExportEC2InstanceRecommendations or ExportAutoScalingGroupRecommendations request, Compute Optimizer\n exports recommendations that consist of Graviton2 instance types only.
\nDescribes the recommendation preferences to return in the response of a GetAutoScalingGroupRecommendations, GetEC2InstanceRecommendations, and GetEC2RecommendationProjectedMetrics request.
" + } + }, + "com.amazonaws.computeoptimizer#RecommendationPreferencesDetail": { + "type": "structure", + "members": { + "scope": { + "target": "com.amazonaws.computeoptimizer#Scope", + "traits": { + "smithy.api#documentation": "An object that describes the scope of the recommendation preference.
\nRecommendation preferences can be created at the organization level (for management\n accounts of an organization only), account level, and resource level. For more\n information, see Activating\n enhanced infrastructure metrics in the Compute Optimizer User\n Guide.
" + } + }, + "resourceType": { + "target": "com.amazonaws.computeoptimizer#ResourceType", + "traits": { + "smithy.api#documentation": "The target resource type of the recommendation preference to create.
\nThe Ec2Instance
option encompasses standalone instances and instances\n that are part of Auto Scaling groups. The AutoScalingGroup
option\n encompasses only instances that are part of an Auto Scaling group.
The status of the enhanced infrastructure metrics recommendation preference.
\nA status of Active
confirms that the preference is applied in the latest\n recommendation refresh, and a status of Inactive
confirms that it's not yet\n applied.
Describes preferences for recommendations.
" + "smithy.api#documentation": "Describes a recommendation preference.
" + } + }, + "com.amazonaws.computeoptimizer#RecommendationPreferencesDetails": { + "type": "list", + "member": { + "target": "com.amazonaws.computeoptimizer#RecommendationPreferencesDetail" } }, "com.amazonaws.computeoptimizer#RecommendationSource": { @@ -3495,7 +4097,7 @@ "recommendationResourceType": { "target": "com.amazonaws.computeoptimizer#RecommendationSourceType", "traits": { - "smithy.api#documentation": "The resource type of the recommendation.
" + "smithy.api#documentation": "The resource type that the recommendation summary applies to.
" } }, "accountId": { @@ -3503,6 +4105,18 @@ "traits": { "smithy.api#documentation": "The Amazon Web Services account ID of the recommendation summary.
" } + }, + "savingsOpportunity": { + "target": "com.amazonaws.computeoptimizer#SavingsOpportunity", + "traits": { + "smithy.api#documentation": "An object that describes the savings opportunity for a given resource type. Savings\n opportunity includes the estimated monthly savings amount and percentage.
" + } + }, + "currentPerformanceRiskRatings": { + "target": "com.amazonaws.computeoptimizer#CurrentPerformanceRiskRatings", + "traits": { + "smithy.api#documentation": "An object that describes the performance risk ratings for a given resource\n type.
" + } } }, "traits": { @@ -3524,7 +4138,7 @@ "rank": { "target": "com.amazonaws.computeoptimizer#Rank", "traits": { - "smithy.api#documentation": "The rank of the recommendation option projected metric.
\n\nThe top recommendation option is ranked as 1
.
The projected metric rank correlates to the recommendation option rank. For example,\n the projected metric ranked as 1
is related to the recommendation option\n that is also ranked as 1
in the same response.
The rank of the recommendation option projected metric.
\nThe top recommendation option is ranked as 1
.
The projected metric rank correlates to the recommendation option rank. For example,\n the projected metric ranked as 1
is related to the recommendation option\n that is also ranked as 1
in the same response.
Describes a projected utilization metric of a recommendation option.
\n\nThe Cpu
and Memory
metrics are the only projected\n utilization metrics returned when you run the GetEC2RecommendationProjectedMetrics action. Additionally, the\n Memory
metric is returned only for resources that have the unified\n CloudWatch agent installed on them. For more information, see Enabling Memory Utilization with the CloudWatch Agent.
Describes a projected utilization metric of a recommendation option.
\nThe Cpu
and Memory
metrics are the only projected\n utilization metrics returned when you run the GetEC2RecommendationProjectedMetrics action. Additionally, the\n Memory
metric is returned only for resources that have the unified\n CloudWatch agent installed on them. For more information, see Enabling Memory Utilization with the CloudWatch Agent.
The Amazon S3 bucket key of an export file.
\n\nThe key uniquely identifies the object, or export file, in the S3 bucket.
" + "smithy.api#documentation": "The Amazon S3 bucket key of an export file.
\nThe key uniquely identifies the object, or export file, in the S3 bucket.
" } }, "metadataKey": { "target": "com.amazonaws.computeoptimizer#MetadataKey", "traits": { - "smithy.api#documentation": "The Amazon S3 bucket key of a metadata file.
\n\nThe key uniquely identifies the object, or metadata file, in the S3 bucket.
" + "smithy.api#documentation": "The Amazon S3 bucket key of a metadata file.
\nThe key uniquely identifies the object, or metadata file, in the S3 bucket.
" } } }, @@ -3623,9 +4240,74 @@ } }, "traits": { - "smithy.api#documentation": "Describes the destination Amazon Simple Storage Service (Amazon S3) bucket name and\n key prefix for a recommendations export job.
\n\nYou must create the destination Amazon S3 bucket for your recommendations\n export before you create the export job. Compute Optimizer does not create the S3 bucket\n for you. After you create the S3 bucket, ensure that it has the required permission\n policy to allow Compute Optimizer to write the export file to it. If you plan to specify\n an object prefix when you create the export job, you must include the object prefix in\n the policy that you add to the S3 bucket. For more information, see Amazon S3 Bucket Policy for Compute Optimizer in the\n Compute Optimizer User Guide.
" + "smithy.api#documentation": "Describes the destination Amazon Simple Storage Service (Amazon S3) bucket name and\n key prefix for a recommendations export job.
\nYou must create the destination Amazon S3 bucket for your recommendations\n export before you create the export job. Compute Optimizer does not create the S3 bucket\n for you. After you create the S3 bucket, ensure that it has the required permission\n policy to allow Compute Optimizer to write the export file to it. If you plan to specify\n an object prefix when you create the export job, you must include the object prefix in\n the policy that you add to the S3 bucket. For more information, see Amazon S3 Bucket Policy for Compute Optimizer in the\n Compute Optimizer User Guide.
" + } + }, + "com.amazonaws.computeoptimizer#SavingsOpportunity": { + "type": "structure", + "members": { + "savingsOpportunityPercentage": { + "target": "com.amazonaws.computeoptimizer#SavingsOpportunityPercentage", + "traits": { + "smithy.api#documentation": "The estimated monthly savings possible as a percentage of monthly cost.
" + } + }, + "estimatedMonthlySavings": { + "target": "com.amazonaws.computeoptimizer#EstimatedMonthlySavings", + "traits": { + "smithy.api#documentation": "An object that describes the estimated monthly savings amount possible based on\n On-Demand instance pricing.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Describes the savings opportunity for recommendations of a given resource type or for\n the recommendation option of an individual resource.
\nSavings opportunity represents the estimated monthly savings you can achieve by\n implementing a given Compute Optimizer recommendation.
\nSavings opportunity data requires that you opt in to Cost Explorer, as well as\n activate Receive Amazon EC2 resource\n recommendations in the Cost Explorer preferences page. That\n creates a connection between Cost Explorer and Compute Optimizer. With this\n connection, Cost Explorer generates savings estimates considering the price of\n existing resources, the price of recommended resources, and historical usage data.\n Estimated monthly savings reflects the projected dollar savings associated with each\n of the recommendations generated. For more information, see Enabling Cost Explorer and Optimizing your cost\n with Rightsizing Recommendations in the Cost Management User\n Guide.
\nThe name of the scope.
\nThe following scopes are possible:
\n\n Organization
- Specifies that the recommendation preference\n applies at the organization level, for all member accounts of an\n organization.
\n AccountId
- Specifies that the recommendation preference applies\n at the account level, for all resources of a given resource type in an\n account.
\n ResourceArn
- Specifies that the recommendation preference\n applies at the individual resource level.
The value of the scope.
\nIf you specified the name
of the scope as:
\n Organization
- The value
must be\n ALL_ACCOUNTS
.
\n AccountId
- The value
must be a 12-digit Amazon Web Services account ID.
\n ResourceArn
- The value
must be the Amazon Resource\n Name (ARN) of an EC2 instance or an Auto Scaling group.
Only EC2 instance and Auto Scaling group ARNs are currently supported.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Describes the scope of a recommendation preference.
\nRecommendation preferences can be created at the organization level (for management\n accounts of an organization only), account level, and resource level. For more\n information, see Activating\n enhanced infrastructure metrics in the Compute Optimizer User\n Guide.
\nYou cannot create recommendation preferences for Auto Scaling groups at the\n organization and account levels. You can create recommendation preferences for\n Auto Scaling groups only at the resource level by specifying a scope name\n of ResourceArn
and a scope value of the Auto Scaling group Amazon\n Resource Name (ARN). This will configure the preference for all instances that are\n part of the specified the Auto Scaling group.
Updates the enrollment (opt in and opt out) status of an account to the Compute Optimizer service.
\n\nIf the account is a management account of an organization, this action can also be\n used to enroll member accounts of the organization.
\n\nYou must have the appropriate permissions to opt in to Compute Optimizer, to view its\n recommendations, and to opt out. For more information, see Controlling access with Amazon Web Services Identity and Access Management in the Compute Optimizer User Guide.
\n\nWhen you opt in, Compute Optimizer automatically creates a service-linked role in your\n account to access its data. For more information, see Using\n Service-Linked Roles for Compute Optimizer in the Compute Optimizer User Guide.
" + "smithy.api#documentation": "Updates the enrollment (opt in and opt out) status of an account to the Compute Optimizer service.
\nIf the account is a management account of an organization, this action can also be\n used to enroll member accounts of the organization.
\nYou must have the appropriate permissions to opt in to Compute Optimizer, to view its\n recommendations, and to opt out. For more information, see Controlling access with Amazon Web Services Identity and Access Management in the Compute Optimizer User Guide.
\nWhen you opt in, Compute Optimizer automatically creates a service-linked role in your\n account to access its data. For more information, see Using\n Service-Linked Roles for Compute Optimizer in the Compute Optimizer User Guide.
" } }, "com.amazonaws.computeoptimizer#UpdateEnrollmentStatusRequest": { @@ -3763,7 +4445,7 @@ "status": { "target": "com.amazonaws.computeoptimizer#Status", "traits": { - "smithy.api#documentation": "The new enrollment status of the account.
\n\nThe following status options are available:
\n\n\n Active
- Opts in your account to the Compute Optimizer service.\n Compute Optimizer begins analyzing the configuration and utilization metrics\n of your Amazon Web Services resources after you opt in. For more information, see\n Metrics analyzed by Compute Optimizer in the Compute Optimizer User Guide.
\n Inactive
- Opts out your account from the Compute Optimizer\n service. Your account's recommendations and related metrics data will be deleted\n from Compute Optimizer after you opt out.
The Pending
and Failed
options cannot be used to update\n the enrollment status of an account. They are returned in the response of a request\n to update the enrollment status of an account.
The new enrollment status of the account.
\nThe following status options are available:
\n\n Active
- Opts in your account to the Compute Optimizer service.\n Compute Optimizer begins analyzing the configuration and utilization metrics\n of your Amazon Web Services resources after you opt in. For more information, see\n Metrics analyzed by Compute Optimizer in the Compute Optimizer User Guide.
\n Inactive
- Opts out your account from the Compute Optimizer\n service. Your account's recommendations and related metrics data will be deleted\n from Compute Optimizer after you opt out.
The Pending
and Failed
options cannot be used to update\n the enrollment status of an account. They are returned in the response of a request\n to update the enrollment status of an account.
The name of the utilization metric.
\n\nThe following utilization metrics are available:
\n\n Cpu
- The percentage of allocated EC2 compute units that are\n currently in use on the instance. This metric identifies the processing power\n required to run an application on the instance.
Depending on the instance type, tools in your operating system can show a\n lower percentage than CloudWatch when the instance is not allocated a full\n processor core.
\nUnits: Percent
\n\n Memory
- The percentage of memory that is currently in use on the\n instance. This metric identifies the amount of memory required to run an\n application on the instance.
Units: Percent
\nThe Memory
metric is returned only for resources that have\n the unified CloudWatch agent installed on them. For more information,\n see Enabling Memory\n Utilization with the CloudWatch Agent.
\n EBS_READ_OPS_PER_SECOND
- The completed read operations from all\n EBS volumes attached to the instance in a specified period of time.
Unit: Count
\n\n EBS_WRITE_OPS_PER_SECOND
- The completed write operations to all\n EBS volumes attached to the instance in a specified period of time.
Unit: Count
\n\n EBS_READ_BYTES_PER_SECOND
- The bytes read from all EBS volumes\n attached to the instance in a specified period of time.
Unit: Bytes
\n\n EBS_WRITE_BYTES_PER_SECOND
- The bytes written to all EBS volumes\n attached to the instance in a specified period of time.
Unit: Bytes
\n\n DISK_READ_OPS_PER_SECOND
- The completed read operations from all\n instance store volumes available to the instance in a specified period of\n time.
If there are no instance store volumes, either the value is 0
or\n the metric is not reported.
\n DISK_WRITE_OPS_PER_SECOND
- The completed write operations from\n all instance store volumes available to the instance in a specified period of\n time.
If there are no instance store volumes, either the value is 0
or\n the metric is not reported.
\n DISK_READ_BYTES_PER_SECOND
- The bytes read from all instance\n store volumes available to the instance. This metric is used to determine the\n volume of the data the application reads from the disk of the instance. This can\n be used to determine the speed of the application.
If there are no instance store volumes, either the value is 0
or\n the metric is not reported.
\n DISK_WRITE_BYTES_PER_SECOND
- The bytes written to all instance\n store volumes available to the instance. This metric is used to determine the\n volume of the data the application writes onto the disk of the instance. This\n can be used to determine the speed of the application.
If there are no instance store volumes, either the value is 0
or\n the metric is not reported.
\n NETWORK_IN_BYTES_PER_SECOND
- The number of bytes received by the\n instance on all network interfaces. This metric identifies the volume of\n incoming network traffic to a single instance.
\n NETWORK_OUT_BYTES_PER_SECOND
- The number of bytes sent out by\n the instance on all network interfaces. This metric identifies the volume of\n outgoing network traffic from a single instance.
\n NETWORK_PACKETS_IN_PER_SECOND
- The number of packets received by\n the instance on all network interfaces. This metric identifies the volume of\n incoming traffic in terms of the number of packets on a single instance.
\n NETWORK_PACKETS_OUT_PER_SECOND
- The number of packets sent out\n by the instance on all network interfaces. This metric identifies the volume of\n outgoing traffic in terms of the number of packets on a single instance.
The name of the utilization metric.
\nThe following utilization metrics are available:
\n\n Cpu
- The percentage of allocated EC2 compute units that are\n currently in use on the instance. This metric identifies the processing power\n required to run an application on the instance.
Depending on the instance type, tools in your operating system can show a\n lower percentage than CloudWatch when the instance is not allocated a full\n processor core.
\nUnits: Percent
\n\n Memory
- The percentage of memory that is currently in use on the\n instance. This metric identifies the amount of memory required to run an\n application on the instance.
Units: Percent
\nThe Memory
metric is returned only for resources that have\n the unified CloudWatch agent installed on them. For more information,\n see Enabling Memory\n Utilization with the CloudWatch Agent.
\n EBS_READ_OPS_PER_SECOND
- The completed read operations from all\n EBS volumes attached to the instance in a specified period of time.
Unit: Count
\n\n EBS_WRITE_OPS_PER_SECOND
- The completed write operations to all\n EBS volumes attached to the instance in a specified period of time.
Unit: Count
\n\n EBS_READ_BYTES_PER_SECOND
- The bytes read from all EBS volumes\n attached to the instance in a specified period of time.
Unit: Bytes
\n\n EBS_WRITE_BYTES_PER_SECOND
- The bytes written to all EBS volumes\n attached to the instance in a specified period of time.
Unit: Bytes
\n\n DISK_READ_OPS_PER_SECOND
- The completed read operations from all\n instance store volumes available to the instance in a specified period of\n time.
If there are no instance store volumes, either the value is 0
or\n the metric is not reported.
\n DISK_WRITE_OPS_PER_SECOND
- The completed write operations from\n all instance store volumes available to the instance in a specified period of\n time.
If there are no instance store volumes, either the value is 0
or\n the metric is not reported.
\n DISK_READ_BYTES_PER_SECOND
- The bytes read from all instance\n store volumes available to the instance. This metric is used to determine the\n volume of the data the application reads from the disk of the instance. This can\n be used to determine the speed of the application.
If there are no instance store volumes, either the value is 0
or\n the metric is not reported.
\n DISK_WRITE_BYTES_PER_SECOND
- The bytes written to all instance\n store volumes available to the instance. This metric is used to determine the\n volume of the data the application writes onto the disk of the instance. This\n can be used to determine the speed of the application.
If there are no instance store volumes, either the value is 0
or\n the metric is not reported.
\n NETWORK_IN_BYTES_PER_SECOND
- The number of bytes received by the\n instance on all network interfaces. This metric identifies the volume of\n incoming network traffic to a single instance.
\n NETWORK_OUT_BYTES_PER_SECOND
- The number of bytes sent out by\n the instance on all network interfaces. This metric identifies the volume of\n outgoing network traffic from a single instance.
\n NETWORK_PACKETS_IN_PER_SECOND
- The number of packets received by\n the instance on all network interfaces. This metric identifies the volume of\n incoming traffic in terms of the number of packets on a single instance.
\n NETWORK_PACKETS_OUT_PER_SECOND
- The number of packets sent out\n by the instance on all network interfaces. This metric identifies the volume of\n outgoing traffic in terms of the number of packets on a single instance.
The statistic of the utilization metric.
\n\nThe Compute Optimizer API, Command Line Interface (CLI), and SDKs\n return utilization metrics using only the Maximum
statistic, which is the\n highest value observed during the specified period.
The Compute Optimizer console displays graphs for some utilization metrics using the\n Average
statistic, which is the value of Sum
/\n SampleCount
during the specified period. For more information, see\n Viewing resource\n recommendations in the Compute Optimizer User\n Guide. You can also get averaged utilization metric data for your resources\n using Amazon CloudWatch. For more information, see the Amazon CloudWatch\n User Guide.
The statistic of the utilization metric.
\nThe Compute Optimizer API, Command Line Interface (CLI), and SDKs\n return utilization metrics using only the Maximum
statistic, which is the\n highest value observed during the specified period.
The Compute Optimizer console displays graphs for some utilization metrics using the\n Average
statistic, which is the value of Sum
/\n SampleCount
during the specified period. For more information, see\n Viewing resource\n recommendations in the Compute Optimizer User\n Guide. You can also get averaged utilization metric data for your resources\n using Amazon CloudWatch. For more information, see the Amazon CloudWatch\n User Guide.
Describes a utilization metric of a resource, such as an Amazon EC2\n instance.
\n\nCompare the utilization metric data of your resource against its projected utilization\n metric data to determine the performance difference between your current resource and\n the recommended option.
" + "smithy.api#documentation": "Describes a utilization metric of a resource, such as an Amazon EC2\n instance.
\nCompare the utilization metric data of your resource against its projected utilization\n metric data to determine the performance difference between your current resource and\n the recommended option.
" } }, "com.amazonaws.computeoptimizer#UtilizationMetrics": { @@ -3824,6 +4506,12 @@ "target": "com.amazonaws.computeoptimizer#UtilizationMetric" } }, + "com.amazonaws.computeoptimizer#Value": { + "type": "double" + }, + "com.amazonaws.computeoptimizer#VeryLow": { + "type": "long" + }, "com.amazonaws.computeoptimizer#VolumeArn": { "type": "string" }, @@ -3851,7 +4539,7 @@ "volumeType": { "target": "com.amazonaws.computeoptimizer#VolumeType", "traits": { - "smithy.api#documentation": "The volume type.
\n\nThis can be gp2
for General Purpose SSD, io1
or\n io2
for Provisioned IOPS SSD, st1
for Throughput Optimized\n HDD, sc1
for Cold HDD, or standard
for Magnetic\n volumes.
The volume type.
\nThis can be gp2
for General Purpose SSD, io1
or\n io2
for Provisioned IOPS SSD, st1
for Throughput Optimized\n HDD, sc1
for Cold HDD, or standard
for Magnetic\n volumes.
The finding classification of the volume.
\n\nFindings for volumes include:
\n\n \n NotOptimized
\n —A volume is\n considered not optimized when Compute Optimizer identifies a recommendation\n that can provide better performance for your workload.
\n \n Optimized
\n —An volume is\n considered optimized when Compute Optimizer determines that the volume is\n correctly provisioned to run your workload based on the chosen volume type. For\n optimized resources, Compute Optimizer might recommend a new generation volume\n type.
The finding classification of the volume.
\nFindings for volumes include:
\n\n \n NotOptimized
\n —A volume is\n considered not optimized when Compute Optimizer identifies a recommendation\n that can provide better performance for your workload.
\n \n Optimized
\n —An volume is\n considered optimized when Compute Optimizer determines that the volume is\n correctly provisioned to run your workload based on the chosen volume type. For\n optimized resources, Compute Optimizer might recommend a new generation volume\n type.
The timestamp of when the volume recommendation was last refreshed.
" + "smithy.api#documentation": "The timestamp of when the volume recommendation was last generated.
" + } + }, + "currentPerformanceRisk": { + "target": "com.amazonaws.computeoptimizer#CurrentPerformanceRisk", + "traits": { + "smithy.api#documentation": "The risk of the current EBS volume not meeting the performance needs of its workloads.\n The higher the risk, the more likely the current EBS volume doesn't have sufficient\n capacity.
" } } }, @@ -3957,13 +4651,19 @@ "performanceRisk": { "target": "com.amazonaws.computeoptimizer#PerformanceRisk", "traits": { - "smithy.api#documentation": "The performance risk of the volume recommendation option.
\n\nPerformance risk is the likelihood of the recommended volume type meeting the\n performance requirement of your workload.
\n\nThe value ranges from 0
- 4
, with 0
meaning\n that the recommended resource is predicted to always provide enough hardware capability.\n The higher the performance risk is, the more likely you should validate whether the\n recommendation will meet the performance requirements of your workload before migrating\n your resource.
The performance risk of the volume recommendation option.
\nPerformance risk is the likelihood of the recommended volume type meeting the\n performance requirement of your workload.
\nThe value ranges from 0
- 4
, with 0
meaning\n that the recommended resource is predicted to always provide enough hardware capability.\n The higher the performance risk is, the more likely you should validate whether the\n recommendation will meet the performance requirements of your workload before migrating\n your resource.
The rank of the volume recommendation option.
\n\nThe top recommendation option is ranked as 1
.
The rank of the volume recommendation option.
\nThe top recommendation option is ranked as 1
.
An object that describes the savings opportunity for the EBS volume recommendation\n option. Savings opportunity includes the estimated monthly savings amount and\n percentage.
" } } }, diff --git a/codegen/sdk-codegen/aws-models/connect.2017-08-08.json b/codegen/sdk-codegen/aws-models/connect.2017-08-08.json index 81aea306841..d34d161c75d 100644 --- a/codegen/sdk-codegen/aws-models/connect.2017-08-08.json +++ b/codegen/sdk-codegen/aws-models/connect.2017-08-08.json @@ -44,7 +44,7 @@ "code": "AccessDeniedException", "httpResponseCode": 403 }, - "smithy.api#documentation": "You do not have sufficient access to perform this action.
", + "smithy.api#documentation": "You do not have sufficient permissions to perform this action.
", "smithy.api#error": "client", "smithy.api#httpError": 403 } @@ -152,7 +152,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "One or more tags.
" + "smithy.api#documentation": "The tags used to organize, track, or control access for this resource.
" } } }, @@ -307,7 +307,7 @@ "name": "connect" }, "aws.protocols#restJson1": {}, - "smithy.api#documentation": "Amazon Connect is a cloud-based contact center solution that you use to set up and manage a customer\n contact center and provide reliable customer engagement at any scale.
\nAmazon Connect provides metrics and real-time reporting that enable you to optimize contact routing.\n You can also resolve customer issues more efficiently by getting customers in touch with the\n appropriate agents.
\nThere are limits to the number of Amazon Connect resources that you can create. There are also limits\n to the number of requests that you can make per second. For more information, see Amazon Connect\n Service Quotas in the Amazon Connect Administrator Guide.
\nYou can\n connect\n programmatically to an AWS service by using an endpoint. For a list of Amazon Connect endpoints, see\n Amazon Connect\n Endpoints.
\nWorking with contact flows? Check out the Amazon Connect Flow language.
\nAmazon Connect is a cloud-based contact center solution that you use to set up and manage a customer\n contact center and provide reliable customer engagement at any scale.
\nAmazon Connect provides metrics and real-time reporting that enable you to optimize contact routing.\n You can also resolve customer issues more efficiently by getting customers in touch with the\n appropriate agents.
\nThere are limits to the number of Amazon Connect resources that you can create. There are also limits\n to the number of requests that you can make per second. For more information, see Amazon Connect\n Service Quotas in the Amazon Connect Administrator Guide.
\nYou can connect programmatically to an AWS service by using an endpoint. For a list of Amazon Connect\n endpoints, see Amazon Connect\n Endpoints.
\nWorking with contact flows? Check out the Amazon Connect Flow language.
\nThe type of the contact flow. For descriptions of the available types, see Choose a Contact Flow Type in the Amazon Connect Administrator\n Guide.
" } }, + "State": { + "target": "com.amazonaws.connect#ContactFlowState", + "traits": { + "smithy.api#documentation": "The type of contact flow.
" + } + }, "Description": { "target": "com.amazonaws.connect#ContactFlowDescription", "traits": { @@ -1602,6 +1632,168 @@ } } }, + "com.amazonaws.connect#ContactFlowModule": { + "type": "structure", + "members": { + "Arn": { + "target": "com.amazonaws.connect#ARN", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN).
" + } + }, + "Id": { + "target": "com.amazonaws.connect#ContactFlowModuleId", + "traits": { + "smithy.api#documentation": "The identifier of the contact flow module.
" + } + }, + "Name": { + "target": "com.amazonaws.connect#ContactFlowModuleName", + "traits": { + "smithy.api#documentation": "The name of the contact flow module.
" + } + }, + "Content": { + "target": "com.amazonaws.connect#ContactFlowModuleContent", + "traits": { + "smithy.api#documentation": "The content of the contact flow module.
" + } + }, + "Description": { + "target": "com.amazonaws.connect#ContactFlowModuleDescription", + "traits": { + "smithy.api#documentation": "The description of the contact flow module.
" + } + }, + "State": { + "target": "com.amazonaws.connect#ContactFlowModuleState", + "traits": { + "smithy.api#documentation": "The type of contact flow module.
" + } + }, + "Status": { + "target": "com.amazonaws.connect#ContactFlowModuleStatus", + "traits": { + "smithy.api#documentation": "The status of the contact flow module.
" + } + }, + "Tags": { + "target": "com.amazonaws.connect#TagMap", + "traits": { + "smithy.api#documentation": "The tags used to organize, track, or control access for this resource.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Contains information about a contact flow module.
" + } + }, + "com.amazonaws.connect#ContactFlowModuleContent": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256000 + } + } + }, + "com.amazonaws.connect#ContactFlowModuleDescription": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 500 + }, + "smithy.api#pattern": "\\S" + } + }, + "com.amazonaws.connect#ContactFlowModuleId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + } + } + }, + "com.amazonaws.connect#ContactFlowModuleName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 127 + }, + "smithy.api#pattern": "\\S" + } + }, + "com.amazonaws.connect#ContactFlowModuleState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ACTIVE", + "name": "ACTIVE" + }, + { + "value": "ARCHIVED", + "name": "ARCHIVED" + } + ] + } + }, + "com.amazonaws.connect#ContactFlowModuleStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PUBLISHED", + "name": "PUBLISHED" + }, + { + "value": "SAVED", + "name": "SAVED" + } + ] + } + }, + "com.amazonaws.connect#ContactFlowModuleSummary": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.connect#ContactFlowModuleId", + "traits": { + "smithy.api#documentation": "The identifier of the contact flow module.
" + } + }, + "Arn": { + "target": "com.amazonaws.connect#ARN", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the contact flow module.
" + } + }, + "Name": { + "target": "com.amazonaws.connect#ContactFlowModuleName", + "traits": { + "smithy.api#documentation": "The name of the contact flow module.
" + } + }, + "State": { + "target": "com.amazonaws.connect#ContactFlowModuleState", + "traits": { + "smithy.api#documentation": "The type of contact flow module.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Contains summary information about a contact flow.
" + } + }, + "com.amazonaws.connect#ContactFlowModulesSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.connect#ContactFlowModuleSummary" + } + }, "com.amazonaws.connect#ContactFlowName": { "type": "string", "traits": { @@ -1623,6 +1815,21 @@ "smithy.api#httpError": 404 } }, + "com.amazonaws.connect#ContactFlowState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ACTIVE", + "name": "ACTIVE" + }, + { + "value": "ARCHIVED", + "name": "ARCHIVED" + } + ] + } + }, "com.amazonaws.connect#ContactFlowSummary": { "type": "structure", "members": { @@ -1649,6 +1856,12 @@ "traits": { "smithy.api#documentation": "The type of contact flow.
" } + }, + "ContactFlowState": { + "target": "com.amazonaws.connect#ContactFlowState", + "traits": { + "smithy.api#documentation": "The type of contact flow.
" + } } }, "traits": { @@ -1866,7 +2079,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "One or more tags.
" + "smithy.api#documentation": "The tags used to organize, track, or control access for this resource.
" } } } @@ -1931,6 +2144,118 @@ } } }, + "com.amazonaws.connect#CreateContactFlowModule": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#CreateContactFlowModuleRequest" + }, + "output": { + "target": "com.amazonaws.connect#CreateContactFlowModuleResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connect#AccessDeniedException" + }, + { + "target": "com.amazonaws.connect#DuplicateResourceException" + }, + { + "target": "com.amazonaws.connect#IdempotencyException" + }, + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidContactFlowModuleException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#InvalidRequestException" + }, + { + "target": "com.amazonaws.connect#LimitExceededException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "Creates a contact flow module for the specified Amazon Connect instance.
", + "smithy.api#http": { + "method": "PUT", + "uri": "/contact-flow-modules/{InstanceId}", + "code": 200 + } + } + }, + "com.amazonaws.connect#CreateContactFlowModuleRequest": { + "type": "structure", + "members": { + "InstanceId": { + "target": "com.amazonaws.connect#InstanceId", + "traits": { + "smithy.api#documentation": "The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.connect#ContactFlowModuleName", + "traits": { + "smithy.api#documentation": "The name of the contact flow module.
", + "smithy.api#required": {} + } + }, + "Description": { + "target": "com.amazonaws.connect#ContactFlowModuleDescription", + "traits": { + "smithy.api#documentation": "The description of the contact flow module.
" + } + }, + "Content": { + "target": "com.amazonaws.connect#ContactFlowModuleContent", + "traits": { + "smithy.api#documentation": "The content of the contact flow module.
", + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.connect#TagMap", + "traits": { + "smithy.api#documentation": "The tags used to organize, track, or control access for this resource.
" + } + }, + "ClientToken": { + "target": "com.amazonaws.connect#ClientToken", + "traits": { + "smithy.api#documentation": "A unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request.
", + "smithy.api#idempotencyToken": {} + } + } + } + }, + "com.amazonaws.connect#CreateContactFlowModuleResponse": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.connect#ContactFlowModuleId", + "traits": { + "smithy.api#documentation": "The identifier of the contact flow module.
" + } + }, + "Arn": { + "target": "com.amazonaws.connect#ARN", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the contact flow module.
" + } + } + } + }, "com.amazonaws.connect#CreateContactFlowRequest": { "type": "structure", "members": { @@ -2026,7 +2351,7 @@ } ], "traits": { - "smithy.api#documentation": "Creates hours of operation.
", + "smithy.api#documentation": "This API is in preview release for Amazon Connect and is subject to change.
\nCreates hours of operation.
", "smithy.api#http": { "method": "PUT", "uri": "/hours-of-operations/{InstanceId}", @@ -2075,7 +2400,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "One or more tags.
" + "smithy.api#documentation": "The tags used to organize, track, or control access for this resource.
" } } } @@ -2272,7 +2597,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "One or more tags.
" + "smithy.api#documentation": "The tags used to organize, track, or control access for this resource.
" } } } @@ -2387,7 +2712,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "One or more tags.
" + "smithy.api#documentation": "The tags used to organize, track, or control access for this resource.
" } } } @@ -2483,7 +2808,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "One or more tags.
" + "smithy.api#documentation": "The tags used to organize, track, or control access for this resource.
" } } } @@ -2500,7 +2825,7 @@ "QuickConnectId": { "target": "com.amazonaws.connect#QuickConnectId", "traits": { - "smithy.api#documentation": "The identifier for the quick connect.
" + "smithy.api#documentation": "The identifier for the quick connect. \n
" } } } @@ -2688,7 +3013,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "One or more tags.
" + "smithy.api#documentation": "The tags used to organize, track, or control access for this resource.
" } } } @@ -2773,7 +3098,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "One or more tags.
" + "smithy.api#documentation": "The tags used to organize, track, or control access for this resource.
" } } } @@ -3145,44 +3470,161 @@ ] } }, - "com.amazonaws.connect#CurrentMetricResult": { + "com.amazonaws.connect#CurrentMetricResult": { + "type": "structure", + "members": { + "Dimensions": { + "target": "com.amazonaws.connect#Dimensions", + "traits": { + "smithy.api#documentation": "The dimensions for the metrics.
" + } + }, + "Collections": { + "target": "com.amazonaws.connect#CurrentMetricDataCollections", + "traits": { + "smithy.api#documentation": "The set of metrics.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Contains information about a set of real-time metrics.
" + } + }, + "com.amazonaws.connect#CurrentMetricResults": { + "type": "list", + "member": { + "target": "com.amazonaws.connect#CurrentMetricResult" + } + }, + "com.amazonaws.connect#CurrentMetrics": { + "type": "list", + "member": { + "target": "com.amazonaws.connect#CurrentMetric" + } + }, + "com.amazonaws.connect#Delay": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 0, + "max": 9999 + } + } + }, + "com.amazonaws.connect#DeleteContactFlow": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#DeleteContactFlowRequest" + }, + "errors": [ + { + "target": "com.amazonaws.connect#AccessDeniedException" + }, + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#InvalidRequestException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes a contact flow for the specified Amazon Connect instance.
", + "smithy.api#http": { + "method": "DELETE", + "uri": "/contact-flows/{InstanceId}/{ContactFlowId}", + "code": 200 + } + } + }, + "com.amazonaws.connect#DeleteContactFlowModule": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#DeleteContactFlowModuleRequest" + }, + "output": { + "target": "com.amazonaws.connect#DeleteContactFlowModuleResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connect#AccessDeniedException" + }, + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#InvalidRequestException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes the specified contact flow module.
", + "smithy.api#http": { + "method": "DELETE", + "uri": "/contact-flow-modules/{InstanceId}/{ContactFlowModuleId}", + "code": 200 + } + } + }, + "com.amazonaws.connect#DeleteContactFlowModuleRequest": { "type": "structure", "members": { - "Dimensions": { - "target": "com.amazonaws.connect#Dimensions", + "InstanceId": { + "target": "com.amazonaws.connect#InstanceId", "traits": { - "smithy.api#documentation": "The dimensions for the metrics.
" + "smithy.api#documentation": "The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} } }, - "Collections": { - "target": "com.amazonaws.connect#CurrentMetricDataCollections", + "ContactFlowModuleId": { + "target": "com.amazonaws.connect#ContactFlowModuleId", "traits": { - "smithy.api#documentation": "The set of metrics.
" + "smithy.api#documentation": "The identifier of the contact flow module.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} } } - }, - "traits": { - "smithy.api#documentation": "Contains information about a set of real-time metrics.
" - } - }, - "com.amazonaws.connect#CurrentMetricResults": { - "type": "list", - "member": { - "target": "com.amazonaws.connect#CurrentMetricResult" } }, - "com.amazonaws.connect#CurrentMetrics": { - "type": "list", - "member": { - "target": "com.amazonaws.connect#CurrentMetric" - } + "com.amazonaws.connect#DeleteContactFlowModuleResponse": { + "type": "structure", + "members": {} }, - "com.amazonaws.connect#Delay": { - "type": "integer", - "traits": { - "smithy.api#range": { - "min": 0, - "max": 9999 + "com.amazonaws.connect#DeleteContactFlowRequest": { + "type": "structure", + "members": { + "InstanceId": { + "target": "com.amazonaws.connect#InstanceId", + "traits": { + "smithy.api#documentation": "The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ContactFlowId": { + "target": "com.amazonaws.connect#ContactFlowId", + "traits": { + "smithy.api#documentation": "The identifier of the contact flow.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } } } }, @@ -3209,7 +3651,7 @@ } ], "traits": { - "smithy.api#documentation": "Deletes an hours of operation.
", + "smithy.api#documentation": "This API is in preview release for Amazon Connect and is subject to change.
\nDeletes an hours of operation.
", "smithy.api#http": { "method": "DELETE", "uri": "/hours-of-operations/{InstanceId}/{HoursOfOperationId}", @@ -3691,7 +4133,7 @@ } ], "traits": { - "smithy.api#documentation": "This API is in preview release for Amazon Connect and is subject to change.
\nDescribes the specified contact.
\nContact information is available in Amazon Connect for 24 months, and then it is deleted.
\nThis API is in preview release for Amazon Connect and is subject to change.
\nDescribes the specified contact.
\nContact information remains available in Amazon Connect for 24 months, and then it is\n deleted.
\nDescribes the specified contact flow module.
", + "smithy.api#http": { + "method": "GET", + "uri": "/contact-flow-modules/{InstanceId}/{ContactFlowModuleId}", + "code": 200 + } + } + }, + "com.amazonaws.connect#DescribeContactFlowModuleRequest": { + "type": "structure", + "members": { + "InstanceId": { + "target": "com.amazonaws.connect#InstanceId", + "traits": { + "smithy.api#documentation": "The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ContactFlowModuleId": { + "target": "com.amazonaws.connect#ContactFlowModuleId", + "traits": { + "smithy.api#documentation": "The identifier of the contact flow module.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.connect#DescribeContactFlowModuleResponse": { + "type": "structure", + "members": { + "ContactFlowModule": { + "target": "com.amazonaws.connect#ContactFlowModule", + "traits": { + "smithy.api#documentation": "Information about the contact flow module.
" + } + } + } + }, "com.amazonaws.connect#DescribeContactFlowRequest": { "type": "structure", "members": { @@ -3782,7 +4293,7 @@ "ContactId": { "target": "com.amazonaws.connect#ContactId", "traits": { - "smithy.api#documentation": "The identifier of the initial contact.
", + "smithy.api#documentation": "The identifier of the contact.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -3826,7 +4337,7 @@ } ], "traits": { - "smithy.api#documentation": "Describes the hours of operation.
", + "smithy.api#documentation": "This API is in preview release for Amazon Connect and is subject to change.
\nDescribes the hours of operation.
", "smithy.api#http": { "method": "GET", "uri": "/hours-of-operations/{InstanceId}/{HoursOfOperationId}", @@ -5267,7 +5778,7 @@ "CurrentMetrics": { "target": "com.amazonaws.connect#CurrentMetrics", "traits": { - "smithy.api#documentation": "The metrics to retrieve. Specify the name and unit for each metric. The following metrics\n are available. For a description of all the metrics, see Real-time Metrics\n Definitions in the Amazon Connect Administrator Guide.
\nUnit: COUNT
\nName in real-time metrics report: ACW\n
\n\nUnit: COUNT
\nName in real-time metrics report: Available\n
\nUnit: COUNT
\nName in real-time metrics report: Error\n
\nUnit: COUNT
\nName in real-time metrics report: NPT (Non-Productive Time)\n
\nUnit: COUNT
\nName in real-time metrics report: On\n contact\n
\nUnit: COUNT
\nName in real-time metrics report: On\n contact\n
\nUnit: COUNT
\nName in real-time metrics report: Online\n
\nUnit: COUNT
\nName in real-time metrics report: Staffed\n
\nUnit: COUNT
\nName in real-time metrics report: In\n queue\n
\nUnit: COUNT
\nName in real-time metrics report: Scheduled\n
\nUnit: SECONDS
\nWhen you use groupings, Unit says SECONDS and the Value is returned in SECONDS.
\nWhen you do not use groupings, Unit says SECONDS but the Value is returned in\n MILLISECONDS. For example, if you get a response like this:
\n\n { \"Metric\": { \"Name\": \"OLDEST_CONTACT_AGE\", \"Unit\": \"SECONDS\" }, \"Value\": 24113.0\n
}
The actual OLDEST_CONTACT_AGE is 24 seconds.
\n\nName in real-time metrics report: Oldest\n
\nUnit: COUNT
\nName in real-time metrics report: Active\n
\nUnit: COUNT
\nName in real-time metrics report: Availability\n
\nThe metrics to retrieve. Specify the name and unit for each metric. The following metrics\n are available. For a description of all the metrics, see Real-time Metrics\n Definitions in the Amazon Connect Administrator Guide.
\nUnit: COUNT
\nName in real-time metrics report: ACW\n
\n\nUnit: COUNT
\nName in real-time metrics report: Available\n
\nUnit: COUNT
\nName in real-time metrics report: Error\n
\nUnit: COUNT
\nName in real-time metrics report: NPT (Non-Productive Time)\n
\nUnit: COUNT
\nName in real-time metrics report: On\n contact\n
\nUnit: COUNT
\nName in real-time metrics report: On\n contact\n
\nUnit: COUNT
\nName in real-time metrics report: Online\n
\nUnit: COUNT
\nName in real-time metrics report: Staffed\n
\nUnit: COUNT
\nName in real-time metrics report: In\n queue\n
\nUnit: COUNT
\nName in real-time metrics report: Scheduled\n
\nUnit: SECONDS
\nWhen you use groupings, Unit says SECONDS and the Value is returned in SECONDS.
\nWhen you do not use groupings, Unit says SECONDS but the Value is returned in MILLISECONDS. For\n example, if you get a response like this:
\n\n { \"Metric\": { \"Name\": \"OLDEST_CONTACT_AGE\", \"Unit\": \"SECONDS\" }, \"Value\": 24113.0\n
}
The actual OLDEST_CONTACT_AGE is 24 seconds.
\n\nName in real-time metrics report: Oldest\n
\nUnit: COUNT
\nName in real-time metrics report: Active\n
\nUnit: COUNT
\nName in real-time metrics report: Availability\n
\nOne or more tags.
" + "smithy.api#documentation": "The tags used to organize, track, or control access for this resource.
" } } }, @@ -6164,6 +6675,19 @@ "smithy.api#documentation": "The start time or end time for an hours of operation.
" } }, + "com.amazonaws.connect#IdempotencyException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.connect#Message" + } + }, + "traits": { + "smithy.api#documentation": "An entity with the same name already exists.
", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, "com.amazonaws.connect#InboundCallsEnabled": { "type": "boolean", "traits": { @@ -6604,6 +7128,19 @@ "smithy.api#httpError": 400 } }, + "com.amazonaws.connect#InvalidContactFlowModuleException": { + "type": "structure", + "members": { + "Problems": { + "target": "com.amazonaws.connect#Problems" + } + }, + "traits": { + "smithy.api#documentation": "The problems with the module. Please fix before trying again.
", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, "com.amazonaws.connect#InvalidParameterException": { "type": "structure", "members": { @@ -6895,29 +7432,111 @@ "uri": "/agent-status/{InstanceId}", "code": 200 }, - "smithy.api#paginated": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "items": "AgentStatusSummaryList", - "pageSize": "MaxResults" + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "AgentStatusSummaryList", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.connect#ListApprovedOrigins": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#ListApprovedOriginsRequest" + }, + "output": { + "target": "com.amazonaws.connect#ListApprovedOriginsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#InvalidRequestException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "This API is in preview release for Amazon Connect and is subject to change.
\nReturns a paginated list of all approved origins associated with the instance.
", + "smithy.api#http": { + "method": "GET", + "uri": "/instance/{InstanceId}/approved-origins", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "Origins", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.connect#ListApprovedOriginsRequest": { + "type": "structure", + "members": { + "InstanceId": { + "target": "com.amazonaws.connect#InstanceId", + "traits": { + "smithy.api#documentation": "The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "NextToken": { + "target": "com.amazonaws.connect#NextToken", + "traits": { + "smithy.api#documentation": "The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.
", + "smithy.api#httpQuery": "nextToken" + } + }, + "MaxResults": { + "target": "com.amazonaws.connect#MaxResult25", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "The maximum number of results to return per page.
", + "smithy.api#httpQuery": "maxResults" + } + } + } + }, + "com.amazonaws.connect#ListApprovedOriginsResponse": { + "type": "structure", + "members": { + "Origins": { + "target": "com.amazonaws.connect#OriginsList", + "traits": { + "smithy.api#documentation": "The approved origins.
" + } + }, + "NextToken": { + "target": "com.amazonaws.connect#NextToken", + "traits": { + "smithy.api#documentation": "If there are additional results, this is the token for the next set of results.
" + } } } }, - "com.amazonaws.connect#ListApprovedOrigins": { + "com.amazonaws.connect#ListBots": { "type": "operation", "input": { - "target": "com.amazonaws.connect#ListApprovedOriginsRequest" + "target": "com.amazonaws.connect#ListBotsRequest" }, "output": { - "target": "com.amazonaws.connect#ListApprovedOriginsResponse" + "target": "com.amazonaws.connect#ListBotsResponse" }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" }, - { - "target": "com.amazonaws.connect#InvalidParameterException" - }, { "target": "com.amazonaws.connect#InvalidRequestException" }, @@ -6929,21 +7548,21 @@ } ], "traits": { - "smithy.api#documentation": "This API is in preview release for Amazon Connect and is subject to change.
\nReturns a paginated list of all approved origins associated with the instance.
", + "smithy.api#documentation": "This API is in preview release for Amazon Connect and is subject to change.
\nFor the specified version of Amazon Lex, returns a paginated list of all the Amazon Lex bots currently associated with the\n instance.
", "smithy.api#http": { "method": "GET", - "uri": "/instance/{InstanceId}/approved-origins", + "uri": "/instance/{InstanceId}/bots", "code": 200 }, "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", - "items": "Origins", + "items": "LexBots", "pageSize": "MaxResults" } } }, - "com.amazonaws.connect#ListApprovedOriginsRequest": { + "com.amazonaws.connect#ListBotsRequest": { "type": "structure", "members": { "InstanceId": { @@ -6968,16 +7587,24 @@ "smithy.api#documentation": "The maximum number of results to return per page.
", "smithy.api#httpQuery": "maxResults" } + }, + "LexVersion": { + "target": "com.amazonaws.connect#LexVersion", + "traits": { + "smithy.api#documentation": "The version of Amazon Lex or Amazon Lex V2.
", + "smithy.api#httpQuery": "lexVersion", + "smithy.api#required": {} + } } } }, - "com.amazonaws.connect#ListApprovedOriginsResponse": { + "com.amazonaws.connect#ListBotsResponse": { "type": "structure", "members": { - "Origins": { - "target": "com.amazonaws.connect#OriginsList", + "LexBots": { + "target": "com.amazonaws.connect#LexBotConfigList", "traits": { - "smithy.api#documentation": "The approved origins.
" + "smithy.api#documentation": "The names and Regions of the Amazon Lex or Amazon Lex V2 bots associated with the specified\n instance.
" } }, "NextToken": { @@ -6988,18 +7615,24 @@ } } }, - "com.amazonaws.connect#ListBots": { + "com.amazonaws.connect#ListContactFlowModules": { "type": "operation", "input": { - "target": "com.amazonaws.connect#ListBotsRequest" + "target": "com.amazonaws.connect#ListContactFlowModulesRequest" }, "output": { - "target": "com.amazonaws.connect#ListBotsResponse" + "target": "com.amazonaws.connect#ListContactFlowModulesResponse" }, "errors": [ + { + "target": "com.amazonaws.connect#AccessDeniedException" + }, { "target": "com.amazonaws.connect#InternalServiceException" }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, { "target": "com.amazonaws.connect#InvalidRequestException" }, @@ -7011,21 +7644,21 @@ } ], "traits": { - "smithy.api#documentation": "This API is in preview release for Amazon Connect and is subject to change.
\nFor the specified version of Amazon Lex, returns a paginated list of all the Amazon Lex bots currently\n associated with the instance.
", + "smithy.api#documentation": "Provides information about the contact flow modules for the specified Amazon Connect instance.
", "smithy.api#http": { "method": "GET", - "uri": "/instance/{InstanceId}/bots", + "uri": "/contact-flow-modules-summary/{InstanceId}", "code": 200 }, "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", - "items": "LexBots", + "items": "ContactFlowModulesSummaryList", "pageSize": "MaxResults" } } }, - "com.amazonaws.connect#ListBotsRequest": { + "com.amazonaws.connect#ListContactFlowModulesRequest": { "type": "structure", "members": { "InstanceId": { @@ -7044,30 +7677,29 @@ } }, "MaxResults": { - "target": "com.amazonaws.connect#MaxResult25", + "target": "com.amazonaws.connect#MaxResult1000", "traits": { "smithy.api#box": {}, "smithy.api#documentation": "The maximum number of results to return per page.
", "smithy.api#httpQuery": "maxResults" } }, - "LexVersion": { - "target": "com.amazonaws.connect#LexVersion", + "ContactFlowModuleState": { + "target": "com.amazonaws.connect#ContactFlowModuleState", "traits": { - "smithy.api#documentation": "The version of Amazon Lex or Amazon Lex V2.
", - "smithy.api#httpQuery": "lexVersion", - "smithy.api#required": {} + "smithy.api#documentation": "The state of the contact flow module.
", + "smithy.api#httpQuery": "state" } } } }, - "com.amazonaws.connect#ListBotsResponse": { + "com.amazonaws.connect#ListContactFlowModulesResponse": { "type": "structure", "members": { - "LexBots": { - "target": "com.amazonaws.connect#LexBotConfigList", + "ContactFlowModulesSummaryList": { + "target": "com.amazonaws.connect#ContactFlowModulesSummaryList", "traits": { - "smithy.api#documentation": "The names and Regions of the Amazon Lex or Amazon Lex V2 bots associated with the specified\n instance.
" + "smithy.api#documentation": "Information about the contact flow module.
" } }, "NextToken": { @@ -7238,7 +7870,7 @@ "NextToken": { "target": "com.amazonaws.connect#NextToken", "traits": { - "smithy.api#documentation": "The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.
\nThis is not expected to be set since the value returned in the previous response is always\n null.
\nThe token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.
\nThis is not expected to be set, because the value returned in the previous response is\n always null.
\nThe integration type.
", "smithy.api#httpQuery": "integrationType" } }, @@ -7827,7 +8459,7 @@ "target": "com.amazonaws.connect#MaxResult25", "traits": { "smithy.api#box": {}, - "smithy.api#documentation": "The maximum number of results to return per page. If no value is specified, the default is 10.\n
", + "smithy.api#documentation": "The maximum number of results to return per page. If no value is specified, the default is 10.
", "smithy.api#httpQuery": "maxResults" } } @@ -10545,7 +11177,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "One or more tags.
" + "smithy.api#documentation": "The tags used to organize, track, or control access for this resource.
" } } }, @@ -10772,7 +11404,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "One or more tags.
" + "smithy.api#documentation": "The tags used to organize, track, or control access for this resource.
" } } }, @@ -10967,7 +11599,7 @@ "Url": { "target": "com.amazonaws.connect#UrlReference", "traits": { - "smithy.api#documentation": "Information about Url reference if the referenceType
is URL
. Otherwise, null.
Information about the URL reference if the referenceType
is URL
.\n Otherwise, null.
One or more tags.
" + "smithy.api#documentation": "The tags used to organize, track, or control access for this resource.
" } } }, @@ -11818,7 +12450,7 @@ } ], "traits": { - "smithy.api#documentation": "Initiates real-time message streaming for a new chat contact.
\nFor more information about message streaming, see Enable real-time chat message\n streaming in the Amazon Connect Administrator Guide.
", + "smithy.api#documentation": "Initiates real-time message streaming for a new chat contact.
\nFor more information about message streaming, see Enable real-time chat message\n streaming in the Amazon Connect Administrator Guide.
", "smithy.api#http": { "method": "POST", "uri": "/contact/start-streaming", @@ -11904,7 +12536,7 @@ } ], "traits": { - "smithy.api#documentation": "Places an outbound call to a contact, and then initiates the contact flow. It performs the\n actions in the contact flow that's specified (in ContactFlowId
).
Agents do not initiate the outbound API, which means that they do not dial the contact. If\n the contact flow places an outbound call to a contact, and then puts the contact in queue, the\n call is then routed to the agent, like any other inbound case.
\n\nThere is a 60-second dialing timeout for this operation. If the call is not connected after\n 60 seconds, it fails.
\nUK numbers with a 447 prefix are not allowed by default. Before you can dial these UK\n mobile numbers, you must submit a service quota increase request. For more information, see\n Amazon Connect Service Quotas in the Amazon Connect Administrator Guide.
\nCampaign calls are not allowed by default. Before you can make a call with\n TrafficType
= CAMPAIGN
, you must submit a service quota increase\n request. For more information, see Amazon Connect Service Quotas\n in the Amazon Connect Administrator Guide.
Places an outbound call to a contact, and then initiates the contact flow. It performs the\n actions in the contact flow that's specified (in ContactFlowId
).
Agents do not initiate the outbound API, which means that they do not dial the contact. If\n the contact flow places an outbound call to a contact, and then puts the contact in queue, the\n call is then routed to the agent, like any other inbound case.
\n\nThere is a 60-second dialing timeout for this operation. If the call is not connected after\n 60 seconds, it fails.
\nUK numbers with a 447 prefix are not allowed by default. Before you can dial these UK\n mobile numbers, you must submit a service quota increase request. For more information, see\n Amazon Connect Service Quotas in the Amazon Connect Administrator Guide.
\nCampaign calls are not allowed by default. Before you can make a call with \n TrafficType
= CAMPAIGN
, you must submit a service quota increase request. For more information, see \n Amazon Connect Service Quotas in the Amazon Connect Administrator Guide.
Denotes the class of traffic. Calls with different traffic types are handled differently by\n Amazon Connect. The default value is GENERAL
. Use CAMPAIGN
if\n EnableAnswerMachineDetection
is set to true
. For all other cases, use\n GENERAL
.
Denotes the class of traffic. Calls with different traffic types are handled differently by\n Amazon Connect. The default value is GENERAL
. Use CAMPAIGN
if\n EnableAnswerMachineDetection
is set to true
. For all other cases, use\n GENERAL
.
Initiates a contact flow to start a new task immediately or at a future date and\n time.
", + "smithy.api#documentation": "Initiates a contact flow to start a new task.
", "smithy.api#http": { "method": "PUT", "uri": "/contact/task", @@ -12451,7 +13083,7 @@ } ], "traits": { - "smithy.api#documentation": "Adds the specified tags to the specified resource.
\nThe supported resource types are users, routing profiles, queues, quick connects, contact\n flows, agent status, and hours of operation.
\nFor sample policies that use tags, see Amazon Connect Identity-Based\n Policy Examples in the Amazon Connect Administrator Guide.
", + "smithy.api#documentation": "Adds the specified tags to the specified resource.
\nThe supported resource types are users, routing profiles, queues, quick connects, \n contact flows, agent status, and hours of operation.
\nFor sample policies that use tags, see Amazon Connect Identity-Based\n Policy Examples in the Amazon Connect Administrator Guide.
", "smithy.api#http": { "method": "POST", "uri": "/tags/{resourceArn}", @@ -12757,7 +13389,7 @@ } ], "traits": { - "smithy.api#documentation": "This API is in preview release for Amazon Connect and is subject to change.
\nAdds or updates user defined contact information associated with the specified contact. At\n least one field to be updated must be present in the request.
\nYou can add or update user-defined contact information for both ongoing and completed\n contacts.
\nThis API is in preview release for Amazon Connect and is subject to change.
\nAdds or updates user-defined contact information associated with the specified contact. At\n least one field to be updated must be present in the request.
\nYou can add or update user-defined contact information for both ongoing and completed\n contacts.
\nUpdates metadata about specified contact flow.
", + "smithy.api#http": { + "method": "POST", + "uri": "/contact-flows/{InstanceId}/{ContactFlowId}/metadata", + "code": 200 + } + } + }, + "com.amazonaws.connect#UpdateContactFlowMetadataRequest": { + "type": "structure", + "members": { + "InstanceId": { + "target": "com.amazonaws.connect#InstanceId", + "traits": { + "smithy.api#documentation": "The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ContactFlowId": { + "target": "com.amazonaws.connect#ContactFlowId", + "traits": { + "smithy.api#documentation": "The identifier of the contact flow.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.connect#ContactFlowName", + "traits": { + "smithy.api#documentation": "TThe name of the contact flow.
" + } + }, + "Description": { + "target": "com.amazonaws.connect#ContactFlowDescription", + "traits": { + "smithy.api#documentation": "The description of the contact flow.
" + } + }, + "ContactFlowState": { + "target": "com.amazonaws.connect#ContactFlowState", + "traits": { + "smithy.api#documentation": "The state of contact flow.
" + } + } + } + }, + "com.amazonaws.connect#UpdateContactFlowModuleContent": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#UpdateContactFlowModuleContentRequest" + }, + "output": { + "target": "com.amazonaws.connect#UpdateContactFlowModuleContentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connect#AccessDeniedException" + }, + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidContactFlowModuleException" + }, + { + "target": "com.amazonaws.connect#InvalidRequestException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "Updates specified contact flow module for the specified Amazon Connect instance.
", + "smithy.api#http": { + "method": "POST", + "uri": "/contact-flow-modules/{InstanceId}/{ContactFlowModuleId}/content", + "code": 200 + } + } + }, + "com.amazonaws.connect#UpdateContactFlowModuleContentRequest": { + "type": "structure", + "members": { + "InstanceId": { + "target": "com.amazonaws.connect#InstanceId", + "traits": { + "smithy.api#documentation": "The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ContactFlowModuleId": { + "target": "com.amazonaws.connect#ContactFlowModuleId", + "traits": { + "smithy.api#documentation": "The identifier of the contact flow module.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Content": { + "target": "com.amazonaws.connect#ContactFlowModuleContent", + "traits": { + "smithy.api#documentation": "The content of the contact flow module.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.connect#UpdateContactFlowModuleContentResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.connect#UpdateContactFlowModuleMetadata": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#UpdateContactFlowModuleMetadataRequest" + }, + "output": { + "target": "com.amazonaws.connect#UpdateContactFlowModuleMetadataResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connect#AccessDeniedException" + }, + { + "target": "com.amazonaws.connect#DuplicateResourceException" + }, + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#InvalidRequestException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "Updates metadata about specified contact flow module.
", + "smithy.api#http": { + "method": "POST", + "uri": "/contact-flow-modules/{InstanceId}/{ContactFlowModuleId}/metadata", + "code": 200 + } + } + }, + "com.amazonaws.connect#UpdateContactFlowModuleMetadataRequest": { + "type": "structure", + "members": { + "InstanceId": { + "target": "com.amazonaws.connect#InstanceId", + "traits": { + "smithy.api#documentation": "The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ContactFlowModuleId": { + "target": "com.amazonaws.connect#ContactFlowModuleId", + "traits": { + "smithy.api#documentation": "The identifier of the contact flow module.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.connect#ContactFlowModuleName", + "traits": { + "smithy.api#documentation": "The name of the contact flow module.
" + } + }, + "Description": { + "target": "com.amazonaws.connect#ContactFlowModuleDescription", + "traits": { + "smithy.api#documentation": "The description of the contact flow module.
" + } + }, + "State": { + "target": "com.amazonaws.connect#ContactFlowModuleState", + "traits": { + "smithy.api#documentation": "The state of contact flow module.
" + } + } + } + }, + "com.amazonaws.connect#UpdateContactFlowModuleMetadataResponse": { + "type": "structure", + "members": {} + }, "com.amazonaws.connect#UpdateContactFlowName": { "type": "operation", "input": { @@ -13091,7 +13948,7 @@ } ], "traits": { - "smithy.api#documentation": "Updates the hours of operation.
", + "smithy.api#documentation": "This API is in preview release for Amazon Connect and is subject to change.
\nUpdates the hours of operation.
", "smithy.api#http": { "method": "POST", "uri": "/hours-of-operations/{InstanceId}/{HoursOfOperationId}", @@ -13198,7 +14055,7 @@ "AttributeType": { "target": "com.amazonaws.connect#InstanceAttributeType", "traits": { - "smithy.api#documentation": "The type of attribute.
\nOnly allowlisted customers can consume USE_CUSTOM_TTS_VOICES. To access this feature,\n contact AWS Support for allowlisting.
\nThe type of attribute.
\nOnly allowlisted customers can consume USE_CUSTOM_TTS_VOICES. To access this feature, contact AWS Support for allowlisting.
\nThe flag that enables the auto-merging of duplicate profiles.
", + "smithy.api#required": {} + } + }, + "Consolidation": { + "target": "com.amazonaws.customerprofiles#Consolidation", + "traits": { + "smithy.api#documentation": "A list of matching attributes that represent matching criteria. If two profiles meet at\n least one of the requirements in the matching attributes list, they will be merged.
" + } + }, + "ConflictResolution": { + "target": "com.amazonaws.customerprofiles#ConflictResolution", + "traits": { + "smithy.api#documentation": "How the auto-merging process should resolve conflicts between different profiles. For\n example, if Profile A and Profile B have the same FirstName
and\n LastName
(and that is the matching criteria), which\n EmailAddress
should be used?
Configuration settings for how to perform the auto-merging of profiles.
" + } + }, "com.amazonaws.customerprofiles#BadRequestException": { "type": "structure", "members": { @@ -246,6 +273,42 @@ "smithy.api#pattern": ".*" } }, + "com.amazonaws.customerprofiles#ConflictResolution": { + "type": "structure", + "members": { + "ConflictResolvingModel": { + "target": "com.amazonaws.customerprofiles#ConflictResolvingModel", + "traits": { + "smithy.api#documentation": "How the auto-merging process should resolve conflicts between different profiles.
\n\n RECENCY
: Uses the data that was most recently updated.
\n SOURCE
: Uses the data from a specific source. For example, if a\n company has been aquired or two departments have merged, data from the specified\n source is used. If two duplicate profiles are from the same source, then\n RECENCY
is used again.
The ObjectType
name that is used to resolve profile merging conflicts when\n choosing SOURCE
as the ConflictResolvingModel
.
How the auto-merging process should resolve conflicts between different profiles.
" + } + }, + "com.amazonaws.customerprofiles#ConflictResolvingModel": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "RECENCY", + "name": "RECENCY" + }, + { + "value": "SOURCE", + "name": "SOURCE" + } + ] + } + }, "com.amazonaws.customerprofiles#ConnectorOperator": { "type": "structure", "members": { @@ -294,6 +357,21 @@ "smithy.api#pattern": "^[\\w/!@#+=.-]+$" } }, + "com.amazonaws.customerprofiles#Consolidation": { + "type": "structure", + "members": { + "MatchingAttributesList": { + "target": "com.amazonaws.customerprofiles#MatchingAttributesList", + "traits": { + "smithy.api#documentation": "A list of matching criteria.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The matching criteria to be used during the auto-merging process.
" + } + }, "com.amazonaws.customerprofiles#CreateDomain": { "type": "operation", "input": { @@ -320,7 +398,7 @@ } ], "traits": { - "smithy.api#documentation": "Creates a domain, which is a container for all customer data, such as customer profile\n attributes, object types, profile keys, and encryption keys. You can create multiple\n domains, and each domain can have multiple third-party integrations.
\nEach Amazon Connect instance can be associated with only one domain. Multiple Amazon Connect instances can\n be associated with one domain.
\nUse this API or UpdateDomain to\n enable identity\n resolution: set Matching
to true.
Creates a domain, which is a container for all customer data, such as customer profile\n attributes, object types, profile keys, and encryption keys. You can create multiple\n domains, and each domain can have multiple third-party integrations.
\nEach Amazon Connect instance can be associated with only one domain. Multiple Amazon Connect instances can\n be associated with one domain.
\nUse this API or UpdateDomain to\n enable identity\n resolution: set Matching
to true.
To prevent cross-service impersonation when you call this API, see Cross-service confused deputy prevention for sample policies that you should\n apply.
", "smithy.api#http": { "method": "POST", "uri": "/domains/{DomainName}", @@ -361,7 +439,7 @@ "Matching": { "target": "com.amazonaws.customerprofiles#MatchingRequest", "traits": { - "smithy.api#documentation": "The process of matching duplicate profiles. If Matching = true, Amazon Connect Customer Profiles starts a weekly batch process every Saturday at 12AM UTC to detect duplicate profiles in your domains. \nAfter that batch process completes, use the \nGetMatches\nAPI to return and review the results.
" + "smithy.api#documentation": "The process of matching duplicate profiles. If Matching
= true
, Amazon Connect Customer Profiles starts a weekly\nbatch process called Identity Resolution Job. If you do not specify a date and time for Identity Resolution Job to run, by default it runs every \nSaturday at 12AM UTC to detect duplicate profiles in your domains.
After the Identity Resolution Job completes, use the \nGetMatches\nAPI to return and review the results. Or, if you have configured ExportingConfig
in the MatchingRequest
, you can download the results from\nS3.
The process of matching duplicate profiles. If Matching = true, Amazon Connect Customer Profiles starts a weekly batch process every Saturday at 12AM UTC to detect duplicate profiles in your domains. \nAfter that batch process completes, use the \nGetMatches\nAPI to return and review the results.
" + "smithy.api#documentation": "The process of matching duplicate profiles. If Matching
= true
, Amazon Connect Customer Profiles starts a weekly\nbatch process called Identity Resolution Job. If you do not specify a date and time for Identity Resolution Job to run, by default it runs every \nSaturday at 12AM UTC to detect duplicate profiles in your domains.
After the Identity Resolution Job completes, use the \nGetMatches\nAPI to return and review the results. Or, if you have configured ExportingConfig
in the MatchingRequest
, you can download the results from\nS3.
Welcome to the Amazon Connect Customer Profiles API Reference. This guide provides information\n about the Amazon Connect Customer Profiles API, including supported operations, data types,\n parameters, and schemas.
\nAmazon Connect Customer Profiles is a unified customer profile for your contact center that has\n pre-built connectors powered by AppFlow that make it easy to combine customer information\n from third party applications, such as Salesforce (CRM), ServiceNow (ITSM), and your\n enterprise resource planning (ERP), with contact history from your Amazon Connect contact\n center.
\nIf you're new to Amazon Connect , you might find it helpful to also review the Amazon Connect Administrator Guide.
", + "smithy.api#title": "Amazon Connect Customer Profiles" + }, "version": "2020-08-15", "operations": [ { @@ -645,9 +738,15 @@ { "target": "com.amazonaws.customerprofiles#DeleteProfileObjectType" }, + { + "target": "com.amazonaws.customerprofiles#GetAutoMergingPreview" + }, { "target": "com.amazonaws.customerprofiles#GetDomain" }, + { + "target": "com.amazonaws.customerprofiles#GetIdentityResolutionJob" + }, { "target": "com.amazonaws.customerprofiles#GetIntegration" }, @@ -666,6 +765,9 @@ { "target": "com.amazonaws.customerprofiles#ListDomains" }, + { + "target": "com.amazonaws.customerprofiles#ListIdentityResolutionJobs" + }, { "target": "com.amazonaws.customerprofiles#ListIntegrations" }, @@ -708,22 +810,7 @@ { "target": "com.amazonaws.customerprofiles#UpdateProfile" } - ], - "traits": { - "aws.api#service": { - "sdkId": "Customer Profiles", - "arnNamespace": "profile", - "cloudFormationName": "CustomerProfiles", - "cloudTrailEventSource": "customerprofiles.amazonaws.com", - "endpointPrefix": "profile" - }, - "aws.auth#sigv4": { - "name": "profile" - }, - "aws.protocols#restJson1": {}, - "smithy.api#documentation": "Welcome to the Amazon Connect Customer Profiles API Reference. This guide provides information\n about the Amazon Connect Customer Profiles API, including supported operations, data types,\n parameters, and schemas.
\nAmazon Connect Customer Profiles is a unified customer profile for your contact center that has\n pre-built connectors powered by AppFlow that make it easy to combine customer information\n from third party applications, such as Salesforce (CRM), ServiceNow (ITSM), and your\n enterprise resource planning (ERP), with contact history from your Amazon Connect contact\n center.
\nIf you're new to Amazon Connect , you might find it helpful to also review the Amazon Connect Administrator Guide.
", - "smithy.api#title": "Amazon Connect Customer Profiles" - } + ] }, "com.amazonaws.customerprofiles#DataPullMode": { "type": "string", @@ -1216,6 +1303,40 @@ "smithy.api#documentation": "Usage-specific statistics about the domain.
" } }, + "com.amazonaws.customerprofiles#Double": { + "type": "double", + "traits": { + "smithy.api#box": {} + } + }, + "com.amazonaws.customerprofiles#ExportingConfig": { + "type": "structure", + "members": { + "S3Exporting": { + "target": "com.amazonaws.customerprofiles#S3ExportingConfig", + "traits": { + "smithy.api#documentation": "The S3 location where Identity Resolution Jobs write result files.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Configuration information about the S3 bucket where Identity Resolution Jobs writes result files.
\nYou need to give Customer Profiles service principal write permission to your S3 bucket.\n Otherwise, you'll get an exception in the API response. For an example policy, see\n Amazon Connect Customer Profiles cross-service confused deputy prevention.\n
\nInformation about the S3 location where Identity Resolution Jobs write result files.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The S3 location where Identity Resolution Jobs write result files.
" + } + }, "com.amazonaws.customerprofiles#FieldContentType": { "type": "string", "traits": { @@ -1480,6 +1601,97 @@ ] } }, + "com.amazonaws.customerprofiles#GetAutoMergingPreview": { + "type": "operation", + "input": { + "target": "com.amazonaws.customerprofiles#GetAutoMergingPreviewRequest" + }, + "output": { + "target": "com.amazonaws.customerprofiles#GetAutoMergingPreviewResponse" + }, + "errors": [ + { + "target": "com.amazonaws.customerprofiles#AccessDeniedException" + }, + { + "target": "com.amazonaws.customerprofiles#BadRequestException" + }, + { + "target": "com.amazonaws.customerprofiles#InternalServerException" + }, + { + "target": "com.amazonaws.customerprofiles#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.customerprofiles#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "Tests the auto-merging settings of your Identity Resolution Job without merging your data. It randomly\n selects a sample of matching groups from the existing matching results, and applies the\n automerging settings that you provided. You can then view the number of profiles in the\n sample, the number of matches, and the number of profiles identified to be merged. This\n enables you to evaluate the accuracy of the attributes in your matching list.
\nYou can't view which profiles are matched and would be merged.
\nWe strongly recommend you use this API to do a dry run of the automerging process\n before running the Identity Resolution Job. Include at least two matching\n attributes. If your matching list includes too few attributes (such as only\n FirstName
or only LastName
), there may be a large number of\n matches. This increases the chances of erroneous merges.
The unique name of the domain.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Consolidation": { + "target": "com.amazonaws.customerprofiles#Consolidation", + "traits": { + "smithy.api#documentation": "A list of matching attributes that represent matching criteria.
", + "smithy.api#required": {} + } + }, + "ConflictResolution": { + "target": "com.amazonaws.customerprofiles#ConflictResolution", + "traits": { + "smithy.api#documentation": "How the auto-merging process should resolve conflicts between different profiles.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.customerprofiles#GetAutoMergingPreviewResponse": { + "type": "structure", + "members": { + "DomainName": { + "target": "com.amazonaws.customerprofiles#name", + "traits": { + "smithy.api#documentation": "The unique name of the domain.
", + "smithy.api#required": {} + } + }, + "NumberOfMatchesInSample": { + "target": "com.amazonaws.customerprofiles#long", + "traits": { + "smithy.api#documentation": "The number of match groups in the domain that have been reviewed in this preview dry\n run.
" + } + }, + "NumberOfProfilesInSample": { + "target": "com.amazonaws.customerprofiles#long", + "traits": { + "smithy.api#documentation": "The number of profiles found in this preview dry run.
" + } + }, + "NumberOfProfilesWillBeMerged": { + "target": "com.amazonaws.customerprofiles#long", + "traits": { + "smithy.api#documentation": "The number of profiles that would be merged if this wasn't a preview dry run.
" + } + } + } + }, "com.amazonaws.customerprofiles#GetDomain": { "type": "operation", "input": { @@ -1564,7 +1776,7 @@ "Matching": { "target": "com.amazonaws.customerprofiles#MatchingResponse", "traits": { - "smithy.api#documentation": "The process of matching duplicate profiles. If Matching = true, Amazon Connect Customer Profiles starts a weekly batch process every Saturday at 12AM UTC to detect duplicate profiles in your domains. \nAfter that batch process completes, use the \nGetMatches\nAPI to return and review the results.
" + "smithy.api#documentation": "The process of matching duplicate profiles. If Matching
= true
, Amazon Connect Customer Profiles starts a weekly\nbatch process called Identity Resolution Job. If you do not specify a date and time for Identity Resolution Job to run, by default it runs every \nSaturday at 12AM UTC to detect duplicate profiles in your domains.
After the Identity Resolution Job completes, use the \nGetMatches\nAPI to return and review the results. Or, if you have configured ExportingConfig
in the MatchingRequest
, you can download the results from\nS3.
Returns information about an Identity Resolution Job in a specific domain.
\nIdentity Resolution Jobs are set up using the Amazon Connect admin console. For more information, see Use\n Identity Resolution to consolidate similar profiles.
", + "smithy.api#http": { + "method": "GET", + "uri": "/domains/{DomainName}/identity-resolution-jobs/{JobId}", + "code": 200 + } + } + }, + "com.amazonaws.customerprofiles#GetIdentityResolutionJobRequest": { + "type": "structure", + "members": { + "DomainName": { + "target": "com.amazonaws.customerprofiles#name", + "traits": { + "smithy.api#documentation": "The unique name of the domain.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "JobId": { + "target": "com.amazonaws.customerprofiles#uuid", + "traits": { + "smithy.api#documentation": "The unique identifier of the Identity Resolution Job.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.customerprofiles#GetIdentityResolutionJobResponse": { + "type": "structure", + "members": { + "DomainName": { + "target": "com.amazonaws.customerprofiles#name", + "traits": { + "smithy.api#documentation": "The unique name of the domain.
" + } + }, + "JobId": { + "target": "com.amazonaws.customerprofiles#uuid", + "traits": { + "smithy.api#documentation": "The unique identifier of the Identity Resolution Job.
" + } + }, + "Status": { + "target": "com.amazonaws.customerprofiles#IdentityResolutionJobStatus", + "traits": { + "smithy.api#documentation": "The status of the Identity Resolution Job.
\n\n PENDING
: The Identity Resolution Job is scheduled but has not started yet. If you turn\n off the Identity Resolution feature in your domain, jobs in the PENDING
state are\n deleted.
\n PREPROCESSING
: The Identity Resolution Job is loading your data.
\n FIND_MATCHING
: The Identity Resolution Job is using the machine learning model to\n identify profiles that belong to the same matching group.
\n MERGING
: The Identity Resolution Job is merging duplicate profiles.
\n COMPLETED
: The Identity Resolution Job completed successfully.
\n PARTIAL_SUCCESS
: There's a system error and not all of the data is\n merged. The Identity Resolution Job writes a message indicating the source of the problem.
\n FAILED
: The Identity Resolution Job did not merge any data. It writes a message\n indicating the source of the problem.
The error messages that are generated when the Identity Resolution Job runs.
" + } + }, + "JobStartTime": { + "target": "com.amazonaws.customerprofiles#timestamp", + "traits": { + "smithy.api#documentation": "The timestamp of when the Identity Resolution Job was started or will be started.
" + } + }, + "JobEndTime": { + "target": "com.amazonaws.customerprofiles#timestamp", + "traits": { + "smithy.api#documentation": "The timestamp of when the Identity Resolution Job was completed.
" + } + }, + "LastUpdatedAt": { + "target": "com.amazonaws.customerprofiles#timestamp", + "traits": { + "smithy.api#documentation": "The timestamp of when the Identity Resolution Job was most recently edited.
" + } + }, + "JobExpirationTime": { + "target": "com.amazonaws.customerprofiles#timestamp", + "traits": { + "smithy.api#documentation": "The timestamp of when the Identity Resolution Job will expire.
" + } + }, + "AutoMerging": { + "target": "com.amazonaws.customerprofiles#AutoMerging", + "traits": { + "smithy.api#documentation": "Configuration settings for how to perform the auto-merging of profiles.
" + } + }, + "ExportingLocation": { + "target": "com.amazonaws.customerprofiles#ExportingLocation", + "traits": { + "smithy.api#documentation": "The S3 location where the Identity Resolution Job writes result files.
" + } + }, + "JobStats": { + "target": "com.amazonaws.customerprofiles#JobStats", + "traits": { + "smithy.api#documentation": "Statistics about the Identity Resolution Job.
" + } + } + } + }, "com.amazonaws.customerprofiles#GetIntegration": { "type": "operation", "input": { @@ -1715,7 +2053,7 @@ } ], "traits": { - "smithy.api#documentation": "This API is in preview release for Amazon Connect and subject to change.
\nBefore calling this API, use CreateDomain or\n UpdateDomain to\n enable identity resolution: set Matching
to true.
GetMatches returns potentially matching profiles, based on the results of the latest run\n of a machine learning process.
\nAmazon Connect starts a batch process every Saturday at 12AM UTC to identify matching profiles.\n The results are returned up to seven days after the Saturday run.
\nAmazon Connect uses the following profile attributes to identify matches:
\nPhoneNumber
\nHomePhoneNumber
\nBusinessPhoneNumber
\nMobilePhoneNumber
\nEmailAddress
\nPersonalEmailAddress
\nBusinessEmailAddress
\nFullName
\nBusinessName
\nFor example, two or more profiles—with spelling mistakes such as John Doe and Jhn Doe, or different casing\n email addresses such as JOHN_DOE@ANYCOMPANY.COM and\n johndoe@anycompany.com, or different phone number\n formats such as 555-010-0000 and +1-555-010-0000—can be detected as belonging to the same customer John Doe and merged into a unified profile.
", + "smithy.api#documentation": "This API is in preview release for Amazon Connect and subject to change.
\nBefore calling this API, use CreateDomain or\n UpdateDomain to\n enable identity resolution: set Matching
to true.
GetMatches returns potentially matching profiles, based on the results of the latest run\n of a machine learning process.
\nThe process of matching duplicate profiles. If Matching
= true
, Amazon Connect Customer Profiles starts a weekly\nbatch process called Identity Resolution Job. If you do not specify a date and time for Identity Resolution Job to run, by default it runs every \nSaturday at 12AM UTC to detect duplicate profiles in your domains.
After the Identity Resolution Job completes, use the \nGetMatches\nAPI to return and review the results. Or, if you have configured ExportingConfig
in the MatchingRequest
, you can download the results from\nS3.
Amazon Connect uses the following profile attributes to identify matches:
\nPhoneNumber
\nHomePhoneNumber
\nBusinessPhoneNumber
\nMobilePhoneNumber
\nEmailAddress
\nPersonalEmailAddress
\nBusinessEmailAddress
\nFullName
\nBusinessName
\nFor example, two or more profiles—with spelling mistakes such as John Doe and Jhn Doe, or different casing\n email addresses such as JOHN_DOE@ANYCOMPANY.COM and\n johndoe@anycompany.com, or different phone number\n formats such as 555-010-0000 and +1-555-010-0000—can be detected as belonging to the same customer John Doe and merged into a unified profile.
", "smithy.api#http": { "method": "GET", "uri": "/domains/{DomainName}/matches", @@ -1875,6 +2213,12 @@ "smithy.api#documentation": "Indicates whether a profile should be created when data is received if one doesn’t exist\n for an object of this type. The default is FALSE
. If the AllowProfileCreation\n flag is set to FALSE
, then the service tries to fetch a standard profile and\n associate this object with the profile. If it is set to TRUE
, and if no match\n is found, then the service creates a new standard profile.
The format of your sourceLastUpdatedTimestamp
that was previously set\n up.
Indicates whether a profile should be created when data is received if one doesn’t exist\n for an object of this type. The default is FALSE
. If the AllowProfileCreation\n flag is set to FALSE
, then the service tries to fetch a standard profile and\n associate this object with the profile. If it is set to TRUE
, and if no match\n is found, then the service creates a new standard profile.
The format of your sourceLastUpdatedTimestamp
that was previously set\n up.
A map of the name and ObjectType field.
" } }, - "Keys": { - "target": "com.amazonaws.customerprofiles#KeyMap", + "Keys": { + "target": "com.amazonaws.customerprofiles#KeyMap", + "traits": { + "smithy.api#documentation": "A list of unique keys that can be used to map data to the profile.
" + } + } + } + }, + "com.amazonaws.customerprofiles#IdentityResolutionJob": { + "type": "structure", + "members": { + "DomainName": { + "target": "com.amazonaws.customerprofiles#name", + "traits": { + "smithy.api#documentation": "The unique name of the domain.
" + } + }, + "JobId": { + "target": "com.amazonaws.customerprofiles#uuid", + "traits": { + "smithy.api#documentation": "The unique identifier of the Identity Resolution Job.
" + } + }, + "Status": { + "target": "com.amazonaws.customerprofiles#IdentityResolutionJobStatus", + "traits": { + "smithy.api#documentation": "The status of the Identity Resolution Job.
\n\n PENDING
: The Identity Resolution Job is scheduled but has not started yet. If you turn\n off the Identity Resolution feature in your domain, jobs in the PENDING
state are\n deleted.
\n PREPROCESSING
: The Identity Resolution Job is loading your data.
\n FIND_MATCHING
: The Identity Resolution Job is using the machine learning model to\n identify profiles that belong to the same matching group.
\n MERGING
: The Identity Resolution Job is merging duplicate profiles.
\n COMPLETED
: The Identity Resolution Job completed successfully.
\n PARTIAL_SUCCESS
: There's a system error and not all of the data is\n merged. The Identity Resolution Job writes a message indicating the source of the problem.
\n FAILED
: The Identity Resolution Job did not merge any data. It writes a message\n indicating the source of the problem.
The timestamp of when the job was started or will be started.
" + } + }, + "JobEndTime": { + "target": "com.amazonaws.customerprofiles#timestamp", + "traits": { + "smithy.api#documentation": "The timestamp of when the job was completed.
" + } + }, + "JobStats": { + "target": "com.amazonaws.customerprofiles#JobStats", + "traits": { + "smithy.api#documentation": "Statistics about an Identity Resolution Job.
" + } + }, + "ExportingLocation": { + "target": "com.amazonaws.customerprofiles#ExportingLocation", + "traits": { + "smithy.api#documentation": "The S3 location where the Identity Resolution Job writes result files.
" + } + }, + "Message": { + "target": "com.amazonaws.customerprofiles#stringTo2048", "traits": { - "smithy.api#documentation": "A list of unique keys that can be used to map data to the profile.
" + "smithy.api#documentation": "The error messages that are generated when the Identity Resolution Job runs.
" } } + }, + "traits": { + "smithy.api#documentation": "Information about the Identity Resolution Job.
" + } + }, + "com.amazonaws.customerprofiles#IdentityResolutionJobStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PENDING", + "name": "PENDING" + }, + { + "value": "PREPROCESSING", + "name": "PREPROCESSING" + }, + { + "value": "FIND_MATCHING", + "name": "FIND_MATCHING" + }, + { + "value": "MERGING", + "name": "MERGING" + }, + { + "value": "COMPLETED", + "name": "COMPLETED" + }, + { + "value": "PARTIAL_SUCCESS", + "name": "PARTIAL_SUCCESS" + }, + { + "value": "FAILED", + "name": "FAILED" + } + ] + } + }, + "com.amazonaws.customerprofiles#IdentityResolutionJobsList": { + "type": "list", + "member": { + "target": "com.amazonaws.customerprofiles#IdentityResolutionJob" } }, "com.amazonaws.customerprofiles#IncrementalPullConfig": { @@ -2028,6 +2475,99 @@ "smithy.api#httpError": 500 } }, + "com.amazonaws.customerprofiles#JobSchedule": { + "type": "structure", + "members": { + "DayOfTheWeek": { + "target": "com.amazonaws.customerprofiles#JobScheduleDayOfTheWeek", + "traits": { + "smithy.api#documentation": "The day when the Identity Resolution Job should run every week.
", + "smithy.api#required": {} + } + }, + "Time": { + "target": "com.amazonaws.customerprofiles#JobScheduleTime", + "traits": { + "smithy.api#documentation": "The time when the Identity Resolution Job should run every week.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The day and time when do you want to start the Identity Resolution Job every week.
" + } + }, + "com.amazonaws.customerprofiles#JobScheduleDayOfTheWeek": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "SUNDAY", + "name": "SUNDAY" + }, + { + "value": "MONDAY", + "name": "MONDAY" + }, + { + "value": "TUESDAY", + "name": "TUESDAY" + }, + { + "value": "WEDNESDAY", + "name": "WEDNESDAY" + }, + { + "value": "THURSDAY", + "name": "THURSDAY" + }, + { + "value": "FRIDAY", + "name": "FRIDAY" + }, + { + "value": "SATURDAY", + "name": "SATURDAY" + } + ] + } + }, + "com.amazonaws.customerprofiles#JobScheduleTime": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 3, + "max": 5 + }, + "smithy.api#pattern": "^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$" + } + }, + "com.amazonaws.customerprofiles#JobStats": { + "type": "structure", + "members": { + "NumberOfProfilesReviewed": { + "target": "com.amazonaws.customerprofiles#long", + "traits": { + "smithy.api#documentation": "The number of profiles reviewed.
" + } + }, + "NumberOfMatchesFound": { + "target": "com.amazonaws.customerprofiles#long", + "traits": { + "smithy.api#documentation": "The number of matches found.
" + } + }, + "NumberOfMergesDone": { + "target": "com.amazonaws.customerprofiles#long", + "traits": { + "smithy.api#documentation": "The number of merges completed.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Statistics about the Identity Resolution Job.
" + } + }, "com.amazonaws.customerprofiles#KeyMap": { "type": "map", "key": { @@ -2229,6 +2769,84 @@ } } }, + "com.amazonaws.customerprofiles#ListIdentityResolutionJobs": { + "type": "operation", + "input": { + "target": "com.amazonaws.customerprofiles#ListIdentityResolutionJobsRequest" + }, + "output": { + "target": "com.amazonaws.customerprofiles#ListIdentityResolutionJobsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.customerprofiles#AccessDeniedException" + }, + { + "target": "com.amazonaws.customerprofiles#BadRequestException" + }, + { + "target": "com.amazonaws.customerprofiles#InternalServerException" + }, + { + "target": "com.amazonaws.customerprofiles#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.customerprofiles#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "Lists all of the Identity Resolution Jobs in your domain. The response sorts the list by\n JobStartTime
.
The unique name of the domain.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "NextToken": { + "target": "com.amazonaws.customerprofiles#token", + "traits": { + "smithy.api#documentation": "The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.
", + "smithy.api#httpQuery": "next-token" + } + }, + "MaxResults": { + "target": "com.amazonaws.customerprofiles#maxSize100", + "traits": { + "smithy.api#documentation": "The maximum number of results to return per page.
", + "smithy.api#httpQuery": "max-results" + } + } + } + }, + "com.amazonaws.customerprofiles#ListIdentityResolutionJobsResponse": { + "type": "structure", + "members": { + "IdentityResolutionJobsList": { + "target": "com.amazonaws.customerprofiles#IdentityResolutionJobsList", + "traits": { + "smithy.api#documentation": "A list of Identity Resolution Jobs.
" + } + }, + "NextToken": { + "target": "com.amazonaws.customerprofiles#token", + "traits": { + "smithy.api#documentation": "If there are additional results, this is the token for the next set of results.
" + } + } + } + }, "com.amazonaws.customerprofiles#ListIntegrationItem": { "type": "structure", "members": { @@ -2672,7 +3290,7 @@ "ObjectFilter": { "target": "com.amazonaws.customerprofiles#ObjectFilter", "traits": { - "smithy.api#documentation": "Applies a filter to the response to include profile objects with the specified index values.\n This filter is only supported for ObjectTypeName _asset and _case.
" + "smithy.api#documentation": "Applies a filter to the response to include profile objects with the specified index\n values. This filter is only supported for ObjectTypeName _asset and _case.
" } } } @@ -2846,6 +3464,12 @@ "traits": { "smithy.api#documentation": "A list of identifiers for profiles that match.
" } + }, + "ConfidenceScore": { + "target": "com.amazonaws.customerprofiles#Double", + "traits": { + "smithy.api#documentation": "A number between 0 and 1 that represents the confidence level of assigning profiles to a\n matching group. A score of 1 likely indicates an exact match.
" + } } }, "traits": { @@ -2858,6 +3482,30 @@ "target": "com.amazonaws.customerprofiles#MatchItem" } }, + "com.amazonaws.customerprofiles#MatchingAttributes": { + "type": "list", + "member": { + "target": "com.amazonaws.customerprofiles#string1To255" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 20 + } + } + }, + "com.amazonaws.customerprofiles#MatchingAttributesList": { + "type": "list", + "member": { + "target": "com.amazonaws.customerprofiles#MatchingAttributes" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + } + } + }, "com.amazonaws.customerprofiles#MatchingRequest": { "type": "structure", "members": { @@ -2867,6 +3515,24 @@ "smithy.api#documentation": "The flag that enables the matching process of duplicate profiles.
", "smithy.api#required": {} } + }, + "JobSchedule": { + "target": "com.amazonaws.customerprofiles#JobSchedule", + "traits": { + "smithy.api#documentation": "The day and time when do you want to start the Identity Resolution Job every week.
" + } + }, + "AutoMerging": { + "target": "com.amazonaws.customerprofiles#AutoMerging", + "traits": { + "smithy.api#documentation": "Configuration information about the auto-merging process.
" + } + }, + "ExportingConfig": { + "target": "com.amazonaws.customerprofiles#ExportingConfig", + "traits": { + "smithy.api#documentation": "Configuration information for exporting Identity Resolution results, for example, to an S3\n bucket.
" + } } }, "traits": { @@ -2881,6 +3547,24 @@ "traits": { "smithy.api#documentation": "The flag that enables the matching process of duplicate profiles.
" } + }, + "JobSchedule": { + "target": "com.amazonaws.customerprofiles#JobSchedule", + "traits": { + "smithy.api#documentation": "The day and time when do you want to start the Identity Resolution Job every week.
" + } + }, + "AutoMerging": { + "target": "com.amazonaws.customerprofiles#AutoMerging", + "traits": { + "smithy.api#documentation": "Configuration information about the auto-merging process.
" + } + }, + "ExportingConfig": { + "target": "com.amazonaws.customerprofiles#ExportingConfig", + "traits": { + "smithy.api#documentation": "Configuration information for exporting Identity Resolution results, for example, to an S3\n bucket.
" + } } }, "traits": { @@ -2978,7 +3662,7 @@ "KeyName": { "target": "com.amazonaws.customerprofiles#name", "traits": { - "smithy.api#documentation": "A searchable identifier of a standard profile object. The predefined keys you can use to search for _asset include: _assetId, _assetName, _serialNumber.\n The predefined keys you can use to search for _case include: _caseId.
", + "smithy.api#documentation": "A searchable identifier of a standard profile object. The predefined keys you can use to\n search for _asset include: _assetId, _assetName, _serialNumber. The predefined keys you can\n use to search for _case include: _caseId.
", "smithy.api#required": {} } }, @@ -2991,7 +3675,7 @@ } }, "traits": { - "smithy.api#documentation": "The filter applied to ListProfileObjects response to include profile objects with the specified index values.\n This filter is only supported for ObjectTypeName _asset and _case.
" + "smithy.api#documentation": "The filter applied to ListProfileObjects response to include profile objects with the\n specified index values. This filter is only supported for ObjectTypeName _asset and\n _case.
" } }, "com.amazonaws.customerprofiles#ObjectTypeField": { @@ -3026,7 +3710,7 @@ "StandardIdentifiers": { "target": "com.amazonaws.customerprofiles#StandardIdentifierList", "traits": { - "smithy.api#documentation": "The types of keys that a ProfileObject can have. Each ProfileObject can have only 1\n UNIQUE key but multiple PROFILE keys. PROFILE, ASSET or CASE means that this key can be used to tie an\n object to a PROFILE, ASSET or CASE respectively. UNIQUE means that it can be used to uniquely identify an object.\n If a key a is marked as SECONDARY, it will be used to search for profiles after all other\n PROFILE keys have been searched. A LOOKUP_ONLY key is only used to match a profile but is\n not persisted to be used for searching of the profile. A NEW_ONLY key is only used if the\n profile does not already exist before the object is ingested, otherwise it is only used for\n matching objects to profiles.
" + "smithy.api#documentation": "The types of keys that a ProfileObject can have. Each ProfileObject can have only 1\n UNIQUE key but multiple PROFILE keys. PROFILE, ASSET or CASE means that this key can be\n used to tie an object to a PROFILE, ASSET or CASE respectively. UNIQUE means that it can be\n used to uniquely identify an object. If a key a is marked as SECONDARY, it will be used to\n search for profiles after all other PROFILE keys have been searched. A LOOKUP_ONLY key is\n only used to match a profile but is not persisted to be used for searching of the profile.\n A NEW_ONLY key is only used if the profile does not already exist before the object is\n ingested, otherwise it is only used for matching objects to profiles.
" } }, "FieldNames": { @@ -3594,6 +4278,12 @@ "smithy.api#documentation": "Indicates whether a profile should be created when data is received if one doesn’t exist\n for an object of this type. The default is FALSE
. If the AllowProfileCreation\n flag is set to FALSE
, then the service tries to fetch a standard profile and\n associate this object with the profile. If it is set to TRUE
, and if no match\n is found, then the service creates a new standard profile.
The format of your sourceLastUpdatedTimestamp
that was previously set up.\n
Indicates whether a profile should be created when data is received if one doesn’t exist\n for an object of this type. The default is FALSE
. If the AllowProfileCreation\n flag is set to FALSE
, then the service tries to fetch a standard profile and\n associate this object with the profile. If it is set to TRUE
, and if no match\n is found, then the service creates a new standard profile.
The format of your sourceLastUpdatedTimestamp
that was previously set up in\n fields that were parsed using SimpleDateFormat. If you have sourceLastUpdatedTimestamp
in your\n field, you must set up sourceLastUpdatedTimestampFormat
.
The name of the S3 bucket where Identity Resolution Jobs write result files.
", + "smithy.api#required": {} + } + }, + "S3KeyName": { + "target": "com.amazonaws.customerprofiles#s3KeyNameCustomerOutputConfig", + "traits": { + "smithy.api#documentation": "The S3 key name of the location where Identity Resolution Jobs write result files.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Configuration information about the S3 bucket where Identity Resolution Jobs write result files.
" + } + }, + "com.amazonaws.customerprofiles#S3ExportingLocation": { + "type": "structure", + "members": { + "S3BucketName": { + "target": "com.amazonaws.customerprofiles#s3BucketName", + "traits": { + "smithy.api#documentation": "The name of the S3 bucket name where Identity Resolution Jobs write result files.
" + } + }, + "S3KeyName": { + "target": "com.amazonaws.customerprofiles#s3KeyName", + "traits": { + "smithy.api#documentation": "The S3 key name of the location where Identity Resolution Jobs write result files.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The S3 location where Identity Resolution Jobs write result files.
" + } + }, "com.amazonaws.customerprofiles#S3SourceProperties": { "type": "structure", "members": { @@ -4772,7 +5509,7 @@ } ], "traits": { - "smithy.api#documentation": "Updates the properties of a domain, including creating or selecting a dead letter queue\n or an encryption key.
\nAfter a domain is created, the name can’t be changed.
\nUse this API or CreateDomain to\n enable identity\n resolution: set Matching
to true.
Updates the properties of a domain, including creating or selecting a dead letter queue\n or an encryption key.
\nAfter a domain is created, the name can’t be changed.
\nUse this API or CreateDomain to\n enable identity\n resolution: set Matching
to true.
To prevent cross-service impersonation when you call this API, see Cross-service confused deputy prevention for sample policies that you should\n apply.
", "smithy.api#http": { "method": "PUT", "uri": "/domains/{DomainName}", @@ -4812,7 +5549,7 @@ "Matching": { "target": "com.amazonaws.customerprofiles#MatchingRequest", "traits": { - "smithy.api#documentation": "The process of matching duplicate profiles. If Matching = true, Amazon Connect Customer Profiles starts a weekly batch process every Saturday at 12AM UTC to detect duplicate profiles in your domains. \nAfter that batch process completes, use the \nGetMatches\nAPI to return and review the results.
" + "smithy.api#documentation": "The process of matching duplicate profiles. If Matching
= true
, Amazon Connect Customer Profiles starts a weekly\nbatch process called Identity Resolution Job. If you do not specify a date and time for Identity Resolution Job to run, by default it runs every \nSaturday at 12AM UTC to detect duplicate profiles in your domains.
After the Identity Resolution Job completes, use the \nGetMatches\nAPI to return and review the results. Or, if you have configured ExportingConfig
in the MatchingRequest
, you can download the results from\nS3.
The process of matching duplicate profiles. If Matching = true, Amazon Connect Customer Profiles starts a weekly batch process every Saturday at 12AM UTC to detect duplicate profiles in your domains. \nAfter that batch process completes, use the \nGetMatches\nAPI to return and review the results.
" + "smithy.api#documentation": "The process of matching duplicate profiles. If Matching
= true
, Amazon Connect Customer Profiles starts a weekly\nbatch process called Identity Resolution Job. If you do not specify a date and time for Identity Resolution Job to run, by default it runs every \nSaturday at 12AM UTC to detect duplicate profiles in your domains.
After the Identity Resolution Job completes, use the \nGetMatches\nAPI to return and review the results. Or, if you have configured ExportingConfig
in the MatchingRequest
, you can download the results from\nS3.
Returns the task assessment results from the Amazon S3 bucket that DMS creates in your\n Amazon Web Services account. This action always returns the latest results.
\nFor more information about DMS task assessments, see Creating a task assessment\n report in the Database Migration Service User Guide.
", + "smithy.api#documentation": "Returns the task assessment results from the Amazon S3 bucket that DMS creates in your\n Amazon Web Services account. This action always returns the\n latest results.
\nFor more information about DMS task assessments, see \n Creating a task assessment report\n in the Database Migration Service User Guide.
", "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -8497,6 +8497,12 @@ "traits": { "smithy.api#documentation": "For an S3 source, when this value is set to true
or y
,\n each leading double quotation mark has to be followed by an\n ending double quotation mark. This formatting complies with RFC\n 4180. When this value is set to false
or\n n
, string literals are copied to the target as\n is. In this case, a delimiter (row or column) signals the end of\n the field. Thus, you can't use a delimiter as part of the\n string, because it signals the end of the value.
For an S3 target, an optional parameter used to set behavior to comply with RFC\n 4180 for data migrated to Amazon S3 using .csv file format only. When this\n value is set to true
or y
using Amazon\n S3 as a target, if the data has quotation marks or newline\n characters in it, DMS encloses the entire column with an\n additional pair of double quotation marks (\"). Every quotation\n mark within the data is repeated twice.
The default value is true
. Valid values include true
, false
,\n y
, and n
.
When creating an S3 target endpoint, set DatePartitionTimezone
to convert\n the current UTC time into a specified time zone. The conversion occurs when a date\n partition folder is created and a CDC filename is generated. The time zone format is Area/Location.\n Use this parameter when DatePartitionedEnabled
is set to true
, as shown in the\n following example.
\n s3-settings='{\"DatePartitionEnabled\": true, \"DatePartitionSequence\": \"YYYYMMDDHH\",\n \"DatePartitionDelimiter\": \"SLASH\",\n \"DatePartitionTimezone\":\"Asia/Seoul\", \"BucketName\":\n \"dms-nattarat-test\"}'
\n
Starts the replication task assessment for unsupported data types in the source\n database.
" + "smithy.api#documentation": "Starts the replication task assessment for unsupported data types in the source\n database.
\nYou can only use this operation for a task if the following conditions are true:
\nThe task must be in the stopped
state.
The task must have successful connections to the source and target.
\nIf either of these conditions are not met, an InvalidResourceStateFault
error will result.
For information about DMS task assessments, see \n Creating a task assessment report\n in the Database Migration Service User Guide.
" } }, "com.amazonaws.databasemigrationservice#StartReplicationTaskAssessmentMessage": { diff --git a/codegen/sdk-codegen/aws-models/dataexchange.2017-07-25.json b/codegen/sdk-codegen/aws-models/dataexchange.2017-07-25.json index 82228f4463a..c4620d8ab34 100644 --- a/codegen/sdk-codegen/aws-models/dataexchange.2017-07-25.json +++ b/codegen/sdk-codegen/aws-models/dataexchange.2017-07-25.json @@ -60,6 +60,74 @@ "smithy.api#documentation": "What occurs after a certain event.
" } }, + "com.amazonaws.dataexchange#ApiDescription": { + "type": "string", + "traits": { + "smithy.api#documentation": "The description of the API.
" + } + }, + "com.amazonaws.dataexchange#ApiGatewayApiAsset": { + "type": "structure", + "members": { + "ApiDescription": { + "target": "com.amazonaws.dataexchange#ApiDescription", + "traits": { + "smithy.api#documentation": "The API description of the API asset.
" + } + }, + "ApiEndpoint": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "The API endpoint of the API asset.
" + } + }, + "ApiId": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "The unique identifier of the API asset.
" + } + }, + "ApiKey": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "The API key of the API asset.
" + } + }, + "ApiName": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "The API name of the API asset.
" + } + }, + "ApiSpecificationDownloadUrl": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "The download URL of the API specification of the API asset.
" + } + }, + "ApiSpecificationDownloadUrlExpiresAt": { + "target": "com.amazonaws.dataexchange#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that the upload URL expires, in ISO 8601 format.
" + } + }, + "ProtocolType": { + "target": "com.amazonaws.dataexchange#ProtocolType", + "traits": { + "smithy.api#documentation": "The protocol type of the API asset.
" + } + }, + "Stage": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "The stage of the API asset.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The API Gateway API that is the asset.
" + } + }, "com.amazonaws.dataexchange#Arn": { "type": "string", "traits": { @@ -108,6 +176,12 @@ "traits": { "smithy.api#documentation": "The Amazon Redshift datashare that is the asset.
" } + }, + "ApiGatewayApiAsset": { + "target": "com.amazonaws.dataexchange#ApiGatewayApiAsset", + "traits": { + "smithy.api#documentation": "Information about the API Gateway API asset.
" + } } }, "traits": { @@ -162,7 +236,7 @@ "Name": { "target": "com.amazonaws.dataexchange#AssetName", "traits": { - "smithy.api#documentation": "The name of the asset. When importing from Amazon S3, the S3 object key is used as the asset name. When exporting to Amazon S3, the asset name is used as default target S3 object key.
", + "smithy.api#documentation": "The name of the asset. When importing from Amazon S3, the S3 object key is used as the asset name. When exporting to Amazon S3, the asset name is used as default target S3 object key. When importing from Amazon API Gateway API, the API name is used as the asset name. When importing from Amazon Redshift, the datashare name is used as the asset name.
", "smithy.api#required": {} } }, @@ -188,13 +262,13 @@ } }, "traits": { - "smithy.api#documentation": "An asset in AWS Data Exchange is a piece of data. The asset can be a structured data file, an image file, or some other data file that can be stored as an S3 object, or an Amazon Redshift datashare (Preview). When you create an import job for your files, you create an asset in AWS Data Exchange for each of those files.
" + "smithy.api#documentation": "An asset in AWS Data Exchange is a piece of data (S3 object) or a means of fulfilling data (Amazon Redshift datashare or Amazon API Gateway API). The asset can be a structured data file, an image file, or some other data file that can be stored as an S3 object, an Amazon API Gateway API, or an Amazon Redshift datashare (Preview). When you create an import job for your files, API Gateway APIs, or Amazon Redshift datashares, you create an asset in AWS Data Exchange.
" } }, "com.amazonaws.dataexchange#AssetName": { "type": "string", "traits": { - "smithy.api#documentation": "The name of the asset. When importing from Amazon S3, the S3 object key is used as the asset name. When exporting to Amazon S3, the asset name is used as default target S3 object key.
" + "smithy.api#documentation": "The name of the asset. When importing from Amazon S3, the S3 object key is used as the asset name. When exporting to Amazon S3, the asset name is used as default target S3 object key. When importing from Amazon API Gateway API, the API name is used as the asset name. When importing from Amazon Redshift, the datashare name is used as the asset name.
" } }, "com.amazonaws.dataexchange#AssetSourceEntry": { @@ -231,6 +305,10 @@ { "value": "REDSHIFT_DATA_SHARE", "name": "REDSHIFT_DATA_SHARE" + }, + { + "value": "API_GATEWAY_API", + "name": "API_GATEWAY_API" } ] } @@ -854,6 +932,21 @@ }, "com.amazonaws.dataexchange#DataExchange": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "DataExchange", + "arnNamespace": "dataexchange", + "cloudFormationName": "DataExchange", + "cloudTrailEventSource": "dataexchange.amazonaws.com", + "endpointPrefix": "dataexchange" + }, + "aws.auth#sigv4": { + "name": "dataexchange" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "AWS Data Exchange is a service that makes it easy for AWS customers to exchange data in the cloud. You can use the AWS Data Exchange APIs to create, update, manage, and access file-based data set in the AWS Cloud.
As a subscriber, you can view and access the data sets that you have an entitlement to through a subscription. You can use the APIS to download or copy your entitled data sets to Amazon S3 for use across a variety of AWS analytics and machine learning services.
As a provider, you can create and manage your data sets that you would like to publish to a product. Being able to package and provide your data sets into products requires a few steps to determine eligibility. For more information, visit the AWS Data Exchange User Guide.
A data set is a collection of data that can be changed or updated over time. Data sets can be updated using revisions, which represent a new version or incremental change to a data set. A revision contains one or more assets. An asset in AWS Data Exchange is a piece of data that can be stored as an Amazon S3 object. The asset can be a structured data file, an image file, or some other data file. Jobs are asynchronous import or export operations used to create or copy assets.
", + "smithy.api#title": "AWS Data Exchange" + }, "version": "2017-07-25", "operations": [ { @@ -916,6 +1009,9 @@ { "target": "com.amazonaws.dataexchange#ListTagsForResource" }, + { + "target": "com.amazonaws.dataexchange#SendApiAsset" + }, { "target": "com.amazonaws.dataexchange#StartJob" }, @@ -937,22 +1033,7 @@ { "target": "com.amazonaws.dataexchange#UpdateRevision" } - ], - "traits": { - "aws.api#service": { - "sdkId": "DataExchange", - "arnNamespace": "dataexchange", - "cloudFormationName": "DataExchange", - "cloudTrailEventSource": "dataexchange.amazonaws.com", - "endpointPrefix": "dataexchange" - }, - "aws.auth#sigv4": { - "name": "dataexchange" - }, - "aws.protocols#restJson1": {}, - "smithy.api#documentation": "AWS Data Exchange is a service that makes it easy for AWS customers to exchange data in the cloud. You can use the AWS Data Exchange APIs to create, update, manage, and access file-based data set in the AWS Cloud.
As a subscriber, you can view and access the data sets that you have an entitlement to through a subscription. You can use the APIS to download or copy your entitled data sets to Amazon S3 for use across a variety of AWS analytics and machine learning services.
As a provider, you can create and manage your data sets that you would like to publish to a product. Being able to package and provide your data sets into products requires a few steps to determine eligibility. For more information, visit the AWS Data Exchange User Guide.
A data set is a collection of data that can be changed or updated over time. Data sets can be updated using revisions, which represent a new version or incremental change to a data set. A revision contains one or more assets. An asset in AWS Data Exchange is a piece of data that can be stored as an Amazon S3 object. The asset can be a structured data file, an image file, or some other data file. Jobs are asynchronous import or export operations used to create or copy assets.
", - "smithy.api#title": "AWS Data Exchange" - } + ] }, "com.amazonaws.dataexchange#DataSetEntry": { "type": "structure", @@ -1666,7 +1747,7 @@ "Name": { "target": "com.amazonaws.dataexchange#AssetName", "traits": { - "smithy.api#documentation": "The name of the asset. When importing from Amazon S3, the S3 object key is used as the asset name. When exporting to Amazon S3, the asset name is used as default target S3 object key.
" + "smithy.api#documentation": "The name of the asset. When importing from Amazon S3, the S3 object key is used as the asset name. When exporting to Amazon S3, the asset name is used as default target S3 object key. When importing from Amazon API Gateway API, the API name is used as the asset name. When importing from Amazon Redshift, the datashare name is used as the asset name.
" } }, "RevisionId": { @@ -2103,6 +2184,158 @@ "smithy.api#documentation": "A unique identifier.
" } }, + "com.amazonaws.dataexchange#ImportAssetFromApiGatewayApiRequestDetails": { + "type": "structure", + "members": { + "ApiDescription": { + "target": "com.amazonaws.dataexchange#ApiDescription", + "traits": { + "smithy.api#documentation": "The API description. Markdown supported.
" + } + }, + "ApiId": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "The API Gateway API ID.
", + "smithy.api#required": {} + } + }, + "ApiKey": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "The API Gateway API key.
" + } + }, + "ApiName": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "The API name.
", + "smithy.api#required": {} + } + }, + "ApiSpecificationMd5Hash": { + "target": "com.amazonaws.dataexchange#__stringMin24Max24PatternAZaZ094AZaZ092AZaZ093", + "traits": { + "smithy.api#documentation": "The Base64-encoded MD5 hash of the OpenAPI 3.0 JSON API specification file. It is used to ensure the integrity of the file.
", + "smithy.api#required": {} + } + }, + "DataSetId": { + "target": "com.amazonaws.dataexchange#Id", + "traits": { + "smithy.api#documentation": "The data set ID.
", + "smithy.api#required": {} + } + }, + "ProtocolType": { + "target": "com.amazonaws.dataexchange#ProtocolType", + "traits": { + "smithy.api#documentation": "The protocol type.
", + "smithy.api#required": {} + } + }, + "RevisionId": { + "target": "com.amazonaws.dataexchange#Id", + "traits": { + "smithy.api#documentation": "The revision ID.
", + "smithy.api#required": {} + } + }, + "Stage": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "The API stage.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request details.
" + } + }, + "com.amazonaws.dataexchange#ImportAssetFromApiGatewayApiResponseDetails": { + "type": "structure", + "members": { + "ApiDescription": { + "target": "com.amazonaws.dataexchange#ApiDescription", + "traits": { + "smithy.api#documentation": "The API description.
" + } + }, + "ApiId": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "The API ID.
", + "smithy.api#required": {} + } + }, + "ApiKey": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "The API key.
" + } + }, + "ApiName": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "The API name.
", + "smithy.api#required": {} + } + }, + "ApiSpecificationMd5Hash": { + "target": "com.amazonaws.dataexchange#__stringMin24Max24PatternAZaZ094AZaZ092AZaZ093", + "traits": { + "smithy.api#documentation": "The Base64-encoded Md5 hash for the API asset, used to ensure the integrity of the API at that location.
", + "smithy.api#required": {} + } + }, + "ApiSpecificationUploadUrl": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "The upload URL of the API specification.
", + "smithy.api#required": {} + } + }, + "ApiSpecificationUploadUrlExpiresAt": { + "target": "com.amazonaws.dataexchange#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that the upload URL expires, in ISO 8601 format.
", + "smithy.api#required": {} + } + }, + "DataSetId": { + "target": "com.amazonaws.dataexchange#Id", + "traits": { + "smithy.api#documentation": "The data set ID.
", + "smithy.api#required": {} + } + }, + "ProtocolType": { + "target": "com.amazonaws.dataexchange#ProtocolType", + "traits": { + "smithy.api#documentation": "The protocol type.
", + "smithy.api#required": {} + } + }, + "RevisionId": { + "target": "com.amazonaws.dataexchange#Id", + "traits": { + "smithy.api#documentation": "The revision ID.
", + "smithy.api#required": {} + } + }, + "Stage": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "The API stage.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The response details.
" + } + }, "com.amazonaws.dataexchange#ImportAssetFromSignedUrlJobErrorDetails": { "type": "structure", "members": { @@ -2568,6 +2801,18 @@ { "value": "Amazon Redshift datashare assets per revision", "name": "Amazon_Redshift_datashare_assets_per_revision" + }, + { + "value": "Concurrent in progress jobs to import assets from an API Gateway API", + "name": "Concurrent_in_progress_jobs_to_import_assets_from_an_API_Gateway_API" + }, + { + "value": "Amazon API Gateway API assets per revision", + "name": "Amazon_API_Gateway_API_assets_per_revision" + }, + { + "value": "Revisions per Amazon API Gateway API data set", + "name": "Revisions_per_Amazon_API_Gateway_API_data_set" } ] } @@ -3170,6 +3415,17 @@ "smithy.api#documentation": "Information about the origin of the data set.
" } }, + "com.amazonaws.dataexchange#ProtocolType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "REST", + "name": "REST" + } + ] + } + }, "com.amazonaws.dataexchange#RedshiftDataShareAsset": { "type": "structure", "members": { @@ -3238,6 +3494,12 @@ "traits": { "smithy.api#documentation": "Details from an import from Amazon Redshift datashare request.
" } + }, + "ImportAssetFromApiGatewayApi": { + "target": "com.amazonaws.dataexchange#ImportAssetFromApiGatewayApiRequestDetails", + "traits": { + "smithy.api#documentation": "Information about the import asset from API Gateway API request.
" + } } }, "traits": { @@ -3338,6 +3600,12 @@ "traits": { "smithy.api#documentation": "Details from an import from Amazon Redshift datashare response.
" } + }, + "ImportAssetFromApiGatewayApi": { + "target": "com.amazonaws.dataexchange#ImportAssetFromApiGatewayApiResponseDetails", + "traits": { + "smithy.api#documentation": "The response details.
" + } } }, "traits": { @@ -3463,6 +3731,129 @@ "smithy.api#documentation": "The S3 object that is the asset.
" } }, + "com.amazonaws.dataexchange#SendApiAsset": { + "type": "operation", + "input": { + "target": "com.amazonaws.dataexchange#SendApiAssetRequest" + }, + "output": { + "target": "com.amazonaws.dataexchange#SendApiAssetResponse" + }, + "errors": [ + { + "target": "com.amazonaws.dataexchange#AccessDeniedException" + }, + { + "target": "com.amazonaws.dataexchange#InternalServerException" + }, + { + "target": "com.amazonaws.dataexchange#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.dataexchange#ThrottlingException" + }, + { + "target": "com.amazonaws.dataexchange#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "This operation invokes an API Gateway API asset. The request is proxied to the provider’s API Gateway API.
", + "smithy.api#endpoint": { + "hostPrefix": "api-fulfill." + }, + "smithy.api#http": { + "method": "POST", + "uri": "/v1", + "code": 200 + } + } + }, + "com.amazonaws.dataexchange#SendApiAssetRequest": { + "type": "structure", + "members": { + "Body": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "The request body.
", + "smithy.api#httpPayload": {} + } + }, + "QueryStringParameters": { + "target": "com.amazonaws.dataexchange#MapOf__string", + "traits": { + "smithy.api#documentation": "Attach query string parameters to the end of the URI (for example, /v1/examplePath?exampleParam=exampleValue).
", + "smithy.api#httpQueryParams": {} + } + }, + "AssetId": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "Asset ID value for the API request.
", + "smithy.api#httpHeader": "x-amzn-dataexchange-asset-id", + "smithy.api#required": {} + } + }, + "DataSetId": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "Data set ID value for the API request.
", + "smithy.api#httpHeader": "x-amzn-dataexchange-data-set-id", + "smithy.api#required": {} + } + }, + "RequestHeaders": { + "target": "com.amazonaws.dataexchange#MapOf__string", + "traits": { + "smithy.api#documentation": "Any header value prefixed with x-amzn-dataexchange-header- will have that stripped before sending the Asset API request. Use this when you want to override a header that AWS Data Exchange uses. Alternatively, you can use the header without a prefix to the HTTP request.
", + "smithy.api#httpPrefixHeaders": "x-amzn-dataexchange-header-" + } + }, + "Method": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "HTTP method value for the API request. Alternatively, you can use the appropriate verb in your request.
", + "smithy.api#httpHeader": "x-amzn-dataexchange-http-method" + } + }, + "Path": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "URI path value for the API request. Alternatively, you can set the URI path directly by invoking /v1/{pathValue}
", + "smithy.api#httpHeader": "x-amzn-dataexchange-path" + } + }, + "RevisionId": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "Revision ID value for the API request.
", + "smithy.api#httpHeader": "x-amzn-dataexchange-revision-id", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request body for SendApiAsset.
" + } + }, + "com.amazonaws.dataexchange#SendApiAssetResponse": { + "type": "structure", + "members": { + "Body": { + "target": "com.amazonaws.dataexchange#__string", + "traits": { + "smithy.api#documentation": "The response body from the underlying API tracked by the API asset.
", + "smithy.api#httpPayload": {} + } + }, + "ResponseHeaders": { + "target": "com.amazonaws.dataexchange#MapOf__string", + "traits": { + "smithy.api#documentation": "The response headers from the underlying API tracked by the API asset.
", + "smithy.api#httpPrefixHeaders": "" + } + } + } + }, "com.amazonaws.dataexchange#ServerSideEncryptionTypes": { "type": "string", "traits": { @@ -3682,6 +4073,10 @@ { "value": "IMPORT_ASSETS_FROM_REDSHIFT_DATA_SHARES", "name": "IMPORT_ASSETS_FROM_REDSHIFT_DATA_SHARES" + }, + { + "value": "IMPORT_ASSET_FROM_API_GATEWAY_API", + "name": "IMPORT_ASSET_FROM_API_GATEWAY_API" } ] } @@ -3780,7 +4175,7 @@ "Name": { "target": "com.amazonaws.dataexchange#AssetName", "traits": { - "smithy.api#documentation": "The name of the asset. When importing from Amazon S3, the S3 object key is used as the asset name. When exporting to Amazon S3, the asset name is used as default target S3 object key.
", + "smithy.api#documentation": "The name of the asset. When importing from Amazon S3, the S3 object key is used as the asset name. When exporting to Amazon S3, the asset name is used as default target S3 object key. When importing from Amazon API Gateway API, the API name is used as the asset name. When importing from Amazon Redshift, the datashare name is used as the asset name.
", "smithy.api#required": {} } }, @@ -3839,7 +4234,7 @@ "Name": { "target": "com.amazonaws.dataexchange#AssetName", "traits": { - "smithy.api#documentation": "The name of the asset. When importing from Amazon S3, the S3 object key is used as the asset name. When exporting to Amazon S3, the asset name is used as default target S3 object key.
" + "smithy.api#documentation": "The name of the asset. When importing from Amazon S3, the S3 object key is used as the asset name. When exporting to Amazon S3, the asset name is used as default target S3 object key. When importing from Amazon API Gateway API, the API name is used as the asset name. When importing from Amazon Redshift, the datashare name is used as the asset name.
" } }, "RevisionId": { diff --git a/codegen/sdk-codegen/aws-models/dynamodb.2012-08-10.json b/codegen/sdk-codegen/aws-models/dynamodb.2012-08-10.json index 010f40951d5..dae7d6b7301 100644 --- a/codegen/sdk-codegen/aws-models/dynamodb.2012-08-10.json +++ b/codegen/sdk-codegen/aws-models/dynamodb.2012-08-10.json @@ -762,6 +762,9 @@ "smithy.api#documentation": "The list of PartiQL statements representing the batch to run.
", "smithy.api#required": {} } + }, + "ReturnConsumedCapacity": { + "target": "com.amazonaws.dynamodb#ReturnConsumedCapacity" } } }, @@ -773,6 +776,12 @@ "traits": { "smithy.api#documentation": "The response to each PartiQL statement in the batch.
" } + }, + "ConsumedCapacity": { + "target": "com.amazonaws.dynamodb#ConsumedCapacityMultiple", + "traits": { + "smithy.api#documentation": "The capacity units consumed by the entire operation. The values of the list are\n ordered according to the ordering of the statements.
" + } } } }, @@ -3334,6 +3343,9 @@ "traits": { "smithy.api#documentation": "Set this value to get remaining results, if NextToken
was returned in the\n statement response.
If the response of a read request exceeds the response payload limit DynamoDB will set\n this value in the response. If set, you can use that this value in the subsequent\n request to get the remaining results.
" } + }, + "ConsumedCapacity": { + "target": "com.amazonaws.dynamodb#ConsumedCapacity" } } }, @@ -3405,6 +3420,12 @@ "smithy.api#documentation": "Set this value to get remaining results, if NextToken
was returned in the\n statement response.
Determines the level of detail about either provisioned or on-demand throughput consumption that is\n returned in the response. For more information, see TransactGetItems and TransactWriteItems.
" + } } } }, @@ -3416,6 +3437,12 @@ "traits": { "smithy.api#documentation": "The response to a PartiQL transaction.
" } + }, + "ConsumedCapacity": { + "target": "com.amazonaws.dynamodb#ConsumedCapacityMultiple", + "traits": { + "smithy.api#documentation": "The capacity units consumed by the entire operation. The values of the list are\n ordered according to the ordering of the statements.
" + } } } }, @@ -7016,7 +7043,7 @@ "com.amazonaws.dynamodb#ReturnConsumedCapacity": { "type": "string", "traits": { - "smithy.api#documentation": "Determines the level of detail about provisioned throughput consumption that is\n returned in the response:
\n\n INDEXES
- The response includes the aggregate\n ConsumedCapacity
for the operation, together with\n ConsumedCapacity
for each table and secondary index that was\n accessed.
Note that some operations, such as GetItem
and\n BatchGetItem
, do not access any indexes at all. In these cases,\n specifying INDEXES
will only return ConsumedCapacity
\n information for table(s).
\n TOTAL
- The response includes only the aggregate\n ConsumedCapacity
for the operation.
\n NONE
- No ConsumedCapacity
details are included in the\n response.
Determines the level of detail about either provisioned or on-demand throughput\n consumption that is returned in the response:
\n\n INDEXES
- The response includes the aggregate\n ConsumedCapacity
for the operation, together with\n ConsumedCapacity
for each table and secondary index that was\n accessed.
Note that some operations, such as GetItem
and\n BatchGetItem
, do not access any indexes at all. In these cases,\n specifying INDEXES
will only return ConsumedCapacity
\n information for table(s).
\n TOTAL
- The response includes only the aggregate\n ConsumedCapacity
for the operation.
\n NONE
- No ConsumedCapacity
details are included in the\n response.
Information about the IPv6 CIDR block association.
", + "smithy.api#documentation": "Information about the IPv6 association.
", "smithy.api#xmlName": "ipv6CidrBlockAssociation" } }, @@ -4932,7 +4950,7 @@ "target": "com.amazonaws.ec2#AuthorizeSecurityGroupEgressResult" }, "traits": { - "smithy.api#documentation": "[VPC only] Adds the specified outbound (egress) rules to a security group for use with a VPC.
\nAn outbound rule permits instances to send traffic to the specified IPv4 or IPv6 CIDR address \n ranges, or to the instances that are associated with the specified destination security groups.
\nYou specify a protocol for each rule (for example, TCP). \n For the TCP and UDP protocols, you must also specify the destination port or port range. \n For the ICMP protocol, you must also specify the ICMP type and code. \n You can use -1 for the type or code to mean all types or all codes.
\nRule changes are propagated to affected instances as quickly as possible. However, a small delay might occur.
\nFor information about VPC security group quotas, see Amazon VPC quotas.
" + "smithy.api#documentation": "[VPC only] Adds the specified outbound (egress) rules to a security group for use with a VPC.
\nAn outbound rule permits instances to send traffic to the specified IPv4 or IPv6 CIDR address \n ranges, or to the instances that are associated with the specified source security groups.
\nYou specify a protocol for each rule (for example, TCP). \n For the TCP and UDP protocols, you must also specify the destination port or port range. \n For the ICMP protocol, you must also specify the ICMP type and code. \n You can use -1 for the type or code to mean all types or all codes.
\nRule changes are propagated to affected instances as quickly as possible. However, a small delay might occur.
\nFor information about VPC security group quotas, see Amazon VPC quotas.
" } }, "com.amazonaws.ec2#AuthorizeSecurityGroupEgressRequest": { @@ -10011,6 +10029,12 @@ "traits": { "smithy.api#documentation": "Checks whether you have the required permissions for the action, without actually making the request, \n and provides an error response. If you have the required permissions, the error response is DryRunOperation
. \n Otherwise, it is UnauthorizedOperation
.
Indicates whether to create an IPv6 only subnet. If you already have a default subnet\n for this Availability Zone, you must delete it before you can create an IPv6 only subnet.
" + } } } }, @@ -12232,7 +12256,10 @@ } }, "CoreNetworkArn": { - "target": "com.amazonaws.ec2#CoreNetworkArn" + "target": "com.amazonaws.ec2#CoreNetworkArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the core network.
" + } } } }, @@ -12721,14 +12748,13 @@ "CidrBlock": { "target": "com.amazonaws.ec2#String", "traits": { - "smithy.api#documentation": "The IPv4 network range for the subnet, in CIDR notation. For example, 10.0.0.0/24
. We modify the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18
, we modify it to 100.68.0.0/18
.
The IPv4 network range for the subnet, in CIDR notation. For example, 10.0.0.0/24
. \n We modify the specified CIDR block to its canonical form; for example, if you specify \n 100.68.0.18/18
, we modify it to 100.68.0.0/18
.
This parameter is not supported for an IPv6 only subnet.
" } }, "Ipv6CidrBlock": { "target": "com.amazonaws.ec2#String", "traits": { - "smithy.api#documentation": "The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a\n /64 prefix length.
" + "smithy.api#documentation": "The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a\n /64 prefix length.
\nThis parameter is required for an IPv6 only subnet.
" } }, "OutpostArn": { @@ -12751,6 +12777,12 @@ "smithy.api#documentation": "Checks whether you have the required permissions for the action, without actually making the request, \n and provides an error response. If you have the required permissions, the error response is DryRunOperation
. \n Otherwise, it is UnauthorizedOperation
.
Indicates whether to create an IPv6 only subnet.
" + } } } }, @@ -16501,7 +16533,7 @@ "target": "com.amazonaws.ec2#TagList", "traits": { "aws.protocols#ec2QueryName": "Tag", - "smithy.api#documentation": "The tags to delete. Specify a tag key and an optional tag value to delete\n specific tags. If you specify a tag key without a tag value, we delete any tag with this\n key regardless of its value. If you specify a tag key with an empty string as the tag\n value, we delete the tag only if its value is an empty string.
\nIf you omit this parameter, we delete all user-defined tags for the specified\n resources. We do not delete Amazon Web Services-generated tags (tags that have the aws:
\n prefix).
The tags to delete. Specify a tag key and an optional tag value to delete\n specific tags. If you specify a tag key without a tag value, we delete any tag with this\n key regardless of its value. If you specify a tag key with an empty string as the tag\n value, we delete the tag only if its value is an empty string.
\nIf you omit this parameter, we delete all user-defined tags for the specified\n resources. We do not delete Amazon Web Services-generated tags (tags that have the aws:
\n prefix).
Constraints: Up to 1000 tags.
", "smithy.api#xmlName": "tag" } } @@ -21311,7 +21343,7 @@ "target": "com.amazonaws.ec2#DescribeInstanceStatusResult" }, "traits": { - "smithy.api#documentation": "Describes the status of the specified instances or all of your instances. By default,\n only running instances are described, unless you specifically indicate to return the\n status of all instances.
\nInstance status includes the following components:
\n\n Status checks - Amazon EC2 performs status\n checks on running EC2 instances to identify hardware and software issues. For\n more information, see Status checks for your instances and Troubleshooting\n instances with failed status checks in the Amazon EC2 User Guide.
\n\n Scheduled events - Amazon EC2 can schedule\n events (such as reboot, stop, or terminate) for your instances related to\n hardware issues, software updates, or system maintenance. For more information,\n see Scheduled events for your instances in the Amazon EC2 User Guide.
\n\n Instance state - You can manage your instances\n from the moment you launch them through their termination. For more information,\n see Instance\n lifecycle in the Amazon EC2 User Guide.
\nDescribes the status of the specified instances or all of your instances. By default,\n only running instances are described, unless you specifically indicate to return the\n status of all instances.
\nInstance status includes the following components:
\n\n Status checks - Amazon EC2 performs status\n checks on running EC2 instances to identify hardware and software issues. For\n more information, see Status checks for your instances and Troubleshoot\n instances with failed status checks in the Amazon EC2 User\n Guide.
\n\n Scheduled events - Amazon EC2 can schedule\n events (such as reboot, stop, or terminate) for your instances related to\n hardware issues, software updates, or system maintenance. For more information,\n see Scheduled events for your instances in the Amazon EC2 User Guide.
\n\n Instance state - You can manage your instances\n from the moment you launch them through their termination. For more information,\n see Instance\n lifecycle in the Amazon EC2 User Guide.
\nDescribes the storage tier status of one or more Amazon EBS snapshots.
", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "SnapshotTierStatuses", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.ec2#DescribeSnapshotTierStatusMaxResults": { + "type": "integer", + "traits": { + "smithy.api#box": {} + } + }, + "com.amazonaws.ec2#DescribeSnapshotTierStatusRequest": { + "type": "structure", + "members": { + "Filters": { + "target": "com.amazonaws.ec2#FilterList", + "traits": { + "smithy.api#documentation": "The filters.
\n\n snapshot-id
- The snapshot ID.
\n volume-id
- The ID of the volume the snapshot is for.
\n last-tiering-operation
- The state of the last archive or restore action. (archiving
| archival_error
|\n archival_complete
| restoring
| restore_error
| restore_complete
)
Checks whether you have the required permissions for the action, without actually making the request, \n and provides an error response. If you have the required permissions, the error response is DryRunOperation
. \n Otherwise, it is UnauthorizedOperation
.
The token for the next page of results.
" + } + }, + "MaxResults": { + "target": "com.amazonaws.ec2#DescribeSnapshotTierStatusMaxResults", + "traits": { + "smithy.api#documentation": "The maximum number of results to return with a single call.\n\tTo retrieve the remaining results, make another call with the returned nextToken
value.
Information about the snapshot's storage tier.
", + "smithy.api#xmlName": "snapshotTierStatusSet" + } + }, + "NextToken": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "NextToken", + "smithy.api#documentation": "The token to use to retrieve the next page of results. This value is null
when there are no more results to return.
The filters.
\n\n description
- A description of the snapshot.
\n encrypted
- Indicates whether the snapshot is encrypted\n (true
| false
)
\n owner-alias
- The owner alias, from an Amazon-maintained list \n (amazon
). \n This is not the user-configured Amazon Web Services account alias set using the IAM console.\n We recommend that you use the related parameter instead of this filter.
\n owner-id
- The Amazon Web Services account ID of the owner. We recommend that \n you use the related parameter instead of this filter.
\n progress
- The progress of the snapshot, as a percentage (for example,\n 80%).
\n snapshot-id
- The snapshot ID.
\n start-time
- The time stamp when the snapshot was initiated.
\n status
- The status of the snapshot (pending
|\n completed
| error
).
\n tag
:Owner
and the value TeamA
, specify tag:Owner
for the filter name and TeamA
for the filter value.
\n tag-key
- The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
\n volume-id
- The ID of the volume the snapshot is for.
\n volume-size
- The size of the volume, in GiB.
The filters.
\n\n description
- A description of the snapshot.
\n encrypted
- Indicates whether the snapshot is encrypted\n (true
| false
)
\n owner-alias
- The owner alias, from an Amazon-maintained list \n (amazon
). \n This is not the user-configured Amazon Web Services account alias set using the IAM console.\n We recommend that you use the related parameter instead of this filter.
\n owner-id
- The Amazon Web Services account ID of the owner. We recommend that \n you use the related parameter instead of this filter.
\n progress
- The progress of the snapshot, as a percentage (for example,\n 80%).
\n snapshot-id
- The snapshot ID.
\n start-time
- The time stamp when the snapshot was initiated.
\n status
- The status of the snapshot (pending
|\n completed
| error
).
\n storage-tier
- The storage tier of the snapshot (archive
|\n standard
).
\n tag
:Owner
and the value TeamA
, specify tag:Owner
for the filter name and TeamA
for the filter value.
\n tag-key
- The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
\n volume-id
- The ID of the volume the snapshot is for.
\n volume-size
- The size of the volume, in GiB.
One or more filters.
\n\n availability-zone
- The Availability Zone for the subnet. You can also use\n availabilityZone
as the filter name.
\n availability-zone-id
- The ID of the Availability Zone for the subnet.\n You can also use availabilityZoneId
as the filter name.
\n available-ip-address-count
- The number of IPv4 addresses in the\n subnet that are available.
\n cidr-block
- The IPv4 CIDR block of the subnet. The CIDR block you\n specify must exactly match the subnet's CIDR block for information to be\n returned for the subnet. You can also use cidr
or\n cidrBlock
as the filter names.
\n default-for-az
- Indicates whether this is the default subnet for the\n Availability Zone. You can also use defaultForAz
as the filter name.
\n ipv6-cidr-block-association.ipv6-cidr-block
- An IPv6 CIDR\n block associated with the subnet.
\n ipv6-cidr-block-association.association-id
- An association ID\n for an IPv6 CIDR block associated with the subnet.
\n ipv6-cidr-block-association.state
- The state of an IPv6 CIDR\n block associated with the subnet.
\n outpost-arn
- The Amazon Resource Name (ARN) of the Outpost.
\n owner-id
- The ID of the Amazon Web Services account that owns the subnet.
\n state
- The state of the subnet (pending
| available
).
\n subnet-arn
- The Amazon Resource Name (ARN) of the subnet.
\n subnet-id
- The ID of the subnet.
\n tag
:Owner
and the value TeamA
, specify tag:Owner
for the filter name and TeamA
for the filter value.
\n tag-key
- The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
\n vpc-id
- The ID of the VPC for the subnet.
One or more filters.
\n\n availability-zone
- The Availability Zone for the subnet. You can also use\n availabilityZone
as the filter name.
\n availability-zone-id
- The ID of the Availability Zone for the subnet.\n You can also use availabilityZoneId
as the filter name.
\n available-ip-address-count
- The number of IPv4 addresses in the\n subnet that are available.
\n cidr-block
- The IPv4 CIDR block of the subnet. The CIDR block you\n specify must exactly match the subnet's CIDR block for information to be\n returned for the subnet. You can also use cidr
or\n cidrBlock
as the filter names.
\n default-for-az
- Indicates whether this is the default subnet for the\n Availability Zone (true
| false
). You can also use \n defaultForAz
as the filter name.
\n ipv6-cidr-block-association.ipv6-cidr-block
- An IPv6 CIDR\n block associated with the subnet.
\n ipv6-cidr-block-association.association-id
- An association ID\n for an IPv6 CIDR block associated with the subnet.
\n ipv6-cidr-block-association.state
- The state of an IPv6 CIDR\n block associated with the subnet.
\n ipv6-native
- Indicates whether this is an IPv6 only subnet (true
| false
).
\n outpost-arn
- The Amazon Resource Name (ARN) of the Outpost.
\n owner-id
- The ID of the Amazon Web Services account that owns the subnet.
\n state
- The state of the subnet (pending
| available
).
\n subnet-arn
- The Amazon Resource Name (ARN) of the subnet.
\n subnet-id
- The ID of the subnet.
\n tag
:Owner
and the value TeamA
, specify tag:Owner
for the filter name and TeamA
for the filter value.
\n tag-key
- The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
\n vpc-id
- The ID of the VPC for the subnet.
The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot\n Instance after launching a new replacement Spot Instance.
", + "smithy.api#documentation": "The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot\n Instance after launching a new replacement Spot Instance.
\nValid only when replacementStrategy
is set to launch-before-terminate
.
Valid values: Minimum value of 120
seconds. Maximum value of 7200
seconds.
The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot\n Instance after launching a new replacement Spot Instance.
" + "smithy.api#documentation": "The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot\n Instance after launching a new replacement Spot Instance.
\nValid only when ReplacementStrategy
is set to launch-before-terminate
.
Valid values: Minimum value of 120
seconds. Maximum value of 7200
seconds.
The time that the usage operation was last updated.
", "smithy.api#xmlName": "usageOperationUpdateTime" } + }, + "PrivateDnsNameOptions": { + "target": "com.amazonaws.ec2#PrivateDnsNameOptionsResponse", + "traits": { + "aws.protocols#ec2QueryName": "PrivateDnsNameOptions", + "smithy.api#documentation": "The options for the instance hostname.
", + "smithy.api#xmlName": "privateDnsNameOptions" + } + }, + "Ipv6Address": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "Ipv6Address", + "smithy.api#documentation": "The IPv6 address assigned to the instance.
", + "smithy.api#xmlName": "ipv6Address" + } } }, "traits": { @@ -43663,6 +43801,46 @@ "value": "m6gd.16xlarge", "name": "m6gd_16xlarge" }, + { + "value": "m6a.large", + "name": "m6a_large" + }, + { + "value": "m6a.xlarge", + "name": "m6a_xlarge" + }, + { + "value": "m6a.2xlarge", + "name": "m6a_2xlarge" + }, + { + "value": "m6a.4xlarge", + "name": "m6a_4xlarge" + }, + { + "value": "m6a.8xlarge", + "name": "m6a_8xlarge" + }, + { + "value": "m6a.12xlarge", + "name": "m6a_12xlarge" + }, + { + "value": "m6a.16xlarge", + "name": "m6a_16xlarge" + }, + { + "value": "m6a.24xlarge", + "name": "m6a_24xlarge" + }, + { + "value": "m6a.32xlarge", + "name": "m6a_32xlarge" + }, + { + "value": "m6a.48xlarge", + "name": "m6a_48xlarge" + }, { "value": "m6i.large", "name": "m6i_large" @@ -43751,6 +43929,30 @@ "value": "vt1.24xlarge", "name": "vt1_24xlarge" }, + { + "value": "g5g.xlarge", + "name": "g5g_xlarge" + }, + { + "value": "g5g.2xlarge", + "name": "g5g_2xlarge" + }, + { + "value": "g5g.4xlarge", + "name": "g5g_4xlarge" + }, + { + "value": "g5g.8xlarge", + "name": "g5g_8xlarge" + }, + { + "value": "g5g.16xlarge", + "name": "g5g_16xlarge" + }, + { + "value": "g5g.metal", + "name": "g5g_metal" + }, { "value": "g5.xlarge", "name": "g5_xlarge" @@ -46543,6 +46745,64 @@ "smithy.api#documentation": "Describes the placement of an instance.
" } }, + "com.amazonaws.ec2#LaunchTemplatePrivateDnsNameOptions": { + "type": "structure", + "members": { + "HostnameType": { + "target": "com.amazonaws.ec2#HostnameType", + "traits": { + "aws.protocols#ec2QueryName": "HostnameType", + "smithy.api#documentation": "The type of hostname to assign to an instance.
", + "smithy.api#xmlName": "hostnameType" + } + }, + "EnableResourceNameDnsARecord": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "aws.protocols#ec2QueryName": "EnableResourceNameDnsARecord", + "smithy.api#documentation": "Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
", + "smithy.api#xmlName": "enableResourceNameDnsARecord" + } + }, + "EnableResourceNameDnsAAAARecord": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "aws.protocols#ec2QueryName": "EnableResourceNameDnsAAAARecord", + "smithy.api#documentation": "Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
", + "smithy.api#xmlName": "enableResourceNameDnsAAAARecord" + } + } + }, + "traits": { + "smithy.api#documentation": "Describes the options for instance hostnames.
" + } + }, + "com.amazonaws.ec2#LaunchTemplatePrivateDnsNameOptionsRequest": { + "type": "structure", + "members": { + "HostnameType": { + "target": "com.amazonaws.ec2#HostnameType", + "traits": { + "smithy.api#documentation": "The type of hostname for Amazon EC2 instances. For IPv4 only subnets, an instance DNS name must \n be based on the instance IPv4 address. For IPv6 native subnets, an instance DNS name must \n be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use \n the instance IPv4 address or the instance ID.
" + } + }, + "EnableResourceNameDnsARecord": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "smithy.api#documentation": "Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
" + } + }, + "EnableResourceNameDnsAAAARecord": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "smithy.api#documentation": "Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Describes the options for instance hostnames.
" + } + }, "com.amazonaws.ec2#LaunchTemplateSet": { "type": "list", "member": { @@ -46886,6 +47146,85 @@ } } }, + "com.amazonaws.ec2#ListSnapshotsInRecycleBin": { + "type": "operation", + "input": { + "target": "com.amazonaws.ec2#ListSnapshotsInRecycleBinRequest" + }, + "output": { + "target": "com.amazonaws.ec2#ListSnapshotsInRecycleBinResult" + }, + "traits": { + "smithy.api#documentation": "Lists one or more snapshots that are currently in the Recycle Bin.
", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "Snapshots", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.ec2#ListSnapshotsInRecycleBinMaxResults": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 5, + "max": 1000 + } + } + }, + "com.amazonaws.ec2#ListSnapshotsInRecycleBinRequest": { + "type": "structure", + "members": { + "MaxResults": { + "target": "com.amazonaws.ec2#ListSnapshotsInRecycleBinMaxResults", + "traits": { + "smithy.api#documentation": "The maximum number of results to return with a single call.\n\tTo retrieve the remaining results, make another call with the returned nextToken
value.
The token for the next page of results.
" + } + }, + "SnapshotIds": { + "target": "com.amazonaws.ec2#SnapshotIdStringList", + "traits": { + "smithy.api#documentation": "The IDs of the snapshots to list. Omit this parameter to list all of the \n snapshots that are in the Recycle Bin.
", + "smithy.api#xmlName": "SnapshotId" + } + }, + "DryRun": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "smithy.api#documentation": "Checks whether you have the required permissions for the action, without actually making the request, \n and provides an error response. If you have the required permissions, the error response is DryRunOperation
. \n Otherwise, it is UnauthorizedOperation
.
Information about the snapshots.
", + "smithy.api#xmlName": "snapshotSet" + } + }, + "NextToken": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "NextToken", + "smithy.api#documentation": "The token to use to retrieve the next page of results. This value is null
when there are no more results to return.
Modifies the specified attribute of the specified instance. You can specify only one\n attribute at a time.
\n\n Note: Using this action to change the security groups\n associated with an elastic network interface (ENI) attached to an instance in a VPC can\n result in an error if the instance has more than one ENI. To change the security groups\n associated with an ENI attached to an instance that has multiple ENIs, we recommend that\n you use the ModifyNetworkInterfaceAttribute action.
\nTo modify some attributes, the instance must be stopped. For more information, see\n Modifying attributes of a stopped instance in the Amazon EC2 User Guide.
" + "smithy.api#documentation": "Modifies the specified attribute of the specified instance. You can specify only one\n attribute at a time.
\n\n Note: Using this action to change the security groups\n associated with an elastic network interface (ENI) attached to an instance in a VPC can\n result in an error if the instance has more than one ENI. To change the security groups\n associated with an ENI attached to an instance that has multiple ENIs, we recommend that\n you use the ModifyNetworkInterfaceAttribute action.
\nTo modify some attributes, the instance must be stopped. For more information, see\n Modify a stopped instance in the Amazon EC2 User Guide.
" } }, "com.amazonaws.ec2#ModifyInstanceAttributeRequest": { @@ -48922,7 +49261,7 @@ "target": "com.amazonaws.ec2#InstanceBlockDeviceMappingSpecificationList", "traits": { "aws.protocols#ec2QueryName": "BlockDeviceMapping", - "smithy.api#documentation": "Modifies the DeleteOnTermination
attribute for volumes that are currently\n attached. The volume must be owned by the caller. If no value is specified for\n DeleteOnTermination
, the default is true
and the volume is\n deleted when the instance is terminated.
To add instance store volumes to an Amazon EBS-backed instance, you must add them when\n you launch the instance. For more information, see Updating the block device mapping when launching an instance in the\n Amazon EC2 User Guide.
", + "smithy.api#documentation": "Modifies the DeleteOnTermination
attribute for volumes that are currently\n attached. The volume must be owned by the caller. If no value is specified for\n DeleteOnTermination
, the default is true
and the volume is\n deleted when the instance is terminated.
To add instance store volumes to an Amazon EBS-backed instance, you must add them when\n you launch the instance. For more information, see Update the block device mapping when launching an instance in the\n Amazon EC2 User Guide.
", "smithy.api#xmlName": "blockDeviceMapping" } }, @@ -49295,19 +49634,19 @@ "HttpEndpoint": { "target": "com.amazonaws.ec2#InstanceMetadataEndpointState", "traits": { - "smithy.api#documentation": "This parameter enables or disables the HTTP metadata endpoint on your instances. If\n the parameter is not specified, the existing state is maintained.
\nIf you specify a value of disabled
, you will not be able to access your\n instance metadata.
Enables or disables the HTTP metadata endpoint on your instances. If\n the parameter is not specified, the existing state is maintained.
\nIf you specify a value of disabled
, you cannot access your\n instance metadata.
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation
. Otherwise, it is UnauthorizedOperation
.
Checks whether you have the required permissions for the action, without actually making the request, \n and provides an error response. If you have the required permissions, the error response is \n DryRunOperation
. Otherwise, it is UnauthorizedOperation
.
Enables or disables the IPv6 endpoint for the instance metadata service.
" + "smithy.api#documentation": "Enables or disables the IPv6 endpoint for the instance metadata service. This setting \n applies only if you have enabled the HTTP metadata endpoint.
" } } } @@ -49390,7 +49729,7 @@ "PartitionNumber": { "target": "com.amazonaws.ec2#Integer", "traits": { - "smithy.api#documentation": "Reserved for future use.
" + "smithy.api#documentation": "The number of the partition in which to place the instance. Valid only if the\n placement group strategy is set to partition
.
Contains the parameters for ModifyNetworkInterfaceAttribute.
" } }, + "com.amazonaws.ec2#ModifyPrivateDnsNameOptions": { + "type": "operation", + "input": { + "target": "com.amazonaws.ec2#ModifyPrivateDnsNameOptionsRequest" + }, + "output": { + "target": "com.amazonaws.ec2#ModifyPrivateDnsNameOptionsResult" + }, + "traits": { + "smithy.api#documentation": "Modifies the options for instance hostnames for the specified instance.
" + } + }, + "com.amazonaws.ec2#ModifyPrivateDnsNameOptionsRequest": { + "type": "structure", + "members": { + "DryRun": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "smithy.api#documentation": "Checks whether you have the required permissions for the action, without actually making the request, \n and provides an error response. If you have the required permissions, the error response is DryRunOperation
. \n Otherwise, it is UnauthorizedOperation
.
The ID of the instance.
" + } + }, + "PrivateDnsHostnameType": { + "target": "com.amazonaws.ec2#HostnameType", + "traits": { + "smithy.api#documentation": "The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS name must be \n based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name must be based \n on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance\n IPv4 address or the instance ID.
" + } + }, + "EnableResourceNameDnsARecord": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "smithy.api#documentation": "Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
" + } + }, + "EnableResourceNameDnsAAAARecord": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "smithy.api#documentation": "Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
" + } + } + } + }, + "com.amazonaws.ec2#ModifyPrivateDnsNameOptionsResult": { + "type": "structure", + "members": { + "Return": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "aws.protocols#ec2QueryName": "Return", + "smithy.api#documentation": "Returns true
if the request succeeds; otherwise, it returns an error.
Archives an Amazon EBS snapshot. When you archive a snapshot, it is converted to a full \n snapshot that includes all of the blocks of data that were written to the volume at the \n time the snapshot was created, and moved from the standard tier to the archive \n tier. For more information, see Archive Amazon EBS snapshots \n in the Amazon Elastic Compute Cloud User Guide.
" + } + }, + "com.amazonaws.ec2#ModifySnapshotTierRequest": { + "type": "structure", + "members": { + "SnapshotId": { + "target": "com.amazonaws.ec2#SnapshotId", + "traits": { + "smithy.api#documentation": "The ID of the snapshot.
", + "smithy.api#required": {} + } + }, + "StorageTier": { + "target": "com.amazonaws.ec2#TargetStorageTier", + "traits": { + "smithy.api#documentation": "The name of the storage tier. You must specify archive
.
Checks whether you have the required permissions for the action, without actually making the request, \n and provides an error response. If you have the required permissions, the error response is DryRunOperation
. \n Otherwise, it is UnauthorizedOperation
.
The ID of the snapshot.
", + "smithy.api#xmlName": "snapshotId" + } + }, + "TieringStartTime": { + "target": "com.amazonaws.ec2#MillisecondDateTime", + "traits": { + "aws.protocols#ec2QueryName": "TieringStartTime", + "smithy.api#documentation": "The date and time when the archive process was started.
", + "smithy.api#xmlName": "tieringStartTime" + } + } + } + }, "com.amazonaws.ec2#ModifySpotFleetRequest": { "type": "operation", "input": { @@ -49917,6 +50373,24 @@ "traits": { "smithy.api#documentation": "Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet \n should return synthetic IPv6 addresses for IPv4-only destinations.
" } + }, + "PrivateDnsHostnameTypeOnLaunch": { + "target": "com.amazonaws.ec2#HostnameType", + "traits": { + "smithy.api#documentation": "The type of hostnames to assign to instances in the subnet at launch. For IPv4 only subnets, an\n instance DNS name must be based on the instance IPv4 address. For IPv6 only subnets, an instance\n DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS\n names use the instance IPv4 address or the instance ID.
" + } + }, + "EnableResourceNameDnsARecordOnLaunch": { + "target": "com.amazonaws.ec2#AttributeBooleanValue", + "traits": { + "smithy.api#documentation": "Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
" + } + }, + "EnableResourceNameDnsAAAARecordOnLaunch": { + "target": "com.amazonaws.ec2#AttributeBooleanValue", + "traits": { + "smithy.api#documentation": "Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
" + } } } }, @@ -51356,7 +51830,7 @@ "target": "com.amazonaws.ec2#MonitorInstancesResult" }, "traits": { - "smithy.api#documentation": "Enables detailed monitoring for a running instance. Otherwise, basic monitoring is\n enabled. For more information, see Monitoring your instances and\n volumes in the Amazon EC2 User Guide.
\nTo disable detailed monitoring, see .
" + "smithy.api#documentation": "Enables detailed monitoring for a running instance. Otherwise, basic monitoring is\n enabled. For more information, see Monitor your instances using \n CloudWatch in the Amazon EC2 User Guide.
\nTo disable detailed monitoring, see .
" } }, "com.amazonaws.ec2#MonitorInstancesRequest": { @@ -52557,6 +53031,22 @@ "smithy.api#documentation": "Indicates whether a network interface with an IPv6 address is unreachable from the \n public internet. If the value is true
, inbound traffic from the internet \n is dropped and you cannot assign an elastic IP address to the network interface. The \n network interface is reachable from peered VPCs and resources connected through a \n transit gateway, including on-premises networks.
Indicates whether this is an IPv6 only network interface.
", + "smithy.api#xmlName": "ipv6Native" + } + }, + "Ipv6Address": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "Ipv6Address", + "smithy.api#documentation": "The IPv6 globally unique address associated with the network interface.
", + "smithy.api#xmlName": "ipv6Address" + } } }, "traits": { @@ -53205,7 +53695,7 @@ "target": "com.amazonaws.ec2#FleetOnDemandAllocationStrategy", "traits": { "aws.protocols#ec2QueryName": "AllocationStrategy", - "smithy.api#documentation": "The order of the launch template overrides to use in fulfilling On-Demand capacity. If\n you specify lowest-price
, EC2 Fleet uses price to determine the order, launching\n the lowest price first. If you specify prioritized
, EC2 Fleet uses the priority\n that you assigned to each launch template override, launching the highest priority first.\n If you do not specify a value, EC2 Fleet defaults to lowest-price
.
The strategy that determines the order of the launch template overrides to use in\n fulfilling On-Demand capacity.
\n\n lowest-price
- EC2 Fleet uses price to determine the order, launching the lowest\n price first.
\n prioritized
- EC2 Fleet uses the priority that you assigned to each launch\n template override, launching the highest priority first.
Default: lowest-price
\n
The strategy for using unused Capacity Reservations for fulfilling On-Demand capacity.\n Supported only for fleets of type instant
.
The strategy for using unused Capacity Reservations for fulfilling On-Demand\n capacity.
\nSupported only for fleets of type instant
.
Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the fleet.\n Supported only for fleets of type instant
.
Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the\n fleet.
\nSupported only for fleets of type instant
.
Indicates that the fleet launches all On-Demand Instances into a single Availability Zone. Supported\n only for fleets of type instant
.
Indicates that the fleet launches all On-Demand Instances into a single Availability Zone.
\nSupported only for fleets of type instant
.
The minimum target capacity for On-Demand Instances in the fleet. If the minimum target capacity is\n not reached, the fleet launches no instances.
", + "smithy.api#documentation": "The minimum target capacity for On-Demand Instances in the fleet. If the minimum target capacity is\n not reached, the fleet launches no instances.
\nSupported only for fleets of type instant
.
At least one of the following must be specified: SingleAvailabilityZone
|\n SingleInstanceType
\n
The order of the launch template overrides to use in fulfilling On-Demand capacity. If\n you specify lowest-price
, EC2 Fleet uses price to determine the order, launching\n the lowest price first. If you specify prioritized
, EC2 Fleet uses the priority\n that you assigned to each launch template override, launching the highest priority first.\n If you do not specify a value, EC2 Fleet defaults to lowest-price
.
The strategy that determines the order of the launch template overrides to use in\n fulfilling On-Demand capacity.
\n\n lowest-price
- EC2 Fleet uses price to determine the order, launching the lowest\n price first.
\n prioritized
- EC2 Fleet uses the priority that you assigned to each launch\n template override, launching the highest priority first.
Default: lowest-price
\n
The strategy for using unused Capacity Reservations for fulfilling On-Demand capacity.\n Supported only for fleets of type instant
.
The strategy for using unused Capacity Reservations for fulfilling On-Demand\n capacity.
\nSupported only for fleets of type instant
.
Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the fleet.\n Supported only for fleets of type instant
.
Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the\n fleet.
\nSupported only for fleets of type instant
.
Indicates that the fleet launches all On-Demand Instances into a single Availability Zone. Supported\n only for fleets of type instant
.
Indicates that the fleet launches all On-Demand Instances into a single Availability Zone.
\nSupported only for fleets of type instant
.
The minimum target capacity for On-Demand Instances in the fleet. If the minimum target capacity is\n not reached, the fleet launches no instances.
" + "smithy.api#documentation": "The minimum target capacity for On-Demand Instances in the fleet. If the minimum target capacity is\n not reached, the fleet launches no instances.
\nSupported only for fleets of type instant
.
At least one of the following must be specified: SingleAvailabilityZone
|\n SingleInstanceType
\n
The number of the partition the instance is in. Valid only if the placement group\n strategy is set to partition
.
This parameter is not supported by CreateFleet.
", + "smithy.api#documentation": "The number of the partition that the instance is in. Valid only if the placement group\n strategy is set to partition
.
This parameter is not supported by CreateFleet.
", "smithy.api#xmlName": "partitionNumber" } }, @@ -54762,6 +55252,96 @@ "smithy.api#documentation": "Information about the private DNS name for the service endpoint. For more information\n about these parameters, see VPC Endpoint Service\n Private DNS Name Verification in the\n Amazon Virtual Private Cloud User Guide.
" } }, + "com.amazonaws.ec2#PrivateDnsNameOptionsOnLaunch": { + "type": "structure", + "members": { + "HostnameType": { + "target": "com.amazonaws.ec2#HostnameType", + "traits": { + "aws.protocols#ec2QueryName": "HostnameType", + "smithy.api#documentation": "The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS name must be \n based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name must be based \n on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance\n IPv4 address or the instance ID.
", + "smithy.api#xmlName": "hostnameType" + } + }, + "EnableResourceNameDnsARecord": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "aws.protocols#ec2QueryName": "EnableResourceNameDnsARecord", + "smithy.api#documentation": "Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
", + "smithy.api#xmlName": "enableResourceNameDnsARecord" + } + }, + "EnableResourceNameDnsAAAARecord": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "aws.protocols#ec2QueryName": "EnableResourceNameDnsAAAARecord", + "smithy.api#documentation": "Indicates whether to respond to DNS queries for instance hostname with DNS AAAA records.
", + "smithy.api#xmlName": "enableResourceNameDnsAAAARecord" + } + } + }, + "traits": { + "smithy.api#documentation": "Describes the options for instance hostnames.
" + } + }, + "com.amazonaws.ec2#PrivateDnsNameOptionsRequest": { + "type": "structure", + "members": { + "HostnameType": { + "target": "com.amazonaws.ec2#HostnameType", + "traits": { + "smithy.api#documentation": "The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS name must be \n based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name must be based \n on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance\n IPv4 address or the instance ID.
" + } + }, + "EnableResourceNameDnsARecord": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "smithy.api#documentation": "Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
" + } + }, + "EnableResourceNameDnsAAAARecord": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "smithy.api#documentation": "Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Describes the options for instance hostnames.
" + } + }, + "com.amazonaws.ec2#PrivateDnsNameOptionsResponse": { + "type": "structure", + "members": { + "HostnameType": { + "target": "com.amazonaws.ec2#HostnameType", + "traits": { + "aws.protocols#ec2QueryName": "HostnameType", + "smithy.api#documentation": "The type of hostname to assign to an instance.
", + "smithy.api#xmlName": "hostnameType" + } + }, + "EnableResourceNameDnsARecord": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "aws.protocols#ec2QueryName": "EnableResourceNameDnsARecord", + "smithy.api#documentation": "Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
", + "smithy.api#xmlName": "enableResourceNameDnsARecord" + } + }, + "EnableResourceNameDnsAAAARecord": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "aws.protocols#ec2QueryName": "EnableResourceNameDnsAAAARecord", + "smithy.api#documentation": "Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
", + "smithy.api#xmlName": "enableResourceNameDnsAAAARecord" + } + } + }, + "traits": { + "smithy.api#documentation": "Describes the options for instance hostnames.
" + } + }, "com.amazonaws.ec2#PrivateIpAddressConfigSet": { "type": "list", "member": { @@ -55647,7 +56227,7 @@ "target": "com.amazonaws.ec2#RebootInstancesRequest" }, "traits": { - "smithy.api#documentation": "Requests a reboot of the specified instances. This operation is asynchronous; it only\n queues a request to reboot the specified instances. The operation succeeds if the\n instances are valid and belong to you. Requests to reboot terminated instances are\n ignored.
\nIf an instance does not cleanly shut down within a few minutes, Amazon EC2 performs a\n hard reboot.
\nFor more information about troubleshooting, see Getting console output and\n rebooting instances in the Amazon EC2 User Guide.
" + "smithy.api#documentation": "Requests a reboot of the specified instances. This operation is asynchronous; it only\n queues a request to reboot the specified instances. The operation succeeds if the\n instances are valid and belong to you. Requests to reboot terminated instances are\n ignored.
\nIf an instance does not cleanly shut down within a few minutes, Amazon EC2 performs a\n hard reboot.
\nFor more information about troubleshooting, see Troubleshoot an unreachable \n instance in the Amazon EC2 User Guide.
" } }, "com.amazonaws.ec2#RebootInstancesRequest": { @@ -56926,7 +57506,10 @@ } }, "CoreNetworkArn": { - "target": "com.amazonaws.ec2#CoreNetworkArn" + "target": "com.amazonaws.ec2#CoreNetworkArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the core network.
" + } } } }, @@ -57410,6 +57993,12 @@ "traits": { "smithy.api#documentation": "The attributes for the instance types. When you specify instance attributes, Amazon EC2 will\n identify instance types with these attributes.
\nIf you specify InstanceRequirements
, you can't specify\n InstanceTypes
.
The options for the instance hostname. The default values are inherited from the subnet.
" + } } }, "traits": { @@ -59516,6 +60105,14 @@ "smithy.api#documentation": "The attributes for the instance types. When you specify instance attributes, Amazon EC2 will\n identify instance types with these attributes.
\nIf you specify InstanceRequirements
, you can't specify\n InstanceTypes
.
The options for the instance hostname.
", + "smithy.api#xmlName": "privateDnsNameOptions" + } } }, "traits": { @@ -59640,6 +60237,206 @@ } } }, + "com.amazonaws.ec2#RestoreSnapshotFromRecycleBin": { + "type": "operation", + "input": { + "target": "com.amazonaws.ec2#RestoreSnapshotFromRecycleBinRequest" + }, + "output": { + "target": "com.amazonaws.ec2#RestoreSnapshotFromRecycleBinResult" + }, + "traits": { + "smithy.api#documentation": "Restores a snapshot from the Recycle Bin. For more information, see Restore \n snapshots from the Recycle Bin in the Amazon Elastic Compute Cloud User Guide.
" + } + }, + "com.amazonaws.ec2#RestoreSnapshotFromRecycleBinRequest": { + "type": "structure", + "members": { + "SnapshotId": { + "target": "com.amazonaws.ec2#SnapshotId", + "traits": { + "smithy.api#documentation": "The ID of the snapshot to restore.
", + "smithy.api#required": {} + } + }, + "DryRun": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "smithy.api#documentation": "Checks whether you have the required permissions for the action, without actually making the request, \n and provides an error response. If you have the required permissions, the error response is DryRunOperation
. \n Otherwise, it is UnauthorizedOperation
.
The ID of the snapshot.
", + "smithy.api#xmlName": "snapshotId" + } + }, + "OutpostArn": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "OutpostArn", + "smithy.api#documentation": "The ARN of the Outpost on which the snapshot is stored. For more information, see Amazon EBS local snapshots on Outposts in the \n Amazon Elastic Compute Cloud User Guide.
", + "smithy.api#xmlName": "outpostArn" + } + }, + "Description": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "Description", + "smithy.api#documentation": "The description for the snapshot.
", + "smithy.api#xmlName": "description" + } + }, + "Encrypted": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "aws.protocols#ec2QueryName": "Encrypted", + "smithy.api#documentation": "Indicates whether the snapshot is encrypted.
", + "smithy.api#xmlName": "encrypted" + } + }, + "OwnerId": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "OwnerId", + "smithy.api#documentation": "The ID of the Amazon Web Services account that owns the EBS snapshot.
", + "smithy.api#xmlName": "ownerId" + } + }, + "Progress": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "Progress", + "smithy.api#documentation": "The progress of the snapshot, as a percentage.
", + "smithy.api#xmlName": "progress" + } + }, + "StartTime": { + "target": "com.amazonaws.ec2#MillisecondDateTime", + "traits": { + "aws.protocols#ec2QueryName": "StartTime", + "smithy.api#documentation": "The time stamp when the snapshot was initiated.
", + "smithy.api#xmlName": "startTime" + } + }, + "State": { + "target": "com.amazonaws.ec2#SnapshotState", + "traits": { + "aws.protocols#ec2QueryName": "Status", + "smithy.api#documentation": "The state of the snapshot.
", + "smithy.api#xmlName": "status" + } + }, + "VolumeId": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "VolumeId", + "smithy.api#documentation": "The ID of the volume that was used to create the snapshot.
", + "smithy.api#xmlName": "volumeId" + } + }, + "VolumeSize": { + "target": "com.amazonaws.ec2#Integer", + "traits": { + "aws.protocols#ec2QueryName": "VolumeSize", + "smithy.api#documentation": "The size of the volume, in GiB.
", + "smithy.api#xmlName": "volumeSize" + } + } + } + }, + "com.amazonaws.ec2#RestoreSnapshotTier": { + "type": "operation", + "input": { + "target": "com.amazonaws.ec2#RestoreSnapshotTierRequest" + }, + "output": { + "target": "com.amazonaws.ec2#RestoreSnapshotTierResult" + }, + "traits": { + "smithy.api#documentation": "Restores an archived Amazon EBS snapshot for use temporarily or permanently, or modifies the restore \n period or restore type for a snapshot that was previously temporarily restored.
\n \nFor more information see \n Restore an archived snapshot and \n modify the restore period or restore type for a temporarily restored snapshot in the Amazon Elastic Compute Cloud User Guide.
" + } + }, + "com.amazonaws.ec2#RestoreSnapshotTierRequest": { + "type": "structure", + "members": { + "SnapshotId": { + "target": "com.amazonaws.ec2#SnapshotId", + "traits": { + "smithy.api#documentation": "The ID of the snapshot to restore.
", + "smithy.api#required": {} + } + }, + "TemporaryRestoreDays": { + "target": "com.amazonaws.ec2#RestoreSnapshotTierRequestTemporaryRestoreDays", + "traits": { + "smithy.api#documentation": "Specifies the number of days for which to temporarily restore an archived snapshot. \n Required for temporary restores only. The snapshot will be automatically re-archived \n after this period.
\nTo temporarily restore an archived snapshot, specify the number of days and omit \n the PermanentRestore parameter or set it to \n false
.
Indicates whether to permanently restore an archived snapshot. To permanently restore \n an archived snapshot, specify true
and omit the \n RestoreSnapshotTierRequest$TemporaryRestoreDays parameter.
Checks whether you have the required permissions for the action, without actually making the request, \n and provides an error response. If you have the required permissions, the error response is DryRunOperation
. \n Otherwise, it is UnauthorizedOperation
.
The ID of the snapshot.
", + "smithy.api#xmlName": "snapshotId" + } + }, + "RestoreStartTime": { + "target": "com.amazonaws.ec2#MillisecondDateTime", + "traits": { + "aws.protocols#ec2QueryName": "RestoreStartTime", + "smithy.api#documentation": "The date and time when the snapshot restore process started.
", + "smithy.api#xmlName": "restoreStartTime" + } + }, + "RestoreDuration": { + "target": "com.amazonaws.ec2#Integer", + "traits": { + "aws.protocols#ec2QueryName": "RestoreDuration", + "smithy.api#documentation": "For temporary restores only. The number of days for which the archived snapshot \n is temporarily restored.
", + "smithy.api#xmlName": "restoreDuration" + } + }, + "IsPermanentRestore": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "aws.protocols#ec2QueryName": "IsPermanentRestore", + "smithy.api#documentation": "Indicates whether the snapshot is permanently restored. true
indicates a permanent \n restore. false
indicates a temporary restore.
The Amazon Resource Name (ARN) of the core network.
", "smithy.api#xmlName": "coreNetworkArn" } } @@ -60491,7 +61289,7 @@ "UserData": { "target": "com.amazonaws.ec2#String", "traits": { - "smithy.api#documentation": "The user data to make available to the instance. For more information, see Running commands\n on your Linux instance at launch (Linux) and Adding User Data (Windows). If you are using a command line tool,\n base64-encoding is performed for you, and you can load the text from a file. Otherwise,\n you must provide base64-encoded text. User data is limited to 16 KB.
" + "smithy.api#documentation": "The user data to make available to the instance. For more information, see Run commands\n on your Linux instance at launch and Run commands on your Windows instance at launch. If you are using a command line tool,\n base64-encoding is performed for you, and you can load the text from a file. Otherwise,\n you must provide base64-encoded text. User data is limited to 16 KB.
" } }, "AdditionalInfo": { @@ -60608,7 +61406,7 @@ "CpuOptions": { "target": "com.amazonaws.ec2#CpuOptionsRequest", "traits": { - "smithy.api#documentation": "The CPU options for the instance. For more information, see Optimizing CPU options in the Amazon EC2 User Guide.
" + "smithy.api#documentation": "The CPU options for the instance. For more information, see Optimize CPU options in the Amazon EC2 User Guide.
" } }, "CapacityReservationSpecification": { @@ -60641,6 +61439,12 @@ "traits": { "smithy.api#documentation": "Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. For more information, \n\t\t\tsee \n\t\t\t What is Amazon Web Services Nitro Enclaves? in the Amazon Web Services Nitro Enclaves User Guide.
\t\t\n\tYou can't enable Amazon Web Services Nitro Enclaves and hibernation on the same instance.
" } + }, + "PrivateDnsNameOptions": { + "target": "com.amazonaws.ec2#PrivateDnsNameOptionsRequest", + "traits": { + "smithy.api#documentation": "The options for the instance hostname. The default values are inherited from the subnet.
" + } } } }, @@ -62178,7 +62982,7 @@ "target": "com.amazonaws.ec2#SendDiagnosticInterruptRequest" }, "traits": { - "smithy.api#documentation": "Sends a diagnostic interrupt to the specified Amazon EC2 instance to trigger a \n\t\t\tkernel panic (on Linux instances), or a \n\t\t\tblue screen/stop error (on Windows \n\t\t\tinstances). For instances based on Intel and AMD processors, the interrupt is \n\t\t\treceived as a non-maskable interrupt (NMI).
\n\t\t\n\t\tIn general, the operating system crashes and reboots when a kernel panic or stop \n\t\t\terror is triggered. The operating system can also be configured to perform diagnostic \n\t\t\ttasks, such as generating a memory dump file, loading a secondary kernel, or \n\t\t\tobtaining a call trace.
\n\t\t\n\t\tBefore sending a diagnostic interrupt to your instance, ensure that its operating \n\t\t\tsystem is configured to perform the required diagnostic tasks.
\n\t\t\n\t\tFor more information about configuring your operating system to generate a crash dump\n\t\t\twhen a kernel panic or stop error occurs, see Send a diagnostic interrupt (Linux instances) or Send a Diagnostic Interrupt (Windows instances).
" + "smithy.api#documentation": "Sends a diagnostic interrupt to the specified Amazon EC2 instance to trigger a \n\t\t\tkernel panic (on Linux instances), or a \n\t\t\tblue screen/stop error (on Windows \n\t\t\tinstances). For instances based on Intel and AMD processors, the interrupt is \n\t\t\treceived as a non-maskable interrupt (NMI).
\n\t\t\n\t\tIn general, the operating system crashes and reboots when a kernel panic or stop \n\t\t\terror is triggered. The operating system can also be configured to perform diagnostic \n\t\t\ttasks, such as generating a memory dump file, loading a secondary kernel, or \n\t\t\tobtaining a call trace.
\n\t\t\n\t\tBefore sending a diagnostic interrupt to your instance, ensure that its operating \n\t\t\tsystem is configured to perform the required diagnostic tasks.
\n\t\t\n\t\tFor more information about configuring your operating system to generate a crash dump\n\t\t\twhen a kernel panic or stop error occurs, see Send a diagnostic interrupt (for advanced users) (Linux instances) or Send a diagnostic interrupt (for advanced users) (Windows instances).
" } }, "com.amazonaws.ec2#SendDiagnosticInterruptRequest": { @@ -62697,6 +63501,22 @@ "smithy.api#documentation": "Any tags assigned to the snapshot.
", "smithy.api#xmlName": "tagSet" } + }, + "StorageTier": { + "target": "com.amazonaws.ec2#StorageTier", + "traits": { + "aws.protocols#ec2QueryName": "StorageTier", + "smithy.api#documentation": "The storage tier in which the snapshot is stored. standard
indicates \n that the snapshot is stored in the standard snapshot storage tier and that it is ready \n for use. archive
indicates that the snapshot is currently archived and that \n it must be restored before it can be used.
Only for archived snapshots that are temporarily restored. Indicates the date and \n time when a temporarily restored snapshot will be automatically re-archived.
", + "smithy.api#xmlName": "restoreExpiryTime" + } } }, "traits": { @@ -62964,6 +63784,63 @@ } } }, + "com.amazonaws.ec2#SnapshotRecycleBinInfo": { + "type": "structure", + "members": { + "SnapshotId": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "SnapshotId", + "smithy.api#documentation": "The ID of the snapshot.
", + "smithy.api#xmlName": "snapshotId" + } + }, + "RecycleBinEnterTime": { + "target": "com.amazonaws.ec2#MillisecondDateTime", + "traits": { + "aws.protocols#ec2QueryName": "RecycleBinEnterTime", + "smithy.api#documentation": "The date and time when the snaphsot entered the Recycle Bin.
", + "smithy.api#xmlName": "recycleBinEnterTime" + } + }, + "RecycleBinExitTime": { + "target": "com.amazonaws.ec2#MillisecondDateTime", + "traits": { + "aws.protocols#ec2QueryName": "RecycleBinExitTime", + "smithy.api#documentation": "The date and time when the snapshot is to be permanently deleted from the Recycle Bin.
", + "smithy.api#xmlName": "recycleBinExitTime" + } + }, + "Description": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "Description", + "smithy.api#documentation": "The description for the snapshot.
", + "smithy.api#xmlName": "description" + } + }, + "VolumeId": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "VolumeId", + "smithy.api#documentation": "The ID of the volume from which the snapshot was created.
", + "smithy.api#xmlName": "volumeId" + } + } + }, + "traits": { + "smithy.api#documentation": "Information about a snapshot that is currently in the Recycle Bin.
" + } + }, + "com.amazonaws.ec2#SnapshotRecycleBinInfoList": { + "type": "list", + "member": { + "target": "com.amazonaws.ec2#SnapshotRecycleBinInfo", + "traits": { + "smithy.api#xmlName": "item" + } + } + }, "com.amazonaws.ec2#SnapshotSet": { "type": "list", "member": { @@ -62988,6 +63865,14 @@ { "value": "error", "name": "error" + }, + { + "value": "recoverable", + "name": "recoverable" + }, + { + "value": "recovering", + "name": "recovering" } ] } @@ -63088,6 +63973,110 @@ "smithy.api#documentation": "Details about the import snapshot task.
" } }, + "com.amazonaws.ec2#SnapshotTierStatus": { + "type": "structure", + "members": { + "SnapshotId": { + "target": "com.amazonaws.ec2#SnapshotId", + "traits": { + "aws.protocols#ec2QueryName": "SnapshotId", + "smithy.api#documentation": "The ID of the snapshot.
", + "smithy.api#xmlName": "snapshotId" + } + }, + "VolumeId": { + "target": "com.amazonaws.ec2#VolumeId", + "traits": { + "aws.protocols#ec2QueryName": "VolumeId", + "smithy.api#documentation": "The ID of the volume from which the snapshot was created.
", + "smithy.api#xmlName": "volumeId" + } + }, + "Status": { + "target": "com.amazonaws.ec2#SnapshotState", + "traits": { + "aws.protocols#ec2QueryName": "Status", + "smithy.api#documentation": "The state of the snapshot.
", + "smithy.api#xmlName": "status" + } + }, + "OwnerId": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "OwnerId", + "smithy.api#documentation": "The ID of the Amazon Web Services account that owns the snapshot.
", + "smithy.api#xmlName": "ownerId" + } + }, + "Tags": { + "target": "com.amazonaws.ec2#TagList", + "traits": { + "aws.protocols#ec2QueryName": "TagSet", + "smithy.api#documentation": "The tags that are assigned to the snapshot.
", + "smithy.api#xmlName": "tagSet" + } + }, + "StorageTier": { + "target": "com.amazonaws.ec2#StorageTier", + "traits": { + "aws.protocols#ec2QueryName": "StorageTier", + "smithy.api#documentation": "The storage tier in which the snapshot is stored. standard
indicates \n that the snapshot is stored in the standard snapshot storage tier and that it is ready \n for use. archive
indicates that the snapshot is currently archived and that \n it must be restored before it can be used.
The date and time when the last archive or restore process was started.
", + "smithy.api#xmlName": "lastTieringStartTime" + } + }, + "LastTieringProgress": { + "target": "com.amazonaws.ec2#Integer", + "traits": { + "aws.protocols#ec2QueryName": "LastTieringProgress", + "smithy.api#documentation": "The progress of the last archive or restore process, as a percentage.
", + "smithy.api#xmlName": "lastTieringProgress" + } + }, + "LastTieringOperationStatus": { + "target": "com.amazonaws.ec2#TieringOperationStatus", + "traits": { + "aws.protocols#ec2QueryName": "LastTieringOperationStatus", + "smithy.api#documentation": "The status of the last archive or restore process.
", + "smithy.api#xmlName": "lastTieringOperationStatus" + } + }, + "LastTieringOperationStatusDetail": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "LastTieringOperationStatusDetail", + "smithy.api#documentation": "A message describing the status of the last archive or restore process.
", + "smithy.api#xmlName": "lastTieringOperationStatusDetail" + } + }, + "ArchivalCompleteTime": { + "target": "com.amazonaws.ec2#MillisecondDateTime", + "traits": { + "aws.protocols#ec2QueryName": "ArchivalCompleteTime", + "smithy.api#documentation": "The date and time when the last archive process was completed.
", + "smithy.api#xmlName": "archivalCompleteTime" + } + }, + "RestoreExpiryTime": { + "target": "com.amazonaws.ec2#MillisecondDateTime", + "traits": { + "aws.protocols#ec2QueryName": "RestoreExpiryTime", + "smithy.api#documentation": "Only for archived snapshots that are temporarily restored. Indicates the date and \n time when a temporarily restored snapshot will be automatically re-archived.
", + "smithy.api#xmlName": "restoreExpiryTime" + } + } + }, + "traits": { + "smithy.api#documentation": "Provides information about a snapshot's storage tier.
" + } + }, "com.amazonaws.ec2#SpotAllocationStrategy": { "type": "string", "traits": { @@ -63126,7 +64115,7 @@ "target": "com.amazonaws.ec2#Integer", "traits": { "aws.protocols#ec2QueryName": "TerminationDelay", - "smithy.api#documentation": "The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot\n Instance after launching a new replacement Spot Instance.
", + "smithy.api#documentation": "The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot\n Instance after launching a new replacement Spot Instance.
\nValid only when ReplacementStrategy
is set to launch-before-terminate
.
Valid values: Minimum value of 120
seconds. Maximum value of 7200
seconds.
Indicates how to allocate the target Spot Instance capacity across the Spot Instance pools specified by\n the EC2 Fleet.
\nIf the allocation strategy is lowest-price
, EC2 Fleet launches instances from\n the Spot Instance pools with the lowest price. This is the default allocation strategy.
If the allocation strategy is diversified
, EC2 Fleet launches instances from all\n of the Spot Instance pools that you specify.
If the allocation strategy is capacity-optimized
(recommended), EC2 Fleet\n launches instances from Spot Instance pools with optimal capacity for the number of instances that\n are launching. To give certain instance types a higher chance of launching first, use\n capacity-optimized-prioritized
. Set a priority for each instance type by\n using the Priority
parameter for LaunchTemplateOverrides
. You can\n assign the same priority to different LaunchTemplateOverrides
. EC2 implements\n the priorities on a best-effort basis, but optimizes for capacity first.\n capacity-optimized-prioritized
is supported only if your fleet uses a\n launch template. Note that if the On-Demand AllocationStrategy
is set to\n prioritized
, the same priority is applied when fulfilling On-Demand\n capacity.
The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance\n pools specified by the EC2 Fleet.
\n\n lowest-price
- EC2 Fleet launches instances from the Spot Instance pools with the lowest\n price.
\n diversified
- EC2 Fleet launches instances from all of the Spot Instance pools that you\n specify.
\n capacity-optimized
(recommended) - EC2 Fleet launches instances from Spot Instance pools\n with optimal capacity for the number of instances that are launching. To give certain\n instance types a higher chance of launching first, use\n capacity-optimized-prioritized
. Set a priority for each instance type by\n using the Priority
parameter for LaunchTemplateOverrides
. You can\n assign the same priority to different LaunchTemplateOverrides
. EC2 implements\n the priorities on a best-effort basis, but optimizes for capacity first.\n capacity-optimized-prioritized
is supported only if your fleet uses a\n launch template. Note that if the On-Demand AllocationStrategy
is set to\n prioritized
, the same priority is applied when fulfilling On-Demand\n capacity.
Default: lowest-price
\n
The behavior when a Spot Instance is interrupted. The default is terminate
.
The behavior when a Spot Instance is interrupted.
\nDefault: terminate
\n
The number of Spot pools across which to allocate your target Spot capacity. Valid only\n when AllocationStrategy is set to\n lowest-price
. EC2 Fleet selects the cheapest Spot pools and evenly allocates\n your target Spot capacity across the number of Spot pools that you specify.
Note that EC2 Fleet attempts to draw Spot Instances from the number of pools that you specify on a\n best effort basis. If a pool runs out of Spot capacity before fulfilling your target\n capacity, EC2 Fleet will continue to fulfill your request by drawing from the next cheapest\n pool. To ensure that your target capacity is met, you might receive Spot Instances from more than\n the number of pools that you specified. Similarly, if most of the pools have no Spot\n capacity, you might receive your full target capacity from fewer than the number of pools\n that you specified.
", + "smithy.api#documentation": "The number of Spot pools across which to allocate your target Spot capacity. Supported\n only when AllocationStrategy
is set to lowest-price
. EC2 Fleet selects\n the cheapest Spot pools and evenly allocates your target Spot capacity across the number of\n Spot pools that you specify.
Note that EC2 Fleet attempts to draw Spot Instances from the number of pools that you specify on a\n best effort basis. If a pool runs out of Spot capacity before fulfilling your target\n capacity, EC2 Fleet will continue to fulfill your request by drawing from the next cheapest\n pool. To ensure that your target capacity is met, you might receive Spot Instances from more than\n the number of pools that you specified. Similarly, if most of the pools have no Spot\n capacity, you might receive your full target capacity from fewer than the number of pools\n that you specified.
", "smithy.api#xmlName": "instancePoolsToUseCount" } }, @@ -64077,7 +65066,7 @@ "target": "com.amazonaws.ec2#Boolean", "traits": { "aws.protocols#ec2QueryName": "SingleInstanceType", - "smithy.api#documentation": "Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.\n Supported only for fleets of type instant
.
Indicates that the fleet uses a single instance type to launch all Spot Instances in the\n fleet.
\nSupported only for fleets of type instant
.
Indicates that the fleet launches all Spot Instances into a single Availability Zone. Supported\n only for fleets of type instant
.
Indicates that the fleet launches all Spot Instances into a single Availability Zone.
\nSupported only for fleets of type instant
.
The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is\n not reached, the fleet launches no instances.
", + "smithy.api#documentation": "The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is\n not reached, the fleet launches no instances.
\nSupported only for fleets of type instant
.
At least one of the following must be specified: SingleAvailabilityZone
|\n SingleInstanceType
\n
Indicates how to allocate the target Spot Instance capacity across the Spot Instance pools specified by\n the EC2 Fleet.
\nIf the allocation strategy is lowest-price
, EC2 Fleet launches instances from\n the Spot Instance pools with the lowest price. This is the default allocation strategy.
If the allocation strategy is diversified
, EC2 Fleet launches instances from all\n of the Spot Instance pools that you specify.
If the allocation strategy is capacity-optimized
(recommended), EC2 Fleet\n launches instances from Spot Instance pools with optimal capacity for the number of instances that\n are launching. To give certain instance types a higher chance of launching first, use\n capacity-optimized-prioritized
. Set a priority for each instance type by\n using the Priority
parameter for LaunchTemplateOverrides
. You can\n assign the same priority to different LaunchTemplateOverrides
. EC2 implements\n the priorities on a best-effort basis, but optimizes for capacity first.\n capacity-optimized-prioritized
is supported only if your fleet uses a\n launch template. Note that if the On-Demand AllocationStrategy
is set to\n prioritized
, the same priority is applied when fulfilling On-Demand\n capacity.
The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools specified by\n the EC2 Fleet.
\n\n lowest-price
- EC2 Fleet launches instances from\n the Spot Instance pools with the lowest price.
\n diversified
- EC2 Fleet launches instances from all\n of the Spot Instance pools that you specify.
\n capacity-optimized
(recommended) - EC2 Fleet\n launches instances from Spot Instance pools with optimal capacity for the number of instances that\n are launching. To give certain instance types a higher chance of launching first, use\n capacity-optimized-prioritized
. Set a priority for each instance type by\n using the Priority
parameter for LaunchTemplateOverrides
. You can\n assign the same priority to different LaunchTemplateOverrides
. EC2 implements\n the priorities on a best-effort basis, but optimizes for capacity first.\n capacity-optimized-prioritized
is supported only if your fleet uses a\n launch template. Note that if the On-Demand AllocationStrategy
is set to\n prioritized
, the same priority is applied when fulfilling On-Demand\n capacity.
Default: lowest-price
\n
The behavior when a Spot Instance is interrupted. The default is terminate
.
The behavior when a Spot Instance is interrupted.
\nDefault: terminate
\n
The number of Spot pools across which to allocate your target Spot capacity. Valid only\n when Spot AllocationStrategy is set to\n lowest-price
. EC2 Fleet selects the cheapest Spot pools and evenly allocates\n your target Spot capacity across the number of Spot pools that you specify.
Note that EC2 Fleet attempts to draw Spot Instances from the number of pools that you specify on a\n best effort basis. If a pool runs out of Spot capacity before fulfilling your target\n capacity, EC2 Fleet will continue to fulfill your request by drawing from the next cheapest\n pool. To ensure that your target capacity is met, you might receive Spot Instances from more than\n the number of pools that you specified. Similarly, if most of the pools have no Spot\n capacity, you might receive your full target capacity from fewer than the number of pools\n that you specified.
" + "smithy.api#documentation": "The number of Spot pools across which to allocate your target Spot capacity. Supported\n only when Spot AllocationStrategy
is set to lowest-price
. EC2 Fleet\n selects the cheapest Spot pools and evenly allocates your target Spot capacity across the\n number of Spot pools that you specify.
Note that EC2 Fleet attempts to draw Spot Instances from the number of pools that you specify on a\n best effort basis. If a pool runs out of Spot capacity before fulfilling your target\n capacity, EC2 Fleet will continue to fulfill your request by drawing from the next cheapest\n pool. To ensure that your target capacity is met, you might receive Spot Instances from more than\n the number of pools that you specified. Similarly, if most of the pools have no Spot\n capacity, you might receive your full target capacity from fewer than the number of pools\n that you specified.
" } }, "SingleInstanceType": { "target": "com.amazonaws.ec2#Boolean", "traits": { - "smithy.api#documentation": "Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.\n Supported only for fleets of type instant
.
Indicates that the fleet uses a single instance type to launch all Spot Instances in the\n fleet.
\nSupported only for fleets of type instant
.
Indicates that the fleet launches all Spot Instances into a single Availability Zone. Supported\n only for fleets of type instant
.
Indicates that the fleet launches all Spot Instances into a single Availability Zone.
\nSupported only for fleets of type instant
.
The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is\n not reached, the fleet launches no instances.
" + "smithy.api#documentation": "The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is\n not reached, the fleet launches no instances.
\nSupported only for fleets of type instant
.
At least one of the following must be specified: SingleAvailabilityZone
|\n SingleInstanceType
\n
Starts an Amazon EBS-backed instance that you've previously stopped.
\nInstances that use Amazon EBS volumes as their root devices can be quickly stopped and\n started. When an instance is stopped, the compute resources are released and you are not\n billed for instance usage. However, your root partition Amazon EBS volume remains and\n continues to persist your data, and you are charged for Amazon EBS volume usage. You can\n restart your instance at any time. Every time you start your instance, Amazon EC2\n charges a one-minute minimum for instance usage, and thereafter charges per second for\n instance usage.
\nBefore stopping an instance, make sure it is in a state from which it can be\n restarted. Stopping an instance does not preserve data stored in RAM.
\nPerforming this operation on an instance that uses an instance store as its root\n device returns an error.
\n \nIf you attempt to start a T3 instance with host
tenancy and the unlimted
\n CPU credit option, the request fails. The unlimited
CPU credit option is not \n supported on Dedicated Hosts. Before you start the instance, either change its CPU credit \n option to standard
, or change its tenancy to default
or dedicated
.
For more information, see Stopping instances in the\n Amazon EC2 User Guide.
" + "smithy.api#documentation": "Starts an Amazon EBS-backed instance that you've previously stopped.
\nInstances that use Amazon EBS volumes as their root devices can be quickly stopped and\n started. When an instance is stopped, the compute resources are released and you are not\n billed for instance usage. However, your root partition Amazon EBS volume remains and\n continues to persist your data, and you are charged for Amazon EBS volume usage. You can\n restart your instance at any time. Every time you start your instance, Amazon EC2\n charges a one-minute minimum for instance usage, and thereafter charges per second for\n instance usage.
\nBefore stopping an instance, make sure it is in a state from which it can be\n restarted. Stopping an instance does not preserve data stored in RAM.
\nPerforming this operation on an instance that uses an instance store as its root\n device returns an error.
\n \nIf you attempt to start a T3 instance with host
tenancy and the unlimted
\n CPU credit option, the request fails. The unlimited
CPU credit option is not \n supported on Dedicated Hosts. Before you start the instance, either change its CPU credit \n option to standard
, or change its tenancy to default
or dedicated
.
For more information, see Stop and start your instance\n in the Amazon EC2 User Guide.
" } }, "com.amazonaws.ec2#StartInstancesRequest": { @@ -64746,7 +65735,7 @@ "target": "com.amazonaws.ec2#StopInstancesResult" }, "traits": { - "smithy.api#documentation": "Stops an Amazon EBS-backed instance.
\nYou can use the Stop action to hibernate an instance if the instance is enabled for\n hibernation and it meets the hibernation\n prerequisites. For more information, see Hibernate your instance in the\n Amazon EC2 User Guide.
\nWe don't charge usage for a stopped instance, or data transfer fees; however, your\n root partition Amazon EBS volume remains and continues to persist your data, and you are\n charged for Amazon EBS volume usage. Every time you start your instance, Amazon EC2\n charges a one-minute minimum for instance usage, and thereafter charges per second for\n instance usage.
\nYou can't stop or hibernate instance store-backed instances. You can't use the Stop\n action to hibernate Spot Instances, but you can specify that Amazon EC2 should hibernate\n Spot Instances when they are interrupted. For more information, see Hibernating interrupted Spot Instances in the Amazon EC2 User Guide.
\nWhen you stop or hibernate an instance, we shut it down. You can restart your instance\n at any time. Before stopping or hibernating an instance, make sure it is in a state from\n which it can be restarted. Stopping an instance does not preserve data stored in RAM,\n but hibernating an instance does preserve data stored in RAM. If an instance cannot\n hibernate successfully, a normal shutdown occurs.
\nStopping and hibernating an instance is different to rebooting or terminating it. For\n example, when you stop or hibernate an instance, the root device and any other devices\n attached to the instance persist. When you terminate an instance, the root device and\n any other devices attached during the instance launch are automatically deleted. For\n more information about the differences between rebooting, stopping, hibernating, and\n terminating instances, see Instance lifecycle\n in the Amazon EC2 User Guide.
\nWhen you stop an instance, we attempt to shut it down forcibly after a short while. If\n your instance appears stuck in the stopping state after a period of time, there may be\n an issue with the underlying host computer. For more information, see Troubleshooting\n stopping your instance in the Amazon EC2 User Guide.
" + "smithy.api#documentation": "Stops an Amazon EBS-backed instance.
\nYou can use the Stop action to hibernate an instance if the instance is enabled for\n hibernation and it meets the hibernation\n prerequisites. For more information, see Hibernate your instance in the\n Amazon EC2 User Guide.
\nWe don't charge usage for a stopped instance, or data transfer fees; however, your\n root partition Amazon EBS volume remains and continues to persist your data, and you are\n charged for Amazon EBS volume usage. Every time you start your instance, Amazon EC2\n charges a one-minute minimum for instance usage, and thereafter charges per second for\n instance usage.
\nYou can't stop or hibernate instance store-backed instances. You can't use the Stop\n action to hibernate Spot Instances, but you can specify that Amazon EC2 should hibernate\n Spot Instances when they are interrupted. For more information, see Hibernating interrupted Spot Instances in the Amazon EC2 User Guide.
\nWhen you stop or hibernate an instance, we shut it down. You can restart your instance\n at any time. Before stopping or hibernating an instance, make sure it is in a state from\n which it can be restarted. Stopping an instance does not preserve data stored in RAM,\n but hibernating an instance does preserve data stored in RAM. If an instance cannot\n hibernate successfully, a normal shutdown occurs.
\nStopping and hibernating an instance is different to rebooting or terminating it. For\n example, when you stop or hibernate an instance, the root device and any other devices\n attached to the instance persist. When you terminate an instance, the root device and\n any other devices attached during the instance launch are automatically deleted. For\n more information about the differences between rebooting, stopping, hibernating, and\n terminating instances, see Instance lifecycle\n in the Amazon EC2 User Guide.
\nWhen you stop an instance, we attempt to shut it down forcibly after a short while. If\n your instance appears stuck in the stopping state after a period of time, there may be\n an issue with the underlying host computer. For more information, see Troubleshoot\n stopping your instance in the Amazon EC2 User Guide.
" } }, "com.amazonaws.ec2#StopInstancesRequest": { @@ -64832,6 +65821,21 @@ "smithy.api#documentation": "Describes a storage location in Amazon S3.
" } }, + "com.amazonaws.ec2#StorageTier": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "archive", + "name": "archive" + }, + { + "value": "standard", + "name": "standard" + } + ] + } + }, "com.amazonaws.ec2#StoreImageTaskResult": { "type": "structure", "members": { @@ -65063,6 +66067,22 @@ "smithy.api#documentation": "Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet \n should return synthetic IPv6 addresses for IPv4-only destinations.
", "smithy.api#xmlName": "enableDns64" } + }, + "Ipv6Native": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "aws.protocols#ec2QueryName": "Ipv6Native", + "smithy.api#documentation": "Indicates whether this is an IPv6 only subnet.
", + "smithy.api#xmlName": "ipv6Native" + } + }, + "PrivateDnsNameOptionsOnLaunch": { + "target": "com.amazonaws.ec2#PrivateDnsNameOptionsOnLaunch", + "traits": { + "aws.protocols#ec2QueryName": "PrivateDnsNameOptionsOnLaunch", + "smithy.api#documentation": "The type of hostnames to assign to instances in the subnet at launch. An instance hostname\n is based on the IPv4 address or ID of the instance.
", + "smithy.api#xmlName": "privateDnsNameOptionsOnLaunch" + } } }, "traits": { @@ -65270,7 +66290,7 @@ "target": "com.amazonaws.ec2#SubnetCidrAssociationId", "traits": { "aws.protocols#ec2QueryName": "AssociationId", - "smithy.api#documentation": "The association ID for the CIDR block.
", + "smithy.api#documentation": "The ID of the association.
", "smithy.api#xmlName": "associationId" } }, @@ -65286,13 +66306,13 @@ "target": "com.amazonaws.ec2#SubnetCidrBlockState", "traits": { "aws.protocols#ec2QueryName": "Ipv6CidrBlockState", - "smithy.api#documentation": "Information about the state of the CIDR block.
", + "smithy.api#documentation": "The state of the CIDR block.
", "smithy.api#xmlName": "ipv6CidrBlockState" } } }, "traits": { - "smithy.api#documentation": "Describes an IPv6 CIDR block associated with a subnet.
" + "smithy.api#documentation": "Describes an association between a subnet and an IPv6 CIDR block.
" } }, "com.amazonaws.ec2#SubnetIpv6CidrBlockAssociationSet": { @@ -65827,6 +66847,17 @@ } } }, + "com.amazonaws.ec2#TargetStorageTier": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "archive", + "name": "archive" + } + ] + } + }, "com.amazonaws.ec2#TelemetryStatus": { "type": "string", "traits": { @@ -66034,6 +67065,49 @@ } } }, + "com.amazonaws.ec2#TieringOperationStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "archival-in-progress", + "name": "archival_in_progress" + }, + { + "value": "archival-completed", + "name": "archival_completed" + }, + { + "value": "archival-failed", + "name": "archival_failed" + }, + { + "value": "temporary-restore-in-progress", + "name": "temporary_restore_in_progress" + }, + { + "value": "temporary-restore-completed", + "name": "temporary_restore_completed" + }, + { + "value": "temporary-restore-failed", + "name": "temporary_restore_failed" + }, + { + "value": "permanent-restore-in-progress", + "name": "permanent_restore_in_progress" + }, + { + "value": "permanent-restore-completed", + "name": "permanent_restore_completed" + }, + { + "value": "permanent-restore-failed", + "name": "permanent_restore_failed" + } + ] + } + }, "com.amazonaws.ec2#TotalLocalStorageGB": { "type": "structure", "members": { @@ -72555,6 +73629,15 @@ ] } }, + "com.amazonaws.ec2#snapshotTierStatusSet": { + "type": "list", + "member": { + "target": "com.amazonaws.ec2#SnapshotTierStatus", + "traits": { + "smithy.api#xmlName": "item" + } + } + }, "com.amazonaws.ec2#totalFpgaMemory": { "type": "integer", "traits": { diff --git a/codegen/sdk-codegen/aws-models/ecr.2015-09-21.json b/codegen/sdk-codegen/aws-models/ecr.2015-09-21.json index 63d195a3ad9..b5860b726f2 100644 --- a/codegen/sdk-codegen/aws-models/ecr.2015-09-21.json +++ b/codegen/sdk-codegen/aws-models/ecr.2015-09-21.json @@ -31,6 +31,24 @@ "shapes": { "com.amazonaws.ecr#AmazonEC2ContainerRegistry_V20150921": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "ECR", + "arnNamespace": "ecr", + "cloudFormationName": "ECR", + "cloudTrailEventSource": "ecr.amazonaws.com", + "endpointPrefix": "api.ecr" + }, + "aws.auth#sigv4": { + "name": "ecr" + }, + "aws.protocols#awsJson1_1": {}, + "smithy.api#documentation": "Amazon Elastic Container Registry (Amazon ECR) is a managed container image registry service. Customers can use the\n familiar Docker CLI, or their preferred client, to push, pull, and manage images. Amazon ECR\n provides a secure, scalable, and reliable registry for your Docker or Open Container\n Initiative (OCI) images. Amazon ECR supports private repositories with resource-based\n permissions using IAM so that specific users or Amazon EC2 instances can access\n repositories and images.
\nAmazon ECR has service endpoints in each supported Region. For more information, see Amazon ECR endpoints in the\n Amazon Web Services General Reference.
", + "smithy.api#title": "Amazon EC2 Container Registry", + "smithy.api#xmlNamespace": { + "uri": "http://ecr.amazonaws.com/doc/2015-09-21/" + } + }, "version": "2015-09-21", "operations": [ { @@ -42,15 +60,24 @@ { "target": "com.amazonaws.ecr#BatchGetImage" }, + { + "target": "com.amazonaws.ecr#BatchGetRepositoryScanningConfiguration" + }, { "target": "com.amazonaws.ecr#CompleteLayerUpload" }, + { + "target": "com.amazonaws.ecr#CreatePullThroughCacheRule" + }, { "target": "com.amazonaws.ecr#CreateRepository" }, { "target": "com.amazonaws.ecr#DeleteLifecyclePolicy" }, + { + "target": "com.amazonaws.ecr#DeletePullThroughCacheRule" + }, { "target": "com.amazonaws.ecr#DeleteRegistryPolicy" }, @@ -69,6 +96,9 @@ { "target": "com.amazonaws.ecr#DescribeImageScanFindings" }, + { + "target": "com.amazonaws.ecr#DescribePullThroughCacheRules" + }, { "target": "com.amazonaws.ecr#DescribeRegistry" }, @@ -90,6 +120,9 @@ { "target": "com.amazonaws.ecr#GetRegistryPolicy" }, + { + "target": "com.amazonaws.ecr#GetRegistryScanningConfiguration" + }, { "target": "com.amazonaws.ecr#GetRepositoryPolicy" }, @@ -117,6 +150,9 @@ { "target": "com.amazonaws.ecr#PutRegistryPolicy" }, + { + "target": "com.amazonaws.ecr#PutRegistryScanningConfiguration" + }, { "target": "com.amazonaws.ecr#PutReplicationConfiguration" }, @@ -138,25 +174,10 @@ { "target": "com.amazonaws.ecr#UploadLayerPart" } - ], - "traits": { - "aws.api#service": { - "sdkId": "ECR", - "arnNamespace": "ecr", - "cloudFormationName": "ECR", - "cloudTrailEventSource": "ecr.amazonaws.com", - "endpointPrefix": "api.ecr" - }, - "aws.auth#sigv4": { - "name": "ecr" - }, - "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "Amazon Elastic Container Registry (Amazon ECR) is a managed container image registry service. Customers can use the\n familiar Docker CLI, or their preferred client, to push, pull, and manage images. Amazon ECR\n provides a secure, scalable, and reliable registry for your Docker or Open Container\n Initiative (OCI) images. Amazon ECR supports private repositories with resource-based\n permissions using IAM so that specific users or Amazon EC2 instances can access\n repositories and images.
\nAmazon ECR has service endpoints in each supported Region. For more information, see Amazon ECR endpoints in the\n Amazon Web Services General Reference.
", - "smithy.api#title": "Amazon EC2 Container Registry", - "smithy.api#xmlNamespace": { - "uri": "http://ecr.amazonaws.com/doc/2015-09-21/" - } - } + ] + }, + "com.amazonaws.ecr#Arch": { + "type": "string" }, "com.amazonaws.ecr#Arn": { "type": "string" @@ -212,6 +233,9 @@ } } }, + "com.amazonaws.ecr#Author": { + "type": "string" + }, "com.amazonaws.ecr#AuthorizationData": { "type": "structure", "members": { @@ -244,12 +268,71 @@ "target": "com.amazonaws.ecr#AuthorizationData" } }, + "com.amazonaws.ecr#AwsEcrContainerImageDetails": { + "type": "structure", + "members": { + "architecture": { + "target": "com.amazonaws.ecr#Arch", + "traits": { + "smithy.api#documentation": "The architecture of the Amazon ECR container image.
" + } + }, + "author": { + "target": "com.amazonaws.ecr#Author", + "traits": { + "smithy.api#documentation": "The image author of the Amazon ECR container image.
" + } + }, + "imageHash": { + "target": "com.amazonaws.ecr#ImageDigest", + "traits": { + "smithy.api#documentation": "The image hash of the Amazon ECR container image.
" + } + }, + "imageTags": { + "target": "com.amazonaws.ecr#ImageTagsList", + "traits": { + "smithy.api#documentation": "The image tags attached to the Amazon ECR container image.
" + } + }, + "platform": { + "target": "com.amazonaws.ecr#Platform", + "traits": { + "smithy.api#documentation": "The platform of the Amazon ECR container image.
" + } + }, + "pushedAt": { + "target": "com.amazonaws.ecr#Date", + "traits": { + "smithy.api#documentation": "The date and time the Amazon ECR container image was pushed.
" + } + }, + "registry": { + "target": "com.amazonaws.ecr#RegistryId", + "traits": { + "smithy.api#documentation": "The registry the Amazon ECR container image belongs to.
" + } + }, + "repositoryName": { + "target": "com.amazonaws.ecr#RepositoryName", + "traits": { + "smithy.api#documentation": "The name of the repository the Amazon ECR container image resides in.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The image details of the Amazon ECR container image.
" + } + }, "com.amazonaws.ecr#Base64": { "type": "string", "traits": { "smithy.api#pattern": "^\\S+$" } }, + "com.amazonaws.ecr#BaseScore": { + "type": "double" + }, "com.amazonaws.ecr#BatchCheckLayerAvailability": { "type": "operation", "input": { @@ -454,6 +537,61 @@ } } }, + "com.amazonaws.ecr#BatchGetRepositoryScanningConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.ecr#BatchGetRepositoryScanningConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.ecr#BatchGetRepositoryScanningConfigurationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.ecr#InvalidParameterException" + }, + { + "target": "com.amazonaws.ecr#RepositoryNotFoundException" + }, + { + "target": "com.amazonaws.ecr#ServerException" + }, + { + "target": "com.amazonaws.ecr#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Gets the scanning configuration for one or more repositories.
" + } + }, + "com.amazonaws.ecr#BatchGetRepositoryScanningConfigurationRequest": { + "type": "structure", + "members": { + "repositoryNames": { + "target": "com.amazonaws.ecr#ScanningConfigurationRepositoryNameList", + "traits": { + "smithy.api#documentation": "One or more repository names to get the scanning configuration for.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.ecr#BatchGetRepositoryScanningConfigurationResponse": { + "type": "structure", + "members": { + "scanningConfigurations": { + "target": "com.amazonaws.ecr#RepositoryScanningConfigurationList", + "traits": { + "smithy.api#documentation": "The scanning configuration for the requested repositories.
" + } + }, + "failures": { + "target": "com.amazonaws.ecr#RepositoryScanningConfigurationFailureList", + "traits": { + "smithy.api#documentation": "Any failures associated with the call.
" + } + } + } + }, "com.amazonaws.ecr#BatchedOperationLayerDigest": { "type": "string", "traits": { @@ -513,7 +651,7 @@ } ], "traits": { - "smithy.api#documentation": "Informs Amazon ECR that the image layer upload has completed for a specified registry,\n repository name, and upload ID. You can optionally provide a sha256
digest\n of the image layer for data validation purposes.
When an image is pushed, the CompleteLayerUpload API is called once per each new image\n layer to verify that the upload has completed.
\nThis operation is used by the Amazon ECR proxy and is not generally used by\n customers for pulling and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
Informs Amazon ECR that the image layer upload has completed for a specified registry,\n repository name, and upload ID. You can optionally provide a sha256
digest\n of the image layer for data validation purposes.
When an image is pushed, the CompleteLayerUpload API is called once per each new image\n layer to verify that the upload has completed.
\nThis operation is used by the Amazon ECR proxy and is not generally used by\n customers for pulling and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
Creates a pull through cache rule. A pull through cache rule provides a way to cache\n images from an external public registry in your Amazon ECR private registry.
" + } + }, + "com.amazonaws.ecr#CreatePullThroughCacheRuleRequest": { + "type": "structure", + "members": { + "ecrRepositoryPrefix": { + "target": "com.amazonaws.ecr#PullThroughCacheRuleRepositoryPrefix", + "traits": { + "smithy.api#documentation": "The repository name prefix to use when caching images from the source registry.
", + "smithy.api#required": {} + } + }, + "upstreamRegistryUrl": { + "target": "com.amazonaws.ecr#Url", + "traits": { + "smithy.api#documentation": "The registry URL of the upstream public registry to use as the source for the pull\n through cache rule.
", + "smithy.api#required": {} + } + }, + "registryId": { + "target": "com.amazonaws.ecr#RegistryId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID associated with the registry to create the pull through cache\n rule for. If you do not specify a registry, the default registry is assumed.
" + } + } + } + }, + "com.amazonaws.ecr#CreatePullThroughCacheRuleResponse": { + "type": "structure", + "members": { + "ecrRepositoryPrefix": { + "target": "com.amazonaws.ecr#PullThroughCacheRuleRepositoryPrefix", + "traits": { + "smithy.api#documentation": "The Amazon ECR repository prefix associated with the pull through cache rule.
" + } + }, + "upstreamRegistryUrl": { + "target": "com.amazonaws.ecr#Url", + "traits": { + "smithy.api#documentation": "The upstream registry URL associated with the pull through cache rule.
" + } + }, + "createdAt": { + "target": "com.amazonaws.ecr#CreationTimestamp", + "traits": { + "smithy.api#documentation": "The date and time, in JavaScript date format, when the pull through cache rule was\n created.
" + } + }, + "registryId": { + "target": "com.amazonaws.ecr#RegistryId", + "traits": { + "smithy.api#documentation": "The registry ID associated with the request.
" + } + } + } + }, "com.amazonaws.ecr#CreateRepository": { "type": "operation", "input": { @@ -618,7 +842,7 @@ "registryId": { "target": "com.amazonaws.ecr#RegistryId", "traits": { - "smithy.api#documentation": "The AWS account ID associated with the registry to create the repository.\n If you do not specify a registry, the default registry is assumed.
" + "smithy.api#documentation": "The Amazon Web Services account ID associated with the registry to create the repository.\n If you do not specify a registry, the default registry is assumed.
" } }, "repositoryName": { @@ -668,6 +892,111 @@ "com.amazonaws.ecr#CreationTimestamp": { "type": "timestamp" }, + "com.amazonaws.ecr#CvssScore": { + "type": "structure", + "members": { + "baseScore": { + "target": "com.amazonaws.ecr#BaseScore", + "traits": { + "smithy.api#documentation": "The base CVSS score used for the finding.
" + } + }, + "scoringVector": { + "target": "com.amazonaws.ecr#ScoringVector", + "traits": { + "smithy.api#documentation": "The vector string of the CVSS score.
" + } + }, + "source": { + "target": "com.amazonaws.ecr#Source", + "traits": { + "smithy.api#documentation": "The source of the CVSS score.
" + } + }, + "version": { + "target": "com.amazonaws.ecr#Version", + "traits": { + "smithy.api#documentation": "The version of CVSS used for the score.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The CVSS score for a finding.
" + } + }, + "com.amazonaws.ecr#CvssScoreAdjustment": { + "type": "structure", + "members": { + "metric": { + "target": "com.amazonaws.ecr#Metric", + "traits": { + "smithy.api#documentation": "The metric used to adjust the CVSS score.
" + } + }, + "reason": { + "target": "com.amazonaws.ecr#Reason", + "traits": { + "smithy.api#documentation": "The reason the CVSS score has been adjustment.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Details on adjustments Amazon Inspector made to the CVSS score for a finding.
" + } + }, + "com.amazonaws.ecr#CvssScoreAdjustmentList": { + "type": "list", + "member": { + "target": "com.amazonaws.ecr#CvssScoreAdjustment" + } + }, + "com.amazonaws.ecr#CvssScoreDetails": { + "type": "structure", + "members": { + "adjustments": { + "target": "com.amazonaws.ecr#CvssScoreAdjustmentList", + "traits": { + "smithy.api#documentation": "An object that contains details about adjustment Amazon Inspector made to the CVSS score.
" + } + }, + "score": { + "target": "com.amazonaws.ecr#Score", + "traits": { + "smithy.api#documentation": "The CVSS score.
" + } + }, + "scoreSource": { + "target": "com.amazonaws.ecr#Source", + "traits": { + "smithy.api#documentation": "The source for the CVSS score.
" + } + }, + "scoringVector": { + "target": "com.amazonaws.ecr#ScoringVector", + "traits": { + "smithy.api#documentation": "The vector for the CVSS score.
" + } + }, + "version": { + "target": "com.amazonaws.ecr#Version", + "traits": { + "smithy.api#documentation": "The CVSS version used in scoring.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Information about the CVSS score.
" + } + }, + "com.amazonaws.ecr#CvssScoreList": { + "type": "list", + "member": { + "target": "com.amazonaws.ecr#CvssScore" + } + }, + "com.amazonaws.ecr#Date": { + "type": "timestamp" + }, "com.amazonaws.ecr#DeleteLifecyclePolicy": { "type": "operation", "input": { @@ -741,6 +1070,79 @@ } } }, + "com.amazonaws.ecr#DeletePullThroughCacheRule": { + "type": "operation", + "input": { + "target": "com.amazonaws.ecr#DeletePullThroughCacheRuleRequest" + }, + "output": { + "target": "com.amazonaws.ecr#DeletePullThroughCacheRuleResponse" + }, + "errors": [ + { + "target": "com.amazonaws.ecr#InvalidParameterException" + }, + { + "target": "com.amazonaws.ecr#PullThroughCacheRuleNotFoundException" + }, + { + "target": "com.amazonaws.ecr#ServerException" + }, + { + "target": "com.amazonaws.ecr#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes a pull through cache rule.
" + } + }, + "com.amazonaws.ecr#DeletePullThroughCacheRuleRequest": { + "type": "structure", + "members": { + "ecrRepositoryPrefix": { + "target": "com.amazonaws.ecr#PullThroughCacheRuleRepositoryPrefix", + "traits": { + "smithy.api#documentation": "The Amazon ECR repository prefix associated with the pull through cache rule to\n delete.
", + "smithy.api#required": {} + } + }, + "registryId": { + "target": "com.amazonaws.ecr#RegistryId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID associated with the registry that contains the pull through cache\n rule. If you do not specify a registry, the default registry is assumed.
" + } + } + } + }, + "com.amazonaws.ecr#DeletePullThroughCacheRuleResponse": { + "type": "structure", + "members": { + "ecrRepositoryPrefix": { + "target": "com.amazonaws.ecr#PullThroughCacheRuleRepositoryPrefix", + "traits": { + "smithy.api#documentation": "The Amazon ECR repository prefix associated with the request.
" + } + }, + "upstreamRegistryUrl": { + "target": "com.amazonaws.ecr#Url", + "traits": { + "smithy.api#documentation": "The upstream registry URL associated with the pull through cache rule.
" + } + }, + "createdAt": { + "target": "com.amazonaws.ecr#CreationTimestamp", + "traits": { + "smithy.api#documentation": "The timestamp associated with the pull through cache rule.
" + } + }, + "registryId": { + "target": "com.amazonaws.ecr#RegistryId", + "traits": { + "smithy.api#documentation": "The registry ID associated with the request.
" + } + } + } + }, "com.amazonaws.ecr#DeleteRegistryPolicy": { "type": "operation", "input": { @@ -1015,6 +1417,9 @@ }, { "target": "com.amazonaws.ecr#ServerException" + }, + { + "target": "com.amazonaws.ecr#ValidationException" } ], "traits": { @@ -1212,24 +1617,101 @@ "filter": { "target": "com.amazonaws.ecr#DescribeImagesFilter", "traits": { - "smithy.api#documentation": "The filter key and value with which to filter your DescribeImages
\n results.
The filter key and value with which to filter your DescribeImages
\n results.
A list of ImageDetail objects that contain data about the\n image.
" + } + }, + "nextToken": { + "target": "com.amazonaws.ecr#NextToken", + "traits": { + "smithy.api#documentation": "The nextToken
value to include in a future DescribeImages
\n request. When the results of a DescribeImages
request exceed\n maxResults
, this value can be used to retrieve the next page of\n results. This value is null
when there are no more results to\n return.
Returns the pull through cache rules for a registry.
", + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults" + } + } + }, + "com.amazonaws.ecr#DescribePullThroughCacheRulesRequest": { + "type": "structure", + "members": { + "registryId": { + "target": "com.amazonaws.ecr#RegistryId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID associated with the registry to return the pull through cache\n rules for. If you do not specify a registry, the default registry is assumed.
" + } + }, + "ecrRepositoryPrefixes": { + "target": "com.amazonaws.ecr#PullThroughCacheRuleRepositoryPrefixList", + "traits": { + "smithy.api#documentation": "The Amazon ECR repository prefixes associated with the pull through cache rules to return.\n If no repository prefix value is specified, all pull through cache rules are\n returned.
" + } + }, + "nextToken": { + "target": "com.amazonaws.ecr#NextToken", + "traits": { + "smithy.api#documentation": "The nextToken
value returned from a previous paginated\n DescribePullThroughCacheRulesRequest
request where\n maxResults
was used and the results exceeded the value of that\n parameter. Pagination continues from the end of the previous results that returned the\n nextToken
value. This value is null when there are no more results to\n return.
The maximum number of pull through cache rules returned by\n DescribePullThroughCacheRulesRequest
in paginated output. When this\n parameter is used, DescribePullThroughCacheRulesRequest
only returns\n maxResults
results in a single page along with a nextToken
\n response element. The remaining results of the initial request can be seen by sending\n another DescribePullThroughCacheRulesRequest
request with the returned\n nextToken
value. This value can be between 1 and 1000. If this\n parameter is not used, then DescribePullThroughCacheRulesRequest
returns up\n to 100 results and a nextToken
value, if applicable.
A list of ImageDetail objects that contain data about the\n image.
" + "smithy.api#documentation": "The details of the pull through cache rules.
" } }, "nextToken": { "target": "com.amazonaws.ecr#NextToken", "traits": { - "smithy.api#documentation": "The nextToken
value to include in a future DescribeImages
\n request. When the results of a DescribeImages
request exceed\n maxResults
, this value can be used to retrieve the next page of\n results. This value is null
when there are no more results to\n return.
The nextToken
value to include in a future\n DescribePullThroughCacheRulesRequest
request. When the results of a\n DescribePullThroughCacheRulesRequest
request exceed\n maxResults
, this value can be used to retrieve the next page of\n results. This value is null when there are no more results to return.
The encryption type to use.
\nIf you use the KMS
encryption type, the contents of the repository will\n be encrypted using server-side encryption with Key Management Service key stored in KMS. When you\n use KMS to encrypt your data, you can either use the default Amazon Web Services managed KMS key\n for Amazon ECR, or specify your own KMS key, which you already created. For more\n information, see Protecting data using server-side\n encryption with an KMS key stored in Key Management Service (SSE-KMS) in the\n Amazon Simple Storage Service Console Developer Guide..
If you use the AES256
encryption type, Amazon ECR uses server-side encryption\n with Amazon S3-managed encryption keys which encrypts the images in the repository using an\n AES-256 encryption algorithm. For more information, see Protecting data using\n server-side encryption with Amazon S3-managed encryption keys (SSE-S3) in the\n Amazon Simple Storage Service Console Developer Guide..
The encryption type to use.
\nIf you use the KMS
encryption type, the contents of the repository will\n be encrypted using server-side encryption with Key Management Service key stored in KMS. When you\n use KMS to encrypt your data, you can either use the default Amazon Web Services managed KMS key\n for Amazon ECR, or specify your own KMS key, which you already created. For more\n information, see Protecting data using server-side\n encryption with an KMS key stored in Key Management Service (SSE-KMS) in the\n Amazon Simple Storage Service Console Developer Guide.
If you use the AES256
encryption type, Amazon ECR uses server-side encryption\n with Amazon S3-managed encryption keys which encrypts the images in the repository using an\n AES-256 encryption algorithm. For more information, see Protecting data using\n server-side encryption with Amazon S3-managed encryption keys (SSE-S3) in the\n Amazon Simple Storage Service Console Developer Guide.
The Amazon Web Services account ID associated with the image.
" + } + }, + "description": { + "target": "com.amazonaws.ecr#FindingDescription", + "traits": { + "smithy.api#documentation": "The description of the finding.
" + } + }, + "findingArn": { + "target": "com.amazonaws.ecr#FindingArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Number (ARN) of the finding.
" + } + }, + "firstObservedAt": { + "target": "com.amazonaws.ecr#Date", + "traits": { + "smithy.api#documentation": "The date and time that the finding was first observed.
" + } + }, + "lastObservedAt": { + "target": "com.amazonaws.ecr#Date", + "traits": { + "smithy.api#documentation": "The date and time that the finding was last observed.
" + } + }, + "packageVulnerabilityDetails": { + "target": "com.amazonaws.ecr#PackageVulnerabilityDetails", + "traits": { + "smithy.api#documentation": "An object that contains the details of a package vulnerability finding.
" + } + }, + "remediation": { + "target": "com.amazonaws.ecr#Remediation", + "traits": { + "smithy.api#documentation": "An object that contains the details about how to remediate a finding.
" + } + }, + "resources": { + "target": "com.amazonaws.ecr#ResourceList", + "traits": { + "smithy.api#documentation": "Contains information on the resources involved in a finding.
" + } + }, + "score": { + "target": "com.amazonaws.ecr#Score", + "traits": { + "smithy.api#documentation": "The Amazon Inspector score given to the finding.
" + } + }, + "scoreDetails": { + "target": "com.amazonaws.ecr#ScoreDetails", + "traits": { + "smithy.api#documentation": "An object that contains details of the Amazon Inspector score.
" + } + }, + "severity": { + "target": "com.amazonaws.ecr#Severity", + "traits": { + "smithy.api#documentation": "The severity of the finding.
" + } + }, + "status": { + "target": "com.amazonaws.ecr#Status", + "traits": { + "smithy.api#documentation": "The status of the finding.
" + } + }, + "title": { + "target": "com.amazonaws.ecr#Title", + "traits": { + "smithy.api#documentation": "The title of the finding.
" + } + }, + "type": { + "target": "com.amazonaws.ecr#Type", + "traits": { + "smithy.api#documentation": "The type of the finding.
" + } + }, + "updatedAt": { + "target": "com.amazonaws.ecr#Date", + "traits": { + "smithy.api#documentation": "The date and time the finding was last updated at.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The details of an enhanced image scan. This is returned when enhanced scanning is\n enabled for your private registry.
" + } + }, + "com.amazonaws.ecr#EnhancedImageScanFindingList": { + "type": "list", + "member": { + "target": "com.amazonaws.ecr#EnhancedImageScanFinding" + } + }, + "com.amazonaws.ecr#Epoch": { + "type": "integer", + "traits": { + "smithy.api#box": {} + } + }, "com.amazonaws.ecr#EvaluationTimestamp": { "type": "timestamp" }, @@ -1413,6 +2005,12 @@ "com.amazonaws.ecr#ExpirationTimestamp": { "type": "timestamp" }, + "com.amazonaws.ecr#FilePath": { + "type": "string" + }, + "com.amazonaws.ecr#FindingArn": { + "type": "string" + }, "com.amazonaws.ecr#FindingDescription": { "type": "string" }, @@ -1859,6 +2457,50 @@ } } }, + "com.amazonaws.ecr#GetRegistryScanningConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.ecr#GetRegistryScanningConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.ecr#GetRegistryScanningConfigurationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.ecr#InvalidParameterException" + }, + { + "target": "com.amazonaws.ecr#ServerException" + }, + { + "target": "com.amazonaws.ecr#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Retrieves the scanning configuration for a registry.
" + } + }, + "com.amazonaws.ecr#GetRegistryScanningConfigurationRequest": { + "type": "structure", + "members": {} + }, + "com.amazonaws.ecr#GetRegistryScanningConfigurationResponse": { + "type": "structure", + "members": { + "registryId": { + "target": "com.amazonaws.ecr#RegistryId", + "traits": { + "smithy.api#documentation": "The ID of the registry.
" + } + }, + "scanningConfiguration": { + "target": "com.amazonaws.ecr#RegistryScanningConfiguration", + "traits": { + "smithy.api#documentation": "The scanning configuration for the registry.
" + } + } + } + }, "com.amazonaws.ecr#GetRepositoryPolicy": { "type": "operation", "input": { @@ -2229,7 +2871,7 @@ "registryId": { "target": "com.amazonaws.ecr#RegistryId", "traits": { - "smithy.api#documentation": "The AWS account ID associated with the registry to which the image belongs.
" + "smithy.api#documentation": "The Amazon Web Services account ID associated with the registry to which the image belongs.
" } }, "status": { @@ -2314,16 +2956,22 @@ "smithy.api#documentation": "The time when the vulnerability data was last scanned.
" } }, + "findingSeverityCounts": { + "target": "com.amazonaws.ecr#FindingSeverityCounts", + "traits": { + "smithy.api#documentation": "The image vulnerability counts, sorted by severity.
" + } + }, "findings": { "target": "com.amazonaws.ecr#ImageScanFindingList", "traits": { "smithy.api#documentation": "The findings from the image scan.
" } }, - "findingSeverityCounts": { - "target": "com.amazonaws.ecr#FindingSeverityCounts", + "enhancedFindings": { + "target": "com.amazonaws.ecr#EnhancedImageScanFindingList", "traits": { - "smithy.api#documentation": "The image vulnerability counts, sorted by severity.
" + "smithy.api#documentation": "Details about the enhanced scan findings from Amazon Inspector.
" } } }, @@ -2439,6 +3087,12 @@ ] } }, + "com.amazonaws.ecr#ImageTagsList": { + "type": "list", + "member": { + "target": "com.amazonaws.ecr#ImageTag" + } + }, "com.amazonaws.ecr#InitiateLayerUpload": { "type": "operation", "input": { @@ -2462,7 +3116,7 @@ } ], "traits": { - "smithy.api#documentation": "Notifies Amazon ECR that you intend to upload an image layer.
\nWhen an image is pushed, the InitiateLayerUpload API is called once per image layer\n that has not already been uploaded. Whether or not an image layer has been uploaded is\n determined by the BatchCheckLayerAvailability API action.
\nThis operation is used by the Amazon ECR proxy and is not generally used by\n customers for pulling and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
Notifies Amazon ECR that you intend to upload an image layer.
\nWhen an image is pushed, the InitiateLayerUpload API is called once per image layer\n that has not already been uploaded. Whether or not an image layer has been uploaded is\n determined by the BatchCheckLayerAvailability API action.
\nThis operation is used by the Amazon ECR proxy and is not generally used by\n customers for pulling and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
List the tags for an Amazon ECR resource.
" } }, - "com.amazonaws.ecr#ListTagsForResourceRequest": { + "com.amazonaws.ecr#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.ecr#Arn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) that identifies the resource for which to list the tags. Currently, the\n only supported resource is an Amazon ECR repository.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.ecr#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "tags": { + "target": "com.amazonaws.ecr#TagList", + "traits": { + "smithy.api#documentation": "The tags for the resource.
" + } + } + } + }, + "com.amazonaws.ecr#MaxResults": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 1000 + } + } + }, + "com.amazonaws.ecr#MediaType": { + "type": "string" + }, + "com.amazonaws.ecr#MediaTypeList": { + "type": "list", + "member": { + "target": "com.amazonaws.ecr#MediaType" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.ecr#Metric": { + "type": "string" + }, + "com.amazonaws.ecr#NextToken": { + "type": "string" + }, + "com.amazonaws.ecr#PackageManager": { + "type": "string" + }, + "com.amazonaws.ecr#PackageVulnerabilityDetails": { + "type": "structure", + "members": { + "cvss": { + "target": "com.amazonaws.ecr#CvssScoreList", + "traits": { + "smithy.api#documentation": "An object that contains details about the CVSS score of a finding.
" + } + }, + "referenceUrls": { + "target": "com.amazonaws.ecr#ReferenceUrlsList", + "traits": { + "smithy.api#documentation": "One or more URLs that contain details about this vulnerability type.
" + } + }, + "relatedVulnerabilities": { + "target": "com.amazonaws.ecr#RelatedVulnerabilitiesList", + "traits": { + "smithy.api#documentation": "One or more vulnerabilities related to the one identified in this finding.
" + } + }, + "source": { + "target": "com.amazonaws.ecr#Source", + "traits": { + "smithy.api#documentation": "The source of the vulnerability information.
" + } + }, + "sourceUrl": { + "target": "com.amazonaws.ecr#Url", + "traits": { + "smithy.api#documentation": "A URL to the source of the vulnerability information.
" + } + }, + "vendorCreatedAt": { + "target": "com.amazonaws.ecr#Date", + "traits": { + "smithy.api#documentation": "The date and time that this vulnerability was first added to the vendor's\n database.
" + } + }, + "vendorSeverity": { + "target": "com.amazonaws.ecr#Severity", + "traits": { + "smithy.api#documentation": "The severity the vendor has given to this vulnerability type.
" + } + }, + "vendorUpdatedAt": { + "target": "com.amazonaws.ecr#Date", + "traits": { + "smithy.api#documentation": "The date and time the vendor last updated this vulnerability in their database.
" + } + }, + "vulnerabilityId": { + "target": "com.amazonaws.ecr#VulnerabilityId", + "traits": { + "smithy.api#documentation": "The ID given to this vulnerability.
" + } + }, + "vulnerablePackages": { + "target": "com.amazonaws.ecr#VulnerablePackagesList", + "traits": { + "smithy.api#documentation": "The packages impacted by this vulnerability.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Information about a package vulnerability finding.
" + } + }, + "com.amazonaws.ecr#PartSize": { + "type": "long", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 0 + } + } + }, + "com.amazonaws.ecr#Platform": { + "type": "string" + }, + "com.amazonaws.ecr#ProxyEndpoint": { + "type": "string" + }, + "com.amazonaws.ecr#PullThroughCacheRule": { + "type": "structure", + "members": { + "ecrRepositoryPrefix": { + "target": "com.amazonaws.ecr#PullThroughCacheRuleRepositoryPrefix", + "traits": { + "smithy.api#documentation": "The Amazon ECR repository prefix associated with the pull through cache rule.
" + } + }, + "upstreamRegistryUrl": { + "target": "com.amazonaws.ecr#Url", + "traits": { + "smithy.api#documentation": "The upstream registry URL associated with the pull through cache rule.
" + } + }, + "createdAt": { + "target": "com.amazonaws.ecr#CreationTimestamp", + "traits": { + "smithy.api#documentation": "The date and time the pull through cache was created.
" + } + }, + "registryId": { + "target": "com.amazonaws.ecr#RegistryId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID associated with the registry the pull through cache rule is\n associated with.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The details of a pull through cache rule.
" + } + }, + "com.amazonaws.ecr#PullThroughCacheRuleAlreadyExistsException": { "type": "structure", "members": { - "resourceArn": { - "target": "com.amazonaws.ecr#Arn", - "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) that identifies the resource for which to list the tags. Currently, the\n only supported resource is an Amazon ECR repository.
", - "smithy.api#required": {} - } + "message": { + "target": "com.amazonaws.ecr#ExceptionMessage" } + }, + "traits": { + "smithy.api#documentation": "A pull through cache rule with these settings already exists for the private\n registry.
", + "smithy.api#error": "client" } }, - "com.amazonaws.ecr#ListTagsForResourceResponse": { + "com.amazonaws.ecr#PullThroughCacheRuleList": { + "type": "list", + "member": { + "target": "com.amazonaws.ecr#PullThroughCacheRule" + } + }, + "com.amazonaws.ecr#PullThroughCacheRuleNotFoundException": { "type": "structure", "members": { - "tags": { - "target": "com.amazonaws.ecr#TagList", - "traits": { - "smithy.api#documentation": "The tags for the resource.
" - } + "message": { + "target": "com.amazonaws.ecr#ExceptionMessage" } + }, + "traits": { + "smithy.api#documentation": "The pull through cache rule was not found. Specify a valid pull through cache rule and\n try again.
", + "smithy.api#error": "client" } }, - "com.amazonaws.ecr#MaxResults": { - "type": "integer", + "com.amazonaws.ecr#PullThroughCacheRuleRepositoryPrefix": { + "type": "string", "traits": { - "smithy.api#box": {}, - "smithy.api#range": { - "min": 1, - "max": 1000 - } + "smithy.api#length": { + "min": 2, + "max": 20 + }, + "smithy.api#pattern": "^[a-z0-9]+(?:[._-][a-z0-9]+)*$" } }, - "com.amazonaws.ecr#MediaType": { - "type": "string" - }, - "com.amazonaws.ecr#MediaTypeList": { + "com.amazonaws.ecr#PullThroughCacheRuleRepositoryPrefixList": { "type": "list", "member": { - "target": "com.amazonaws.ecr#MediaType" + "target": "com.amazonaws.ecr#PullThroughCacheRuleRepositoryPrefix" }, "traits": { "smithy.api#length": { @@ -3162,21 +3992,6 @@ } } }, - "com.amazonaws.ecr#NextToken": { - "type": "string" - }, - "com.amazonaws.ecr#PartSize": { - "type": "long", - "traits": { - "smithy.api#box": {}, - "smithy.api#range": { - "min": 0 - } - } - }, - "com.amazonaws.ecr#ProxyEndpoint": { - "type": "string" - }, "com.amazonaws.ecr#PushTimestamp": { "type": "timestamp" }, @@ -3295,6 +4110,9 @@ }, { "target": "com.amazonaws.ecr#ServerException" + }, + { + "target": "com.amazonaws.ecr#ValidationException" } ], "traits": { @@ -3543,6 +4361,57 @@ } } }, + "com.amazonaws.ecr#PutRegistryScanningConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.ecr#PutRegistryScanningConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.ecr#PutRegistryScanningConfigurationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.ecr#InvalidParameterException" + }, + { + "target": "com.amazonaws.ecr#ServerException" + }, + { + "target": "com.amazonaws.ecr#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Creates or updates the scanning configuration for your private registry.
" + } + }, + "com.amazonaws.ecr#PutRegistryScanningConfigurationRequest": { + "type": "structure", + "members": { + "scanType": { + "target": "com.amazonaws.ecr#ScanType", + "traits": { + "smithy.api#documentation": "The scanning type to set for the registry.
\nBy default, the BASIC
scan type is used. When basic scanning is set, you\n may specify filters to determine which individual repositories, or all repositories, are\n scanned when new images are pushed. Alternatively, you can do manual scans of images\n with basic scanning.
When the ENHANCED
scan type is set, Amazon Inspector provides automated, continuous\n scanning of all repositories in your registry.
The scanning rules to use for the registry. A scanning rule is used to determine which\n repository filters are used and at what frequency scanning will occur.
" + } + } + } + }, + "com.amazonaws.ecr#PutRegistryScanningConfigurationResponse": { + "type": "structure", + "members": { + "registryScanningConfiguration": { + "target": "com.amazonaws.ecr#RegistryScanningConfiguration", + "traits": { + "smithy.api#documentation": "The scanning configuration for your registry.
" + } + } + } + }, "com.amazonaws.ecr#PutReplicationConfiguration": { "type": "operation", "input": { @@ -3589,6 +4458,38 @@ } } }, + "com.amazonaws.ecr#Reason": { + "type": "string" + }, + "com.amazonaws.ecr#Recommendation": { + "type": "structure", + "members": { + "url": { + "target": "com.amazonaws.ecr#Url", + "traits": { + "smithy.api#documentation": "The URL address to the CVE remediation recommendations.
" + } + }, + "text": { + "target": "com.amazonaws.ecr#RecommendationText", + "traits": { + "smithy.api#documentation": "The recommended course of action to remediate the finding.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Details about the recommended course of action to remediate the finding.
" + } + }, + "com.amazonaws.ecr#RecommendationText": { + "type": "string" + }, + "com.amazonaws.ecr#ReferenceUrlsList": { + "type": "list", + "member": { + "target": "com.amazonaws.ecr#Url" + } + }, "com.amazonaws.ecr#ReferencedImagesNotFoundException": { "type": "structure", "members": { @@ -3638,6 +4539,86 @@ } } }, + "com.amazonaws.ecr#RegistryScanningConfiguration": { + "type": "structure", + "members": { + "scanType": { + "target": "com.amazonaws.ecr#ScanType", + "traits": { + "smithy.api#documentation": "The type of scanning configured for the registry.
" + } + }, + "rules": { + "target": "com.amazonaws.ecr#RegistryScanningRuleList", + "traits": { + "smithy.api#documentation": "The scanning rules associated with the registry.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The scanning configuration for a private registry.
" + } + }, + "com.amazonaws.ecr#RegistryScanningRule": { + "type": "structure", + "members": { + "scanFrequency": { + "target": "com.amazonaws.ecr#ScanFrequency", + "traits": { + "smithy.api#documentation": "The frequency that scans are performed at for a private registry.
", + "smithy.api#required": {} + } + }, + "repositoryFilters": { + "target": "com.amazonaws.ecr#ScanningRepositoryFilterList", + "traits": { + "smithy.api#documentation": "The repository filters associated with the scanning configuration for a private\n registry.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The details of a scanning rule for a private registry.
" + } + }, + "com.amazonaws.ecr#RegistryScanningRuleList": { + "type": "list", + "member": { + "target": "com.amazonaws.ecr#RegistryScanningRule" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2 + } + } + }, + "com.amazonaws.ecr#RelatedVulnerabilitiesList": { + "type": "list", + "member": { + "target": "com.amazonaws.ecr#RelatedVulnerability" + } + }, + "com.amazonaws.ecr#RelatedVulnerability": { + "type": "string" + }, + "com.amazonaws.ecr#Release": { + "type": "string" + }, + "com.amazonaws.ecr#Remediation": { + "type": "structure", + "members": { + "recommendation": { + "target": "com.amazonaws.ecr#Recommendation", + "traits": { + "smithy.api#documentation": "An object that contains information about the recommended course of action to\n remediate the finding.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Information on how to remediate a finding.
" + } + }, "com.amazonaws.ecr#ReplicationConfiguration": { "type": "structure", "members": { @@ -3878,73 +4859,223 @@ "min": 2, "max": 256 }, - "smithy.api#pattern": "^(?:[a-z0-9]+(?:[._-][a-z0-9]+)*/)*[a-z0-9]+(?:[._-][a-z0-9]+)*$" - } - }, - "com.amazonaws.ecr#RepositoryNameList": { - "type": "list", - "member": { - "target": "com.amazonaws.ecr#RepositoryName" + "smithy.api#pattern": "^(?:[a-z0-9]+(?:[._-][a-z0-9]+)*/)*[a-z0-9]+(?:[._-][a-z0-9]+)*$" + } + }, + "com.amazonaws.ecr#RepositoryNameList": { + "type": "list", + "member": { + "target": "com.amazonaws.ecr#RepositoryName" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.ecr#RepositoryNotEmptyException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.ecr#ExceptionMessage", + "traits": { + "smithy.api#documentation": "The error message associated with the exception.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The specified repository contains images. To delete a repository that contains images,\n you must force the deletion with the force
parameter.
The error message associated with the exception.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The specified repository could not be found. Check the spelling of the specified\n repository and ensure that you are performing operations on the correct registry.
", + "smithy.api#error": "client" + } + }, + "com.amazonaws.ecr#RepositoryPolicyNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.ecr#ExceptionMessage", + "traits": { + "smithy.api#documentation": "The error message associated with the exception.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The specified repository and registry combination does not have an associated\n repository policy.
", + "smithy.api#error": "client" + } + }, + "com.amazonaws.ecr#RepositoryPolicyText": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 10240 + } + } + }, + "com.amazonaws.ecr#RepositoryScanningConfiguration": { + "type": "structure", + "members": { + "repositoryArn": { + "target": "com.amazonaws.ecr#Arn", + "traits": { + "smithy.api#documentation": "The ARN of the repository.
" + } + }, + "repositoryName": { + "target": "com.amazonaws.ecr#RepositoryName", + "traits": { + "smithy.api#documentation": "The name of the repository.
" + } + }, + "scanOnPush": { + "target": "com.amazonaws.ecr#ScanOnPushFlag", + "traits": { + "smithy.api#documentation": "Whether or not scan on push is configured for the repository.
" + } + }, + "scanFrequency": { + "target": "com.amazonaws.ecr#ScanFrequency", + "traits": { + "smithy.api#documentation": "The scan frequency for the repository.
" + } + }, + "appliedScanFilters": { + "target": "com.amazonaws.ecr#ScanningRepositoryFilterList", + "traits": { + "smithy.api#documentation": "The scan filters applied to the repository.
" + } + } }, "traits": { - "smithy.api#length": { - "min": 1, - "max": 100 - } + "smithy.api#documentation": "The details of the scanning configuration for a repository.
" } }, - "com.amazonaws.ecr#RepositoryNotEmptyException": { + "com.amazonaws.ecr#RepositoryScanningConfigurationFailure": { "type": "structure", "members": { - "message": { - "target": "com.amazonaws.ecr#ExceptionMessage", + "repositoryName": { + "target": "com.amazonaws.ecr#RepositoryName", "traits": { - "smithy.api#documentation": "The error message associated with the exception.
" + "smithy.api#documentation": "The name of the repository.
" + } + }, + "failureCode": { + "target": "com.amazonaws.ecr#ScanningConfigurationFailureCode", + "traits": { + "smithy.api#documentation": "The failure code.
" + } + }, + "failureReason": { + "target": "com.amazonaws.ecr#ScanningConfigurationFailureReason", + "traits": { + "smithy.api#documentation": "The reason for the failure.
" } } }, "traits": { - "smithy.api#documentation": "The specified repository contains images. To delete a repository that contains images,\n you must force the deletion with the force
parameter.
The details about any failures associated with the scanning configuration of a\n repository.
" } }, - "com.amazonaws.ecr#RepositoryNotFoundException": { + "com.amazonaws.ecr#RepositoryScanningConfigurationFailureList": { + "type": "list", + "member": { + "target": "com.amazonaws.ecr#RepositoryScanningConfigurationFailure" + } + }, + "com.amazonaws.ecr#RepositoryScanningConfigurationList": { + "type": "list", + "member": { + "target": "com.amazonaws.ecr#RepositoryScanningConfiguration" + } + }, + "com.amazonaws.ecr#Resource": { "type": "structure", "members": { - "message": { - "target": "com.amazonaws.ecr#ExceptionMessage", + "details": { + "target": "com.amazonaws.ecr#ResourceDetails", "traits": { - "smithy.api#documentation": "The error message associated with the exception.
" + "smithy.api#documentation": "An object that contains details about the resource involved in a finding.
" + } + }, + "id": { + "target": "com.amazonaws.ecr#ResourceId", + "traits": { + "smithy.api#documentation": "The ID of the resource.
" + } + }, + "tags": { + "target": "com.amazonaws.ecr#Tags", + "traits": { + "smithy.api#documentation": "The tags attached to the resource.
" + } + }, + "type": { + "target": "com.amazonaws.ecr#Type", + "traits": { + "smithy.api#documentation": "The type of resource.
" } } }, "traits": { - "smithy.api#documentation": "The specified repository could not be found. Check the spelling of the specified\n repository and ensure that you are performing operations on the correct registry.
", - "smithy.api#error": "client" + "smithy.api#documentation": "Details about the resource involved in a finding.
" } }, - "com.amazonaws.ecr#RepositoryPolicyNotFoundException": { + "com.amazonaws.ecr#ResourceDetails": { "type": "structure", "members": { - "message": { - "target": "com.amazonaws.ecr#ExceptionMessage", + "awsEcrContainerImage": { + "target": "com.amazonaws.ecr#AwsEcrContainerImageDetails", "traits": { - "smithy.api#documentation": "The error message associated with the exception.
" + "smithy.api#documentation": "An object that contains details about the Amazon ECR container image involved in the\n finding.
" } } }, "traits": { - "smithy.api#documentation": "The specified repository and registry combination does not have an associated\n repository policy.
", - "smithy.api#error": "client" + "smithy.api#documentation": "Contains details about the resource involved in the finding.
" } }, - "com.amazonaws.ecr#RepositoryPolicyText": { + "com.amazonaws.ecr#ResourceId": { + "type": "string" + }, + "com.amazonaws.ecr#ResourceList": { + "type": "list", + "member": { + "target": "com.amazonaws.ecr#Resource" + } + }, + "com.amazonaws.ecr#ScanFrequency": { "type": "string", "traits": { - "smithy.api#length": { - "min": 0, - "max": 10240 - } + "smithy.api#enum": [ + { + "value": "SCAN_ON_PUSH", + "name": "SCAN_ON_PUSH" + }, + { + "value": "CONTINUOUS_SCAN", + "name": "CONTINUOUS_SCAN" + }, + { + "value": "MANUAL", + "name": "MANUAL" + } + ] } }, "com.amazonaws.ecr#ScanNotFoundException": { @@ -3977,6 +5108,26 @@ { "value": "FAILED", "name": "FAILED" + }, + { + "value": "UNSUPPORTED_IMAGE", + "name": "UNSUPPORTED_IMAGE" + }, + { + "value": "ACTIVE", + "name": "ACTIVE" + }, + { + "value": "PENDING", + "name": "PENDING" + }, + { + "value": "SCAN_ELIGIBILITY_EXPIRED", + "name": "SCAN_ELIGIBILITY_EXPIRED" + }, + { + "value": "FINDINGS_UNAVAILABLE", + "name": "FINDINGS_UNAVAILABLE" } ] } @@ -3987,6 +5138,122 @@ "com.amazonaws.ecr#ScanTimestamp": { "type": "timestamp" }, + "com.amazonaws.ecr#ScanType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "BASIC", + "name": "BASIC" + }, + { + "value": "ENHANCED", + "name": "ENHANCED" + } + ] + } + }, + "com.amazonaws.ecr#ScanningConfigurationFailureCode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "REPOSITORY_NOT_FOUND", + "name": "REPOSITORY_NOT_FOUND" + } + ] + } + }, + "com.amazonaws.ecr#ScanningConfigurationFailureReason": { + "type": "string" + }, + "com.amazonaws.ecr#ScanningConfigurationRepositoryNameList": { + "type": "list", + "member": { + "target": "com.amazonaws.ecr#RepositoryName" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 25 + } + } + }, + "com.amazonaws.ecr#ScanningRepositoryFilter": { + "type": "structure", + "members": { + "filter": { + "target": "com.amazonaws.ecr#ScanningRepositoryFilterValue", + "traits": { + "smithy.api#documentation": "The filter to use when scanning.
", + "smithy.api#required": {} + } + }, + "filterType": { + "target": "com.amazonaws.ecr#ScanningRepositoryFilterType", + "traits": { + "smithy.api#documentation": "The type associated with the filter.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The details of a scanning repository filter.
" + } + }, + "com.amazonaws.ecr#ScanningRepositoryFilterList": { + "type": "list", + "member": { + "target": "com.amazonaws.ecr#ScanningRepositoryFilter" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, + "com.amazonaws.ecr#ScanningRepositoryFilterType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "WILDCARD", + "name": "WILDCARD" + } + ] + } + }, + "com.amazonaws.ecr#ScanningRepositoryFilterValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[a-z0-9*](?:[._\\-/a-z0-9*]?[a-z0-9*]+)*$" + } + }, + "com.amazonaws.ecr#Score": { + "type": "double" + }, + "com.amazonaws.ecr#ScoreDetails": { + "type": "structure", + "members": { + "cvss": { + "target": "com.amazonaws.ecr#CvssScoreDetails", + "traits": { + "smithy.api#documentation": "An object that contains details about the CVSS score given to a finding.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Information about the Amazon Inspector score given to a finding.
" + } + }, + "com.amazonaws.ecr#ScoringVector": { + "type": "string" + }, "com.amazonaws.ecr#ServerException": { "type": "structure", "members": { @@ -4079,6 +5346,9 @@ } } }, + "com.amazonaws.ecr#Severity": { + "type": "string" + }, "com.amazonaws.ecr#SeverityCount": { "type": "integer", "traits": { @@ -4088,6 +5358,12 @@ } } }, + "com.amazonaws.ecr#Source": { + "type": "string" + }, + "com.amazonaws.ecr#SourceLayerHash": { + "type": "string" + }, "com.amazonaws.ecr#StartImageScan": { "type": "operation", "input": { @@ -4114,6 +5390,9 @@ }, { "target": "com.amazonaws.ecr#UnsupportedImageTypeException" + }, + { + "target": "com.amazonaws.ecr#ValidationException" } ], "traits": { @@ -4252,6 +5531,9 @@ } } }, + "com.amazonaws.ecr#Status": { + "type": "string" + }, "com.amazonaws.ecr#Tag": { "type": "structure", "members": { @@ -4361,6 +5643,18 @@ "com.amazonaws.ecr#TagValue": { "type": "string" }, + "com.amazonaws.ecr#Tags": { + "type": "map", + "key": { + "target": "com.amazonaws.ecr#TagKey" + }, + "value": { + "target": "com.amazonaws.ecr#TagValue" + } + }, + "com.amazonaws.ecr#Title": { + "type": "string" + }, "com.amazonaws.ecr#TooManyTagsException": { "type": "structure", "members": { @@ -4373,6 +5667,9 @@ "smithy.api#error": "client" } }, + "com.amazonaws.ecr#Type": { + "type": "string" + }, "com.amazonaws.ecr#UnsupportedImageTypeException": { "type": "structure", "members": { @@ -4385,6 +5682,18 @@ "smithy.api#error": "client" } }, + "com.amazonaws.ecr#UnsupportedUpstreamRegistryException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.ecr#ExceptionMessage" + } + }, + "traits": { + "smithy.api#documentation": "The specified upstream registry isn't supported.
", + "smithy.api#error": "client" + } + }, "com.amazonaws.ecr#UntagResource": { "type": "operation", "input": { @@ -4475,7 +5784,7 @@ } ], "traits": { - "smithy.api#documentation": "Uploads an image layer part to Amazon ECR.
\nWhen an image is pushed, each new image layer is uploaded in parts. The maximum size\n of each image layer part can be 20971520 bytes (or about 20MB). The UploadLayerPart API\n is called once per each new image layer part.
\nThis operation is used by the Amazon ECR proxy and is not generally used by\n customers for pulling and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
Uploads an image layer part to Amazon ECR.
\nWhen an image is pushed, each new image layer is uploaded in parts. The maximum size\n of each image layer part can be 20971520 bytes (or about 20MB). The UploadLayerPart API\n is called once per each new image layer part.
\nThis operation is used by the Amazon ECR proxy and is not generally used by\n customers for pulling and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
The architecture of the vulnerable package.
" + } + }, + "epoch": { + "target": "com.amazonaws.ecr#Epoch", + "traits": { + "smithy.api#documentation": "The epoch of the vulnerable package.
" + } + }, + "filePath": { + "target": "com.amazonaws.ecr#FilePath", + "traits": { + "smithy.api#documentation": "The file path of the vulnerable package.
" + } + }, + "name": { + "target": "com.amazonaws.ecr#VulnerablePackageName", + "traits": { + "smithy.api#documentation": "The name of the vulnerable package.
" + } + }, + "packageManager": { + "target": "com.amazonaws.ecr#PackageManager", + "traits": { + "smithy.api#documentation": "The package manager of the vulnerable package.
" + } + }, + "release": { + "target": "com.amazonaws.ecr#Release", + "traits": { + "smithy.api#documentation": "The release of the vulnerable package.
" + } + }, + "sourceLayerHash": { + "target": "com.amazonaws.ecr#SourceLayerHash", + "traits": { + "smithy.api#documentation": "The source layer hash of the vulnerable package.
" + } + }, + "version": { + "target": "com.amazonaws.ecr#Version", + "traits": { + "smithy.api#documentation": "The version of the vulnerable package.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Information on the vulnerable package identified by a finding.
" + } + }, + "com.amazonaws.ecr#VulnerablePackageName": { + "type": "string" + }, + "com.amazonaws.ecr#VulnerablePackagesList": { + "type": "list", + "member": { + "target": "com.amazonaws.ecr#VulnerablePackage" + } } } } diff --git a/codegen/sdk-codegen/aws-models/ecs.2014-11-13.json b/codegen/sdk-codegen/aws-models/ecs.2014-11-13.json index d60bd015a92..b51b1017888 100644 --- a/codegen/sdk-codegen/aws-models/ecs.2014-11-13.json +++ b/codegen/sdk-codegen/aws-models/ecs.2014-11-13.json @@ -1127,7 +1127,7 @@ "memory": { "target": "com.amazonaws.ecs#BoxedInteger", "traits": { - "smithy.api#documentation": "The amount (in MiB) of memory to present to the container. If your container attempts\n\t\t\tto exceed the memory specified here, the container is killed. The total amount of memory\n\t\t\treserved for all containers within a task must be lower than the task\n\t\t\t\tmemory
value, if one is specified. This parameter maps to\n\t\t\t\tMemory
in the Create a container section of the\n\t\t\tDocker Remote API and the --memory
option to docker run.
If using the Fargate launch type, this parameter is optional.
\n\t\tIf using the EC2 launch type, you must specify either a task-level\n\t\t\tmemory value or a container-level memory value. If you specify both a container-level\n\t\t\t\tmemory
and memoryReservation
value, memory
\n\t\t\tmust be greater than memoryReservation
. If you specify\n\t\t\t\tmemoryReservation
, then that value is subtracted from the available\n\t\t\tmemory resources for the container instance where the container is placed. Otherwise,\n\t\t\tthe value of memory
is used.
The Docker daemon reserves a minimum of 4 MiB of memory for a container. Therefore, we\n\t\t\trecommend that you specify fewer than 4 MiB of memory for your containers.
" + "smithy.api#documentation": "The amount (in MiB) of memory to present to the container. If your container attempts\n\t\t\tto exceed the memory specified here, the container is killed. The total amount of memory\n\t\t\treserved for all containers within a task must be lower than the task\n\t\t\t\tmemory
value, if one is specified. This parameter maps to\n\t\t\t\tMemory
in the Create a container section of the\n\t\t\tDocker Remote API and the --memory
option to docker run.
If using the Fargate launch type, this parameter is optional.
\n\t\tIf using the EC2 launch type, you must specify either a task-level\n\t\t\tmemory value or a container-level memory value. If you specify both a container-level\n\t\t\t\tmemory
and memoryReservation
value, memory
\n\t\t\tmust be greater than memoryReservation
. If you specify\n\t\t\t\tmemoryReservation
, then that value is subtracted from the available\n\t\t\tmemory resources for the container instance where the container is placed. Otherwise,\n\t\t\tthe value of memory
is used.
The Docker 20.10.0 or later daemon reserves a minimum of 6 MiB of\n\t\t\tmemory for a container, so you should not specify fewer than 6 MiB of\n\t\t\tmemory for your containers.
\n\t\tThe Docker 19.03.13-ce or earlier daemon reserves a minimum of 4 MiB\n\t\t\tof memory for a container, so you should not specify fewer than 4 MiB of\n\t\t\tmemory for your containers.
" } }, "memoryReservation": { @@ -6695,7 +6695,7 @@ "cpuArchitecture": { "target": "com.amazonaws.ecs#CPUArchitecture", "traits": { - "smithy.api#documentation": "The CPU architecture.
" + "smithy.api#documentation": "The CPU architecture.
\n\t\tYou can run your Linux tasks on an ARM-based platform by setting the value to ARM64
. This option is avaiable\n\t\t\tfor tasks that run on Linuc Amazon EC2 instance or Linux containers on Fargate.
Information about the platform for the Amazon ECS service or task.
" + "smithy.api#documentation": "Information about the platform for the Amazon ECS service or task.
\n\t\tFor more informataion about RuntimePlatform
, see RuntimePlatform in the Amazon Elastic Container Service Developer Guide.
The metadata that you apply to the add-on to assist with categorization and\n organization. Each tag consists of a key and an optional value, both of which you\n define. Add-on tags do not propagate to any other resources associated with the cluster.\n
" + "smithy.api#documentation": "The metadata that you apply to the add-on to assist with categorization and\n organization. Each tag consists of a key and an optional value. You define both.\n Add-on tags do not propagate to any other resources associated with the cluster.\n
" } } }, @@ -578,7 +578,7 @@ "tags": { "target": "com.amazonaws.eks#TagMap", "traits": { - "smithy.api#documentation": "The metadata to apply to the configuration to assist with categorization and\n organization. Each tag consists of a key and an optional value, both of which you\n define.
" + "smithy.api#documentation": "The metadata to apply to the configuration to assist with categorization and\n organization. Each tag consists of a key and an optional value. You define both.
" } }, "clientRequestToken": { @@ -808,7 +808,7 @@ "tags": { "target": "com.amazonaws.eks#TagMap", "traits": { - "smithy.api#documentation": "The metadata that you apply to the cluster to assist with categorization and\n organization. Each tag consists of a key and an optional value, both of which you\n define. Cluster tags do not propagate to any other resources associated with the\n cluster.
" + "smithy.api#documentation": "The metadata that you apply to the cluster to assist with categorization and\n organization. Each tag consists of a key and an optional value. You define both.\n Cluster tags do not propagate to any other resources associated with the\n cluster.
" } }, "encryptionConfig": { @@ -1087,7 +1087,7 @@ "tags": { "target": "com.amazonaws.eks#TagMap", "traits": { - "smithy.api#documentation": "The metadata to apply to the cluster to assist with categorization and organization.\n Each tag consists of a key and an optional value, both of which you define.
" + "smithy.api#documentation": "The metadata to apply to the cluster to assist with categorization and organization.\n Each tag consists of a key and an optional value. You define both.
" } } } @@ -1132,7 +1132,7 @@ } ], "traits": { - "smithy.api#documentation": "Creates an Amazon EKS control plane.
\nThe Amazon EKS control plane consists of control plane instances that run the Kubernetes\n software, such as etcd
and the API server. The control plane runs in an\n account managed by Amazon Web Services, and the Kubernetes API is exposed via the Amazon EKS API server\n endpoint. Each Amazon EKS cluster control plane is single-tenant and unique and runs on its\n own set of Amazon EC2 instances.
The cluster control plane is provisioned across multiple Availability Zones and\n fronted by an Elastic Load Balancing Network Load Balancer. Amazon EKS also provisions elastic network interfaces in your VPC\n subnets to provide connectivity from the control plane instances to the nodes (for\n example, to support kubectl exec
, logs
, and proxy
\n data flows).
Amazon EKS nodes run in your Amazon Web Services account and connect to your cluster's control plane via\n the Kubernetes API server endpoint and a certificate file that is created for your\n cluster.
\n \nCluster creation typically takes several minutes. After you create an Amazon EKS cluster,\n you must configure your Kubernetes tooling to communicate with the API server and launch\n nodes into your cluster. For more information, see Managing Cluster\n Authentication and Launching Amazon EKS nodes in the Amazon EKS User Guide.
", + "smithy.api#documentation": "Creates an Amazon EKS control plane.
\nThe Amazon EKS control plane consists of control plane instances that run the Kubernetes\n software, such as etcd
and the API server. The control plane runs in an\n account managed by Amazon Web Services, and the Kubernetes API is exposed by the Amazon EKS API server\n endpoint. Each Amazon EKS cluster control plane is single tenant and unique. It runs on its\n own set of Amazon EC2 instances.
The cluster control plane is provisioned across multiple Availability Zones and\n fronted by an Elastic Load Balancing Network Load Balancer. Amazon EKS also provisions elastic network interfaces in your VPC\n subnets to provide connectivity from the control plane instances to the nodes (for\n example, to support kubectl exec
, logs
, and proxy
\n data flows).
Amazon EKS nodes run in your Amazon Web Services account and connect to your cluster's control plane over\n the Kubernetes API server endpoint and a certificate file that is created for your\n cluster.
\n \nIn most cases, it takes several minutes to create a cluster. After you create an Amazon EKS cluster,\n you must configure your Kubernetes tooling to communicate with the API server and launch\n nodes into your cluster. For more information, see Managing Cluster\n Authentication and Launching Amazon EKS nodes in the Amazon EKS User Guide.
", "smithy.api#http": { "method": "POST", "uri": "/clusters", @@ -1166,7 +1166,7 @@ "resourcesVpcConfig": { "target": "com.amazonaws.eks#VpcConfigRequest", "traits": { - "smithy.api#documentation": "The VPC configuration used by the cluster control plane. Amazon EKS VPC resources have\n specific requirements to work properly with Kubernetes. For more information, see Cluster VPC\n Considerations and Cluster Security Group Considerations in the\n Amazon EKS User Guide. You must specify at least two subnets. You can specify up to five\n security groups, but we recommend that you use a dedicated security group for your\n cluster control plane.
", + "smithy.api#documentation": "The VPC configuration that's used by the cluster control plane. Amazon EKS VPC resources have\n specific requirements to work properly with Kubernetes. For more information, see Cluster VPC\n Considerations and Cluster Security Group Considerations in the\n Amazon EKS User Guide. You must specify at least two subnets. You can specify up to five\n security groups. However, we recommend that you use a dedicated security group for your\n cluster control plane.
", "smithy.api#required": {} } }, @@ -1192,7 +1192,7 @@ "tags": { "target": "com.amazonaws.eks#TagMap", "traits": { - "smithy.api#documentation": "The metadata to apply to the cluster to assist with categorization and organization.\n Each tag consists of a key and an optional value, both of which you define.
" + "smithy.api#documentation": "The metadata to apply to the cluster to assist with categorization and organization.\n Each tag consists of a key and an optional value. You define both.
" } }, "encryptionConfig": { @@ -1298,7 +1298,7 @@ "tags": { "target": "com.amazonaws.eks#TagMap", "traits": { - "smithy.api#documentation": "The metadata to apply to the Fargate profile to assist with categorization and\n organization. Each tag consists of a key and an optional value, both of which you\n define. Fargate profile tags do not propagate to any other resources associated with the\n Fargate profile, such as the pods that are scheduled with it.
" + "smithy.api#documentation": "The metadata to apply to the Fargate profile to assist with categorization and\n organization. Each tag consists of a key and an optional value. You define both.\n Fargate profile tags do not propagate to any other resources associated with the\n Fargate profile, such as the pods that are scheduled with it.
" } } } @@ -1431,7 +1431,7 @@ "tags": { "target": "com.amazonaws.eks#TagMap", "traits": { - "smithy.api#documentation": "The metadata to apply to the node group to assist with categorization and\n organization. Each tag consists of a key and an optional value, both of which you\n define. Node group tags do not propagate to any other resources associated with the node\n group, such as the Amazon EC2 instances or subnets.
" + "smithy.api#documentation": "The metadata to apply to the node group to assist with categorization and\n organization. Each tag consists of a key and an optional value. You\n define both. Node group tags do not propagate to any other resources associated with the node\n group, such as the Amazon EC2 instances or subnets.
" } }, "clientRequestToken": { @@ -2782,7 +2782,7 @@ "tags": { "target": "com.amazonaws.eks#TagMap", "traits": { - "smithy.api#documentation": "The metadata applied to the Fargate profile to assist with categorization and\n organization. Each tag consists of a key and an optional value, both of which you\n define. Fargate profile tags do not propagate to any other resources associated with the\n Fargate profile, such as the pods that are scheduled with it.
" + "smithy.api#documentation": "The metadata applied to the Fargate profile to assist with categorization and\n organization. Each tag consists of a key and an optional value. You define both.\n Fargate profile tags do not propagate to any other resources associated with the\n Fargate profile, such as the pods that are scheduled with it.
" } } }, @@ -3223,7 +3223,7 @@ "include": { "target": "com.amazonaws.eks#IncludeClustersList", "traits": { - "smithy.api#documentation": "Indicates whether connected clusters are included in the returned list. Default value is 'ALL'.
", + "smithy.api#documentation": "Indicates whether external clusters are included in the returned list. Use 'all
' to return connected clusters, or blank to return only Amazon EKS clusters. 'all
' must be in lowercase otherwise an error occurs.
The metadata applied to the node group to assist with categorization and organization.\n Each tag consists of a key and an optional value, both of which you define. Node group\n tags do not propagate to any other resources associated with the node group, such as the\n Amazon EC2 instances or subnets.
" + "smithy.api#documentation": "The metadata applied to the node group to assist with categorization and organization.\n Each tag consists of a key and an optional value. You define both. Node group\n tags do not propagate to any other resources associated with the node group, such as the\n Amazon EC2 instances or subnets.
" } } }, @@ -4194,7 +4194,7 @@ "tags": { "target": "com.amazonaws.eks#TagMap", "traits": { - "smithy.api#documentation": "The metadata to apply to the provider configuration to assist with categorization and\n organization. Each tag consists of a key and an optional value, both of which you\n defined.
" + "smithy.api#documentation": "The metadata to apply to the provider configuration to assist with categorization and\n organization. Each tag consists of a key and an optional value. You define both.
" } }, "status": { @@ -4309,9 +4309,15 @@ { "target": "com.amazonaws.eks#InvalidParameterException" }, + { + "target": "com.amazonaws.eks#ResourceInUseException" + }, { "target": "com.amazonaws.eks#ResourceLimitExceededException" }, + { + "target": "com.amazonaws.eks#ResourcePropagationDelayException" + }, { "target": "com.amazonaws.eks#ServerException" }, @@ -4490,6 +4496,19 @@ "smithy.api#httpError": 404 } }, + "com.amazonaws.eks#ResourcePropagationDelayException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.eks#String" + } + }, + "traits": { + "smithy.api#documentation": "Required resources (such as Service Linked Roles) were created and are still propagating. Retry later.
", + "smithy.api#error": "client", + "smithy.api#httpError": 428 + } + }, "com.amazonaws.eks#RoleArn": { "type": "string", "traits": { diff --git a/codegen/sdk-codegen/aws-models/elasticache.2015-02-02.json b/codegen/sdk-codegen/aws-models/elasticache.2015-02-02.json index dad0334eeed..0fc0988e6d6 100644 --- a/codegen/sdk-codegen/aws-models/elasticache.2015-02-02.json +++ b/codegen/sdk-codegen/aws-models/elasticache.2015-02-02.json @@ -171,6 +171,24 @@ }, "com.amazonaws.elasticache#AmazonElastiCacheV9": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "ElastiCache", + "arnNamespace": "elasticache", + "cloudFormationName": "ElastiCache", + "cloudTrailEventSource": "elasticache.amazonaws.com", + "endpointPrefix": "elasticache" + }, + "aws.auth#sigv4": { + "name": "elasticache" + }, + "aws.protocols#awsQuery": {}, + "smithy.api#documentation": "Amazon ElastiCache is a web service that makes it easier to set up, operate, \n and scale a distributed cache in the cloud.
\nWith ElastiCache, customers get all of the benefits of a high-performance, \n in-memory cache with less of the administrative burden involved in launching and managing a distributed cache. \n The service makes setup, scaling, \n and cluster failure handling much simpler than in a self-managed cache deployment.
\nIn addition, through integration with Amazon CloudWatch, \n customers get enhanced visibility into the key performance statistics \n associated with their cache and can receive alarms if a part of their cache runs hot.
", + "smithy.api#title": "Amazon ElastiCache", + "smithy.api#xmlNamespace": { + "uri": "http://elasticache.amazonaws.com/doc/2015-02-02/" + } + }, "version": "2015-02-02", "operations": [ { @@ -368,25 +386,7 @@ { "target": "com.amazonaws.elasticache#TestFailover" } - ], - "traits": { - "aws.api#service": { - "sdkId": "ElastiCache", - "arnNamespace": "elasticache", - "cloudFormationName": "ElastiCache", - "cloudTrailEventSource": "elasticache.amazonaws.com", - "endpointPrefix": "elasticache" - }, - "aws.auth#sigv4": { - "name": "elasticache" - }, - "aws.protocols#awsQuery": {}, - "smithy.api#documentation": "Amazon ElastiCache is a web service that makes it easier to set up, operate, \n and scale a distributed cache in the cloud.
\nWith ElastiCache, customers get all of the benefits of a high-performance, \n in-memory cache with less of the administrative burden involved in launching and managing a distributed cache. \n The service makes setup, scaling, \n and cluster failure handling much simpler than in a self-managed cache deployment.
\nIn addition, through integration with Amazon CloudWatch, \n customers get enhanced visibility into the key performance statistics \n associated with their cache and can receive alarms if a part of their cache runs hot.
", - "smithy.api#title": "Amazon ElastiCache", - "smithy.api#xmlNamespace": { - "uri": "http://elasticache.amazonaws.com/doc/2015-02-02/" - } - } + ] }, "com.amazonaws.elasticache#AuthTokenUpdateStatus": { "type": "string", @@ -727,7 +727,7 @@ "CacheNodeType": { "target": "com.amazonaws.elasticache#String", "traits": { - "smithy.api#documentation": "The name of the compute and memory capacity node type for the cluster.
\n \nThe following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.
\n\t\tGeneral purpose:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\t \n \t\t\t\t\t\t\n M6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).
\n\t\t\t\t\t\t\t\n cache.m6g.large
,\n\t\t\t\t\t\t\tcache.m6g.xlarge
,\n\t\t\t\t\t\t\tcache.m6g.2xlarge
,\n\t\t\t\t\t\t\tcache.m6g.4xlarge
,\n\t\t\t\t\t\t\tcache.m6g.8xlarge
,\n\t\t\t\t\t\t\tcache.m6g.12xlarge
,\n\t\t\t\t\t\t\tcache.m6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n M5 node types:\n \t\t\t\t\t\t cache.m5.large
,\n \t\t\t\t\t\tcache.m5.xlarge
,\n \t\t\t\t\t\tcache.m5.2xlarge
,\n \t\t\t\t\t\tcache.m5.4xlarge
,\n \t\t\t\t\t\tcache.m5.12xlarge
,\n \t\t\t\t\t\tcache.m5.24xlarge
\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
\n M4 node types:\n \t\t\t\t\t\t cache.m4.large
,\n \t\t\t\t\t\tcache.m4.xlarge
,\n \t\t\t\t\t\tcache.m4.2xlarge
,\n \t\t\t\t\t\tcache.m4.4xlarge
,\n \t\t\t\t\t\tcache.m4.10xlarge
\n
\n T3 node types:\n\t\t\t\t\t cache.t3.micro
, \n \t\t\t\t\t\tcache.t3.small
,\n \t\t\t\t\t\tcache.t3.medium
\n
\n T2 node types:\n\t\t\t\t\t cache.t2.micro
, \n \t\t\t\t\t\tcache.t2.small
,\n \t\t\t\t\t\tcache.t2.medium
\n
Previous generation: (not recommended)
\n\t\t\t\t\t\t\n T1 node types:\n\t\t\t\t\t cache.t1.micro
\n
\n M1 node types:\n\t\t\t\t\t\t cache.m1.small
, \n\t\t\t\t\t\t cache.m1.medium
, \n\t\t\t\t\t\t cache.m1.large
,\n\t\t\t\t\t\t cache.m1.xlarge
\n
\n M3 node types:\n \t\t\t\t\t\t cache.m3.medium
,\n \t\t\t\t\t\tcache.m3.large
, \n \t\t\t\t\t\tcache.m3.xlarge
,\n \t\t\t\t\t\tcache.m3.2xlarge
\n
Compute optimized:
\n\n\t\t\t\tPrevious generation: (not recommended)
\n\t\t\t\n C1 node types:\n\t\t\t cache.c1.xlarge
\n
Memory optimized:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\t\t\t\t\t\t\t\n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t cache.r6g.large
,\n\t\t\t\t\t\t\tcache.r6g.xlarge
,\n\t\t\t\t\t\t\tcache.r6g.2xlarge
,\n\t\t\t\t\t\t\tcache.r6g.4xlarge
,\n\t\t\t\t\t\t\tcache.r6g.8xlarge
,\n\t\t\t\t\t\t\tcache.r6g.12xlarge
,\n\t\t\t\t\t\t\tcache.r6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n R5 node types:\n \t\t\t\t\t cache.r5.large
,\n \t\t\t\t\t cache.r5.xlarge
,\n \t\t\t\t\t cache.r5.2xlarge
,\n \t\t\t\t\t cache.r5.4xlarge
,\n \t\t\t\t\t cache.r5.12xlarge
,\n \t\t\t\t\t cache.r5.24xlarge
\n
\n R4 node types:\n \t\t\t\t\t cache.r4.large
,\n \t\t\t\t\t cache.r4.xlarge
,\n \t\t\t\t\t cache.r4.2xlarge
,\n \t\t\t\t\t cache.r4.4xlarge
,\n \t\t\t\t\t cache.r4.8xlarge
,\n \t\t\t\t\t cache.r4.16xlarge
\n
Previous generation: (not recommended)
\n\n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge
, \n \t\t\t\t\t\tcache.m2.2xlarge
,\n \t\t\t\t\t\tcache.m2.4xlarge
\n
\n R3 node types:\n \t\t\t\t\t cache.r3.large
, \n \t\t\t\t\t\tcache.r3.xlarge
,\n \t\t\t\t\t\tcache.r3.2xlarge
, \n \t\t\t\t\t\tcache.r3.4xlarge
,\n \t\t\t\t\t\tcache.r3.8xlarge
\n
\n Additional node type info\n
\n\t\tAll current generation instance types are created in Amazon VPC by default.
\nRedis append-only files (AOF) are not supported for T1 or T2 instances.
\nRedis Multi-AZ with automatic failover is not supported on T1 instances.
\nRedis configuration variables appendonly
and \n\t\t\t\tappendfsync
are not supported on Redis version 2.8.22 and later.
The name of the compute and memory capacity node type for the cluster.
\n \nThe following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.
\n\t\tGeneral purpose:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t\n M6g node types: (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward): \tcache.m6g.large
,\n\t\t\t\t\t\t\tcache.m6g.xlarge
,\n\t\t\t\t\t\t\tcache.m6g.2xlarge
,\n\t\t\t\t\t\t\tcache.m6g.4xlarge
,\n\t\t\t\t\t\t\tcache.m6g.8xlarge
,\n\t\t\t\t\t\t\tcache.m6g.12xlarge
,\n\t\t\t\t\t\t\tcache.m6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n M5 node types:\n \t\t\t\t\t\t cache.m5.large
,\n \t\t\t\t\t\tcache.m5.xlarge
,\n \t\t\t\t\t\tcache.m5.2xlarge
,\n \t\t\t\t\t\tcache.m5.4xlarge
,\n \t\t\t\t\t\tcache.m5.12xlarge
,\n \t\t\t\t\t\tcache.m5.24xlarge
\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
\n M4 node types:\n \t\t\t\t\t\t cache.m4.large
,\n \t\t\t\t\t\tcache.m4.xlarge
,\n \t\t\t\t\t\tcache.m4.2xlarge
,\n \t\t\t\t\t\tcache.m4.4xlarge
,\n \t\t\t\t\t\tcache.m4.10xlarge
\n
\n T4g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward):\n\t\t\t\t\t cache.t4g.micro
,\n\t\t\t\t\t cache.t4g.small
,\n\t\t\t\t\t cache.t4g.medium
\n\t\t\t\t\t
\n T3 node types:\n\t\t\t\t\t cache.t3.micro
, \n \t\t\t\t\t\tcache.t3.small
,\n \t\t\t\t\t\tcache.t3.medium
\n
\n T2 node types:\n\t\t\t\t\t cache.t2.micro
, \n \t\t\t\t\t\tcache.t2.small
,\n \t\t\t\t\t\tcache.t2.medium
\n
Previous generation: (not recommended)
\n\t\t\t\t\t\t\n T1 node types:\n\t\t\t\t\t cache.t1.micro
\n
\n M1 node types:\n\t\t\t\t\t\t cache.m1.small
, \n\t\t\t\t\t\t cache.m1.medium
, \n\t\t\t\t\t\t cache.m1.large
,\n\t\t\t\t\t\t cache.m1.xlarge
\n
\n M3 node types:\n \t\t\t\t\t\t cache.m3.medium
,\n \t\t\t\t\t\tcache.m3.large
, \n \t\t\t\t\t\tcache.m3.xlarge
,\n \t\t\t\t\t\tcache.m3.2xlarge
\n
Compute optimized:
\n\n\t\t\t\tPrevious generation: (not recommended)
\n\t\t\t\n C1 node types:\n\t\t\t cache.c1.xlarge
\n
Memory optimized with data tiering:
\n\t\tCurrent generation:
\n\t\t \n\t\t\n R6gd node types (available only for Redis engine version 6.2 onward).
\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t\t\n\t\t \n\t\t cache.r6gd.xlarge
,\n\t\t cache.r6gd.2xlarge
,\n\t\t cache.r6gd.4xlarge
,\n\t\t cache.r6gd.8xlarge
,\n\t\t cache.r6gd.12xlarge
,\n\t\t cache.r6gd.16xlarge
\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t
Memory optimized:
\n\t\t\t\tCurrent generation:
\n\n\t\t \t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t\n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t cache.r6g.large
,\n\t\t\t\t\t\t\tcache.r6g.xlarge
,\n\t\t\t\t\t\t\tcache.r6g.2xlarge
,\n\t\t\t\t\t\t\tcache.r6g.4xlarge
,\n\t\t\t\t\t\t\tcache.r6g.8xlarge
,\n\t\t\t\t\t\t\tcache.r6g.12xlarge
,\n\t\t\t\t\t\t\tcache.r6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n R5 node types:\n \t\t\t\t\t cache.r5.large
,\n \t\t\t\t\t cache.r5.xlarge
,\n \t\t\t\t\t cache.r5.2xlarge
,\n \t\t\t\t\t cache.r5.4xlarge
,\n \t\t\t\t\t cache.r5.12xlarge
,\n \t\t\t\t\t cache.r5.24xlarge
\n
\n R4 node types:\n \t\t\t\t\t cache.r4.large
,\n \t\t\t\t\t cache.r4.xlarge
,\n \t\t\t\t\t cache.r4.2xlarge
,\n \t\t\t\t\t cache.r4.4xlarge
,\n \t\t\t\t\t cache.r4.8xlarge
,\n \t\t\t\t\t cache.r4.16xlarge
\n
Previous generation: (not recommended)
\n\n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge
, \n \t\t\t\t\t\tcache.m2.2xlarge
,\n \t\t\t\t\t\tcache.m2.4xlarge
\n
\n R3 node types:\n \t\t\t\t\t cache.r3.large
, \n \t\t\t\t\t\tcache.r3.xlarge
,\n \t\t\t\t\t\tcache.r3.2xlarge
, \n \t\t\t\t\t\tcache.r3.4xlarge
,\n \t\t\t\t\t\tcache.r3.8xlarge
\n
\n Additional node type info\n
\n\t\tAll current generation instance types are created in Amazon VPC by default.
\nRedis append-only files (AOF) are not supported for T1 or T2 instances.
\nRedis Multi-AZ with automatic failover is not supported on T1 instances.
\nRedis configuration variables appendonly
and \n\t\t\t\tappendfsync
are not supported on Redis version 2.8.22 and later.
This parameter is currently disabled.
" + "smithy.api#documentation": " If you are running Redis engine version 6.0 or later, set this parameter to yes if you want to opt-in to the next auto minor version upgrade campaign. This parameter is disabled for previous versions. \n
" } }, "SecurityGroups": { @@ -981,7 +981,7 @@ "CacheParameterGroupFamily": { "target": "com.amazonaws.elasticache#String", "traits": { - "smithy.api#documentation": "The name of the cache parameter group family associated with this cache engine.
\nValid values are: \n memcached1.4
| \n memcached1.5
| \n memcached1.6
| \n redis2.6
| \n redis2.8
|\n redis3.2
|\n redis4.0
|\n redis5.0
| \n redis6.x
| \n
The name of the cache parameter group family associated with this cache engine.
\nValid values are: \n memcached1.4
| \n memcached1.5
| \n memcached1.6
| \n redis2.6
| \n redis2.8
|\n redis3.2
|\n redis4.0
|\n redis5.0
| \n redis6.0
| \n redis6.2
\n
Represents an individual cache node within a cluster. Each cache node runs its own\n instance of the cluster's protocol-compliant caching software - either Memcached or\n Redis.
\n\nThe following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.
\n\t\tGeneral purpose:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\t \n \t\t\t\t\t\t\n M6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).
\n\t\t\t\t\t\t\t\n cache.m6g.large
,\n\t\t\t\t\t\t\tcache.m6g.xlarge
,\n\t\t\t\t\t\t\tcache.m6g.2xlarge
,\n\t\t\t\t\t\t\tcache.m6g.4xlarge
,\n\t\t\t\t\t\t\tcache.m6g.8xlarge
,\n\t\t\t\t\t\t\tcache.m6g.12xlarge
,\n\t\t\t\t\t\t\tcache.m6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n M5 node types:\n \t\t\t\t\t\t cache.m5.large
,\n \t\t\t\t\t\tcache.m5.xlarge
,\n \t\t\t\t\t\tcache.m5.2xlarge
,\n \t\t\t\t\t\tcache.m5.4xlarge
,\n \t\t\t\t\t\tcache.m5.12xlarge
,\n \t\t\t\t\t\tcache.m5.24xlarge
\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
\n M4 node types:\n \t\t\t\t\t\t cache.m4.large
,\n \t\t\t\t\t\tcache.m4.xlarge
,\n \t\t\t\t\t\tcache.m4.2xlarge
,\n \t\t\t\t\t\tcache.m4.4xlarge
,\n \t\t\t\t\t\tcache.m4.10xlarge
\n
\n T3 node types:\n\t\t\t\t\t cache.t3.micro
, \n \t\t\t\t\t\tcache.t3.small
,\n \t\t\t\t\t\tcache.t3.medium
\n
\n T2 node types:\n\t\t\t\t\t cache.t2.micro
, \n \t\t\t\t\t\tcache.t2.small
,\n \t\t\t\t\t\tcache.t2.medium
\n
Previous generation: (not recommended)
\n\t\t\t\t\t\t\n T1 node types:\n\t\t\t\t\t cache.t1.micro
\n
\n M1 node types:\n\t\t\t\t\t\t cache.m1.small
, \n\t\t\t\t\t\t cache.m1.medium
, \n\t\t\t\t\t\t cache.m1.large
,\n\t\t\t\t\t\t cache.m1.xlarge
\n
\n M3 node types:\n \t\t\t\t\t\t cache.m3.medium
,\n \t\t\t\t\t\tcache.m3.large
, \n \t\t\t\t\t\tcache.m3.xlarge
,\n \t\t\t\t\t\tcache.m3.2xlarge
\n
Compute optimized:
\n\n\t\t\t\tPrevious generation: (not recommended)
\n\t\t\t\n C1 node types:\n\t\t\t cache.c1.xlarge
\n
Memory optimized:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\t\t\t\t\t\t\t\n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t cache.r6g.large
,\n\t\t\t\t\t\t\tcache.r6g.xlarge
,\n\t\t\t\t\t\t\tcache.r6g.2xlarge
,\n\t\t\t\t\t\t\tcache.r6g.4xlarge
,\n\t\t\t\t\t\t\tcache.r6g.8xlarge
,\n\t\t\t\t\t\t\tcache.r6g.12xlarge
,\n\t\t\t\t\t\t\tcache.r6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n R5 node types:\n \t\t\t\t\t cache.r5.large
,\n \t\t\t\t\t cache.r5.xlarge
,\n \t\t\t\t\t cache.r5.2xlarge
,\n \t\t\t\t\t cache.r5.4xlarge
,\n \t\t\t\t\t cache.r5.12xlarge
,\n \t\t\t\t\t cache.r5.24xlarge
\n
\n R4 node types:\n \t\t\t\t\t cache.r4.large
,\n \t\t\t\t\t cache.r4.xlarge
,\n \t\t\t\t\t cache.r4.2xlarge
,\n \t\t\t\t\t cache.r4.4xlarge
,\n \t\t\t\t\t cache.r4.8xlarge
,\n \t\t\t\t\t cache.r4.16xlarge
\n
Previous generation: (not recommended)
\n\n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge
, \n \t\t\t\t\t\tcache.m2.2xlarge
,\n \t\t\t\t\t\tcache.m2.4xlarge
\n
\n R3 node types:\n \t\t\t\t\t cache.r3.large
, \n \t\t\t\t\t\tcache.r3.xlarge
,\n \t\t\t\t\t\tcache.r3.2xlarge
, \n \t\t\t\t\t\tcache.r3.4xlarge
,\n \t\t\t\t\t\tcache.r3.8xlarge
\n
\n Additional node type info\n
\n\t\tAll current generation instance types are created in Amazon VPC by default.
\nRedis append-only files (AOF) are not supported for T1 or T2 instances.
\nRedis Multi-AZ with automatic failover is not supported on T1 instances.
\nRedis configuration variables appendonly
and \n\t\t\t\tappendfsync
are not supported on Redis version 2.8.22 and later.
Represents an individual cache node within a cluster. Each cache node runs its own\n instance of the cluster's protocol-compliant caching software - either Memcached or\n Redis.
\n\nThe following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.
\n\t\tGeneral purpose:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t\n M6g node types: (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward): \tcache.m6g.large
,\n\t\t\t\t\t\t\tcache.m6g.xlarge
,\n\t\t\t\t\t\t\tcache.m6g.2xlarge
,\n\t\t\t\t\t\t\tcache.m6g.4xlarge
,\n\t\t\t\t\t\t\tcache.m6g.8xlarge
,\n\t\t\t\t\t\t\tcache.m6g.12xlarge
,\n\t\t\t\t\t\t\tcache.m6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n M5 node types:\n \t\t\t\t\t\t cache.m5.large
,\n \t\t\t\t\t\tcache.m5.xlarge
,\n \t\t\t\t\t\tcache.m5.2xlarge
,\n \t\t\t\t\t\tcache.m5.4xlarge
,\n \t\t\t\t\t\tcache.m5.12xlarge
,\n \t\t\t\t\t\tcache.m5.24xlarge
\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
\n M4 node types:\n \t\t\t\t\t\t cache.m4.large
,\n \t\t\t\t\t\tcache.m4.xlarge
,\n \t\t\t\t\t\tcache.m4.2xlarge
,\n \t\t\t\t\t\tcache.m4.4xlarge
,\n \t\t\t\t\t\tcache.m4.10xlarge
\n
\n T4g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward):\n\t\t\t\t\t cache.t4g.micro
,\n\t\t\t\t\t cache.t4g.small
,\n\t\t\t\t\t cache.t4g.medium
\n\t\t\t\t\t
\n T3 node types:\n\t\t\t\t\t cache.t3.micro
, \n \t\t\t\t\t\tcache.t3.small
,\n \t\t\t\t\t\tcache.t3.medium
\n
\n T2 node types:\n\t\t\t\t\t cache.t2.micro
, \n \t\t\t\t\t\tcache.t2.small
,\n \t\t\t\t\t\tcache.t2.medium
\n
Previous generation: (not recommended)
\n\t\t\t\t\t\t\n T1 node types:\n\t\t\t\t\t cache.t1.micro
\n
\n M1 node types:\n\t\t\t\t\t\t cache.m1.small
, \n\t\t\t\t\t\t cache.m1.medium
, \n\t\t\t\t\t\t cache.m1.large
,\n\t\t\t\t\t\t cache.m1.xlarge
\n
\n M3 node types:\n \t\t\t\t\t\t cache.m3.medium
,\n \t\t\t\t\t\tcache.m3.large
, \n \t\t\t\t\t\tcache.m3.xlarge
,\n \t\t\t\t\t\tcache.m3.2xlarge
\n
Compute optimized:
\n\n\t\t\t\tPrevious generation: (not recommended)
\n\t\t\t\n C1 node types:\n\t\t\t cache.c1.xlarge
\n
Memory optimized with data tiering:
\n\t\tCurrent generation:
\n\t\t \n\t\t\n R6gd node types (available only for Redis engine version 6.2 onward).
\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t\t\n\t\t \n\t\t cache.r6gd.xlarge
,\n\t\t cache.r6gd.2xlarge
,\n\t\t cache.r6gd.4xlarge
,\n\t\t cache.r6gd.8xlarge
,\n\t\t cache.r6gd.12xlarge
,\n\t\t cache.r6gd.16xlarge
\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t
Memory optimized:
\n\t\t\t\tCurrent generation:
\n\n\t\t\t \t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t\n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).
\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t cache.r6g.large
,\n\t\t\t\t\t\t\tcache.r6g.xlarge
,\n\t\t\t\t\t\t\tcache.r6g.2xlarge
,\n\t\t\t\t\t\t\tcache.r6g.4xlarge
,\n\t\t\t\t\t\t\tcache.r6g.8xlarge
,\n\t\t\t\t\t\t\tcache.r6g.12xlarge
,\n\t\t\t\t\t\t\tcache.r6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n R5 node types:\n \t\t\t\t\t cache.r5.large
,\n \t\t\t\t\t cache.r5.xlarge
,\n \t\t\t\t\t cache.r5.2xlarge
,\n \t\t\t\t\t cache.r5.4xlarge
,\n \t\t\t\t\t cache.r5.12xlarge
,\n \t\t\t\t\t cache.r5.24xlarge
\n
\n R4 node types:\n \t\t\t\t\t cache.r4.large
,\n \t\t\t\t\t cache.r4.xlarge
,\n \t\t\t\t\t cache.r4.2xlarge
,\n \t\t\t\t\t cache.r4.4xlarge
,\n \t\t\t\t\t cache.r4.8xlarge
,\n \t\t\t\t\t cache.r4.16xlarge
\n
Previous generation: (not recommended)
\n\n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge
, \n \t\t\t\t\t\tcache.m2.2xlarge
,\n \t\t\t\t\t\tcache.m2.4xlarge
\n
\n R3 node types:\n \t\t\t\t\t cache.r3.large
, \n \t\t\t\t\t\tcache.r3.xlarge
,\n \t\t\t\t\t\tcache.r3.2xlarge
, \n \t\t\t\t\t\tcache.r3.4xlarge
,\n \t\t\t\t\t\tcache.r3.8xlarge
\n
\n Additional node type info\n
\n\t\tAll current generation instance types are created in Amazon VPC by default.
\nRedis append-only files (AOF) are not supported for T1 or T2 instances.
\nRedis Multi-AZ with automatic failover is not supported on T1 instances.
\nRedis configuration variables appendonly
and \n\t\t\t\tappendfsync
are not supported on Redis version 2.8.22 and later.
The name of the cache parameter group family that this cache parameter group is compatible with.
\nValid values are: \n memcached1.4
| \n memcached1.5
| \n memcached1.6
| \n redis2.6
| \n redis2.8
|\n redis3.2
|\n redis4.0
|\n redis5.0
| \n redis6.x
| \n
The name of the cache parameter group family that this cache parameter group is compatible with.
\nValid values are: \n memcached1.4
| \n memcached1.5
| \n memcached1.6
| \n redis2.6
| \n redis2.8
|\n redis3.2
|\n redis4.0
|\n redis5.0
| \n redis6.0
| \n
The compute and memory capacity of the nodes in the node group (shard).
\nThe following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.
\n\t\tGeneral purpose:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\t \n \t\t\t\t\t\t\n M6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).
\n\t\t\t\t\t\t\t\n cache.m6g.large
,\n\t\t\t\t\t\t\tcache.m6g.xlarge
,\n\t\t\t\t\t\t\tcache.m6g.2xlarge
,\n\t\t\t\t\t\t\tcache.m6g.4xlarge
,\n\t\t\t\t\t\t\tcache.m6g.8xlarge
,\n\t\t\t\t\t\t\tcache.m6g.12xlarge
,\n\t\t\t\t\t\t\tcache.m6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n M5 node types:\n \t\t\t\t\t\t cache.m5.large
,\n \t\t\t\t\t\tcache.m5.xlarge
,\n \t\t\t\t\t\tcache.m5.2xlarge
,\n \t\t\t\t\t\tcache.m5.4xlarge
,\n \t\t\t\t\t\tcache.m5.12xlarge
,\n \t\t\t\t\t\tcache.m5.24xlarge
\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
\n M4 node types:\n \t\t\t\t\t\t cache.m4.large
,\n \t\t\t\t\t\tcache.m4.xlarge
,\n \t\t\t\t\t\tcache.m4.2xlarge
,\n \t\t\t\t\t\tcache.m4.4xlarge
,\n \t\t\t\t\t\tcache.m4.10xlarge
\n
\n T3 node types:\n\t\t\t\t\t cache.t3.micro
, \n \t\t\t\t\t\tcache.t3.small
,\n \t\t\t\t\t\tcache.t3.medium
\n
\n T2 node types:\n\t\t\t\t\t cache.t2.micro
, \n \t\t\t\t\t\tcache.t2.small
,\n \t\t\t\t\t\tcache.t2.medium
\n
Previous generation: (not recommended)
\n\t\t\t\t\t\t\n T1 node types:\n\t\t\t\t\t cache.t1.micro
\n
\n M1 node types:\n\t\t\t\t\t\t cache.m1.small
, \n\t\t\t\t\t\t cache.m1.medium
, \n\t\t\t\t\t\t cache.m1.large
,\n\t\t\t\t\t\t cache.m1.xlarge
\n
\n M3 node types:\n \t\t\t\t\t\t cache.m3.medium
,\n \t\t\t\t\t\tcache.m3.large
, \n \t\t\t\t\t\tcache.m3.xlarge
,\n \t\t\t\t\t\tcache.m3.2xlarge
\n
Compute optimized:
\n\n\t\t\t\tPrevious generation: (not recommended)
\n\t\t\t\n C1 node types:\n\t\t\t cache.c1.xlarge
\n
Memory optimized:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\t\t\t\t\t\t\t\n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t cache.r6g.large
,\n\t\t\t\t\t\t\tcache.r6g.xlarge
,\n\t\t\t\t\t\t\tcache.r6g.2xlarge
,\n\t\t\t\t\t\t\tcache.r6g.4xlarge
,\n\t\t\t\t\t\t\tcache.r6g.8xlarge
,\n\t\t\t\t\t\t\tcache.r6g.12xlarge
,\n\t\t\t\t\t\t\tcache.r6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n R5 node types:\n \t\t\t\t\t cache.r5.large
,\n \t\t\t\t\t cache.r5.xlarge
,\n \t\t\t\t\t cache.r5.2xlarge
,\n \t\t\t\t\t cache.r5.4xlarge
,\n \t\t\t\t\t cache.r5.12xlarge
,\n \t\t\t\t\t cache.r5.24xlarge
\n
\n R4 node types:\n \t\t\t\t\t cache.r4.large
,\n \t\t\t\t\t cache.r4.xlarge
,\n \t\t\t\t\t cache.r4.2xlarge
,\n \t\t\t\t\t cache.r4.4xlarge
,\n \t\t\t\t\t cache.r4.8xlarge
,\n \t\t\t\t\t cache.r4.16xlarge
\n
Previous generation: (not recommended)
\n\n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge
, \n \t\t\t\t\t\tcache.m2.2xlarge
,\n \t\t\t\t\t\tcache.m2.4xlarge
\n
\n R3 node types:\n \t\t\t\t\t cache.r3.large
, \n \t\t\t\t\t\tcache.r3.xlarge
,\n \t\t\t\t\t\tcache.r3.2xlarge
, \n \t\t\t\t\t\tcache.r3.4xlarge
,\n \t\t\t\t\t\tcache.r3.8xlarge
\n
\n Additional node type info\n
\n\t\tAll current generation instance types are created in Amazon VPC by default.
\nRedis append-only files (AOF) are not supported for T1 or T2 instances.
\nRedis Multi-AZ with automatic failover is not supported on T1 instances.
\nRedis configuration variables appendonly
and \n\t\t\t\tappendfsync
are not supported on Redis version 2.8.22 and later.
The compute and memory capacity of the nodes in the node group (shard).
\nThe following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.
\n\t\tGeneral purpose:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\t \n \t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t\n M6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward):\n\t\t\t\t\t \n\t\t\t\t\t \tcache.m6g.large
,\n\t\t\t\t\t\t\tcache.m6g.xlarge
,\n\t\t\t\t\t\t\tcache.m6g.2xlarge
,\n\t\t\t\t\t\t\tcache.m6g.4xlarge
,\n\t\t\t\t\t\t\tcache.m6g.8xlarge
,\n\t\t\t\t\t\t\tcache.m6g.12xlarge
,\n\t\t\t\t\t\t\tcache.m6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n M5 node types:\n \t\t\t\t\t\t cache.m5.large
,\n \t\t\t\t\t\tcache.m5.xlarge
,\n \t\t\t\t\t\tcache.m5.2xlarge
,\n \t\t\t\t\t\tcache.m5.4xlarge
,\n \t\t\t\t\t\tcache.m5.12xlarge
,\n \t\t\t\t\t\tcache.m5.24xlarge
\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
\n M4 node types:\n \t\t\t\t\t\t cache.m4.large
,\n \t\t\t\t\t\tcache.m4.xlarge
,\n \t\t\t\t\t\tcache.m4.2xlarge
,\n \t\t\t\t\t\tcache.m4.4xlarge
,\n \t\t\t\t\t\tcache.m4.10xlarge
\n
\n T4g node types (available only for Redis engine version 5.0.6 onward and Memcached engine version 1.5.16 onward):\n\t\t\t\t\t cache.t4g.micro
,\n\t\t\t\t\t cache.t4g.small
,\n\t\t\t\t\t cache.t4g.medium
\n\t\t\t\t\t
\n T3 node types:\n\t\t\t\t\t cache.t3.micro
, \n \t\t\t\t\t\tcache.t3.small
,\n \t\t\t\t\t\tcache.t3.medium
\n
\n T2 node types:\n\t\t\t\t\t cache.t2.micro
, \n \t\t\t\t\t\tcache.t2.small
,\n \t\t\t\t\t\tcache.t2.medium
\n
Previous generation: (not recommended)
\n\t\t\t\t\t\t\n T1 node types:\n\t\t\t\t\t cache.t1.micro
\n
\n M1 node types:\n\t\t\t\t\t\t cache.m1.small
, \n\t\t\t\t\t\t cache.m1.medium
, \n\t\t\t\t\t\t cache.m1.large
,\n\t\t\t\t\t\t cache.m1.xlarge
\n
\n M3 node types:\n \t\t\t\t\t\t cache.m3.medium
,\n \t\t\t\t\t\tcache.m3.large
, \n \t\t\t\t\t\tcache.m3.xlarge
,\n \t\t\t\t\t\tcache.m3.2xlarge
\n
Compute optimized:
\n\n\t\t\t\tPrevious generation: (not recommended)
\n\t\t\t\n C1 node types:\n\t\t\t cache.c1.xlarge
\n
Memory optimized with data tiering:
\n\t\tCurrent generation:
\n\t\t \n\t\t\n R6gd node types (available only for Redis engine version 6.2 onward).
\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t\t\n\t\t \n\t\t cache.r6gd.xlarge
,\n\t\t cache.r6gd.2xlarge
,\n\t\t cache.r6gd.4xlarge
,\n\t\t cache.r6gd.8xlarge
,\n\t\t cache.r6gd.12xlarge
,\n\t\t cache.r6gd.16xlarge
\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t
Memory optimized:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t\n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).
\n\t\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t cache.r6g.large
,\n\t\t\t\t\t\t\tcache.r6g.xlarge
,\n\t\t\t\t\t\t\tcache.r6g.2xlarge
,\n\t\t\t\t\t\t\tcache.r6g.4xlarge
,\n\t\t\t\t\t\t\tcache.r6g.8xlarge
,\n\t\t\t\t\t\t\tcache.r6g.12xlarge
,\n\t\t\t\t\t\t\tcache.r6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n R5 node types:\n \t\t\t\t\t cache.r5.large
,\n \t\t\t\t\t cache.r5.xlarge
,\n \t\t\t\t\t cache.r5.2xlarge
,\n \t\t\t\t\t cache.r5.4xlarge
,\n \t\t\t\t\t cache.r5.12xlarge
,\n \t\t\t\t\t cache.r5.24xlarge
\n
\n R4 node types:\n \t\t\t\t\t cache.r4.large
,\n \t\t\t\t\t cache.r4.xlarge
,\n \t\t\t\t\t cache.r4.2xlarge
,\n \t\t\t\t\t cache.r4.4xlarge
,\n \t\t\t\t\t cache.r4.8xlarge
,\n \t\t\t\t\t cache.r4.16xlarge
\n
Previous generation: (not recommended)
\n\n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge
, \n \t\t\t\t\t\tcache.m2.2xlarge
,\n \t\t\t\t\t\tcache.m2.4xlarge
\n
\n R3 node types:\n \t\t\t\t\t cache.r3.large
, \n \t\t\t\t\t\tcache.r3.xlarge
,\n \t\t\t\t\t\tcache.r3.2xlarge
, \n \t\t\t\t\t\tcache.r3.4xlarge
,\n \t\t\t\t\t\tcache.r3.8xlarge
\n
\n Additional node type info\n
\n\t\tAll current generation instance types are created in Amazon VPC by default.
\nRedis append-only files (AOF) are not supported for T1 or T2 instances.
\nRedis Multi-AZ with automatic failover is not supported on T1 instances.
\nRedis configuration variables appendonly
and \n\t\t\t\tappendfsync
are not supported on Redis version 2.8.22 and later.
This parameter is currently disabled.
" + "smithy.api#documentation": " If you are running Redis engine version 6.0 or later, set this parameter to yes if you want to opt-in to the next auto minor version upgrade campaign. This parameter is disabled for previous versions. \n
" } }, "SnapshotRetentionLimit": { @@ -2262,7 +2262,7 @@ "CacheParameterGroupFamily": { "target": "com.amazonaws.elasticache#String", "traits": { - "smithy.api#documentation": "The name of the cache parameter group family that the cache parameter group can be used with.
\nValid values are: \n memcached1.4
| \n memcached1.5
| \n memcached1.6
| \n redis2.6
| \n redis2.8
|\n redis3.2
|\n redis4.0
|\n redis5.0
| \n redis6.x
| \n
The name of the cache parameter group family that the cache parameter group can be used with.
\nValid values are: \n memcached1.4
| \n memcached1.5
| \n memcached1.6
| \n redis2.6
| \n redis2.8
|\n redis3.2
|\n redis4.0
|\n redis5.0
| \n redis6.0
| \n redis6.2
\n
The compute and memory capacity of the nodes in the node group (shard).
\nThe following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.
\n\t\tGeneral purpose:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\t \n \t\t\t\t\t\t\n M6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).
\n\t\t\t\t\t\t\t\n cache.m6g.large
,\n\t\t\t\t\t\t\tcache.m6g.xlarge
,\n\t\t\t\t\t\t\tcache.m6g.2xlarge
,\n\t\t\t\t\t\t\tcache.m6g.4xlarge
,\n\t\t\t\t\t\t\tcache.m6g.8xlarge
,\n\t\t\t\t\t\t\tcache.m6g.12xlarge
,\n\t\t\t\t\t\t\tcache.m6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n M5 node types:\n \t\t\t\t\t\t cache.m5.large
,\n \t\t\t\t\t\tcache.m5.xlarge
,\n \t\t\t\t\t\tcache.m5.2xlarge
,\n \t\t\t\t\t\tcache.m5.4xlarge
,\n \t\t\t\t\t\tcache.m5.12xlarge
,\n \t\t\t\t\t\tcache.m5.24xlarge
\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
\n M4 node types:\n \t\t\t\t\t\t cache.m4.large
,\n \t\t\t\t\t\tcache.m4.xlarge
,\n \t\t\t\t\t\tcache.m4.2xlarge
,\n \t\t\t\t\t\tcache.m4.4xlarge
,\n \t\t\t\t\t\tcache.m4.10xlarge
\n
\n T3 node types:\n\t\t\t\t\t cache.t3.micro
, \n \t\t\t\t\t\tcache.t3.small
,\n \t\t\t\t\t\tcache.t3.medium
\n
\n T2 node types:\n\t\t\t\t\t cache.t2.micro
, \n \t\t\t\t\t\tcache.t2.small
,\n \t\t\t\t\t\tcache.t2.medium
\n
Previous generation: (not recommended)
\n\t\t\t\t\t\t\n T1 node types:\n\t\t\t\t\t cache.t1.micro
\n
\n M1 node types:\n\t\t\t\t\t\t cache.m1.small
, \n\t\t\t\t\t\t cache.m1.medium
, \n\t\t\t\t\t\t cache.m1.large
,\n\t\t\t\t\t\t cache.m1.xlarge
\n
\n M3 node types:\n \t\t\t\t\t\t cache.m3.medium
,\n \t\t\t\t\t\tcache.m3.large
, \n \t\t\t\t\t\tcache.m3.xlarge
,\n \t\t\t\t\t\tcache.m3.2xlarge
\n
Compute optimized:
\n\n\t\t\t\tPrevious generation: (not recommended)
\n\t\t\t\n C1 node types:\n\t\t\t cache.c1.xlarge
\n
Memory optimized:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\t\t\t\t\t\t\t\n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t cache.r6g.large
,\n\t\t\t\t\t\t\tcache.r6g.xlarge
,\n\t\t\t\t\t\t\tcache.r6g.2xlarge
,\n\t\t\t\t\t\t\tcache.r6g.4xlarge
,\n\t\t\t\t\t\t\tcache.r6g.8xlarge
,\n\t\t\t\t\t\t\tcache.r6g.12xlarge
,\n\t\t\t\t\t\t\tcache.r6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n R5 node types:\n \t\t\t\t\t cache.r5.large
,\n \t\t\t\t\t cache.r5.xlarge
,\n \t\t\t\t\t cache.r5.2xlarge
,\n \t\t\t\t\t cache.r5.4xlarge
,\n \t\t\t\t\t cache.r5.12xlarge
,\n \t\t\t\t\t cache.r5.24xlarge
\n
\n R4 node types:\n \t\t\t\t\t cache.r4.large
,\n \t\t\t\t\t cache.r4.xlarge
,\n \t\t\t\t\t cache.r4.2xlarge
,\n \t\t\t\t\t cache.r4.4xlarge
,\n \t\t\t\t\t cache.r4.8xlarge
,\n \t\t\t\t\t cache.r4.16xlarge
\n
Previous generation: (not recommended)
\n\n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge
, \n \t\t\t\t\t\tcache.m2.2xlarge
,\n \t\t\t\t\t\tcache.m2.4xlarge
\n
\n R3 node types:\n \t\t\t\t\t cache.r3.large
, \n \t\t\t\t\t\tcache.r3.xlarge
,\n \t\t\t\t\t\tcache.r3.2xlarge
, \n \t\t\t\t\t\tcache.r3.4xlarge
,\n \t\t\t\t\t\tcache.r3.8xlarge
\n
\n Additional node type info\n
\n\t\tAll current generation instance types are created in Amazon VPC by default.
\nRedis append-only files (AOF) are not supported for T1 or T2 instances.
\nRedis Multi-AZ with automatic failover is not supported on T1 instances.
\nRedis configuration variables appendonly
and \n\t\t\t\tappendfsync
are not supported on Redis version 2.8.22 and later.
The compute and memory capacity of the nodes in the node group (shard).
\nThe following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.
\n\t\tGeneral purpose:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t\n M6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward):\n\t\t\t\t\t\tcache.m6g.large
,\n\t\t\t\t\t\t\tcache.m6g.xlarge
,\n\t\t\t\t\t\t\tcache.m6g.2xlarge
,\n\t\t\t\t\t\t\tcache.m6g.4xlarge
,\n\t\t\t\t\t\t\tcache.m6g.8xlarge
,\n\t\t\t\t\t\t\tcache.m6g.12xlarge
,\n\t\t\t\t\t\t\tcache.m6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n M5 node types:\n \t\t\t\t\t\t cache.m5.large
,\n \t\t\t\t\t\tcache.m5.xlarge
,\n \t\t\t\t\t\tcache.m5.2xlarge
,\n \t\t\t\t\t\tcache.m5.4xlarge
,\n \t\t\t\t\t\tcache.m5.12xlarge
,\n \t\t\t\t\t\tcache.m5.24xlarge
\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
\n M4 node types:\n \t\t\t\t\t\t cache.m4.large
,\n \t\t\t\t\t\tcache.m4.xlarge
,\n \t\t\t\t\t\tcache.m4.2xlarge
,\n \t\t\t\t\t\tcache.m4.4xlarge
,\n \t\t\t\t\t\tcache.m4.10xlarge
\n
\n T4g node types (available only for Redis engine version 5.0.6 onward and Memcached engine version 1.5.16 onward): \n\t\t\t\t\t cache.t4g.micro
,\n\t\t\t\t\t cache.t4g.small
,\n\t\t\t\t\t cache.t4g.medium
\n\t\t\t\t\t
\n T3 node types:\n\t\t\t\t\t cache.t3.micro
, \n \t\t\t\t\t\tcache.t3.small
,\n \t\t\t\t\t\tcache.t3.medium
\n
\n T2 node types:\n\t\t\t\t\t cache.t2.micro
, \n \t\t\t\t\t\tcache.t2.small
,\n \t\t\t\t\t\tcache.t2.medium
\n
Previous generation: (not recommended)
\n\t\t\t\t\t\t\n T1 node types:\n\t\t\t\t\t cache.t1.micro
\n
\n M1 node types:\n\t\t\t\t\t\t cache.m1.small
, \n\t\t\t\t\t\t cache.m1.medium
, \n\t\t\t\t\t\t cache.m1.large
,\n\t\t\t\t\t\t cache.m1.xlarge
\n
\n M3 node types:\n \t\t\t\t\t\t cache.m3.medium
,\n \t\t\t\t\t\tcache.m3.large
, \n \t\t\t\t\t\tcache.m3.xlarge
,\n \t\t\t\t\t\tcache.m3.2xlarge
\n
Compute optimized:
\n\n\t\t\t\tPrevious generation: (not recommended)
\n\t\t\t\n C1 node types:\n\t\t\t cache.c1.xlarge
\n
Memory optimized with data tiering:
\n\t\tCurrent generation:
\n\t\t \n\t\t\n R6gd node types (available only for Redis engine version 6.2 onward).
\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t\t\n\t\t \n\t\t cache.r6gd.xlarge
,\n\t\t cache.r6gd.2xlarge
,\n\t\t cache.r6gd.4xlarge
,\n\t\t cache.r6gd.8xlarge
,\n\t\t cache.r6gd.12xlarge
,\n\t\t cache.r6gd.16xlarge
\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t
Memory optimized:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\n\t\t\t\t\t \t\t \t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t\n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t cache.r6g.large
,\n\t\t\t\t\t\t\tcache.r6g.xlarge
,\n\t\t\t\t\t\t\tcache.r6g.2xlarge
,\n\t\t\t\t\t\t\tcache.r6g.4xlarge
,\n\t\t\t\t\t\t\tcache.r6g.8xlarge
,\n\t\t\t\t\t\t\tcache.r6g.12xlarge
,\n\t\t\t\t\t\t\tcache.r6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n R5 node types:\n \t\t\t\t\t cache.r5.large
,\n \t\t\t\t\t cache.r5.xlarge
,\n \t\t\t\t\t cache.r5.2xlarge
,\n \t\t\t\t\t cache.r5.4xlarge
,\n \t\t\t\t\t cache.r5.12xlarge
,\n \t\t\t\t\t cache.r5.24xlarge
\n
\n R4 node types:\n \t\t\t\t\t cache.r4.large
,\n \t\t\t\t\t cache.r4.xlarge
,\n \t\t\t\t\t cache.r4.2xlarge
,\n \t\t\t\t\t cache.r4.4xlarge
,\n \t\t\t\t\t cache.r4.8xlarge
,\n \t\t\t\t\t cache.r4.16xlarge
\n
Previous generation: (not recommended)
\n\n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge
, \n \t\t\t\t\t\tcache.m2.2xlarge
,\n \t\t\t\t\t\tcache.m2.4xlarge
\n
\n R3 node types:\n \t\t\t\t\t cache.r3.large
, \n \t\t\t\t\t\tcache.r3.xlarge
,\n \t\t\t\t\t\tcache.r3.2xlarge
, \n \t\t\t\t\t\tcache.r3.4xlarge
,\n \t\t\t\t\t\tcache.r3.8xlarge
\n
\n Additional node type info\n
\n\t\tAll current generation instance types are created in Amazon VPC by default.
\nRedis append-only files (AOF) are not supported for T1 or T2 instances.
\nRedis Multi-AZ with automatic failover is not supported on T1 instances.
\nRedis configuration variables appendonly
and \n\t\t\t\tappendfsync
are not supported on Redis version 2.8.22 and later.
This parameter is currently disabled.
" + "smithy.api#documentation": " If you are running Redis engine version 6.0 or later, set this parameter to yes if you want to opt-in to the next auto minor version upgrade campaign. This parameter is disabled for previous versions. \n
" } }, "SnapshotRetentionLimit": { @@ -2767,6 +2767,12 @@ "traits": { "smithy.api#documentation": "Specifies the destination, format and type of the logs.
" } + }, + "DataTieringEnabled": { + "target": "com.amazonaws.elasticache#BooleanOptional", + "traits": { + "smithy.api#documentation": "Enables data tiering. Data tiering is only supported for replication groups using the r6gd node type. This parameter must be set to true when using r6gd nodes.\n For more information, see Data tiering.
" + } } }, "traits": { @@ -2890,6 +2896,9 @@ { "target": "com.amazonaws.elasticache#InvalidParameterValueException" }, + { + "target": "com.amazonaws.elasticache#ServiceLinkedRoleNotFoundFault" + }, { "target": "com.amazonaws.elasticache#TagQuotaPerResourceExceeded" }, @@ -2901,7 +2910,7 @@ } ], "traits": { - "smithy.api#documentation": "For Redis engine version 6.x onwards: Creates a Redis user. For more information, see Using Role Based Access Control (RBAC).
" + "smithy.api#documentation": "For Redis engine version 6.0 onwards: Creates a Redis user. For more information, see Using Role Based Access Control (RBAC).
" } }, "com.amazonaws.elasticache#CreateUserGroup": { @@ -2922,6 +2931,9 @@ { "target": "com.amazonaws.elasticache#InvalidParameterValueException" }, + { + "target": "com.amazonaws.elasticache#ServiceLinkedRoleNotFoundFault" + }, { "target": "com.amazonaws.elasticache#TagQuotaPerResourceExceeded" }, @@ -2936,7 +2948,7 @@ } ], "traits": { - "smithy.api#documentation": "For Redis engine version 6.x onwards: Creates a Redis user group. For more information, see Using Role Based Access Control (RBAC) \n
" + "smithy.api#documentation": "For Redis engine version 6.0 onwards: Creates a Redis user group. For more information, see Using Role Based Access Control (RBAC) \n
" } }, "com.amazonaws.elasticache#CreateUserGroupMessage": { @@ -3047,6 +3059,21 @@ "target": "com.amazonaws.elasticache#CustomerNodeEndpoint" } }, + "com.amazonaws.elasticache#DataTieringStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "enabled", + "name": "ENABLED" + }, + { + "value": "disabled", + "name": "DISABLED" + } + ] + } + }, "com.amazonaws.elasticache#DecreaseNodeGroupsInGlobalReplicationGroup": { "type": "operation", "input": { @@ -3607,12 +3634,15 @@ { "target": "com.amazonaws.elasticache#InvalidUserStateFault" }, + { + "target": "com.amazonaws.elasticache#ServiceLinkedRoleNotFoundFault" + }, { "target": "com.amazonaws.elasticache#UserNotFoundFault" } ], "traits": { - "smithy.api#documentation": "For Redis engine version 6.x onwards: Deletes a user. The user will be removed from all user groups and in turn removed from all replication groups. For more information, see Using Role Based Access Control (RBAC).
" + "smithy.api#documentation": "For Redis engine version 6.0 onwards: Deletes a user. The user will be removed from all user groups and in turn removed from all replication groups. For more information, see Using Role Based Access Control (RBAC).
" } }, "com.amazonaws.elasticache#DeleteUserGroup": { @@ -3630,12 +3660,15 @@ { "target": "com.amazonaws.elasticache#InvalidUserGroupStateFault" }, + { + "target": "com.amazonaws.elasticache#ServiceLinkedRoleNotFoundFault" + }, { "target": "com.amazonaws.elasticache#UserGroupNotFoundFault" } ], "traits": { - "smithy.api#documentation": "For Redis engine version 6.x onwards: Deletes a user group. The user group must first be disassociated from the replication group before it can be deleted. For more information, see Using Role Based Access Control (RBAC).
" + "smithy.api#documentation": "For Redis engine version 6.0 onwards: Deletes a user group. The user group must first be disassociated from the replication group before it can be deleted. For more information, see Using Role Based Access Control (RBAC).
" } }, "com.amazonaws.elasticache#DeleteUserGroupMessage": { @@ -3908,7 +3941,7 @@ "CacheParameterGroupFamily": { "target": "com.amazonaws.elasticache#String", "traits": { - "smithy.api#documentation": "The name of a specific cache parameter group family to return details for.
\nValid values are: \n memcached1.4
| \n memcached1.5
| \n memcached1.6
| \n redis2.6
| \n redis2.8
|\n redis3.2
|\n redis4.0
|\n redis5.0
| \n redis6.x
| \n
Constraints:
\nMust be 1 to 255 alphanumeric characters
\nFirst character must be a letter
\nCannot end with a hyphen or contain two consecutive hyphens
\nThe name of a specific cache parameter group family to return details for.
\nValid values are: \n memcached1.4
| \n memcached1.5
| \n memcached1.6
| \n redis2.6
| \n redis2.8
|\n redis3.2
|\n redis4.0
|\n redis5.0
| \n redis6.x
| \n redis6.2
\n
Constraints:
\nMust be 1 to 255 alphanumeric characters
\nFirst character must be a letter
\nCannot end with a hyphen or contain two consecutive hyphens
\nThe name of the cache parameter group family.
\nValid values are: \n memcached1.4
| \n memcached1.5
| \n memcached1.6
| \n redis2.6
| \n redis2.8
|\n redis3.2
|\n redis4.0
|\n redis5.0
| \n redis6.x
| \n
The name of the cache parameter group family.
\nValid values are: \n memcached1.4
| \n memcached1.5
| \n memcached1.6
| \n redis2.6
| \n redis2.8
|\n redis3.2
|\n redis4.0
|\n redis5.0
| \n redis6.x
| \n redis6.2
\n
The cache node type filter value. \n Use this parameter to show only those reservations matching the specified cache node type.
\n \nThe following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.
\n\t\tGeneral purpose:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\t \n \t\t\t\t\t\t\n M6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).
\n\t\t\t\t\t\t\t\n cache.m6g.large
,\n\t\t\t\t\t\t\tcache.m6g.xlarge
,\n\t\t\t\t\t\t\tcache.m6g.2xlarge
,\n\t\t\t\t\t\t\tcache.m6g.4xlarge
,\n\t\t\t\t\t\t\tcache.m6g.8xlarge
,\n\t\t\t\t\t\t\tcache.m6g.12xlarge
,\n\t\t\t\t\t\t\tcache.m6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n M5 node types:\n \t\t\t\t\t\t cache.m5.large
,\n \t\t\t\t\t\tcache.m5.xlarge
,\n \t\t\t\t\t\tcache.m5.2xlarge
,\n \t\t\t\t\t\tcache.m5.4xlarge
,\n \t\t\t\t\t\tcache.m5.12xlarge
,\n \t\t\t\t\t\tcache.m5.24xlarge
\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
\n M4 node types:\n \t\t\t\t\t\t cache.m4.large
,\n \t\t\t\t\t\tcache.m4.xlarge
,\n \t\t\t\t\t\tcache.m4.2xlarge
,\n \t\t\t\t\t\tcache.m4.4xlarge
,\n \t\t\t\t\t\tcache.m4.10xlarge
\n
\n T3 node types:\n\t\t\t\t\t cache.t3.micro
, \n \t\t\t\t\t\tcache.t3.small
,\n \t\t\t\t\t\tcache.t3.medium
\n
\n T2 node types:\n\t\t\t\t\t cache.t2.micro
, \n \t\t\t\t\t\tcache.t2.small
,\n \t\t\t\t\t\tcache.t2.medium
\n
Previous generation: (not recommended)
\n\t\t\t\t\t\t\n T1 node types:\n\t\t\t\t\t cache.t1.micro
\n
\n M1 node types:\n\t\t\t\t\t\t cache.m1.small
, \n\t\t\t\t\t\t cache.m1.medium
, \n\t\t\t\t\t\t cache.m1.large
,\n\t\t\t\t\t\t cache.m1.xlarge
\n
\n M3 node types:\n \t\t\t\t\t\t cache.m3.medium
,\n \t\t\t\t\t\tcache.m3.large
, \n \t\t\t\t\t\tcache.m3.xlarge
,\n \t\t\t\t\t\tcache.m3.2xlarge
\n
Compute optimized:
\n\n\t\t\t\tPrevious generation: (not recommended)
\n\t\t\t\n C1 node types:\n\t\t\t cache.c1.xlarge
\n
Memory optimized:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\t\t\t\t\t\t\t\n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t cache.r6g.large
,\n\t\t\t\t\t\t\tcache.r6g.xlarge
,\n\t\t\t\t\t\t\tcache.r6g.2xlarge
,\n\t\t\t\t\t\t\tcache.r6g.4xlarge
,\n\t\t\t\t\t\t\tcache.r6g.8xlarge
,\n\t\t\t\t\t\t\tcache.r6g.12xlarge
,\n\t\t\t\t\t\t\tcache.r6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n R5 node types:\n \t\t\t\t\t cache.r5.large
,\n \t\t\t\t\t cache.r5.xlarge
,\n \t\t\t\t\t cache.r5.2xlarge
,\n \t\t\t\t\t cache.r5.4xlarge
,\n \t\t\t\t\t cache.r5.12xlarge
,\n \t\t\t\t\t cache.r5.24xlarge
\n
\n R4 node types:\n \t\t\t\t\t cache.r4.large
,\n \t\t\t\t\t cache.r4.xlarge
,\n \t\t\t\t\t cache.r4.2xlarge
,\n \t\t\t\t\t cache.r4.4xlarge
,\n \t\t\t\t\t cache.r4.8xlarge
,\n \t\t\t\t\t cache.r4.16xlarge
\n
Previous generation: (not recommended)
\n\n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge
, \n \t\t\t\t\t\tcache.m2.2xlarge
,\n \t\t\t\t\t\tcache.m2.4xlarge
\n
\n R3 node types:\n \t\t\t\t\t cache.r3.large
, \n \t\t\t\t\t\tcache.r3.xlarge
,\n \t\t\t\t\t\tcache.r3.2xlarge
, \n \t\t\t\t\t\tcache.r3.4xlarge
,\n \t\t\t\t\t\tcache.r3.8xlarge
\n
\n Additional node type info\n
\n\t\tAll current generation instance types are created in Amazon VPC by default.
\nRedis append-only files (AOF) are not supported for T1 or T2 instances.
\nRedis Multi-AZ with automatic failover is not supported on T1 instances.
\nRedis configuration variables appendonly
and \n\t\t\t\tappendfsync
are not supported on Redis version 2.8.22 and later.
The cache node type filter value. \n Use this parameter to show only those reservations matching the specified cache node type.
\n \nThe following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.
\n\t\tGeneral purpose:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t\n M6g node types: (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward):\n\t\t\t\t\t cache.m6g.large
,\n\t\t\t\t\t\t\tcache.m6g.xlarge
,\n\t\t\t\t\t\t\tcache.m6g.2xlarge
,\n\t\t\t\t\t\t\tcache.m6g.4xlarge
,\n\t\t\t\t\t\t\tcache.m6g.8xlarge
,\n\t\t\t\t\t\t\tcache.m6g.12xlarge
,\n\t\t\t\t\t\t\tcache.m6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n M5 node types:\n \t\t\t\t\t\t cache.m5.large
,\n \t\t\t\t\t\tcache.m5.xlarge
,\n \t\t\t\t\t\tcache.m5.2xlarge
,\n \t\t\t\t\t\tcache.m5.4xlarge
,\n \t\t\t\t\t\tcache.m5.12xlarge
,\n \t\t\t\t\t\tcache.m5.24xlarge
\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
\n M4 node types:\n \t\t\t\t\t\t cache.m4.large
,\n \t\t\t\t\t\tcache.m4.xlarge
,\n \t\t\t\t\t\tcache.m4.2xlarge
,\n \t\t\t\t\t\tcache.m4.4xlarge
,\n \t\t\t\t\t\tcache.m4.10xlarge
\n
\n T4g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward):\n\t\t\t\t\t cache.t4g.micro
,\n\t\t\t\t\t cache.t4g.small
,\n\t\t\t\t\t cache.t4g.medium
\n\t\t\t\t\t
\n T3 node types:\n\t\t\t\t\t cache.t3.micro
, \n \t\t\t\t\t\tcache.t3.small
,\n \t\t\t\t\t\tcache.t3.medium
\n
\n T2 node types:\n\t\t\t\t\t cache.t2.micro
, \n \t\t\t\t\t\tcache.t2.small
,\n \t\t\t\t\t\tcache.t2.medium
\n
Previous generation: (not recommended)
\n\t\t\t\t\t\t\n T1 node types:\n\t\t\t\t\t cache.t1.micro
\n
\n M1 node types:\n\t\t\t\t\t\t cache.m1.small
, \n\t\t\t\t\t\t cache.m1.medium
, \n\t\t\t\t\t\t cache.m1.large
,\n\t\t\t\t\t\t cache.m1.xlarge
\n
\n M3 node types:\n \t\t\t\t\t\t cache.m3.medium
,\n \t\t\t\t\t\tcache.m3.large
, \n \t\t\t\t\t\tcache.m3.xlarge
,\n \t\t\t\t\t\tcache.m3.2xlarge
\n
Compute optimized:
\n\n\t\t\t\tPrevious generation: (not recommended)
\n\t\t\t\n C1 node types:\n\t\t\t cache.c1.xlarge
\n
Memory optimized with data tiering:
\n\t\tCurrent generation:
\n\t\t \n\t\t\n R6gd node types (available only for Redis engine version 6.2 onward).
\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t\t\n\t\t \n\t\t cache.r6gd.xlarge
,\n\t\t cache.r6gd.2xlarge
,\n\t\t cache.r6gd.4xlarge
,\n\t\t cache.r6gd.8xlarge
,\n\t\t cache.r6gd.12xlarge
,\n\t\t cache.r6gd.16xlarge
\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t
Memory optimized:
\n\t\t\t\tCurrent generation:
\n\t\n\t\t\t\t\t\t\t\t \t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t\n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t cache.r6g.large
,\n\t\t\t\t\t\t\tcache.r6g.xlarge
,\n\t\t\t\t\t\t\tcache.r6g.2xlarge
,\n\t\t\t\t\t\t\tcache.r6g.4xlarge
,\n\t\t\t\t\t\t\tcache.r6g.8xlarge
,\n\t\t\t\t\t\t\tcache.r6g.12xlarge
,\n\t\t\t\t\t\t\tcache.r6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n R5 node types:\n \t\t\t\t\t cache.r5.large
,\n \t\t\t\t\t cache.r5.xlarge
,\n \t\t\t\t\t cache.r5.2xlarge
,\n \t\t\t\t\t cache.r5.4xlarge
,\n \t\t\t\t\t cache.r5.12xlarge
,\n \t\t\t\t\t cache.r5.24xlarge
\n
\n R4 node types:\n \t\t\t\t\t cache.r4.large
,\n \t\t\t\t\t cache.r4.xlarge
,\n \t\t\t\t\t cache.r4.2xlarge
,\n \t\t\t\t\t cache.r4.4xlarge
,\n \t\t\t\t\t cache.r4.8xlarge
,\n \t\t\t\t\t cache.r4.16xlarge
\n
Previous generation: (not recommended)
\n\n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge
, \n \t\t\t\t\t\tcache.m2.2xlarge
,\n \t\t\t\t\t\tcache.m2.4xlarge
\n
\n R3 node types:\n \t\t\t\t\t cache.r3.large
, \n \t\t\t\t\t\tcache.r3.xlarge
,\n \t\t\t\t\t\tcache.r3.2xlarge
, \n \t\t\t\t\t\tcache.r3.4xlarge
,\n \t\t\t\t\t\tcache.r3.8xlarge
\n
\n Additional node type info\n
\n\t\tAll current generation instance types are created in Amazon VPC by default.
\nRedis append-only files (AOF) are not supported for T1 or T2 instances.
\nRedis Multi-AZ with automatic failover is not supported on T1 instances.
\nRedis configuration variables appendonly
and \n\t\t\t\tappendfsync
are not supported on Redis version 2.8.22 and later.
The cache node type filter value. \n Use this parameter to show only the available offerings matching the specified cache node type.
\n\nThe following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.
\n\t\tGeneral purpose:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\t \n \t\t\t\t\t\t\n M6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).
\n\t\t\t\t\t\t\t\n cache.m6g.large
,\n\t\t\t\t\t\t\tcache.m6g.xlarge
,\n\t\t\t\t\t\t\tcache.m6g.2xlarge
,\n\t\t\t\t\t\t\tcache.m6g.4xlarge
,\n\t\t\t\t\t\t\tcache.m6g.8xlarge
,\n\t\t\t\t\t\t\tcache.m6g.12xlarge
,\n\t\t\t\t\t\t\tcache.m6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n M5 node types:\n \t\t\t\t\t\t cache.m5.large
,\n \t\t\t\t\t\tcache.m5.xlarge
,\n \t\t\t\t\t\tcache.m5.2xlarge
,\n \t\t\t\t\t\tcache.m5.4xlarge
,\n \t\t\t\t\t\tcache.m5.12xlarge
,\n \t\t\t\t\t\tcache.m5.24xlarge
\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
\n M4 node types:\n \t\t\t\t\t\t cache.m4.large
,\n \t\t\t\t\t\tcache.m4.xlarge
,\n \t\t\t\t\t\tcache.m4.2xlarge
,\n \t\t\t\t\t\tcache.m4.4xlarge
,\n \t\t\t\t\t\tcache.m4.10xlarge
\n
\n T3 node types:\n\t\t\t\t\t cache.t3.micro
, \n \t\t\t\t\t\tcache.t3.small
,\n \t\t\t\t\t\tcache.t3.medium
\n
\n T2 node types:\n\t\t\t\t\t cache.t2.micro
, \n \t\t\t\t\t\tcache.t2.small
,\n \t\t\t\t\t\tcache.t2.medium
\n
Previous generation: (not recommended)
\n\t\t\t\t\t\t\n T1 node types:\n\t\t\t\t\t cache.t1.micro
\n
\n M1 node types:\n\t\t\t\t\t\t cache.m1.small
, \n\t\t\t\t\t\t cache.m1.medium
, \n\t\t\t\t\t\t cache.m1.large
,\n\t\t\t\t\t\t cache.m1.xlarge
\n
\n M3 node types:\n \t\t\t\t\t\t cache.m3.medium
,\n \t\t\t\t\t\tcache.m3.large
, \n \t\t\t\t\t\tcache.m3.xlarge
,\n \t\t\t\t\t\tcache.m3.2xlarge
\n
Compute optimized:
\n\n\t\t\t\tPrevious generation: (not recommended)
\n\t\t\t\n C1 node types:\n\t\t\t cache.c1.xlarge
\n
Memory optimized:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\t\t\t\t\t\t\t\n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t cache.r6g.large
,\n\t\t\t\t\t\t\tcache.r6g.xlarge
,\n\t\t\t\t\t\t\tcache.r6g.2xlarge
,\n\t\t\t\t\t\t\tcache.r6g.4xlarge
,\n\t\t\t\t\t\t\tcache.r6g.8xlarge
,\n\t\t\t\t\t\t\tcache.r6g.12xlarge
,\n\t\t\t\t\t\t\tcache.r6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n R5 node types:\n \t\t\t\t\t cache.r5.large
,\n \t\t\t\t\t cache.r5.xlarge
,\n \t\t\t\t\t cache.r5.2xlarge
,\n \t\t\t\t\t cache.r5.4xlarge
,\n \t\t\t\t\t cache.r5.12xlarge
,\n \t\t\t\t\t cache.r5.24xlarge
\n
\n R4 node types:\n \t\t\t\t\t cache.r4.large
,\n \t\t\t\t\t cache.r4.xlarge
,\n \t\t\t\t\t cache.r4.2xlarge
,\n \t\t\t\t\t cache.r4.4xlarge
,\n \t\t\t\t\t cache.r4.8xlarge
,\n \t\t\t\t\t cache.r4.16xlarge
\n
Previous generation: (not recommended)
\n\n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge
, \n \t\t\t\t\t\tcache.m2.2xlarge
,\n \t\t\t\t\t\tcache.m2.4xlarge
\n
\n R3 node types:\n \t\t\t\t\t cache.r3.large
, \n \t\t\t\t\t\tcache.r3.xlarge
,\n \t\t\t\t\t\tcache.r3.2xlarge
, \n \t\t\t\t\t\tcache.r3.4xlarge
,\n \t\t\t\t\t\tcache.r3.8xlarge
\n
\n Additional node type info\n
\n\t\tAll current generation instance types are created in Amazon VPC by default.
\nRedis append-only files (AOF) are not supported for T1 or T2 instances.
\nRedis Multi-AZ with automatic failover is not supported on T1 instances.
\nRedis configuration variables appendonly
and \n\t\t\t\tappendfsync
are not supported on Redis version 2.8.22 and later.
The cache node type filter value. \n Use this parameter to show only the available offerings matching the specified cache node type.
\n\nThe following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.
\n\t\tGeneral purpose:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t\n M6g node types: (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward)\tcache.m6g.large
,\n\t\t\t\t\t\t\tcache.m6g.xlarge
,\n\t\t\t\t\t\t\tcache.m6g.2xlarge
,\n\t\t\t\t\t\t\tcache.m6g.4xlarge
,\n\t\t\t\t\t\t\tcache.m6g.8xlarge
,\n\t\t\t\t\t\t\tcache.m6g.12xlarge
,\n\t\t\t\t\t\t\tcache.m6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n M5 node types:\n \t\t\t\t\t\t cache.m5.large
,\n \t\t\t\t\t\tcache.m5.xlarge
,\n \t\t\t\t\t\tcache.m5.2xlarge
,\n \t\t\t\t\t\tcache.m5.4xlarge
,\n \t\t\t\t\t\tcache.m5.12xlarge
,\n \t\t\t\t\t\tcache.m5.24xlarge
\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
\n M4 node types:\n \t\t\t\t\t\t cache.m4.large
,\n \t\t\t\t\t\tcache.m4.xlarge
,\n \t\t\t\t\t\tcache.m4.2xlarge
,\n \t\t\t\t\t\tcache.m4.4xlarge
,\n \t\t\t\t\t\tcache.m4.10xlarge
\n
\n T4g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward):\n\t\t\t\t\t cache.t4g.micro
,\n\t\t\t\t\t cache.t4g.small
,\n\t\t\t\t\t cache.t4g.medium
\n\t\t\t\t\t
\n T3 node types:\n\t\t\t\t\t cache.t3.micro
, \n \t\t\t\t\t\tcache.t3.small
,\n \t\t\t\t\t\tcache.t3.medium
\n
\n T2 node types:\n\t\t\t\t\t cache.t2.micro
, \n \t\t\t\t\t\tcache.t2.small
,\n \t\t\t\t\t\tcache.t2.medium
\n
Previous generation: (not recommended)
\n\t\t\t\t\t\t\n T1 node types:\n\t\t\t\t\t cache.t1.micro
\n
\n M1 node types:\n\t\t\t\t\t\t cache.m1.small
, \n\t\t\t\t\t\t cache.m1.medium
, \n\t\t\t\t\t\t cache.m1.large
,\n\t\t\t\t\t\t cache.m1.xlarge
\n
\n M3 node types:\n \t\t\t\t\t\t cache.m3.medium
,\n \t\t\t\t\t\tcache.m3.large
, \n \t\t\t\t\t\tcache.m3.xlarge
,\n \t\t\t\t\t\tcache.m3.2xlarge
\n
Compute optimized:
\n\n\t\t\t\tPrevious generation: (not recommended)
\n\t\t\t\n C1 node types:\n\t\t\t cache.c1.xlarge
\n
Memory optimized with data tiering:
\n\t\tCurrent generation:
\n\t\t \n\t\t\n R6gd node types (available only for Redis engine version 6.2 onward).
\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t\t\n\t\t \n\t\t cache.r6gd.xlarge
,\n\t\t cache.r6gd.2xlarge
,\n\t\t cache.r6gd.4xlarge
,\n\t\t cache.r6gd.8xlarge
,\n\t\t cache.r6gd.12xlarge
,\n\t\t cache.r6gd.16xlarge
\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t
Memory optimized:
\n\t\t\t\tCurrent generation:
\n\n\n\t\t\t\t\t \t\t\t \t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t\n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t cache.r6g.large
,\n\t\t\t\t\t\t\tcache.r6g.xlarge
,\n\t\t\t\t\t\t\tcache.r6g.2xlarge
,\n\t\t\t\t\t\t\tcache.r6g.4xlarge
,\n\t\t\t\t\t\t\tcache.r6g.8xlarge
,\n\t\t\t\t\t\t\tcache.r6g.12xlarge
,\n\t\t\t\t\t\t\tcache.r6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n R5 node types:\n \t\t\t\t\t cache.r5.large
,\n \t\t\t\t\t cache.r5.xlarge
,\n \t\t\t\t\t cache.r5.2xlarge
,\n \t\t\t\t\t cache.r5.4xlarge
,\n \t\t\t\t\t cache.r5.12xlarge
,\n \t\t\t\t\t cache.r5.24xlarge
\n
\n R4 node types:\n \t\t\t\t\t cache.r4.large
,\n \t\t\t\t\t cache.r4.xlarge
,\n \t\t\t\t\t cache.r4.2xlarge
,\n \t\t\t\t\t cache.r4.4xlarge
,\n \t\t\t\t\t cache.r4.8xlarge
,\n \t\t\t\t\t cache.r4.16xlarge
\n
Previous generation: (not recommended)
\n\n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge
, \n \t\t\t\t\t\tcache.m2.2xlarge
,\n \t\t\t\t\t\tcache.m2.4xlarge
\n
\n R3 node types:\n \t\t\t\t\t cache.r3.large
, \n \t\t\t\t\t\tcache.r3.xlarge
,\n \t\t\t\t\t\tcache.r3.2xlarge
, \n \t\t\t\t\t\tcache.r3.4xlarge
,\n \t\t\t\t\t\tcache.r3.8xlarge
\n
\n Additional node type info\n
\n\t\tAll current generation instance types are created in Amazon VPC by default.
\nRedis append-only files (AOF) are not supported for T1 or T2 instances.
\nRedis Multi-AZ with automatic failover is not supported on T1 instances.
\nRedis configuration variables appendonly
and \n\t\t\t\tappendfsync
are not supported on Redis version 2.8.22 and later.
Specifies the name of the cache parameter group family to which the engine default parameters apply.
\nValid values are: \n memcached1.4
| \n memcached1.5
| \n memcached1.6
| \n redis2.6
| \n redis2.8
|\n redis3.2
|\n redis4.0
|\n redis5.0
| \n redis6.x
| \n
Specifies the name of the cache parameter group family to which the engine default parameters apply.
\nValid values are: \n memcached1.4
| \n memcached1.5
| \n memcached1.6
| \n redis2.6
| \n redis2.8
|\n redis3.2
|\n redis4.0
|\n redis5.0
| \n redis6.0
| \n redis6.2
\n
This parameter is currently disabled.
" + "smithy.api#documentation": " If you are running Redis engine version 6.0 or later, set this parameter to yes if you want to opt-in to the next auto minor version upgrade campaign. This parameter is disabled for previous versions. \n
" } }, "SnapshotRetentionLimit": { @@ -6900,7 +6939,7 @@ "AutoMinorVersionUpgrade": { "target": "com.amazonaws.elasticache#BooleanOptional", "traits": { - "smithy.api#documentation": "This parameter is currently disabled.
" + "smithy.api#documentation": " If you are running Redis engine version 6.0 or later, set this parameter to yes if you want to opt-in to the next auto minor version upgrade campaign. This parameter is disabled for previous versions. \n
" } }, "SnapshotRetentionLimit": { @@ -7087,6 +7126,9 @@ { "target": "com.amazonaws.elasticache#InvalidUserStateFault" }, + { + "target": "com.amazonaws.elasticache#ServiceLinkedRoleNotFoundFault" + }, { "target": "com.amazonaws.elasticache#UserNotFoundFault" } @@ -7119,6 +7161,9 @@ { "target": "com.amazonaws.elasticache#InvalidUserGroupStateFault" }, + { + "target": "com.amazonaws.elasticache#ServiceLinkedRoleNotFoundFault" + }, { "target": "com.amazonaws.elasticache#UserGroupNotFoundFault" }, @@ -8474,6 +8519,12 @@ "traits": { "smithy.api#documentation": "The date and time when the cluster was created.
" } + }, + "DataTiering": { + "target": "com.amazonaws.elasticache#DataTieringStatus", + "traits": { + "smithy.api#documentation": "Enables data tiering. Data tiering is only supported for replication groups using the r6gd node type. This parameter must be set to true when using r6gd nodes.\n For more information, see Data tiering.
" + } } }, "traits": { @@ -8660,7 +8711,7 @@ "CacheNodeType": { "target": "com.amazonaws.elasticache#String", "traits": { - "smithy.api#documentation": "The cache node type for the reserved cache nodes.
\n \nThe following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.
\n\t\tGeneral purpose:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\t \n \t\t\t\t\t\t\n M6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).
\n\t\t\t\t\t\t\t\n cache.m6g.large
,\n\t\t\t\t\t\t\tcache.m6g.xlarge
,\n\t\t\t\t\t\t\tcache.m6g.2xlarge
,\n\t\t\t\t\t\t\tcache.m6g.4xlarge
,\n\t\t\t\t\t\t\tcache.m6g.8xlarge
,\n\t\t\t\t\t\t\tcache.m6g.12xlarge
,\n\t\t\t\t\t\t\tcache.m6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n M5 node types:\n \t\t\t\t\t\t cache.m5.large
,\n \t\t\t\t\t\tcache.m5.xlarge
,\n \t\t\t\t\t\tcache.m5.2xlarge
,\n \t\t\t\t\t\tcache.m5.4xlarge
,\n \t\t\t\t\t\tcache.m5.12xlarge
,\n \t\t\t\t\t\tcache.m5.24xlarge
\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
\n M4 node types:\n \t\t\t\t\t\t cache.m4.large
,\n \t\t\t\t\t\tcache.m4.xlarge
,\n \t\t\t\t\t\tcache.m4.2xlarge
,\n \t\t\t\t\t\tcache.m4.4xlarge
,\n \t\t\t\t\t\tcache.m4.10xlarge
\n
\n T3 node types:\n\t\t\t\t\t cache.t3.micro
, \n \t\t\t\t\t\tcache.t3.small
,\n \t\t\t\t\t\tcache.t3.medium
\n
\n T2 node types:\n\t\t\t\t\t cache.t2.micro
, \n \t\t\t\t\t\tcache.t2.small
,\n \t\t\t\t\t\tcache.t2.medium
\n
Previous generation: (not recommended)
\n\t\t\t\t\t\t\n T1 node types:\n\t\t\t\t\t cache.t1.micro
\n
\n M1 node types:\n\t\t\t\t\t\t cache.m1.small
, \n\t\t\t\t\t\t cache.m1.medium
, \n\t\t\t\t\t\t cache.m1.large
,\n\t\t\t\t\t\t cache.m1.xlarge
\n
\n M3 node types:\n \t\t\t\t\t\t cache.m3.medium
,\n \t\t\t\t\t\tcache.m3.large
, \n \t\t\t\t\t\tcache.m3.xlarge
,\n \t\t\t\t\t\tcache.m3.2xlarge
\n
Compute optimized:
\n\n\t\t\t\tPrevious generation: (not recommended)
\n\t\t\t\n C1 node types:\n\t\t\t cache.c1.xlarge
\n
Memory optimized:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\t\t\t\t\t\t\t\n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t cache.r6g.large
,\n\t\t\t\t\t\t\tcache.r6g.xlarge
,\n\t\t\t\t\t\t\tcache.r6g.2xlarge
,\n\t\t\t\t\t\t\tcache.r6g.4xlarge
,\n\t\t\t\t\t\t\tcache.r6g.8xlarge
,\n\t\t\t\t\t\t\tcache.r6g.12xlarge
,\n\t\t\t\t\t\t\tcache.r6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n R5 node types:\n \t\t\t\t\t cache.r5.large
,\n \t\t\t\t\t cache.r5.xlarge
,\n \t\t\t\t\t cache.r5.2xlarge
,\n \t\t\t\t\t cache.r5.4xlarge
,\n \t\t\t\t\t cache.r5.12xlarge
,\n \t\t\t\t\t cache.r5.24xlarge
\n
\n R4 node types:\n \t\t\t\t\t cache.r4.large
,\n \t\t\t\t\t cache.r4.xlarge
,\n \t\t\t\t\t cache.r4.2xlarge
,\n \t\t\t\t\t cache.r4.4xlarge
,\n \t\t\t\t\t cache.r4.8xlarge
,\n \t\t\t\t\t cache.r4.16xlarge
\n
Previous generation: (not recommended)
\n\n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge
, \n \t\t\t\t\t\tcache.m2.2xlarge
,\n \t\t\t\t\t\tcache.m2.4xlarge
\n
\n R3 node types:\n \t\t\t\t\t cache.r3.large
, \n \t\t\t\t\t\tcache.r3.xlarge
,\n \t\t\t\t\t\tcache.r3.2xlarge
, \n \t\t\t\t\t\tcache.r3.4xlarge
,\n \t\t\t\t\t\tcache.r3.8xlarge
\n
\n Additional node type info\n
\n\t\tAll current generation instance types are created in Amazon VPC by default.
\nRedis append-only files (AOF) are not supported for T1 or T2 instances.
\nRedis Multi-AZ with automatic failover is not supported on T1 instances.
\nRedis configuration variables appendonly
and \n\t\t\t\tappendfsync
are not supported on Redis version 2.8.22 and later.
The cache node type for the reserved cache nodes.
\n \nThe following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.
\n\t\tGeneral purpose:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t\n M6g node types: (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward):\tcache.m6g.large
,\n\t\t\t\t\t\t\tcache.m6g.xlarge
,\n\t\t\t\t\t\t\tcache.m6g.2xlarge
,\n\t\t\t\t\t\t\tcache.m6g.4xlarge
,\n\t\t\t\t\t\t\tcache.m6g.8xlarge
,\n\t\t\t\t\t\t\tcache.m6g.12xlarge
,\n\t\t\t\t\t\t\tcache.m6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n M5 node types:\n \t\t\t\t\t\t cache.m5.large
,\n \t\t\t\t\t\tcache.m5.xlarge
,\n \t\t\t\t\t\tcache.m5.2xlarge
,\n \t\t\t\t\t\tcache.m5.4xlarge
,\n \t\t\t\t\t\tcache.m5.12xlarge
,\n \t\t\t\t\t\tcache.m5.24xlarge
\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
\n M4 node types:\n \t\t\t\t\t\t cache.m4.large
,\n \t\t\t\t\t\tcache.m4.xlarge
,\n \t\t\t\t\t\tcache.m4.2xlarge
,\n \t\t\t\t\t\tcache.m4.4xlarge
,\n \t\t\t\t\t\tcache.m4.10xlarge
\n
\n T4g node types (available only for Redis engine version 5.0.6 onward and Memcached engine version 1.5.16 onward):\n\t\t\t\t\t cache.t4g.micro
,\n\t\t\t\t\t cache.t4g.small
,\n\t\t\t\t\t cache.t4g.medium
\n\t\t\t\t\t
\n T3 node types:\n\t\t\t\t\t cache.t3.micro
, \n \t\t\t\t\t\tcache.t3.small
,\n \t\t\t\t\t\tcache.t3.medium
\n
\n T2 node types:\n\t\t\t\t\t cache.t2.micro
, \n \t\t\t\t\t\tcache.t2.small
,\n \t\t\t\t\t\tcache.t2.medium
\n
Previous generation: (not recommended)
\n\t\t\t\t\t\t\n T1 node types:\n\t\t\t\t\t cache.t1.micro
\n
\n M1 node types:\n\t\t\t\t\t\t cache.m1.small
, \n\t\t\t\t\t\t cache.m1.medium
, \n\t\t\t\t\t\t cache.m1.large
,\n\t\t\t\t\t\t cache.m1.xlarge
\n
\n M3 node types:\n \t\t\t\t\t\t cache.m3.medium
,\n \t\t\t\t\t\tcache.m3.large
, \n \t\t\t\t\t\tcache.m3.xlarge
,\n \t\t\t\t\t\tcache.m3.2xlarge
\n
Compute optimized:
\n\n\t\t\t\tPrevious generation: (not recommended)
\n\t\t\t\n C1 node types:\n\t\t\t cache.c1.xlarge
\n
Memory optimized with data tiering:
\n\t\tCurrent generation:
\n\t\t \n\t\t\n R6gd node types (available only for Redis engine version 6.2 onward).
\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t\t\n\t\t \n\t\t cache.r6gd.xlarge
,\n\t\t cache.r6gd.2xlarge
,\n\t\t cache.r6gd.4xlarge
,\n\t\t cache.r6gd.8xlarge
,\n\t\t cache.r6gd.12xlarge
,\n\t\t cache.r6gd.16xlarge
\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t
Memory optimized:
\n\t\t\t\tCurrent generation:
\n\n\t\n\t\t\t\t\t \n\t\t\t\t\t\n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).
\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t cache.r6g.large
,\n\t\t\t\t\t\t\tcache.r6g.xlarge
,\n\t\t\t\t\t\t\tcache.r6g.2xlarge
,\n\t\t\t\t\t\t\tcache.r6g.4xlarge
,\n\t\t\t\t\t\t\tcache.r6g.8xlarge
,\n\t\t\t\t\t\t\tcache.r6g.12xlarge
,\n\t\t\t\t\t\t\tcache.r6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n R5 node types:\n \t\t\t\t\t cache.r5.large
,\n \t\t\t\t\t cache.r5.xlarge
,\n \t\t\t\t\t cache.r5.2xlarge
,\n \t\t\t\t\t cache.r5.4xlarge
,\n \t\t\t\t\t cache.r5.12xlarge
,\n \t\t\t\t\t cache.r5.24xlarge
\n
\n R4 node types:\n \t\t\t\t\t cache.r4.large
,\n \t\t\t\t\t cache.r4.xlarge
,\n \t\t\t\t\t cache.r4.2xlarge
,\n \t\t\t\t\t cache.r4.4xlarge
,\n \t\t\t\t\t cache.r4.8xlarge
,\n \t\t\t\t\t cache.r4.16xlarge
\n
Previous generation: (not recommended)
\n\n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge
, \n \t\t\t\t\t\tcache.m2.2xlarge
,\n \t\t\t\t\t\tcache.m2.4xlarge
\n
\n R3 node types:\n \t\t\t\t\t cache.r3.large
, \n \t\t\t\t\t\tcache.r3.xlarge
,\n \t\t\t\t\t\tcache.r3.2xlarge
, \n \t\t\t\t\t\tcache.r3.4xlarge
,\n \t\t\t\t\t\tcache.r3.8xlarge
\n
\n Additional node type info\n
\n\t\tAll current generation instance types are created in Amazon VPC by default.
\nRedis append-only files (AOF) are not supported for T1 or T2 instances.
\nRedis Multi-AZ with automatic failover is not supported on T1 instances.
\nRedis configuration variables appendonly
and \n\t\t\t\tappendfsync
are not supported on Redis version 2.8.22 and later.
The cache node type for the reserved cache node.
\nThe following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.
\n\t\tGeneral purpose:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\t \n \t\t\t\t\t\t\n M6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).
\n\t\t\t\t\t\t\t\n cache.m6g.large
,\n\t\t\t\t\t\t\tcache.m6g.xlarge
,\n\t\t\t\t\t\t\tcache.m6g.2xlarge
,\n\t\t\t\t\t\t\tcache.m6g.4xlarge
,\n\t\t\t\t\t\t\tcache.m6g.8xlarge
,\n\t\t\t\t\t\t\tcache.m6g.12xlarge
,\n\t\t\t\t\t\t\tcache.m6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n M5 node types:\n \t\t\t\t\t\t cache.m5.large
,\n \t\t\t\t\t\tcache.m5.xlarge
,\n \t\t\t\t\t\tcache.m5.2xlarge
,\n \t\t\t\t\t\tcache.m5.4xlarge
,\n \t\t\t\t\t\tcache.m5.12xlarge
,\n \t\t\t\t\t\tcache.m5.24xlarge
\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
\n M4 node types:\n \t\t\t\t\t\t cache.m4.large
,\n \t\t\t\t\t\tcache.m4.xlarge
,\n \t\t\t\t\t\tcache.m4.2xlarge
,\n \t\t\t\t\t\tcache.m4.4xlarge
,\n \t\t\t\t\t\tcache.m4.10xlarge
\n
\n T3 node types:\n\t\t\t\t\t cache.t3.micro
, \n \t\t\t\t\t\tcache.t3.small
,\n \t\t\t\t\t\tcache.t3.medium
\n
\n T2 node types:\n\t\t\t\t\t cache.t2.micro
, \n \t\t\t\t\t\tcache.t2.small
,\n \t\t\t\t\t\tcache.t2.medium
\n
Previous generation: (not recommended)
\n\t\t\t\t\t\t\n T1 node types:\n\t\t\t\t\t cache.t1.micro
\n
\n M1 node types:\n\t\t\t\t\t\t cache.m1.small
, \n\t\t\t\t\t\t cache.m1.medium
, \n\t\t\t\t\t\t cache.m1.large
,\n\t\t\t\t\t\t cache.m1.xlarge
\n
\n M3 node types:\n \t\t\t\t\t\t cache.m3.medium
,\n \t\t\t\t\t\tcache.m3.large
, \n \t\t\t\t\t\tcache.m3.xlarge
,\n \t\t\t\t\t\tcache.m3.2xlarge
\n
Compute optimized:
\n\n\t\t\t\tPrevious generation: (not recommended)
\n\t\t\t\n C1 node types:\n\t\t\t cache.c1.xlarge
\n
Memory optimized:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\t\t\t\t\t\t\t\n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t cache.r6g.large
,\n\t\t\t\t\t\t\tcache.r6g.xlarge
,\n\t\t\t\t\t\t\tcache.r6g.2xlarge
,\n\t\t\t\t\t\t\tcache.r6g.4xlarge
,\n\t\t\t\t\t\t\tcache.r6g.8xlarge
,\n\t\t\t\t\t\t\tcache.r6g.12xlarge
,\n\t\t\t\t\t\t\tcache.r6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n R5 node types:\n \t\t\t\t\t cache.r5.large
,\n \t\t\t\t\t cache.r5.xlarge
,\n \t\t\t\t\t cache.r5.2xlarge
,\n \t\t\t\t\t cache.r5.4xlarge
,\n \t\t\t\t\t cache.r5.12xlarge
,\n \t\t\t\t\t cache.r5.24xlarge
\n
\n R4 node types:\n \t\t\t\t\t cache.r4.large
,\n \t\t\t\t\t cache.r4.xlarge
,\n \t\t\t\t\t cache.r4.2xlarge
,\n \t\t\t\t\t cache.r4.4xlarge
,\n \t\t\t\t\t cache.r4.8xlarge
,\n \t\t\t\t\t cache.r4.16xlarge
\n
Previous generation: (not recommended)
\n\n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge
, \n \t\t\t\t\t\tcache.m2.2xlarge
,\n \t\t\t\t\t\tcache.m2.4xlarge
\n
\n R3 node types:\n \t\t\t\t\t cache.r3.large
, \n \t\t\t\t\t\tcache.r3.xlarge
,\n \t\t\t\t\t\tcache.r3.2xlarge
, \n \t\t\t\t\t\tcache.r3.4xlarge
,\n \t\t\t\t\t\tcache.r3.8xlarge
\n
\n Additional node type info\n
\n\t\tAll current generation instance types are created in Amazon VPC by default.
\nRedis append-only files (AOF) are not supported for T1 or T2 instances.
\nRedis Multi-AZ with automatic failover is not supported on T1 instances.
\nRedis configuration variables appendonly
and \n\t\t\t\tappendfsync
are not supported on Redis version 2.8.22 and later.
The cache node type for the reserved cache node.
\nThe following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.
\n\t\tGeneral purpose:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t\n M6g node types: (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward): \tcache.m6g.large
,\n\t\t\t\t\t\t\tcache.m6g.xlarge
,\n\t\t\t\t\t\t\tcache.m6g.2xlarge
,\n\t\t\t\t\t\t\tcache.m6g.4xlarge
,\n\t\t\t\t\t\t\tcache.m6g.8xlarge
,\n\t\t\t\t\t\t\tcache.m6g.12xlarge
,\n\t\t\t\t\t\t\tcache.m6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n M5 node types:\n \t\t\t\t\t\t cache.m5.large
,\n \t\t\t\t\t\tcache.m5.xlarge
,\n \t\t\t\t\t\tcache.m5.2xlarge
,\n \t\t\t\t\t\tcache.m5.4xlarge
,\n \t\t\t\t\t\tcache.m5.12xlarge
,\n \t\t\t\t\t\tcache.m5.24xlarge
\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
\n M4 node types:\n \t\t\t\t\t\t cache.m4.large
,\n \t\t\t\t\t\tcache.m4.xlarge
,\n \t\t\t\t\t\tcache.m4.2xlarge
,\n \t\t\t\t\t\tcache.m4.4xlarge
,\n \t\t\t\t\t\tcache.m4.10xlarge
\n
\n T4g node types (available only for Redis engine version 5.0.6 onward and Memcached engine version 1.5.16 onward):\n\t\t\t\t\t cache.t4g.micro
,\n\t\t\t\t\t cache.t4g.small
,\n\t\t\t\t\t cache.t4g.medium
\n\t\t\t\t\t
\n T3 node types:\n\t\t\t\t\t cache.t3.micro
, \n \t\t\t\t\t\tcache.t3.small
,\n \t\t\t\t\t\tcache.t3.medium
\n
\n T2 node types:\n\t\t\t\t\t cache.t2.micro
, \n \t\t\t\t\t\tcache.t2.small
,\n \t\t\t\t\t\tcache.t2.medium
\n
Previous generation: (not recommended)
\n\t\t\t\t\t\t\n T1 node types:\n\t\t\t\t\t cache.t1.micro
\n
\n M1 node types:\n\t\t\t\t\t\t cache.m1.small
, \n\t\t\t\t\t\t cache.m1.medium
, \n\t\t\t\t\t\t cache.m1.large
,\n\t\t\t\t\t\t cache.m1.xlarge
\n
\n M3 node types:\n \t\t\t\t\t\t cache.m3.medium
,\n \t\t\t\t\t\tcache.m3.large
, \n \t\t\t\t\t\tcache.m3.xlarge
,\n \t\t\t\t\t\tcache.m3.2xlarge
\n
Compute optimized:
\n\n\t\t\t\tPrevious generation: (not recommended)
\n\t\t\t\n C1 node types:\n\t\t\t cache.c1.xlarge
\n
Memory optimized with data tiering:
\n\t\tCurrent generation:
\n\t\t \n\t\t\n R6gd node types (available only for Redis engine version 6.2 onward).
\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t\t\n\t\t \n\t\t cache.r6gd.xlarge
,\n\t\t cache.r6gd.2xlarge
,\n\t\t cache.r6gd.4xlarge
,\n\t\t cache.r6gd.8xlarge
,\n\t\t cache.r6gd.12xlarge
,\n\t\t cache.r6gd.16xlarge
\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t
Memory optimized:
\n\t\t\t\tCurrent generation:
\n\n\t\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t\n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t cache.r6g.large
,\n\t\t\t\t\t\t\tcache.r6g.xlarge
,\n\t\t\t\t\t\t\tcache.r6g.2xlarge
,\n\t\t\t\t\t\t\tcache.r6g.4xlarge
,\n\t\t\t\t\t\t\tcache.r6g.8xlarge
,\n\t\t\t\t\t\t\tcache.r6g.12xlarge
,\n\t\t\t\t\t\t\tcache.r6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n R5 node types:\n \t\t\t\t\t cache.r5.large
,\n \t\t\t\t\t cache.r5.xlarge
,\n \t\t\t\t\t cache.r5.2xlarge
,\n \t\t\t\t\t cache.r5.4xlarge
,\n \t\t\t\t\t cache.r5.12xlarge
,\n \t\t\t\t\t cache.r5.24xlarge
\n
\n R4 node types:\n \t\t\t\t\t cache.r4.large
,\n \t\t\t\t\t cache.r4.xlarge
,\n \t\t\t\t\t cache.r4.2xlarge
,\n \t\t\t\t\t cache.r4.4xlarge
,\n \t\t\t\t\t cache.r4.8xlarge
,\n \t\t\t\t\t cache.r4.16xlarge
\n
Previous generation: (not recommended)
\n\n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge
, \n \t\t\t\t\t\tcache.m2.2xlarge
,\n \t\t\t\t\t\tcache.m2.4xlarge
\n
\n R3 node types:\n \t\t\t\t\t cache.r3.large
, \n \t\t\t\t\t\tcache.r3.xlarge
,\n \t\t\t\t\t\tcache.r3.2xlarge
, \n \t\t\t\t\t\tcache.r3.4xlarge
,\n \t\t\t\t\t\tcache.r3.8xlarge
\n
\n Additional node type info\n
\n\t\tAll current generation instance types are created in Amazon VPC by default.
\nRedis append-only files (AOF) are not supported for T1 or T2 instances.
\nRedis Multi-AZ with automatic failover is not supported on T1 instances.
\nRedis configuration variables appendonly
and \n\t\t\t\tappendfsync
are not supported on Redis version 2.8.22 and later.
The name of the compute and memory capacity node type for the source cluster.
\n \nThe following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.
\n\t\tGeneral purpose:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\t \n \t\t\t\t\t\t\n M6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).
\n\t\t\t\t\t\t\t\n cache.m6g.large
,\n\t\t\t\t\t\t\tcache.m6g.xlarge
,\n\t\t\t\t\t\t\tcache.m6g.2xlarge
,\n\t\t\t\t\t\t\tcache.m6g.4xlarge
,\n\t\t\t\t\t\t\tcache.m6g.8xlarge
,\n\t\t\t\t\t\t\tcache.m6g.12xlarge
,\n\t\t\t\t\t\t\tcache.m6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n M5 node types:\n \t\t\t\t\t\t cache.m5.large
,\n \t\t\t\t\t\tcache.m5.xlarge
,\n \t\t\t\t\t\tcache.m5.2xlarge
,\n \t\t\t\t\t\tcache.m5.4xlarge
,\n \t\t\t\t\t\tcache.m5.12xlarge
,\n \t\t\t\t\t\tcache.m5.24xlarge
\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
\n M4 node types:\n \t\t\t\t\t\t cache.m4.large
,\n \t\t\t\t\t\tcache.m4.xlarge
,\n \t\t\t\t\t\tcache.m4.2xlarge
,\n \t\t\t\t\t\tcache.m4.4xlarge
,\n \t\t\t\t\t\tcache.m4.10xlarge
\n
\n T3 node types:\n\t\t\t\t\t cache.t3.micro
, \n \t\t\t\t\t\tcache.t3.small
,\n \t\t\t\t\t\tcache.t3.medium
\n
\n T2 node types:\n\t\t\t\t\t cache.t2.micro
, \n \t\t\t\t\t\tcache.t2.small
,\n \t\t\t\t\t\tcache.t2.medium
\n
Previous generation: (not recommended)
\n\t\t\t\t\t\t\n T1 node types:\n\t\t\t\t\t cache.t1.micro
\n
\n M1 node types:\n\t\t\t\t\t\t cache.m1.small
, \n\t\t\t\t\t\t cache.m1.medium
, \n\t\t\t\t\t\t cache.m1.large
,\n\t\t\t\t\t\t cache.m1.xlarge
\n
\n M3 node types:\n \t\t\t\t\t\t cache.m3.medium
,\n \t\t\t\t\t\tcache.m3.large
, \n \t\t\t\t\t\tcache.m3.xlarge
,\n \t\t\t\t\t\tcache.m3.2xlarge
\n
Compute optimized:
\n\n\t\t\t\tPrevious generation: (not recommended)
\n\t\t\t\n C1 node types:\n\t\t\t cache.c1.xlarge
\n
Memory optimized:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\t\t\t\t\t\t\t\n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t cache.r6g.large
,\n\t\t\t\t\t\t\tcache.r6g.xlarge
,\n\t\t\t\t\t\t\tcache.r6g.2xlarge
,\n\t\t\t\t\t\t\tcache.r6g.4xlarge
,\n\t\t\t\t\t\t\tcache.r6g.8xlarge
,\n\t\t\t\t\t\t\tcache.r6g.12xlarge
,\n\t\t\t\t\t\t\tcache.r6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n R5 node types:\n \t\t\t\t\t cache.r5.large
,\n \t\t\t\t\t cache.r5.xlarge
,\n \t\t\t\t\t cache.r5.2xlarge
,\n \t\t\t\t\t cache.r5.4xlarge
,\n \t\t\t\t\t cache.r5.12xlarge
,\n \t\t\t\t\t cache.r5.24xlarge
\n
\n R4 node types:\n \t\t\t\t\t cache.r4.large
,\n \t\t\t\t\t cache.r4.xlarge
,\n \t\t\t\t\t cache.r4.2xlarge
,\n \t\t\t\t\t cache.r4.4xlarge
,\n \t\t\t\t\t cache.r4.8xlarge
,\n \t\t\t\t\t cache.r4.16xlarge
\n
Previous generation: (not recommended)
\n\n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge
, \n \t\t\t\t\t\tcache.m2.2xlarge
,\n \t\t\t\t\t\tcache.m2.4xlarge
\n
\n R3 node types:\n \t\t\t\t\t cache.r3.large
, \n \t\t\t\t\t\tcache.r3.xlarge
,\n \t\t\t\t\t\tcache.r3.2xlarge
, \n \t\t\t\t\t\tcache.r3.4xlarge
,\n \t\t\t\t\t\tcache.r3.8xlarge
\n
\n Additional node type info\n
\n\t\tAll current generation instance types are created in Amazon VPC by default.
\nRedis append-only files (AOF) are not supported for T1 or T2 instances.
\nRedis Multi-AZ with automatic failover is not supported on T1 instances.
\nRedis configuration variables appendonly
and \n\t\t\t\tappendfsync
are not supported on Redis version 2.8.22 and later.
The name of the compute and memory capacity node type for the source cluster.
\n \nThe following node types are supported by ElastiCache. \n\t\t\t\tGenerally speaking, the current generation types provide more memory and computational power\n\t\t\tat lower cost when compared to their equivalent previous generation counterparts.
\n\t\tGeneral purpose:
\n\t\t\t\tCurrent generation:
\n\t\t\t\t\t \n\t\t\t\t\t\n M6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).
\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t\t\n cache.m6g.large
,\n\t\t\t\t\t\t\tcache.m6g.xlarge
,\n\t\t\t\t\t\t\tcache.m6g.2xlarge
,\n\t\t\t\t\t\t\tcache.m6g.4xlarge
,\n\t\t\t\t\t\t\tcache.m6g.8xlarge
,\n\t\t\t\t\t\t\tcache.m6g.12xlarge
,\n\t\t\t\t\t\t\tcache.m6g.16xlarge
\n\t\t\t\t\t\t\t\n\t\t\t\t\t
For region availability, see Supported Node Types\n
\n\n M5 node types:\n \t\t\t\t\t\t cache.m5.large
,\n \t\t\t\t\t\tcache.m5.xlarge
,\n \t\t\t\t\t\tcache.m5.2xlarge
,\n \t\t\t\t\t\tcache.m5.4xlarge
,\n \t\t\t\t\t\tcache.m5.12xlarge
,\n \t\t\t\t\t\tcache.m5.24xlarge
\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t\t
\n M4 node types:\n \t\t\t\t\t\t cache.m4.large
,\n \t\t\t\t\t\tcache.m4.xlarge
,\n \t\t\t\t\t\tcache.m4.2xlarge
,\n \t\t\t\t\t\tcache.m4.4xlarge
,\n \t\t\t\t\t\tcache.m4.10xlarge
\n
\n T4g node types (available only for Redis engine version 5.0.6 onward and Memcached engine version 1.5.16 onward):
\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t cache.t4g.micro
,\n\t\t\t\t\t cache.t4g.small
,\n\t\t\t\t\t cache.t4g.medium
\n\t\t\t\t\t
\n T3 node types:\n\t\t\t\t\t cache.t3.micro
, \n \t\t\t\t\t\tcache.t3.small
,\n \t\t\t\t\t\tcache.t3.medium
\n
\n T2 node types:\n\t\t\t\t\t cache.t2.micro
, \n \t\t\t\t\t\tcache.t2.small
,\n \t\t\t\t\t\tcache.t2.medium
\n
Previous generation: (not recommended)
\n\t\t\t\t\t\t\n T1 node types:\n\t\t\t\t\t cache.t1.micro
\n
\n M1 node types:\n\t\t\t\t\t\t cache.m1.small
, \n\t\t\t\t\t\t cache.m1.medium
, \n\t\t\t\t\t\t cache.m1.large
,\n\t\t\t\t\t\t cache.m1.xlarge
\n
\n M3 node types:\n \t\t\t\t\t\t cache.m3.medium
,\n \t\t\t\t\t\tcache.m3.large
, \n \t\t\t\t\t\tcache.m3.xlarge
,\n \t\t\t\t\t\tcache.m3.2xlarge
\n
Compute optimized:
\n\n\t\t\t\tPrevious generation: (not recommended)
\n\t\t\t\n C1 node types:\n\t\t\t cache.c1.xlarge
\n
Memory optimized with data tiering:
\n\t\tCurrent generation:
\n\t\t \n\t\t\n R6gd node types (available only for Redis engine version 6.2 onward).
\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t\t\n\t\t \n\t\t cache.r6gd.xlarge
,\n\t\t cache.r6gd.2xlarge
,\n\t\t cache.r6gd.4xlarge
,\n\t\t cache.r6gd.8xlarge
,\n\t\t cache.r6gd.12xlarge
,\n\t\t cache.r6gd.16xlarge
\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t
Memory optimized:
\n\t\t \n\t\t \n\t\tCurrent generation:
\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t\n R6g node types (available only for Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward).
\n\t\t \n\t\t \n\t\t \n\t\t\t\n\t\t cache.r6g.large
,\n\t\t cache.r6g.xlarge
,\n\t\t cache.r6g.2xlarge
,\n\t\t cache.r6g.4xlarge
,\n\t\t cache.r6g.8xlarge
,\n\t\t cache.r6g.12xlarge
,\n\t\t cache.r6g.16xlarge
\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t
For region availability, see Supported Node Types\n
\nFor region availability, see Supported Node Types\n
\n\n R5 node types:\n \t\t\t\t\t cache.r5.large
,\n \t\t\t\t\t cache.r5.xlarge
,\n \t\t\t\t\t cache.r5.2xlarge
,\n \t\t\t\t\t cache.r5.4xlarge
,\n \t\t\t\t\t cache.r5.12xlarge
,\n \t\t\t\t\t cache.r5.24xlarge
\n
\n R4 node types:\n \t\t\t\t\t cache.r4.large
,\n \t\t\t\t\t cache.r4.xlarge
,\n \t\t\t\t\t cache.r4.2xlarge
,\n \t\t\t\t\t cache.r4.4xlarge
,\n \t\t\t\t\t cache.r4.8xlarge
,\n \t\t\t\t\t cache.r4.16xlarge
\n
Previous generation: (not recommended)
\n\n M2 node types:\t\t\t\t\t\t\n \t\t\t\t\t cache.m2.xlarge
, \n \t\t\t\t\t\tcache.m2.2xlarge
,\n \t\t\t\t\t\tcache.m2.4xlarge
\n
\n R3 node types:\n \t\t\t\t\t cache.r3.large
, \n \t\t\t\t\t\tcache.r3.xlarge
,\n \t\t\t\t\t\tcache.r3.2xlarge
, \n \t\t\t\t\t\tcache.r3.4xlarge
,\n \t\t\t\t\t\tcache.r3.8xlarge
\n
\n Additional node type info\n
\n\t\tAll current generation instance types are created in Amazon VPC by default.
\nRedis append-only files (AOF) are not supported for T1 or T2 instances.
\nRedis Multi-AZ with automatic failover is not supported on T1 instances.
\nRedis configuration variables appendonly
and \n\t\t\t\tappendfsync
are not supported on Redis version 2.8.22 and later.
This parameter is currently disabled.
" + "smithy.api#documentation": " If you are running Redis engine version 6.0 or later, set this parameter to yes if you want to opt-in to the next auto minor version upgrade campaign. This parameter is disabled for previous versions. \n
" } }, "SnapshotRetentionLimit": { @@ -9512,6 +9563,12 @@ "traits": { "smithy.api#documentation": "The ARN (Amazon Resource Name) of the snapshot.
" } + }, + "DataTiering": { + "target": "com.amazonaws.elasticache#DataTieringStatus", + "traits": { + "smithy.api#documentation": "Enables data tiering. Data tiering is only supported for replication groups using the r6gd node type. This parameter must be set to true when using r6gd nodes.\n For more information, see Data tiering.
" + } } }, "traits": { @@ -9905,7 +9962,7 @@ } ], "traits": { - "smithy.api#documentation": "Represents the input of a TestFailover
operation which test automatic failover on\n a specified node group (called shard in the console) in a replication group (called cluster in the console).
\n Note the following\n
\nA customer can use this operation to test automatic failover on up to 5 shards (called node groups in the ElastiCache API and Amazon CLI) \n in any rolling 24-hour period.
\nIf calling this operation on shards in different clusters (called replication groups in the API and CLI), the calls can be made concurrently.
\n\n
If calling this operation multiple times on different shards in the same Redis (cluster mode enabled) replication group, \n the first node replacement must complete before a subsequent call can be made.
\nTo determine whether the node replacement is complete you can check Events using the Amazon ElastiCache console,\n the Amazon CLI, or the ElastiCache API.\n Look for the following automatic failover related events, listed here in order of occurrance:
\nReplication group message: Test Failover API called for node group
\n
Cache cluster message: Failover from primary node
\n
Replication group message: Failover from primary node
\n
Cache cluster message: Recovering cache nodes
\n
Cache cluster message: Finished recovery for cache nodes
\n
For more information see:
\n\n Viewing ElastiCache Events\n in the ElastiCache User Guide\n
\n\n DescribeEvents in the ElastiCache API Reference
\nAlso see, Testing Multi-AZ in the ElastiCache User Guide.
" + "smithy.api#documentation": "Represents the input of a TestFailover
operation which test automatic failover on\n a specified node group (called shard in the console) in a replication group (called cluster in the console).
This API is designed for testing the behavior of your application in case of ElastiCache failover. It is not designed to be an operational tool \n for initiating a failover to overcome a problem you may have with the cluster. Moreover, in certain conditions such as large-scale operational events, Amazon may block this API.
\n\n Note the following\n
\nA customer can use this operation to test automatic failover on up to 5 shards (called node groups in the ElastiCache API and Amazon CLI) \n in any rolling 24-hour period.
\nIf calling this operation on shards in different clusters (called replication groups in the API and CLI), the calls can be made concurrently.
\n\n
If calling this operation multiple times on different shards in the same Redis (cluster mode enabled) replication group, \n the first node replacement must complete before a subsequent call can be made.
\nTo determine whether the node replacement is complete you can check Events using the Amazon ElastiCache console,\n the Amazon CLI, or the ElastiCache API.\n Look for the following automatic failover related events, listed here in order of occurrance:
\nReplication group message: Test Failover API called for node group
\n
Cache cluster message: Failover from primary node
\n
Replication group message: Failover from primary node
\n
Cache cluster message: Recovering cache nodes
\n
Cache cluster message: Finished recovery for cache nodes
\n
For more information see:
\n\n Viewing ElastiCache Events\n in the ElastiCache User Guide\n
\n\n DescribeEvents in the ElastiCache API Reference
\nAlso see, Testing Multi-AZ in the ElastiCache User Guide.
" } }, "com.amazonaws.elasticache#TestFailoverMessage": { @@ -10260,6 +10317,12 @@ "smithy.api#documentation": "The current supported value is Redis.
" } }, + "MinimumEngineVersion": { + "target": "com.amazonaws.elasticache#String", + "traits": { + "smithy.api#documentation": "The minimum engine version required, which is Redis 6.0
" + } + }, "AccessString": { "target": "com.amazonaws.elasticache#String", "traits": { @@ -10330,6 +10393,12 @@ "smithy.api#documentation": "The list of user IDs that belong to the user group.
" } }, + "MinimumEngineVersion": { + "target": "com.amazonaws.elasticache#String", + "traits": { + "smithy.api#documentation": "The minimum engine version required, which is Redis 6.0
" + } + }, "PendingChanges": { "target": "com.amazonaws.elasticache#UserGroupPendingChanges", "traits": { diff --git a/codegen/sdk-codegen/aws-models/elasticloadbalancingv2.2015-12-01.json b/codegen/sdk-codegen/aws-models/elasticloadbalancingv2.2015-12-01.json index d49ea2b7495..708e2009839 100644 --- a/codegen/sdk-codegen/aws-models/elasticloadbalancingv2.2015-12-01.json +++ b/codegen/sdk-codegen/aws-models/elasticloadbalancingv2.2015-12-01.json @@ -933,7 +933,7 @@ "IpAddressType": { "target": "com.amazonaws.elasticloadbalancingv2#IpAddressType", "traits": { - "smithy.api#documentation": "The type of IP addresses used by the subnets for your load balancer. The possible values\n are ipv4
(for IPv4 addresses) and dualstack
(for IPv4 and IPv6\n addresses). Internal load balancers must use ipv4
.
The type of IP addresses used by the subnets for your load balancer. The possible values\n are ipv4
(for IPv4 addresses) and dualstack
(for IPv4 and IPv6\n addresses).
A load balancer distributes incoming traffic across targets, such as your EC2 instances.\n This enables you to increase the availability of your application. The load balancer also\n monitors the health of its registered targets and ensures that it routes traffic only to\n healthy targets. You configure your load balancer to accept incoming traffic by specifying one\n or more listeners, which are configured with a protocol and port number for connections from\n clients to the load balancer. You configure a target group with a protocol and port number for\n connections from the load balancer to the targets, and with health check settings to be used\n when checking the health status of the targets.
\n\nElastic Load Balancing supports the following types of load balancers: Application Load\n Balancers, Network Load Balancers, Gateway Load Balancers, and Classic Load Balancers. This\n reference covers the following load balancer types:
\nApplication Load Balancer - Operates at the application layer (layer 7) and supports\n HTTP and HTTPS.
\nNetwork Load Balancer - Operates at the transport layer (layer 4) and supports TCP,\n TLS, and UDP.
\nGateway Load Balancer - Operates at the network layer (layer 3).
\nFor more information, see the Elastic Load Balancing User\n Guide.
\n\n \n \n\n \n \n\nAll Elastic Load Balancing operations are idempotent, which means that they complete at\n most one time. If you repeat an operation, it succeeds.
", + "smithy.api#title": "Elastic Load Balancing", + "smithy.api#xmlNamespace": { + "uri": "http://elasticloadbalancing.amazonaws.com/doc/2015-12-01/" + } + }, "version": "2015-12-01", "operations": [ { @@ -2352,25 +2370,7 @@ { "target": "com.amazonaws.elasticloadbalancingv2#SetSubnets" } - ], - "traits": { - "aws.api#service": { - "sdkId": "Elastic Load Balancing v2", - "arnNamespace": "elasticloadbalancing", - "cloudFormationName": "ElasticLoadBalancingV2", - "cloudTrailEventSource": "elasticloadbalancingv2.amazonaws.com", - "endpointPrefix": "elasticloadbalancing" - }, - "aws.auth#sigv4": { - "name": "elasticloadbalancing" - }, - "aws.protocols#awsQuery": {}, - "smithy.api#documentation": "A load balancer distributes incoming traffic across targets, such as your EC2 instances.\n This enables you to increase the availability of your application. The load balancer also\n monitors the health of its registered targets and ensures that it routes traffic only to\n healthy targets. You configure your load balancer to accept incoming traffic by specifying one\n or more listeners, which are configured with a protocol and port number for connections from\n clients to the load balancer. You configure a target group with a protocol and port number for\n connections from the load balancer to the targets, and with health check settings to be used\n when checking the health status of the targets.
\n\nElastic Load Balancing supports the following types of load balancers: Application Load\n Balancers, Network Load Balancers, Gateway Load Balancers, and Classic Load Balancers. This\n reference covers the following load balancer types:
\nApplication Load Balancer - Operates at the application layer (layer 7) and supports\n HTTP and HTTPS.
\nNetwork Load Balancer - Operates at the transport layer (layer 4) and supports TCP,\n TLS, and UDP.
\nGateway Load Balancer - Operates at the network layer (layer 3).
\nFor more information, see the Elastic Load Balancing User\n Guide.
\n\n \n \n\n \n \n\nAll Elastic Load Balancing operations are idempotent, which means that they complete at\n most one time. If you repeat an operation, it succeeds.
", - "smithy.api#title": "Elastic Load Balancing", - "smithy.api#xmlNamespace": { - "uri": "http://elasticloadbalancing.amazonaws.com/doc/2015-12-01/" - } - } + ] }, "com.amazonaws.elasticloadbalancingv2#ErrorDescription": { "type": "string" @@ -2961,7 +2961,7 @@ "Key": { "target": "com.amazonaws.elasticloadbalancingv2#LoadBalancerAttributeKey", "traits": { - "smithy.api#documentation": "The name of the attribute.
\n\nThe following attribute is supported by all load balancers:
\n\n deletion_protection.enabled
- Indicates whether deletion protection is\n enabled. The value is true
or false
. The default is\n false
.
The following attributes are supported by both Application Load Balancers and Network Load\n Balancers:
\n\n access_logs.s3.enabled
- Indicates whether access logs are enabled. The\n value is true
or false
. The default is\n false
.
\n access_logs.s3.bucket
- The name of the S3 bucket for the access logs.\n This attribute is required if access logs are enabled. The bucket must exist in the same\n region as the load balancer and have a bucket policy that grants Elastic Load Balancing\n permissions to write to the bucket.
\n access_logs.s3.prefix
- The prefix for the location in the S3 bucket for the\n access logs.
The following attributes are supported by only Application Load Balancers:
\n\n idle_timeout.timeout_seconds
- The idle timeout value, in seconds. The\n valid range is 1-4000 seconds. The default is 60 seconds.
\n routing.http.desync_mitigation_mode
- Determines how the load balancer\n handles requests that might pose a security risk to your application. The possible values\n are monitor
, defensive
, and strictest
. The default\n is defensive
.
\n routing.http.drop_invalid_header_fields.enabled
- Indicates whether HTTP\n headers with invalid header fields are removed by the load balancer (true
) or\n routed to targets (false
). The default is false
.
\n routing.http.x_amzn_tls_version_and_cipher_suite.enabled
- Indicates\n whether the two headers (x-amzn-tls-version
and\n x-amzn-tls-cipher-suite
), which contain information about the negotiated\n TLS version and cipher suite, are added to the client request before sending it to the\n target. The x-amzn-tls-version
header has information about the TLS protocol\n version negotiated with the client, and the x-amzn-tls-cipher-suite
header\n has information about the cipher suite negotiated with the client. Both headers are in\n OpenSSL format. The possible values for the attribute are true
and\n false
. The default is false
.
\n routing.http.xff_client_port.enabled
- Indicates whether the\n X-Forwarded-For
header should preserve the source port that the client used\n to connect to the load balancer. The possible values are true
and\n false
. The default is false
.
\n routing.http2.enabled
- Indicates whether HTTP/2 is enabled. The possible\n values are true
and false
. The default is true
.\n Elastic Load Balancing requires that message header names contain only alphanumeric\n characters and hyphens.
\n waf.fail_open.enabled
- Indicates whether to allow a WAF-enabled load\n balancer to route requests to targets if it is unable to forward the request to Amazon Web Services WAF. The possible values are true
and false
. The\n default is false
.
The following attribute is supported by Network Load Balancers and Gateway Load\n Balancers:
\n\n load_balancing.cross_zone.enabled
- Indicates whether cross-zone load\n balancing is enabled. The possible values are true
and false
.\n The default is false
.
The name of the attribute.
\n\nThe following attribute is supported by all load balancers:
\n\n deletion_protection.enabled
- Indicates whether deletion protection is\n enabled. The value is true
or false
. The default is\n false
.
The following attributes are supported by both Application Load Balancers and Network Load\n Balancers:
\n\n access_logs.s3.enabled
- Indicates whether access logs are enabled. The\n value is true
or false
. The default is\n false
.
\n access_logs.s3.bucket
- The name of the S3 bucket for the access logs.\n This attribute is required if access logs are enabled. The bucket must exist in the same\n region as the load balancer and have a bucket policy that grants Elastic Load Balancing\n permissions to write to the bucket.
\n access_logs.s3.prefix
- The prefix for the location in the S3 bucket for the\n access logs.
\n ipv6.deny-all-igw-traffic
- Blocks internet gateway (IGW) access to the\n load balancer. It is set to false
for internet-facing load balancers and\n true
for internal load balancers, preventing unintended access to your\n internal load balancer through an internet gateway.
The following attributes are supported by only Application Load Balancers:
\n\n idle_timeout.timeout_seconds
- The idle timeout value, in seconds. The\n valid range is 1-4000 seconds. The default is 60 seconds.
\n routing.http.desync_mitigation_mode
- Determines how the load balancer\n handles requests that might pose a security risk to your application. The possible values\n are monitor
, defensive
, and strictest
. The default\n is defensive
.
\n routing.http.drop_invalid_header_fields.enabled
- Indicates whether HTTP\n headers with invalid header fields are removed by the load balancer (true
) or\n routed to targets (false
). The default is false
.
\n routing.http.x_amzn_tls_version_and_cipher_suite.enabled
- Indicates\n whether the two headers (x-amzn-tls-version
and\n x-amzn-tls-cipher-suite
), which contain information about the negotiated\n TLS version and cipher suite, are added to the client request before sending it to the\n target. The x-amzn-tls-version
header has information about the TLS protocol\n version negotiated with the client, and the x-amzn-tls-cipher-suite
header\n has information about the cipher suite negotiated with the client. Both headers are in\n OpenSSL format. The possible values for the attribute are true
and\n false
. The default is false
.
\n routing.http.xff_client_port.enabled
- Indicates whether the\n X-Forwarded-For
header should preserve the source port that the client used\n to connect to the load balancer. The possible values are true
and\n false
. The default is false
.
\n routing.http2.enabled
- Indicates whether HTTP/2 is enabled. The possible\n values are true
and false
. The default is true
.\n Elastic Load Balancing requires that message header names contain only alphanumeric\n characters and hyphens.
\n waf.fail_open.enabled
- Indicates whether to allow a WAF-enabled load\n balancer to route requests to targets if it is unable to forward the request to Amazon Web Services WAF. The possible values are true
and false
. The\n default is false
.
The following attribute is supported by Network Load Balancers and Gateway Load\n Balancers:
\n\n load_balancing.cross_zone.enabled
- Indicates whether cross-zone load\n balancing is enabled. The possible values are true
and false
.\n The default is false
.
The IP address type. The possible values are ipv4
(for IPv4 addresses) and\n dualstack
(for IPv4 and IPv6 addresses). Internal load balancers must use\n ipv4
. You can’t specify dualstack
for a load balancer with a UDP\n or TCP_UDP listener.
The IP address type. The possible values are ipv4
(for IPv4 addresses) and\n dualstack
(for IPv4 and IPv6 addresses).\n You can’t specify\n dualstack
for a load balancer with a UDP or TCP_UDP listener.
[Network Load Balancers] The type of IP addresses used by the subnets for your load\n balancer. The possible values are ipv4
(for IPv4 addresses) and\n dualstack
(for IPv4 and IPv6 addresses). You can’t specify\n dualstack
for a load balancer with a UDP or TCP_UDP listener. Internal load\n balancers must use ipv4
.
[Network Load Balancers] The type of IP addresses used by the subnets for your load\n balancer. The possible values are ipv4
(for IPv4 addresses) and\n dualstack
(for IPv4 and IPv6 addresses). You can’t specify\n dualstack
for a load balancer with a UDP or TCP_UDP listener.\n .
\n The supported load balancers.\n
" + "smithy.api#documentation": "The supported load balancers.
" } } }, @@ -4645,7 +4645,7 @@ "AvailabilityZone": { "target": "com.amazonaws.elasticloadbalancingv2#ZoneName", "traits": { - "smithy.api#documentation": "An Availability Zone or all
. This determines whether the target receives\n traffic from the load balancer nodes in the specified Availability Zone or from all enabled\n Availability Zones for the load balancer.
This parameter is not supported if the target type of the target group is\n instance
or alb
.
If the target type is ip
and the IP address is in a subnet of the VPC for the\n target group, the Availability Zone is automatically detected and this parameter is optional.\n If the IP address is outside the VPC, this parameter is required.
With an Application Load Balancer, if the target type is ip
and the IP\n address is outside the VPC for the target group, the only supported value is\n all
.
If the target type is lambda
, this parameter is optional and the only\n supported value is all
.
An Availability Zone or all
. This determines whether the target receives\n traffic from the load balancer nodes in the specified Availability Zone or from all enabled\n Availability Zones for the load balancer.
This parameter is not supported if the target type of the target group is\n instance
or alb
.
If the target type is ip
and the IP address is in a subnet of the VPC for the\n target group, the Availability Zone is automatically detected and this parameter is optional.\n If the IP address is outside the VPC, this parameter is required.
With an Application Load Balancer, if the target type is ip
and the IP\n address is outside the VPC for the target group, the only supported value is\n all
.
If the target type is lambda
, this parameter is optional and the only\n supported value is all
.
\n Specifies the deployment mechanism through which the update shall be applied on the domain.\n Possible responses are\n Blue/Green
(The update will require a blue/green deployment.)\n DynamicUpdate
(The update can be applied in-place without a Blue/Green deployment required.)\n Undetermined
(The domain is undergoing an update which needs to complete before the deployment type can be predicted.)\n None
(The configuration change matches the current configuration and will not result in any update.)\n
Contains an optional message associated with the DryRunResults.
" + } + } + } + }, "com.amazonaws.elasticsearchservice#Duration": { "type": "structure", "members": { @@ -4834,6 +4866,15 @@ "smithy.api#documentation": "\n Maximum number of Instances that can be instantiated for given InstanceType.\n
" } }, + "com.amazonaws.elasticsearchservice#Message": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + } + } + }, "com.amazonaws.elasticsearchservice#MinimumInstanceCount": { "type": "integer", "traits": { @@ -6393,6 +6434,12 @@ "traits": { "smithy.api#documentation": "Specifies Auto-Tune options.
" } + }, + "DryRun": { + "target": "com.amazonaws.elasticsearchservice#DryRun", + "traits": { + "smithy.api#documentation": "\n This flag, when set to True, specifies whether the UpdateElasticsearchDomain
request should return the results of validation checks without actually applying the change.\n This flag, when set to True, specifies the deployment mechanism through which the update shall be applied on the domain.\n This will not actually perform the Update.\n
The status of the updated Elasticsearch domain.
", "smithy.api#required": {} } + }, + "DryRunResults": { + "target": "com.amazonaws.elasticsearchservice#DryRunResults", + "traits": { + "smithy.api#documentation": "Contains result of DryRun.
" + } } }, "traits": { diff --git a/codegen/sdk-codegen/aws-models/evidently.2021-02-01.json b/codegen/sdk-codegen/aws-models/evidently.2021-02-01.json new file mode 100644 index 00000000000..3b532430f8a --- /dev/null +++ b/codegen/sdk-codegen/aws-models/evidently.2021-02-01.json @@ -0,0 +1,5315 @@ +{ + "smithy": "1.0", + "shapes": { + "com.amazonaws.evidently#AccessDeniedException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "You do not have sufficient permissions to perform this action.
", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.evidently#Arn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2048 + }, + "smithy.api#pattern": "arn:[^:]*:[^:]*:[^:]*:[^:]*:.*" + } + }, + "com.amazonaws.evidently#BatchEvaluateFeature": { + "type": "operation", + "input": { + "target": "com.amazonaws.evidently#BatchEvaluateFeatureRequest" + }, + "output": { + "target": "com.amazonaws.evidently#BatchEvaluateFeatureResponse" + }, + "errors": [ + { + "target": "com.amazonaws.evidently#AccessDeniedException" + }, + { + "target": "com.amazonaws.evidently#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.evidently#ThrottlingException" + }, + { + "target": "com.amazonaws.evidently#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "This operation assigns feature variation to user sessions. For each user session, you pass\n in an entityID
that represents the user. Evidently then checks the evaluation\n rules and assigns the variation.
The first rules that are evaluated are the override rules. If the user's\n entityID
matches an override rule, the user is served the variation specified\n by that rule.
Next, if there is a launch of the feature, the user might be assigned to a variation in\n the launch. The chance of this depends on the percentage of users that are allocated to that\n launch. If the user is enrolled in the launch, the variation they are served depends on the\n allocation of the various feature variations used for the launch.
\nIf the user is not assigned to a launch, and there is an ongoing experiment for this feature, the user might \n be assigned to a variation in the experiment. The chance of this\n depends on the percentage of users that are allocated to that experiment. If the user is enrolled in the experiment, \n the variation they are served depends on the allocation of the various feature variations used for the experiment.
\nIf the user is not assigned to a launch or experiment, they are served the default variation.
", + "smithy.api#endpoint": { + "hostPrefix": "dataplane." + }, + "smithy.api#http": { + "method": "POST", + "uri": "/projects/{project}/evaluations", + "code": 200 + }, + "smithy.api#tags": [ + "dataplane" + ] + } + }, + "com.amazonaws.evidently#BatchEvaluateFeatureRequest": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef", + "traits": { + "smithy.api#documentation": "The name or ARN of the project that contains the feature being evaluated.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "requests": { + "target": "com.amazonaws.evidently#EvaluationRequestsList", + "traits": { + "smithy.api#documentation": "An array of structures, where each structure assigns a feature variation to one user session.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.evidently#BatchEvaluateFeatureResponse": { + "type": "structure", + "members": { + "results": { + "target": "com.amazonaws.evidently#EvaluationResultsList", + "traits": { + "smithy.api#documentation": "An array of structures, where each structure displays the results of one feature evaluation\n assignment to one user session.
" + } + } + } + }, + "com.amazonaws.evidently#ChangeDirectionEnum": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "INCREASE", + "name": "INCREASE" + }, + { + "value": "DECREASE", + "name": "DECREASE" + } + ] + } + }, + "com.amazonaws.evidently#CloudWatchLogsDestination": { + "type": "structure", + "members": { + "logGroup": { + "target": "com.amazonaws.evidently#CwLogGroupSafeName", + "traits": { + "smithy.api#documentation": "The name of the log group where the project stores evaluation\n events.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A structure containing the CloudWatch Logs log group where the project stores evaluation\n events.
" + } + }, + "com.amazonaws.evidently#CloudWatchLogsDestinationConfig": { + "type": "structure", + "members": { + "logGroup": { + "target": "com.amazonaws.evidently#CwLogGroupSafeName", + "traits": { + "smithy.api#documentation": "The name of the log group where the project stores evaluation\n events.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A structure containing the CloudWatch Logs log group where the project stores evaluation\n events.
" + } + }, + "com.amazonaws.evidently#ConflictException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + }, + "resourceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ID of the resource that caused the exception.
" + } + }, + "resourceType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The type of the resource that is associated with the error.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A resource was in an inconsistent state during an update or a deletion.
", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.evidently#CreateExperiment": { + "type": "operation", + "input": { + "target": "com.amazonaws.evidently#CreateExperimentRequest" + }, + "output": { + "target": "com.amazonaws.evidently#CreateExperimentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.evidently#AccessDeniedException" + }, + { + "target": "com.amazonaws.evidently#ConflictException" + }, + { + "target": "com.amazonaws.evidently#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.evidently#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.evidently#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Creates an Evidently experiment. Before you create an experiment,\n you must create the feature to use for the experiment.
\nAn experiment helps you make feature design \n decisions based on evidence and data. An experiment can test as\n many as five variations at once. Evidently collects experiment data and analyzes it by statistical methods, and provides\n clear recommendations about which variations perform better.
\nDon't use this operation to update an existing experiment. Instead, use \n UpdateExperiment.
", + "smithy.api#http": { + "method": "POST", + "uri": "/projects/{project}/experiments", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.evidently#CreateExperimentRequest": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef", + "traits": { + "smithy.api#documentation": "The name or ARN of the project that you want to create the new experiment in.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.evidently#ExperimentName", + "traits": { + "smithy.api#documentation": "A name for the new experiment.
", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.evidently#Description", + "traits": { + "smithy.api#documentation": "An optional description of the experiment.
" + } + }, + "treatments": { + "target": "com.amazonaws.evidently#TreatmentConfigList", + "traits": { + "smithy.api#documentation": "An array of structures that describe the configuration of each feature variation used in the experiment.
", + "smithy.api#required": {} + } + }, + "metricGoals": { + "target": "com.amazonaws.evidently#MetricGoalConfigList", + "traits": { + "smithy.api#documentation": "An array of structures that defines the metrics used for the experiment, and whether a higher\n or lower value for each metric is the goal.
", + "smithy.api#required": {} + } + }, + "randomizationSalt": { + "target": "com.amazonaws.evidently#RandomizationSalt", + "traits": { + "smithy.api#documentation": "When Evidently assigns a particular user session to an experiment, it must use a randomization ID\n to determine which variation the user session is served. This randomization ID is a combination of the entity ID\n and randomizationSalt
. If you omit randomizationSalt
, Evidently uses\n the experiment name as the randomizationSalt
.
The portion of the available audience that you want to allocate to this experiment, in thousandths of a percent. The available audience\n is the total audience minus the audience that you have allocated to overrides or current launches of\n this feature.
\nThis is represented in thousandths of a percent. For example, specify 10,000 to allocate 10% of the available audience.
" + } + }, + "onlineAbConfig": { + "target": "com.amazonaws.evidently#OnlineAbConfig", + "traits": { + "smithy.api#documentation": "A structure that contains the configuration of which variation to use as the \"control\"\n version. tThe \"control\" version is used for comparison with other variations. This structure\n also specifies how much experiment traffic is allocated to each variation.
" + } + }, + "tags": { + "target": "com.amazonaws.evidently#TagMap", + "traits": { + "smithy.api#documentation": "Assigns one or more tags (key-value pairs) to the experiment.
\nTags can help you organize and categorize your resources. You can also use them to scope user\n permissions by granting a user\n permission to access or change only resources with certain tag values.
\nTags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.
\n \nYou can associate as many as 50 tags with an experiment.
\nFor more information, see Tagging Amazon Web Services resources.
" + } + } + } + }, + "com.amazonaws.evidently#CreateExperimentResponse": { + "type": "structure", + "members": { + "experiment": { + "target": "com.amazonaws.evidently#Experiment", + "traits": { + "smithy.api#documentation": "A structure containing the configuration details of the experiment\n that you created.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.evidently#CreateFeature": { + "type": "operation", + "input": { + "target": "com.amazonaws.evidently#CreateFeatureRequest" + }, + "output": { + "target": "com.amazonaws.evidently#CreateFeatureResponse" + }, + "errors": [ + { + "target": "com.amazonaws.evidently#AccessDeniedException" + }, + { + "target": "com.amazonaws.evidently#ConflictException" + }, + { + "target": "com.amazonaws.evidently#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.evidently#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.evidently#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Creates an Evidently feature that you want to launch or test. You can define up to \n five variations of a feature, and use these variations in your launches and experiments. A feature must be created in\n a project. For information about creating a project, see CreateProject.
\nDon't use this operation to update an existing feature. Instead, use \n UpdateFeature.
", + "smithy.api#http": { + "method": "POST", + "uri": "/projects/{project}/features", + "code": 200 + } + } + }, + "com.amazonaws.evidently#CreateFeatureRequest": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef", + "traits": { + "smithy.api#documentation": "The name or ARN of the project that is to contain the new feature.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.evidently#FeatureName", + "traits": { + "smithy.api#documentation": "The name for the new feature.
", + "smithy.api#required": {} + } + }, + "evaluationStrategy": { + "target": "com.amazonaws.evidently#FeatureEvaluationStrategy", + "traits": { + "smithy.api#documentation": "Specify ALL_RULES
to activate the traffic allocation specified by any\n ongoing launches or experiments. Specify DEFAULT_VARIATION
to serve the default\n variation to all users instead.
An optional description of the feature.
" + } + }, + "variations": { + "target": "com.amazonaws.evidently#VariationConfigsList", + "traits": { + "smithy.api#documentation": "An array of structures that contain the configuration of the feature's different variations.
", + "smithy.api#required": {} + } + }, + "defaultVariation": { + "target": "com.amazonaws.evidently#VariationName", + "traits": { + "smithy.api#documentation": "The name of the variation to use as the default variation. The default\n variation is served to users who are not allocated to any ongoing launches\n or experiments of this feature.
\nThis variation must also be listed in the variations
structure.
If you omit defaultVariation
, the first variation listed in\n the variations
structure is used as the default variation.
Assigns one or more tags (key-value pairs) to the feature.
\nTags can help you organize and categorize your resources. You can also use them to scope user\n permissions by granting a user\n permission to access or change only resources with certain tag values.
\nTags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.
\n \nYou can associate as many as 50 tags with a feature.
\nFor more information, see Tagging Amazon Web Services resources.
" + } + }, + "entityOverrides": { + "target": "com.amazonaws.evidently#EntityOverrideMap", + "traits": { + "smithy.api#documentation": "Specify users that should always be served a specific variation of a feature. Each user\n is specified by a key-value pair . For each key, specify a user by entering their user ID,\n account ID, or some other identifier. For the value, specify the name of the variation that\n they are to be served.
" + } + } + } + }, + "com.amazonaws.evidently#CreateFeatureResponse": { + "type": "structure", + "members": { + "feature": { + "target": "com.amazonaws.evidently#Feature", + "traits": { + "smithy.api#documentation": "A structure that contains information about the new feature.
" + } + } + } + }, + "com.amazonaws.evidently#CreateLaunch": { + "type": "operation", + "input": { + "target": "com.amazonaws.evidently#CreateLaunchRequest" + }, + "output": { + "target": "com.amazonaws.evidently#CreateLaunchResponse" + }, + "errors": [ + { + "target": "com.amazonaws.evidently#AccessDeniedException" + }, + { + "target": "com.amazonaws.evidently#ConflictException" + }, + { + "target": "com.amazonaws.evidently#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.evidently#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.evidently#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Creates a launch of a given feature. Before you create a launch, you\n must create the feature to use for the launch.
\nYou can use a launch to safely validate new features by serving them to a specified\n percentage of your users while you roll out the feature. You can monitor the performance of\n the new feature to help you decide when to ramp up traffic to more users. This helps you\n reduce risk and identify unintended consequences before you fully launch the feature.
\nDon't use this operation to update an existing launch. Instead, use \n UpdateLaunch.
", + "smithy.api#http": { + "method": "POST", + "uri": "/projects/{project}/launches", + "code": 200 + } + } + }, + "com.amazonaws.evidently#CreateLaunchRequest": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef", + "traits": { + "smithy.api#documentation": "The name or ARN of the project that you want to create the launch in.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.evidently#LaunchName", + "traits": { + "smithy.api#documentation": "The name for the new launch.
", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.evidently#Description", + "traits": { + "smithy.api#documentation": "An optional description for the launch.
" + } + }, + "scheduledSplitsConfig": { + "target": "com.amazonaws.evidently#ScheduledSplitsLaunchConfig", + "traits": { + "smithy.api#documentation": "An array of structures that define the traffic allocation percentages among the feature\n variations during each step of the launch.
" + } + }, + "metricMonitors": { + "target": "com.amazonaws.evidently#MetricMonitorConfigList", + "traits": { + "smithy.api#documentation": "An array of structures that define the metrics that will be used to monitor \n the launch performance.
" + } + }, + "groups": { + "target": "com.amazonaws.evidently#LaunchGroupConfigList", + "traits": { + "smithy.api#documentation": "An array of structures that contains the feature and variations that are to be used for the launch.
", + "smithy.api#required": {} + } + }, + "randomizationSalt": { + "target": "com.amazonaws.evidently#RandomizationSalt", + "traits": { + "smithy.api#documentation": "When Evidently assigns a particular user session to a launch, it must use a randomization ID\n to determine which variation the user session is served. This randomization ID is a combination of the entity ID\n and randomizationSalt
. If you omit randomizationSalt
, Evidently uses\n the launch name as the randomizationsSalt
.
Assigns one or more tags (key-value pairs) to the launch.
\nTags can help you organize and categorize your resources. You can also use them to scope user\n permissions by granting a user\n permission to access or change only resources with certain tag values.
\nTags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.
\n \nYou can associate as many as 50 tags with a launch.
\nFor more information, see Tagging Amazon Web Services resources.
" + } + } + } + }, + "com.amazonaws.evidently#CreateLaunchResponse": { + "type": "structure", + "members": { + "launch": { + "target": "com.amazonaws.evidently#Launch", + "traits": { + "smithy.api#documentation": "A structure that contains the configuration of the launch that was created.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.evidently#CreateProject": { + "type": "operation", + "input": { + "target": "com.amazonaws.evidently#CreateProjectRequest" + }, + "output": { + "target": "com.amazonaws.evidently#CreateProjectResponse" + }, + "errors": [ + { + "target": "com.amazonaws.evidently#AccessDeniedException" + }, + { + "target": "com.amazonaws.evidently#ConflictException" + }, + { + "target": "com.amazonaws.evidently#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.evidently#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Creates a project, which is the logical object in Evidently that can contain features, launches, and \n experiments. Use projects to group similar features together.
\nTo update an existing project, use UpdateProject.
", + "smithy.api#http": { + "method": "POST", + "uri": "/projects", + "code": 200 + } + } + }, + "com.amazonaws.evidently#CreateProjectRequest": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.evidently#ProjectName", + "traits": { + "smithy.api#documentation": "The name for the project.
", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.evidently#Description", + "traits": { + "smithy.api#documentation": "An optional description of the project.
" + } + }, + "dataDelivery": { + "target": "com.amazonaws.evidently#ProjectDataDeliveryConfig", + "traits": { + "smithy.api#documentation": "A structure that contains information about where Evidently is to store\n evaluation events for longer term storage, if you choose to do so. If you choose\n not to store these events, Evidently deletes them after using them to produce metrics and other experiment\n results that you can view.
" + } + }, + "tags": { + "target": "com.amazonaws.evidently#TagMap", + "traits": { + "smithy.api#documentation": "Assigns one or more tags (key-value pairs) to the project.
\nTags can help you organize and categorize your resources. You can also use them to scope user\n permissions by granting a user\n permission to access or change only resources with certain tag values.
\nTags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.
\n \nYou can associate as many as 50 tags with a project.
\nFor more information, see Tagging Amazon Web Services resources.
" + } + } + } + }, + "com.amazonaws.evidently#CreateProjectResponse": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#Project", + "traits": { + "smithy.api#documentation": "A structure that contains information about the created project.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.evidently#CwDimensionSafeName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[\\S]+$" + } + }, + "com.amazonaws.evidently#CwLogGroupSafeName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 512 + }, + "smithy.api#pattern": "^[-a-zA-Z0-9._/]+$" + } + }, + "com.amazonaws.evidently#DeleteExperiment": { + "type": "operation", + "input": { + "target": "com.amazonaws.evidently#DeleteExperimentRequest" + }, + "output": { + "target": "com.amazonaws.evidently#DeleteExperimentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.evidently#AccessDeniedException" + }, + { + "target": "com.amazonaws.evidently#ConflictException" + }, + { + "target": "com.amazonaws.evidently#InternalServerException" + }, + { + "target": "com.amazonaws.evidently#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.evidently#ServiceUnavailableException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes an Evidently experiment. The feature used for the experiment is not deleted.
\nTo stop an experiment without deleting it, use StopExperiment.
", + "smithy.api#http": { + "method": "DELETE", + "uri": "/projects/{project}/experiments/{experiment}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.evidently#DeleteExperimentRequest": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef", + "traits": { + "smithy.api#documentation": "The name or ARN of the project that contains the experiment to delete.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "experiment": { + "target": "com.amazonaws.evidently#ExperimentName", + "traits": { + "smithy.api#documentation": "The name of the experiment to delete.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.evidently#DeleteExperimentResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.evidently#DeleteFeature": { + "type": "operation", + "input": { + "target": "com.amazonaws.evidently#DeleteFeatureRequest" + }, + "output": { + "target": "com.amazonaws.evidently#DeleteFeatureResponse" + }, + "errors": [ + { + "target": "com.amazonaws.evidently#AccessDeniedException" + }, + { + "target": "com.amazonaws.evidently#ConflictException" + }, + { + "target": "com.amazonaws.evidently#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.evidently#ThrottlingException" + }, + { + "target": "com.amazonaws.evidently#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes an Evidently feature.
", + "smithy.api#http": { + "method": "DELETE", + "uri": "/projects/{project}/features/{feature}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.evidently#DeleteFeatureRequest": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef", + "traits": { + "smithy.api#documentation": "The name or ARN of the project that contains the feature to delete.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "feature": { + "target": "com.amazonaws.evidently#FeatureName", + "traits": { + "smithy.api#documentation": "The name of the feature to delete.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.evidently#DeleteFeatureResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.evidently#DeleteLaunch": { + "type": "operation", + "input": { + "target": "com.amazonaws.evidently#DeleteLaunchRequest" + }, + "output": { + "target": "com.amazonaws.evidently#DeleteLaunchResponse" + }, + "errors": [ + { + "target": "com.amazonaws.evidently#AccessDeniedException" + }, + { + "target": "com.amazonaws.evidently#ConflictException" + }, + { + "target": "com.amazonaws.evidently#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.evidently#ThrottlingException" + }, + { + "target": "com.amazonaws.evidently#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes an Evidently launch. The feature used for the launch is not deleted.
\nTo stop a launch without deleting it, use StopLaunch.
", + "smithy.api#http": { + "method": "DELETE", + "uri": "/projects/{project}/launches/{launch}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.evidently#DeleteLaunchRequest": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef", + "traits": { + "smithy.api#documentation": "The name or ARN of the project that contains the launch to delete.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "launch": { + "target": "com.amazonaws.evidently#LaunchName", + "traits": { + "smithy.api#documentation": "The name of the launch to delete.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.evidently#DeleteLaunchResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.evidently#DeleteProject": { + "type": "operation", + "input": { + "target": "com.amazonaws.evidently#DeleteProjectRequest" + }, + "output": { + "target": "com.amazonaws.evidently#DeleteProjectResponse" + }, + "errors": [ + { + "target": "com.amazonaws.evidently#AccessDeniedException" + }, + { + "target": "com.amazonaws.evidently#ConflictException" + }, + { + "target": "com.amazonaws.evidently#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.evidently#ThrottlingException" + }, + { + "target": "com.amazonaws.evidently#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes an Evidently project. Before you can delete a project, you must delete all the\n features that the project contains. To delete a feature, use DeleteFeature.
", + "smithy.api#http": { + "method": "DELETE", + "uri": "/projects/{project}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.evidently#DeleteProjectRequest": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef", + "traits": { + "smithy.api#documentation": "The name or ARN of the project to delete.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.evidently#DeleteProjectResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.evidently#Description": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 160 + }, + "smithy.api#pattern": ".*" + } + }, + "com.amazonaws.evidently#DoubleValueList": { + "type": "list", + "member": { + "target": "smithy.api#Double" + }, + "traits": { + "smithy.api#length": { + "max": 100800 + } + } + }, + "com.amazonaws.evidently#EntityId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 512 + }, + "smithy.api#pattern": ".*" + } + }, + "com.amazonaws.evidently#EntityOverrideMap": { + "type": "map", + "key": { + "target": "com.amazonaws.evidently#EntityId" + }, + "value": { + "target": "com.amazonaws.evidently#VariationName" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 20 + } + } + }, + "com.amazonaws.evidently#ErrorCodeEnum": { + "type": "string", + "traits": { + "smithy.api#documentation": "Recommended errors from AWS API standards: https://w.amazon.com/bin/view/AWS/API_Standards/Exceptions\nErrorCode = \"ValidationException\"|\"ServiceQuotaExceededException\"|\"AccessDeniedException\"|\"ResourceNotFoundException\"|\"ConflictException\"|\"ThrottlingException\"|\"InternalServerException\"|string;", + "smithy.api#length": { + "min": 1, + "max": 64 + } + } + }, + "com.amazonaws.evidently#ErrorMessage": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + }, + "smithy.api#pattern": ".*" + } + }, + "com.amazonaws.evidently#EvaluateFeature": { + "type": "operation", + "input": { + "target": "com.amazonaws.evidently#EvaluateFeatureRequest" + }, + "output": { + "target": "com.amazonaws.evidently#EvaluateFeatureResponse" + }, + "errors": [ + { + "target": "com.amazonaws.evidently#AccessDeniedException" + }, + { + "target": "com.amazonaws.evidently#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.evidently#ThrottlingException" + }, + { + "target": "com.amazonaws.evidently#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "This operation assigns a feature variation to one given user session. You pass in an\n entityID
that represents the user. Evidently then checks the evaluation rules\n and assigns the variation.
The first rules that are evaluated are the override rules. If the user's\n entityID
matches an override rule, the user is served the variation specified\n by that rule.
Next, if there is a launch of the feature, the user might be assigned to a variation in\n the launch. The chance of this depends on the percentage of users that are allocated to that\n launch. If the user is enrolled in the launch, the variation they are served depends on the\n allocation of the various feature variations used for the launch.
\nIf the user is not assigned to a launch, and there is an ongoing experiment for this feature, the user might \n be assigned to a variation in the experiment. The chance of this\n depends on the percentage of users that are allocated to that experiment. If the user is enrolled in the experiment, \n the variation they are served depends on the allocation of the various feature variations used for the experiment.
\nIf the user is not assigned to a launch or experiment, they are served the default variation.
", + "smithy.api#endpoint": { + "hostPrefix": "dataplane." + }, + "smithy.api#http": { + "method": "POST", + "uri": "/projects/{project}/evaluations/{feature}", + "code": 200 + }, + "smithy.api#tags": [ + "dataplane" + ] + } + }, + "com.amazonaws.evidently#EvaluateFeatureRequest": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef", + "traits": { + "smithy.api#documentation": "The name or ARN of the project that contains this feature.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "feature": { + "target": "com.amazonaws.evidently#FeatureName", + "traits": { + "smithy.api#documentation": "The name of the feature being evaluated.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "entityId": { + "target": "com.amazonaws.evidently#EntityId", + "traits": { + "smithy.api#documentation": "An internal ID that represents a unique user of the application. This\n entityID
is checked against any override rules assigned for this\n feature.
A JSON block of attributes that you can optionally pass in. This JSON block is included\n in the evaluation events sent to Evidently from the user session.
" + } + } + } + }, + "com.amazonaws.evidently#EvaluateFeatureResponse": { + "type": "structure", + "members": { + "variation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the variation that was served to the user session.
" + } + }, + "value": { + "target": "com.amazonaws.evidently#VariableValue", + "traits": { + "smithy.api#documentation": "The value assigned to this variation to differentiate it from the other variations of this feature.
" + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Specifies the reason that the user session was assigned this variation. Possible values\n include DEFAULT
, meaning the user was served the default variation;\n LAUNCH_RULE_MATCH
, if the user session was enrolled in a launch;\n EXPERIMENT_RULE_MATCH
, if the user session was enrolled in an experiment; or\n ENTITY_OVERRIDES_MATCH
, if the user's entityId
matches an override\n rule.
If this user was assigned to a launch or experiment, this field lists the launch or experiment name.
" + } + } + } + }, + "com.amazonaws.evidently#EvaluationRequest": { + "type": "structure", + "members": { + "feature": { + "target": "com.amazonaws.evidently#FeatureName", + "traits": { + "smithy.api#documentation": "The name of the feature being evaluated.
", + "smithy.api#required": {} + } + }, + "entityId": { + "target": "com.amazonaws.evidently#EntityId", + "traits": { + "smithy.api#documentation": "An internal ID that represents a unique user session of the application. This\n entityID
is checked against any override rules assigned for this\n feature.
A JSON block of attributes that you can optionally pass in. This JSON block is included\n in the evaluation events sent to Evidently from the user session.
" + } + } + }, + "traits": { + "smithy.api#documentation": "This structure assigns a feature variation to one user session.
" + } + }, + "com.amazonaws.evidently#EvaluationRequestsList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#EvaluationRequest" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 20 + } + } + }, + "com.amazonaws.evidently#EvaluationResult": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#Arn", + "traits": { + "smithy.api#documentation": "The name or ARN of the project that contains the feature being evaluated.
" + } + }, + "feature": { + "target": "com.amazonaws.evidently#FeatureName", + "traits": { + "smithy.api#documentation": "The name of the feature being evaluated.
", + "smithy.api#required": {} + } + }, + "variation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the variation that was served to the user session.
" + } + }, + "value": { + "target": "com.amazonaws.evidently#VariableValue", + "traits": { + "smithy.api#documentation": "The value assigned to this variation to differentiate it from the other variations of this feature.
" + } + }, + "entityId": { + "target": "com.amazonaws.evidently#EntityId", + "traits": { + "smithy.api#documentation": "An internal ID that represents a unique user session of the application.
", + "smithy.api#required": {} + } + }, + "reason": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Specifies the reason that the user session was assigned this variation. Possible values\n include DEFAULT
, meaning the user was served the default variation;\n LAUNCH_RULE_MATCH
, if the user session was enrolled in a launch; or\n EXPERIMENT_RULE_MATCH
, if the user session was enrolled in an\n experiment.
If this user was assigned to a launch or experiment, this field lists the launch or experiment name.
" + } + } + }, + "traits": { + "smithy.api#documentation": "This structure displays the results of one feature evaluation assignment to one user\n session.
" + } + }, + "com.amazonaws.evidently#EvaluationResultsList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#EvaluationResult" + } + }, + "com.amazonaws.evidently#EvaluationRule": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.evidently#RuleName", + "traits": { + "smithy.api#documentation": "The name of the experiment or launch.
" + } + }, + "type": { + "target": "com.amazonaws.evidently#RuleType", + "traits": { + "smithy.api#documentation": "This value is aws.evidently.splits
if this is an evaluation rule for a launch, and it is\n aws.evidently.onlineab
if this is an evaluation rule for an experiment.
A structure that contains the information about an evaluation rule for this feature, \n if it is used in a launch or experiment.
" + } + }, + "com.amazonaws.evidently#EvaluationRulesList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#EvaluationRule" + } + }, + "com.amazonaws.evidently#Event": { + "type": "structure", + "members": { + "timestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The timestamp of the event.
", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.amazonaws.evidently#EventType", + "traits": { + "smithy.api#documentation": "\n aws.evidently.evaluation
specifies an evaluation event, which determines\n which feature variation that a user sees. aws.evidently.custom
specifies a custom\n event, which generates metrics from user actions such as clicks and checkouts.
The event data.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A structure that contains the information about one evaluation event or custom event sent to Evidently.\n This is a JSON payload. If this event specifies a pre-defined event type, the payload must follow the \n defined event schema.
" + } + }, + "com.amazonaws.evidently#EventList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#Event" + }, + "traits": { + "smithy.api#length": { + "max": 50 + } + } + }, + "com.amazonaws.evidently#EventType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "aws.evidently.evaluation", + "name": "EVALUATION" + }, + { + "value": "aws.evidently.custom", + "name": "CUSTOM" + } + ] + } + }, + "com.amazonaws.evidently#Evidently": { + "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "Evidently", + "arnNamespace": "evidently", + "cloudFormationName": "Evidently", + "cloudTrailEventSource": "evidently.amazonaws.com", + "endpointPrefix": "evidently" + }, + "aws.auth#sigv4": { + "name": "evidently" + }, + "aws.protocols#restJson1": {}, + "smithy.api#cors": { + "additionalAllowedHeaders": [ + "Authorization", + "x-amz-content-sha256", + "X-Amz-Date", + "X-Amz-Security-Token", + "X-Api-Key", + "Content-Type", + "X-Amz-User-Agent" + ] + }, + "smithy.api#documentation": "You can use Amazon CloudWatch Evidently to safely validate new features by serving them to a specified percentage\n of your users while you roll out the feature. You can monitor the performance of the new feature\n to help you decide when to ramp up traffic to your users. This helps you \n reduce risk and identify unintended consequences before you fully launch the feature.
\nYou can also conduct A/B experiments to make feature design decisions based on evidence\n and data. An experiment can test as many as five variations at once. Evidently collects\n experiment data and analyzes it using statistical methods. It also provides clear\n recommendations about which variations perform better. You can test both user-facing features\n and backend features.
", + "smithy.api#title": "Amazon CloudWatch Evidently" + }, + "version": "2021-02-01", + "operations": [ + { + "target": "com.amazonaws.evidently#ListTagsForResource" + }, + { + "target": "com.amazonaws.evidently#TagResource" + }, + { + "target": "com.amazonaws.evidently#UntagResource" + } + ], + "resources": [ + { + "target": "com.amazonaws.evidently#ProjectResource" + } + ] + }, + "com.amazonaws.evidently#Experiment": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.evidently#ExperimentArn", + "traits": { + "smithy.api#documentation": "The ARN of the experiment.
", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.evidently#ExperimentName", + "traits": { + "smithy.api#documentation": "The name of the experiment.
", + "smithy.api#required": {} + } + }, + "project": { + "target": "com.amazonaws.evidently#ProjectArn", + "traits": { + "smithy.api#documentation": "The name or ARN of the project that contains this experiment.
" + } + }, + "status": { + "target": "com.amazonaws.evidently#ExperimentStatus", + "traits": { + "smithy.api#documentation": "The current state of the experiment.
", + "smithy.api#required": {} + } + }, + "statusReason": { + "target": "com.amazonaws.evidently#Description", + "traits": { + "smithy.api#documentation": "If the experiment was stopped, this is the string that was entered by the person who \n stopped the experiment, to explain why it was stopped.
" + } + }, + "description": { + "target": "com.amazonaws.evidently#Description", + "traits": { + "smithy.api#documentation": "A description of the experiment.
" + } + }, + "createdTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that the experiment is first created.
", + "smithy.api#required": {} + } + }, + "lastUpdatedTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that the experiment was most recently updated.
", + "smithy.api#required": {} + } + }, + "schedule": { + "target": "com.amazonaws.evidently#ExperimentSchedule", + "traits": { + "smithy.api#documentation": "A structure that contains the time and date that Evidently completed the analysis of the experiment.
" + } + }, + "execution": { + "target": "com.amazonaws.evidently#ExperimentExecution", + "traits": { + "smithy.api#documentation": "A structure that contains the date and time that the experiment started and ended.
" + } + }, + "treatments": { + "target": "com.amazonaws.evidently#TreatmentList", + "traits": { + "smithy.api#documentation": "An array of structures that describe the configuration of each feature variation used in the experiment.
" + } + }, + "metricGoals": { + "target": "com.amazonaws.evidently#MetricGoalsList", + "traits": { + "smithy.api#documentation": "An array of structures that defines the metrics used for the experiment, and whether a higher\n or lower value for each metric is the goal.
" + } + }, + "randomizationSalt": { + "target": "com.amazonaws.evidently#RandomizationSalt", + "traits": { + "smithy.api#documentation": "This value is used when Evidently assigns a particular user session to the experiment. It\n helps create a randomization ID to determine which variation the user session is served. This\n randomization ID is a combination of the entity ID and randomizationSalt
.
In thousandths of a percent, the amount of the available audience that is allocated to this experiment. \n The available audience\n is the total audience minus the audience that you have allocated to overrides or current launches of\n this feature.
\nThis is represented in thousandths of a percent, so a value of 10,000 is 10% of the available audience.
" + } + }, + "type": { + "target": "com.amazonaws.evidently#ExperimentType", + "traits": { + "smithy.api#documentation": "The type of this experiment. Currently, this value must be aws.experiment.onlineab
.
A structure that contains the configuration of which variation to use as the \"control\"\n version. The \"control\" version is used for comparison with other variations. This structure\n also specifies how much experiment traffic is allocated to each variation.
" + } + }, + "tags": { + "target": "com.amazonaws.evidently#TagMap", + "traits": { + "smithy.api#documentation": "The list of tag keys and values associated with this experiment.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A structure containing the configuration details of an experiment.
" + } + }, + "com.amazonaws.evidently#ExperimentArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2048 + }, + "smithy.api#pattern": "arn:[^:]*:[^:]*:[^:]*:[^:]*:project/[-a-zA-Z0-9._]*/experiment/[-a-zA-Z0-9._]*" + } + }, + "com.amazonaws.evidently#ExperimentBaseStat": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "Mean", + "name": "MEAN" + } + ] + } + }, + "com.amazonaws.evidently#ExperimentExecution": { + "type": "structure", + "members": { + "startedTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that the experiment started.
" + } + }, + "endedTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that the experiment ended.
" + } + } + }, + "traits": { + "smithy.api#documentation": "This structure contains the date and time that the experiment started and ended.
" + } + }, + "com.amazonaws.evidently#ExperimentList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#Experiment" + } + }, + "com.amazonaws.evidently#ExperimentName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 127 + }, + "smithy.api#pattern": "[-a-zA-Z0-9._]*" + } + }, + "com.amazonaws.evidently#ExperimentReport": { + "type": "structure", + "members": { + "metricName": { + "target": "com.amazonaws.evidently#CwDimensionSafeName", + "traits": { + "smithy.api#documentation": "The name of the metric that is analyzed in this experiment report.
" + } + }, + "treatmentName": { + "target": "com.amazonaws.evidently#TreatmentName", + "traits": { + "smithy.api#documentation": "The name of the variation that this report pertains to.
" + } + }, + "reportName": { + "target": "com.amazonaws.evidently#ExperimentReportName", + "traits": { + "smithy.api#documentation": "The type of analysis used for this report.
" + } + }, + "content": { + "target": "com.amazonaws.evidently#JsonValue", + "traits": { + "smithy.api#documentation": "The content of the report.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A structure that contains results of an experiment.
" + } + }, + "com.amazonaws.evidently#ExperimentReportList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#ExperimentReport" + }, + "traits": { + "smithy.api#length": { + "max": 1000 + } + } + }, + "com.amazonaws.evidently#ExperimentReportName": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "BayesianInference", + "name": "BAYESIAN_INFERENCE" + } + ] + } + }, + "com.amazonaws.evidently#ExperimentReportNameList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#ExperimentReportName" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 5 + } + } + }, + "com.amazonaws.evidently#ExperimentResource": { + "type": "resource", + "identifiers": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef" + }, + "experiment": { + "target": "com.amazonaws.evidently#ExperimentName" + } + }, + "create": { + "target": "com.amazonaws.evidently#CreateExperiment" + }, + "read": { + "target": "com.amazonaws.evidently#GetExperiment" + }, + "update": { + "target": "com.amazonaws.evidently#UpdateExperiment" + }, + "delete": { + "target": "com.amazonaws.evidently#DeleteExperiment" + }, + "list": { + "target": "com.amazonaws.evidently#ListExperiments" + }, + "operations": [ + { + "target": "com.amazonaws.evidently#GetExperimentResults" + }, + { + "target": "com.amazonaws.evidently#StartExperiment" + }, + { + "target": "com.amazonaws.evidently#StopExperiment" + } + ] + }, + "com.amazonaws.evidently#ExperimentResultRequestType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "BaseStat", + "name": "BASE_STAT" + }, + { + "value": "TreatmentEffect", + "name": "TREATMENT_EFFECT" + }, + { + "value": "ConfidenceInterval", + "name": "CONFIDENCE_INTERVAL" + }, + { + "value": "PValue", + "name": "P_VALUE" + } + ] + } + }, + "com.amazonaws.evidently#ExperimentResultRequestTypeList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#ExperimentResultRequestType" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 5 + } + } + }, + "com.amazonaws.evidently#ExperimentResultResponseType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "Mean", + "name": "MEAN" + }, + { + "value": "TreatmentEffect", + "name": "TREATMENT_EFFECT" + }, + { + "value": "ConfidenceIntervalUpperBound", + "name": "CONFIDENCE_INTERVAL_UPPERBOUND" + }, + { + "value": "ConfidenceIntervalLowerBound", + "name": "CONFIDENCE_INTERVAL_LOWERBOUND" + }, + { + "value": "PValue", + "name": "P_VALUE" + } + ] + } + }, + "com.amazonaws.evidently#ExperimentResultsData": { + "type": "structure", + "members": { + "metricName": { + "target": "com.amazonaws.evidently#CwDimensionSafeName", + "traits": { + "smithy.api#documentation": "The name of the metric.
" + } + }, + "treatmentName": { + "target": "com.amazonaws.evidently#TreatmentName", + "traits": { + "smithy.api#documentation": "The treatment, or variation, that returned the values
in this structure.
The experiment statistic that these results pertain to.
" + } + }, + "values": { + "target": "com.amazonaws.evidently#DoubleValueList", + "traits": { + "smithy.api#documentation": "The values for the metricName
that were recorded in the experiment.
A structure that contains experiment results for one metric that is monitored in\n the experiment.
" + } + }, + "com.amazonaws.evidently#ExperimentResultsDataList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#ExperimentResultsData" + }, + "traits": { + "smithy.api#length": { + "max": 1000 + } + } + }, + "com.amazonaws.evidently#ExperimentSchedule": { + "type": "structure", + "members": { + "analysisCompleteTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The time and date that Evidently completed the analysis of the experiment.
" + } + } + }, + "traits": { + "smithy.api#documentation": "This structure contains the time and date that Evidently completed the analysis of the experiment.
" + } + }, + "com.amazonaws.evidently#ExperimentStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CREATED", + "name": "CREATED" + }, + { + "value": "UPDATING", + "name": "UPDATING" + }, + { + "value": "RUNNING", + "name": "RUNNING" + }, + { + "value": "COMPLETED", + "name": "COMPLETED" + }, + { + "value": "CANCELLED", + "name": "CANCELLED" + } + ] + } + }, + "com.amazonaws.evidently#ExperimentStopDesiredState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "COMPLETED", + "name": "COMPLETED" + }, + { + "value": "CANCELLED", + "name": "CANCELLED" + } + ] + } + }, + "com.amazonaws.evidently#ExperimentType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "aws.evidently.onlineab", + "name": "ONLINE_AB_EXPERIMENT" + } + ] + } + }, + "com.amazonaws.evidently#Feature": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.evidently#FeatureArn", + "traits": { + "smithy.api#documentation": "The ARN of the feature.
", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.evidently#FeatureName", + "traits": { + "smithy.api#documentation": "The name of the feature.
", + "smithy.api#required": {} + } + }, + "project": { + "target": "com.amazonaws.evidently#ProjectArn", + "traits": { + "smithy.api#documentation": "The name or ARN of the project that contains the feature.
" + } + }, + "status": { + "target": "com.amazonaws.evidently#FeatureStatus", + "traits": { + "smithy.api#documentation": "The current state of the feature.
", + "smithy.api#required": {} + } + }, + "createdTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that the feature is created.
", + "smithy.api#required": {} + } + }, + "lastUpdatedTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that the feature was most recently updated.
", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.evidently#Description", + "traits": { + "smithy.api#documentation": "The description of the feature.
" + } + }, + "evaluationStrategy": { + "target": "com.amazonaws.evidently#FeatureEvaluationStrategy", + "traits": { + "smithy.api#documentation": "If this value is ALL_RULES
, the traffic allocation specified by\n any ongoing launches or experiments is being used. If this is DEFAULT_VARIATION
,\n the default variation is being served to all users.
Defines the type of value used to define the different feature variations. \n For more information, see Variation types\n
", + "smithy.api#required": {} + } + }, + "variations": { + "target": "com.amazonaws.evidently#VariationsList", + "traits": { + "smithy.api#documentation": "An array of structures that contain the configuration of the feature's different variations.
", + "smithy.api#required": {} + } + }, + "defaultVariation": { + "target": "com.amazonaws.evidently#VariationName", + "traits": { + "smithy.api#documentation": "The name of the variation that is used as the default variation. The default\n variation is served to users who are not allocated to any ongoing launches\n or experiments of this feature.
\nThis variation must also be listed in the variations
structure.
If you omit defaultVariation
, the first variation listed in\n the variations
structure is used as the default variation.
An array of structures that define the evaluation rules for the feature.
" + } + }, + "tags": { + "target": "com.amazonaws.evidently#TagMap", + "traits": { + "smithy.api#documentation": "The list of tag keys and values associated with this feature.
" + } + }, + "entityOverrides": { + "target": "com.amazonaws.evidently#EntityOverrideMap", + "traits": { + "smithy.api#documentation": "A set of key-value pairs that specify users who should always be served a specific\n variation of a feature. Each key specifies a user using their user ID, account ID, or some\n other identifier. The value specifies the name of the variation that the user is to be\n served.
\nFor the override to be successful, the value of the key must match the entityId
used \n in the EvaluateFeature operation.
This structure contains information about one Evidently feature in your account.
" + } + }, + "com.amazonaws.evidently#FeatureArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2048 + }, + "smithy.api#pattern": "arn:[^:]*:[^:]*:[^:]*:[^:]*:project/[-a-zA-Z0-9._]*/feature/[-a-zA-Z0-9._]*" + } + }, + "com.amazonaws.evidently#FeatureEvaluationStrategy": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ALL_RULES", + "name": "ALL_RULES" + }, + { + "value": "DEFAULT_VARIATION", + "name": "DEFAULT_VARIATION" + } + ] + } + }, + "com.amazonaws.evidently#FeatureName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 127 + }, + "smithy.api#pattern": "[-a-zA-Z0-9._]*" + } + }, + "com.amazonaws.evidently#FeatureResource": { + "type": "resource", + "identifiers": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef" + }, + "feature": { + "target": "com.amazonaws.evidently#FeatureName" + } + }, + "create": { + "target": "com.amazonaws.evidently#CreateFeature" + }, + "read": { + "target": "com.amazonaws.evidently#GetFeature" + }, + "update": { + "target": "com.amazonaws.evidently#UpdateFeature" + }, + "delete": { + "target": "com.amazonaws.evidently#DeleteFeature" + }, + "list": { + "target": "com.amazonaws.evidently#ListFeatures" + } + }, + "com.amazonaws.evidently#FeatureStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "AVAILABLE", + "name": "AVAILABLE" + }, + { + "value": "UPDATING", + "name": "UPDATING" + } + ] + } + }, + "com.amazonaws.evidently#FeatureSummariesList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#FeatureSummary" + } + }, + "com.amazonaws.evidently#FeatureSummary": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.evidently#Arn", + "traits": { + "smithy.api#documentation": "The ARN of the feature.
", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.evidently#FeatureName", + "traits": { + "smithy.api#documentation": "The name of the feature.
", + "smithy.api#required": {} + } + }, + "project": { + "target": "com.amazonaws.evidently#ProjectRef", + "traits": { + "smithy.api#documentation": "The name or ARN of the project that contains the feature.
" + } + }, + "status": { + "target": "com.amazonaws.evidently#FeatureStatus", + "traits": { + "smithy.api#documentation": "The current state of the feature.
", + "smithy.api#required": {} + } + }, + "createdTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that the feature is created.
", + "smithy.api#required": {} + } + }, + "lastUpdatedTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that the feature was most recently updated.
", + "smithy.api#required": {} + } + }, + "evaluationStrategy": { + "target": "com.amazonaws.evidently#FeatureEvaluationStrategy", + "traits": { + "smithy.api#documentation": "If this value is ALL_RULES
, the traffic allocation specified by\n any ongoing launches or experiments is being used. If this is DEFAULT_VARIATION
,\n the default variation is being served to all users.
An array of structures that define
" + } + }, + "defaultVariation": { + "target": "com.amazonaws.evidently#VariationName", + "traits": { + "smithy.api#documentation": "The name of the variation that is used as the default variation. The default\n variation is served to users who are not allocated to any ongoing launches\n or experiments of this feature.
" + } + }, + "tags": { + "target": "com.amazonaws.evidently#TagMap", + "traits": { + "smithy.api#documentation": "The list of tag keys and values associated with this feature.
" + } + } + }, + "traits": { + "smithy.api#documentation": "This structure contains information about one Evidently feature in your account.
" + } + }, + "com.amazonaws.evidently#FeatureToVariationMap": { + "type": "map", + "key": { + "target": "com.amazonaws.evidently#FeatureName" + }, + "value": { + "target": "com.amazonaws.evidently#VariationName" + } + }, + "com.amazonaws.evidently#GetExperiment": { + "type": "operation", + "input": { + "target": "com.amazonaws.evidently#GetExperimentRequest" + }, + "output": { + "target": "com.amazonaws.evidently#GetExperimentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.evidently#AccessDeniedException" + }, + { + "target": "com.amazonaws.evidently#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.evidently#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "Returns the details about one experiment. You must already know the \n experiment name. To retrieve a list of experiments in your account, use ListExperiments.
", + "smithy.api#http": { + "method": "GET", + "uri": "/projects/{project}/experiments/{experiment}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.evidently#GetExperimentRequest": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef", + "traits": { + "smithy.api#documentation": "The name or ARN of the project that contains the experiment.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "experiment": { + "target": "com.amazonaws.evidently#ExperimentName", + "traits": { + "smithy.api#documentation": "The name of the experiment that you want to see the details of.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.evidently#GetExperimentResponse": { + "type": "structure", + "members": { + "experiment": { + "target": "com.amazonaws.evidently#Experiment", + "traits": { + "smithy.api#documentation": "A structure containing the configuration details of the experiment.
" + } + } + } + }, + "com.amazonaws.evidently#GetExperimentResults": { + "type": "operation", + "input": { + "target": "com.amazonaws.evidently#GetExperimentResultsRequest" + }, + "output": { + "target": "com.amazonaws.evidently#GetExperimentResultsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.evidently#AccessDeniedException" + }, + { + "target": "com.amazonaws.evidently#ConflictException" + }, + { + "target": "com.amazonaws.evidently#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.evidently#ThrottlingException" + }, + { + "target": "com.amazonaws.evidently#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Retrieves the results of a running or completed experiment.
", + "smithy.api#http": { + "method": "POST", + "uri": "/projects/{project}/experiments/{experiment}/results", + "code": 200 + } + } + }, + "com.amazonaws.evidently#GetExperimentResultsRequest": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef", + "traits": { + "smithy.api#documentation": "The name or ARN of the project that contains the experiment that you want to see the results of.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "experiment": { + "target": "com.amazonaws.evidently#ExperimentName", + "traits": { + "smithy.api#documentation": "The name of the experiment to retrieve the results of.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "startTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that the experiment started.
" + } + }, + "endTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that the experiment ended, if it is completed.
" + } + }, + "metricNames": { + "target": "com.amazonaws.evidently#MetricNameList", + "traits": { + "smithy.api#documentation": "The names of the experiment metrics that you want to see the results of.
", + "smithy.api#required": {} + } + }, + "treatmentNames": { + "target": "com.amazonaws.evidently#TreatmentNameList", + "traits": { + "smithy.api#documentation": "The names of the experiment treatments that you want to see the results for.
", + "smithy.api#required": {} + } + }, + "baseStat": { + "target": "com.amazonaws.evidently#ExperimentBaseStat", + "traits": { + "smithy.api#documentation": "The statistic used to calculate experiment results. Currently the only valid value is mean
, \n which uses the mean of the collected values as the statistic.
The statistics that you want to see in the returned results.
\n\n PValue
specifies to use p-values for the results. A p-value is used in hypothesis\n testing to measure how often you are willing to make a mistake in rejecting the null\n hypothesis. A general practice is to reject the null hypothesis and declare that the\n results are statistically significant when the p-value is less than 0.05.
\n ConfidenceInterval
specifies a confidence interval for the results. The\n confidence interval represents the range of values for the chosen metric that is likely to\n contain the true difference between the baseStat
of a variation and the\n baseline. Evidently returns the 95% confidence interval.
\n TreatmentEffect
is the difference in the statistic specified by the\n baseStat
parameter between each variation and the default variation.
\n BaseStat
returns the statistical values collected for the metric for each\n variation. The statistic uses the same statistic specified in the baseStat
\n parameter. Therefore, if baseStat
is mean
, this returns the mean\n of the values collected for each variation.
The names of the report types that you want to see. Currently, BayesianInference
\n is the only valid value.
In seconds, the amount of time to aggregate results together.
" + } + } + } + }, + "com.amazonaws.evidently#GetExperimentResultsResponse": { + "type": "structure", + "members": { + "resultsData": { + "target": "com.amazonaws.evidently#ExperimentResultsDataList", + "traits": { + "smithy.api#documentation": "An array of structures that include experiment results including metric names and values.
" + } + }, + "reports": { + "target": "com.amazonaws.evidently#ExperimentReportList", + "traits": { + "smithy.api#documentation": "An array of structures that include the reports that you requested.
" + } + }, + "timestamps": { + "target": "com.amazonaws.evidently#TimestampList", + "traits": { + "smithy.api#documentation": "The timestamps of each result returned.
" + } + } + } + }, + "com.amazonaws.evidently#GetFeature": { + "type": "operation", + "input": { + "target": "com.amazonaws.evidently#GetFeatureRequest" + }, + "output": { + "target": "com.amazonaws.evidently#GetFeatureResponse" + }, + "errors": [ + { + "target": "com.amazonaws.evidently#AccessDeniedException" + }, + { + "target": "com.amazonaws.evidently#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.evidently#ThrottlingException" + }, + { + "target": "com.amazonaws.evidently#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Returns the details about one feature. You must already know the feature name. To\n retrieve a list of features in your account, use ListFeatures.
", + "smithy.api#http": { + "method": "GET", + "uri": "/projects/{project}/features/{feature}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.evidently#GetFeatureRequest": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef", + "traits": { + "smithy.api#documentation": "The name or ARN of the project that contains the feature.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "feature": { + "target": "com.amazonaws.evidently#FeatureName", + "traits": { + "smithy.api#documentation": "The name of the feature that you want to retrieve information for.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.evidently#GetFeatureResponse": { + "type": "structure", + "members": { + "feature": { + "target": "com.amazonaws.evidently#Feature", + "traits": { + "smithy.api#documentation": "A structure containing the configuration details of the feature.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.evidently#GetLaunch": { + "type": "operation", + "input": { + "target": "com.amazonaws.evidently#GetLaunchRequest" + }, + "output": { + "target": "com.amazonaws.evidently#GetLaunchResponse" + }, + "errors": [ + { + "target": "com.amazonaws.evidently#AccessDeniedException" + }, + { + "target": "com.amazonaws.evidently#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.evidently#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "Returns the details about one launch. You must already know the \n launch name. To retrieve a list of launches in your account, use ListLaunches.
", + "smithy.api#http": { + "method": "GET", + "uri": "/projects/{project}/launches/{launch}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.evidently#GetLaunchRequest": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef", + "traits": { + "smithy.api#documentation": "The name or ARN of the project that contains the launch.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "launch": { + "target": "com.amazonaws.evidently#LaunchName", + "traits": { + "smithy.api#documentation": "The name of the launch that you want to see the details of.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.evidently#GetLaunchResponse": { + "type": "structure", + "members": { + "launch": { + "target": "com.amazonaws.evidently#Launch", + "traits": { + "smithy.api#documentation": "A structure containing the configuration details of the launch.
" + } + } + } + }, + "com.amazonaws.evidently#GetProject": { + "type": "operation", + "input": { + "target": "com.amazonaws.evidently#GetProjectRequest" + }, + "output": { + "target": "com.amazonaws.evidently#GetProjectResponse" + }, + "errors": [ + { + "target": "com.amazonaws.evidently#AccessDeniedException" + }, + { + "target": "com.amazonaws.evidently#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.evidently#ThrottlingException" + }, + { + "target": "com.amazonaws.evidently#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Returns the details about one launch. You must already know the \n project name. To retrieve a list of projects in your account, use ListProjects.
", + "smithy.api#http": { + "method": "GET", + "uri": "/projects/{project}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.evidently#GetProjectRequest": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef", + "traits": { + "smithy.api#documentation": "The name or ARN of the project that you want to see the details of.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.evidently#GetProjectResponse": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#Project", + "traits": { + "smithy.api#documentation": "A structure containing the configuration details of the project.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.evidently#GroupName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 127 + }, + "smithy.api#pattern": "[-a-zA-Z0-9._]*" + } + }, + "com.amazonaws.evidently#GroupToWeightMap": { + "type": "map", + "key": { + "target": "com.amazonaws.evidently#GroupName" + }, + "value": { + "target": "com.amazonaws.evidently#SplitWeight" + }, + "traits": { + "smithy.api#length": { + "max": 5 + } + } + }, + "com.amazonaws.evidently#InternalServerException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "Unexpected error while processing the request. Retry the request.
", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.evidently#JsonPath": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": ".*" + } + }, + "com.amazonaws.evidently#JsonValue": { + "type": "string", + "traits": { + "smithy.api#mediaType": "application/json" + } + }, + "com.amazonaws.evidently#Launch": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.evidently#LaunchArn", + "traits": { + "smithy.api#documentation": "The ARN of the launch.
", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.evidently#LaunchName", + "traits": { + "smithy.api#documentation": "The name of the launch.
", + "smithy.api#required": {} + } + }, + "project": { + "target": "com.amazonaws.evidently#ProjectRef", + "traits": { + "smithy.api#documentation": "The name or ARN of the project that contains the launch.
" + } + }, + "status": { + "target": "com.amazonaws.evidently#LaunchStatus", + "traits": { + "smithy.api#documentation": "The current state of the launch.
", + "smithy.api#required": {} + } + }, + "statusReason": { + "target": "com.amazonaws.evidently#Description", + "traits": { + "smithy.api#documentation": "If the launch was stopped, this is the string that was entered by the person who \n stopped the launch, to explain why it was stopped.
" + } + }, + "description": { + "target": "com.amazonaws.evidently#Description", + "traits": { + "smithy.api#documentation": "The description of the launch.
" + } + }, + "createdTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that the launch is created.
", + "smithy.api#required": {} + } + }, + "lastUpdatedTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that the launch was most recently updated.
", + "smithy.api#required": {} + } + }, + "execution": { + "target": "com.amazonaws.evidently#LaunchExecution", + "traits": { + "smithy.api#documentation": "A structure that contains information about the start and end times of the launch.
" + } + }, + "groups": { + "target": "com.amazonaws.evidently#LaunchGroupList", + "traits": { + "smithy.api#documentation": "An array of structures that define the feature variations that are being used in the launch.
" + } + }, + "metricMonitors": { + "target": "com.amazonaws.evidently#MetricMonitorList", + "traits": { + "smithy.api#documentation": "An array of structures that define the metrics that are being used to monitor the launch performance.
" + } + }, + "randomizationSalt": { + "target": "com.amazonaws.evidently#RandomizationSalt", + "traits": { + "smithy.api#documentation": "This value is used when Evidently assigns a particular user session to the launch, to help create a randomization ID\n to determine which variation the user session is served. This randomization ID is a combination of the entity ID\n and randomizationSalt
.
The type of launch.
", + "smithy.api#required": {} + } + }, + "scheduledSplitsDefinition": { + "target": "com.amazonaws.evidently#ScheduledSplitsLaunchDefinition", + "traits": { + "smithy.api#documentation": "An array of structures that define the traffic allocation percentages among the feature\n variations during each step of the launch.
" + } + }, + "tags": { + "target": "com.amazonaws.evidently#TagMap", + "traits": { + "smithy.api#documentation": "The list of tag keys and values associated with this launch.
" + } + } + }, + "traits": { + "smithy.api#documentation": "This structure contains the configuration details of one Evidently launch.
" + } + }, + "com.amazonaws.evidently#LaunchArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2048 + }, + "smithy.api#pattern": "arn:[^:]*:[^:]*:[^:]*:[^:]*:project/[-a-zA-Z0-9._]*/launch/[-a-zA-Z0-9._]*" + } + }, + "com.amazonaws.evidently#LaunchExecution": { + "type": "structure", + "members": { + "startedTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that the launch started.
" + } + }, + "endedTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that the launch ended.
" + } + } + }, + "traits": { + "smithy.api#documentation": "This structure contains information about the start and end times of the launch.
" + } + }, + "com.amazonaws.evidently#LaunchGroup": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.evidently#GroupName", + "traits": { + "smithy.api#documentation": "The name of the launch group.
", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.evidently#Description", + "traits": { + "smithy.api#documentation": "A description of the launch group.
" + } + }, + "featureVariations": { + "target": "com.amazonaws.evidently#FeatureToVariationMap", + "traits": { + "smithy.api#documentation": "The feature variation for this launch group. This is a key-value pair.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A structure that defines one launch group in a launch. A launch group is a variation of the feature\n that you are including in the launch.
" + } + }, + "com.amazonaws.evidently#LaunchGroupConfig": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.evidently#GroupName", + "traits": { + "smithy.api#documentation": "A name for this launch group.
", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.evidently#Description", + "traits": { + "smithy.api#documentation": "A description of the launch group.
" + } + }, + "feature": { + "target": "com.amazonaws.evidently#FeatureName", + "traits": { + "smithy.api#documentation": "The feature that this launch is using.
", + "smithy.api#required": {} + } + }, + "variation": { + "target": "com.amazonaws.evidently#VariationName", + "traits": { + "smithy.api#documentation": "The feature variation to use for this launch group.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A structure that defines one launch group in a launch. A launch group is a variation of\n the feature that you are including in the launch.
" + } + }, + "com.amazonaws.evidently#LaunchGroupConfigList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#LaunchGroupConfig" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 5 + } + } + }, + "com.amazonaws.evidently#LaunchGroupList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#LaunchGroup" + } + }, + "com.amazonaws.evidently#LaunchName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 127 + }, + "smithy.api#pattern": "[-a-zA-Z0-9._]*" + } + }, + "com.amazonaws.evidently#LaunchResource": { + "type": "resource", + "identifiers": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef" + }, + "launch": { + "target": "com.amazonaws.evidently#LaunchName" + } + }, + "create": { + "target": "com.amazonaws.evidently#CreateLaunch" + }, + "read": { + "target": "com.amazonaws.evidently#GetLaunch" + }, + "update": { + "target": "com.amazonaws.evidently#UpdateLaunch" + }, + "delete": { + "target": "com.amazonaws.evidently#DeleteLaunch" + }, + "list": { + "target": "com.amazonaws.evidently#ListLaunches" + }, + "operations": [ + { + "target": "com.amazonaws.evidently#StartLaunch" + }, + { + "target": "com.amazonaws.evidently#StopLaunch" + } + ] + }, + "com.amazonaws.evidently#LaunchStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CREATED", + "name": "CREATED" + }, + { + "value": "UPDATING", + "name": "UPDATING" + }, + { + "value": "RUNNING", + "name": "RUNNING" + }, + { + "value": "COMPLETED", + "name": "COMPLETED" + }, + { + "value": "CANCELLED", + "name": "CANCELLED" + } + ] + } + }, + "com.amazonaws.evidently#LaunchStopDesiredState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "COMPLETED", + "name": "COMPLETED" + }, + { + "value": "CANCELLED", + "name": "CANCELLED" + } + ] + } + }, + "com.amazonaws.evidently#LaunchType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "aws.evidently.splits", + "name": "SCHEDULED_SPLITS_LAUNCH" + } + ] + } + }, + "com.amazonaws.evidently#LaunchesList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#Launch" + } + }, + "com.amazonaws.evidently#ListExperiments": { + "type": "operation", + "input": { + "target": "com.amazonaws.evidently#ListExperimentsRequest" + }, + "output": { + "target": "com.amazonaws.evidently#ListExperimentsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.evidently#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.evidently#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Returns configuration details about all the experiments in the specified project.
", + "smithy.api#http": { + "method": "GET", + "uri": "/projects/{project}/experiments", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "experiments", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.evidently#ListExperimentsRequest": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef", + "traits": { + "smithy.api#documentation": "The name or ARN of the project to return the experiment list from.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "maxResults": { + "target": "com.amazonaws.evidently#MaxExperiments", + "traits": { + "smithy.api#documentation": "The maximum number of results to include in the response.
", + "smithy.api#httpQuery": "maxResults" + } + }, + "nextToken": { + "target": "com.amazonaws.evidently#NextToken", + "traits": { + "smithy.api#documentation": "The token to use when requesting the next set of results. You received this token from a previous \n ListExperiments
operation.
An array of structures that contain the configuration details of the experiments in the\n specified project.
" + } + }, + "nextToken": { + "target": "com.amazonaws.evidently#NextToken", + "traits": { + "smithy.api#documentation": "The token to use in a subsequent ListExperiments
operation to return\n the next set of results.
Returns configuration details about all the features in the specified project.
", + "smithy.api#http": { + "method": "GET", + "uri": "/projects/{project}/features", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "features", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.evidently#ListFeaturesRequest": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef", + "traits": { + "smithy.api#documentation": "The name or ARN of the project to return the feature list from.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "maxResults": { + "target": "com.amazonaws.evidently#MaxFeatures", + "traits": { + "smithy.api#documentation": "The maximum number of results to include in the response.
", + "smithy.api#httpQuery": "maxResults" + } + }, + "nextToken": { + "target": "com.amazonaws.evidently#NextToken", + "traits": { + "smithy.api#documentation": "The token to use when requesting the next set of results. You received this token from a previous \n ListFeatures
operation.
An array of structures that contain the configuration details of the features in the\n specified project.
" + } + }, + "nextToken": { + "target": "com.amazonaws.evidently#NextToken", + "traits": { + "smithy.api#documentation": "The token to use in a subsequent ListFeatures
operation to return\n the next set of results.
Returns configuration details about all the launches in the specified project.
", + "smithy.api#http": { + "method": "GET", + "uri": "/projects/{project}/launches", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "launches", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.evidently#ListLaunchesRequest": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef", + "traits": { + "smithy.api#documentation": "The name or ARN of the project to return the launch list from.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "maxResults": { + "target": "com.amazonaws.evidently#MaxLaunches", + "traits": { + "smithy.api#documentation": "The maximum number of results to include in the response.
", + "smithy.api#httpQuery": "maxResults" + } + }, + "nextToken": { + "target": "com.amazonaws.evidently#NextToken", + "traits": { + "smithy.api#documentation": "The token to use when requesting the next set of results. You received this token from a previous \n ListLaunches
operation.
An array of structures that contain the configuration details of the launches in the\n specified project.
" + } + }, + "nextToken": { + "target": "com.amazonaws.evidently#NextToken", + "traits": { + "smithy.api#documentation": "The token to use in a subsequent ListLaunches
operation to return\n the next set of results.
Returns configuration details about all the projects in the current Region in your\n account.
", + "smithy.api#http": { + "method": "GET", + "uri": "/projects", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "projects", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.evidently#ListProjectsRequest": { + "type": "structure", + "members": { + "maxResults": { + "target": "com.amazonaws.evidently#MaxProjects", + "traits": { + "smithy.api#documentation": "The maximum number of results to include in the response.
", + "smithy.api#httpQuery": "maxResults" + } + }, + "nextToken": { + "target": "com.amazonaws.evidently#NextToken", + "traits": { + "smithy.api#documentation": "The token to use when requesting the next set of results. You received this token from a previous \n ListProjects
operation.
An array of structures that contain the configuration details of the projects in the Region.
" + } + }, + "nextToken": { + "target": "com.amazonaws.evidently#NextToken", + "traits": { + "smithy.api#documentation": "The token to use in a subsequent ListProjects
operation to return\n the next set of results.
Displays the tags associated with an Evidently resource.
", + "smithy.api#http": { + "method": "GET", + "uri": "/tags/{resourceArn}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.evidently#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.evidently#Arn", + "traits": { + "smithy.api#documentation": "The ARN of the resource that you want to see the tags of.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.evidently#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "tags": { + "target": "com.amazonaws.evidently#TagMap", + "traits": { + "smithy.api#documentation": "The list of tag keys and values associated with the resource you specified.
" + } + } + } + }, + "com.amazonaws.evidently#MaxExperiments": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.evidently#MaxFeatures": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.evidently#MaxLaunches": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.evidently#MaxProjects": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 50 + } + } + }, + "com.amazonaws.evidently#MetricDefinition": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.evidently#CwDimensionSafeName", + "traits": { + "smithy.api#documentation": "The name of the metric.
" + } + }, + "entityIdKey": { + "target": "com.amazonaws.evidently#JsonPath", + "traits": { + "smithy.api#documentation": "The entity, such as a user or session, that does an action that causes a metric\n value to be recorded.
" + } + }, + "valueKey": { + "target": "com.amazonaws.evidently#JsonPath", + "traits": { + "smithy.api#documentation": "The value that is tracked to produce the metric.
" + } + }, + "eventPattern": { + "target": "com.amazonaws.evidently#JsonValue", + "traits": { + "smithy.api#documentation": "The EventBridge event pattern that defines how the metric is recorded.
\nFor more information about EventBridge event patterns, see \n Amazon EventBridge event patterns.
" + } + }, + "unitLabel": { + "target": "com.amazonaws.evidently#MetricUnitLabel", + "traits": { + "smithy.api#documentation": "The label for the units that the metric is measuring.
" + } + } + }, + "traits": { + "smithy.api#documentation": "This structure defines a metric that is being used to evaluate the variations\n during a launch or experiment.
" + } + }, + "com.amazonaws.evidently#MetricDefinitionConfig": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.evidently#CwDimensionSafeName", + "traits": { + "smithy.api#documentation": "A name for the metric.
" + } + }, + "entityIdKey": { + "target": "com.amazonaws.evidently#JsonPath", + "traits": { + "smithy.api#documentation": "The entity, such as a user or session, that does an action that causes a metric\n value to be recorded. An example is userDetails.userID
.
The value that is tracked to produce the metric.
" + } + }, + "eventPattern": { + "target": "com.amazonaws.evidently#JsonValue", + "traits": { + "smithy.api#documentation": "The EventBridge event pattern that defines how the metric is recorded.
\nFor more information about EventBridge event patterns, see \n Amazon EventBridge event patterns.
", + "smithy.api#length": { + "max": 1024 + } + } + }, + "unitLabel": { + "target": "com.amazonaws.evidently#MetricUnitLabel", + "traits": { + "smithy.api#documentation": "A label for the units that the metric is measuring.
" + } + } + }, + "traits": { + "smithy.api#documentation": "This structure defines a metric that you want to use to evaluate the variations\n during a launch or experiment.
" + } + }, + "com.amazonaws.evidently#MetricGoal": { + "type": "structure", + "members": { + "metricDefinition": { + "target": "com.amazonaws.evidently#MetricDefinition", + "traits": { + "smithy.api#documentation": "A structure that contains details about the metric.
", + "smithy.api#required": {} + } + }, + "desiredChange": { + "target": "com.amazonaws.evidently#ChangeDirectionEnum", + "traits": { + "smithy.api#documentation": "\n INCREASE
means that a variation with a higher number for this metric is performing \n better.
\n DECREASE
means that a variation with a lower number for this metric is performing \n better.
A structure that tells Evidently whether higher or lower values are desired for a metric that is \n used in an experiment.
" + } + }, + "com.amazonaws.evidently#MetricGoalConfig": { + "type": "structure", + "members": { + "metricDefinition": { + "target": "com.amazonaws.evidently#MetricDefinitionConfig", + "traits": { + "smithy.api#documentation": "A structure that contains details about the metric.
", + "smithy.api#required": {} + } + }, + "desiredChange": { + "target": "com.amazonaws.evidently#ChangeDirectionEnum", + "traits": { + "smithy.api#documentation": "\n INCREASE
means that a variation with a higher number for this metric is performing \n better.
\n DECREASE
means that a variation with a lower number for this metric is performing \n better.
Use this structure to tell Evidently whether higher or lower values are desired for a metric that is \n used in an experiment.
" + } + }, + "com.amazonaws.evidently#MetricGoalConfigList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#MetricGoalConfig" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 3 + } + } + }, + "com.amazonaws.evidently#MetricGoalsList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#MetricGoal" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 3 + } + } + }, + "com.amazonaws.evidently#MetricMonitor": { + "type": "structure", + "members": { + "metricDefinition": { + "target": "com.amazonaws.evidently#MetricDefinition", + "traits": { + "smithy.api#documentation": "A structure that defines the metric.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A structure that defines a metric to be used to monitor performance of the variations during a launch.
" + } + }, + "com.amazonaws.evidently#MetricMonitorConfig": { + "type": "structure", + "members": { + "metricDefinition": { + "target": "com.amazonaws.evidently#MetricDefinitionConfig", + "traits": { + "smithy.api#documentation": "A structure that defines the metric.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A structure that defines a metric to be used to monitor performance of the variations during a launch.
" + } + }, + "com.amazonaws.evidently#MetricMonitorConfigList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#MetricMonitorConfig" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 3 + } + } + }, + "com.amazonaws.evidently#MetricMonitorList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#MetricMonitor" + }, + "traits": { + "smithy.api#length": { + "max": 3 + } + } + }, + "com.amazonaws.evidently#MetricNameList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#CwDimensionSafeName" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + }, + "com.amazonaws.evidently#MetricUnitLabel": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": ".*" + } + }, + "com.amazonaws.evidently#NextToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 8192 + }, + "smithy.api#pattern": ".*" + } + }, + "com.amazonaws.evidently#OnlineAbConfig": { + "type": "structure", + "members": { + "controlTreatmentName": { + "target": "com.amazonaws.evidently#TreatmentName", + "traits": { + "smithy.api#documentation": "The name of the variation that is to be the default variation that the other variations are compared to.
" + } + }, + "treatmentWeights": { + "target": "com.amazonaws.evidently#TreatmentToWeightMap", + "traits": { + "smithy.api#documentation": "A set of key-value pairs. The keys are variation names, and the values are the portion\n of experiment traffic to be assigned to that variation. Specify the traffic portion in\n thousandths of a percent, so 20,000 for a variation would allocate 20% of the experiment\n traffic to that variation.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A structure that contains the configuration of which variation to use as the \"control\"\n version. The \"control\" version is used for comparison with other variations. This structure\n also specifies how much experiment traffic is allocated to each variation.
" + } + }, + "com.amazonaws.evidently#OnlineAbDefinition": { + "type": "structure", + "members": { + "controlTreatmentName": { + "target": "com.amazonaws.evidently#TreatmentName", + "traits": { + "smithy.api#documentation": "The name of the variation that is the default variation that the other variations are compared to.
" + } + }, + "treatmentWeights": { + "target": "com.amazonaws.evidently#TreatmentToWeightMap", + "traits": { + "smithy.api#documentation": "A set of key-value pairs. The keys are variation names, and the values are the portion\n of experiment traffic to be assigned to that variation. The traffic portion is specified in\n thousandths of a percent, so 20,000 for a variation would allocate 20% of the experiment\n traffic to that variation.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A structure that contains the configuration of which variation to use as the \"control\"\n version. The \"control\" version is used for comparison with other variations. This structure\n also specifies how much experiment traffic is allocated to each variation.
" + } + }, + "com.amazonaws.evidently#Project": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.evidently#ProjectArn", + "traits": { + "smithy.api#documentation": "The name or ARN of the project.
", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.evidently#ProjectName", + "traits": { + "smithy.api#documentation": "The name of the project.
", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.evidently#ProjectStatus", + "traits": { + "smithy.api#documentation": "The current state of the project.
", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.evidently#Description", + "traits": { + "smithy.api#documentation": "The user-entered description of the project.
" + } + }, + "createdTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that the project is created.
", + "smithy.api#required": {} + } + }, + "lastUpdatedTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that the project was most recently updated.
", + "smithy.api#required": {} + } + }, + "featureCount": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#documentation": "The number of features currently in the project.
" + } + }, + "launchCount": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#documentation": "The number of launches currently in the project. This includes all launches that have been created\n and not deleted, whether they are ongoing or not.
" + } + }, + "activeLaunchCount": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#documentation": "The number of ongoing launches currently in the project.
" + } + }, + "experimentCount": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#documentation": "The number of experiments currently in the project. This includes all experiments that have been created\n and not deleted, whether they are ongoing or not.
" + } + }, + "activeExperimentCount": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#documentation": "The number of ongoing experiments currently in the project.
" + } + }, + "dataDelivery": { + "target": "com.amazonaws.evidently#ProjectDataDelivery", + "traits": { + "smithy.api#documentation": "A structure that contains information about where Evidently is to store\n evaluation events for longer term storage.
" + } + }, + "tags": { + "target": "com.amazonaws.evidently#TagMap", + "traits": { + "smithy.api#documentation": "The list of tag keys and values associated with this project.
" + } + } + }, + "traits": { + "smithy.api#documentation": "This structure defines a project, which is the logical object in Evidently that can contain features, launches, and \n experiments. Use projects to group similar features together.
" + } + }, + "com.amazonaws.evidently#ProjectArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2048 + }, + "smithy.api#pattern": "arn:[^:]*:[^:]*:[^:]*:[^:]*:project/[-a-zA-Z0-9._]*" + } + }, + "com.amazonaws.evidently#ProjectDataDelivery": { + "type": "structure", + "members": { + "s3Destination": { + "target": "com.amazonaws.evidently#S3Destination", + "traits": { + "smithy.api#documentation": "If the project stores evaluation events in an Amazon S3 bucket, this structure\n stores the bucket name and bucket prefix.
" + } + }, + "cloudWatchLogs": { + "target": "com.amazonaws.evidently#CloudWatchLogsDestination", + "traits": { + "smithy.api#documentation": "If the project stores evaluation events in CloudWatch Logs, this structure\n stores the log group name.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A structure that contains information about where Evidently is to store\n evaluation events for longer term storage.
" + } + }, + "com.amazonaws.evidently#ProjectDataDeliveryConfig": { + "type": "structure", + "members": { + "s3Destination": { + "target": "com.amazonaws.evidently#S3DestinationConfig", + "traits": { + "smithy.api#documentation": "If the project stores evaluation events in an Amazon S3 bucket, this structure\n stores the bucket name and bucket prefix.
" + } + }, + "cloudWatchLogs": { + "target": "com.amazonaws.evidently#CloudWatchLogsDestinationConfig", + "traits": { + "smithy.api#documentation": "If the project stores evaluation events in CloudWatch Logs, this structure\n stores the log group name.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A structure that contains information about where Evidently is to store\n evaluation events for longer term storage.
" + } + }, + "com.amazonaws.evidently#ProjectName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 127 + }, + "smithy.api#pattern": "[-a-zA-Z0-9._]*" + } + }, + "com.amazonaws.evidently#ProjectRef": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2048 + }, + "smithy.api#pattern": "([-a-zA-Z0-9._]*)|(arn:[^:]*:[^:]*:[^:]*:[^:]*:project/[-a-zA-Z0-9._]*)" + } + }, + "com.amazonaws.evidently#ProjectResource": { + "type": "resource", + "identifiers": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef" + } + }, + "create": { + "target": "com.amazonaws.evidently#CreateProject" + }, + "read": { + "target": "com.amazonaws.evidently#GetProject" + }, + "delete": { + "target": "com.amazonaws.evidently#DeleteProject" + }, + "list": { + "target": "com.amazonaws.evidently#ListProjects" + }, + "operations": [ + { + "target": "com.amazonaws.evidently#BatchEvaluateFeature" + }, + { + "target": "com.amazonaws.evidently#EvaluateFeature" + }, + { + "target": "com.amazonaws.evidently#PutProjectEvents" + }, + { + "target": "com.amazonaws.evidently#UpdateProject" + }, + { + "target": "com.amazonaws.evidently#UpdateProjectDataDelivery" + } + ], + "resources": [ + { + "target": "com.amazonaws.evidently#ExperimentResource" + }, + { + "target": "com.amazonaws.evidently#FeatureResource" + }, + { + "target": "com.amazonaws.evidently#LaunchResource" + } + ], + "traits": { + "aws.api#arn": { + "template": "{project}", + "absolute": false, + "noAccount": false, + "noRegion": false + } + } + }, + "com.amazonaws.evidently#ProjectStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "AVAILABLE", + "name": "AVAILABLE" + }, + { + "value": "UPDATING", + "name": "UPDATING" + } + ] + } + }, + "com.amazonaws.evidently#ProjectSummariesList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#ProjectSummary" + } + }, + "com.amazonaws.evidently#ProjectSummary": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.evidently#ProjectArn", + "traits": { + "smithy.api#documentation": "The name or ARN of the project.
", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.evidently#ProjectName", + "traits": { + "smithy.api#documentation": "The name of the project.
", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.evidently#ProjectStatus", + "traits": { + "smithy.api#documentation": "The current state of the project.
", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.evidently#Description", + "traits": { + "smithy.api#documentation": "The description of the project.
" + } + }, + "createdTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that the project is created.
", + "smithy.api#required": {} + } + }, + "lastUpdatedTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that the project was most recently updated.
", + "smithy.api#required": {} + } + }, + "featureCount": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#documentation": "The number of features currently in the project.
" + } + }, + "launchCount": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#documentation": "The number of launches currently in the project, including launches that are ongoing, completed, and not started yet.
" + } + }, + "activeLaunchCount": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#documentation": "The number of ongoing launches currently in the project.
" + } + }, + "experimentCount": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#documentation": "The number of experiments currently in the project.
" + } + }, + "activeExperimentCount": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#documentation": "The number of experiments currently in the project.
" + } + }, + "tags": { + "target": "com.amazonaws.evidently#TagMap", + "traits": { + "smithy.api#documentation": "The list of tag keys and values associated with this project.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A structure that contains configuration information about an Evidently project.
" + } + }, + "com.amazonaws.evidently#PutProjectEvents": { + "type": "operation", + "input": { + "target": "com.amazonaws.evidently#PutProjectEventsRequest" + }, + "output": { + "target": "com.amazonaws.evidently#PutProjectEventsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.evidently#AccessDeniedException" + }, + { + "target": "com.amazonaws.evidently#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.evidently#ThrottlingException" + }, + { + "target": "com.amazonaws.evidently#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Sends performance events to Evidently. These events can be used to evaluate a launch or\n an experiment.
", + "smithy.api#endpoint": { + "hostPrefix": "dataplane." + }, + "smithy.api#examples": [ + { + "title": "Post evaluation Event for Project", + "documentation": "", + "input": { + "project": "ExampleProject", + "events": [ + { + "timestamp": 1627580583, + "type": "aws.evidently.evaluation", + "data": "{\"feature\":\"ExampleFeature\",\"entityId\":\"username@email.com\",\"entityAttributes\":{\"browser\":{\"s\":\"Chrome\"}},\"variation\":\"variationA\",\"type\":\"EXPERIMENT_RULE_MATCH\",\"details\":{\"experiment\":\"Jan2020_landing_page_banner\",\"treatment\":\"control\",\"salt\":\"ADJNC1237ASDNU\"}}" + } + ] + }, + "output": { + "failedEventCount": 0, + "eventResults": [ + { + "eventId": "e55c1f5f-309b-440e-b0d8-64506987c20f", + "errorCode": "null", + "errorMessage": "null" + } + ] + } + } + ], + "smithy.api#http": { + "method": "POST", + "uri": "/events/projects/{project}", + "code": 200 + }, + "smithy.api#tags": [ + "dataplane" + ] + } + }, + "com.amazonaws.evidently#PutProjectEventsRequest": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef", + "traits": { + "smithy.api#documentation": "The name or ARN of the project to write the events to.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "events": { + "target": "com.amazonaws.evidently#EventList", + "traits": { + "smithy.api#documentation": "An array of event structures that contain the performance data that is being sent to\n Evidently.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.evidently#PutProjectEventsResponse": { + "type": "structure", + "members": { + "failedEventCount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The number of events in the operation that could not be used by Evidently.
" + } + }, + "eventResults": { + "target": "com.amazonaws.evidently#PutProjectEventsResultEntryList", + "traits": { + "smithy.api#documentation": "A structure that contains Evidently's response to the sent events, including an event ID and \n error codes, if any.
" + } + } + } + }, + "com.amazonaws.evidently#PutProjectEventsResultEntry": { + "type": "structure", + "members": { + "eventId": { + "target": "com.amazonaws.evidently#Uuid", + "traits": { + "smithy.api#documentation": "A unique ID assigned to this PutProjectEvents
operation.
If the PutProjectEvents
operation has an error, the error code is returned\n here.
If the PutProjectEvents
operation has an error, the error message is\n returned here.
A structure that contains Evidently's response to the sent events, including an event ID and error codes, if any.
" + } + }, + "com.amazonaws.evidently#PutProjectEventsResultEntryList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#PutProjectEventsResultEntry" + } + }, + "com.amazonaws.evidently#RandomizationSalt": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 127 + }, + "smithy.api#pattern": ".*" + } + }, + "com.amazonaws.evidently#ResourceNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + }, + "resourceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ID of the resource that caused the exception.
" + } + }, + "resourceType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The type of the resource that is associated with the error.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The request references a resource that does not exist.
", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.evidently#ResultsPeriod": { + "type": "long", + "traits": { + "smithy.api#range": { + "min": 300, + "max": 90000 + } + } + }, + "com.amazonaws.evidently#RuleName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + } + } + }, + "com.amazonaws.evidently#RuleType": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + } + } + }, + "com.amazonaws.evidently#S3BucketSafeName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 3, + "max": 63 + }, + "smithy.api#pattern": "^[a-z0-9][-a-z0-9]*[a-z0-9]$" + } + }, + "com.amazonaws.evidently#S3Destination": { + "type": "structure", + "members": { + "bucket": { + "target": "com.amazonaws.evidently#S3BucketSafeName", + "traits": { + "smithy.api#documentation": "The name of the bucket in which Evidently stores evaluation events.
" + } + }, + "prefix": { + "target": "com.amazonaws.evidently#S3PrefixSafeName", + "traits": { + "smithy.api#documentation": "The bucket prefix in which Evidently stores evaluation events.
" + } + } + }, + "traits": { + "smithy.api#documentation": "If the project stores evaluation events in an Amazon S3 bucket, this structure\n stores the bucket name and bucket prefix.
" + } + }, + "com.amazonaws.evidently#S3DestinationConfig": { + "type": "structure", + "members": { + "bucket": { + "target": "com.amazonaws.evidently#S3BucketSafeName", + "traits": { + "smithy.api#documentation": "The name of the bucket in which Evidently stores evaluation events.
" + } + }, + "prefix": { + "target": "com.amazonaws.evidently#S3PrefixSafeName", + "traits": { + "smithy.api#documentation": "The bucket prefix in which Evidently stores evaluation events.
" + } + } + }, + "traits": { + "smithy.api#documentation": "If the project stores evaluation events in an Amazon S3 bucket, this structure\n stores the bucket name and bucket prefix.
" + } + }, + "com.amazonaws.evidently#S3PrefixSafeName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + }, + "smithy.api#pattern": "^[-a-zA-Z0-9!_.*'()/]*$" + } + }, + "com.amazonaws.evidently#ScheduledSplit": { + "type": "structure", + "members": { + "startTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that this step of the launch starts.
", + "smithy.api#required": {} + } + }, + "groupWeights": { + "target": "com.amazonaws.evidently#GroupToWeightMap", + "traits": { + "smithy.api#documentation": "The traffic allocation percentages among the feature variations during one step of a\n launch. This is a set of key-value pairs. The keys are variation names. The values represent\n the percentage of traffic to allocate to that variation during this step.
" + } + } + }, + "traits": { + "smithy.api#documentation": "This structure defines the traffic allocation percentages among the feature\n variations during one step of a launch, and the start time of that step.
" + } + }, + "com.amazonaws.evidently#ScheduledSplitConfig": { + "type": "structure", + "members": { + "startTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that this step of the launch starts.
", + "smithy.api#required": {} + } + }, + "groupWeights": { + "target": "com.amazonaws.evidently#GroupToWeightMap", + "traits": { + "smithy.api#documentation": "The traffic allocation percentages among the feature variations during one step of a\n launch. This is a set of key-value pairs. The keys are variation names. The values represent\n the percentage of traffic to allocate to that variation during this step.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "This structure defines the traffic allocation percentages among the feature\n variations during one step of a launch, and the start time of that step.
" + } + }, + "com.amazonaws.evidently#ScheduledSplitConfigList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#ScheduledSplitConfig" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 6 + } + } + }, + "com.amazonaws.evidently#ScheduledSplitsLaunchConfig": { + "type": "structure", + "members": { + "steps": { + "target": "com.amazonaws.evidently#ScheduledSplitConfigList", + "traits": { + "smithy.api#documentation": "An array of structures that define the traffic allocation percentages among the feature\n variations during each step of the launch. This also defines the start time of each\n step.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "An array of structures that define the traffic allocation percentages among the feature\n variations during each step of a launch. This also defines the start time of each step.
" + } + }, + "com.amazonaws.evidently#ScheduledSplitsLaunchDefinition": { + "type": "structure", + "members": { + "steps": { + "target": "com.amazonaws.evidently#ScheduledStepList", + "traits": { + "smithy.api#documentation": "An array of structures that define the traffic allocation percentages among the feature\n variations during each step of the launch. This also defines the start time of each\n step.
" + } + } + }, + "traits": { + "smithy.api#documentation": "An array of structures that define the traffic allocation percentages among the feature\n variations during each step of a launch. This also defines the start time of each step.
" + } + }, + "com.amazonaws.evidently#ScheduledStepList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#ScheduledSplit" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 6 + } + } + }, + "com.amazonaws.evidently#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + }, + "resourceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ID of the resource that caused the exception.
" + } + }, + "resourceType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The type of the resource that is associated with the error.
" + } + }, + "serviceCode": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ID of the service that is associated with the error.
" + } + }, + "quotaCode": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ID of the service quota that was exceeded.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The request would cause a service quota to be exceeded.
", + "smithy.api#error": "client", + "smithy.api#httpError": 402 + } + }, + "com.amazonaws.evidently#ServiceUnavailableException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "The service was unavailable. Retry the request.
", + "smithy.api#error": "server", + "smithy.api#httpError": 503 + } + }, + "com.amazonaws.evidently#SplitWeight": { + "type": "long", + "traits": { + "smithy.api#range": { + "min": 0, + "max": 100000 + } + } + }, + "com.amazonaws.evidently#StartExperiment": { + "type": "operation", + "input": { + "target": "com.amazonaws.evidently#StartExperimentRequest" + }, + "output": { + "target": "com.amazonaws.evidently#StartExperimentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.evidently#AccessDeniedException" + }, + { + "target": "com.amazonaws.evidently#ConflictException" + }, + { + "target": "com.amazonaws.evidently#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.evidently#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.evidently#ThrottlingException" + }, + { + "target": "com.amazonaws.evidently#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Starts an existing experiment. To create an experiment, \n use CreateExperiment.
", + "smithy.api#http": { + "method": "POST", + "uri": "/projects/{project}/experiments/{experiment}/start", + "code": 200 + } + } + }, + "com.amazonaws.evidently#StartExperimentRequest": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef", + "traits": { + "smithy.api#documentation": "The name or ARN of the project that contains the experiment to start.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "experiment": { + "target": "com.amazonaws.evidently#ExperimentName", + "traits": { + "smithy.api#documentation": "The name of the experiment to start.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "analysisCompleteTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time to end the experiment.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.evidently#StartExperimentResponse": { + "type": "structure", + "members": { + "startedTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the experiment started.
" + } + } + } + }, + "com.amazonaws.evidently#StartLaunch": { + "type": "operation", + "input": { + "target": "com.amazonaws.evidently#StartLaunchRequest" + }, + "output": { + "target": "com.amazonaws.evidently#StartLaunchResponse" + }, + "errors": [ + { + "target": "com.amazonaws.evidently#AccessDeniedException" + }, + { + "target": "com.amazonaws.evidently#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.evidently#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.evidently#ThrottlingException" + }, + { + "target": "com.amazonaws.evidently#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Starts an existing launch. To create a launch, \n use CreateLaunch.
", + "smithy.api#http": { + "method": "POST", + "uri": "/projects/{project}/launches/{launch}/start", + "code": 200 + } + } + }, + "com.amazonaws.evidently#StartLaunchRequest": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef", + "traits": { + "smithy.api#documentation": "The name or ARN of the project that contains the launch to start.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "launch": { + "target": "com.amazonaws.evidently#LaunchName", + "traits": { + "smithy.api#documentation": "The name of the launch to start.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.evidently#StartLaunchResponse": { + "type": "structure", + "members": { + "launch": { + "target": "com.amazonaws.evidently#Launch", + "traits": { + "smithy.api#documentation": "A structure that contains information about the launch that was started.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.evidently#StopExperiment": { + "type": "operation", + "input": { + "target": "com.amazonaws.evidently#StopExperimentRequest" + }, + "output": { + "target": "com.amazonaws.evidently#StopExperimentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.evidently#AccessDeniedException" + }, + { + "target": "com.amazonaws.evidently#ConflictException" + }, + { + "target": "com.amazonaws.evidently#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.evidently#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.evidently#ThrottlingException" + }, + { + "target": "com.amazonaws.evidently#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Stops an experiment that is currently running. If you stop an experiment, you can't\n resume it or restart it.
", + "smithy.api#http": { + "method": "POST", + "uri": "/projects/{project}/experiments/{experiment}/cancel", + "code": 200 + } + } + }, + "com.amazonaws.evidently#StopExperimentRequest": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef", + "traits": { + "smithy.api#documentation": "The name or ARN of the project that contains the experiment to stop.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "experiment": { + "target": "com.amazonaws.evidently#ExperimentName", + "traits": { + "smithy.api#documentation": "The name of the experiment to stop.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "desiredState": { + "target": "com.amazonaws.evidently#ExperimentStopDesiredState", + "traits": { + "smithy.api#documentation": "Specify whether the experiment is to be considered COMPLETED
or \n CANCELLED
after it stops.
A string that describes why you are stopping the experiment.
" + } + } + } + }, + "com.amazonaws.evidently#StopExperimentResponse": { + "type": "structure", + "members": { + "endedTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that the experiment stopped.
" + } + } + } + }, + "com.amazonaws.evidently#StopLaunch": { + "type": "operation", + "input": { + "target": "com.amazonaws.evidently#StopLaunchRequest" + }, + "output": { + "target": "com.amazonaws.evidently#StopLaunchResponse" + }, + "errors": [ + { + "target": "com.amazonaws.evidently#AccessDeniedException" + }, + { + "target": "com.amazonaws.evidently#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.evidently#ThrottlingException" + }, + { + "target": "com.amazonaws.evidently#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Stops a launch that is currently running. After you stop a launch, you will not be able to resume it or restart it. \n Also, it \n will not be evaluated as a rule for traffic allocation, and the traffic that was allocated to the launch\n will instead be available to the feature's experiment, if there is one. Otherwise, all traffic\n will be served the default variation after the launch is stopped.
", + "smithy.api#http": { + "method": "POST", + "uri": "/projects/{project}/launches/{launch}/cancel", + "code": 200 + } + } + }, + "com.amazonaws.evidently#StopLaunchRequest": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef", + "traits": { + "smithy.api#documentation": "The name or ARN of the project that contains the launch that you want to stop.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "launch": { + "target": "com.amazonaws.evidently#LaunchName", + "traits": { + "smithy.api#documentation": "The name of the launch to stop.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "desiredState": { + "target": "com.amazonaws.evidently#LaunchStopDesiredState", + "traits": { + "smithy.api#documentation": "Specify whether to consider the launch as COMPLETED
or\n CANCELLED
after it stops.
A string that describes why you are stopping the launch.
" + } + } + } + }, + "com.amazonaws.evidently#StopLaunchResponse": { + "type": "structure", + "members": { + "endedTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that the launch stopped.
" + } + } + } + }, + "com.amazonaws.evidently#TagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^(?!aws:)[a-zA-Z+-=._:/]+$" + } + }, + "com.amazonaws.evidently#TagKeyList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#TagKey" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "com.amazonaws.evidently#TagMap": { + "type": "map", + "key": { + "target": "com.amazonaws.evidently#TagKey" + }, + "value": { + "target": "com.amazonaws.evidently#TagValue" + } + }, + "com.amazonaws.evidently#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.evidently#TagResourceRequest" + }, + "output": { + "target": "com.amazonaws.evidently#TagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.evidently#ConflictException" + }, + { + "target": "com.amazonaws.evidently#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.evidently#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Assigns one or more tags (key-value pairs) to the specified CloudWatch Evidently resource. Projects,\n features, launches, and experiments can be tagged.
\nTags can help you organize and categorize your resources. You can also use them to scope user\n permissions by granting a user\n permission to access or change only resources with certain tag values.
\nTags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.
\nYou can use the TagResource
action with a resource that already has tags. \n If you specify a new tag key for the resource, \n this tag is appended to the list of tags associated\n with the alarm. If you specify a tag key that is already associated with the resource, the new tag value that you specify replaces\n the previous value for that tag.
You can associate as many as 50 tags with a resource.
\nFor more information, see Tagging Amazon Web Services resources.
", + "smithy.api#http": { + "method": "POST", + "uri": "/tags/{resourceArn}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.evidently#TagResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.evidently#Arn", + "traits": { + "smithy.api#documentation": "The ARN of the CloudWatch Evidently resource that you're adding tags to.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.evidently#TagMap", + "traits": { + "smithy.api#documentation": "The list of key-value pairs to associate with the resource.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.evidently#TagResourceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.evidently#TagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, + "com.amazonaws.evidently#ThrottlingException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + }, + "serviceCode": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ID of the service that is associated with the error.
" + } + }, + "quotaCode": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ID of the service quota that was exceeded.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The request was denied because of request throttling. Retry the request.
", + "smithy.api#error": "client", + "smithy.api#httpError": 429 + } + }, + "com.amazonaws.evidently#TimestampList": { + "type": "list", + "member": { + "target": "smithy.api#Timestamp" + }, + "traits": { + "smithy.api#length": { + "max": 100800 + } + } + }, + "com.amazonaws.evidently#Treatment": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.evidently#TreatmentName", + "traits": { + "smithy.api#documentation": "The name of this treatment.
", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.evidently#Description", + "traits": { + "smithy.api#documentation": "The description of the treatment.
" + } + }, + "featureVariations": { + "target": "com.amazonaws.evidently#FeatureToVariationMap", + "traits": { + "smithy.api#documentation": "The feature variation used for this treatment. This is a key-value pair. The key is the\n feature name, and the value is the variation name.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A structure that defines one treatment in an experiment. A treatment is a variation of the feature\n that you are including in the experiment.
" + } + }, + "com.amazonaws.evidently#TreatmentConfig": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.evidently#TreatmentName", + "traits": { + "smithy.api#documentation": "A name for this treatment.
", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.evidently#Description", + "traits": { + "smithy.api#documentation": "A description for this treatment.
" + } + }, + "feature": { + "target": "com.amazonaws.evidently#FeatureName", + "traits": { + "smithy.api#documentation": "The feature that this experiment is testing.
", + "smithy.api#required": {} + } + }, + "variation": { + "target": "com.amazonaws.evidently#VariationName", + "traits": { + "smithy.api#documentation": "The name of the variation to use as this treatment in the experiment.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A structure that defines one treatment in an experiment. A treatment is a variation of the feature\n that you are including in the experiment.
" + } + }, + "com.amazonaws.evidently#TreatmentConfigList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#TreatmentConfig" + }, + "traits": { + "smithy.api#length": { + "max": 5 + } + } + }, + "com.amazonaws.evidently#TreatmentList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#Treatment" + }, + "traits": { + "smithy.api#length": { + "min": 2, + "max": 5 + } + } + }, + "com.amazonaws.evidently#TreatmentName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 127 + }, + "smithy.api#pattern": "[-a-zA-Z0-9._]*" + } + }, + "com.amazonaws.evidently#TreatmentNameList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#TreatmentName" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 5 + } + } + }, + "com.amazonaws.evidently#TreatmentToWeightMap": { + "type": "map", + "key": { + "target": "com.amazonaws.evidently#TreatmentName" + }, + "value": { + "target": "com.amazonaws.evidently#SplitWeight" + } + }, + "com.amazonaws.evidently#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.evidently#UntagResourceRequest" + }, + "output": { + "target": "com.amazonaws.evidently#UntagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.evidently#ConflictException" + }, + { + "target": "com.amazonaws.evidently#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.evidently#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Removes one or more tags from the specified resource.
", + "smithy.api#http": { + "method": "DELETE", + "uri": "/tags/{resourceArn}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.evidently#UntagResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.evidently#Arn", + "traits": { + "smithy.api#documentation": "The ARN of the CloudWatch Evidently resource that you're removing tags from.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tagKeys": { + "target": "com.amazonaws.evidently#TagKeyList", + "traits": { + "smithy.api#documentation": "The list of tag keys to remove from the resource.
", + "smithy.api#httpQuery": "tagKeys", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.evidently#UntagResourceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.evidently#UpdateExperiment": { + "type": "operation", + "input": { + "target": "com.amazonaws.evidently#UpdateExperimentRequest" + }, + "output": { + "target": "com.amazonaws.evidently#UpdateExperimentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.evidently#AccessDeniedException" + }, + { + "target": "com.amazonaws.evidently#ConflictException" + }, + { + "target": "com.amazonaws.evidently#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.evidently#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Updates an Evidently experiment.
\nDon't use this operation to update an experiment's tag. Instead, use \n TagResource.
", + "smithy.api#http": { + "method": "PATCH", + "uri": "/projects/{project}/experiments/{experiment}", + "code": 200 + } + } + }, + "com.amazonaws.evidently#UpdateExperimentRequest": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef", + "traits": { + "smithy.api#documentation": "The name or ARN of the project that contains the experiment that you want to update.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "experiment": { + "target": "com.amazonaws.evidently#ExperimentName", + "traits": { + "smithy.api#documentation": "The name of the experiment to update.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.evidently#Description", + "traits": { + "smithy.api#documentation": "An optional description of the experiment.
" + } + }, + "treatments": { + "target": "com.amazonaws.evidently#TreatmentConfigList", + "traits": { + "smithy.api#documentation": "An array of structures that define the variations being tested in the experiment.
" + } + }, + "metricGoals": { + "target": "com.amazonaws.evidently#MetricGoalConfigList", + "traits": { + "smithy.api#documentation": "An array of structures that defines the metrics used for the experiment, and whether a higher\n or lower value for each metric is the goal.
" + } + }, + "randomizationSalt": { + "target": "com.amazonaws.evidently#RandomizationSalt", + "traits": { + "smithy.api#documentation": "When Evidently assigns a particular user session to an experiment, it must use a randomization ID\n to determine which variation the user session is served. This randomization ID is a combination of the entity ID\n and randomizationSalt
. If you omit randomizationSalt
, Evidently uses\n the experiment name as the randomizationSalt
.
The portion of the available audience that you want to allocate to this experiment, in thousandths of a percent. The available audience\n is the total audience minus the audience that you have allocated to overrides or current launches of\n this feature.
\nThis is represented in thousandths of a percent. For example, specify 20,000 to allocate 20% of the available audience.
" + } + }, + "onlineAbConfig": { + "target": "com.amazonaws.evidently#OnlineAbConfig", + "traits": { + "smithy.api#documentation": "A structure that contains the configuration of which variation o use as the \"control\"\n version. The \"control\" version is used for comparison with other variations. This structure\n also specifies how much experiment traffic is allocated to each variation.
" + } + } + } + }, + "com.amazonaws.evidently#UpdateExperimentResponse": { + "type": "structure", + "members": { + "experiment": { + "target": "com.amazonaws.evidently#Experiment", + "traits": { + "smithy.api#documentation": "A structure containing the configuration details of the experiment\n that was updated.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.evidently#UpdateFeature": { + "type": "operation", + "input": { + "target": "com.amazonaws.evidently#UpdateFeatureRequest" + }, + "output": { + "target": "com.amazonaws.evidently#UpdateFeatureResponse" + }, + "errors": [ + { + "target": "com.amazonaws.evidently#AccessDeniedException" + }, + { + "target": "com.amazonaws.evidently#ConflictException" + }, + { + "target": "com.amazonaws.evidently#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.evidently#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.evidently#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Updates an existing feature.
\nYou can't use this operation to update the tags of an existing feature. Instead, use \n TagResource.
", + "smithy.api#http": { + "method": "PATCH", + "uri": "/projects/{project}/features/{feature}", + "code": 200 + } + } + }, + "com.amazonaws.evidently#UpdateFeatureRequest": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef", + "traits": { + "smithy.api#documentation": "The name or ARN of the project that contains the feature to be updated.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "feature": { + "target": "com.amazonaws.evidently#FeatureName", + "traits": { + "smithy.api#documentation": "The name of the feature to be updated.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "evaluationStrategy": { + "target": "com.amazonaws.evidently#FeatureEvaluationStrategy", + "traits": { + "smithy.api#documentation": "Specify ALL_RULES
to activate the traffic allocation specified by any ongoing\n launches or experiments. Specify DEFAULT_VARIATION
to serve the default variation\n to all users instead.
An optional description of the feature.
" + } + }, + "addOrUpdateVariations": { + "target": "com.amazonaws.evidently#VariationConfigsList", + "traits": { + "smithy.api#documentation": "To update variation configurations for this feature, or add new ones, specify this structure.\n In this array, include any variations that you want to add or update. If the array includes a variation name that\n already exists for this feature, it is updated. If it includes a new variation name, it is added\n as a new variation.
" + } + }, + "removeVariations": { + "target": "com.amazonaws.evidently#VariationNameList", + "traits": { + "smithy.api#documentation": "Removes a variation from the feature. If the variation you specify doesn't exist, then this \n makes no change and does not report an error.
\nThis operation fails if you try to remove a variation that is part of an \n ongoing launch or experiment.
" + } + }, + "defaultVariation": { + "target": "com.amazonaws.evidently#VariationName", + "traits": { + "smithy.api#documentation": "The name of the variation to use as the default variation. The default\n variation is served to users who are not allocated to any ongoing launches\n or experiments of this feature.
" + } + }, + "entityOverrides": { + "target": "com.amazonaws.evidently#EntityOverrideMap", + "traits": { + "smithy.api#documentation": "Specified users that should always be served a specific variation of a feature. Each user\n is specified by a key-value pair . For each key, specify a user by entering their user ID,\n account ID, or some other identifier. For the value, specify the name of the variation that\n they are to be served.
" + } + } + } + }, + "com.amazonaws.evidently#UpdateFeatureResponse": { + "type": "structure", + "members": { + "feature": { + "target": "com.amazonaws.evidently#Feature", + "traits": { + "smithy.api#documentation": "A structure that contains information about the updated feature.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.evidently#UpdateLaunch": { + "type": "operation", + "input": { + "target": "com.amazonaws.evidently#UpdateLaunchRequest" + }, + "output": { + "target": "com.amazonaws.evidently#UpdateLaunchResponse" + }, + "errors": [ + { + "target": "com.amazonaws.evidently#AccessDeniedException" + }, + { + "target": "com.amazonaws.evidently#ConflictException" + }, + { + "target": "com.amazonaws.evidently#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.evidently#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Updates a launch of a given feature.
\nDon't use this operation to update the tags of an existing launch. Instead, use \n TagResource.
", + "smithy.api#http": { + "method": "PATCH", + "uri": "/projects/{project}/launches/{launch}", + "code": 200 + } + } + }, + "com.amazonaws.evidently#UpdateLaunchRequest": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef", + "traits": { + "smithy.api#documentation": "The name or ARN of the project that contains the launch that you want to update.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "launch": { + "target": "com.amazonaws.evidently#LaunchName", + "traits": { + "smithy.api#documentation": "The name of the launch that is to be updated.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.evidently#Description", + "traits": { + "smithy.api#documentation": "An optional description for the launch.
" + } + }, + "groups": { + "target": "com.amazonaws.evidently#LaunchGroupConfigList", + "traits": { + "smithy.api#documentation": "An array of structures that contains the feature and variations that are to be used for\n the launch.
" + } + }, + "metricMonitors": { + "target": "com.amazonaws.evidently#MetricMonitorConfigList", + "traits": { + "smithy.api#documentation": "An array of structures that define the metrics that will be used to monitor \n the launch performance.
" + } + }, + "randomizationSalt": { + "target": "com.amazonaws.evidently#RandomizationSalt", + "traits": { + "smithy.api#documentation": "When Evidently assigns a particular user session to a launch, it must use a randomization ID\n to determine which variation the user session is served. This randomization ID is a combination of the entity ID\n and randomizationSalt
. If you omit randomizationSalt
, Evidently uses\n the launch name as the randomizationSalt
.
An array of structures that define the traffic allocation percentages among the feature\n variations during each step of the launch.
" + } + } + } + }, + "com.amazonaws.evidently#UpdateLaunchResponse": { + "type": "structure", + "members": { + "launch": { + "target": "com.amazonaws.evidently#Launch", + "traits": { + "smithy.api#documentation": "A structure that contains the new configuration of the launch that was updated.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.evidently#UpdateProject": { + "type": "operation", + "input": { + "target": "com.amazonaws.evidently#UpdateProjectRequest" + }, + "output": { + "target": "com.amazonaws.evidently#UpdateProjectResponse" + }, + "errors": [ + { + "target": "com.amazonaws.evidently#AccessDeniedException" + }, + { + "target": "com.amazonaws.evidently#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.evidently#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.evidently#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Updates the description of an existing project.
\nTo create a new project, use CreateProject.
\nDon't use this operation to update the data storage options of a project. Instead, use \n UpdateProjectDataDelivery.
\nDon't use this operation to update the tags of a project. Instead, use \n TagResource.
", + "smithy.api#http": { + "method": "PATCH", + "uri": "/projects/{project}", + "code": 200 + } + } + }, + "com.amazonaws.evidently#UpdateProjectDataDelivery": { + "type": "operation", + "input": { + "target": "com.amazonaws.evidently#UpdateProjectDataDeliveryRequest" + }, + "output": { + "target": "com.amazonaws.evidently#UpdateProjectDataDeliveryResponse" + }, + "errors": [ + { + "target": "com.amazonaws.evidently#AccessDeniedException" + }, + { + "target": "com.amazonaws.evidently#ConflictException" + }, + { + "target": "com.amazonaws.evidently#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.evidently#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.evidently#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Updates the data storage options for this project. If you store evaluation events, you an\n keep them and analyze them on your own. If you choose not to store evaluation events,\n Evidently deletes them after using them to produce metrics and other experiment results that\n you can view.
\nYou can't specify both cloudWatchLogs
and s3Destination
in the same operation.
The name or ARN of the project that you want to modify the data storage options for.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "s3Destination": { + "target": "com.amazonaws.evidently#S3DestinationConfig", + "traits": { + "smithy.api#documentation": "A structure containing the S3 bucket name and bucket prefix where you want to store evaluation events.
" + } + }, + "cloudWatchLogs": { + "target": "com.amazonaws.evidently#CloudWatchLogsDestinationConfig", + "traits": { + "smithy.api#documentation": "A structure containing the CloudWatch Logs log group where you want to store evaluation\n events.
" + } + } + } + }, + "com.amazonaws.evidently#UpdateProjectDataDeliveryResponse": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#Project", + "traits": { + "smithy.api#documentation": "A structure containing details about the project that you updated.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.evidently#UpdateProjectRequest": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#ProjectRef", + "traits": { + "smithy.api#documentation": "The name or ARN of the project to update.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.evidently#Description", + "traits": { + "smithy.api#documentation": "An optional description of the project.
" + } + } + } + }, + "com.amazonaws.evidently#UpdateProjectResponse": { + "type": "structure", + "members": { + "project": { + "target": "com.amazonaws.evidently#Project", + "traits": { + "smithy.api#documentation": "A structure containing information about the updated project.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.evidently#Uuid": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 36, + "max": 36 + }, + "smithy.api#pattern": "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" + } + }, + "com.amazonaws.evidently#ValidationException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + }, + "reason": { + "target": "com.amazonaws.evidently#ValidationExceptionReason", + "traits": { + "smithy.api#documentation": "A reason for the error.
" + } + }, + "fieldList": { + "target": "com.amazonaws.evidently#ValidationExceptionFieldList", + "traits": { + "smithy.api#documentation": "The parameter that caused the exception.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The value of a parameter in the request caused an error.
", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.evidently#ValidationExceptionField": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The error name.
", + "smithy.api#required": {} + } + }, + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The error message.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A structure containing an error name and message.
" + } + }, + "com.amazonaws.evidently#ValidationExceptionFieldList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#ValidationExceptionField" + } + }, + "com.amazonaws.evidently#ValidationExceptionReason": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "unknownOperation", + "name": "UNKNOWN_OPERATION" + }, + { + "value": "cannotParse", + "name": "CANNOT_PARSE" + }, + { + "value": "fieldValidationFailed", + "name": "FIELD_VALIDATION_FAILED" + }, + { + "value": "other", + "name": "OTHER" + } + ] + } + }, + "com.amazonaws.evidently#VariableValue": { + "type": "union", + "members": { + "boolValue": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If this feature uses the Boolean variation type, this field contains the Boolean value of\n this variation.
" + } + }, + "stringValue": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If this feature uses the string variation type, this field contains the string value of\n this variation.
", + "smithy.api#length": { + "max": 512 + } + } + }, + "longValue": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#documentation": "If this feature uses the long variation type, this field contains the long value of\n this variation.
", + "smithy.api#range": { + "min": -9007199254740991, + "max": 9007199254740991 + } + } + }, + "doubleValue": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "If this feature uses the double integer variation type, this field contains the double integer value of\n this variation.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The value assigned to a feature variation. This structure must contain exactly one\n field. It can be boolValue
, doubleValue
, longValue
, or\n stringValue
.
The name of the variation.
" + } + }, + "value": { + "target": "com.amazonaws.evidently#VariableValue", + "traits": { + "smithy.api#documentation": "The value assigned to this variation.
" + } + } + }, + "traits": { + "smithy.api#documentation": "This structure contains the name and variation value of one variation of a feature.
" + } + }, + "com.amazonaws.evidently#VariationConfig": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.evidently#VariationName", + "traits": { + "smithy.api#documentation": "The name of the variation.
", + "smithy.api#required": {} + } + }, + "value": { + "target": "com.amazonaws.evidently#VariableValue", + "traits": { + "smithy.api#documentation": "The value assigned to this variation.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "This structure contains the name and variation value of one variation of a feature.
" + } + }, + "com.amazonaws.evidently#VariationConfigsList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#VariationConfig" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 5 + } + } + }, + "com.amazonaws.evidently#VariationName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 127 + }, + "smithy.api#pattern": "[-a-zA-Z0-9._]*" + } + }, + "com.amazonaws.evidently#VariationNameList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#VariationName" + }, + "traits": { + "smithy.api#length": { + "max": 5 + } + } + }, + "com.amazonaws.evidently#VariationValueType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "STRING", + "name": "STRING" + }, + { + "value": "LONG", + "name": "LONG" + }, + { + "value": "DOUBLE", + "name": "DOUBLE" + }, + { + "value": "BOOLEAN", + "name": "BOOLEAN" + } + ] + } + }, + "com.amazonaws.evidently#VariationsList": { + "type": "list", + "member": { + "target": "com.amazonaws.evidently#Variation" + } + } + } +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/finspacedata.2020-07-13.json b/codegen/sdk-codegen/aws-models/finspacedata.2020-07-13.json index d792439b76f..2f28ffa467d 100644 --- a/codegen/sdk-codegen/aws-models/finspacedata.2020-07-13.json +++ b/codegen/sdk-codegen/aws-models/finspacedata.2020-07-13.json @@ -31,18 +31,6 @@ "shapes": { "com.amazonaws.finspacedata#AWSHabaneroPublicAPI": { "type": "service", - "version": "2020-07-13", - "operations": [ - { - "target": "com.amazonaws.finspacedata#CreateChangeset" - }, - { - "target": "com.amazonaws.finspacedata#GetProgrammaticAccessCredentials" - }, - { - "target": "com.amazonaws.finspacedata#GetWorkingLocation" - } - ], "traits": { "aws.api#service": { "sdkId": "finspace data", @@ -55,15 +43,60 @@ "name": "finspace-api" }, "aws.protocols#restJson1": {}, - "smithy.api#documentation": "The FinSpace APIs let you take actions inside the FinSpace environment.
", + "smithy.api#documentation": "The FinSpace APIs let you take actions inside the FinSpace.
", "smithy.api#title": "FinSpace Public API" - } + }, + "version": "2020-07-13", + "operations": [ + { + "target": "com.amazonaws.finspacedata#CreateChangeset" + }, + { + "target": "com.amazonaws.finspacedata#CreateDataset" + }, + { + "target": "com.amazonaws.finspacedata#CreateDataView" + }, + { + "target": "com.amazonaws.finspacedata#DeleteDataset" + }, + { + "target": "com.amazonaws.finspacedata#GetChangeset" + }, + { + "target": "com.amazonaws.finspacedata#GetDataset" + }, + { + "target": "com.amazonaws.finspacedata#GetDataView" + }, + { + "target": "com.amazonaws.finspacedata#GetProgrammaticAccessCredentials" + }, + { + "target": "com.amazonaws.finspacedata#GetWorkingLocation" + }, + { + "target": "com.amazonaws.finspacedata#ListChangesets" + }, + { + "target": "com.amazonaws.finspacedata#ListDatasets" + }, + { + "target": "com.amazonaws.finspacedata#ListDataViews" + }, + { + "target": "com.amazonaws.finspacedata#UpdateChangeset" + }, + { + "target": "com.amazonaws.finspacedata#UpdateDataset" + } + ] }, "com.amazonaws.finspacedata#AccessDeniedException": { "type": "structure", "members": { "message": { - "target": "com.amazonaws.finspacedata#errorMessage" + "target": "com.amazonaws.finspacedata#ErrorMessage2" } }, "traits": { @@ -72,9 +105,26 @@ "smithy.api#httpError": 403 } }, + "com.amazonaws.finspacedata#AliasString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^alias\\/\\S+$" + } + }, + "com.amazonaws.finspacedata#Boolean": { + "type": "boolean", + "traits": { + "smithy.api#documentation": "Common Boolean data type" + } + }, "com.amazonaws.finspacedata#ChangeType": { "type": "string", "traits": { + "smithy.api#documentation": "Indicates how the given change will be applied to the dataset.", "smithy.api#enum": [ { "value": "REPLACE", @@ -91,125 +141,278 @@ ] } }, - "com.amazonaws.finspacedata#ChangesetInfo": { + "com.amazonaws.finspacedata#ChangesetArn": { + "type": "string", + "traits": { + "smithy.api#documentation": "Arn for a given Changeset" + } + }, + "com.amazonaws.finspacedata#ChangesetErrorInfo": { "type": "structure", "members": { - "id": { - "target": "com.amazonaws.finspacedata#IdType", + "errorMessage": { + "target": "com.amazonaws.finspacedata#ErrorMessage", "traits": { - "smithy.api#documentation": "Unique identifier for a changeset.
" + "smithy.api#documentation": "The text of the error message.
" } }, - "changesetArn": { - "target": "com.amazonaws.finspacedata#arn", + "errorCategory": { + "target": "com.amazonaws.finspacedata#ErrorCategory", "traits": { - "smithy.api#documentation": "The ARN identifier of the changeset.
" + "smithy.api#documentation": "The category of the error.
\n\n VALIDATION
-The inputs to this request are invalid.
\n SERVICE_QUOTA_EXCEEDED
- Service quotas have been exceeded. Please\n contact AWS support to increase quotas.
\n ACCESS_DENIED
- Missing required permission to perform this\n request.
\n RESOURCE_NOT_FOUND
- One or more inputs to this request were not\n found.
\n THROTTLING
- The system temporarily lacks sufficient resources to process\n the request.
\n INTERNAL_SERVICE_EXCEPTION
- An internal service error has\n occurred.
\n CANCELLED
- Cancelled.
\n USER_RECOVERABLE
- A user recoverable error has occurred.
The structure with error messages.
" + } + }, + "com.amazonaws.finspacedata#ChangesetId": { + "type": "string", + "traits": { + "smithy.api#documentation": "ID used to identify a Changeset", + "smithy.api#length": { + "min": 1, + "max": 26 + } + } + }, + "com.amazonaws.finspacedata#ChangesetList": { + "type": "list", + "member": { + "target": "com.amazonaws.finspacedata#ChangesetSummary" + }, + "traits": { + "smithy.api#documentation": "List of Changeset Summaries" + } + }, + "com.amazonaws.finspacedata#ChangesetSummary": { + "type": "structure", + "members": { + "changesetId": { + "target": "com.amazonaws.finspacedata#ChangesetId", "traits": { - "smithy.api#documentation": "The unique identifier for the FinSpace dataset in which the changeset is created.
" + "smithy.api#documentation": "The unique identifier for a Changeset.
" } }, - "changeType": { - "target": "com.amazonaws.finspacedata#ChangeType", + "changesetArn": { + "target": "com.amazonaws.finspacedata#ChangesetArn", "traits": { - "smithy.api#documentation": "Change type indicates how a changeset is applied to a dataset.
\n\n REPLACE
- Changeset is considered as a replacement to all prior loaded\n changesets.
\n APPEND
- Changeset is considered as an addition to the end of all prior\n loaded changesets.
\n MODIFY
- Changeset is considered as a replacement to a specific prior\n ingested changeset.
The ARN identifier of the Changeset.
" } }, - "sourceType": { - "target": "com.amazonaws.finspacedata#SourceType", + "datasetId": { + "target": "com.amazonaws.finspacedata#DatasetId", "traits": { - "smithy.api#documentation": "Type of the data source from which the files to create the changeset are sourced.
\n\n S3
- Amazon S3.
The unique identifier for the FinSpace Dataset in which the Changeset is created.
" } }, - "sourceParams": { - "target": "com.amazonaws.finspacedata#stringMap", + "changeType": { + "target": "com.amazonaws.finspacedata#ChangeType", "traits": { - "smithy.api#documentation": "Source path from which the files to create the changeset are sourced.
" + "smithy.api#documentation": "Type that indicates how a Changeset is applied to a Dataset.
\n\n REPLACE
- Changeset is considered as a replacement to all prior loaded\n Changesets.
\n APPEND
- Changeset is considered as an addition to the end of all prior\n loaded Changesets.
\n MODIFY
- Changeset is considered as a replacement to a specific prior\n ingested Changeset.
Format type of the input files loaded into the changeset.
" + "smithy.api#documentation": "Options that define the location of the data being ingested.
" } }, "formatParams": { - "target": "com.amazonaws.finspacedata#stringMap", + "target": "com.amazonaws.finspacedata#FormatParams", "traits": { - "smithy.api#documentation": "Structure of the source file(s).
" + "smithy.api#documentation": "Options that define the structure of the source file(s).
" } }, - "createTimestamp": { - "target": "com.amazonaws.finspacedata#Timestamp", + "createTime": { + "target": "com.amazonaws.finspacedata#TimestampEpoch", "traits": { - "smithy.api#documentation": "The timestamp at which the changeset was created in FinSpace.
" + "smithy.api#documentation": "The timestamp at which the Changeset was created in FinSpace. The value is determined as Epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
" } }, "status": { - "target": "com.amazonaws.finspacedata#ChangesetStatus", + "target": "com.amazonaws.finspacedata#IngestionStatus", "traits": { - "smithy.api#documentation": "The status of changeset creation operation.
" + "smithy.api#documentation": "Status of the Changeset ingestion.
\n\n PENDING
- Changeset is pending creation.
\n FAILED
- Changeset creation has failed.
\n SUCCESS
- Changeset creation has succeeded.
\n RUNNING
- Changeset creation is running.
\n STOP_REQUESTED
- User requested Changeset creation to stop.
The structure with error messages.
" } }, - "changesetLabels": { - "target": "com.amazonaws.finspacedata#stringMap", + "activeUntilTimestamp": { + "target": "com.amazonaws.finspacedata#TimestampEpoch", "traits": { - "smithy.api#documentation": "Tags associated with the changeset.
" + "smithy.api#box": {}, + "smithy.api#documentation": "Time until which the Changeset is active. The value is determined as Epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
" } }, "updatesChangesetId": { - "target": "com.amazonaws.finspacedata#stringValue", + "target": "com.amazonaws.finspacedata#ChangesetId", "traits": { - "smithy.api#documentation": "Unique identifier of the changeset that is updated.
" + "smithy.api#documentation": "The unique identifier of the Changeset that is updated.
" } }, "updatedByChangesetId": { - "target": "com.amazonaws.finspacedata#stringValue", + "target": "com.amazonaws.finspacedata#ChangesetId", "traits": { - "smithy.api#documentation": "Unique identifier of the changeset that is updated a changeset.
" + "smithy.api#documentation": "The unique identifier of the updated Changeset.
" } } }, "traits": { - "smithy.api#documentation": "A changeset is unit of data in a dataset.
" + "smithy.api#documentation": "A Changeset is unit of data in a Dataset.
" + } + }, + "com.amazonaws.finspacedata#ClientToken": { + "type": "string", + "traits": { + "smithy.api#documentation": "Idempotence Token for API operations", + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "\\S" } }, - "com.amazonaws.finspacedata#ChangesetStatus": { + "com.amazonaws.finspacedata#ColumnDataType": { "type": "string", "traits": { + "smithy.api#documentation": "Data type of a column.", "smithy.api#enum": [ { - "value": "PENDING", - "name": "PENDING" + "value": "STRING", + "name": "STRING" }, { - "value": "FAILED", - "name": "FAILED" + "value": "CHAR", + "name": "CHAR" }, { - "value": "SUCCESS", - "name": "SUCCESS" + "value": "INTEGER", + "name": "INTEGER" }, { - "value": "RUNNING", - "name": "RUNNING" + "value": "TINYINT", + "name": "TINYINT" }, { - "value": "STOP_REQUESTED", - "name": "STOP_REQUESTED" + "value": "SMALLINT", + "name": "SMALLINT" + }, + { + "value": "BIGINT", + "name": "BIGINT" + }, + { + "value": "FLOAT", + "name": "FLOAT" + }, + { + "value": "DOUBLE", + "name": "DOUBLE" + }, + { + "value": "DATE", + "name": "DATE" + }, + { + "value": "DATETIME", + "name": "DATETIME" + }, + { + "value": "BOOLEAN", + "name": "BOOLEAN" + }, + { + "value": "BINARY", + "name": "BINARY" } ] } }, + "com.amazonaws.finspacedata#ColumnDefinition": { + "type": "structure", + "members": { + "dataType": { + "target": "com.amazonaws.finspacedata#ColumnDataType", + "traits": { + "smithy.api#documentation": "Data type of a column.
\n\n STRING
- A String data type.
\n CHAR
- A char data type.
\n INTEGER
- An integer data type.
\n TINYINT
- A tinyint data type.
\n SMALLINT
- A smallint data type.
\n BIGINT
- A bigint data type.
\n FLOAT
- A float data type.
\n DOUBLE
- A double data type.
\n DATE
- A date data type.
\n DATETIME
- A datetime data type.
\n BOOLEAN
- A boolean data type.
\n BINARY
- A binary data type.
Name for a column.
" + } + }, + "columnDescription": { + "target": "com.amazonaws.finspacedata#ColumnDescription", + "traits": { + "smithy.api#documentation": "Description for a column.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The definition of a column in a tabular Dataset.
" + } + }, + "com.amazonaws.finspacedata#ColumnDescription": { + "type": "string", + "traits": { + "smithy.api#documentation": "Column Description", + "smithy.api#length": { + "min": 0, + "max": 512 + }, + "smithy.api#pattern": "^[\\s\\S]*\\S[\\s\\S]*$" + } + }, + "com.amazonaws.finspacedata#ColumnList": { + "type": "list", + "member": { + "target": "com.amazonaws.finspacedata#ColumnDefinition" + }, + "traits": { + "smithy.api#documentation": "List of Column Definitions" + } + }, + "com.amazonaws.finspacedata#ColumnName": { + "type": "string", + "traits": { + "smithy.api#documentation": "Column Name", + "smithy.api#length": { + "min": 0, + "max": 126 + }, + "smithy.api#pattern": "\\S" + } + }, + "com.amazonaws.finspacedata#ColumnNameList": { + "type": "list", + "member": { + "target": "com.amazonaws.finspacedata#ColumnName" + }, + "traits": { + "smithy.api#documentation": "List of Column Names" + } + }, + "com.amazonaws.finspacedata#ConflictException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.finspacedata#ErrorMessage2" + } + }, + "traits": { + "smithy.api#documentation": "The request conflicts with an existing resource.
", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, "com.amazonaws.finspacedata#CreateChangeset": { "type": "operation", "input": { @@ -222,9 +425,15 @@ { "target": "com.amazonaws.finspacedata#AccessDeniedException" }, + { + "target": "com.amazonaws.finspacedata#ConflictException" + }, { "target": "com.amazonaws.finspacedata#InternalServerException" }, + { + "target": "com.amazonaws.finspacedata#LimitExceededException" + }, { "target": "com.amazonaws.finspacedata#ResourceNotFoundException" }, @@ -236,10 +445,10 @@ } ], "traits": { - "smithy.api#documentation": "Creates a new changeset in a FinSpace dataset.
", + "smithy.api#documentation": "Creates a new Changeset in a FinSpace Dataset.
", "smithy.api#http": { "method": "POST", - "uri": "/datasets/{datasetId}/changesets", + "uri": "/datasets/{datasetId}/changesetsv2", "code": 200 } } @@ -247,10 +456,17 @@ "com.amazonaws.finspacedata#CreateChangesetRequest": { "type": "structure", "members": { + "clientToken": { + "target": "com.amazonaws.finspacedata#ClientToken", + "traits": { + "smithy.api#documentation": "A token used to ensure idempotency.
", + "smithy.api#idempotencyToken": {} + } + }, "datasetId": { - "target": "com.amazonaws.finspacedata#IdType", + "target": "com.amazonaws.finspacedata#DatasetId", "traits": { - "smithy.api#documentation": "The unique identifier for the FinSpace dataset in which the changeset will be\n created.
", + "smithy.api#documentation": "The unique identifier for the FinSpace Dataset where the Changeset will be created.\n
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -258,243 +474,2057 @@ "changeType": { "target": "com.amazonaws.finspacedata#ChangeType", "traits": { - "smithy.api#documentation": "Option to indicate how a changeset will be applied to a dataset.
\n\n REPLACE
- Changeset will be considered as a replacement to all prior\n loaded changesets.
\n APPEND
- Changeset will be considered as an addition to the end of all\n prior loaded changesets.
Type of the data source from which the files to create the changeset will be\n sourced.
\n\n S3
- Amazon S3.
Option to indicate how a Changeset will be applied to a Dataset.
\n\n REPLACE
- Changeset will be considered as a replacement to all prior\n loaded Changesets.
\n APPEND
- Changeset will be considered as an addition to the end of all\n prior loaded Changesets.
\n MODIFY
- Changeset is considered as a replacement to a specific prior ingested Changeset.
Source path from which the files to create the changeset will be sourced.
", + "smithy.api#documentation": "Options that define the location of the data being ingested.
", "smithy.api#required": {} } }, - "formatType": { - "target": "com.amazonaws.finspacedata#FormatType", - "traits": { - "smithy.api#documentation": "Format type of the input files being loaded into the changeset.
" - } - }, "formatParams": { - "target": "com.amazonaws.finspacedata#stringMap", + "target": "com.amazonaws.finspacedata#FormatParams", "traits": { - "smithy.api#documentation": "Options that define the structure of the source file(s).
" - } - }, - "tags": { - "target": "com.amazonaws.finspacedata#stringMap", - "traits": { - "smithy.api#documentation": "Metadata tags to apply to this changeset.
" + "smithy.api#documentation": "Options that define the structure of the source file(s) including the format type (formatType
), header row (withHeader
), data separation character (separator
) and the type of compression (compression
).\n
\n formatType
is a required attribute and can have the following values:\n
\n PARQUET
- Parquet source file format.
\n CSV
- CSV source file format.
\n JSON
- JSON source file format.
\n XML
- XML source file format.
\n \n For example, you could specify the following for formatParams
:\n \n \n \"formatParams\": \n {\n \"formatType\": \"CSV\",\n \"withHeader\": \"true\",\n \"separator\": \",\",\n \"compression\":\"None\"\n } \n
\n
Returns the changeset details.
" + "smithy.api#documentation": "The unique identifier for the FinSpace Dataset where the Changeset is created.
" + } + }, + "changesetId": { + "target": "com.amazonaws.finspacedata#ChangesetId", + "traits": { + "smithy.api#documentation": "The unique identifier of the Changeset that is created.
" } } + }, + "traits": { + "smithy.api#documentation": "The response from a CreateChangeset operation." } }, - "com.amazonaws.finspacedata#Credentials": { + "com.amazonaws.finspacedata#CreateDataView": { + "type": "operation", + "input": { + "target": "com.amazonaws.finspacedata#CreateDataViewRequest" + }, + "output": { + "target": "com.amazonaws.finspacedata#CreateDataViewResponse" + }, + "errors": [ + { + "target": "com.amazonaws.finspacedata#ConflictException" + }, + { + "target": "com.amazonaws.finspacedata#InternalServerException" + }, + { + "target": "com.amazonaws.finspacedata#LimitExceededException" + }, + { + "target": "com.amazonaws.finspacedata#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.finspacedata#ThrottlingException" + }, + { + "target": "com.amazonaws.finspacedata#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Creates a Dataview for a Dataset.
", + "smithy.api#http": { + "method": "POST", + "uri": "/datasets/{datasetId}/dataviewsv2", + "code": 200 + } + } + }, + "com.amazonaws.finspacedata#CreateDataViewRequest": { "type": "structure", "members": { - "accessKeyId": { - "target": "com.amazonaws.finspacedata#stringValueLength1to255", + "clientToken": { + "target": "com.amazonaws.finspacedata#ClientToken", "traits": { - "smithy.api#documentation": "The access key identifier.
" + "smithy.api#documentation": "A token used to ensure idempotency.
", + "smithy.api#idempotencyToken": {} } }, - "secretAccessKey": { - "target": "com.amazonaws.finspacedata#stringValueMaxLength1000", + "datasetId": { + "target": "com.amazonaws.finspacedata#DatasetId", "traits": { - "smithy.api#documentation": "The access key.
" + "smithy.api#documentation": "The unique Dataset identifier that is used to create a Dataview.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} } }, - "sessionToken": { - "target": "com.amazonaws.finspacedata#stringValueMaxLength1000", + "autoUpdate": { + "target": "com.amazonaws.finspacedata#Boolean", "traits": { - "smithy.api#documentation": "The session token.
" + "smithy.api#documentation": "Flag to indicate Dataview should be updated automatically.
" } - } - }, - "traits": { - "smithy.api#documentation": "Set short term API credentials.
" - } - }, - "com.amazonaws.finspacedata#ErrorCategory": { - "type": "string", - "traits": { - "smithy.api#enum": [ + }, + "sortColumns": { + "target": "com.amazonaws.finspacedata#SortColumnList", + "traits": { + "smithy.api#documentation": "Columns to be used for sorting the data.
" + } + }, + "partitionColumns": { + "target": "com.amazonaws.finspacedata#PartitionColumnList", + "traits": { + "smithy.api#documentation": "Ordered set of column names used to partition data.
" + } + }, + "asOfTimestamp": { + "target": "com.amazonaws.finspacedata#TimestampEpoch", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "Beginning time to use for the Dataview. The value is determined as Epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
" + } + }, + "destinationTypeParams": { + "target": "com.amazonaws.finspacedata#DataViewDestinationTypeParams", + "traits": { + "smithy.api#documentation": "Options that define the destination type for the Dataview.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Request for creating a data view." + } + }, + "com.amazonaws.finspacedata#CreateDataViewResponse": { + "type": "structure", + "members": { + "datasetId": { + "target": "com.amazonaws.finspacedata#DatasetId", + "traits": { + "smithy.api#documentation": "The unique identifier of the Dataset used for the Dataview.
" + } + }, + "dataViewId": { + "target": "com.amazonaws.finspacedata#DataViewId", + "traits": { + "smithy.api#documentation": "The unique identifier for the created Dataview.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Response for creating a data view." + } + }, + "com.amazonaws.finspacedata#CreateDataset": { + "type": "operation", + "input": { + "target": "com.amazonaws.finspacedata#CreateDatasetRequest" + }, + "output": { + "target": "com.amazonaws.finspacedata#CreateDatasetResponse" + }, + "errors": [ + { + "target": "com.amazonaws.finspacedata#AccessDeniedException" + }, + { + "target": "com.amazonaws.finspacedata#ConflictException" + }, + { + "target": "com.amazonaws.finspacedata#InternalServerException" + }, + { + "target": "com.amazonaws.finspacedata#LimitExceededException" + }, + { + "target": "com.amazonaws.finspacedata#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.finspacedata#ThrottlingException" + }, + { + "target": "com.amazonaws.finspacedata#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Creates a new FinSpace Dataset.
", + "smithy.api#http": { + "method": "POST", + "uri": "/datasetsv2", + "code": 200 + } + } + }, + "com.amazonaws.finspacedata#CreateDatasetRequest": { + "type": "structure", + "members": { + "clientToken": { + "target": "com.amazonaws.finspacedata#ClientToken", + "traits": { + "smithy.api#documentation": "A token used to ensure idempotency.
", + "smithy.api#idempotencyToken": {} + } + }, + "datasetTitle": { + "target": "com.amazonaws.finspacedata#DatasetTitle", + "traits": { + "smithy.api#documentation": "Display title for a FinSpace Dataset.
", + "smithy.api#required": {} + } + }, + "kind": { + "target": "com.amazonaws.finspacedata#DatasetKind", + "traits": { + "smithy.api#documentation": "The format in which Dataset data is structured.
\n\n TABULAR
- Data is structured in a tabular format.
\n NON_TABULAR
- Data is structured in a non-tabular format.
Description of a Dataset.
", + "smithy.api#required": {} + } + }, + "ownerInfo": { + "target": "com.amazonaws.finspacedata#DatasetOwnerInfo", + "traits": { + "smithy.api#documentation": "Contact information for a Dataset owner.
" + } + }, + "permissionGroupParams": { + "target": "com.amazonaws.finspacedata#PermissionGroupParams", + "traits": { + "smithy.api#documentation": "Permission group parameters for Dataset permissions.
", + "smithy.api#required": {} + } + }, + "alias": { + "target": "com.amazonaws.finspacedata#AliasString", + "traits": { + "smithy.api#documentation": "The unique resource identifier for a Dataset.
", + "smithy.api#required": {} + } + }, + "schemaDefinition": { + "target": "com.amazonaws.finspacedata#SchemaUnion", + "traits": { + "smithy.api#documentation": "Definition for a schema on a tabular Dataset.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The request for a CreateDataset operation" + } + }, + "com.amazonaws.finspacedata#CreateDatasetResponse": { + "type": "structure", + "members": { + "datasetId": { + "target": "com.amazonaws.finspacedata#DatasetId", + "traits": { + "smithy.api#documentation": "The unique identifier for the created Dataset.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The response from a CreateDataset operation" + } + }, + "com.amazonaws.finspacedata#Credentials": { + "type": "structure", + "members": { + "accessKeyId": { + "target": "com.amazonaws.finspacedata#StringValueLength1to2552", + "traits": { + "smithy.api#documentation": "The access key identifier.
" + } + }, + "secretAccessKey": { + "target": "com.amazonaws.finspacedata#stringValueMaxLength1000", + "traits": { + "smithy.api#documentation": "The access key.
" + } + }, + "sessionToken": { + "target": "com.amazonaws.finspacedata#stringValueMaxLength1000", + "traits": { + "smithy.api#documentation": "The session token.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Short term API credentials.
" + } + }, + "com.amazonaws.finspacedata#DataViewArn": { + "type": "string", + "traits": { + "smithy.api#documentation": "Arn of a DataView" + } + }, + "com.amazonaws.finspacedata#DataViewDestinationType": { + "type": "string", + "traits": { + "smithy.api#documentation": "DataView Destination Type" + } + }, + "com.amazonaws.finspacedata#DataViewDestinationTypeParams": { + "type": "structure", + "members": { + "destinationType": { + "target": "com.amazonaws.finspacedata#DataViewDestinationType", + "traits": { + "smithy.api#documentation": "Destination type for a Dataview.
\n\n GLUE_TABLE
- Glue table destination type.
Structure for the Dataview destination type parameters.
" + } + }, + "com.amazonaws.finspacedata#DataViewErrorInfo": { + "type": "structure", + "members": { + "errorMessage": { + "target": "com.amazonaws.finspacedata#ErrorMessage", + "traits": { + "smithy.api#documentation": "The text of the error message.
" + } + }, + "errorCategory": { + "target": "com.amazonaws.finspacedata#ErrorCategory", + "traits": { + "smithy.api#documentation": "The category of the error.
\n\n VALIDATION
-The inputs to this request are invalid.
\n SERVICE_QUOTA_EXCEEDED
- Service quotas have been exceeded. Please\n contact AWS support to increase quotas.
\n ACCESS_DENIED
- Missing required permission to perform this\n request.
\n RESOURCE_NOT_FOUND
- One or more inputs to this request were not\n found.
\n THROTTLING
- The system temporarily lacks sufficient resources to process\n the request.
\n INTERNAL_SERVICE_EXCEPTION
- An internal service error has\n occurred.
\n CANCELLED
- Cancelled.
\n USER_RECOVERABLE
- A user recoverable error has occurred.
The structure with error messages.
" + } + }, + "com.amazonaws.finspacedata#DataViewId": { + "type": "string", + "traits": { + "smithy.api#documentation": "DataView ID", + "smithy.api#length": { + "min": 1, + "max": 26 + } + } + }, + "com.amazonaws.finspacedata#DataViewList": { + "type": "list", + "member": { + "target": "com.amazonaws.finspacedata#DataViewSummary" + }, + "traits": { + "smithy.api#documentation": "List of Data Views" + } + }, + "com.amazonaws.finspacedata#DataViewStatus": { + "type": "string", + "traits": { + "smithy.api#documentation": "Status of a DataView", + "smithy.api#enum": [ { - "value": "The_inputs_to_this_request_are_invalid", - "name": "VALIDATION" + "value": "RUNNING", + "name": "RUNNING" }, { - "value": "Service_limits_have_been_exceeded", - "name": "SERVICE_QUOTA_EXCEEDED" + "value": "STARTING", + "name": "STARTING" }, { - "value": "Missing_required_permission_to_perform_this_request", - "name": "ACCESS_DENIED" + "value": "FAILED", + "name": "FAILED" }, { - "value": "One_or_more_inputs_to_this_request_were_not_found", - "name": "RESOURCE_NOT_FOUND" + "value": "CANCELLED", + "name": "CANCELLED" }, { - "value": "The_system_temporarily_lacks_sufficient_resources_to_process_the_request", - "name": "THROTTLING" + "value": "TIMEOUT", + "name": "TIMEOUT" }, { - "value": "An_internal_error_has_occurred", - "name": "INTERNAL_SERVICE_EXCEPTION" + "value": "SUCCESS", + "name": "SUCCESS" }, { - "value": "Cancelled", - "name": "CANCELLED" + "value": "PENDING", + "name": "PENDING" }, { - "value": "A_user_recoverable_error_has_occurred", - "name": "USER_RECOVERABLE" + "value": "FAILED_CLEANUP_FAILED", + "name": "FAILED_CLEANUP_FAILED" } ] } }, - "com.amazonaws.finspacedata#ErrorInfo": { + "com.amazonaws.finspacedata#DataViewSummary": { "type": "structure", "members": { - "errorMessage": { - "target": "com.amazonaws.finspacedata#stringValueMaxLength1000", + "dataViewId": { + "target": "com.amazonaws.finspacedata#DataViewId", "traits": { - "smithy.api#documentation": "The text of the error message.
" + "smithy.api#documentation": "The unique identifier for the Dataview.
" } }, - "errorCategory": { - "target": "com.amazonaws.finspacedata#ErrorCategory", + "dataViewArn": { + "target": "com.amazonaws.finspacedata#DataViewArn", + "traits": { + "smithy.api#documentation": "The ARN identifier of the Dataview.
" + } + }, + "datasetId": { + "target": "com.amazonaws.finspacedata#DatasetId", + "traits": { + "smithy.api#documentation": "Th unique identifier for the Dataview Dataset.
" + } + }, + "asOfTimestamp": { + "target": "com.amazonaws.finspacedata#TimestampEpoch", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "Time range to use for the Dataview. The value is determined as Epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
" + } + }, + "partitionColumns": { + "target": "com.amazonaws.finspacedata#PartitionColumnList", + "traits": { + "smithy.api#documentation": "Ordered set of column names used to partition data.
" + } + }, + "sortColumns": { + "target": "com.amazonaws.finspacedata#SortColumnList", + "traits": { + "smithy.api#documentation": "Columns to be used for sorting the data.
" + } + }, + "status": { + "target": "com.amazonaws.finspacedata#DataViewStatus", + "traits": { + "smithy.api#documentation": "The status of a Dataview creation.
\n\n RUNNING
- Dataview creation is running.
\n STARTING
- Dataview creation is starting.
\n FAILED
- Dataview creation has failed.
\n CANCELLED
- Dataview creation has been cancelled.
\n TIMEOUT
- Dataview creation has timed out.
\n SUCCESS
- Dataview creation has succeeded.
\n PENDING
- Dataview creation is pending.
\n FAILED_CLEANUP_FAILED
- Dataview creation failed and resource cleanup failed.
The structure with error messages.
" + } + }, + "destinationTypeProperties": { + "target": "com.amazonaws.finspacedata#DataViewDestinationTypeParams", + "traits": { + "smithy.api#documentation": "Information about the Dataview destination.
" + } + }, + "autoUpdate": { + "target": "com.amazonaws.finspacedata#Boolean", + "traits": { + "smithy.api#documentation": "The flag to indicate Dataview should be updated automatically.
" + } + }, + "createTime": { + "target": "com.amazonaws.finspacedata#TimestampEpoch", + "traits": { + "smithy.api#documentation": "The timestamp at which the Dataview was created in FinSpace. The value is determined as Epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
" + } + }, + "lastModifiedTime": { + "target": "com.amazonaws.finspacedata#TimestampEpoch", + "traits": { + "smithy.api#documentation": "The last time that a Dataview was modified. The value is determined as Epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Structure for the summary of a Dataview.
" + } + }, + "com.amazonaws.finspacedata#Dataset": { + "type": "structure", + "members": { + "datasetId": { + "target": "com.amazonaws.finspacedata#DatasetId", + "traits": { + "smithy.api#documentation": "An identifier for a Dataset.
" + } + }, + "datasetArn": { + "target": "com.amazonaws.finspacedata#DatasetArn", + "traits": { + "smithy.api#documentation": "The ARN identifier of the Dataset.
" + } + }, + "datasetTitle": { + "target": "com.amazonaws.finspacedata#DatasetTitle", + "traits": { + "smithy.api#documentation": "Display title for a Dataset.
" + } + }, + "kind": { + "target": "com.amazonaws.finspacedata#DatasetKind", + "traits": { + "smithy.api#documentation": "The format in which Dataset data is structured.
\n\n TABULAR
- Data is structured in a tabular format.
\n NON_TABULAR
- Data is structured in a non-tabular format.
Description for a Dataset.
" + } + }, + "ownerInfo": { + "target": "com.amazonaws.finspacedata#DatasetOwnerInfo", + "traits": { + "smithy.api#documentation": "Contact information for a Dataset owner.
" + } + }, + "createTime": { + "target": "com.amazonaws.finspacedata#TimestampEpoch", + "traits": { + "smithy.api#documentation": "The timestamp at which the Dataset was created in FinSpace. The value is determined as Epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
" + } + }, + "lastModifiedTime": { + "target": "com.amazonaws.finspacedata#TimestampEpoch", + "traits": { + "smithy.api#documentation": "The last time that the Dataset was modified. The value is determined as Epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
" + } + }, + "schemaDefinition": { + "target": "com.amazonaws.finspacedata#SchemaUnion", + "traits": { + "smithy.api#documentation": "Definition for a schema on a tabular Dataset.
" + } + }, + "alias": { + "target": "com.amazonaws.finspacedata#AliasString", + "traits": { + "smithy.api#documentation": "The unique resource identifier for a Dataset.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The structure for a Dataset.
" + } + }, + "com.amazonaws.finspacedata#DatasetArn": { + "type": "string", + "traits": { + "smithy.api#documentation": "Arn of a Dataset" + } + }, + "com.amazonaws.finspacedata#DatasetDescription": { + "type": "string", + "traits": { + "smithy.api#documentation": "Description of a dataset", + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": "^[\\s\\S]*\\S[\\s\\S]*$" + } + }, + "com.amazonaws.finspacedata#DatasetId": { + "type": "string", + "traits": { + "smithy.api#documentation": "ID for a given Dataset", + "smithy.api#length": { + "min": 1, + "max": 26 + } + } + }, + "com.amazonaws.finspacedata#DatasetKind": { + "type": "string", + "traits": { + "smithy.api#documentation": "Dataset Kind", + "smithy.api#enum": [ + { + "value": "TABULAR", + "name": "TABULAR" + }, + { + "value": "NON_TABULAR", + "name": "NON_TABULAR" + } + ] + } + }, + "com.amazonaws.finspacedata#DatasetList": { + "type": "list", + "member": { + "target": "com.amazonaws.finspacedata#Dataset" + }, + "traits": { + "smithy.api#documentation": "List of Dataset structures" + } + }, + "com.amazonaws.finspacedata#DatasetOwnerInfo": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.finspacedata#OwnerName", + "traits": { + "smithy.api#documentation": "Name of the Dataset owner.
" + } + }, + "phoneNumber": { + "target": "com.amazonaws.finspacedata#PhoneNumber", + "traits": { + "smithy.api#documentation": "Phone number for the Dataset owner.
" + } + }, + "email": { + "target": "com.amazonaws.finspacedata#Email", + "traits": { + "smithy.api#documentation": "Email address for the Dataset owner.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A structure for Dataset owner info.
" + } + }, + "com.amazonaws.finspacedata#DatasetStatus": { + "type": "string", + "traits": { + "smithy.api#documentation": "Status of the dataset process returned from scheduler service.", + "smithy.api#enum": [ + { + "value": "PENDING", + "name": "PENDING" + }, + { + "value": "FAILED", + "name": "FAILED" + }, + { + "value": "SUCCESS", + "name": "SUCCESS" + }, + { + "value": "RUNNING", + "name": "RUNNING" + } + ] + } + }, + "com.amazonaws.finspacedata#DatasetTitle": { + "type": "string", + "traits": { + "smithy.api#documentation": "Title for a given Dataset", + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "\\S" + } + }, + "com.amazonaws.finspacedata#DeleteDataset": { + "type": "operation", + "input": { + "target": "com.amazonaws.finspacedata#DeleteDatasetRequest" + }, + "output": { + "target": "com.amazonaws.finspacedata#DeleteDatasetResponse" + }, + "errors": [ + { + "target": "com.amazonaws.finspacedata#AccessDeniedException" + }, + { + "target": "com.amazonaws.finspacedata#ConflictException" + }, + { + "target": "com.amazonaws.finspacedata#InternalServerException" + }, + { + "target": "com.amazonaws.finspacedata#LimitExceededException" + }, + { + "target": "com.amazonaws.finspacedata#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.finspacedata#ThrottlingException" + }, + { + "target": "com.amazonaws.finspacedata#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes a FinSpace Dataset.
", + "smithy.api#http": { + "method": "DELETE", + "uri": "/datasetsv2/{datasetId}", + "code": 200 + } + } + }, + "com.amazonaws.finspacedata#DeleteDatasetRequest": { + "type": "structure", + "members": { + "clientToken": { + "target": "com.amazonaws.finspacedata#ClientToken", + "traits": { + "smithy.api#documentation": "A token used to ensure idempotency.
", + "smithy.api#httpQuery": "clientToken", + "smithy.api#idempotencyToken": {} + } + }, + "datasetId": { + "target": "com.amazonaws.finspacedata#DatasetId", + "traits": { + "smithy.api#documentation": "The unique identifier of the Dataset to be deleted.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for a DeleteDataset operation." + } + }, + "com.amazonaws.finspacedata#DeleteDatasetResponse": { + "type": "structure", + "members": { + "datasetId": { + "target": "com.amazonaws.finspacedata#DatasetId", + "traits": { + "smithy.api#documentation": "The unique identifier for the deleted Dataset.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The response from an DeleteDataset operation" + } + }, + "com.amazonaws.finspacedata#Email": { + "type": "string", + "traits": { + "smithy.api#documentation": "Email of Dataset Owner", + "smithy.api#length": { + "min": 4, + "max": 320 + }, + "smithy.api#pattern": "^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}$" + } + }, + "com.amazonaws.finspacedata#ErrorCategory": { + "type": "string", + "traits": { + "smithy.api#documentation": "Changeset Error Category", + "smithy.api#enum": [ + { + "value": "VALIDATION", + "name": "VALIDATION" + }, + { + "value": "SERVICE_QUOTA_EXCEEDED", + "name": "SERVICE_QUOTA_EXCEEDED" + }, + { + "value": "ACCESS_DENIED", + "name": "ACCESS_DENIED" + }, + { + "value": "RESOURCE_NOT_FOUND", + "name": "RESOURCE_NOT_FOUND" + }, + { + "value": "THROTTLING", + "name": "THROTTLING" + }, + { + "value": "INTERNAL_SERVICE_EXCEPTION", + "name": "INTERNAL_SERVICE_EXCEPTION" + }, + { + "value": "CANCELLED", + "name": "CANCELLED" + }, + { + "value": "USER_RECOVERABLE", + "name": "USER_RECOVERABLE" + } + ] + } + }, + "com.amazonaws.finspacedata#ErrorMessage": { + "type": "string", + "traits": { + "smithy.api#documentation": "Changeset Error Message", + "smithy.api#length": { + "min": 0, + "max": 1000 + } + } + }, + "com.amazonaws.finspacedata#ErrorMessage2": { + "type": "string" + }, + "com.amazonaws.finspacedata#FormatParams": { + "type": "map", + "key": { + "target": "com.amazonaws.finspacedata#StringMapKey" + }, + "value": { + "target": "com.amazonaws.finspacedata#StringMapValue" + }, + "traits": { + "smithy.api#documentation": "Format Parameters of a Changeset" + } + }, + "com.amazonaws.finspacedata#GetChangeset": { + "type": "operation", + "input": { + "target": "com.amazonaws.finspacedata#GetChangesetRequest" + }, + "output": { + "target": "com.amazonaws.finspacedata#GetChangesetResponse" + }, + "errors": [ + { + "target": "com.amazonaws.finspacedata#AccessDeniedException" + }, + { + "target": "com.amazonaws.finspacedata#ConflictException" + }, + { + "target": "com.amazonaws.finspacedata#InternalServerException" + }, + { + "target": "com.amazonaws.finspacedata#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.finspacedata#ThrottlingException" + }, + { + "target": "com.amazonaws.finspacedata#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Get information about a Changeset.
", + "smithy.api#http": { + "method": "GET", + "uri": "/datasets/{datasetId}/changesetsv2/{changesetId}", + "code": 200 + } + } + }, + "com.amazonaws.finspacedata#GetChangesetRequest": { + "type": "structure", + "members": { + "datasetId": { + "target": "com.amazonaws.finspacedata#DatasetId", + "traits": { + "smithy.api#documentation": "The unique identifier for the FinSpace Dataset where the Changeset is created.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "changesetId": { + "target": "com.amazonaws.finspacedata#ChangesetId", + "traits": { + "smithy.api#documentation": "The unique identifier of the Changeset for which to get data.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Request to describe a changeset." + } + }, + "com.amazonaws.finspacedata#GetChangesetResponse": { + "type": "structure", + "members": { + "changesetId": { + "target": "com.amazonaws.finspacedata#ChangesetId", + "traits": { + "smithy.api#documentation": "The unique identifier for a Changeset.
" + } + }, + "changesetArn": { + "target": "com.amazonaws.finspacedata#ChangesetArn", + "traits": { + "smithy.api#documentation": "The ARN identifier of the Changeset.
" + } + }, + "datasetId": { + "target": "com.amazonaws.finspacedata#DatasetId", + "traits": { + "smithy.api#documentation": "The unique identifier for the FinSpace Dataset where the Changeset is created.
" + } + }, + "changeType": { + "target": "com.amazonaws.finspacedata#ChangeType", + "traits": { + "smithy.api#documentation": "Type that indicates how a Changeset is applied to a Dataset.
\n\n REPLACE
- Changeset is considered as a replacement to all prior loaded Changesets.
\n APPEND
- Changeset is considered as an addition to the end of all prior loaded Changesets.
\n MODIFY
- Changeset is considered as a replacement to a specific prior ingested Changeset.
Options that define the location of the data being ingested.
" + } + }, + "formatParams": { + "target": "com.amazonaws.finspacedata#FormatParams", + "traits": { + "smithy.api#documentation": "Structure of the source file(s).
" + } + }, + "createTime": { + "target": "com.amazonaws.finspacedata#TimestampEpoch", + "traits": { + "smithy.api#documentation": "The timestamp at which the Changeset was created in FinSpace. The value is determined as Epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
" + } + }, + "status": { + "target": "com.amazonaws.finspacedata#IngestionStatus", + "traits": { + "smithy.api#documentation": "The status of Changeset creation operation.
" + } + }, + "errorInfo": { + "target": "com.amazonaws.finspacedata#ChangesetErrorInfo", + "traits": { + "smithy.api#documentation": "The structure with error messages.
" + } + }, + "activeUntilTimestamp": { + "target": "com.amazonaws.finspacedata#TimestampEpoch", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "Time until which the Changeset is active. The value is determined as Epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
" + } + }, + "updatesChangesetId": { + "target": "com.amazonaws.finspacedata#ChangesetId", + "traits": { + "smithy.api#documentation": "The unique identifier of the Changeset that is being updated.
" + } + }, + "updatedByChangesetId": { + "target": "com.amazonaws.finspacedata#ChangesetId", + "traits": { + "smithy.api#documentation": "The unique identifier of the updated Changeset.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The response from a describe changeset operation" + } + }, + "com.amazonaws.finspacedata#GetDataView": { + "type": "operation", + "input": { + "target": "com.amazonaws.finspacedata#GetDataViewRequest" + }, + "output": { + "target": "com.amazonaws.finspacedata#GetDataViewResponse" + }, + "errors": [ + { + "target": "com.amazonaws.finspacedata#ConflictException" + }, + { + "target": "com.amazonaws.finspacedata#InternalServerException" + }, + { + "target": "com.amazonaws.finspacedata#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.finspacedata#ThrottlingException" + }, + { + "target": "com.amazonaws.finspacedata#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Gets information about a Dataview.
", + "smithy.api#http": { + "method": "GET", + "uri": "/datasets/{datasetId}/dataviewsv2/{dataViewId}", + "code": 200 + } + } + }, + "com.amazonaws.finspacedata#GetDataViewRequest": { + "type": "structure", + "members": { + "dataViewId": { + "target": "com.amazonaws.finspacedata#DataViewId", + "traits": { + "smithy.api#documentation": "The unique identifier for the Dataview.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "datasetId": { + "target": "com.amazonaws.finspacedata#DatasetId", + "traits": { + "smithy.api#documentation": "The unique identifier for the Dataset used in the Dataview.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Request for retrieving a data view detail. Grouped / accessible within a dataset by its dataset id." + } + }, + "com.amazonaws.finspacedata#GetDataViewResponse": { + "type": "structure", + "members": { + "autoUpdate": { + "target": "com.amazonaws.finspacedata#Boolean", + "traits": { + "smithy.api#documentation": "Flag to indicate Dataview should be updated automatically.
" + } + }, + "partitionColumns": { + "target": "com.amazonaws.finspacedata#PartitionColumnList", + "traits": { + "smithy.api#documentation": "Ordered set of column names used to partition data.
" + } + }, + "datasetId": { + "target": "com.amazonaws.finspacedata#DatasetId", + "traits": { + "smithy.api#documentation": "The unique identifier for the Dataset used in the Dataview.
" + } + }, + "asOfTimestamp": { + "target": "com.amazonaws.finspacedata#TimestampEpoch", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "Time range to use for the Dataview. The value is determined as Epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
" + } + }, + "errorInfo": { + "target": "com.amazonaws.finspacedata#DataViewErrorInfo", + "traits": { + "smithy.api#documentation": "Information about an error that occurred for the Dataview.
" + } + }, + "lastModifiedTime": { + "target": "com.amazonaws.finspacedata#TimestampEpoch", + "traits": { + "smithy.api#documentation": "The last time that a Dataview was modified. The value is determined as Epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
" + } + }, + "createTime": { + "target": "com.amazonaws.finspacedata#TimestampEpoch", + "traits": { + "smithy.api#documentation": "The timestamp at which the Dataview was created in FinSpace. The value is determined as Epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
" + } + }, + "sortColumns": { + "target": "com.amazonaws.finspacedata#SortColumnList", + "traits": { + "smithy.api#documentation": "Columns to be used for sorting the data.
" + } + }, + "dataViewId": { + "target": "com.amazonaws.finspacedata#DataViewId", + "traits": { + "smithy.api#documentation": "The unique identifier for the Dataview.
" + } + }, + "dataViewArn": { + "target": "com.amazonaws.finspacedata#DataViewArn", + "traits": { + "smithy.api#documentation": "The ARN identifier of the Dataview.
" + } + }, + "destinationTypeParams": { + "target": "com.amazonaws.finspacedata#DataViewDestinationTypeParams", + "traits": { + "smithy.api#documentation": "Options that define the destination type for the Dataview.
" + } + }, + "status": { + "target": "com.amazonaws.finspacedata#DataViewStatus", + "traits": { + "smithy.api#documentation": "The status of a Dataview creation.
\n\n RUNNING
- Dataview creation is running.
\n STARTING
- Dataview creation is starting.
\n FAILED
- Dataview creation has failed.
\n CANCELLED
- Dataview creation has been cancelled.
\n TIMEOUT
- Dataview creation has timed out.
\n SUCCESS
- Dataview creation has succeeded.
\n PENDING
- Dataview creation is pending.
\n FAILED_CLEANUP_FAILED
- Dataview creation failed and resource cleanup failed.
Returns information about a Dataset.
", + "smithy.api#http": { + "method": "GET", + "uri": "/datasetsv2/{datasetId}", + "code": 200 + } + } + }, + "com.amazonaws.finspacedata#GetDatasetRequest": { + "type": "structure", + "members": { + "datasetId": { + "target": "com.amazonaws.finspacedata#StringValueLength1to255", + "traits": { + "smithy.api#documentation": "The unique identifier for a Dataset.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Request for the GetDataset operation." + } + }, + "com.amazonaws.finspacedata#GetDatasetResponse": { + "type": "structure", + "members": { + "datasetId": { + "target": "com.amazonaws.finspacedata#DatasetId", + "traits": { + "smithy.api#documentation": "The unique identifier for a Dataset.
" + } + }, + "datasetArn": { + "target": "com.amazonaws.finspacedata#DatasetArn", + "traits": { + "smithy.api#documentation": "The ARN identifier of the Dataset.
" + } + }, + "datasetTitle": { + "target": "com.amazonaws.finspacedata#DatasetTitle", + "traits": { + "smithy.api#documentation": "Display title for a Dataset.
" + } + }, + "kind": { + "target": "com.amazonaws.finspacedata#DatasetKind", + "traits": { + "smithy.api#documentation": "The format in which Dataset data is structured.
\n\n TABULAR
- Data is structured in a tabular format.
\n NON_TABULAR
- Data is structured in a non-tabular format.
A description of the Dataset.
" + } + }, + "createTime": { + "target": "com.amazonaws.finspacedata#TimestampEpoch", + "traits": { + "smithy.api#documentation": "The timestamp at which the Dataset was created in FinSpace. The value is determined as Epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
" + } + }, + "lastModifiedTime": { + "target": "com.amazonaws.finspacedata#TimestampEpoch", + "traits": { + "smithy.api#documentation": "The last time that the Dataset was modified. The value is determined as Epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
" + } + }, + "schemaDefinition": { + "target": "com.amazonaws.finspacedata#SchemaUnion", + "traits": { + "smithy.api#documentation": "Definition for a schema on a tabular Dataset.
" + } + }, + "alias": { + "target": "com.amazonaws.finspacedata#AliasString", + "traits": { + "smithy.api#documentation": "The unique resource identifier for a Dataset.
" + } + }, + "status": { + "target": "com.amazonaws.finspacedata#DatasetStatus", + "traits": { + "smithy.api#documentation": "Status of the Dataset creation.
\n\n PENDING
- Dataset is pending creation.
\n FAILED
- Dataset creation has failed.
\n SUCCESS
- Dataset creation has succeeded.
\n RUNNING
- Dataset creation is running.
Request programmatic credentials to use with FinSpace SDK.
", + "smithy.api#http": { + "method": "GET", + "uri": "/credentials/programmatic", + "code": 200 + } + } + }, + "com.amazonaws.finspacedata#GetProgrammaticAccessCredentialsRequest": { + "type": "structure", + "members": { + "durationInMinutes": { + "target": "com.amazonaws.finspacedata#SessionDuration", + "traits": { + "smithy.api#documentation": "The time duration in which the credentials remain valid.
", + "smithy.api#httpQuery": "durationInMinutes" + } + }, + "environmentId": { + "target": "com.amazonaws.finspacedata#IdType", + "traits": { + "smithy.api#documentation": "The FinSpace environment identifier.
", + "smithy.api#httpQuery": "environmentId", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Request for GetProgrammaticAccessCredentials operation" + } + }, + "com.amazonaws.finspacedata#GetProgrammaticAccessCredentialsResponse": { + "type": "structure", + "members": { + "credentials": { + "target": "com.amazonaws.finspacedata#Credentials", + "traits": { + "smithy.api#documentation": "Returns the programmatic credentials.
" + } + }, + "durationInMinutes": { + "target": "com.amazonaws.finspacedata#SessionDuration", + "traits": { + "smithy.api#documentation": "Returns the duration in which the credentials will remain valid.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Response for GetProgrammaticAccessCredentials operation" + } + }, + "com.amazonaws.finspacedata#GetWorkingLocation": { + "type": "operation", + "input": { + "target": "com.amazonaws.finspacedata#GetWorkingLocationRequest" + }, + "output": { + "target": "com.amazonaws.finspacedata#GetWorkingLocationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.finspacedata#AccessDeniedException" + }, + { + "target": "com.amazonaws.finspacedata#InternalServerException" + }, + { + "target": "com.amazonaws.finspacedata#ThrottlingException" + }, + { + "target": "com.amazonaws.finspacedata#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "A temporary Amazon S3 location, where you can copy your files from a source location to stage or use\n as a scratch space in FinSpace notebook.
", + "smithy.api#http": { + "method": "POST", + "uri": "/workingLocationV1", + "code": 200 + } + } + }, + "com.amazonaws.finspacedata#GetWorkingLocationRequest": { + "type": "structure", + "members": { + "locationType": { + "target": "com.amazonaws.finspacedata#locationType", + "traits": { + "smithy.api#documentation": "Specify the type of the working location.
\n\n SAGEMAKER
- Use the Amazon S3 location as a temporary location to store data content when\n working with FinSpace Notebooks that run on SageMaker studio.
\n INGESTION
- Use the Amazon S3 location as a staging location to copy your\n data content and then use the location with the Changeset creation operation.
Returns the Amazon S3 URI for the working location.
" + } + }, + "s3Path": { + "target": "com.amazonaws.finspacedata#stringValueLength1to1024", + "traits": { + "smithy.api#documentation": "Returns the Amazon S3 Path for the working location.
" + } + }, + "s3Bucket": { + "target": "com.amazonaws.finspacedata#stringValueLength1to63", + "traits": { + "smithy.api#documentation": "Returns the Amazon S3 bucket name for the working location.
" + } + } + } + }, + "com.amazonaws.finspacedata#IdType": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 26 + } + } + }, + "com.amazonaws.finspacedata#IngestionStatus": { + "type": "string", + "traits": { + "smithy.api#documentation": "Status of the ingestion process returned from scheduler service.", + "smithy.api#enum": [ + { + "value": "PENDING", + "name": "PENDING" + }, + { + "value": "FAILED", + "name": "FAILED" + }, + { + "value": "SUCCESS", + "name": "SUCCESS" + }, + { + "value": "RUNNING", + "name": "RUNNING" + }, + { + "value": "STOP_REQUESTED", + "name": "STOP_REQUESTED" + } + ] + } + }, + "com.amazonaws.finspacedata#InternalServerException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.finspacedata#ErrorMessage2" + } + }, + "traits": { + "smithy.api#documentation": "The request processing has failed because of an unknown error, exception or\n failure.
", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.finspacedata#LimitExceededException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.finspacedata#ErrorMessage2" + } + }, + "traits": { + "smithy.api#documentation": "A limit has exceeded.
", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.finspacedata#ListChangesets": { + "type": "operation", + "input": { + "target": "com.amazonaws.finspacedata#ListChangesetsRequest" + }, + "output": { + "target": "com.amazonaws.finspacedata#ListChangesetsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.finspacedata#AccessDeniedException" + }, + { + "target": "com.amazonaws.finspacedata#ConflictException" + }, + { + "target": "com.amazonaws.finspacedata#InternalServerException" + }, + { + "target": "com.amazonaws.finspacedata#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.finspacedata#ThrottlingException" + }, + { + "target": "com.amazonaws.finspacedata#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Lists the FinSpace Changesets for a Dataset.
", + "smithy.api#http": { + "method": "GET", + "uri": "/datasets/{datasetId}/changesetsv2", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults" + } + } + }, + "com.amazonaws.finspacedata#ListChangesetsRequest": { + "type": "structure", + "members": { + "datasetId": { + "target": "com.amazonaws.finspacedata#DatasetId", + "traits": { + "smithy.api#documentation": "The unique identifier for the FinSpace Dataset to which the Changeset belongs.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "maxResults": { + "target": "com.amazonaws.finspacedata#ResultLimit", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "The maximum number of results per page.
", + "smithy.api#httpQuery": "maxResults" + } + }, + "nextToken": { + "target": "com.amazonaws.finspacedata#PaginationToken", + "traits": { + "smithy.api#documentation": "A token indicating where a results page should begin.
", + "smithy.api#httpQuery": "nextToken" + } + } + }, + "traits": { + "smithy.api#documentation": "Request to ListChangesetsRequest. It exposes minimal query filters." + } + }, + "com.amazonaws.finspacedata#ListChangesetsResponse": { + "type": "structure", + "members": { + "changesets": { + "target": "com.amazonaws.finspacedata#ChangesetList", + "traits": { + "smithy.api#documentation": "List of Changesets found.
" + } + }, + "nextToken": { + "target": "com.amazonaws.finspacedata#PaginationToken", + "traits": { + "smithy.api#documentation": "A token indicating where a results page should begin.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Response to ListChangesetsResponse. This returns a list of dataset changesets that match the query criteria." + } + }, + "com.amazonaws.finspacedata#ListDataViews": { + "type": "operation", + "input": { + "target": "com.amazonaws.finspacedata#ListDataViewsRequest" + }, + "output": { + "target": "com.amazonaws.finspacedata#ListDataViewsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.finspacedata#ConflictException" + }, + { + "target": "com.amazonaws.finspacedata#InternalServerException" + }, + { + "target": "com.amazonaws.finspacedata#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.finspacedata#ThrottlingException" + }, + { + "target": "com.amazonaws.finspacedata#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Lists all available Dataviews for a Dataset.
", + "smithy.api#http": { + "method": "GET", + "uri": "/datasets/{datasetId}/dataviewsv2", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults" + } + } + }, + "com.amazonaws.finspacedata#ListDataViewsRequest": { + "type": "structure", + "members": { + "datasetId": { + "target": "com.amazonaws.finspacedata#DatasetId", + "traits": { + "smithy.api#documentation": "The unique identifier of the Dataset for which to retrieve Dataviews.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.finspacedata#PaginationToken", + "traits": { + "smithy.api#documentation": "A token indicating where a results page should begin.
", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.finspacedata#ResultLimit", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "The maximum number of results per page.
", + "smithy.api#httpQuery": "maxResults" + } + } + }, + "traits": { + "smithy.api#documentation": "Request for a list data views." + } + }, + "com.amazonaws.finspacedata#ListDataViewsResponse": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.finspacedata#PaginationToken", + "traits": { + "smithy.api#documentation": "A token indicating where a results page should begin.
" + } + }, + "dataViews": { + "target": "com.amazonaws.finspacedata#DataViewList", + "traits": { + "smithy.api#documentation": "A list of Dataviews.
" + } + } + } + }, + "com.amazonaws.finspacedata#ListDatasets": { + "type": "operation", + "input": { + "target": "com.amazonaws.finspacedata#ListDatasetsRequest" + }, + "output": { + "target": "com.amazonaws.finspacedata#ListDatasetsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.finspacedata#ConflictException" + }, + { + "target": "com.amazonaws.finspacedata#InternalServerException" + }, + { + "target": "com.amazonaws.finspacedata#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.finspacedata#ThrottlingException" + }, + { + "target": "com.amazonaws.finspacedata#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Lists all of the active Datasets that a user has access to.
", + "smithy.api#http": { + "method": "GET", + "uri": "/datasetsv2", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults" + } + } + }, + "com.amazonaws.finspacedata#ListDatasetsRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.finspacedata#PaginationToken", + "traits": { + "smithy.api#documentation": "A token indicating where a results page should begin.
", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.finspacedata#ResultLimit", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "The maximum number of results per page.
", + "smithy.api#httpQuery": "maxResults" + } + } + }, + "traits": { + "smithy.api#documentation": "Request for the ListDatasets operation." + } + }, + "com.amazonaws.finspacedata#ListDatasetsResponse": { + "type": "structure", + "members": { + "datasets": { + "target": "com.amazonaws.finspacedata#DatasetList", + "traits": { + "smithy.api#documentation": "List of Datasets.
" + } + }, + "nextToken": { + "target": "com.amazonaws.finspacedata#PaginationToken", + "traits": { + "smithy.api#documentation": "A token indicating where a results page should begin.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Response for the ListDatasets operation" + } + }, + "com.amazonaws.finspacedata#OwnerName": { + "type": "string", + "traits": { + "smithy.api#documentation": "1 - 250 character String", + "smithy.api#length": { + "min": 1, + "max": 250 + }, + "smithy.api#pattern": "\\S" + } + }, + "com.amazonaws.finspacedata#PaginationToken": { + "type": "string", + "traits": { + "smithy.api#documentation": "Pagination token for list operations" + } + }, + "com.amazonaws.finspacedata#PartitionColumnList": { + "type": "list", + "member": { + "target": "com.amazonaws.finspacedata#StringValueLength1to255" + }, + "traits": { + "smithy.api#documentation": "DataView Partition Column List" + } + }, + "com.amazonaws.finspacedata#PermissionGroupId": { + "type": "string", + "traits": { + "smithy.api#documentation": "Id of the associated PermissionGroup", + "smithy.api#length": { + "min": 1, + "max": 26 + } + } + }, + "com.amazonaws.finspacedata#PermissionGroupParams": { + "type": "structure", + "members": { + "permissionGroupId": { + "target": "com.amazonaws.finspacedata#PermissionGroupId", + "traits": { + "smithy.api#documentation": "The unique identifier of the PermissionGroup.
" + } + }, + "datasetPermissions": { + "target": "com.amazonaws.finspacedata#ResourcePermissionsList", + "traits": { + "smithy.api#documentation": "List of resource permissions.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Permission group parameters for Dataset permissions.
" + } + }, + "com.amazonaws.finspacedata#PhoneNumber": { + "type": "string", + "traits": { + "smithy.api#documentation": "PhoneNumber of Dataset Owner", + "smithy.api#length": { + "min": 10, + "max": 20 + }, + "smithy.api#pattern": "^[\\+0-9\\#\\,\\(][\\+0-9\\-\\.\\/\\(\\)\\,\\#\\s]+$" + } + }, + "com.amazonaws.finspacedata#ResourceNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.finspacedata#ErrorMessage2" + } + }, + "traits": { + "smithy.api#documentation": "One or more resources can't be found.
", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.finspacedata#ResourcePermission": { + "type": "structure", + "members": { + "permission": { + "target": "com.amazonaws.finspacedata#StringValueLength1to250", + "traits": { + "smithy.api#documentation": "Permission for a resource.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Resource permission for a Dataset.
" + } + }, + "com.amazonaws.finspacedata#ResourcePermissionsList": { + "type": "list", + "member": { + "target": "com.amazonaws.finspacedata#ResourcePermission" + }, + "traits": { + "smithy.api#documentation": "List of Resource Permissions" + } + }, + "com.amazonaws.finspacedata#ResultLimit": { + "type": "integer", + "traits": { + "smithy.api#documentation": "Maximum number of results to be returned as part of a list operation", + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.finspacedata#SchemaDefinition": { + "type": "structure", + "members": { + "columns": { + "target": "com.amazonaws.finspacedata#ColumnList", + "traits": { + "smithy.api#documentation": "List of column definitions.
" + } + }, + "primaryKeyColumns": { + "target": "com.amazonaws.finspacedata#ColumnNameList", + "traits": { + "smithy.api#documentation": "List of column names used for primary key.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Definition for a schema on a tabular Dataset.
" + } + }, + "com.amazonaws.finspacedata#SchemaUnion": { + "type": "structure", + "members": { + "tabularSchemaConfig": { + "target": "com.amazonaws.finspacedata#SchemaDefinition", "traits": { - "smithy.api#documentation": "The category of the error.
\n\n VALIDATION
-The inputs to this request are invalid.
\n SERVICE_QUOTA_EXCEEDED
- Service quotas have been exceeded. Please\n contact AWS support to increase quotas.
\n ACCESS_DENIED
- Missing required permission to perform this\n request.
\n RESOURCE_NOT_FOUND
- One or more inputs to this request were not\n found.
\n THROTTLING
- The system temporarily lacks sufficient resources to process\n the request.
\n INTERNAL_SERVICE_EXCEPTION
- An internal service error has\n occurred.
\n CANCELLED
- A user recoverable error has occurred.
The configuration for a schema on a tabular Dataset.
" } } }, "traits": { - "smithy.api#documentation": "Error message.
" + "smithy.api#documentation": "A union of schema types.
" + } + }, + "com.amazonaws.finspacedata#SessionDuration": { + "type": "long", + "traits": { + "smithy.api#range": { + "min": 60, + "max": 720 + } + } + }, + "com.amazonaws.finspacedata#SortColumnList": { + "type": "list", + "member": { + "target": "com.amazonaws.finspacedata#StringValueLength1to255" + }, + "traits": { + "smithy.api#documentation": "DataView Sort Column List" + } + }, + "com.amazonaws.finspacedata#SourceParams": { + "type": "map", + "key": { + "target": "com.amazonaws.finspacedata#StringMapKey" + }, + "value": { + "target": "com.amazonaws.finspacedata#StringMapValue" + }, + "traits": { + "smithy.api#documentation": "Source Parameters of a Changeset" } }, - "com.amazonaws.finspacedata#FormatType": { + "com.amazonaws.finspacedata#StringMapKey": { "type": "string", "traits": { - "smithy.api#enum": [ - { - "value": "CSV", - "name": "CSV" - }, - { - "value": "JSON", - "name": "JSON" - }, - { - "value": "PARQUET", - "name": "PARQUET" - }, - { - "value": "XML", - "name": "XML" - } - ] + "smithy.api#length": { + "min": 0, + "max": 128 + }, + "smithy.api#pattern": "^[\\s\\S]*\\S[\\s\\S]*$" } }, - "com.amazonaws.finspacedata#GetProgrammaticAccessCredentials": { + "com.amazonaws.finspacedata#StringMapValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1000 + }, + "smithy.api#pattern": "^[\\s\\S]*\\S[\\s\\S]*$" + } + }, + "com.amazonaws.finspacedata#StringValueLength1to250": { + "type": "string", + "traits": { + "smithy.api#documentation": "1 - 250 character String", + "smithy.api#length": { + "min": 1, + "max": 250 + }, + "smithy.api#pattern": "^[\\s\\S]*\\S[\\s\\S]*$" + } + }, + "com.amazonaws.finspacedata#StringValueLength1to255": { + "type": "string", + "traits": { + "smithy.api#documentation": "1 - 255 character String", + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[\\s\\S]*\\S[\\s\\S]*$" + } + }, + "com.amazonaws.finspacedata#StringValueLength1to2552": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + } + } + }, + "com.amazonaws.finspacedata#ThrottlingException": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "The request was denied due to request throttling.
", + "smithy.api#error": "client", + "smithy.api#httpError": 429 + } + }, + "com.amazonaws.finspacedata#TimestampEpoch": { + "type": "long", + "traits": { + "smithy.api#documentation": "Milliseconds since UTC epoch" + } + }, + "com.amazonaws.finspacedata#UpdateChangeset": { "type": "operation", "input": { - "target": "com.amazonaws.finspacedata#GetProgrammaticAccessCredentialsRequest" + "target": "com.amazonaws.finspacedata#UpdateChangesetRequest" }, "output": { - "target": "com.amazonaws.finspacedata#GetProgrammaticAccessCredentialsResponse" + "target": "com.amazonaws.finspacedata#UpdateChangesetResponse" }, "errors": [ { "target": "com.amazonaws.finspacedata#AccessDeniedException" }, + { + "target": "com.amazonaws.finspacedata#ConflictException" + }, { "target": "com.amazonaws.finspacedata#InternalServerException" }, + { + "target": "com.amazonaws.finspacedata#ResourceNotFoundException" + }, { "target": "com.amazonaws.finspacedata#ThrottlingException" + }, + { + "target": "com.amazonaws.finspacedata#ValidationException" } ], "traits": { - "smithy.api#documentation": "Request programmatic credentials to use with Habanero SDK.
", + "smithy.api#documentation": "Updates a FinSpace Changeset.
", "smithy.api#http": { - "method": "GET", - "uri": "/credentials/programmatic", + "method": "PUT", + "uri": "/datasets/{datasetId}/changesetsv2/{changesetId}", "code": 200 } } }, - "com.amazonaws.finspacedata#GetProgrammaticAccessCredentialsRequest": { + "com.amazonaws.finspacedata#UpdateChangesetRequest": { "type": "structure", "members": { - "durationInMinutes": { - "target": "com.amazonaws.finspacedata#SessionDuration", + "clientToken": { + "target": "com.amazonaws.finspacedata#ClientToken", "traits": { - "smithy.api#documentation": "The time duration in which the credentials remain valid.
", - "smithy.api#httpQuery": "durationInMinutes" + "smithy.api#documentation": "A token used to ensure idempotency.
", + "smithy.api#idempotencyToken": {} } }, - "environmentId": { - "target": "com.amazonaws.finspacedata#IdType", + "datasetId": { + "target": "com.amazonaws.finspacedata#DatasetId", "traits": { - "smithy.api#documentation": "The habanero environment identifier.
", - "smithy.api#httpQuery": "environmentId", + "smithy.api#documentation": "The unique identifier for the FinSpace Dataset in which the Changeset is created.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "changesetId": { + "target": "com.amazonaws.finspacedata#ChangesetId", + "traits": { + "smithy.api#documentation": "The unique identifier for the Changeset to update.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "sourceParams": { + "target": "com.amazonaws.finspacedata#SourceParams", + "traits": { + "smithy.api#documentation": "Options that define the location of the data being ingested.
", + "smithy.api#required": {} + } + }, + "formatParams": { + "target": "com.amazonaws.finspacedata#FormatParams", + "traits": { + "smithy.api#documentation": "Options that define the structure of the source file(s).
", "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#documentation": "Request to update an existing changeset." } }, - "com.amazonaws.finspacedata#GetProgrammaticAccessCredentialsResponse": { + "com.amazonaws.finspacedata#UpdateChangesetResponse": { "type": "structure", "members": { - "credentials": { - "target": "com.amazonaws.finspacedata#Credentials", + "changesetId": { + "target": "com.amazonaws.finspacedata#ChangesetId", "traits": { - "smithy.api#documentation": "Returns the programmatic credentials.
" + "smithy.api#documentation": "The unique identifier for the Changeset to update.
" } }, - "durationInMinutes": { - "target": "com.amazonaws.finspacedata#SessionDuration", + "datasetId": { + "target": "com.amazonaws.finspacedata#DatasetId", "traits": { - "smithy.api#documentation": "Returns the duration in which the credentials will remain valid.
" + "smithy.api#documentation": "The unique identifier for the FinSpace Dataset in which the Changeset is created.
" } } + }, + "traits": { + "smithy.api#documentation": "The response from a update changeset operation." } }, - "com.amazonaws.finspacedata#GetWorkingLocation": { + "com.amazonaws.finspacedata#UpdateDataset": { "type": "operation", "input": { - "target": "com.amazonaws.finspacedata#GetWorkingLocationRequest" + "target": "com.amazonaws.finspacedata#UpdateDatasetRequest" }, "output": { - "target": "com.amazonaws.finspacedata#GetWorkingLocationResponse" + "target": "com.amazonaws.finspacedata#UpdateDatasetResponse" }, "errors": [ { "target": "com.amazonaws.finspacedata#AccessDeniedException" }, + { + "target": "com.amazonaws.finspacedata#ConflictException" + }, { "target": "com.amazonaws.finspacedata#InternalServerException" }, + { + "target": "com.amazonaws.finspacedata#ResourceNotFoundException" + }, { "target": "com.amazonaws.finspacedata#ThrottlingException" }, @@ -503,120 +2533,89 @@ } ], "traits": { - "smithy.api#documentation": "A temporary Amazon S3 location to copy your files from a source location to stage or use\n as a scratch space in Habanero notebook.
", + "smithy.api#documentation": "Updates a FinSpace Dataset.
", "smithy.api#http": { - "method": "POST", - "uri": "/workingLocationV1", + "method": "PUT", + "uri": "/datasetsv2/{datasetId}", "code": 200 } } }, - "com.amazonaws.finspacedata#GetWorkingLocationRequest": { + "com.amazonaws.finspacedata#UpdateDatasetRequest": { "type": "structure", "members": { - "locationType": { - "target": "com.amazonaws.finspacedata#locationType", + "clientToken": { + "target": "com.amazonaws.finspacedata#ClientToken", "traits": { - "smithy.api#documentation": "Specify the type of the working location.
\n\n SAGEMAKER
- Use the Amazon S3 location as a temporary location to store data content when\n working with FinSpace Notebooks that run on SageMaker studio.
\n INGESTION
- Use the Amazon S3 location as a staging location to copy your\n data content and then use the location with the changeset creation operation.
A token used to ensure idempotency.
", + "smithy.api#idempotencyToken": {} } - } - } - }, - "com.amazonaws.finspacedata#GetWorkingLocationResponse": { - "type": "structure", - "members": { - "s3Uri": { - "target": "com.amazonaws.finspacedata#stringValueLength1to1024", + }, + "datasetId": { + "target": "com.amazonaws.finspacedata#DatasetId", "traits": { - "smithy.api#documentation": "Returns the Amazon S3 URI for the working location.
" + "smithy.api#documentation": "The unique identifier for the Dataset to update.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} } }, - "s3Path": { - "target": "com.amazonaws.finspacedata#stringValueLength1to1024", + "datasetTitle": { + "target": "com.amazonaws.finspacedata#DatasetTitle", "traits": { - "smithy.api#documentation": "Returns the Amazon S3 Path for the working location.
" + "smithy.api#documentation": "A display title for the Dataset.
", + "smithy.api#required": {} } }, - "s3Bucket": { - "target": "com.amazonaws.finspacedata#stringValueLength1to63", + "kind": { + "target": "com.amazonaws.finspacedata#DatasetKind", "traits": { - "smithy.api#documentation": "Returns the Amazon S3 bucket name for the working location.
" + "smithy.api#documentation": "The format in which the Dataset data is structured.
\n\n TABULAR
- Data is structured in a tabular format.
\n NON_TABULAR
- Data is structured in a non-tabular format.
A description for the Dataset.
" + } + }, + "alias": { + "target": "com.amazonaws.finspacedata#AliasString", + "traits": { + "smithy.api#documentation": "The unique resource identifier for a Dataset.
", + "smithy.api#required": {} + } + }, + "schemaDefinition": { + "target": "com.amazonaws.finspacedata#SchemaUnion", + "traits": { + "smithy.api#documentation": "Definition for a schema on a tabular Dataset.
" } - } - } - }, - "com.amazonaws.finspacedata#IdType": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 26 - } - } - }, - "com.amazonaws.finspacedata#InternalServerException": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.finspacedata#errorMessage" } }, "traits": { - "smithy.api#documentation": "The request processing has failed because of an unknown error, exception or\n failure.
", - "smithy.api#error": "server", - "smithy.api#httpError": 500 + "smithy.api#documentation": "The request for an UpdateDataset operation" } }, - "com.amazonaws.finspacedata#ResourceNotFoundException": { + "com.amazonaws.finspacedata#UpdateDatasetResponse": { "type": "structure", "members": { - "message": { - "target": "com.amazonaws.finspacedata#errorMessage" + "datasetId": { + "target": "com.amazonaws.finspacedata#DatasetId", + "traits": { + "smithy.api#documentation": "The unique identifier for updated Dataset.
" + } } }, "traits": { - "smithy.api#documentation": "One or more resources can't be found.
", - "smithy.api#error": "client", - "smithy.api#httpError": 404 - } - }, - "com.amazonaws.finspacedata#SessionDuration": { - "type": "long", - "traits": { - "smithy.api#range": { - "min": 60, - "max": 720 - } - } - }, - "com.amazonaws.finspacedata#SourceType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "S3", - "name": "S3" - } - ] - } - }, - "com.amazonaws.finspacedata#ThrottlingException": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#documentation": "The request was denied due to request throttling.
", - "smithy.api#error": "client", - "smithy.api#httpError": 429 + "smithy.api#documentation": "The response from an UpdateDataset operation" } }, - "com.amazonaws.finspacedata#Timestamp": { - "type": "timestamp" - }, "com.amazonaws.finspacedata#ValidationException": { "type": "structure", "members": { "message": { - "target": "com.amazonaws.finspacedata#errorMessage" + "target": "com.amazonaws.finspacedata#ErrorMessage2" } }, "traits": { @@ -625,18 +2624,6 @@ "smithy.api#httpError": 400 } }, - "com.amazonaws.finspacedata#arn": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 20, - "max": 2048 - } - } - }, - "com.amazonaws.finspacedata#errorMessage": { - "type": "string" - }, "com.amazonaws.finspacedata#locationType": { "type": "string", "traits": { @@ -652,24 +2639,6 @@ ] } }, - "com.amazonaws.finspacedata#stringMap": { - "type": "map", - "key": { - "target": "com.amazonaws.finspacedata#stringMapKey" - }, - "value": { - "target": "com.amazonaws.finspacedata#stringMapValue" - } - }, - "com.amazonaws.finspacedata#stringMapKey": { - "type": "string" - }, - "com.amazonaws.finspacedata#stringMapValue": { - "type": "string" - }, - "com.amazonaws.finspacedata#stringValue": { - "type": "string" - }, "com.amazonaws.finspacedata#stringValueLength1to1024": { "type": "string", "traits": { @@ -677,16 +2646,7 @@ "min": 1, "max": 1024 }, - "smithy.api#pattern": ".*\\S.*" - } - }, - "com.amazonaws.finspacedata#stringValueLength1to255": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 255 - } + "smithy.api#pattern": "\\S" } }, "com.amazonaws.finspacedata#stringValueLength1to63": { @@ -696,7 +2656,7 @@ "min": 1, "max": 63 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.finspacedata#stringValueMaxLength1000": { diff --git a/codegen/sdk-codegen/aws-models/imagebuilder.2019-12-02.json b/codegen/sdk-codegen/aws-models/imagebuilder.2019-12-02.json index c68804e36e7..f6285fd1f3d 100644 --- a/codegen/sdk-codegen/aws-models/imagebuilder.2019-12-02.json +++ b/codegen/sdk-codegen/aws-models/imagebuilder.2019-12-02.json @@ -120,7 +120,7 @@ "description": { "target": "com.amazonaws.imagebuilder#NonEmptyString", "traits": { - "smithy.api#documentation": "The description of the distribution configuration. Minimum and maximum length are in characters.
" + "smithy.api#documentation": "The description of the AMI distribution configuration. Minimum and maximum length are in characters.
" } }, "targetAccountIds": { @@ -558,9 +558,9 @@ "type": "string", "traits": { "smithy.api#length": { - "min": 1 + "min": 0 }, - "smithy.api#pattern": "^[^\\x00]+$" + "smithy.api#pattern": "^[^\\x00]*$" } }, "com.amazonaws.imagebuilder#ComponentParameterValueList": { @@ -2317,7 +2317,7 @@ } ], "traits": { - "smithy.api#documentation": "Deletes an Image Builder image resource. This does not delete any EC2 AMIs or ECR container images\n\t\t\tthat are created during the image build process. You must clean those up separately,\n\t\t\tusing the appropriate Amazon EC2 or Amazon ECR console actions, or API or CLI commands.
\n\t\tTo deregister an EC2 Linux AMI, see Deregister \n\t\t\t\t\t\tyour Linux AMI in the \n Amazon EC2 User Guide\n .
\n\t\t\tTo deregister an EC2 Windows AMI, see Deregister \n\t\t\t\t\t\tyour Windows AMI in the \n Amazon EC2 Windows Guide\n .
\n\t\t\tTo delete a container image from Amazon ECR, see Deleting \n\t\t\t\t\t\tan image in the Amazon ECR User Guide.
\n\t\t\tDeletes an Image Builder image resource. This does not delete any EC2 AMIs or ECR container images\n\t\t\tthat are created during the image build process. You must clean those up separately,\n\t\t\tusing the appropriate Amazon EC2 or Amazon ECR console actions, or API or CLI commands.
\n\t\tTo deregister an EC2 Linux AMI, see Deregister \n\t\t\t\t\t\tyour Linux AMI in the \n Amazon EC2 User Guide\n .
\n\t\t\tTo deregister an EC2 Windows AMI, see Deregister \n\t\t\t\t\t\tyour Windows AMI in the \n Amazon EC2 Windows Guide\n .
\n\t\t\tTo delete a container image from Amazon ECR, see Deleting \n\t\t\t\t\t\tan image in the Amazon ECR User Guide.
\n\t\t\tThe name of the group.
" } + }, + "organizationArns": { + "target": "com.amazonaws.imagebuilder#OrganizationArnList", + "traits": { + "smithy.api#documentation": "The ARN for an Amazon Web Services Organization that you want to share your AMI with. For more information, see \n\t\t\tWhat is Organizations?.
" + } + }, + "organizationalUnitArns": { + "target": "com.amazonaws.imagebuilder#OrganizationalUnitArnList", + "traits": { + "smithy.api#documentation": "The ARN for an Organizations organizational unit (OU) that you want to share your AMI with. For more \n\t\t\tinformation about key concepts for Organizations, see Organizations terminology and concepts.
" + } } }, "traits": { - "smithy.api#documentation": "Describes the configuration for a launch permission. The launch permission modification request is sent to the \n\t\t\tAmazon EC2 ModifyImageAttribute \n\t\t\tAPI on behalf of the user for each Region they have selected to distribute the AMI. To make an AMI public, \n\t\t\tset the launch permission authorized accounts to all
. See the examples for making an AMI public at \n\t\t\tAmazon EC2 ModifyImageAttribute.
Describes the configuration for a launch permission. The launch permission modification \n\t\t\trequest is sent to the Amazon EC2 ModifyImageAttribute \n\t\t\tAPI on behalf of the user for each Region they have selected to distribute the AMI. To make an AMI public, \n\t\t\tset the launch permission authorized accounts to all
. See the examples for making an AMI \n\t\t\tpublic at Amazon EC2 ModifyImageAttribute.
Applies a policy to a container image. We recommend that you call the RAM API CreateResourceShare (https://docs.aws.amazon.com/ram/latest/APIReference/API_CreateResourceShare.html) to share resources. If you call the Image Builder API PutContainerImagePolicy
, you must also call the RAM API PromoteResourceShareCreatedFromPolicy (https://docs.aws.amazon.com/ram/latest/APIReference/API_PromoteResourceShareCreatedFromPolicy.html) in order for the resource to be visible to all principals with whom the resource is shared.
Applies a policy to a container image. We recommend that you call the RAM API CreateResourceShare (https://docs.aws.amazon.com//ram/latest/APIReference/API_CreateResourceShare.html) to share resources. If you call the Image Builder API PutContainerImagePolicy
, you must also call the RAM API PromoteResourceShareCreatedFromPolicy (https://docs.aws.amazon.com//ram/latest/APIReference/API_PromoteResourceShareCreatedFromPolicy.html) in order for the resource to be visible to all principals with whom the resource is shared.
EC2 Image Builder is a fully managed Amazon Web Services service that makes it easier to automate the \n creation, management, and deployment of customized, secure, and up-to-date \"golden\" server \n images that are pre-installed and pre-configured with software and settings to meet specific\n IT standards.
", + "smithy.api#title": "EC2 Image Builder" + }, "version": "2019-12-02", "operations": [ { @@ -7666,22 +7729,7 @@ { "target": "com.amazonaws.imagebuilder#UpdateInfrastructureConfiguration" } - ], - "traits": { - "aws.api#service": { - "sdkId": "imagebuilder", - "arnNamespace": "imagebuilder", - "cloudFormationName": "Imagebuilder", - "cloudTrailEventSource": "imagebuilder.amazonaws.com", - "endpointPrefix": "imagebuilder" - }, - "aws.auth#sigv4": { - "name": "imagebuilder" - }, - "aws.protocols#restJson1": {}, - "smithy.api#documentation": "EC2 Image Builder is a fully managed Amazon Web Services service that makes it easier to automate the \n creation, management, and deployment of customized, secure, and up-to-date \"golden\" server \n images that are pre-installed and pre-configured with software and settings to meet specific\n IT standards.
", - "smithy.api#title": "EC2 Image Builder" - } + ] } } } diff --git a/codegen/sdk-codegen/aws-models/inspector2.2020-06-08.json b/codegen/sdk-codegen/aws-models/inspector2.2020-06-08.json new file mode 100644 index 00000000000..6fda5a17db9 --- /dev/null +++ b/codegen/sdk-codegen/aws-models/inspector2.2020-06-08.json @@ -0,0 +1,6949 @@ +{ + "smithy": "1.0", + "shapes": { + "com.amazonaws.inspector2#AccessDeniedException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "You do not have sufficient access to perform this action.
", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.inspector2#Account": { + "type": "structure", + "members": { + "accountId": { + "target": "com.amazonaws.inspector2#AccountId", + "traits": { + "smithy.api#documentation": "The ID of the Amazon Web Services account.
", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.inspector2#Status", + "traits": { + "smithy.api#documentation": "The status of Amazon Inspector for the account.
", + "smithy.api#required": {} + } + }, + "resourceStatus": { + "target": "com.amazonaws.inspector2#ResourceStatus", + "traits": { + "smithy.api#documentation": "Details of the status of Amazon Inspector scans by resource type.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "An Amazon Web Services account within your environment that Amazon Inspector has been enabled for.
" + } + }, + "com.amazonaws.inspector2#AccountAggregation": { + "type": "structure", + "members": { + "findingType": { + "target": "com.amazonaws.inspector2#AggregationFindingType", + "traits": { + "smithy.api#documentation": "The type of finding.
" + } + }, + "resourceType": { + "target": "com.amazonaws.inspector2#AggregationResourceType", + "traits": { + "smithy.api#documentation": "The type of resource.
" + } + }, + "sortOrder": { + "target": "com.amazonaws.inspector2#SortOrder", + "traits": { + "smithy.api#documentation": "The sort order (ascending or descending).
" + } + }, + "sortBy": { + "target": "com.amazonaws.inspector2#AccountSortBy", + "traits": { + "smithy.api#documentation": "The value to sort by.
" + } + } + }, + "traits": { + "smithy.api#documentation": "An object that contains details about an aggregation response based on\n Amazon Web Services accounts.
" + } + }, + "com.amazonaws.inspector2#AccountAggregationResponse": { + "type": "structure", + "members": { + "accountId": { + "target": "com.amazonaws.inspector2#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID.
" + } + }, + "severityCounts": { + "target": "com.amazonaws.inspector2#SeverityCounts", + "traits": { + "smithy.api#documentation": "The number of findings by severity.
" + } + } + }, + "traits": { + "smithy.api#documentation": "An aggregation of findings by Amazon Web Services account ID.
" + } + }, + "com.amazonaws.inspector2#AccountId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 12, + "max": 12 + }, + "smithy.api#pattern": "^\\d{12}$" + } + }, + "com.amazonaws.inspector2#AccountIdSet": { + "type": "set", + "member": { + "target": "com.amazonaws.inspector2#AccountId" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, + "com.amazonaws.inspector2#AccountList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#Account" + } + }, + "com.amazonaws.inspector2#AccountSortBy": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CRITICAL", + "name": "CRITICAL" + }, + { + "value": "HIGH", + "name": "HIGH" + }, + { + "value": "ALL", + "name": "ALL" + } + ] + } + }, + "com.amazonaws.inspector2#AccountState": { + "type": "structure", + "members": { + "accountId": { + "target": "com.amazonaws.inspector2#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID.
", + "smithy.api#required": {} + } + }, + "state": { + "target": "com.amazonaws.inspector2#State", + "traits": { + "smithy.api#documentation": "An object detailing the status of Amazon Inspector for the account.
", + "smithy.api#required": {} + } + }, + "resourceState": { + "target": "com.amazonaws.inspector2#ResourceState", + "traits": { + "smithy.api#documentation": "An object detailing which resources Amazon Inspector is enabled to scan for the account.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "An object with details the status of an Amazon Web Services account within your Amazon Inspector environment
" + } + }, + "com.amazonaws.inspector2#AccountStateList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#AccountState" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, + "com.amazonaws.inspector2#AggCounts": { + "type": "long" + }, + "com.amazonaws.inspector2#AggregationFindingType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "NETWORK_REACHABILITY", + "name": "NETWORK_REACHABILITY" + }, + { + "value": "PACKAGE_VULNERABILITY", + "name": "PACKAGE_VULNERABILITY" + } + ] + } + }, + "com.amazonaws.inspector2#AggregationRequest": { + "type": "union", + "members": { + "accountAggregation": { + "target": "com.amazonaws.inspector2#AccountAggregation", + "traits": { + "smithy.api#documentation": "An object that contains details about an aggregation request based on Amazon Web Services account\n IDs.
" + } + }, + "amiAggregation": { + "target": "com.amazonaws.inspector2#AmiAggregation", + "traits": { + "smithy.api#documentation": "An object that contains details about an aggregation request based on Amazon Machine\n Images (AMIs).
" + } + }, + "awsEcrContainerAggregation": { + "target": "com.amazonaws.inspector2#AwsEcrContainerAggregation", + "traits": { + "smithy.api#documentation": "An object that contains details about an aggregation request based on Amazon ECR container\n images.
" + } + }, + "ec2InstanceAggregation": { + "target": "com.amazonaws.inspector2#Ec2InstanceAggregation", + "traits": { + "smithy.api#documentation": "An object that contains details about an aggregation request based on Amazon EC2\n instances.
" + } + }, + "findingTypeAggregation": { + "target": "com.amazonaws.inspector2#FindingTypeAggregation", + "traits": { + "smithy.api#documentation": "An object that contains details about an aggregation request based on finding types.
" + } + }, + "imageLayerAggregation": { + "target": "com.amazonaws.inspector2#ImageLayerAggregation", + "traits": { + "smithy.api#documentation": "An object that contains details about an aggregation request based on container image\n layers.
" + } + }, + "packageAggregation": { + "target": "com.amazonaws.inspector2#PackageAggregation", + "traits": { + "smithy.api#documentation": "An object that contains details about an aggregation request based on operating system\n package type.
" + } + }, + "repositoryAggregation": { + "target": "com.amazonaws.inspector2#RepositoryAggregation", + "traits": { + "smithy.api#documentation": "An object that contains details about an aggregation request based on Amazon ECR repositories.
" + } + }, + "titleAggregation": { + "target": "com.amazonaws.inspector2#TitleAggregation", + "traits": { + "smithy.api#documentation": "An object that contains details about an aggregation request based on finding title.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Contains details about an aggregation request.
" + } + }, + "com.amazonaws.inspector2#AggregationResourceType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "AWS_EC2_INSTANCE", + "name": "AWS_EC2_INSTANCE" + }, + { + "value": "AWS_ECR_CONTAINER_IMAGE", + "name": "AWS_ECR_CONTAINER_IMAGE" + } + ] + } + }, + "com.amazonaws.inspector2#AggregationResponse": { + "type": "union", + "members": { + "accountAggregation": { + "target": "com.amazonaws.inspector2#AccountAggregationResponse", + "traits": { + "smithy.api#documentation": "An object that contains details about an aggregation response based on Amazon Web Services account\n IDs.
" + } + }, + "amiAggregation": { + "target": "com.amazonaws.inspector2#AmiAggregationResponse", + "traits": { + "smithy.api#documentation": "An object that contains details about an aggregation response based on Amazon Machine\n Images (AMIs).
" + } + }, + "awsEcrContainerAggregation": { + "target": "com.amazonaws.inspector2#AwsEcrContainerAggregationResponse", + "traits": { + "smithy.api#documentation": "An object that contains details about an aggregation response based on Amazon ECR container\n images.
" + } + }, + "ec2InstanceAggregation": { + "target": "com.amazonaws.inspector2#Ec2InstanceAggregationResponse", + "traits": { + "smithy.api#documentation": "An object that contains details about an aggregation response based on Amazon EC2\n instances.
" + } + }, + "findingTypeAggregation": { + "target": "com.amazonaws.inspector2#FindingTypeAggregationResponse", + "traits": { + "smithy.api#documentation": "An object that contains details about an aggregation response based on finding types.
" + } + }, + "imageLayerAggregation": { + "target": "com.amazonaws.inspector2#ImageLayerAggregationResponse", + "traits": { + "smithy.api#documentation": "An object that contains details about an aggregation response based on container image\n layers.
" + } + }, + "packageAggregation": { + "target": "com.amazonaws.inspector2#PackageAggregationResponse", + "traits": { + "smithy.api#documentation": "An object that contains details about an aggregation response based on operating system\n package type.
" + } + }, + "repositoryAggregation": { + "target": "com.amazonaws.inspector2#RepositoryAggregationResponse", + "traits": { + "smithy.api#documentation": "An object that contains details about an aggregation response based on Amazon ECR\n repositories.
" + } + }, + "titleAggregation": { + "target": "com.amazonaws.inspector2#TitleAggregationResponse", + "traits": { + "smithy.api#documentation": "An object that contains details about an aggregation response based on finding title.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A structure that contains details about the results of an aggregation type.
" + } + }, + "com.amazonaws.inspector2#AggregationResponseList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#AggregationResponse" + } + }, + "com.amazonaws.inspector2#AggregationType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "FINDING_TYPE", + "name": "FINDING_TYPE" + }, + { + "value": "PACKAGE", + "name": "PACKAGE" + }, + { + "value": "TITLE", + "name": "TITLE" + }, + { + "value": "REPOSITORY", + "name": "REPOSITORY" + }, + { + "value": "AMI", + "name": "AMI" + }, + { + "value": "AWS_EC2_INSTANCE", + "name": "AWS_EC2_INSTANCE" + }, + { + "value": "AWS_ECR_CONTAINER", + "name": "AWS_ECR_CONTAINER" + }, + { + "value": "IMAGE_LAYER", + "name": "IMAGE_LAYER" + }, + { + "value": "ACCOUNT", + "name": "ACCOUNT" + } + ] + } + }, + "com.amazonaws.inspector2#AmiAggregation": { + "type": "structure", + "members": { + "amis": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "The IDs of AMIs to aggregate findings for.
" + } + }, + "sortOrder": { + "target": "com.amazonaws.inspector2#SortOrder", + "traits": { + "smithy.api#documentation": "The order to sort results by.
" + } + }, + "sortBy": { + "target": "com.amazonaws.inspector2#AmiSortBy", + "traits": { + "smithy.api#documentation": "The value to sort results by.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The details that define an aggregation based on Amazon machine images (AMIs).
" + } + }, + "com.amazonaws.inspector2#AmiAggregationResponse": { + "type": "structure", + "members": { + "ami": { + "target": "com.amazonaws.inspector2#AmiId", + "traits": { + "smithy.api#documentation": "The ID of the AMI that findings were aggregated for.
", + "smithy.api#required": {} + } + }, + "accountId": { + "target": "com.amazonaws.inspector2#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID that the AMI belongs.
" + } + }, + "severityCounts": { + "target": "com.amazonaws.inspector2#SeverityCounts", + "traits": { + "smithy.api#documentation": "An object that contains the count of matched findings per severity.
" + } + }, + "affectedInstances": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#documentation": "The IDs of Amazon EC2 instances using this AMI.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A response that contains the results of a finding aggregation by AMI.
" + } + }, + "com.amazonaws.inspector2#AmiId": { + "type": "string", + "traits": { + "smithy.api#pattern": "^ami-([a-z0-9]{8}|[a-z0-9]{17}|\\*)$" + } + }, + "com.amazonaws.inspector2#AmiSortBy": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CRITICAL", + "name": "CRITICAL" + }, + { + "value": "HIGH", + "name": "HIGH" + }, + { + "value": "ALL", + "name": "ALL" + }, + { + "value": "AFFECTED_INSTANCES", + "name": "AFFECTED_INSTANCES" + } + ] + } + }, + "com.amazonaws.inspector2#Arn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1011 + } + } + }, + "com.amazonaws.inspector2#AssociateMember": { + "type": "operation", + "input": { + "target": "com.amazonaws.inspector2#AssociateMemberRequest" + }, + "output": { + "target": "com.amazonaws.inspector2#AssociateMemberResponse" + }, + "errors": [ + { + "target": "com.amazonaws.inspector2#AccessDeniedException" + }, + { + "target": "com.amazonaws.inspector2#InternalServerException" + }, + { + "target": "com.amazonaws.inspector2#ThrottlingException" + }, + { + "target": "com.amazonaws.inspector2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Associates an Amazon Web Services account with an Amazon Inspector delegated administrator.
", + "smithy.api#http": { + "method": "POST", + "uri": "/members/associate", + "code": 200 + } + } + }, + "com.amazonaws.inspector2#AssociateMemberRequest": { + "type": "structure", + "members": { + "accountId": { + "target": "com.amazonaws.inspector2#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the member account to be associated.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.inspector2#AssociateMemberResponse": { + "type": "structure", + "members": { + "accountId": { + "target": "com.amazonaws.inspector2#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the successfully associated member account.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.inspector2#AutoEnable": { + "type": "structure", + "members": { + "ec2": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Represents whether Amazon EC2 scans are automatically enabled for new members of your Amazon Inspector\n organization.
", + "smithy.api#required": {} + } + }, + "ecr": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Represents whether Amazon ECR scans are automatically enabled for new members of your Amazon Inspector\n organization.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Represents which scan types are automatically enabled for new members of your Amazon Inspector organization.
" + } + }, + "com.amazonaws.inspector2#AwsEc2InstanceDetails": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The type of the Amazon EC2 instance.
" + } + }, + "imageId": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The image ID of the Amazon EC2 instance.
" + } + }, + "ipV4Addresses": { + "target": "com.amazonaws.inspector2#IpV4AddressList", + "traits": { + "smithy.api#documentation": "The IPv4 addresses of the Amazon EC2 instance.
" + } + }, + "ipV6Addresses": { + "target": "com.amazonaws.inspector2#IpV6AddressList", + "traits": { + "smithy.api#documentation": "The IPv6 addresses of the Amazon EC2 instance.
" + } + }, + "keyName": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The name of the key pair used to launch the Amazon EC2 instance.
" + } + }, + "iamInstanceProfileArn": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The IAM instance profile ARN of the Amazon EC2 instance.
" + } + }, + "vpcId": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The VPC ID of the Amazon EC2 instance.
" + } + }, + "subnetId": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The subnet ID of the Amazon EC2 instance.
" + } + }, + "launchedAt": { + "target": "com.amazonaws.inspector2#DateTimeTimestamp", + "traits": { + "smithy.api#documentation": "The date and time the Amazon EC2 instance was launched at.
" + } + }, + "platform": { + "target": "com.amazonaws.inspector2#Platform", + "traits": { + "smithy.api#documentation": "The platform of the Amazon EC2 instance.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Details of the Amazon EC2 instance involved in a finding.
" + } + }, + "com.amazonaws.inspector2#AwsEcrContainerAggregation": { + "type": "structure", + "members": { + "resourceIds": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "The container resource IDs.
" + } + }, + "imageShas": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "The image SHA values.
" + } + }, + "repositories": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "The container repositories.
" + } + }, + "architectures": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "The architecture of the containers.
" + } + }, + "imageTags": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "The image tags.
" + } + }, + "sortOrder": { + "target": "com.amazonaws.inspector2#SortOrder", + "traits": { + "smithy.api#documentation": "The sort order (ascending or descending).
" + } + }, + "sortBy": { + "target": "com.amazonaws.inspector2#AwsEcrContainerSortBy", + "traits": { + "smithy.api#documentation": "The value to sort by.
" + } + } + }, + "traits": { + "smithy.api#documentation": "An aggregation of information about Amazon ECR containers.
" + } + }, + "com.amazonaws.inspector2#AwsEcrContainerAggregationResponse": { + "type": "structure", + "members": { + "resourceId": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The resource ID of the container.
", + "smithy.api#required": {} + } + }, + "imageSha": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The SHA value of the container image.
" + } + }, + "repository": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The container repository.
" + } + }, + "architecture": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The architecture of the container.
" + } + }, + "imageTags": { + "target": "com.amazonaws.inspector2#StringList", + "traits": { + "smithy.api#documentation": "The container image stags.
" + } + }, + "accountId": { + "target": "com.amazonaws.inspector2#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the account that owns the container.
" + } + }, + "severityCounts": { + "target": "com.amazonaws.inspector2#SeverityCounts", + "traits": { + "smithy.api#documentation": "The number of finding by severity.
" + } + } + }, + "traits": { + "smithy.api#documentation": "An aggregation of information about Amazon ECR containers.
" + } + }, + "com.amazonaws.inspector2#AwsEcrContainerImageDetails": { + "type": "structure", + "members": { + "repositoryName": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The name of the repository the Amazon ECR container image resides in.
", + "smithy.api#required": {} + } + }, + "imageTags": { + "target": "com.amazonaws.inspector2#ImageTagList", + "traits": { + "smithy.api#documentation": "The image tags attached to the Amazon ECR container image.
" + } + }, + "pushedAt": { + "target": "com.amazonaws.inspector2#DateTimeTimestamp", + "traits": { + "smithy.api#documentation": "The date and time the Amazon ECR container image was pushed.
" + } + }, + "author": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The image author of the Amazon ECR container image.
" + } + }, + "architecture": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The architecture of the Amazon ECR container image.
" + } + }, + "imageHash": { + "target": "com.amazonaws.inspector2#ImageHash", + "traits": { + "smithy.api#documentation": "The image hash of the Amazon ECR container image.
", + "smithy.api#required": {} + } + }, + "registry": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The registry the Amazon ECR container image belongs to.
", + "smithy.api#required": {} + } + }, + "platform": { + "target": "com.amazonaws.inspector2#Platform", + "traits": { + "smithy.api#documentation": "The platform of the Amazon ECR container image.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The image details of the Amazon ECR container image.
" + } + }, + "com.amazonaws.inspector2#AwsEcrContainerSortBy": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CRITICAL", + "name": "CRITICAL" + }, + { + "value": "HIGH", + "name": "HIGH" + }, + { + "value": "ALL", + "name": "ALL" + } + ] + } + }, + "com.amazonaws.inspector2#BadRequestException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "One or more tags submitted as part of the request is not valid.
", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.inspector2#BatchGetAccountStatus": { + "type": "operation", + "input": { + "target": "com.amazonaws.inspector2#BatchGetAccountStatusRequest" + }, + "output": { + "target": "com.amazonaws.inspector2#BatchGetAccountStatusResponse" + }, + "errors": [ + { + "target": "com.amazonaws.inspector2#AccessDeniedException" + }, + { + "target": "com.amazonaws.inspector2#InternalServerException" + }, + { + "target": "com.amazonaws.inspector2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.inspector2#ThrottlingException" + }, + { + "target": "com.amazonaws.inspector2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Retrieves the Amazon Inspector status of multiple Amazon Web Services accounts within your environment.
", + "smithy.api#http": { + "method": "POST", + "uri": "/status/batch/get", + "code": 200 + } + } + }, + "com.amazonaws.inspector2#BatchGetAccountStatusRequest": { + "type": "structure", + "members": { + "accountIds": { + "target": "com.amazonaws.inspector2#AccountIdSet", + "traits": { + "smithy.api#documentation": "The 12-digit Amazon Web Services account IDs of the accounts to retrieve Amazon Inspector status for.
" + } + } + } + }, + "com.amazonaws.inspector2#BatchGetAccountStatusResponse": { + "type": "structure", + "members": { + "accounts": { + "target": "com.amazonaws.inspector2#AccountStateList", + "traits": { + "smithy.api#documentation": "An array of objects that provide details on the status of Amazon Inspector for each of the requested accounts.
", + "smithy.api#required": {} + } + }, + "failedAccounts": { + "target": "com.amazonaws.inspector2#FailedAccountList", + "traits": { + "smithy.api#documentation": "An array of objects detailing any accounts that failed to enable Amazon Inspector and why.
" + } + } + } + }, + "com.amazonaws.inspector2#BatchGetFreeTrialInfo": { + "type": "operation", + "input": { + "target": "com.amazonaws.inspector2#BatchGetFreeTrialInfoRequest" + }, + "output": { + "target": "com.amazonaws.inspector2#BatchGetFreeTrialInfoResponse" + }, + "errors": [ + { + "target": "com.amazonaws.inspector2#AccessDeniedException" + }, + { + "target": "com.amazonaws.inspector2#InternalServerException" + }, + { + "target": "com.amazonaws.inspector2#ThrottlingException" + }, + { + "target": "com.amazonaws.inspector2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Gets free trial status for multiple Amazon Web Services accounts.
", + "smithy.api#http": { + "method": "POST", + "uri": "/freetrialinfo/batchget", + "code": 200 + } + } + }, + "com.amazonaws.inspector2#BatchGetFreeTrialInfoRequest": { + "type": "structure", + "members": { + "accountIds": { + "target": "com.amazonaws.inspector2#MeteringAccountIdList", + "traits": { + "smithy.api#documentation": "The account IDs to get free trial status for.
", + "smithy.api#length": { + "min": 1, + "max": 100 + }, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.inspector2#BatchGetFreeTrialInfoResponse": { + "type": "structure", + "members": { + "accounts": { + "target": "com.amazonaws.inspector2#FreeTrialAccountInfoList", + "traits": { + "smithy.api#documentation": "An array of objects that provide Amazon Inspector free trial details for each of the requested accounts.\n
", + "smithy.api#required": {} + } + }, + "failedAccounts": { + "target": "com.amazonaws.inspector2#FreeTrialInfoErrorList", + "traits": { + "smithy.api#documentation": "An array of objects detailing any accounts that free trial data could not be returned for.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.inspector2#CancelFindingsReport": { + "type": "operation", + "input": { + "target": "com.amazonaws.inspector2#CancelFindingsReportRequest" + }, + "output": { + "target": "com.amazonaws.inspector2#CancelFindingsReportResponse" + }, + "errors": [ + { + "target": "com.amazonaws.inspector2#AccessDeniedException" + }, + { + "target": "com.amazonaws.inspector2#InternalServerException" + }, + { + "target": "com.amazonaws.inspector2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.inspector2#ThrottlingException" + }, + { + "target": "com.amazonaws.inspector2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Cancels the given findings report.
", + "smithy.api#http": { + "method": "POST", + "uri": "/reporting/cancel", + "code": 200 + } + } + }, + "com.amazonaws.inspector2#CancelFindingsReportRequest": { + "type": "structure", + "members": { + "reportId": { + "target": "com.amazonaws.inspector2#ReportId", + "traits": { + "smithy.api#documentation": "The ID of the report to be canceled.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.inspector2#CancelFindingsReportResponse": { + "type": "structure", + "members": { + "reportId": { + "target": "com.amazonaws.inspector2#ReportId", + "traits": { + "smithy.api#documentation": "The ID of the canceled report.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.inspector2#ClientToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + } + } + }, + "com.amazonaws.inspector2#Component": { + "type": "string" + }, + "com.amazonaws.inspector2#ComponentType": { + "type": "string" + }, + "com.amazonaws.inspector2#ConflictException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "resourceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ID of the conflicting resource.
", + "smithy.api#required": {} + } + }, + "resourceType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The type of the conflicting resource.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A conflict occurred.
", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.inspector2#Counts": { + "type": "structure", + "members": { + "count": { + "target": "com.amazonaws.inspector2#AggCounts", + "traits": { + "smithy.api#documentation": "The number of resources.
" + } + }, + "groupKey": { + "target": "com.amazonaws.inspector2#GroupKey", + "traits": { + "smithy.api#documentation": "The key associated with this group
" + } + } + }, + "traits": { + "smithy.api#documentation": "a structure that contains information on the count of resources within a group.
" + } + }, + "com.amazonaws.inspector2#CountsList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#Counts" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 5 + } + } + }, + "com.amazonaws.inspector2#CoverageFilterCriteria": { + "type": "structure", + "members": { + "scanStatusCode": { + "target": "com.amazonaws.inspector2#CoverageStringFilterList", + "traits": { + "smithy.api#documentation": "The scan status code to filter on.
" + } + }, + "scanStatusReason": { + "target": "com.amazonaws.inspector2#CoverageStringFilterList", + "traits": { + "smithy.api#documentation": "The scan status reason to filter on.
" + } + }, + "accountId": { + "target": "com.amazonaws.inspector2#CoverageStringFilterList", + "traits": { + "smithy.api#documentation": "An array of Amazon Web Services account IDs to return coverage statistics for.
" + } + }, + "resourceId": { + "target": "com.amazonaws.inspector2#CoverageStringFilterList", + "traits": { + "smithy.api#documentation": "An array of Amazon Web Services resource IDs to return coverage statistics for.
" + } + }, + "resourceType": { + "target": "com.amazonaws.inspector2#CoverageStringFilterList", + "traits": { + "smithy.api#documentation": "An array of Amazon Web Services resource types to return coverage statistics for.
" + } + }, + "scanType": { + "target": "com.amazonaws.inspector2#CoverageStringFilterList", + "traits": { + "smithy.api#documentation": "An array of Amazon Inspector scan types to return coverage statistics for.
" + } + }, + "ecrRepositoryName": { + "target": "com.amazonaws.inspector2#CoverageStringFilterList", + "traits": { + "smithy.api#documentation": "The Amazon ECR repository name to filter on.
" + } + }, + "ecrImageTags": { + "target": "com.amazonaws.inspector2#CoverageStringFilterList", + "traits": { + "smithy.api#documentation": "The Amazon ECR image tags to filter on.
" + } + }, + "ec2InstanceTags": { + "target": "com.amazonaws.inspector2#CoverageMapFilterList", + "traits": { + "smithy.api#documentation": "The Amazon EC2 instance tags to filter on.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A structure that identifies filter criteria for GetCoverageStatistics
.
The operator to compare coverage on.
", + "smithy.api#required": {} + } + }, + "key": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The tag key associated with the coverage map filter.
", + "smithy.api#required": {} + } + }, + "value": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The tag value associated with the coverage map filter.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Contains details of a coverage map filter.
" + } + }, + "com.amazonaws.inspector2#CoverageMapFilterList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#CoverageMapFilter" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + } + } + }, + "com.amazonaws.inspector2#CoverageResourceType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "AWS_EC2_INSTANCE", + "name": "AWS_EC2_INSTANCE" + }, + { + "value": "AWS_ECR_CONTAINER_IMAGE", + "name": "AWS_ECR_CONTAINER_IMAGE" + }, + { + "value": "AWS_ECR_REPOSITORY", + "name": "AWS_ECR_REPOSITORY" + } + ] + } + }, + "com.amazonaws.inspector2#CoverageStringComparison": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "EQUALS", + "name": "EQUALS" + }, + { + "value": "NOT_EQUALS", + "name": "NOT_EQUALS" + } + ] + } + }, + "com.amazonaws.inspector2#CoverageStringFilter": { + "type": "structure", + "members": { + "comparison": { + "target": "com.amazonaws.inspector2#CoverageStringComparison", + "traits": { + "smithy.api#documentation": "The operator to compare strings on.
", + "smithy.api#required": {} + } + }, + "value": { + "target": "com.amazonaws.inspector2#CoverageStringInput", + "traits": { + "smithy.api#documentation": "The value to compare strings on.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Contains details of a coverage string filter.
" + } + }, + "com.amazonaws.inspector2#CoverageStringFilterList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#CoverageStringFilter" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + } + } + }, + "com.amazonaws.inspector2#CoverageStringInput": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + } + } + }, + "com.amazonaws.inspector2#CoveredResource": { + "type": "structure", + "members": { + "resourceType": { + "target": "com.amazonaws.inspector2#CoverageResourceType", + "traits": { + "smithy.api#documentation": "The type of the covered resource.
", + "smithy.api#required": {} + } + }, + "resourceId": { + "target": "com.amazonaws.inspector2#ResourceId", + "traits": { + "smithy.api#documentation": "The ID of the covered resource.
", + "smithy.api#required": {} + } + }, + "accountId": { + "target": "com.amazonaws.inspector2#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the covered resource.
", + "smithy.api#required": {} + } + }, + "scanType": { + "target": "com.amazonaws.inspector2#ScanType", + "traits": { + "smithy.api#documentation": "The Amazon Inspector scan type covering the resource.
", + "smithy.api#required": {} + } + }, + "scanStatus": { + "target": "com.amazonaws.inspector2#ScanStatus", + "traits": { + "smithy.api#documentation": "The status of the scan covering the resource.
" + } + }, + "resourceMetadata": { + "target": "com.amazonaws.inspector2#ResourceScanMetadata", + "traits": { + "smithy.api#documentation": "An object that contains details about the metadata.
" + } + } + }, + "traits": { + "smithy.api#documentation": "An object that contains details about a resource covered by Amazon Inspector.
" + } + }, + "com.amazonaws.inspector2#CoveredResources": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#CoveredResource" + } + }, + "com.amazonaws.inspector2#CreateFilter": { + "type": "operation", + "input": { + "target": "com.amazonaws.inspector2#CreateFilterRequest" + }, + "output": { + "target": "com.amazonaws.inspector2#CreateFilterResponse" + }, + "errors": [ + { + "target": "com.amazonaws.inspector2#AccessDeniedException" + }, + { + "target": "com.amazonaws.inspector2#BadRequestException" + }, + { + "target": "com.amazonaws.inspector2#InternalServerException" + }, + { + "target": "com.amazonaws.inspector2#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.inspector2#ThrottlingException" + }, + { + "target": "com.amazonaws.inspector2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Creates a filter resource using specified filter criteria.
", + "smithy.api#http": { + "method": "POST", + "uri": "/filters/create", + "code": 200 + } + } + }, + "com.amazonaws.inspector2#CreateFilterRequest": { + "type": "structure", + "members": { + "action": { + "target": "com.amazonaws.inspector2#FilterAction", + "traits": { + "smithy.api#documentation": "Defines the action that is to be applied to the findings that match the filter.
", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.inspector2#FilterDescription", + "traits": { + "smithy.api#documentation": "A description of the filter.
" + } + }, + "filterCriteria": { + "target": "com.amazonaws.inspector2#FilterCriteria", + "traits": { + "smithy.api#documentation": "Defines the criteria to be used in the filter for querying findings.
", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.inspector2#FilterName", + "traits": { + "smithy.api#documentation": "The name of the filter. Minimum length of 3. Maximum length of 64. Valid characters\n include alphanumeric characters, dot (.), underscore (_), and dash (-). Spaces are not\n allowed.
", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.inspector2#TagMap", + "traits": { + "smithy.api#documentation": "A list of tags for the filter.
" + } + } + } + }, + "com.amazonaws.inspector2#CreateFilterResponse": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.inspector2#FilterArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Number (ARN) of the successfully created filter.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.inspector2#CreateFindingsReport": { + "type": "operation", + "input": { + "target": "com.amazonaws.inspector2#CreateFindingsReportRequest" + }, + "output": { + "target": "com.amazonaws.inspector2#CreateFindingsReportResponse" + }, + "errors": [ + { + "target": "com.amazonaws.inspector2#AccessDeniedException" + }, + { + "target": "com.amazonaws.inspector2#InternalServerException" + }, + { + "target": "com.amazonaws.inspector2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.inspector2#ThrottlingException" + }, + { + "target": "com.amazonaws.inspector2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Creates a finding report.
", + "smithy.api#http": { + "method": "POST", + "uri": "/reporting/create", + "code": 200 + } + } + }, + "com.amazonaws.inspector2#CreateFindingsReportRequest": { + "type": "structure", + "members": { + "filterCriteria": { + "target": "com.amazonaws.inspector2#FilterCriteria", + "traits": { + "smithy.api#documentation": "The filter criteria to apply to the results of the finding report.
" + } + }, + "reportFormat": { + "target": "com.amazonaws.inspector2#ReportFormat", + "traits": { + "smithy.api#documentation": "The format to generate the report in.
", + "smithy.api#required": {} + } + }, + "s3Destination": { + "target": "com.amazonaws.inspector2#Destination", + "traits": { + "smithy.api#documentation": "The Amazon S3 export destination for the report.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.inspector2#CreateFindingsReportResponse": { + "type": "structure", + "members": { + "reportId": { + "target": "com.amazonaws.inspector2#ReportId", + "traits": { + "smithy.api#documentation": "The ID of the report.
" + } + } + } + }, + "com.amazonaws.inspector2#Currency": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "USD", + "name": "USD" + } + ] + } + }, + "com.amazonaws.inspector2#CvssScore": { + "type": "structure", + "members": { + "baseScore": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "The base CVSS score used for the finding.
", + "smithy.api#required": {} + } + }, + "scoringVector": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The vector string of the CVSS score.
", + "smithy.api#required": {} + } + }, + "version": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The version of CVSS used for the score.
", + "smithy.api#required": {} + } + }, + "source": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The source of the CVSS score.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The CVSS score for a finding.
" + } + }, + "com.amazonaws.inspector2#CvssScoreAdjustment": { + "type": "structure", + "members": { + "metric": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The metric used to adjust the CVSS score.
", + "smithy.api#required": {} + } + }, + "reason": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The reason the CVSS score has been adjustment.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Details on adjustments Amazon Inspector made to the CVSS score for a finding.
" + } + }, + "com.amazonaws.inspector2#CvssScoreAdjustmentList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#CvssScoreAdjustment" + } + }, + "com.amazonaws.inspector2#CvssScoreDetails": { + "type": "structure", + "members": { + "scoreSource": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The source for the CVSS score.
", + "smithy.api#required": {} + } + }, + "cvssSource": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The source of the CVSS data.
" + } + }, + "version": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The CVSS version used in scoring.
", + "smithy.api#required": {} + } + }, + "score": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "The CVSS score.
", + "smithy.api#required": {} + } + }, + "scoringVector": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The vector for the CVSS score.
", + "smithy.api#required": {} + } + }, + "adjustments": { + "target": "com.amazonaws.inspector2#CvssScoreAdjustmentList", + "traits": { + "smithy.api#documentation": "An object that contains details about adjustment Amazon Inspector made to the CVSS score.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Information about the CVSS score.
" + } + }, + "com.amazonaws.inspector2#CvssScoreList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#CvssScore" + } + }, + "com.amazonaws.inspector2#DateFilter": { + "type": "structure", + "members": { + "startInclusive": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp representing the start of the time period filtered on.
" + } + }, + "endInclusive": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp representing the end of the time period filtered on.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Contains details on the time range used to filter findings.
" + } + }, + "com.amazonaws.inspector2#DateFilterList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#DateFilter" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + } + } + }, + "com.amazonaws.inspector2#DateTimeTimestamp": { + "type": "timestamp" + }, + "com.amazonaws.inspector2#DelegatedAdmin": { + "type": "structure", + "members": { + "accountId": { + "target": "com.amazonaws.inspector2#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the Amazon Inspector delegated administrator for your organization.
" + } + }, + "relationshipStatus": { + "target": "com.amazonaws.inspector2#RelationshipStatus", + "traits": { + "smithy.api#documentation": "The status of the Amazon Inspector delegated administrator.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Details of the Amazon Inspector delegated administrator for your organization.
" + } + }, + "com.amazonaws.inspector2#DelegatedAdminAccount": { + "type": "structure", + "members": { + "accountId": { + "target": "com.amazonaws.inspector2#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the Amazon Inspector delegated administrator for your organization.
" + } + }, + "status": { + "target": "com.amazonaws.inspector2#DelegatedAdminStatus", + "traits": { + "smithy.api#documentation": "The status of the Amazon Inspector delegated administrator.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Details of the Amazon Inspector delegated administrator for your organization.
" + } + }, + "com.amazonaws.inspector2#DelegatedAdminAccountList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#DelegatedAdminAccount" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 5 + } + } + }, + "com.amazonaws.inspector2#DelegatedAdminStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ENABLED", + "name": "ENABLED" + }, + { + "value": "DISABLE_IN_PROGRESS", + "name": "DISABLE_IN_PROGRESS" + } + ] + } + }, + "com.amazonaws.inspector2#DeleteFilter": { + "type": "operation", + "input": { + "target": "com.amazonaws.inspector2#DeleteFilterRequest" + }, + "output": { + "target": "com.amazonaws.inspector2#DeleteFilterResponse" + }, + "errors": [ + { + "target": "com.amazonaws.inspector2#AccessDeniedException" + }, + { + "target": "com.amazonaws.inspector2#InternalServerException" + }, + { + "target": "com.amazonaws.inspector2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.inspector2#ThrottlingException" + }, + { + "target": "com.amazonaws.inspector2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes a filter resource.
", + "smithy.api#http": { + "method": "POST", + "uri": "/filters/delete", + "code": 200 + } + } + }, + "com.amazonaws.inspector2#DeleteFilterRequest": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.inspector2#FilterArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Number (ARN) of the filter to be deleted.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.inspector2#DeleteFilterResponse": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.inspector2#FilterArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Number (ARN) of the filter that has been deleted.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.inspector2#DescribeOrganizationConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.inspector2#DescribeOrganizationConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.inspector2#DescribeOrganizationConfigurationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.inspector2#AccessDeniedException" + }, + { + "target": "com.amazonaws.inspector2#InternalServerException" + }, + { + "target": "com.amazonaws.inspector2#ThrottlingException" + }, + { + "target": "com.amazonaws.inspector2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Describe Amazon Inspector configuration settings for an Amazon Web Services organization
", + "smithy.api#http": { + "method": "POST", + "uri": "/organizationconfiguration/describe", + "code": 200 + } + } + }, + "com.amazonaws.inspector2#DescribeOrganizationConfigurationRequest": { + "type": "structure", + "members": {} + }, + "com.amazonaws.inspector2#DescribeOrganizationConfigurationResponse": { + "type": "structure", + "members": { + "autoEnable": { + "target": "com.amazonaws.inspector2#AutoEnable", + "traits": { + "smithy.api#documentation": "The scan types are automatically enabled for new members of your organization.
" + } + }, + "maxAccountLimitReached": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Represents whether your organization has reached the maximum Amazon Web Services account limit for Amazon Inspector.
" + } + } + } + }, + "com.amazonaws.inspector2#Destination": { + "type": "structure", + "members": { + "bucketName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the Amazon S3 bucket to export findings to.
", + "smithy.api#required": {} + } + }, + "keyPrefix": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The prefix of the KMS key used to export findings.
" + } + }, + "kmsKeyArn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ARN of the KMS key used to encrypt data when exporting findings.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Contains details of the Amazon S3 bucket and KMS key used to export findings.
" + } + }, + "com.amazonaws.inspector2#Disable": { + "type": "operation", + "input": { + "target": "com.amazonaws.inspector2#DisableRequest" + }, + "output": { + "target": "com.amazonaws.inspector2#DisableResponse" + }, + "errors": [ + { + "target": "com.amazonaws.inspector2#AccessDeniedException" + }, + { + "target": "com.amazonaws.inspector2#InternalServerException" + }, + { + "target": "com.amazonaws.inspector2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.inspector2#ThrottlingException" + }, + { + "target": "com.amazonaws.inspector2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Disables Amazon Inspector scans for one or more Amazon Web Services accounts. Disabling all scan types in an account\n disables the Amazon Inspector service.
", + "smithy.api#http": { + "method": "POST", + "uri": "/disable", + "code": 200 + } + } + }, + "com.amazonaws.inspector2#DisableDelegatedAdminAccount": { + "type": "operation", + "input": { + "target": "com.amazonaws.inspector2#DisableDelegatedAdminAccountRequest" + }, + "output": { + "target": "com.amazonaws.inspector2#DisableDelegatedAdminAccountResponse" + }, + "errors": [ + { + "target": "com.amazonaws.inspector2#AccessDeniedException" + }, + { + "target": "com.amazonaws.inspector2#ConflictException" + }, + { + "target": "com.amazonaws.inspector2#InternalServerException" + }, + { + "target": "com.amazonaws.inspector2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.inspector2#ThrottlingException" + }, + { + "target": "com.amazonaws.inspector2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Disables the Amazon Inspector delegated administrator for your organization.
", + "smithy.api#http": { + "method": "POST", + "uri": "/delegatedadminaccounts/disable", + "code": 200 + } + } + }, + "com.amazonaws.inspector2#DisableDelegatedAdminAccountRequest": { + "type": "structure", + "members": { + "delegatedAdminAccountId": { + "target": "com.amazonaws.inspector2#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the current Amazon Inspector delegated administrator.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.inspector2#DisableDelegatedAdminAccountResponse": { + "type": "structure", + "members": { + "delegatedAdminAccountId": { + "target": "com.amazonaws.inspector2#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the successfully disabled delegated administrator.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.inspector2#DisableRequest": { + "type": "structure", + "members": { + "accountIds": { + "target": "com.amazonaws.inspector2#AccountIdSet", + "traits": { + "smithy.api#documentation": "An array of account IDs you want to disable Amazon Inspector scans for.
" + } + }, + "resourceTypes": { + "target": "com.amazonaws.inspector2#DisableResourceTypeList", + "traits": { + "smithy.api#documentation": "The resource scan types you want to disable.
" + } + } + } + }, + "com.amazonaws.inspector2#DisableResourceTypeList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#ResourceScanType" + }, + "traits": { + "smithy.api#length": { + "max": 2 + } + } + }, + "com.amazonaws.inspector2#DisableResponse": { + "type": "structure", + "members": { + "accounts": { + "target": "com.amazonaws.inspector2#AccountList", + "traits": { + "smithy.api#documentation": "Information on the accounts that have had Amazon Inspector scans successfully disabled. Details are\n provided for each account.
", + "smithy.api#required": {} + } + }, + "failedAccounts": { + "target": "com.amazonaws.inspector2#FailedAccountList", + "traits": { + "smithy.api#documentation": "Information on any accounts for which Amazon Inspector scans could not be disabled. Details are\n provided for each account.
" + } + } + } + }, + "com.amazonaws.inspector2#DisassociateMember": { + "type": "operation", + "input": { + "target": "com.amazonaws.inspector2#DisassociateMemberRequest" + }, + "output": { + "target": "com.amazonaws.inspector2#DisassociateMemberResponse" + }, + "errors": [ + { + "target": "com.amazonaws.inspector2#AccessDeniedException" + }, + { + "target": "com.amazonaws.inspector2#InternalServerException" + }, + { + "target": "com.amazonaws.inspector2#ThrottlingException" + }, + { + "target": "com.amazonaws.inspector2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Disassociates a member account from an Amazon Inspector delegated administrator.
", + "smithy.api#http": { + "method": "POST", + "uri": "/members/disassociate", + "code": 200 + } + } + }, + "com.amazonaws.inspector2#DisassociateMemberRequest": { + "type": "structure", + "members": { + "accountId": { + "target": "com.amazonaws.inspector2#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the member account to disassociate.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.inspector2#DisassociateMemberResponse": { + "type": "structure", + "members": { + "accountId": { + "target": "com.amazonaws.inspector2#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the successfully disassociated member.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.inspector2#Ec2InstanceAggregation": { + "type": "structure", + "members": { + "amis": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "The AMI IDs associated with the Amazon EC2 instances to aggregate findings for.
" + } + }, + "operatingSystems": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "The operating system types to aggregate findings for. Valid values must be uppercase and\n underscore separated, examples are ORACLE_LINUX_7
and\n ALPINE_LINUX_3_8
.
The Amazon EC2 instance IDs to aggregate findings for.
" + } + }, + "instanceTags": { + "target": "com.amazonaws.inspector2#MapFilterList", + "traits": { + "smithy.api#documentation": "The Amazon EC2 instance tags to aggregate findings for.
" + } + }, + "sortOrder": { + "target": "com.amazonaws.inspector2#SortOrder", + "traits": { + "smithy.api#documentation": "The order to sort results by.
" + } + }, + "sortBy": { + "target": "com.amazonaws.inspector2#Ec2InstanceSortBy", + "traits": { + "smithy.api#documentation": "The value to sort results by.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The details that define an aggregation based on Amazon EC2 instances.
" + } + }, + "com.amazonaws.inspector2#Ec2InstanceAggregationResponse": { + "type": "structure", + "members": { + "instanceId": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The Amazon EC2 instance ID.
", + "smithy.api#required": {} + } + }, + "ami": { + "target": "com.amazonaws.inspector2#AmiId", + "traits": { + "smithy.api#documentation": "The Amazon Machine Image (AMI) of the Amazon EC2 instance.
" + } + }, + "operatingSystem": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The operating system of the Amazon EC2 instance.
" + } + }, + "instanceTags": { + "target": "com.amazonaws.inspector2#TagMap", + "traits": { + "smithy.api#documentation": "The tags attached to the instance.
" + } + }, + "accountId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account the Amazon EC2 instance belongs to.
" + } + }, + "severityCounts": { + "target": "com.amazonaws.inspector2#SeverityCounts", + "traits": { + "smithy.api#documentation": "An object that contains the count of matched findings per severity.
" + } + }, + "networkFindings": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#documentation": "The number of network findings for the Amazon EC2 instance.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A response that contains the results of a finding aggregation by Amazon EC2 instance.
" + } + }, + "com.amazonaws.inspector2#Ec2InstanceSortBy": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "NETWORK_FINDINGS", + "name": "NETWORK_FINDINGS" + }, + { + "value": "CRITICAL", + "name": "CRITICAL" + }, + { + "value": "HIGH", + "name": "HIGH" + }, + { + "value": "ALL", + "name": "ALL" + } + ] + } + }, + "com.amazonaws.inspector2#Ec2Metadata": { + "type": "structure", + "members": { + "tags": { + "target": "com.amazonaws.inspector2#TagMap", + "traits": { + "smithy.api#documentation": "The tags attached to the instance.
" + } + }, + "amiId": { + "target": "com.amazonaws.inspector2#AmiId", + "traits": { + "smithy.api#documentation": "The ID of the Amazon Machine Image (AMI) used to launch the instance.
" + } + }, + "platform": { + "target": "com.amazonaws.inspector2#Ec2Platform", + "traits": { + "smithy.api#documentation": "The platform of the instance.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Meta data details of an Amazon EC2 instance.
" + } + }, + "com.amazonaws.inspector2#Ec2Platform": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "WINDOWS", + "name": "WINDOWS" + }, + { + "value": "LINUX", + "name": "LINUX" + }, + { + "value": "UNKNOWN", + "name": "UNKNOWN" + } + ] + } + }, + "com.amazonaws.inspector2#EcrContainerImageMetadata": { + "type": "structure", + "members": { + "tags": { + "target": "com.amazonaws.inspector2#TagList", + "traits": { + "smithy.api#documentation": "Tags associated with the Amazon ECR image metadata.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Information on the Amazon ECR image metadata associated with a finding.
" + } + }, + "com.amazonaws.inspector2#EcrRepositoryMetadata": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the Amazon ECR repository.
" + } + }, + "scanFrequency": { + "target": "com.amazonaws.inspector2#EcrScanFrequency", + "traits": { + "smithy.api#documentation": "The frequency of scans.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Information on the Amazon ECR repository metadata associated with a finding.
" + } + }, + "com.amazonaws.inspector2#EcrScanFrequency": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "MANUAL", + "name": "MANUAL" + }, + { + "value": "SCAN_ON_PUSH", + "name": "SCAN_ON_PUSH" + }, + { + "value": "CONTINUOUS_SCAN", + "name": "CONTINUOUS_SCAN" + } + ] + } + }, + "com.amazonaws.inspector2#Enable": { + "type": "operation", + "input": { + "target": "com.amazonaws.inspector2#EnableRequest" + }, + "output": { + "target": "com.amazonaws.inspector2#EnableResponse" + }, + "errors": [ + { + "target": "com.amazonaws.inspector2#AccessDeniedException" + }, + { + "target": "com.amazonaws.inspector2#InternalServerException" + }, + { + "target": "com.amazonaws.inspector2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.inspector2#ThrottlingException" + }, + { + "target": "com.amazonaws.inspector2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Enables Amazon Inspector scans for one or more Amazon Web Services accounts.
", + "smithy.api#http": { + "method": "POST", + "uri": "/enable", + "code": 200 + } + } + }, + "com.amazonaws.inspector2#EnableDelegatedAdminAccount": { + "type": "operation", + "input": { + "target": "com.amazonaws.inspector2#EnableDelegatedAdminAccountRequest" + }, + "output": { + "target": "com.amazonaws.inspector2#EnableDelegatedAdminAccountResponse" + }, + "errors": [ + { + "target": "com.amazonaws.inspector2#AccessDeniedException" + }, + { + "target": "com.amazonaws.inspector2#ConflictException" + }, + { + "target": "com.amazonaws.inspector2#InternalServerException" + }, + { + "target": "com.amazonaws.inspector2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.inspector2#ThrottlingException" + }, + { + "target": "com.amazonaws.inspector2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Enables the Amazon Inspector delegated administrator for your Organizations organization.
", + "smithy.api#http": { + "method": "POST", + "uri": "/delegatedadminaccounts/enable", + "code": 200 + } + } + }, + "com.amazonaws.inspector2#EnableDelegatedAdminAccountRequest": { + "type": "structure", + "members": { + "delegatedAdminAccountId": { + "target": "com.amazonaws.inspector2#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the Amazon Inspector delegated administrator.
", + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "com.amazonaws.inspector2#ClientToken", + "traits": { + "smithy.api#documentation": "The idempotency token for the request.
", + "smithy.api#idempotencyToken": {} + } + } + } + }, + "com.amazonaws.inspector2#EnableDelegatedAdminAccountResponse": { + "type": "structure", + "members": { + "delegatedAdminAccountId": { + "target": "com.amazonaws.inspector2#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the successfully Amazon Inspector delegated administrator.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.inspector2#EnableRequest": { + "type": "structure", + "members": { + "accountIds": { + "target": "com.amazonaws.inspector2#AccountIdSet", + "traits": { + "smithy.api#documentation": "A list of account IDs you want to enable Amazon Inspector scans for.
" + } + }, + "resourceTypes": { + "target": "com.amazonaws.inspector2#EnableResourceTypeList", + "traits": { + "smithy.api#documentation": "The resource scan types you want to enable.
", + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "com.amazonaws.inspector2#ClientToken", + "traits": { + "smithy.api#documentation": "The idempotency token for the request.
", + "smithy.api#idempotencyToken": {} + } + } + } + }, + "com.amazonaws.inspector2#EnableResourceTypeList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#ResourceScanType" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2 + } + } + }, + "com.amazonaws.inspector2#EnableResponse": { + "type": "structure", + "members": { + "accounts": { + "target": "com.amazonaws.inspector2#AccountList", + "traits": { + "smithy.api#documentation": "Information on the accounts that have had Amazon Inspector scans successfully enabled. Details are\n provided for each account.
", + "smithy.api#required": {} + } + }, + "failedAccounts": { + "target": "com.amazonaws.inspector2#FailedAccountList", + "traits": { + "smithy.api#documentation": "Information on any accounts for which Amazon Inspector scans could not be enabled. Details are\n provided for each account.
" + } + } + } + }, + "com.amazonaws.inspector2#ErrorCode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ALREADY_ENABLED", + "name": "ALREADY_ENABLED" + }, + { + "value": "ENABLE_IN_PROGRESS", + "name": "ENABLE_IN_PROGRESS" + }, + { + "value": "DISABLE_IN_PROGRESS", + "name": "DISABLE_IN_PROGRESS" + }, + { + "value": "SUSPEND_IN_PROGRESS", + "name": "SUSPEND_IN_PROGRESS" + }, + { + "value": "RESOURCE_NOT_FOUND", + "name": "RESOURCE_NOT_FOUND" + }, + { + "value": "ACCESS_DENIED", + "name": "ACCESS_DENIED" + }, + { + "value": "INTERNAL_ERROR", + "name": "INTERNAL_ERROR" + }, + { + "value": "SSM_UNAVAILABLE", + "name": "SSM_UNAVAILABLE" + }, + { + "value": "SSM_THROTTLED", + "name": "SSM_THROTTLED" + }, + { + "value": "EVENTBRIDGE_UNAVAILABLE", + "name": "EVENTBRIDGE_UNAVAILABLE" + }, + { + "value": "EVENTBRIDGE_THROTTLED", + "name": "EVENTBRIDGE_THROTTLED" + }, + { + "value": "RESOURCE_SCAN_NOT_DISABLED", + "name": "RESOURCE_SCAN_NOT_DISABLED" + }, + { + "value": "DISASSOCIATE_ALL_MEMBERS", + "name": "DISASSOCIATE_ALL_MEMBERS" + } + ] + } + }, + "com.amazonaws.inspector2#ErrorMessage": { + "type": "string" + }, + "com.amazonaws.inspector2#ExternalReportStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "SUCCEEDED", + "name": "SUCCEEDED" + }, + { + "value": "IN_PROGRESS", + "name": "IN_PROGRESS" + }, + { + "value": "CANCELLED", + "name": "CANCELLED" + }, + { + "value": "FAILED", + "name": "FAILED" + } + ] + } + }, + "com.amazonaws.inspector2#FailedAccount": { + "type": "structure", + "members": { + "accountId": { + "target": "com.amazonaws.inspector2#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID.
", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.inspector2#Status", + "traits": { + "smithy.api#documentation": "The status of Amazon Inspector for the account.
" + } + }, + "resourceStatus": { + "target": "com.amazonaws.inspector2#ResourceStatus", + "traits": { + "smithy.api#documentation": "An object detailing which resources Amazon Inspector is enabled to scan for the account.
" + } + }, + "errorCode": { + "target": "com.amazonaws.inspector2#ErrorCode", + "traits": { + "smithy.api#documentation": "The error code explaining why the account failed to enable Amazon Inspector.
", + "smithy.api#required": {} + } + }, + "errorMessage": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The error message received when the account failed to enable Amazon Inspector.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "An object with details on why an account failed to enable Amazon Inspector.
" + } + }, + "com.amazonaws.inspector2#FailedAccountList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#FailedAccount" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, + "com.amazonaws.inspector2#FilePath": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + } + } + }, + "com.amazonaws.inspector2#Filter": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.inspector2#FilterArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Number (ARN) associated with this filter.
", + "smithy.api#required": {} + } + }, + "ownerId": { + "target": "com.amazonaws.inspector2#OwnerId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the account that created the filter.
", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.inspector2#FilterName", + "traits": { + "smithy.api#documentation": "The name of the filter.
", + "smithy.api#required": {} + } + }, + "criteria": { + "target": "com.amazonaws.inspector2#FilterCriteria", + "traits": { + "smithy.api#documentation": "Details on the filter criteria associated with this filter.
", + "smithy.api#required": {} + } + }, + "action": { + "target": "com.amazonaws.inspector2#FilterAction", + "traits": { + "smithy.api#documentation": "The action that is to be applied to the findings that match the filter.
", + "smithy.api#required": {} + } + }, + "createdAt": { + "target": "com.amazonaws.inspector2#DateTimeTimestamp", + "traits": { + "smithy.api#documentation": "The date and time this filter was created at.
", + "smithy.api#required": {} + } + }, + "updatedAt": { + "target": "com.amazonaws.inspector2#DateTimeTimestamp", + "traits": { + "smithy.api#documentation": "The date and time the filter was last updated at.
", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.inspector2#FilterDescription", + "traits": { + "smithy.api#documentation": "A description of the filter.
" + } + }, + "reason": { + "target": "com.amazonaws.inspector2#FilterReason", + "traits": { + "smithy.api#documentation": "The reason for the filter.
" + } + }, + "tags": { + "target": "com.amazonaws.inspector2#TagMap", + "traits": { + "smithy.api#documentation": "The tags attached to the filter.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Details about a filter.
" + } + }, + "com.amazonaws.inspector2#FilterAction": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "NONE", + "name": "NONE" + }, + { + "value": "SUPPRESS", + "name": "SUPPRESS" + } + ] + } + }, + "com.amazonaws.inspector2#FilterArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + } + } + }, + "com.amazonaws.inspector2#FilterArnList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#FilterArn" + } + }, + "com.amazonaws.inspector2#FilterCriteria": { + "type": "structure", + "members": { + "findingArn": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "Details on the finding ARNs used to filter findings.
" + } + }, + "awsAccountId": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "Details of the Amazon Web Services account IDs used to filter findings.
" + } + }, + "findingType": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "Details on the finding types used to filter findings.
" + } + }, + "severity": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "Details on the severity used to filter findings.
" + } + }, + "firstObservedAt": { + "target": "com.amazonaws.inspector2#DateFilterList", + "traits": { + "smithy.api#documentation": "Details on the date and time a finding was first seen used to filter findings.
" + } + }, + "lastObservedAt": { + "target": "com.amazonaws.inspector2#DateFilterList", + "traits": { + "smithy.api#documentation": "Details on the date and time a finding was last seen used to filter findings.
" + } + }, + "updatedAt": { + "target": "com.amazonaws.inspector2#DateFilterList", + "traits": { + "smithy.api#documentation": "Details on the date and time a finding was last updated at used to filter findings.
" + } + }, + "findingStatus": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "Details on the finding status types used to filter findings.
" + } + }, + "title": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "Details on the finding title used to filter findings.
" + } + }, + "inspectorScore": { + "target": "com.amazonaws.inspector2#NumberFilterList", + "traits": { + "smithy.api#documentation": "The Amazon Inspector score to filter on.
" + } + }, + "resourceType": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "Details on the resource types used to filter findings.
" + } + }, + "resourceId": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "Details on the resource IDs used to filter findings.
" + } + }, + "resourceTags": { + "target": "com.amazonaws.inspector2#MapFilterList", + "traits": { + "smithy.api#documentation": "Details on the resource tags used to filter findings.
" + } + }, + "ec2InstanceImageId": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "Details of the Amazon EC2 instance image IDs used to filter findings.
" + } + }, + "ec2InstanceVpcId": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "Details of the Amazon EC2 instance VPC IDs used to filter findings.
" + } + }, + "ec2InstanceSubnetId": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "Details of the Amazon EC2 instance subnet IDs used to filter findings.
" + } + }, + "ecrImagePushedAt": { + "target": "com.amazonaws.inspector2#DateFilterList", + "traits": { + "smithy.api#documentation": "Details on the Amazon ECR image push date and time used to filter findings.
" + } + }, + "ecrImageArchitecture": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "Details of the Amazon ECR image architecture types used to filter findings.
" + } + }, + "ecrImageRegistry": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "Details on the Amazon ECR registry used to filter findings.
" + } + }, + "ecrImageRepositoryName": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "Details on the name of the Amazon ECR repository used to filter findings.
" + } + }, + "ecrImageTags": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "The tags attached to the Amazon ECR container image.
" + } + }, + "ecrImageHash": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "Details of the Amazon ECR image hashes used to filter findings.
" + } + }, + "portRange": { + "target": "com.amazonaws.inspector2#PortRangeFilterList", + "traits": { + "smithy.api#documentation": "Details on the port ranges used to filter findings.
" + } + }, + "networkProtocol": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "Details on the ingress source addresses used to filter findings.
" + } + }, + "componentId": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "Details of the component IDs used to filter findings.
" + } + }, + "componentType": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "Details of the component types used to filter findings.
" + } + }, + "vulnerabilityId": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "Details on the vulnerability ID used to filter findings.
" + } + }, + "vulnerabilitySource": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "Details on the vulnerability type used to filter findings.
" + } + }, + "vendorSeverity": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "Details on the vendor severity used to filter findings.
" + } + }, + "vulnerablePackages": { + "target": "com.amazonaws.inspector2#PackageFilterList", + "traits": { + "smithy.api#documentation": "Details on the vulnerable packages used to filter findings.
" + } + }, + "relatedVulnerabilities": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "Details on the related vulnerabilities used to filter findings.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Details on the criteria used to define the filter.
" + } + }, + "com.amazonaws.inspector2#FilterDescription": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 512 + } + } + }, + "com.amazonaws.inspector2#FilterList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#Filter" + } + }, + "com.amazonaws.inspector2#FilterName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + } + } + }, + "com.amazonaws.inspector2#FilterReason": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 512 + } + } + }, + "com.amazonaws.inspector2#Finding": { + "type": "structure", + "members": { + "findingArn": { + "target": "com.amazonaws.inspector2#FindingArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Number (ARN) of the finding.
", + "smithy.api#required": {} + } + }, + "awsAccountId": { + "target": "com.amazonaws.inspector2#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID associated with the finding.
", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.amazonaws.inspector2#FindingType", + "traits": { + "smithy.api#documentation": "The type of the finding.
", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.inspector2#FindingDescription", + "traits": { + "smithy.api#documentation": "The description of the finding.
", + "smithy.api#required": {} + } + }, + "title": { + "target": "com.amazonaws.inspector2#FindingTitle", + "traits": { + "smithy.api#documentation": "The title of the finding.
" + } + }, + "remediation": { + "target": "com.amazonaws.inspector2#Remediation", + "traits": { + "smithy.api#documentation": "An object that contains the details about how to remediate a finding.
", + "smithy.api#required": {} + } + }, + "severity": { + "target": "com.amazonaws.inspector2#Severity", + "traits": { + "smithy.api#documentation": "The severity of the finding.
", + "smithy.api#required": {} + } + }, + "firstObservedAt": { + "target": "com.amazonaws.inspector2#DateTimeTimestamp", + "traits": { + "smithy.api#documentation": "The date and time that the finding was first observed.
", + "smithy.api#required": {} + } + }, + "lastObservedAt": { + "target": "com.amazonaws.inspector2#DateTimeTimestamp", + "traits": { + "smithy.api#documentation": "The date and time that the finding was last observed.
", + "smithy.api#required": {} + } + }, + "updatedAt": { + "target": "com.amazonaws.inspector2#DateTimeTimestamp", + "traits": { + "smithy.api#documentation": "The date and time the finding was last updated at.
" + } + }, + "status": { + "target": "com.amazonaws.inspector2#FindingStatus", + "traits": { + "smithy.api#documentation": "The status of the finding.
", + "smithy.api#required": {} + } + }, + "resources": { + "target": "com.amazonaws.inspector2#ResourceList", + "traits": { + "smithy.api#documentation": "Contains information on the resources involved in a finding.
", + "smithy.api#required": {} + } + }, + "inspectorScore": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "The Amazon Inspector score given to the finding.
" + } + }, + "inspectorScoreDetails": { + "target": "com.amazonaws.inspector2#InspectorScoreDetails", + "traits": { + "smithy.api#documentation": "An object that contains details of the Amazon Inspector score.
" + } + }, + "networkReachabilityDetails": { + "target": "com.amazonaws.inspector2#NetworkReachabilityDetails", + "traits": { + "smithy.api#documentation": "An object that contains the details of a network reachability finding.
" + } + }, + "packageVulnerabilityDetails": { + "target": "com.amazonaws.inspector2#PackageVulnerabilityDetails", + "traits": { + "smithy.api#documentation": "An object that contains the details of a package vulnerability finding.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Details about an Amazon Inspector finding.
" + } + }, + "com.amazonaws.inspector2#FindingArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + } + } + }, + "com.amazonaws.inspector2#FindingDescription": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + } + } + }, + "com.amazonaws.inspector2#FindingList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#Finding" + }, + "traits": { + "smithy.api#length": { + "max": 25 + } + } + }, + "com.amazonaws.inspector2#FindingStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ACTIVE", + "name": "ACTIVE" + }, + { + "value": "SUPPRESSED", + "name": "SUPPRESSED" + }, + { + "value": "CLOSED", + "name": "CLOSED" + } + ] + } + }, + "com.amazonaws.inspector2#FindingTitle": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + } + } + }, + "com.amazonaws.inspector2#FindingType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "NETWORK_REACHABILITY", + "name": "NETWORK_REACHABILITY" + }, + { + "value": "PACKAGE_VULNERABILITY", + "name": "PACKAGE_VULNERABILITY" + } + ] + } + }, + "com.amazonaws.inspector2#FindingTypeAggregation": { + "type": "structure", + "members": { + "findingType": { + "target": "com.amazonaws.inspector2#AggregationFindingType", + "traits": { + "smithy.api#documentation": "The finding type to aggregate.
" + } + }, + "resourceType": { + "target": "com.amazonaws.inspector2#AggregationResourceType", + "traits": { + "smithy.api#documentation": "The resource type to aggregate.
" + } + }, + "sortOrder": { + "target": "com.amazonaws.inspector2#SortOrder", + "traits": { + "smithy.api#documentation": "The order to sort results by.
" + } + }, + "sortBy": { + "target": "com.amazonaws.inspector2#FindingTypeSortBy", + "traits": { + "smithy.api#documentation": "The value to sort results by.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The details that define an aggregation based on finding type.
" + } + }, + "com.amazonaws.inspector2#FindingTypeAggregationResponse": { + "type": "structure", + "members": { + "accountId": { + "target": "com.amazonaws.inspector2#AccountId", + "traits": { + "smithy.api#documentation": "The ID of the Amazon Web Services account associated with the findings.
" + } + }, + "severityCounts": { + "target": "com.amazonaws.inspector2#SeverityCounts", + "traits": { + "smithy.api#documentation": "The value to sort results by.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A response that contains the results of a finding type aggregation.
" + } + }, + "com.amazonaws.inspector2#FindingTypeSortBy": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CRITICAL", + "name": "CRITICAL" + }, + { + "value": "HIGH", + "name": "HIGH" + }, + { + "value": "ALL", + "name": "ALL" + } + ] + } + }, + "com.amazonaws.inspector2#FreeTrialAccountInfo": { + "type": "structure", + "members": { + "accountId": { + "target": "com.amazonaws.inspector2#MeteringAccountId", + "traits": { + "smithy.api#documentation": "The account associated with the Amazon Inspector free trial information.
", + "smithy.api#required": {} + } + }, + "freeTrialInfo": { + "target": "com.amazonaws.inspector2#FreeTrialInfoList", + "traits": { + "smithy.api#documentation": "Contains information about the Amazon Inspector free trial for an account.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Information about the Amazon Inspector free trial for an account.
" + } + }, + "com.amazonaws.inspector2#FreeTrialAccountInfoList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#FreeTrialAccountInfo" + } + }, + "com.amazonaws.inspector2#FreeTrialInfo": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.inspector2#FreeTrialType", + "traits": { + "smithy.api#documentation": "The type of scan covered by the Amazon Inspector free trail.
", + "smithy.api#required": {} + } + }, + "start": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that the Amazon Inspector free trail started for a given account.
", + "smithy.api#required": {} + } + }, + "end": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The date and time that the Amazon Inspector free trail ends for a given account.
", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.inspector2#FreeTrialStatus", + "traits": { + "smithy.api#documentation": "The order to sort results by.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "An object that contains information about the Amazon Inspector free trial for an account.
" + } + }, + "com.amazonaws.inspector2#FreeTrialInfoError": { + "type": "structure", + "members": { + "accountId": { + "target": "com.amazonaws.inspector2#MeteringAccountId", + "traits": { + "smithy.api#documentation": "The account associated with the Amazon Inspector free trial information.
", + "smithy.api#required": {} + } + }, + "code": { + "target": "com.amazonaws.inspector2#FreeTrialInfoErrorCode", + "traits": { + "smithy.api#documentation": "The error code.
", + "smithy.api#required": {} + } + }, + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The error message returned.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Information about an error received while accessing free trail data for an account.
" + } + }, + "com.amazonaws.inspector2#FreeTrialInfoErrorCode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ACCESS_DENIED", + "name": "ACCESS_DENIED" + }, + { + "value": "INTERNAL_ERROR", + "name": "INTERNAL_ERROR" + } + ] + } + }, + "com.amazonaws.inspector2#FreeTrialInfoErrorList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#FreeTrialInfoError" + } + }, + "com.amazonaws.inspector2#FreeTrialInfoList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#FreeTrialInfo" + } + }, + "com.amazonaws.inspector2#FreeTrialStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ACTIVE", + "name": "ACTIVE" + }, + { + "value": "INACTIVE", + "name": "INACTIVE" + } + ] + } + }, + "com.amazonaws.inspector2#FreeTrialType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "EC2", + "name": "EC2" + }, + { + "value": "ECR", + "name": "ECR" + } + ] + } + }, + "com.amazonaws.inspector2#GetDelegatedAdminAccount": { + "type": "operation", + "input": { + "target": "com.amazonaws.inspector2#GetDelegatedAdminAccountRequest" + }, + "output": { + "target": "com.amazonaws.inspector2#GetDelegatedAdminAccountResponse" + }, + "errors": [ + { + "target": "com.amazonaws.inspector2#AccessDeniedException" + }, + { + "target": "com.amazonaws.inspector2#InternalServerException" + }, + { + "target": "com.amazonaws.inspector2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.inspector2#ThrottlingException" + }, + { + "target": "com.amazonaws.inspector2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Retrieves information about the Amazon Inspector delegated administrator for your\n organization.
", + "smithy.api#http": { + "method": "POST", + "uri": "/delegatedadminaccounts/get", + "code": 200 + } + } + }, + "com.amazonaws.inspector2#GetDelegatedAdminAccountRequest": { + "type": "structure", + "members": {} + }, + "com.amazonaws.inspector2#GetDelegatedAdminAccountResponse": { + "type": "structure", + "members": { + "delegatedAdmin": { + "target": "com.amazonaws.inspector2#DelegatedAdmin", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the Amazon Inspector delegated administrator.
" + } + } + } + }, + "com.amazonaws.inspector2#GetFindingsReportStatus": { + "type": "operation", + "input": { + "target": "com.amazonaws.inspector2#GetFindingsReportStatusRequest" + }, + "output": { + "target": "com.amazonaws.inspector2#GetFindingsReportStatusResponse" + }, + "errors": [ + { + "target": "com.amazonaws.inspector2#AccessDeniedException" + }, + { + "target": "com.amazonaws.inspector2#InternalServerException" + }, + { + "target": "com.amazonaws.inspector2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.inspector2#ThrottlingException" + }, + { + "target": "com.amazonaws.inspector2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Gets the status of a findings report.
", + "smithy.api#http": { + "method": "POST", + "uri": "/reporting/status/get", + "code": 200 + } + } + }, + "com.amazonaws.inspector2#GetFindingsReportStatusRequest": { + "type": "structure", + "members": { + "reportId": { + "target": "com.amazonaws.inspector2#ReportId", + "traits": { + "smithy.api#documentation": "The ID of the report to retrieve the status of.
" + } + } + } + }, + "com.amazonaws.inspector2#GetFindingsReportStatusResponse": { + "type": "structure", + "members": { + "reportId": { + "target": "com.amazonaws.inspector2#ReportId", + "traits": { + "smithy.api#documentation": "The ID of the report.
" + } + }, + "status": { + "target": "com.amazonaws.inspector2#ExternalReportStatus", + "traits": { + "smithy.api#documentation": "The status of the report.
" + } + }, + "errorCode": { + "target": "com.amazonaws.inspector2#ReportingErrorCode", + "traits": { + "smithy.api#documentation": "The error code of the report.
" + } + }, + "errorMessage": { + "target": "com.amazonaws.inspector2#ErrorMessage", + "traits": { + "smithy.api#documentation": "The error message of the report.
" + } + }, + "destination": { + "target": "com.amazonaws.inspector2#Destination", + "traits": { + "smithy.api#documentation": "The destination of the report.
" + } + }, + "filterCriteria": { + "target": "com.amazonaws.inspector2#FilterCriteria", + "traits": { + "smithy.api#documentation": "The filter criteria associated with the report.
" + } + } + } + }, + "com.amazonaws.inspector2#GetMember": { + "type": "operation", + "input": { + "target": "com.amazonaws.inspector2#GetMemberRequest" + }, + "output": { + "target": "com.amazonaws.inspector2#GetMemberResponse" + }, + "errors": [ + { + "target": "com.amazonaws.inspector2#AccessDeniedException" + }, + { + "target": "com.amazonaws.inspector2#InternalServerException" + }, + { + "target": "com.amazonaws.inspector2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.inspector2#ThrottlingException" + }, + { + "target": "com.amazonaws.inspector2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Gets member information for your organization.
", + "smithy.api#http": { + "method": "POST", + "uri": "/members/get", + "code": 200 + } + } + }, + "com.amazonaws.inspector2#GetMemberRequest": { + "type": "structure", + "members": { + "accountId": { + "target": "com.amazonaws.inspector2#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the member account to retrieve information on.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.inspector2#GetMemberResponse": { + "type": "structure", + "members": { + "member": { + "target": "com.amazonaws.inspector2#Member", + "traits": { + "smithy.api#documentation": "Details of the retrieved member account.
" + } + } + } + }, + "com.amazonaws.inspector2#GroupKey": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "SCAN_STATUS_CODE", + "name": "SCAN_STATUS_CODE" + }, + { + "value": "SCAN_STATUS_REASON", + "name": "SCAN_STATUS_REASON" + }, + { + "value": "ACCOUNT_ID", + "name": "ACCOUNT_ID" + }, + { + "value": "RESOURCE_TYPE", + "name": "RESOURCE_TYPE" + }, + { + "value": "ECR_REPOSITORY_NAME", + "name": "ECR_REPOSITORY_NAME" + } + ] + } + }, + "com.amazonaws.inspector2#ImageHash": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 71, + "max": 71 + }, + "smithy.api#pattern": "^sha256:[a-z0-9]{64}$" + } + }, + "com.amazonaws.inspector2#ImageLayerAggregation": { + "type": "structure", + "members": { + "repositories": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "The repository associated with the container image hosting the layers.
" + } + }, + "resourceIds": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "The ID of the container image layer.
" + } + }, + "layerHashes": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "The hashes associated with the layers.
" + } + }, + "sortOrder": { + "target": "com.amazonaws.inspector2#SortOrder", + "traits": { + "smithy.api#documentation": "The order to sort results by.
" + } + }, + "sortBy": { + "target": "com.amazonaws.inspector2#ImageLayerSortBy", + "traits": { + "smithy.api#documentation": "The value to sort results by.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The details that define an aggregation based on container image layers.
" + } + }, + "com.amazonaws.inspector2#ImageLayerAggregationResponse": { + "type": "structure", + "members": { + "repository": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The repository the layer resides in.
", + "smithy.api#required": {} + } + }, + "resourceId": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The resource ID of the container image layer.
", + "smithy.api#required": {} + } + }, + "layerHash": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The layer hash.
", + "smithy.api#required": {} + } + }, + "accountId": { + "target": "com.amazonaws.inspector2#AccountId", + "traits": { + "smithy.api#documentation": "The ID of the Amazon Web Services account that owns the container image hosting the layer image.
", + "smithy.api#required": {} + } + }, + "severityCounts": { + "target": "com.amazonaws.inspector2#SeverityCounts", + "traits": { + "smithy.api#documentation": "An object that represents the count of matched findings per severity.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A response that contains the results of a finding aggregation by image layer.
" + } + }, + "com.amazonaws.inspector2#ImageLayerSortBy": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CRITICAL", + "name": "CRITICAL" + }, + { + "value": "HIGH", + "name": "HIGH" + }, + { + "value": "ALL", + "name": "ALL" + } + ] + } + }, + "com.amazonaws.inspector2#ImageTagList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#NonEmptyString" + } + }, + "com.amazonaws.inspector2#Inspector2": { + "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "Inspector2", + "arnNamespace": "inspector2", + "cloudFormationName": "Inspector2", + "cloudTrailEventSource": "inspector2.amazon.aws", + "endpointPrefix": "inspector2" + }, + "aws.auth#sigv4": { + "name": "inspector2" + }, + "aws.protocols#restJson1": {}, + "smithy.api#cors": { + "additionalAllowedHeaders": [ + "*" + ] + }, + "smithy.api#documentation": "Amazon Inspector is a vulnerability discovery service that automates continuous scanning for\n security vulnerabilities within your Amazon EC2 and Amazon ECR environments.
", + "smithy.api#title": "Inspector2" + }, + "version": "2020-06-08", + "operations": [ + { + "target": "com.amazonaws.inspector2#AssociateMember" + }, + { + "target": "com.amazonaws.inspector2#BatchGetAccountStatus" + }, + { + "target": "com.amazonaws.inspector2#BatchGetFreeTrialInfo" + }, + { + "target": "com.amazonaws.inspector2#CancelFindingsReport" + }, + { + "target": "com.amazonaws.inspector2#CreateFilter" + }, + { + "target": "com.amazonaws.inspector2#CreateFindingsReport" + }, + { + "target": "com.amazonaws.inspector2#DeleteFilter" + }, + { + "target": "com.amazonaws.inspector2#DescribeOrganizationConfiguration" + }, + { + "target": "com.amazonaws.inspector2#Disable" + }, + { + "target": "com.amazonaws.inspector2#DisableDelegatedAdminAccount" + }, + { + "target": "com.amazonaws.inspector2#DisassociateMember" + }, + { + "target": "com.amazonaws.inspector2#Enable" + }, + { + "target": "com.amazonaws.inspector2#EnableDelegatedAdminAccount" + }, + { + "target": "com.amazonaws.inspector2#GetDelegatedAdminAccount" + }, + { + "target": "com.amazonaws.inspector2#GetFindingsReportStatus" + }, + { + "target": "com.amazonaws.inspector2#GetMember" + }, + { + "target": "com.amazonaws.inspector2#ListAccountPermissions" + }, + { + "target": "com.amazonaws.inspector2#ListCoverage" + }, + { + "target": "com.amazonaws.inspector2#ListCoverageStatistics" + }, + { + "target": "com.amazonaws.inspector2#ListDelegatedAdminAccounts" + }, + { + "target": "com.amazonaws.inspector2#ListFilters" + }, + { + "target": "com.amazonaws.inspector2#ListFindingAggregations" + }, + { + "target": "com.amazonaws.inspector2#ListFindings" + }, + { + "target": "com.amazonaws.inspector2#ListMembers" + }, + { + "target": "com.amazonaws.inspector2#ListTagsForResource" + }, + { + "target": "com.amazonaws.inspector2#ListUsageTotals" + }, + { + "target": "com.amazonaws.inspector2#TagResource" + }, + { + "target": "com.amazonaws.inspector2#UntagResource" + }, + { + "target": "com.amazonaws.inspector2#UpdateFilter" + }, + { + "target": "com.amazonaws.inspector2#UpdateOrganizationConfiguration" + } + ] + }, + "com.amazonaws.inspector2#InspectorScoreDetails": { + "type": "structure", + "members": { + "adjustedCvss": { + "target": "com.amazonaws.inspector2#CvssScoreDetails", + "traits": { + "smithy.api#documentation": "An object that contains details about the CVSS score given to a finding.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Information about the Amazon Inspector score given to a finding.
" + } + }, + "com.amazonaws.inspector2#InternalServerException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "retryAfterSeconds": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The number of seconds to wait before retrying the request.
", + "smithy.api#httpHeader": "Retry-After" + } + } + }, + "traits": { + "smithy.api#documentation": "The request has failed due to an internal failure of the Amazon Inspector service.
", + "smithy.api#error": "server", + "smithy.api#httpError": 500, + "smithy.api#retryable": {} + } + }, + "com.amazonaws.inspector2#IpV4Address": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 7, + "max": 15 + }, + "smithy.api#pattern": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$" + } + }, + "com.amazonaws.inspector2#IpV4AddressList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#IpV4Address" + } + }, + "com.amazonaws.inspector2#IpV6Address": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 47 + } + } + }, + "com.amazonaws.inspector2#IpV6AddressList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#IpV6Address" + } + }, + "com.amazonaws.inspector2#ListAccountPermissions": { + "type": "operation", + "input": { + "target": "com.amazonaws.inspector2#ListAccountPermissionsRequest" + }, + "output": { + "target": "com.amazonaws.inspector2#ListAccountPermissionsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.inspector2#AccessDeniedException" + }, + { + "target": "com.amazonaws.inspector2#InternalServerException" + }, + { + "target": "com.amazonaws.inspector2#ThrottlingException" + }, + { + "target": "com.amazonaws.inspector2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Lists the permissions an account has to configure Amazon Inspector.
", + "smithy.api#http": { + "method": "POST", + "uri": "/accountpermissions/list", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "permissions", + "pageSize": "maxResults" + } + } + }, + "com.amazonaws.inspector2#ListAccountPermissionsMaxResults": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 1024 + } + } + }, + "com.amazonaws.inspector2#ListAccountPermissionsRequest": { + "type": "structure", + "members": { + "service": { + "target": "com.amazonaws.inspector2#Service", + "traits": { + "smithy.api#documentation": "The service scan type to check permissions for.
" + } + }, + "maxResults": { + "target": "com.amazonaws.inspector2#ListAccountPermissionsMaxResults", + "traits": { + "smithy.api#documentation": "The maximum number of results to return in the response.
" + } + }, + "nextToken": { + "target": "com.amazonaws.inspector2#NextToken", + "traits": { + "smithy.api#documentation": "A token to use for paginating results that are returned in the response. Set the value\n of this parameter to null for the first request to a list action. For subsequent calls, use\n the NextToken
value returned from the previous request to continue listing\n results after the first page.
Contains details on the permissions an account has to configure Amazon Inspector.
", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.inspector2#NextToken", + "traits": { + "smithy.api#documentation": "A token to use for paginating results that are returned in the response. Set the value\n of this parameter to null for the first request to a list action. For subsequent calls, use\n the NextToken
value returned from the previous request to continue listing\n results after the first page.
Lists coverage details for you environment.
", + "smithy.api#http": { + "method": "POST", + "uri": "/coverage/list", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "coveredResources", + "pageSize": "maxResults" + } + } + }, + "com.amazonaws.inspector2#ListCoverageMaxResults": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 200 + } + } + }, + "com.amazonaws.inspector2#ListCoverageRequest": { + "type": "structure", + "members": { + "maxResults": { + "target": "com.amazonaws.inspector2#ListCoverageMaxResults", + "traits": { + "smithy.api#documentation": "The maximum number of results to return in the response.
" + } + }, + "nextToken": { + "target": "com.amazonaws.inspector2#NextToken", + "traits": { + "smithy.api#documentation": "A token to use for paginating results that are returned in the response. Set the value\n of this parameter to null for the first request to a list action. For subsequent calls, use\n the NextToken
value returned from the previous request to continue listing\n results after the first page.
An object that contains details on the filters to apply to the coverage data for your\n environment.
" + } + } + } + }, + "com.amazonaws.inspector2#ListCoverageResponse": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.inspector2#NextToken", + "traits": { + "smithy.api#documentation": "A token to use for paginating results that are returned in the response. Set the value\n of this parameter to null for the first request to a list action. For subsequent calls, use\n the NextToken
value returned from the previous request to continue listing\n results after the first page.
An object that contains details on the covered resources in your environment.
" + } + } + } + }, + "com.amazonaws.inspector2#ListCoverageStatistics": { + "type": "operation", + "input": { + "target": "com.amazonaws.inspector2#ListCoverageStatisticsRequest" + }, + "output": { + "target": "com.amazonaws.inspector2#ListCoverageStatisticsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.inspector2#InternalServerException" + }, + { + "target": "com.amazonaws.inspector2#ThrottlingException" + }, + { + "target": "com.amazonaws.inspector2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Lists Amazon Inspector coverage statistics for your environment.
", + "smithy.api#http": { + "method": "POST", + "uri": "/coverage/statistics/list", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "countsByGroup" + } + } + }, + "com.amazonaws.inspector2#ListCoverageStatisticsRequest": { + "type": "structure", + "members": { + "filterCriteria": { + "target": "com.amazonaws.inspector2#CoverageFilterCriteria", + "traits": { + "smithy.api#documentation": "An object that contains details on the filters to apply to the coverage data for your\n environment.
" + } + }, + "groupBy": { + "target": "com.amazonaws.inspector2#GroupKey", + "traits": { + "smithy.api#documentation": "The value to group the results by.
" + } + }, + "nextToken": { + "target": "com.amazonaws.inspector2#NextToken", + "traits": { + "smithy.api#documentation": "A token to use for paginating results that are returned in the response. Set the value\n of this parameter to null for the first request to a list action. For subsequent calls, use\n the NextToken
value returned from the previous request to continue listing\n results after the first page.
An array with the number for each group.
" + } + }, + "totalCounts": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#documentation": "The total number for all groups.
", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.inspector2#NextToken", + "traits": { + "smithy.api#documentation": "A token to use for paginating results that are returned in the response. Set the value\n of this parameter to null for the first request to a list action. For subsequent calls, use\n the NextToken
value returned from the previous request to continue listing\n results after the first page.
Lists information about the Amazon Inspector delegated administrator of your\n organization.
", + "smithy.api#http": { + "method": "POST", + "uri": "/delegatedadminaccounts/list", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "delegatedAdminAccounts", + "pageSize": "maxResults" + } + } + }, + "com.amazonaws.inspector2#ListDelegatedAdminAccountsRequest": { + "type": "structure", + "members": { + "maxResults": { + "target": "com.amazonaws.inspector2#ListDelegatedAdminMaxResults", + "traits": { + "smithy.api#documentation": "The maximum number of results to return in the response.
" + } + }, + "nextToken": { + "target": "com.amazonaws.inspector2#NextToken", + "traits": { + "smithy.api#documentation": "A token to use for paginating results that are returned in the response. Set the value\n of this parameter to null for the first request to a list action. For subsequent calls, use\n the NextToken
value returned from the previous request to continue listing\n results after the first page.
Details of the Amazon Inspector delegated administrator of your organization.
" + } + }, + "nextToken": { + "target": "com.amazonaws.inspector2#NextToken", + "traits": { + "smithy.api#documentation": "A token to use for paginating results that are returned in the response. Set the value\n of this parameter to null for the first request to a list action. For subsequent calls, use\n the NextToken
value returned from the previous request to continue listing\n results after the first page.
Lists the filters associated with your account.
", + "smithy.api#http": { + "method": "POST", + "uri": "/filters/list", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "filters", + "pageSize": "maxResults" + } + } + }, + "com.amazonaws.inspector2#ListFiltersRequest": { + "type": "structure", + "members": { + "arns": { + "target": "com.amazonaws.inspector2#FilterArnList", + "traits": { + "smithy.api#documentation": "The Amazon resource number (ARN) of the filter.
" + } + }, + "action": { + "target": "com.amazonaws.inspector2#FilterAction", + "traits": { + "smithy.api#documentation": "The action the filter applies to matched findings.
" + } + }, + "nextToken": { + "target": "com.amazonaws.inspector2#NextToken", + "traits": { + "smithy.api#documentation": "A token to use for paginating results that are returned in the response. Set the value\n of this parameter to null for the first request to a list action. For subsequent calls, use\n the NextToken
value returned from the previous request to continue listing\n results after the first page.
The maximum number of results to return in the response.
" + } + } + } + }, + "com.amazonaws.inspector2#ListFiltersResponse": { + "type": "structure", + "members": { + "filters": { + "target": "com.amazonaws.inspector2#FilterList", + "traits": { + "smithy.api#documentation": "Contains details on the filters associated with your account.
", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.inspector2#NextToken", + "traits": { + "smithy.api#documentation": "A token to use for paginating results that are returned in the response. Set the value\n of this parameter to null for the first request to a list action. For subsequent calls, use\n the NextToken
value returned from the previous request to continue listing\n results after the first page.
Lists aggregated finding data for your environment based on specific criteria.
", + "smithy.api#http": { + "method": "POST", + "uri": "/findings/aggregation/list", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "responses", + "pageSize": "maxResults" + } + } + }, + "com.amazonaws.inspector2#ListFindingAggregationsMaxResults": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.inspector2#ListFindingAggregationsRequest": { + "type": "structure", + "members": { + "aggregationType": { + "target": "com.amazonaws.inspector2#AggregationType", + "traits": { + "smithy.api#documentation": "The type of the aggregation request.
", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.inspector2#NextToken", + "traits": { + "smithy.api#documentation": "A token to use for paginating results that are returned in the response. Set the value\n of this parameter to null for the first request to a list action. For subsequent calls, use\n the NextToken
value returned from the previous request to continue listing\n results after the first page.
The maximum number of results to return in the response.
" + } + }, + "accountIds": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account IDs to retrieve finding aggregation data for.
" + } + }, + "aggregationRequest": { + "target": "com.amazonaws.inspector2#AggregationRequest", + "traits": { + "smithy.api#documentation": "Details of the aggregation request that is used to filter your aggregation results.
" + } + } + } + }, + "com.amazonaws.inspector2#ListFindingAggregationsResponse": { + "type": "structure", + "members": { + "aggregationType": { + "target": "com.amazonaws.inspector2#AggregationType", + "traits": { + "smithy.api#documentation": "The type of aggregation to perform.
", + "smithy.api#required": {} + } + }, + "responses": { + "target": "com.amazonaws.inspector2#AggregationResponseList", + "traits": { + "smithy.api#documentation": "Objects that contain the results of an aggregation operation.
" + } + }, + "nextToken": { + "target": "com.amazonaws.inspector2#NextToken", + "traits": { + "smithy.api#documentation": "A token to use for paginating results that are returned in the response. Set the value\n of this parameter to null for the first request to a list action. For subsequent calls, use\n the NextToken
value returned from the previous request to continue listing\n results after the first page.
Lists findings for your environment.
", + "smithy.api#http": { + "method": "POST", + "uri": "/findings/list", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "findings", + "pageSize": "maxResults" + } + } + }, + "com.amazonaws.inspector2#ListFindingsMaxResults": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.inspector2#ListFindingsRequest": { + "type": "structure", + "members": { + "maxResults": { + "target": "com.amazonaws.inspector2#ListFindingsMaxResults", + "traits": { + "smithy.api#documentation": "The maximum number of results to return in the response.
" + } + }, + "nextToken": { + "target": "com.amazonaws.inspector2#NextToken", + "traits": { + "smithy.api#documentation": "A token to use for paginating results that are returned in the response. Set the value\n of this parameter to null for the first request to a list action. For subsequent calls, use\n the NextToken
value returned from the previous request to continue listing\n results after the first page.
Details on the filters to apply to your finding results.
" + } + }, + "sortCriteria": { + "target": "com.amazonaws.inspector2#SortCriteria", + "traits": { + "smithy.api#documentation": "Details on the sort criteria to apply to your finding results.
" + } + } + } + }, + "com.amazonaws.inspector2#ListFindingsResponse": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.inspector2#NextToken", + "traits": { + "smithy.api#documentation": "A token to use for paginating results that are returned in the response. Set the value\n of this parameter to null for the first request to a list action. For subsequent calls, use\n the NextToken
value returned from the previous request to continue listing\n results after the first page.
Contains details on the findings in your environment.
" + } + } + } + }, + "com.amazonaws.inspector2#ListMembers": { + "type": "operation", + "input": { + "target": "com.amazonaws.inspector2#ListMembersRequest" + }, + "output": { + "target": "com.amazonaws.inspector2#ListMembersResponse" + }, + "errors": [ + { + "target": "com.amazonaws.inspector2#AccessDeniedException" + }, + { + "target": "com.amazonaws.inspector2#InternalServerException" + }, + { + "target": "com.amazonaws.inspector2#ThrottlingException" + }, + { + "target": "com.amazonaws.inspector2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "List members associated with the Amazon Inspector delegated administrator for your\n organization.
", + "smithy.api#http": { + "method": "POST", + "uri": "/members/list", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "members", + "pageSize": "maxResults" + } + } + }, + "com.amazonaws.inspector2#ListMembersMaxResults": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 50 + } + } + }, + "com.amazonaws.inspector2#ListMembersRequest": { + "type": "structure", + "members": { + "onlyAssociated": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Specifies whether to list only currently associated members if True
or to\n list all members within the organization if False
.
The maximum number of results to return in the response.
" + } + }, + "nextToken": { + "target": "com.amazonaws.inspector2#NextToken", + "traits": { + "smithy.api#documentation": "A token to use for paginating results that are returned in the response. Set the value\n of this parameter to null for the first request to a list action. For subsequent calls, use\n the NextToken
value returned from the previous request to continue listing\n results after the first page.
An object that contains details for each member account.
" + } + }, + "nextToken": { + "target": "com.amazonaws.inspector2#NextToken", + "traits": { + "smithy.api#documentation": "The pagination parameter to be used on the next list operation to retrieve more\n items.
" + } + } + } + }, + "com.amazonaws.inspector2#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.inspector2#ListTagsForResourceRequest" + }, + "output": { + "target": "com.amazonaws.inspector2#ListTagsForResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.inspector2#InternalServerException" + }, + { + "target": "com.amazonaws.inspector2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.inspector2#ThrottlingException" + }, + { + "target": "com.amazonaws.inspector2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Lists all tags attached to a given resource.
", + "smithy.api#http": { + "method": "GET", + "uri": "/tags/{resourceArn}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.inspector2#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.inspector2#Arn", + "traits": { + "smithy.api#documentation": "The Amazon resource number (ARN) of the resource to list tags of.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.inspector2#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "tags": { + "target": "com.amazonaws.inspector2#TagMap", + "traits": { + "smithy.api#documentation": "The tags associated with the resource.
" + } + } + } + }, + "com.amazonaws.inspector2#ListUsageTotals": { + "type": "operation", + "input": { + "target": "com.amazonaws.inspector2#ListUsageTotalsRequest" + }, + "output": { + "target": "com.amazonaws.inspector2#ListUsageTotalsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.inspector2#AccessDeniedException" + }, + { + "target": "com.amazonaws.inspector2#InternalServerException" + }, + { + "target": "com.amazonaws.inspector2#ThrottlingException" + }, + { + "target": "com.amazonaws.inspector2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Lists the Amazon Inspector usage totals over the last 30 days.
", + "smithy.api#http": { + "method": "POST", + "uri": "/usage/list", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "totals", + "pageSize": "maxResults" + } + } + }, + "com.amazonaws.inspector2#ListUsageTotalsMaxResults": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 500 + } + } + }, + "com.amazonaws.inspector2#ListUsageTotalsNextToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, + "com.amazonaws.inspector2#ListUsageTotalsRequest": { + "type": "structure", + "members": { + "maxResults": { + "target": "com.amazonaws.inspector2#ListUsageTotalsMaxResults", + "traits": { + "smithy.api#documentation": "The maximum number of results to return in the response.
" + } + }, + "nextToken": { + "target": "com.amazonaws.inspector2#ListUsageTotalsNextToken", + "traits": { + "smithy.api#documentation": "A token to use for paginating results that are returned in the response. Set the value\n of this parameter to null for the first request to a list action. For subsequent calls, use\n the NextToken
value returned from the previous request to continue listing\n results after the first page.
The Amazon Web Services account IDs to retrieve usage totals for.
" + } + } + } + }, + "com.amazonaws.inspector2#ListUsageTotalsResponse": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.inspector2#ListUsageTotalsNextToken", + "traits": { + "smithy.api#documentation": "The pagination parameter to be used on the next list operation to retrieve more items.
" + } + }, + "totals": { + "target": "com.amazonaws.inspector2#UsageTotalList", + "traits": { + "smithy.api#documentation": "An object with details on the total usage for the requested account.
" + } + } + } + }, + "com.amazonaws.inspector2#MapComparison": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "EQUALS", + "name": "EQUALS" + } + ] + } + }, + "com.amazonaws.inspector2#MapFilter": { + "type": "structure", + "members": { + "comparison": { + "target": "com.amazonaws.inspector2#MapComparison", + "traits": { + "smithy.api#documentation": "The operator to use when comparing values in the filter.
", + "smithy.api#required": {} + } + }, + "key": { + "target": "com.amazonaws.inspector2#MapKey", + "traits": { + "smithy.api#documentation": "The tag key used in the filter.
", + "smithy.api#required": {} + } + }, + "value": { + "target": "com.amazonaws.inspector2#MapValue", + "traits": { + "smithy.api#documentation": "The tag value used in the filter.
" + } + } + }, + "traits": { + "smithy.api#documentation": "An object that describes details of a map filter.
" + } + }, + "com.amazonaws.inspector2#MapFilterList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#MapFilter" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + } + } + }, + "com.amazonaws.inspector2#MapKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + } + } + }, + "com.amazonaws.inspector2#MapValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 256 + } + } + }, + "com.amazonaws.inspector2#Member": { + "type": "structure", + "members": { + "accountId": { + "target": "com.amazonaws.inspector2#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the member account.
" + } + }, + "relationshipStatus": { + "target": "com.amazonaws.inspector2#RelationshipStatus", + "traits": { + "smithy.api#documentation": "The status of the member account.
" + } + }, + "delegatedAdminAccountId": { + "target": "com.amazonaws.inspector2#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the Amazon Inspector delegated administrator for this member account.
" + } + }, + "updatedAt": { + "target": "com.amazonaws.inspector2#DateTimeTimestamp", + "traits": { + "smithy.api#documentation": "A timestamp showing when the status of this member was last updated.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Details on a member account in your organization.
" + } + }, + "com.amazonaws.inspector2#MemberList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#Member" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "com.amazonaws.inspector2#MeteringAccountId": { + "type": "string", + "traits": { + "smithy.api#pattern": "[0-9]{12}" + } + }, + "com.amazonaws.inspector2#MeteringAccountIdList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#MeteringAccountId" + } + }, + "com.amazonaws.inspector2#MonthlyCostEstimate": { + "type": "double", + "traits": { + "smithy.api#range": { + "min": 0 + } + } + }, + "com.amazonaws.inspector2#NetworkPath": { + "type": "structure", + "members": { + "steps": { + "target": "com.amazonaws.inspector2#StepList", + "traits": { + "smithy.api#documentation": "The details on the steps in the network path.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Information on the network path associated with a finding.
" + } + }, + "com.amazonaws.inspector2#NetworkProtocol": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "TCP", + "name": "TCP" + }, + { + "value": "UDP", + "name": "UDP" + } + ] + } + }, + "com.amazonaws.inspector2#NetworkReachabilityDetails": { + "type": "structure", + "members": { + "openPortRange": { + "target": "com.amazonaws.inspector2#PortRange", + "traits": { + "smithy.api#documentation": "An object that contains details about the open port range associated with a finding.
", + "smithy.api#required": {} + } + }, + "protocol": { + "target": "com.amazonaws.inspector2#NetworkProtocol", + "traits": { + "smithy.api#documentation": "The protocol associated with a finding.
", + "smithy.api#required": {} + } + }, + "networkPath": { + "target": "com.amazonaws.inspector2#NetworkPath", + "traits": { + "smithy.api#documentation": "An object that contains details about a network path associated with a finding.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Contains the details of a network reachability finding.
" + } + }, + "com.amazonaws.inspector2#NextToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 1000000 + } + } + }, + "com.amazonaws.inspector2#NonEmptyString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, + "com.amazonaws.inspector2#NonEmptyStringList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#NonEmptyString" + } + }, + "com.amazonaws.inspector2#NumberFilter": { + "type": "structure", + "members": { + "upperInclusive": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "The highest number to be included in the filter.
" + } + }, + "lowerInclusive": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "The lowest number to be included in the filter.
" + } + } + }, + "traits": { + "smithy.api#documentation": "An object that describes the details of a number filter.
" + } + }, + "com.amazonaws.inspector2#NumberFilterList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#NumberFilter" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + } + } + }, + "com.amazonaws.inspector2#Operation": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ENABLE_SCANNING", + "name": "ENABLE_SCANNING" + }, + { + "value": "DISABLE_SCANNING", + "name": "DISABLE_SCANNING" + }, + { + "value": "ENABLE_REPOSITORY", + "name": "ENABLE_REPOSITORY" + }, + { + "value": "DISABLE_REPOSITORY", + "name": "DISABLE_REPOSITORY" + } + ] + } + }, + "com.amazonaws.inspector2#OwnerId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 12, + "max": 34 + }, + "smithy.api#pattern": "(^\\d{12}$)|(^o-[a-z0-9]{10,32}$)" + } + }, + "com.amazonaws.inspector2#PackageAggregation": { + "type": "structure", + "members": { + "packageNames": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "The names of packages to aggregate findings on.
" + } + }, + "sortOrder": { + "target": "com.amazonaws.inspector2#SortOrder", + "traits": { + "smithy.api#documentation": "The order to sort results by.
" + } + }, + "sortBy": { + "target": "com.amazonaws.inspector2#PackageSortBy", + "traits": { + "smithy.api#documentation": "The value to sort results by.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The details that define an aggregation based on operating system package type.
" + } + }, + "com.amazonaws.inspector2#PackageAggregationResponse": { + "type": "structure", + "members": { + "packageName": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The name of the operating system package.
", + "smithy.api#required": {} + } + }, + "accountId": { + "target": "com.amazonaws.inspector2#AccountId", + "traits": { + "smithy.api#documentation": "The ID of the Amazon Web Services account associated with the findings.
" + } + }, + "severityCounts": { + "target": "com.amazonaws.inspector2#SeverityCounts", + "traits": { + "smithy.api#documentation": "An object that contains the count of matched findings per severity.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A response that contains the results of a finding aggregation by image layer.
" + } + }, + "com.amazonaws.inspector2#PackageArchitecture": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + } + } + }, + "com.amazonaws.inspector2#PackageEpoch": { + "type": "integer" + }, + "com.amazonaws.inspector2#PackageFilter": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.inspector2#StringFilter", + "traits": { + "smithy.api#documentation": "An object that contains details on the name of the package to filter on.
" + } + }, + "version": { + "target": "com.amazonaws.inspector2#StringFilter", + "traits": { + "smithy.api#documentation": "The package version to filter on.
" + } + }, + "epoch": { + "target": "com.amazonaws.inspector2#NumberFilter", + "traits": { + "smithy.api#documentation": "An object that contains details on the package epoch to filter on.
" + } + }, + "release": { + "target": "com.amazonaws.inspector2#StringFilter", + "traits": { + "smithy.api#documentation": "An object that contains details on the package release to filter on.
" + } + }, + "architecture": { + "target": "com.amazonaws.inspector2#StringFilter", + "traits": { + "smithy.api#documentation": "An object that contains details on the package architecture type to filter on.
" + } + }, + "sourceLayerHash": { + "target": "com.amazonaws.inspector2#StringFilter", + "traits": { + "smithy.api#documentation": "An object that contains details on the source layer hash to filter on.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Contains information on the details of a package filter.
" + } + }, + "com.amazonaws.inspector2#PackageFilterList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#PackageFilter" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + } + } + }, + "com.amazonaws.inspector2#PackageManager": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "BUNDLER", + "name": "BUNDLER" + }, + { + "value": "CARGO", + "name": "CARGO" + }, + { + "value": "COMPOSER", + "name": "COMPOSER" + }, + { + "value": "NPM", + "name": "NPM" + }, + { + "value": "NUGET", + "name": "NUGET" + }, + { + "value": "PIPENV", + "name": "PIPENV" + }, + { + "value": "POETRY", + "name": "POETRY" + }, + { + "value": "YARN", + "name": "YARN" + }, + { + "value": "GOBINARY", + "name": "GOBINARY" + }, + { + "value": "GOMOD", + "name": "GOMOD" + }, + { + "value": "JAR", + "name": "JAR" + }, + { + "value": "OS", + "name": "OS" + } + ] + } + }, + "com.amazonaws.inspector2#PackageName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + } + } + }, + "com.amazonaws.inspector2#PackageRelease": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + } + } + }, + "com.amazonaws.inspector2#PackageSortBy": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CRITICAL", + "name": "CRITICAL" + }, + { + "value": "HIGH", + "name": "HIGH" + }, + { + "value": "ALL", + "name": "ALL" + } + ] + } + }, + "com.amazonaws.inspector2#PackageVersion": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + } + } + }, + "com.amazonaws.inspector2#PackageVulnerabilityDetails": { + "type": "structure", + "members": { + "vulnerabilityId": { + "target": "com.amazonaws.inspector2#VulnerabilityId", + "traits": { + "smithy.api#documentation": "The ID given to this vulnerability.
", + "smithy.api#required": {} + } + }, + "vulnerablePackages": { + "target": "com.amazonaws.inspector2#VulnerablePackageList", + "traits": { + "smithy.api#documentation": "The packages impacted by this vulnerability.
", + "smithy.api#required": {} + } + }, + "source": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The source of the vulnerability information.
", + "smithy.api#required": {} + } + }, + "cvss": { + "target": "com.amazonaws.inspector2#CvssScoreList", + "traits": { + "smithy.api#documentation": "An object that contains details about the CVSS score of a finding.
" + } + }, + "relatedVulnerabilities": { + "target": "com.amazonaws.inspector2#VulnerabilityIdList", + "traits": { + "smithy.api#documentation": "One or more vulnerabilities related to the one identified in this finding.
" + } + }, + "sourceUrl": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "A URL to the source of the vulnerability information.
" + } + }, + "vendorSeverity": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The severity the vendor has given to this vulnerability type.
" + } + }, + "vendorCreatedAt": { + "target": "com.amazonaws.inspector2#DateTimeTimestamp", + "traits": { + "smithy.api#documentation": "The date and time that this vulnerability was first added to the vendor's database.
" + } + }, + "vendorUpdatedAt": { + "target": "com.amazonaws.inspector2#DateTimeTimestamp", + "traits": { + "smithy.api#documentation": "The date and time the vendor last updated this vulnerability in their database.
" + } + }, + "referenceUrls": { + "target": "com.amazonaws.inspector2#NonEmptyStringList", + "traits": { + "smithy.api#documentation": "One or more URLs that contain details about this vulnerability type.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Information about a package vulnerability finding.
" + } + }, + "com.amazonaws.inspector2#Permission": { + "type": "structure", + "members": { + "service": { + "target": "com.amazonaws.inspector2#Service", + "traits": { + "smithy.api#documentation": "The services that the permissions allow an account to perform the given operations for.
", + "smithy.api#required": {} + } + }, + "operation": { + "target": "com.amazonaws.inspector2#Operation", + "traits": { + "smithy.api#documentation": "The operations that can be performed with the given permissions.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Contains information on the permissions an account has within Amazon Inspector.
" + } + }, + "com.amazonaws.inspector2#Permissions": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#Permission" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + } + } + }, + "com.amazonaws.inspector2#Platform": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + } + } + }, + "com.amazonaws.inspector2#Port": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 0, + "max": 65535 + } + } + }, + "com.amazonaws.inspector2#PortRange": { + "type": "structure", + "members": { + "begin": { + "target": "com.amazonaws.inspector2#Port", + "traits": { + "smithy.api#documentation": "The beginning port in a port range.
", + "smithy.api#required": {} + } + }, + "end": { + "target": "com.amazonaws.inspector2#Port", + "traits": { + "smithy.api#documentation": "The ending port in a port range.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Details about the port range associated with a finding.
" + } + }, + "com.amazonaws.inspector2#PortRangeFilter": { + "type": "structure", + "members": { + "beginInclusive": { + "target": "com.amazonaws.inspector2#Port", + "traits": { + "smithy.api#documentation": "The port number the port range begins at.
" + } + }, + "endInclusive": { + "target": "com.amazonaws.inspector2#Port", + "traits": { + "smithy.api#documentation": "The port number the port range ends at.
" + } + } + }, + "traits": { + "smithy.api#documentation": "An object that describes the details of a port range filter.
" + } + }, + "com.amazonaws.inspector2#PortRangeFilterList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#PortRangeFilter" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + } + } + }, + "com.amazonaws.inspector2#Recommendation": { + "type": "structure", + "members": { + "text": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The recommended course of action to remediate the finding.
" + } + }, + "Url": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The URL address to the CVE remediation recommendations.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Details about the recommended course of action to remediate the finding.
" + } + }, + "com.amazonaws.inspector2#RelationshipStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CREATED", + "name": "CREATED" + }, + { + "value": "INVITED", + "name": "INVITED" + }, + { + "value": "DISABLED", + "name": "DISABLED" + }, + { + "value": "ENABLED", + "name": "ENABLED" + }, + { + "value": "REMOVED", + "name": "REMOVED" + }, + { + "value": "RESIGNED", + "name": "RESIGNED" + }, + { + "value": "DELETED", + "name": "DELETED" + }, + { + "value": "EMAIL_VERIFICATION_IN_PROGRESS", + "name": "EMAIL_VERIFICATION_IN_PROGRESS" + }, + { + "value": "EMAIL_VERIFICATION_FAILED", + "name": "EMAIL_VERIFICATION_FAILED" + }, + { + "value": "REGION_DISABLED", + "name": "REGION_DISABLED" + }, + { + "value": "ACCOUNT_SUSPENDED", + "name": "ACCOUNT_SUSPENDED" + }, + { + "value": "CANNOT_CREATE_DETECTOR_IN_ORG_MASTER", + "name": "CANNOT_CREATE_DETECTOR_IN_ORG_MASTER" + } + ] + } + }, + "com.amazonaws.inspector2#Remediation": { + "type": "structure", + "members": { + "recommendation": { + "target": "com.amazonaws.inspector2#Recommendation", + "traits": { + "smithy.api#documentation": "An object that contains information about the recommended course of action to remediate the finding.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Information on how to remediate a finding.
" + } + }, + "com.amazonaws.inspector2#ReportFormat": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CSV", + "name": "CSV" + }, + { + "value": "JSON", + "name": "JSON" + } + ] + } + }, + "com.amazonaws.inspector2#ReportId": { + "type": "string", + "traits": { + "smithy.api#pattern": "\\b[a-f0-9]{8}\\b-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-\\b[a-f0-9]{12}\\b" + } + }, + "com.amazonaws.inspector2#ReportingErrorCode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "INTERNAL_ERROR", + "name": "INTERNAL_ERROR" + }, + { + "value": "INVALID_PERMISSIONS", + "name": "INVALID_PERMISSIONS" + } + ] + } + }, + "com.amazonaws.inspector2#RepositoryAggregation": { + "type": "structure", + "members": { + "repositories": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "The names of repositories to aggregate findings on.
" + } + }, + "sortOrder": { + "target": "com.amazonaws.inspector2#SortOrder", + "traits": { + "smithy.api#documentation": "The order to sort results by.
" + } + }, + "sortBy": { + "target": "com.amazonaws.inspector2#RepositorySortBy", + "traits": { + "smithy.api#documentation": "The value to sort results by.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The details that define an aggregation based on repository.
" + } + }, + "com.amazonaws.inspector2#RepositoryAggregationResponse": { + "type": "structure", + "members": { + "repository": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The name of the repository associated with the findings.
", + "smithy.api#required": {} + } + }, + "accountId": { + "target": "com.amazonaws.inspector2#AccountId", + "traits": { + "smithy.api#documentation": "The ID of the Amazon Web Services account associated with the findings.
" + } + }, + "severityCounts": { + "target": "com.amazonaws.inspector2#SeverityCounts", + "traits": { + "smithy.api#documentation": "An object that represent the count of matched findings per severity.
" + } + }, + "affectedImages": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#documentation": "The number of container images impacted by the findings.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A response that contains details on the results of a finding aggregation by repository.
" + } + }, + "com.amazonaws.inspector2#RepositorySortBy": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CRITICAL", + "name": "CRITICAL" + }, + { + "value": "HIGH", + "name": "HIGH" + }, + { + "value": "ALL", + "name": "ALL" + }, + { + "value": "AFFECTED_IMAGES", + "name": "AFFECTED_IMAGES" + } + ] + } + }, + "com.amazonaws.inspector2#Resource": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.inspector2#ResourceType", + "traits": { + "smithy.api#documentation": "The type of resource.
", + "smithy.api#required": {} + } + }, + "id": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The ID of the resource.
", + "smithy.api#required": {} + } + }, + "partition": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The partition of the resource.
" + } + }, + "region": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The Amazon Web Services Region the impacted resource is located in.
" + } + }, + "tags": { + "target": "com.amazonaws.inspector2#TagMap", + "traits": { + "smithy.api#documentation": "The tags attached to the resource.
" + } + }, + "details": { + "target": "com.amazonaws.inspector2#ResourceDetails", + "traits": { + "smithy.api#documentation": "An object that contains details about the resource involved in a finding.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Details about the resource involved in a finding.
" + } + }, + "com.amazonaws.inspector2#ResourceDetails": { + "type": "structure", + "members": { + "awsEc2Instance": { + "target": "com.amazonaws.inspector2#AwsEc2InstanceDetails", + "traits": { + "smithy.api#documentation": "An object that contains details about the Amazon EC2 instance involved in the finding.
" + } + }, + "awsEcrContainerImage": { + "target": "com.amazonaws.inspector2#AwsEcrContainerImageDetails", + "traits": { + "smithy.api#documentation": "An object that contains details about the Amazon ECR container image involved in the finding.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Contains details about the resource involved in the finding.
" + } + }, + "com.amazonaws.inspector2#ResourceId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 10, + "max": 341 + }, + "smithy.api#pattern": "(^arn:.*:ecr:.*:\\d{12}:repository\\/(?:[a-z0-9]+(?:[._-][a-z0-9]+)*\\/)*[a-z0-9]+(?:[._-][a-z0-9]+)*(\\/sha256:[a-z0-9]{64})?$)|(^i-([a-z0-9]{8}|[a-z0-9]{17}|\\\\*)$)" + } + }, + "com.amazonaws.inspector2#ResourceList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#Resource" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + } + } + }, + "com.amazonaws.inspector2#ResourceNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The operation tried to access an invalid resource. Make sure the resource is specified correctly.
", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.inspector2#ResourceScanMetadata": { + "type": "structure", + "members": { + "ecrRepository": { + "target": "com.amazonaws.inspector2#EcrRepositoryMetadata", + "traits": { + "smithy.api#documentation": "An object that contains details about the repository an Amazon ECR image resides in.
" + } + }, + "ecrImage": { + "target": "com.amazonaws.inspector2#EcrContainerImageMetadata", + "traits": { + "smithy.api#documentation": "An object that contains details about the container metadata for an Amazon ECR image.
" + } + }, + "ec2": { + "target": "com.amazonaws.inspector2#Ec2Metadata", + "traits": { + "smithy.api#documentation": "An object that contains metadata details for an Amazon EC2 instance.
" + } + } + }, + "traits": { + "smithy.api#documentation": "An object that contains details about the metadata for an Amazon ECR resource.
" + } + }, + "com.amazonaws.inspector2#ResourceScanType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "EC2", + "name": "EC2" + }, + { + "value": "ECR", + "name": "ECR" + } + ] + } + }, + "com.amazonaws.inspector2#ResourceState": { + "type": "structure", + "members": { + "ec2": { + "target": "com.amazonaws.inspector2#State", + "traits": { + "smithy.api#documentation": "An object detailing the state of Amazon Inspector scanning for Amazon EC2 resources.
", + "smithy.api#required": {} + } + }, + "ecr": { + "target": "com.amazonaws.inspector2#State", + "traits": { + "smithy.api#documentation": "An object detailing the state of Amazon Inspector scanning for Amazon ECR resources.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Details the state of Amazon Inspector for each resource type Amazon Inspector scans.
" + } + }, + "com.amazonaws.inspector2#ResourceStatus": { + "type": "structure", + "members": { + "ec2": { + "target": "com.amazonaws.inspector2#Status", + "traits": { + "smithy.api#documentation": "The status of Amazon Inspector scanning for Amazon EC2 resources.
", + "smithy.api#required": {} + } + }, + "ecr": { + "target": "com.amazonaws.inspector2#Status", + "traits": { + "smithy.api#documentation": "The status of Amazon Inspector scanning for Amazon ECR resources.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Details the status of Amazon Inspector for each resource type Amazon Inspector scans.
" + } + }, + "com.amazonaws.inspector2#ResourceType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "AWS_EC2_INSTANCE", + "name": "AWS_EC2_INSTANCE" + }, + { + "value": "AWS_ECR_CONTAINER_IMAGE", + "name": "AWS_ECR_CONTAINER_IMAGE" + }, + { + "value": "AWS_ECR_REPOSITORY", + "name": "AWS_ECR_REPOSITORY" + } + ] + } + }, + "com.amazonaws.inspector2#ScanStatus": { + "type": "structure", + "members": { + "statusCode": { + "target": "com.amazonaws.inspector2#ScanStatusCode", + "traits": { + "smithy.api#documentation": "The status code of the scan.
", + "smithy.api#required": {} + } + }, + "reason": { + "target": "com.amazonaws.inspector2#ScanStatusReason", + "traits": { + "smithy.api#documentation": "The reason for the scan.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The status of the scan.
" + } + }, + "com.amazonaws.inspector2#ScanStatusCode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ACTIVE", + "name": "ACTIVE" + }, + { + "value": "INACTIVE", + "name": "INACTIVE" + } + ] + } + }, + "com.amazonaws.inspector2#ScanStatusReason": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PENDING_INITIAL_SCAN", + "name": "PENDING_INITIAL_SCAN" + }, + { + "value": "ACCESS_DENIED", + "name": "ACCESS_DENIED" + }, + { + "value": "INTERNAL_ERROR", + "name": "INTERNAL_ERROR" + }, + { + "value": "UNMANAGED_EC2_INSTANCE", + "name": "UNMANAGED_EC2_INSTANCE" + }, + { + "value": "UNSUPPORTED_OS", + "name": "UNSUPPORTED_OS" + }, + { + "value": "SCAN_ELIGIBILITY_EXPIRED", + "name": "SCAN_ELIGIBILITY_EXPIRED" + }, + { + "value": "RESOURCE_TERMINATED", + "name": "RESOURCE_TERMINATED" + }, + { + "value": "SUCCESSFUL", + "name": "SUCCESSFUL" + }, + { + "value": "NO_RESOURCES_FOUND", + "name": "NO_RESOURCES_FOUND" + }, + { + "value": "IMAGE_SIZE_EXCEEDED", + "name": "IMAGE_SIZE_EXCEEDED" + }, + { + "value": "SCAN_FREQUENCY_MANUAL", + "name": "SCAN_FREQUENCY_MANUAL" + }, + { + "value": "SCAN_FREQUENCY_SCAN_ON_PUSH", + "name": "SCAN_FREQUENCY_SCAN_ON_PUSH" + }, + { + "value": "EC2_INSTANCE_STOPPED", + "name": "EC2_INSTANCE_STOPPED" + } + ] + } + }, + "com.amazonaws.inspector2#ScanType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "NETWORK", + "name": "NETWORK" + }, + { + "value": "PACKAGE", + "name": "PACKAGE" + } + ] + } + }, + "com.amazonaws.inspector2#Service": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "EC2", + "name": "EC2" + }, + { + "value": "ECR", + "name": "ECR" + } + ] + } + }, + "com.amazonaws.inspector2#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "resourceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ID of the resource that exceeds a service quota.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "You have exceeded your service quota. To perform the requested action, remove some of\n the relevant resources, or use Service Quotas to request a service quota increase.
", + "smithy.api#error": "client", + "smithy.api#httpError": 402 + } + }, + "com.amazonaws.inspector2#Severity": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "INFORMATIONAL", + "name": "INFORMATIONAL" + }, + { + "value": "LOW", + "name": "LOW" + }, + { + "value": "MEDIUM", + "name": "MEDIUM" + }, + { + "value": "HIGH", + "name": "HIGH" + }, + { + "value": "CRITICAL", + "name": "CRITICAL" + }, + { + "value": "UNTRIAGED", + "name": "UNTRIAGED" + } + ] + } + }, + "com.amazonaws.inspector2#SeverityCounts": { + "type": "structure", + "members": { + "all": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#documentation": "The total count of findings from all severities.
" + } + }, + "medium": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#documentation": "The total count of medium severity findings.
" + } + }, + "high": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#documentation": "The total count of high severity findings.
" + } + }, + "critical": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#documentation": "The total count of critical severity findings.
" + } + } + }, + "traits": { + "smithy.api#documentation": "An object that contains the counts of aggregated finding per severity.
" + } + }, + "com.amazonaws.inspector2#SortCriteria": { + "type": "structure", + "members": { + "field": { + "target": "com.amazonaws.inspector2#SortField", + "traits": { + "smithy.api#documentation": "The finding detail field by which results are sorted.
", + "smithy.api#required": {} + } + }, + "sortOrder": { + "target": "com.amazonaws.inspector2#SortOrder", + "traits": { + "smithy.api#documentation": "The order by which findings are sorted.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Details about the criteria used to sort finding results.
" + } + }, + "com.amazonaws.inspector2#SortField": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "AWS_ACCOUNT_ID", + "name": "AWS_ACCOUNT_ID" + }, + { + "value": "FINDING_TYPE", + "name": "FINDING_TYPE" + }, + { + "value": "SEVERITY", + "name": "SEVERITY" + }, + { + "value": "FIRST_OBSERVED_AT", + "name": "FIRST_OBSERVED_AT" + }, + { + "value": "LAST_OBSERVED_AT", + "name": "LAST_OBSERVED_AT" + }, + { + "value": "FINDING_STATUS", + "name": "FINDING_STATUS" + }, + { + "value": "RESOURCE_TYPE", + "name": "RESOURCE_TYPE" + }, + { + "value": "ECR_IMAGE_PUSHED_AT", + "name": "ECR_IMAGE_PUSHED_AT" + }, + { + "value": "ECR_IMAGE_REPOSITORY_NAME", + "name": "ECR_IMAGE_REPOSITORY_NAME" + }, + { + "value": "ECR_IMAGE_REGISTRY", + "name": "ECR_IMAGE_REGISTRY" + }, + { + "value": "NETWORK_PROTOCOL", + "name": "NETWORK_PROTOCOL" + }, + { + "value": "COMPONENT_TYPE", + "name": "COMPONENT_TYPE" + }, + { + "value": "VULNERABILITY_ID", + "name": "VULNERABILITY_ID" + }, + { + "value": "VULNERABILITY_SOURCE", + "name": "VULNERABILITY_SOURCE" + }, + { + "value": "INSPECTOR_SCORE", + "name": "INSPECTOR_SCORE" + }, + { + "value": "VENDOR_SEVERITY", + "name": "VENDOR_SEVERITY" + } + ] + } + }, + "com.amazonaws.inspector2#SortOrder": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ASC", + "name": "ASC" + }, + { + "value": "DESC", + "name": "DESC" + } + ] + } + }, + "com.amazonaws.inspector2#SourceLayerHash": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 71, + "max": 71 + }, + "smithy.api#pattern": "^sha256:[a-z0-9]{64}$" + } + }, + "com.amazonaws.inspector2#State": { + "type": "structure", + "members": { + "status": { + "target": "com.amazonaws.inspector2#Status", + "traits": { + "smithy.api#documentation": "The status of Amazon Inspector for the account.
", + "smithy.api#required": {} + } + }, + "errorCode": { + "target": "com.amazonaws.inspector2#ErrorCode", + "traits": { + "smithy.api#documentation": "The error code explaining why the account failed to enable Amazon Inspector.
", + "smithy.api#required": {} + } + }, + "errorMessage": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The error message received when the account failed to enable Amazon Inspector.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "An object that described the state of Amazon Inspector scans for an account.
" + } + }, + "com.amazonaws.inspector2#Status": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ENABLING", + "name": "ENABLING" + }, + { + "value": "ENABLED", + "name": "ENABLED" + }, + { + "value": "DISABLING", + "name": "DISABLING" + }, + { + "value": "DISABLED", + "name": "DISABLED" + }, + { + "value": "SUSPENDING", + "name": "SUSPENDING" + }, + { + "value": "SUSPENDED", + "name": "SUSPENDED" + } + ] + } + }, + "com.amazonaws.inspector2#Step": { + "type": "structure", + "members": { + "componentId": { + "target": "com.amazonaws.inspector2#Component", + "traits": { + "smithy.api#documentation": "The component ID.
", + "smithy.api#required": {} + } + }, + "componentType": { + "target": "com.amazonaws.inspector2#ComponentType", + "traits": { + "smithy.api#documentation": "The component type.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Details about the step associated with a finding.
" + } + }, + "com.amazonaws.inspector2#StepList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#Step" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 30 + } + } + }, + "com.amazonaws.inspector2#StringComparison": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "EQUALS", + "name": "EQUALS" + }, + { + "value": "PREFIX", + "name": "PREFIX" + }, + { + "value": "NOT_EQUALS", + "name": "NOT_EQUALS" + } + ] + } + }, + "com.amazonaws.inspector2#StringFilter": { + "type": "structure", + "members": { + "comparison": { + "target": "com.amazonaws.inspector2#StringComparison", + "traits": { + "smithy.api#documentation": "The operator to use when comparing values in the filter
", + "smithy.api#required": {} + } + }, + "value": { + "target": "com.amazonaws.inspector2#StringInput", + "traits": { + "smithy.api#documentation": "The value to filter on.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "An object that describes the details of a string filter.
" + } + }, + "com.amazonaws.inspector2#StringFilterList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#StringFilter" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + } + } + }, + "com.amazonaws.inspector2#StringInput": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + } + } + }, + "com.amazonaws.inspector2#StringList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#NonEmptyString" + } + }, + "com.amazonaws.inspector2#TagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^(?!aws:)[a-zA-Z+-=._:/]+$" + } + }, + "com.amazonaws.inspector2#TagKeyList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#TagKey" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "com.amazonaws.inspector2#TagList": { + "type": "list", + "member": { + "target": "smithy.api#String" + } + }, + "com.amazonaws.inspector2#TagMap": { + "type": "map", + "key": { + "target": "com.amazonaws.inspector2#MapKey" + }, + "value": { + "target": "com.amazonaws.inspector2#MapValue" + } + }, + "com.amazonaws.inspector2#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.inspector2#TagResourceRequest" + }, + "output": { + "target": "com.amazonaws.inspector2#TagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.inspector2#BadRequestException" + }, + { + "target": "com.amazonaws.inspector2#InternalServerException" + }, + { + "target": "com.amazonaws.inspector2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.inspector2#ThrottlingException" + }, + { + "target": "com.amazonaws.inspector2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Adds tags to a resource.
", + "smithy.api#http": { + "method": "POST", + "uri": "/tags/{resourceArn}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.inspector2#TagResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.inspector2#Arn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the resource to apply a tag to.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.inspector2#TagMap", + "traits": { + "smithy.api#documentation": "The tags to be added to a resource.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.inspector2#TagResourceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.inspector2#ThrottlingException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The limit on the number of requests per second was exceeded.
", + "smithy.api#error": "client", + "smithy.api#httpError": 429 + } + }, + "com.amazonaws.inspector2#TitleAggregation": { + "type": "structure", + "members": { + "titles": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "The finding titles to aggregate on.
" + } + }, + "vulnerabilityIds": { + "target": "com.amazonaws.inspector2#StringFilterList", + "traits": { + "smithy.api#documentation": "The vulnerability IDs of the findings.
" + } + }, + "resourceType": { + "target": "com.amazonaws.inspector2#AggregationResourceType", + "traits": { + "smithy.api#documentation": "The resource type to aggregate on.
" + } + }, + "sortOrder": { + "target": "com.amazonaws.inspector2#SortOrder", + "traits": { + "smithy.api#documentation": "The order to sort results by.
" + } + }, + "sortBy": { + "target": "com.amazonaws.inspector2#TitleSortBy", + "traits": { + "smithy.api#documentation": "The value to sort results by.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The details that define an aggregation based on finding title.
" + } + }, + "com.amazonaws.inspector2#TitleAggregationResponse": { + "type": "structure", + "members": { + "title": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "The title that the findings were aggregated on.
", + "smithy.api#required": {} + } + }, + "vulnerabilityId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The vulnerability ID of the finding.
" + } + }, + "accountId": { + "target": "com.amazonaws.inspector2#AccountId", + "traits": { + "smithy.api#documentation": "The ID of the Amazon Web Services account associated with the findings.
" + } + }, + "severityCounts": { + "target": "com.amazonaws.inspector2#SeverityCounts", + "traits": { + "smithy.api#documentation": "An object that represent the count of matched findings per severity.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A response that contains details on the results of a finding aggregation by title.
" + } + }, + "com.amazonaws.inspector2#TitleSortBy": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CRITICAL", + "name": "CRITICAL" + }, + { + "value": "HIGH", + "name": "HIGH" + }, + { + "value": "ALL", + "name": "ALL" + } + ] + } + }, + "com.amazonaws.inspector2#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.inspector2#UntagResourceRequest" + }, + "output": { + "target": "com.amazonaws.inspector2#UntagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.inspector2#InternalServerException" + }, + { + "target": "com.amazonaws.inspector2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.inspector2#ThrottlingException" + }, + { + "target": "com.amazonaws.inspector2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Removes tags from a resource.
", + "smithy.api#http": { + "method": "DELETE", + "uri": "/tags/{resourceArn}", + "code": 200 + } + } + }, + "com.amazonaws.inspector2#UntagResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.inspector2#Arn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) for the resource to remove tags from.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tagKeys": { + "target": "com.amazonaws.inspector2#TagKeyList", + "traits": { + "smithy.api#documentation": "The tag keys to remove from the resource.
", + "smithy.api#httpQuery": "tagKeys", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.inspector2#UntagResourceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.inspector2#UpdateFilter": { + "type": "operation", + "input": { + "target": "com.amazonaws.inspector2#UpdateFilterRequest" + }, + "output": { + "target": "com.amazonaws.inspector2#UpdateFilterResponse" + }, + "errors": [ + { + "target": "com.amazonaws.inspector2#AccessDeniedException" + }, + { + "target": "com.amazonaws.inspector2#InternalServerException" + }, + { + "target": "com.amazonaws.inspector2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.inspector2#ThrottlingException" + }, + { + "target": "com.amazonaws.inspector2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Specifies the action that is to be applied to the findings that match the filter.
", + "smithy.api#http": { + "method": "POST", + "uri": "/filters/update", + "code": 200 + } + } + }, + "com.amazonaws.inspector2#UpdateFilterRequest": { + "type": "structure", + "members": { + "action": { + "target": "com.amazonaws.inspector2#FilterAction", + "traits": { + "smithy.api#documentation": "Specifies the action that is to be applied to the findings that match the filter.
" + } + }, + "description": { + "target": "com.amazonaws.inspector2#FilterDescription", + "traits": { + "smithy.api#documentation": "A description of the filter.
" + } + }, + "filterCriteria": { + "target": "com.amazonaws.inspector2#FilterCriteria", + "traits": { + "smithy.api#documentation": "Defines the criteria to be update in the filter.
" + } + }, + "name": { + "target": "com.amazonaws.inspector2#FilterName", + "traits": { + "smithy.api#documentation": "The name of the filter.
" + } + }, + "filterArn": { + "target": "com.amazonaws.inspector2#FilterArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Number (ARN) of the filter to update.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.inspector2#UpdateFilterResponse": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.inspector2#FilterArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Number (ARN) of the successfully updated filter.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.inspector2#UpdateOrganizationConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.inspector2#UpdateOrganizationConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.inspector2#UpdateOrganizationConfigurationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.inspector2#AccessDeniedException" + }, + { + "target": "com.amazonaws.inspector2#InternalServerException" + }, + { + "target": "com.amazonaws.inspector2#ThrottlingException" + }, + { + "target": "com.amazonaws.inspector2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Updates the configurations for your Amazon Inspector organization.
", + "smithy.api#http": { + "method": "POST", + "uri": "/organizationconfiguration/update", + "code": 200 + } + } + }, + "com.amazonaws.inspector2#UpdateOrganizationConfigurationRequest": { + "type": "structure", + "members": { + "autoEnable": { + "target": "com.amazonaws.inspector2#AutoEnable", + "traits": { + "smithy.api#documentation": "Defines which scan types are enabled automatically for new members of your Amazon Inspector organization.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.inspector2#UpdateOrganizationConfigurationResponse": { + "type": "structure", + "members": { + "autoEnable": { + "target": "com.amazonaws.inspector2#AutoEnable", + "traits": { + "smithy.api#documentation": "The updated status of scan types automatically enabled for new members of your Amazon Inspector organization.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.inspector2#Usage": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.inspector2#UsageType", + "traits": { + "smithy.api#documentation": "The type scan.
" + } + }, + "total": { + "target": "com.amazonaws.inspector2#UsageValue", + "traits": { + "smithy.api#documentation": "The total of usage.
" + } + }, + "estimatedMonthlyCost": { + "target": "com.amazonaws.inspector2#MonthlyCostEstimate", + "traits": { + "smithy.api#documentation": "The estimated monthly cost of Amazon Inspector.
" + } + }, + "currency": { + "target": "com.amazonaws.inspector2#Currency", + "traits": { + "smithy.api#documentation": "The currency type used when calculating usage data.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Contains usage information about the cost of Amazon Inspector operation.
" + } + }, + "com.amazonaws.inspector2#UsageAccountId": { + "type": "string", + "traits": { + "smithy.api#pattern": "[0-9]{12}" + } + }, + "com.amazonaws.inspector2#UsageAccountIdList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#UsageAccountId" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 5000 + } + } + }, + "com.amazonaws.inspector2#UsageList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#Usage" + } + }, + "com.amazonaws.inspector2#UsageTotal": { + "type": "structure", + "members": { + "accountId": { + "target": "com.amazonaws.inspector2#MeteringAccountId", + "traits": { + "smithy.api#documentation": "The account ID of the account that usage data was retrieved for.
" + } + }, + "usage": { + "target": "com.amazonaws.inspector2#UsageList", + "traits": { + "smithy.api#documentation": "An object representing the total usage for an account.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The total of usage for an account ID.
" + } + }, + "com.amazonaws.inspector2#UsageTotalList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#UsageTotal" + } + }, + "com.amazonaws.inspector2#UsageType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "EC2_INSTANCE_HOURS", + "name": "EC2_INSTANCE_HOURS" + }, + { + "value": "ECR_INITIAL_SCAN", + "name": "ECR_INITIAL_SCAN" + }, + { + "value": "ECR_RESCAN", + "name": "ECR_RESCAN" + } + ] + } + }, + "com.amazonaws.inspector2#UsageValue": { + "type": "double", + "traits": { + "smithy.api#range": { + "min": 0 + } + } + }, + "com.amazonaws.inspector2#ValidationException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "reason": { + "target": "com.amazonaws.inspector2#ValidationExceptionReason", + "traits": { + "smithy.api#documentation": "The reason for the validation failure.
", + "smithy.api#required": {} + } + }, + "fields": { + "target": "com.amazonaws.inspector2#ValidationExceptionFields", + "traits": { + "smithy.api#documentation": "The fields that failed validation.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The request has failed validation due to missing required fields or having invalid\n inputs.
", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.inspector2#ValidationExceptionField": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the validation exception.
", + "smithy.api#required": {} + } + }, + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The validation exception message.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "An object that describes a validation exception.
" + } + }, + "com.amazonaws.inspector2#ValidationExceptionFields": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#ValidationExceptionField" + } + }, + "com.amazonaws.inspector2#ValidationExceptionReason": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CANNOT_PARSE", + "name": "CANNOT_PARSE" + }, + { + "value": "FIELD_VALIDATION_FAILED", + "name": "FIELD_VALIDATION_FAILED" + }, + { + "value": "OTHER", + "name": "OTHER" + } + ] + } + }, + "com.amazonaws.inspector2#VulnerabilityId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + } + } + }, + "com.amazonaws.inspector2#VulnerabilityIdList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#VulnerabilityId" + } + }, + "com.amazonaws.inspector2#VulnerablePackage": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.inspector2#PackageName", + "traits": { + "smithy.api#documentation": "The name of the vulnerable package.
", + "smithy.api#required": {} + } + }, + "version": { + "target": "com.amazonaws.inspector2#PackageVersion", + "traits": { + "smithy.api#documentation": "The version of the vulnerable package.
", + "smithy.api#required": {} + } + }, + "sourceLayerHash": { + "target": "com.amazonaws.inspector2#SourceLayerHash", + "traits": { + "smithy.api#documentation": "The source layer hash of the vulnerable package.
" + } + }, + "epoch": { + "target": "com.amazonaws.inspector2#PackageEpoch", + "traits": { + "smithy.api#documentation": "The epoch of the vulnerable package.
" + } + }, + "release": { + "target": "com.amazonaws.inspector2#PackageRelease", + "traits": { + "smithy.api#documentation": "The release of the vulnerable package.
" + } + }, + "arch": { + "target": "com.amazonaws.inspector2#PackageArchitecture", + "traits": { + "smithy.api#documentation": "The architecture of the vulnerable package.
" + } + }, + "packageManager": { + "target": "com.amazonaws.inspector2#PackageManager", + "traits": { + "smithy.api#documentation": "The package manager of the vulnerable package.
" + } + }, + "filePath": { + "target": "com.amazonaws.inspector2#FilePath", + "traits": { + "smithy.api#documentation": "The file path of the vulnerable package.
" + } + }, + "fixedInVersion": { + "target": "com.amazonaws.inspector2#PackageVersion", + "traits": { + "smithy.api#documentation": "The version of the package that contains the vulnerability fix.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Information on the vulnerable package identified by a finding.
" + } + }, + "com.amazonaws.inspector2#VulnerablePackageList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#VulnerablePackage" + } + } + } +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/iot.2015-05-28.json b/codegen/sdk-codegen/aws-models/iot.2015-05-28.json index 94a4550b655..42b7d32f07d 100644 --- a/codegen/sdk-codegen/aws-models/iot.2015-05-28.json +++ b/codegen/sdk-codegen/aws-models/iot.2015-05-28.json @@ -31,6 +31,21 @@ "shapes": { "com.amazonaws.iot#AWSIotService": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "IoT", + "arnNamespace": "iot", + "cloudFormationName": "IoT", + "cloudTrailEventSource": "iot.amazonaws.com", + "endpointPrefix": "iot" + }, + "aws.auth#sigv4": { + "name": "execute-api" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "IoT provides secure, bi-directional communication between Internet-connected\n devices (such as sensors, actuators, embedded devices, or smart appliances) and the Amazon Web Services\n cloud. You can discover your custom IoT-Data endpoint to communicate with, configure\n rules for data processing and integration with other services, organize resources\n associated with each device (Registry), configure logging, and create and manage\n policies and credentials to authenticate devices.
\nThe service endpoints that expose this API are listed in\n Amazon Web Services IoT Core Endpoints and Quotas.\n You must use the endpoint for the region that has the resources you want to access.
\nThe service name used by Amazon Web Services\n Signature Version 4 to sign the request is:\n execute-api.
\nFor more information about how IoT works, see the Developer\n Guide.
\nFor information about how to use the credentials provider for IoT, see Authorizing Direct Calls to Amazon Web Services Services.
", + "smithy.api#title": "AWS IoT" + }, "version": "2015-05-28", "operations": [ { @@ -324,6 +339,9 @@ { "target": "com.amazonaws.iot#DescribeJobTemplate" }, + { + "target": "com.amazonaws.iot#DescribeManagedJobTemplate" + }, { "target": "com.amazonaws.iot#DescribeMitigationAction" }, @@ -492,6 +510,9 @@ { "target": "com.amazonaws.iot#ListJobTemplates" }, + { + "target": "com.amazonaws.iot#ListManagedJobTemplates" + }, { "target": "com.amazonaws.iot#ListMitigationActions" }, @@ -735,22 +756,7 @@ { "target": "com.amazonaws.iot#ValidateSecurityProfileBehaviors" } - ], - "traits": { - "aws.api#service": { - "sdkId": "IoT", - "arnNamespace": "iot", - "cloudFormationName": "IoT", - "cloudTrailEventSource": "iot.amazonaws.com", - "endpointPrefix": "iot" - }, - "aws.auth#sigv4": { - "name": "execute-api" - }, - "aws.protocols#restJson1": {}, - "smithy.api#documentation": "IoT provides secure, bi-directional communication between Internet-connected\n devices (such as sensors, actuators, embedded devices, or smart appliances) and the Amazon Web Services\n cloud. You can discover your custom IoT-Data endpoint to communicate with, configure\n rules for data processing and integration with other services, organize resources\n associated with each device (Registry), configure logging, and create and manage\n policies and credentials to authenticate devices.
\nThe service endpoints that expose this API are listed in\n Amazon Web Services IoT Core Endpoints and Quotas.\n You must use the endpoint for the region that has the resources you want to access.
\nThe service name used by Amazon Web Services\n Signature Version 4 to sign the request is:\n execute-api.
\nFor more information about how IoT works, see the Developer\n Guide.
\nFor information about how to use the credentials provider for IoT, see Authorizing Direct Calls to Amazon Web Services Services.
", - "smithy.api#title": "AWS IoT" - } + ] }, "com.amazonaws.iot#AbortAction": { "type": "string", @@ -1190,7 +1196,7 @@ "billingGroupName": { "target": "com.amazonaws.iot#BillingGroupName", "traits": { - "smithy.api#documentation": "The name of the billing group.
" + "smithy.api#documentation": "The name of the billing group.
\n\t\tThis call is asynchronous. It might take several seconds for the detachment to propagate.
\n\n Each audit supression must have a unique client request token. If you try to create a new audit\n suppression with the same token as one that already exists, an exception occurs. If you omit this\n value, Amazon Web Services SDKs will automatically generate a unique client request.\n
", + "smithy.api#documentation": "\n Each audit supression must have a unique client request token. If you try to create a new audit\n suppression with the same token as one that already exists, an exception occurs. If you omit this\n value, Amazon Web Services SDKs will automatically generate a unique client request.
", "smithy.api#idempotencyToken": {}, "smithy.api#required": {} } @@ -5088,7 +5094,7 @@ } ], "traits": { - "smithy.api#documentation": "Creates an X.509 certificate using the specified certificate signing\n request.
\n\n Note: The CSR must include a public key that is either an\n RSA key with a length of at least 2048 bits or an ECC key from NIST P-256 or NIST P-384\n curves.
\n\n Note: Reusing the same certificate signing request (CSR)\n results in a distinct certificate.
\nRequires permission to access the CreateCertificateFromCsr action.
\n \nYou can create multiple certificates in a batch by creating a directory, copying\n multiple .csr files into that directory, and then specifying that directory on the command\n line. The following commands show how to create a batch of certificates given a batch of\n CSRs.
\nAssuming a set of CSRs are located inside of the directory\n my-csr-directory:
\n\nOn Linux and OS X, the command is:
\n\n$ ls my-csr-directory/ | xargs -I {} aws iot create-certificate-from-csr\n --certificate-signing-request file://my-csr-directory/{}
\nThis command lists all of the CSRs in my-csr-directory and pipes each CSR file name\n to the aws iot create-certificate-from-csr Amazon Web Services CLI command to create a certificate for the\n corresponding CSR.
\nThe aws iot create-certificate-from-csr part of the command can also be run in\n parallel to speed up the certificate creation process:
\n$ ls my-csr-directory/ | xargs -P 10 -I {} aws iot create-certificate-from-csr\n --certificate-signing-request file://my-csr-directory/{}
\nOn Windows PowerShell, the command to create certificates for all CSRs in\n my-csr-directory is:
\n> ls -Name my-csr-directory | %{aws iot create-certificate-from-csr\n --certificate-signing-request file://my-csr-directory/$_}
\nOn a Windows command prompt, the command to create certificates for all CSRs in\n my-csr-directory is:
\n> forfiles /p my-csr-directory /c \"cmd /c aws iot create-certificate-from-csr\n --certificate-signing-request file://@path\"
", + "smithy.api#documentation": "Creates an X.509 certificate using the specified certificate signing\n request.
\n\n Note: The CSR must include a public key that is either an\n RSA key with a length of at least 2048 bits or an ECC key from NIST P-256, NIST P-384, or NIST P-512\n curves. For supported certificates, consult \n Certificate signing algorithms supported by IoT.
\n\n Note: Reusing the same certificate signing request (CSR)\n results in a distinct certificate.
\nRequires permission to access the CreateCertificateFromCsr action.
\n \nYou can create multiple certificates in a batch by creating a directory, copying\n multiple .csr files into that directory, and then specifying that directory on the command\n line. The following commands show how to create a batch of certificates given a batch of\n CSRs.
\nAssuming a set of CSRs are located inside of the directory\n my-csr-directory:
\n\nOn Linux and OS X, the command is:
\n\n$ ls my-csr-directory/ | xargs -I {} aws iot create-certificate-from-csr\n --certificate-signing-request file://my-csr-directory/{}
\nThis command lists all of the CSRs in my-csr-directory and pipes each CSR file name\n to the aws iot create-certificate-from-csr Amazon Web Services CLI command to create a certificate for the\n corresponding CSR.
\nThe aws iot create-certificate-from-csr part of the command can also be run in\n parallel to speed up the certificate creation process:
\n$ ls my-csr-directory/ | xargs -P 10 -I {} aws iot create-certificate-from-csr\n --certificate-signing-request file://my-csr-directory/{}
\nOn Windows PowerShell, the command to create certificates for all CSRs in\n my-csr-directory is:
\n> ls -Name my-csr-directory | %{aws iot create-certificate-from-csr\n --certificate-signing-request file://my-csr-directory/$_}
\nOn a Windows command prompt, the command to create certificates for all CSRs in\n my-csr-directory is:
\n> forfiles /p my-csr-directory /c \"cmd /c aws iot create-certificate-from-csr\n --certificate-signing-request file://@path\"
", "smithy.api#http": { "method": "POST", "uri": "/certificates", @@ -5821,6 +5827,12 @@ "traits": { "smithy.api#documentation": "The ARN of the job template used to create the job.
" } + }, + "documentParameters": { + "target": "com.amazonaws.iot#ParameterMap", + "traits": { + "smithy.api#documentation": "Parameters of a managed template that you can specify to create the job document.
" + } } } }, @@ -7128,7 +7140,7 @@ "roleArn": { "target": "com.amazonaws.iot#RoleArn", "traits": { - "smithy.api#documentation": "An IAM role that allows the IoT service principal assumes to access your S3 files.
", + "smithy.api#documentation": "An IAM role that allows the IoT service principal to access your S3 files.
", "smithy.api#required": {} } }, @@ -11121,6 +11133,104 @@ } } }, + "com.amazonaws.iot#DescribeManagedJobTemplate": { + "type": "operation", + "input": { + "target": "com.amazonaws.iot#DescribeManagedJobTemplateRequest" + }, + "output": { + "target": "com.amazonaws.iot#DescribeManagedJobTemplateResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iot#InternalServerException" + }, + { + "target": "com.amazonaws.iot#InvalidRequestException" + }, + { + "target": "com.amazonaws.iot#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iot#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "View details of a managed job template.
", + "smithy.api#http": { + "method": "GET", + "uri": "/managed-job-templates/{templateName}", + "code": 200 + } + } + }, + "com.amazonaws.iot#DescribeManagedJobTemplateRequest": { + "type": "structure", + "members": { + "templateName": { + "target": "com.amazonaws.iot#ManagedJobTemplateName", + "traits": { + "smithy.api#documentation": "The unique name of a managed job template, which is required.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "templateVersion": { + "target": "com.amazonaws.iot#ManagedTemplateVersion", + "traits": { + "smithy.api#documentation": "An optional parameter to specify version of a managed template. If not specified, the \n pre-defined default version is returned.
", + "smithy.api#httpQuery": "templateVersion" + } + } + } + }, + "com.amazonaws.iot#DescribeManagedJobTemplateResponse": { + "type": "structure", + "members": { + "templateName": { + "target": "com.amazonaws.iot#ManagedJobTemplateName", + "traits": { + "smithy.api#documentation": "The unique name of a managed template, such as AWS-Reboot
.
The unique Amazon Resource Name (ARN) of the managed template.
" + } + }, + "description": { + "target": "com.amazonaws.iot#JobDescription", + "traits": { + "smithy.api#documentation": "The unique description of a managed template.
" + } + }, + "templateVersion": { + "target": "com.amazonaws.iot#ManagedTemplateVersion", + "traits": { + "smithy.api#documentation": "The version for a managed template.
" + } + }, + "environments": { + "target": "com.amazonaws.iot#Environments", + "traits": { + "smithy.api#documentation": "A list of environments that are supported with the managed job template.
" + } + }, + "documentParameters": { + "target": "com.amazonaws.iot#DocumentParameters", + "traits": { + "smithy.api#documentation": "A map of key-value pairs that you can use as guidance to specify the inputs for creating \n a job from a managed template.
" + } + }, + "document": { + "target": "com.amazonaws.iot#JobDocument", + "traits": { + "smithy.api#documentation": "The document schema for a managed job template.
" + } + } + } + }, "com.amazonaws.iot#DescribeMitigationAction": { "type": "operation", "input": { @@ -12842,6 +12952,50 @@ "com.amazonaws.iot#DisconnectReason": { "type": "string" }, + "com.amazonaws.iot#DocumentParameter": { + "type": "structure", + "members": { + "key": { + "target": "com.amazonaws.iot#ParameterKey", + "traits": { + "smithy.api#documentation": "Key of the map field containing the patterns that need to be replaced in a managed\n template job document schema.
" + } + }, + "description": { + "target": "com.amazonaws.iot#JobDescription", + "traits": { + "smithy.api#documentation": "Description of the map field containing the patterns that need to be replaced in a \n managed template job document schema.
" + } + }, + "regex": { + "target": "com.amazonaws.iot#Regex", + "traits": { + "smithy.api#documentation": "A regular expression of the patterns that need to be replaced in a managed template \n job document schema.
" + } + }, + "example": { + "target": "com.amazonaws.iot#Example", + "traits": { + "smithy.api#documentation": "An example illustrating a pattern that need to be replaced in a managed template \n job document schema.
" + } + }, + "optional": { + "target": "com.amazonaws.iot#Optional", + "traits": { + "smithy.api#documentation": "Specifies whether a pattern that needs to be replaced in a managed template job document \n schema is optional or required.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A map of key-value pairs containing the patterns that need to be replaced in a managed\n template job document schema. You can use the description of each key as a guidance to specify \n the inputs during runtime when creating a job.
" + } + }, + "com.amazonaws.iot#DocumentParameters": { + "type": "list", + "member": { + "target": "com.amazonaws.iot#DocumentParameter" + } + }, "com.amazonaws.iot#DomainConfigurationArn": { "type": "string" }, @@ -13241,6 +13395,18 @@ } } }, + "com.amazonaws.iot#Environment": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[^\\p{C}]+$" + } + }, + "com.amazonaws.iot#Environments": { + "type": "list", + "member": { + "target": "com.amazonaws.iot#Environment" + } + }, "com.amazonaws.iot#ErrorCode": { "type": "string" }, @@ -13342,6 +13508,12 @@ ] } }, + "com.amazonaws.iot#Example": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[^\\p{C}]+$" + } + }, "com.amazonaws.iot#ExecutionNamePrefix": { "type": "string" }, @@ -13961,7 +14133,7 @@ "totalCount": { "target": "com.amazonaws.iot#Count", "traits": { - "smithy.api#documentation": "The total number of documents that fit the query string criteria and contain a value for\n the Aggregation field targeted in the request.
" + "smithy.api#documentation": "The total number of things that fit the query string criteria.
" } }, "buckets": { @@ -15249,7 +15421,7 @@ "type": "double", "traits": { "smithy.api#range": { - "min": 1, + "min": 1.1, "max": 5 } } @@ -15352,6 +15524,19 @@ "smithy.api#httpError": 500 } }, + "com.amazonaws.iot#InternalServerException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.iot#ErrorMessage2" + } + }, + "traits": { + "smithy.api#documentation": "Internal error from the service that indicates an unexpected error or that the service\n is unavailable.
", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, "com.amazonaws.iot#InvalidAggregationException": { "type": "structure", "members": { @@ -15654,6 +15839,12 @@ "traits": { "smithy.api#documentation": "The ARN of the job template used to create the job.
" } + }, + "documentParameters": { + "target": "com.amazonaws.iot#ParameterMap", + "traits": { + "smithy.api#documentation": "A key-value map that pairs the patterns that need to be replaced in a managed \n template job document schema. You can use the description of each key as a guidance \n to specify the inputs during runtime when creating a job.
" + } } }, "traits": { @@ -18399,6 +18590,80 @@ } } }, + "com.amazonaws.iot#ListManagedJobTemplates": { + "type": "operation", + "input": { + "target": "com.amazonaws.iot#ListManagedJobTemplatesRequest" + }, + "output": { + "target": "com.amazonaws.iot#ListManagedJobTemplatesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iot#InternalServerException" + }, + { + "target": "com.amazonaws.iot#InvalidRequestException" + }, + { + "target": "com.amazonaws.iot#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iot#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "Returns a list of managed job templates.
", + "smithy.api#http": { + "method": "GET", + "uri": "/managed-job-templates", + "code": 200 + } + } + }, + "com.amazonaws.iot#ListManagedJobTemplatesRequest": { + "type": "structure", + "members": { + "templateName": { + "target": "com.amazonaws.iot#ManagedJobTemplateName", + "traits": { + "smithy.api#documentation": "An optional parameter for template name. If specified, only the versions of the\n managed job templates that have the specified template name will be returned.
", + "smithy.api#httpQuery": "templateName" + } + }, + "maxResults": { + "target": "com.amazonaws.iot#LaserMaxResults", + "traits": { + "smithy.api#documentation": "Maximum number of entries that can be returned.
", + "smithy.api#httpQuery": "maxResults" + } + }, + "nextToken": { + "target": "com.amazonaws.iot#NextToken", + "traits": { + "smithy.api#documentation": "The token to retrieve the next set of results.
", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.iot#ListManagedJobTemplatesResponse": { + "type": "structure", + "members": { + "managedJobTemplates": { + "target": "com.amazonaws.iot#ManagedJobTemplatesSummaryList", + "traits": { + "smithy.api#documentation": "A list of managed job templates that are returned.
" + } + }, + "nextToken": { + "target": "com.amazonaws.iot#NextToken", + "traits": { + "smithy.api#documentation": "The token to retrieve the next set of results.
" + } + } + } + }, "com.amazonaws.iot#ListMitigationActions": { "type": "operation", "input": { @@ -21242,6 +21507,65 @@ "smithy.api#httpError": 400 } }, + "com.amazonaws.iot#ManagedJobTemplateName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + } + } + }, + "com.amazonaws.iot#ManagedJobTemplateSummary": { + "type": "structure", + "members": { + "templateArn": { + "target": "com.amazonaws.iot#JobTemplateArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) for a managed template.
" + } + }, + "templateName": { + "target": "com.amazonaws.iot#ManagedJobTemplateName", + "traits": { + "smithy.api#documentation": "The unique Name for a managed template.
" + } + }, + "description": { + "target": "com.amazonaws.iot#JobDescription", + "traits": { + "smithy.api#documentation": "The description for a managed template.
" + } + }, + "environments": { + "target": "com.amazonaws.iot#Environments", + "traits": { + "smithy.api#documentation": "A list of environments that are supported with the managed job template.
" + } + }, + "templateVersion": { + "target": "com.amazonaws.iot#ManagedTemplateVersion", + "traits": { + "smithy.api#documentation": "The version for a managed template.
" + } + } + }, + "traits": { + "smithy.api#documentation": "An object that contains information about the managed template.
" + } + }, + "com.amazonaws.iot#ManagedJobTemplatesSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.iot#ManagedJobTemplateSummary" + } + }, + "com.amazonaws.iot#ManagedTemplateVersion": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[1-9]+.[0-9]+$" + } + }, "com.amazonaws.iot#Marker": { "type": "string", "traits": { @@ -22085,6 +22409,9 @@ "smithy.api#documentation": "Describes an action that writes data to an Amazon OpenSearch Service\n domain.
" } }, + "com.amazonaws.iot#Optional": { + "type": "boolean" + }, "com.amazonaws.iot#OptionalVersion": { "type": "long", "traits": { @@ -22157,6 +22484,35 @@ "com.amazonaws.iot#Parameter": { "type": "string" }, + "com.amazonaws.iot#ParameterKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^[a-zA-Z0-9_-]+$" + } + }, + "com.amazonaws.iot#ParameterMap": { + "type": "map", + "key": { + "target": "com.amazonaws.iot#ParameterKey" + }, + "value": { + "target": "com.amazonaws.iot#ParameterValue" + } + }, + "com.amazonaws.iot#ParameterValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 512 + }, + "smithy.api#pattern": "^[^\\p{C}]+$" + } + }, "com.amazonaws.iot#Parameters": { "type": "map", "key": { @@ -22840,6 +23196,9 @@ "smithy.api#box": {} } }, + "com.amazonaws.iot#Regex": { + "type": "string" + }, "com.amazonaws.iot#RegisterCACertificate": { "type": "operation", "input": { @@ -23090,7 +23449,7 @@ } ], "traits": { - "smithy.api#documentation": "Register a certificate that does not have a certificate authority (CA).
", + "smithy.api#documentation": "Register a certificate that does not have a certificate authority (CA). \n For supported certificates, consult \n Certificate signing algorithms supported by IoT.\n
", "smithy.api#http": { "method": "POST", "uri": "/certificate/register-no-ca", @@ -23416,7 +23775,7 @@ } ], "traits": { - "smithy.api#documentation": "Removes the given thing from the billing group.
\n\t\tRequires permission to access the RemoveThingFromBillingGroup action.
", + "smithy.api#documentation": "Removes the given thing from the billing group.
\n\t\tRequires permission to access the RemoveThingFromBillingGroup action.
\n\t\tThis call is asynchronous. It might take several seconds for the detachment to propagate.
\nThe count of things that match the query.
" + "smithy.api#documentation": "The count of things that match the query string criteria and contain a valid aggregation field value.
" } }, "average": { @@ -25357,7 +25716,7 @@ } }, "traits": { - "smithy.api#documentation": "A map of key-value pairs for all supported statistics. Currently, only count is\n supported.
" + "smithy.api#documentation": "A map of key-value pairs for all supported statistics. For issues with missing or unexpected values for this API, \n consult \n Fleet indexing troubleshooting guide.
" } }, "com.amazonaws.iot#Status": { diff --git a/codegen/sdk-codegen/aws-models/iotdeviceadvisor.2020-09-18.json b/codegen/sdk-codegen/aws-models/iotdeviceadvisor.2020-09-18.json index 3f823947b33..5047ac1e5a0 100644 --- a/codegen/sdk-codegen/aws-models/iotdeviceadvisor.2020-09-18.json +++ b/codegen/sdk-codegen/aws-models/iotdeviceadvisor.2020-09-18.json @@ -44,12 +44,12 @@ "message": { "target": "com.amazonaws.iotdeviceadvisor#Message", "traits": { - "smithy.api#documentation": "Sends Conflict Exception message.
" + "smithy.api#documentation": "Sends a Conflict Exception message.
" } } }, "traits": { - "smithy.api#documentation": "Sends Conflict Exception.
", + "smithy.api#documentation": "Sends a Conflict Exception.
", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -71,7 +71,7 @@ } ], "traits": { - "smithy.api#documentation": "Creates a Device Advisor test suite.
", + "smithy.api#documentation": "Creates a Device Advisor test suite.
\nRequires permission to access the CreateSuiteDefinition action.
", "smithy.api#http": { "method": "POST", "uri": "/suiteDefinitions", @@ -108,7 +108,7 @@ "suiteDefinitionArn": { "target": "com.amazonaws.iotdeviceadvisor#AmazonResourceName", "traits": { - "smithy.api#documentation": "Creates a Device Advisor test suite with Amazon Resource name.
" + "smithy.api#documentation": "Creates a Device Advisor test suite with Amazon Resource Name (ARN).
" } }, "suiteDefinitionName": { @@ -142,7 +142,7 @@ } ], "traits": { - "smithy.api#documentation": "Deletes a Device Advisor test suite.
", + "smithy.api#documentation": "Deletes a Device Advisor test suite.
\nRequires permission to access the DeleteSuiteDefinition action.
", "smithy.api#http": { "method": "DELETE", "uri": "/suiteDefinitions/{suiteDefinitionId}", @@ -156,7 +156,7 @@ "suiteDefinitionId": { "target": "com.amazonaws.iotdeviceadvisor#UUID", "traits": { - "smithy.api#documentation": "Suite definition Id of the test suite to be deleted.
", + "smithy.api#documentation": "Suite definition ID of the test suite to be deleted.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -173,18 +173,18 @@ "thingArn": { "target": "com.amazonaws.iotdeviceadvisor#AmazonResourceName", "traits": { - "smithy.api#documentation": "Lists devices thing arn
" + "smithy.api#documentation": "Lists devices thing ARN.
" } }, "certificateArn": { "target": "com.amazonaws.iotdeviceadvisor#AmazonResourceName", "traits": { - "smithy.api#documentation": "Lists devices certificate arn
" + "smithy.api#documentation": "Lists devices certificate ARN.
" } } }, "traits": { - "smithy.api#documentation": "Lists all the devices under test
" + "smithy.api#documentation": "Information of a test device. A thing ARN or a certificate ARN is required.
" } }, "com.amazonaws.iotdeviceadvisor#DeviceUnderTestList": { @@ -199,12 +199,79 @@ } } }, + "com.amazonaws.iotdeviceadvisor#Endpoint": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 45, + "max": 75 + } + } + }, "com.amazonaws.iotdeviceadvisor#ErrorReason": { "type": "string" }, "com.amazonaws.iotdeviceadvisor#Failure": { "type": "string" }, + "com.amazonaws.iotdeviceadvisor#GetEndpoint": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotdeviceadvisor#GetEndpointRequest" + }, + "output": { + "target": "com.amazonaws.iotdeviceadvisor#GetEndpointResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotdeviceadvisor#InternalServerException" + }, + { + "target": "com.amazonaws.iotdeviceadvisor#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotdeviceadvisor#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Gets information about an Device Advisor endpoint.
", + "smithy.api#http": { + "method": "GET", + "uri": "/endpoint", + "code": 200 + } + } + }, + "com.amazonaws.iotdeviceadvisor#GetEndpointRequest": { + "type": "structure", + "members": { + "thingArn": { + "target": "com.amazonaws.iotdeviceadvisor#AmazonResourceName", + "traits": { + "smithy.api#documentation": "The thing ARN of the device. This is an optional parameter.
", + "smithy.api#httpQuery": "thingArn" + } + }, + "certificateArn": { + "target": "com.amazonaws.iotdeviceadvisor#AmazonResourceName", + "traits": { + "smithy.api#documentation": "The certificate ARN of the device. This is an optional parameter.
", + "smithy.api#httpQuery": "certificateArn" + } + } + } + }, + "com.amazonaws.iotdeviceadvisor#GetEndpointResponse": { + "type": "structure", + "members": { + "endpoint": { + "target": "com.amazonaws.iotdeviceadvisor#Endpoint", + "traits": { + "smithy.api#documentation": "The response of an Device Advisor endpoint.
" + } + } + } + }, "com.amazonaws.iotdeviceadvisor#GetSuiteDefinition": { "type": "operation", "input": { @@ -225,7 +292,7 @@ } ], "traits": { - "smithy.api#documentation": "Gets information about a Device Advisor test suite.
", + "smithy.api#documentation": "Gets information about a Device Advisor test suite.
\nRequires permission to access the GetSuiteDefinition action.
", "smithy.api#http": { "method": "GET", "uri": "/suiteDefinitions/{suiteDefinitionId}", @@ -239,7 +306,7 @@ "suiteDefinitionId": { "target": "com.amazonaws.iotdeviceadvisor#UUID", "traits": { - "smithy.api#documentation": "Suite definition Id of the test suite to get.
", + "smithy.api#documentation": "Suite definition ID of the test suite to get.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -259,7 +326,7 @@ "suiteDefinitionId": { "target": "com.amazonaws.iotdeviceadvisor#UUID", "traits": { - "smithy.api#documentation": "Suite definition Id of the suite definition.
" + "smithy.api#documentation": "Suite definition ID of the suite definition.
" } }, "suiteDefinitionArn": { @@ -326,7 +393,7 @@ } ], "traits": { - "smithy.api#documentation": "Gets information about a Device Advisor test suite run.
", + "smithy.api#documentation": "Gets information about a Device Advisor test suite run.
\nRequires permission to access the GetSuiteRun action.
", "smithy.api#http": { "method": "GET", "uri": "/suiteDefinitions/{suiteDefinitionId}/suiteRuns/{suiteRunId}", @@ -354,7 +421,7 @@ } ], "traits": { - "smithy.api#documentation": "Gets a report download link for a successful Device Advisor qualifying test suite run.
", + "smithy.api#documentation": "Gets a report download link for a successful Device Advisor qualifying test suite run.
\nRequires permission to access the GetSuiteRunReport action.
", "smithy.api#http": { "method": "GET", "uri": "/suiteDefinitions/{suiteDefinitionId}/suiteRuns/{suiteRunId}/report", @@ -368,7 +435,7 @@ "suiteDefinitionId": { "target": "com.amazonaws.iotdeviceadvisor#UUID", "traits": { - "smithy.api#documentation": "Suite definition Id of the test suite.
", + "smithy.api#documentation": "Suite definition ID of the test suite.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -376,7 +443,7 @@ "suiteRunId": { "target": "com.amazonaws.iotdeviceadvisor#UUID", "traits": { - "smithy.api#documentation": "Suite run Id of the test suite run.
", + "smithy.api#documentation": "Suite run ID of the test suite run.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -400,7 +467,7 @@ "suiteDefinitionId": { "target": "com.amazonaws.iotdeviceadvisor#UUID", "traits": { - "smithy.api#documentation": "Suite definition Id for the test suite run.
", + "smithy.api#documentation": "Suite definition ID for the test suite run.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -408,7 +475,7 @@ "suiteRunId": { "target": "com.amazonaws.iotdeviceadvisor#UUID", "traits": { - "smithy.api#documentation": "Suite run Id for the test suite run.
", + "smithy.api#documentation": "Suite run ID for the test suite run.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -421,7 +488,7 @@ "suiteDefinitionId": { "target": "com.amazonaws.iotdeviceadvisor#UUID", "traits": { - "smithy.api#documentation": "Suite definition Id for the test suite run.
" + "smithy.api#documentation": "Suite definition ID for the test suite run.
" } }, "suiteDefinitionVersion": { @@ -433,7 +500,7 @@ "suiteRunId": { "target": "com.amazonaws.iotdeviceadvisor#UUID", "traits": { - "smithy.api#documentation": "Suite run Id for the test suite run.
" + "smithy.api#documentation": "Suite run ID for the test suite run.
" } }, "suiteRunArn": { @@ -457,7 +524,7 @@ "startTime": { "target": "com.amazonaws.iotdeviceadvisor#Timestamp", "traits": { - "smithy.api#documentation": "Date (in Unix epoch time) when the test suite run was started.
" + "smithy.api#documentation": "Date (in Unix epoch time) when the test suite run started.
" } }, "endTime": { @@ -495,7 +562,7 @@ "groupId": { "target": "com.amazonaws.iotdeviceadvisor#UUID", "traits": { - "smithy.api#documentation": "Group result Id.
" + "smithy.api#documentation": "Group result ID.
" } }, "groupName": { @@ -533,18 +600,33 @@ "message": { "target": "com.amazonaws.iotdeviceadvisor#Message", "traits": { - "smithy.api#documentation": "Sends Internal Failure Exception message.
" + "smithy.api#documentation": "Sends an Internal Failure Exception message.
" } } }, "traits": { - "smithy.api#documentation": "Sends Internal Failure Exception.
", + "smithy.api#documentation": "Sends an Internal Failure exception.
", "smithy.api#error": "server", "smithy.api#httpError": 500 } }, "com.amazonaws.iotdeviceadvisor#IotSenateService": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "IotDeviceAdvisor", + "arnNamespace": "iotdeviceadvisor", + "cloudFormationName": "IotDeviceAdvisor", + "cloudTrailEventSource": "iotdeviceadvisor.amazonaws.com", + "endpointPrefix": "api.iotdeviceadvisor" + }, + "aws.auth#sigv4": { + "name": "iotdeviceadvisor" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "Amazon Web Services IoT Core Device Advisor is a cloud-based, fully managed test capability for\n validating IoT devices during device software development. Device Advisor provides\n pre-built tests that you can use to validate IoT devices for reliable and secure\n connectivity with Amazon Web Services IoT Core before deploying devices to production. By using Device Advisor,\n you can confirm that your devices can connect to Amazon Web Services IoT Core, follow security\n best practices and, if applicable, receive software updates from IoT Device Management.\n You can also download signed qualification reports to submit to the Amazon Web Services Partner Network\n to get your device qualified for the Amazon Web Services Partner Device Catalog without the need to send\n your device in and wait for it to be tested.
", + "smithy.api#title": "AWS IoT Core Device Advisor" + }, "version": "2020-09-18", "operations": [ { @@ -553,6 +635,9 @@ { "target": "com.amazonaws.iotdeviceadvisor#DeleteSuiteDefinition" }, + { + "target": "com.amazonaws.iotdeviceadvisor#GetEndpoint" + }, { "target": "com.amazonaws.iotdeviceadvisor#GetSuiteDefinition" }, @@ -586,22 +671,7 @@ { "target": "com.amazonaws.iotdeviceadvisor#UpdateSuiteDefinition" } - ], - "traits": { - "aws.api#service": { - "sdkId": "IotDeviceAdvisor", - "arnNamespace": "iotdeviceadvisor", - "cloudFormationName": "IotDeviceAdvisor", - "cloudTrailEventSource": "iotdeviceadvisor.amazonaws.com", - "endpointPrefix": "api.iotdeviceadvisor" - }, - "aws.auth#sigv4": { - "name": "iotdeviceadvisor" - }, - "aws.protocols#restJson1": {}, - "smithy.api#documentation": "AWS IoT Core Device Advisor is a cloud-based, fully managed test capability for validating IoT devices during device software development. Device Advisor provides pre-built tests that you can use to validate IoT devices for reliable and secure connectivity with AWS IoT Core before deploying devices to production. By using Device Advisor, you can confirm that your devices can connect to AWS IoT Core, follow security best practices and, if applicable, receive software updates from IoT Device Management. You can also download signed qualification reports to submit to the AWS Partner Network to get your device qualified for the AWS Partner Device Catalog without the need to send your device in and wait for it to be tested.
", - "smithy.api#title": "AWS IoT Core Device Advisor" - } + ] }, "com.amazonaws.iotdeviceadvisor#ListSuiteDefinitions": { "type": "operation", @@ -620,7 +690,7 @@ } ], "traits": { - "smithy.api#documentation": "Lists the Device Advisor test suites you have created.
", + "smithy.api#documentation": "Lists the Device Advisor test suites you have created.
\nRequires permission to access the ListSuiteDefinitions action.
", "smithy.api#http": { "method": "GET", "uri": "/suiteDefinitions", @@ -686,7 +756,7 @@ } ], "traits": { - "smithy.api#documentation": "Lists the runs of the specified Device Advisor test suite.\n You can list all runs of the test suite, or the runs of a specific version of the test suite.
", + "smithy.api#documentation": "Lists runs of the specified Device Advisor test suite. You can list all runs of the test\n suite, or the runs of a specific version of the test suite.
\nRequires permission to access the ListSuiteRuns action.
", "smithy.api#http": { "method": "GET", "uri": "/suiteRuns", @@ -705,14 +775,14 @@ "suiteDefinitionId": { "target": "com.amazonaws.iotdeviceadvisor#UUID", "traits": { - "smithy.api#documentation": "Lists the test suite runs of the specified test suite based on suite definition Id.
", + "smithy.api#documentation": "Lists the test suite runs of the specified test suite based on suite definition\n ID.
", "smithy.api#httpQuery": "suiteDefinitionId" } }, "suiteDefinitionVersion": { "target": "com.amazonaws.iotdeviceadvisor#SuiteDefinitionVersion", "traits": { - "smithy.api#documentation": "Must be passed along with suiteDefinitionId. Lists the test suite runs of the specified test suite based on suite definition version.
", + "smithy.api#documentation": "Must be passed along with suiteDefinitionId
. Lists the test suite runs of\n the specified test suite based on suite definition version.
Lists the tags attached to an IoT Device Advisor resource.
", + "smithy.api#documentation": "Lists the tags attached to an IoT Device Advisor resource.
\nRequires permission to access the ListTagsForResource action.
", "smithy.api#http": { "method": "GET", "uri": "/tags/{resourceArn}", @@ -822,6 +892,9 @@ } } }, + "com.amazonaws.iotdeviceadvisor#ParallelRun": { + "type": "boolean" + }, "com.amazonaws.iotdeviceadvisor#QualificationReportDownloadUrl": { "type": "string" }, @@ -831,12 +904,12 @@ "message": { "target": "com.amazonaws.iotdeviceadvisor#Message", "traits": { - "smithy.api#documentation": "Sends Resource Not Found Exception message.
" + "smithy.api#documentation": "Sends a Resource Not Found Exception message.
" } } }, "traits": { - "smithy.api#documentation": "Sends Resource Not Found Exception.
", + "smithy.api#documentation": "Sends a Resource Not Found exception.
", "smithy.api#error": "client", "smithy.api#httpError": 404 } @@ -882,7 +955,7 @@ } ], "traits": { - "smithy.api#documentation": "Starts a Device Advisor test suite run.
", + "smithy.api#documentation": "Starts a Device Advisor test suite run.
\nRequires permission to access the StartSuiteRun action.
", "smithy.api#http": { "method": "POST", "uri": "/suiteDefinitions/{suiteDefinitionId}/suiteRuns", @@ -896,7 +969,7 @@ "suiteDefinitionId": { "target": "com.amazonaws.iotdeviceadvisor#UUID", "traits": { - "smithy.api#documentation": "Suite definition Id of the test suite.
", + "smithy.api#documentation": "Suite definition ID of the test suite.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -927,19 +1000,19 @@ "suiteRunId": { "target": "com.amazonaws.iotdeviceadvisor#UUID", "traits": { - "smithy.api#documentation": "Suite Run Id of the started suite run.
" + "smithy.api#documentation": "Suite Run ID of the started suite run.
" } }, "suiteRunArn": { "target": "com.amazonaws.iotdeviceadvisor#AmazonResourceName", "traits": { - "smithy.api#documentation": "Amazon resource name of the started suite run.
" + "smithy.api#documentation": "Amazon Resource Name (ARN) of the started suite run.
" } }, "createdAt": { "target": "com.amazonaws.iotdeviceadvisor#Timestamp", "traits": { - "smithy.api#documentation": "Date (in Unix epoch time) when the suite run was created.
" + "smithy.api#documentation": "Starts a Device Advisor test suite run based on suite create time.
" } } } @@ -1007,7 +1080,7 @@ } ], "traits": { - "smithy.api#documentation": "Stops a Device Advisor test suite run that is currently running.
", + "smithy.api#documentation": "Stops a Device Advisor test suite run that is currently running.
\nRequires permission to access the StopSuiteRun action.
", "smithy.api#http": { "method": "POST", "uri": "/suiteDefinitions/{suiteDefinitionId}/suiteRuns/{suiteRunId}/stop", @@ -1021,7 +1094,7 @@ "suiteDefinitionId": { "target": "com.amazonaws.iotdeviceadvisor#UUID", "traits": { - "smithy.api#documentation": "Suite definition Id of the test suite run to be stopped.
", + "smithy.api#documentation": "Suite definition ID of the test suite run to be stopped.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1029,7 +1102,7 @@ "suiteRunId": { "target": "com.amazonaws.iotdeviceadvisor#UUID", "traits": { - "smithy.api#documentation": "Suite run Id of the test suite run to be stopped.
", + "smithy.api#documentation": "Suite run ID of the test suite run to be stopped.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1088,7 +1161,7 @@ "devicePermissionRoleArn": { "target": "com.amazonaws.iotdeviceadvisor#AmazonResourceName", "traits": { - "smithy.api#documentation": "Gets device permission arn.
" + "smithy.api#documentation": "Gets the device permission ARN.
" } } }, @@ -1102,7 +1175,7 @@ "suiteDefinitionId": { "target": "com.amazonaws.iotdeviceadvisor#UUID", "traits": { - "smithy.api#documentation": "Suite definition Id of the test suite.
" + "smithy.api#documentation": "Suite definition ID of the test suite.
" } }, "suiteDefinitionName": { @@ -1114,7 +1187,7 @@ "defaultDevices": { "target": "com.amazonaws.iotdeviceadvisor#DeviceUnderTestList", "traits": { - "smithy.api#documentation": "Specifies the devices under test for the test suite.
" + "smithy.api#documentation": "Specifies the devices that are under test for the test suite.
" } }, "intendedForQualification": { @@ -1172,6 +1245,12 @@ "traits": { "smithy.api#documentation": "Gets test case list.
" } + }, + "parallelRun": { + "target": "com.amazonaws.iotdeviceadvisor#ParallelRun", + "traits": { + "smithy.api#documentation": "TRUE if multiple test suites run in parallel.
" + } } }, "traits": { @@ -1184,7 +1263,7 @@ "suiteDefinitionId": { "target": "com.amazonaws.iotdeviceadvisor#UUID", "traits": { - "smithy.api#documentation": "Suite definition Id of the suite run.
" + "smithy.api#documentation": "Suite definition ID of the suite run.
" } }, "suiteDefinitionVersion": { @@ -1202,7 +1281,7 @@ "suiteRunId": { "target": "com.amazonaws.iotdeviceadvisor#UUID", "traits": { - "smithy.api#documentation": "Suite run Id of the suite run.
" + "smithy.api#documentation": "Suite run ID of the suite run.
" } }, "createdAt": { @@ -1243,7 +1322,7 @@ } }, "traits": { - "smithy.api#documentation": "Information about the suite run.
" + "smithy.api#documentation": "Information about the suite run.
\nRequires permission to access the SuiteRunInformation action.
" } }, "com.amazonaws.iotdeviceadvisor#SuiteRunResultCount": { @@ -1351,7 +1430,7 @@ } ], "traits": { - "smithy.api#documentation": "Adds to and modifies existing tags of an IoT Device Advisor resource.
", + "smithy.api#documentation": "Adds to and modifies existing tags of an IoT Device Advisor resource.
\nRequires permission to access the TagResource action.
", "smithy.api#http": { "method": "POST", "uri": "/tags/{resourceArn}", @@ -1392,25 +1471,25 @@ "testCaseRunId": { "target": "com.amazonaws.iotdeviceadvisor#UUID", "traits": { - "smithy.api#documentation": "Provides test case run Id.
" + "smithy.api#documentation": "Provides the test case run ID.
" } }, "testCaseDefinitionId": { "target": "com.amazonaws.iotdeviceadvisor#UUID", "traits": { - "smithy.api#documentation": "Provides test case run definition Id.
" + "smithy.api#documentation": "Provides the test case run definition ID.
" } }, "testCaseDefinitionName": { "target": "com.amazonaws.iotdeviceadvisor#TestCaseDefinitionName", "traits": { - "smithy.api#documentation": "Provides test case run definition Name.
" + "smithy.api#documentation": "Provides the test case run definition name.
" } }, "status": { "target": "com.amazonaws.iotdeviceadvisor#Status", "traits": { - "smithy.api#documentation": "Provides test case run status.
" + "smithy.api#documentation": "Provides the test case run status. Status is one of the following:
\n\n PASS
: Test passed.
\n FAIL
: Test failed.
\n PENDING
: Test has not started running but is scheduled.
\n RUNNING
: Test is running.
\n STOPPING
: Test is performing cleanup steps. You will see this status only if you stop a suite run.
\n STOPPED
Test is stopped. You will see this status only if you stop a suite run.
\n PASS_WITH_WARNINGS
: Test passed with warnings.
\n ERORR
: Test faced an error when running due to an internal issue.
Provides test case run log Url.
" + "smithy.api#documentation": "Provides test case run log URL.
" } }, "warnings": { @@ -1445,7 +1524,7 @@ } }, "traits": { - "smithy.api#documentation": "Provides test case run.
" + "smithy.api#documentation": "Provides the test case run.
" } }, "com.amazonaws.iotdeviceadvisor#TestCaseRuns": { @@ -1512,7 +1591,7 @@ } ], "traits": { - "smithy.api#documentation": "Removes tags from an IoT Device Advisor resource.
", + "smithy.api#documentation": "Removes tags from an IoT Device Advisor resource.
\nRequires permission to access the UntagResource action.
", "smithy.api#http": { "method": "DELETE", "uri": "/tags/{resourceArn}", @@ -1562,7 +1641,7 @@ } ], "traits": { - "smithy.api#documentation": "Updates a Device Advisor test suite.
", + "smithy.api#documentation": "Updates a Device Advisor test suite.
\nRequires permission to access the UpdateSuiteDefinition action.
", "smithy.api#http": { "method": "PATCH", "uri": "/suiteDefinitions/{suiteDefinitionId}", @@ -1576,7 +1655,7 @@ "suiteDefinitionId": { "target": "com.amazonaws.iotdeviceadvisor#UUID", "traits": { - "smithy.api#documentation": "Suite definition Id of the test suite to be updated.
", + "smithy.api#documentation": "Suite definition ID of the test suite to be updated.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1595,13 +1674,13 @@ "suiteDefinitionId": { "target": "com.amazonaws.iotdeviceadvisor#UUID", "traits": { - "smithy.api#documentation": "Suite definition Id of the updated test suite.
" + "smithy.api#documentation": "Suite definition ID of the updated test suite.
" } }, "suiteDefinitionArn": { "target": "com.amazonaws.iotdeviceadvisor#AmazonResourceName", "traits": { - "smithy.api#documentation": "Amazon Resource name of the updated test suite.
" + "smithy.api#documentation": "Amazon Resource Name (ARN) of the updated test suite.
" } }, "suiteDefinitionName": { @@ -1636,12 +1715,12 @@ "message": { "target": "com.amazonaws.iotdeviceadvisor#Message", "traits": { - "smithy.api#documentation": "Sends invalid request exception message.
" + "smithy.api#documentation": "Sends a Validation Exception message.
" } } }, "traits": { - "smithy.api#documentation": "Sends invalid request exception.
", + "smithy.api#documentation": "Sends a validation exception.
", "smithy.api#error": "client", "smithy.api#httpError": 400 } diff --git a/codegen/sdk-codegen/aws-models/iotsitewise.2019-12-02.json b/codegen/sdk-codegen/aws-models/iotsitewise.2019-12-02.json index cbde458f355..bedd1480c07 100644 --- a/codegen/sdk-codegen/aws-models/iotsitewise.2019-12-02.json +++ b/codegen/sdk-codegen/aws-models/iotsitewise.2019-12-02.json @@ -41,11 +41,29 @@ }, "com.amazonaws.iotsitewise#AWSIoTSiteWise": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "IoTSiteWise", + "arnNamespace": "iotsitewise", + "cloudFormationName": "IoTSiteWise", + "cloudTrailEventSource": "iotsitewise.amazonaws.com", + "endpointPrefix": "iotsitewise" + }, + "aws.auth#sigv4": { + "name": "iotsitewise" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "Welcome to the IoT SiteWise API Reference. IoT SiteWise is an Amazon Web Services service that connects Industrial Internet of Things (IIoT) devices to the power of the Amazon Web Services Cloud. For more information, see the\n IoT SiteWise User Guide. For information about IoT SiteWise quotas, see Quotas in the IoT SiteWise User Guide.
", + "smithy.api#title": "AWS IoT SiteWise" + }, "version": "2019-12-02", "operations": [ { "target": "com.amazonaws.iotsitewise#AssociateAssets" }, + { + "target": "com.amazonaws.iotsitewise#AssociateTimeSeriesToAssetProperty" + }, { "target": "com.amazonaws.iotsitewise#BatchAssociateProjectAssets" }, @@ -97,6 +115,9 @@ { "target": "com.amazonaws.iotsitewise#DeleteProject" }, + { + "target": "com.amazonaws.iotsitewise#DeleteTimeSeries" + }, { "target": "com.amazonaws.iotsitewise#DescribeAccessPolicy" }, @@ -133,9 +154,15 @@ { "target": "com.amazonaws.iotsitewise#DescribeStorageConfiguration" }, + { + "target": "com.amazonaws.iotsitewise#DescribeTimeSeries" + }, { "target": "com.amazonaws.iotsitewise#DisassociateAssets" }, + { + "target": "com.amazonaws.iotsitewise#DisassociateTimeSeriesFromAssetProperty" + }, { "target": "com.amazonaws.iotsitewise#GetAssetPropertyAggregates" }, @@ -181,6 +208,9 @@ { "target": "com.amazonaws.iotsitewise#ListTagsForResource" }, + { + "target": "com.amazonaws.iotsitewise#ListTimeSeries" + }, { "target": "com.amazonaws.iotsitewise#PutDefaultEncryptionConfiguration" }, @@ -223,22 +253,7 @@ { "target": "com.amazonaws.iotsitewise#UpdateProject" } - ], - "traits": { - "aws.api#service": { - "sdkId": "IoTSiteWise", - "arnNamespace": "iotsitewise", - "cloudFormationName": "IoTSiteWise", - "cloudTrailEventSource": "iotsitewise.amazonaws.com", - "endpointPrefix": "iotsitewise" - }, - "aws.auth#sigv4": { - "name": "iotsitewise" - }, - "aws.protocols#restJson1": {}, - "smithy.api#documentation": "Welcome to the IoT SiteWise API Reference. IoT SiteWise is an Amazon Web Services service that connects Industrial Internet of Things (IIoT) devices to the power of the Amazon Web Services Cloud. For more information, see the\n IoT SiteWise User Guide. For information about IoT SiteWise quotas, see Quotas in the IoT SiteWise User Guide.
", - "smithy.api#title": "AWS IoT SiteWise" - } + ] }, "com.amazonaws.iotsitewise#AccessPolicySummaries": { "type": "list", @@ -1280,6 +1295,76 @@ } } }, + "com.amazonaws.iotsitewise#AssociateTimeSeriesToAssetProperty": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotsitewise#AssociateTimeSeriesToAssetPropertyRequest" + }, + "errors": [ + { + "target": "com.amazonaws.iotsitewise#ConflictingOperationException" + }, + { + "target": "com.amazonaws.iotsitewise#InternalFailureException" + }, + { + "target": "com.amazonaws.iotsitewise#InvalidRequestException" + }, + { + "target": "com.amazonaws.iotsitewise#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotsitewise#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "Associates a time series (data stream) with an asset property.
", + "smithy.api#endpoint": { + "hostPrefix": "api." + }, + "smithy.api#http": { + "method": "POST", + "uri": "/timeseries/associate", + "code": 200 + } + } + }, + "com.amazonaws.iotsitewise#AssociateTimeSeriesToAssetPropertyRequest": { + "type": "structure", + "members": { + "alias": { + "target": "com.amazonaws.iotsitewise#PropertyAlias", + "traits": { + "smithy.api#documentation": "The alias that identifies the time series.
", + "smithy.api#httpQuery": "alias", + "smithy.api#required": {} + } + }, + "assetId": { + "target": "com.amazonaws.iotsitewise#ID", + "traits": { + "smithy.api#documentation": "The ID of the asset in which the asset property was created.
", + "smithy.api#httpQuery": "assetId", + "smithy.api#required": {} + } + }, + "propertyId": { + "target": "com.amazonaws.iotsitewise#ID", + "traits": { + "smithy.api#documentation": "The ID of the asset property.
", + "smithy.api#httpQuery": "propertyId", + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "com.amazonaws.iotsitewise#ClientToken", + "traits": { + "smithy.api#documentation": "A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.
", + "smithy.api#idempotencyToken": {} + } + } + } + }, "com.amazonaws.iotsitewise#AssociatedAssetsSummaries": { "type": "list", "member": { @@ -2492,7 +2577,7 @@ "portalAuthMode": { "target": "com.amazonaws.iotsitewise#AuthMode", "traits": { - "smithy.api#documentation": "The service to use to authenticate users to the portal. Choose from the following\n options:
\n\n SSO
– The portal uses Amazon Web Services Single Sign On to authenticate users and manage\n user permissions. Before you can create a portal that uses Amazon Web Services SSO, you must enable Amazon Web Services SSO.\n For more information, see Enabling Amazon Web Services SSO in the\n IoT SiteWise User Guide. This option is only available in Amazon Web Services Regions other than\n the China Regions.
\n IAM
– The portal uses Identity and Access Management to authenticate users and manage\n user permissions. This option is only available in the China Regions.
You can't change this value after you create a portal.
\nDefault: SSO
\n
The service to use to authenticate users to the portal. Choose from the following\n options:
\n\n SSO
– The portal uses Amazon Web Services Single Sign On to authenticate users and manage\n user permissions. Before you can create a portal that uses Amazon Web Services SSO, you must enable Amazon Web Services SSO.\n For more information, see Enabling Amazon Web Services SSO in the\n IoT SiteWise User Guide. This option is only available in Amazon Web Services Regions other than\n the China Regions.
\n IAM
– The portal uses Identity and Access Management to authenticate users and manage\n user permissions.
You can't change this value after you create a portal.
\nDefault: SSO
\n
Creates a project in the specified portal.
", + "smithy.api#documentation": "Creates a project in the specified portal.
\nMake sure that the project name and description don't contain confidential\n information.
\nThe ARN of the Amazon S3 object. For more information about how to find the ARN for an\n Amazon S3 object, see Amazon S3 resources in the\n Amazon Simple Storage Service User Guide.
", + "smithy.api#documentation": "The ARN of the Amazon S3 object. For more information about how to find the ARN for an\n Amazon S3 object, see Amazon S3 resources in the\n Amazon Simple Storage Service User Guide.
", "smithy.api#required": {} } }, @@ -3162,6 +3247,73 @@ "type": "structure", "members": {} }, + "com.amazonaws.iotsitewise#DeleteTimeSeries": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotsitewise#DeleteTimeSeriesRequest" + }, + "errors": [ + { + "target": "com.amazonaws.iotsitewise#ConflictingOperationException" + }, + { + "target": "com.amazonaws.iotsitewise#InternalFailureException" + }, + { + "target": "com.amazonaws.iotsitewise#InvalidRequestException" + }, + { + "target": "com.amazonaws.iotsitewise#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotsitewise#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes a time series (data stream). If you delete a time series that's associated with an\n asset property, the asset property still exists, but the time series will no longer be\n associated with this asset property.
\nTo identify a time series, do one of the following:
\nIf the time series isn't associated with an asset property, \n specify the alias
of the time series.
If the time series is associated with an asset property, \n specify one of the following:
\nThe alias
of the time series.
The assetId
and propertyId
that identifies the asset property.
The alias that identifies the time series.
", + "smithy.api#httpQuery": "alias" + } + }, + "assetId": { + "target": "com.amazonaws.iotsitewise#ID", + "traits": { + "smithy.api#documentation": "The ID of the asset in which the asset property was created.
", + "smithy.api#httpQuery": "assetId" + } + }, + "propertyId": { + "target": "com.amazonaws.iotsitewise#ID", + "traits": { + "smithy.api#documentation": "The ID of the asset property.
", + "smithy.api#httpQuery": "propertyId" + } + }, + "clientToken": { + "target": "com.amazonaws.iotsitewise#ClientToken", + "traits": { + "smithy.api#documentation": "A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.
", + "smithy.api#idempotencyToken": {} + } + } + } + }, "com.amazonaws.iotsitewise#DescribeAccessPolicy": { "type": "operation", "input": { @@ -3829,7 +3981,7 @@ "kmsKeyArn": { "target": "com.amazonaws.iotsitewise#ARN", "traits": { - "smithy.api#documentation": "The key ARN of the customer managed customer master key (CMK) used for KMS encryption if\n you use KMS_BASED_ENCRYPTION
.
The key ARN of the customer managed key used for KMS encryption if you use\n KMS_BASED_ENCRYPTION
.
The type of storage that you specified for your data. The storage type can be one of the following values:
\n\n SITEWISE_DEFAULT_STORAGE
– IoT SiteWise replicates your data into a service managed database.
\n MULTI_LAYER_STORAGE
– IoT SiteWise replicates your data into a service managed database and saves a copy of your raw data and metadata in an Amazon S3 object that you specified.
The storage tier that you specified for your data. \n The storageType
parameter can be one of the following values:
\n SITEWISE_DEFAULT_STORAGE
– IoT SiteWise saves your data into the hot tier. \n The hot tier is a service-managed database.
\n MULTI_LAYER_STORAGE
– IoT SiteWise saves your data in both the cold tier and the cold tier. \n The cold tier is a customer-managed Amazon S3 bucket.
Contains information about the storage destination.
" } }, - "configurationStatus": { - "target": "com.amazonaws.iotsitewise#ConfigurationStatus", + "disassociatedDataStorage": { + "target": "com.amazonaws.iotsitewise#DisassociatedDataStorageState", "traits": { - "smithy.api#required": {} + "smithy.api#documentation": "Contains the storage configuration for time series (data streams) that aren't associated with asset properties. \n The disassociatedDataStorage
can be one of the following values:
\n ENABLED
– IoT SiteWise accepts time series that aren't associated with asset properties.
After the disassociatedDataStorage
is enabled, you can't disable it.
\n DISABLED
– IoT SiteWise doesn't accept time series (data streams) that aren't associated with asset properties.
For more information, see Data streams \n in the IoT SiteWise User Guide.
" } }, - "lastUpdateDate": { - "target": "com.amazonaws.iotsitewise#Timestamp", + "retentionPeriod": { + "target": "com.amazonaws.iotsitewise#RetentionPeriod", "traits": { - "smithy.api#documentation": "The date the storage configuration was last updated, in Unix epoch time.
" + "smithy.api#documentation": "How many days your data is kept in the hot tier. By default, your data is kept indefinitely in the hot tier.
" } - } - } - }, - "com.amazonaws.iotsitewise#Description": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 2048 }, - "smithy.api#pattern": "^[^\\u0000-\\u001F\\u007F]+$" - } - }, - "com.amazonaws.iotsitewise#DetailedError": { - "type": "structure", - "members": { - "code": { - "target": "com.amazonaws.iotsitewise#DetailedErrorCode", + "configurationStatus": { + "target": "com.amazonaws.iotsitewise#ConfigurationStatus", "traits": { - "smithy.api#documentation": "The error code.
", "smithy.api#required": {} } }, - "message": { - "target": "com.amazonaws.iotsitewise#DetailedErrorMessage", + "lastUpdateDate": { + "target": "com.amazonaws.iotsitewise#Timestamp", "traits": { - "smithy.api#documentation": "The error message.
", - "smithy.api#required": {} + "smithy.api#documentation": "The date the storage configuration was last updated, in Unix epoch time.
" } } - }, - "traits": { - "smithy.api#documentation": "Contains detailed error information.
" - } - }, - "com.amazonaws.iotsitewise#DetailedErrorCode": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "INCOMPATIBLE_COMPUTE_LOCATION", - "name": "INCOMPATIBLE_COMPUTE_LOCATION" - }, - { - "value": "INCOMPATIBLE_FORWARDING_CONFIGURATION", - "name": "INCOMPATIBLE_FORWARDING_CONFIGURATION" - } - ] - } - }, - "com.amazonaws.iotsitewise#DetailedErrorMessage": { - "type": "string" - }, - "com.amazonaws.iotsitewise#DetailedErrors": { - "type": "list", - "member": { - "target": "com.amazonaws.iotsitewise#DetailedError" } }, - "com.amazonaws.iotsitewise#DisassociateAssets": { + "com.amazonaws.iotsitewise#DescribeTimeSeries": { "type": "operation", "input": { - "target": "com.amazonaws.iotsitewise#DisassociateAssetsRequest" + "target": "com.amazonaws.iotsitewise#DescribeTimeSeriesRequest" + }, + "output": { + "target": "com.amazonaws.iotsitewise#DescribeTimeSeriesResponse" }, "errors": [ - { - "target": "com.amazonaws.iotsitewise#ConflictingOperationException" - }, { "target": "com.amazonaws.iotsitewise#InternalFailureException" }, @@ -4511,51 +4619,309 @@ } ], "traits": { - "smithy.api#documentation": "Disassociates a child asset from the given parent asset through a hierarchy defined in the\n parent asset's model.
", + "smithy.api#documentation": "Retrieves information about a time series (data stream).
\nTo identify a time series, do one of the following:
\nIf the time series isn't associated with an asset property, \n specify the alias
of the time series.
If the time series is associated with an asset property, \n specify one of the following:
\nThe alias
of the time series.
The assetId
and propertyId
that identifies the asset property.
The ID of the parent asset from which to disassociate the child asset.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} + "smithy.api#documentation": "The alias that identifies the time series.
", + "smithy.api#httpQuery": "alias" } }, - "hierarchyId": { + "assetId": { "target": "com.amazonaws.iotsitewise#ID", "traits": { - "smithy.api#documentation": "The ID of a hierarchy in the parent asset's model. Hierarchies allow different groupings\n of assets to be formed that all come from the same asset model. You can use the hierarchy ID\n to identify the correct asset to disassociate. For more information, see\n Asset hierarchies in the IoT SiteWise User Guide.
", - "smithy.api#required": {} + "smithy.api#documentation": "The ID of the asset in which the asset property was created.
", + "smithy.api#httpQuery": "assetId" } }, - "childAssetId": { + "propertyId": { "target": "com.amazonaws.iotsitewise#ID", "traits": { - "smithy.api#documentation": "The ID of the child asset to disassociate.
", - "smithy.api#required": {} + "smithy.api#documentation": "The ID of the asset property.
", + "smithy.api#httpQuery": "propertyId" } - }, - "clientToken": { - "target": "com.amazonaws.iotsitewise#ClientToken", - "traits": { - "smithy.api#documentation": "A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.
", - "smithy.api#idempotencyToken": {} + } + } + }, + "com.amazonaws.iotsitewise#DescribeTimeSeriesResponse": { + "type": "structure", + "members": { + "assetId": { + "target": "com.amazonaws.iotsitewise#ID", + "traits": { + "smithy.api#documentation": "The ID of the asset in which the asset property was created.
" + } + }, + "propertyId": { + "target": "com.amazonaws.iotsitewise#ID", + "traits": { + "smithy.api#documentation": "The ID of the asset property.
" + } + }, + "alias": { + "target": "com.amazonaws.iotsitewise#PropertyAlias", + "traits": { + "smithy.api#documentation": "The alias that identifies the time series.
" + } + }, + "timeSeriesId": { + "target": "com.amazonaws.iotsitewise#TimeSeriesId", + "traits": { + "smithy.api#documentation": "The ID of the time series.
", + "smithy.api#required": {} + } + }, + "dataType": { + "target": "com.amazonaws.iotsitewise#PropertyDataType", + "traits": { + "smithy.api#documentation": "The data type of the time series.
\nIf you specify STRUCT
, you must also specify dataTypeSpec
to identify the type of the structure for this time series.
The data type of the structure for this time series. This parameter is required for time series \n that have the STRUCT
data type.
The options for this parameter depend on the type of the composite model \n in which you created the asset property that is associated with your time series. \n Use AWS/ALARM_STATE
for alarm state in alarm composite models.
The date that the time series was created, in Unix epoch time.
", + "smithy.api#required": {} + } + }, + "timeSeriesLastUpdateDate": { + "target": "com.amazonaws.iotsitewise#Timestamp", + "traits": { + "smithy.api#documentation": "The date that the time series was last updated, in Unix epoch time.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.iotsitewise#Description": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^[^\\u0000-\\u001F\\u007F]+$" + } + }, + "com.amazonaws.iotsitewise#DetailedError": { + "type": "structure", + "members": { + "code": { + "target": "com.amazonaws.iotsitewise#DetailedErrorCode", + "traits": { + "smithy.api#documentation": "The error code.
", + "smithy.api#required": {} + } + }, + "message": { + "target": "com.amazonaws.iotsitewise#DetailedErrorMessage", + "traits": { + "smithy.api#documentation": "The error message.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Contains detailed error information.
" + } + }, + "com.amazonaws.iotsitewise#DetailedErrorCode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "INCOMPATIBLE_COMPUTE_LOCATION", + "name": "INCOMPATIBLE_COMPUTE_LOCATION" + }, + { + "value": "INCOMPATIBLE_FORWARDING_CONFIGURATION", + "name": "INCOMPATIBLE_FORWARDING_CONFIGURATION" + } + ] + } + }, + "com.amazonaws.iotsitewise#DetailedErrorMessage": { + "type": "string" + }, + "com.amazonaws.iotsitewise#DetailedErrors": { + "type": "list", + "member": { + "target": "com.amazonaws.iotsitewise#DetailedError" + } + }, + "com.amazonaws.iotsitewise#DisassociateAssets": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotsitewise#DisassociateAssetsRequest" + }, + "errors": [ + { + "target": "com.amazonaws.iotsitewise#ConflictingOperationException" + }, + { + "target": "com.amazonaws.iotsitewise#InternalFailureException" + }, + { + "target": "com.amazonaws.iotsitewise#InvalidRequestException" + }, + { + "target": "com.amazonaws.iotsitewise#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotsitewise#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "Disassociates a child asset from the given parent asset through a hierarchy defined in the\n parent asset's model.
", + "smithy.api#endpoint": { + "hostPrefix": "api." + }, + "smithy.api#http": { + "method": "POST", + "uri": "/assets/{assetId}/disassociate", + "code": 200 + } + } + }, + "com.amazonaws.iotsitewise#DisassociateAssetsRequest": { + "type": "structure", + "members": { + "assetId": { + "target": "com.amazonaws.iotsitewise#ID", + "traits": { + "smithy.api#documentation": "The ID of the parent asset from which to disassociate the child asset.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} } + }, + "hierarchyId": { + "target": "com.amazonaws.iotsitewise#ID", + "traits": { + "smithy.api#documentation": "The ID of a hierarchy in the parent asset's model. Hierarchies allow different groupings\n of assets to be formed that all come from the same asset model. You can use the hierarchy ID\n to identify the correct asset to disassociate. For more information, see\n Asset hierarchies in the IoT SiteWise User Guide.
", + "smithy.api#required": {} + } + }, + "childAssetId": { + "target": "com.amazonaws.iotsitewise#ID", + "traits": { + "smithy.api#documentation": "The ID of the child asset to disassociate.
", + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "com.amazonaws.iotsitewise#ClientToken", + "traits": { + "smithy.api#documentation": "A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.
", + "smithy.api#idempotencyToken": {} + } + } + } + }, + "com.amazonaws.iotsitewise#DisassociateTimeSeriesFromAssetProperty": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotsitewise#DisassociateTimeSeriesFromAssetPropertyRequest" + }, + "errors": [ + { + "target": "com.amazonaws.iotsitewise#ConflictingOperationException" + }, + { + "target": "com.amazonaws.iotsitewise#InternalFailureException" + }, + { + "target": "com.amazonaws.iotsitewise#InvalidRequestException" + }, + { + "target": "com.amazonaws.iotsitewise#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotsitewise#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "Disassociates a time series (data stream) from an asset property.
", + "smithy.api#endpoint": { + "hostPrefix": "api." + }, + "smithy.api#http": { + "method": "POST", + "uri": "/timeseries/disassociate", + "code": 200 } } }, + "com.amazonaws.iotsitewise#DisassociateTimeSeriesFromAssetPropertyRequest": { + "type": "structure", + "members": { + "alias": { + "target": "com.amazonaws.iotsitewise#PropertyAlias", + "traits": { + "smithy.api#documentation": "The alias that identifies the time series.
", + "smithy.api#httpQuery": "alias", + "smithy.api#required": {} + } + }, + "assetId": { + "target": "com.amazonaws.iotsitewise#ID", + "traits": { + "smithy.api#documentation": "The ID of the asset in which the asset property was created.
", + "smithy.api#httpQuery": "assetId", + "smithy.api#required": {} + } + }, + "propertyId": { + "target": "com.amazonaws.iotsitewise#ID", + "traits": { + "smithy.api#documentation": "The ID of the asset property.
", + "smithy.api#httpQuery": "propertyId", + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "com.amazonaws.iotsitewise#ClientToken", + "traits": { + "smithy.api#documentation": "A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.
", + "smithy.api#idempotencyToken": {} + } + } + } + }, + "com.amazonaws.iotsitewise#DisassociatedDataStorageState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ENABLED", + "name": "ENABLED" + }, + { + "value": "DISABLED", + "name": "DISABLED" + } + ] + } + }, "com.amazonaws.iotsitewise#Email": { "type": "string", "traits": { @@ -5180,7 +5546,7 @@ } ], "traits": { - "smithy.api#documentation": "Get interpolated values for an asset property for a specified time interval, during a\n period of time. If your time series is missing data points during the specified time interval, \n you can use interpolation to estimate the missing data.
\nFor example, you can use this operation to return the interpolated\n temperature values for a wind turbine every 24 hours over a duration of 7 days.
\nTo identify an asset property, you must specify one of the following:
\nThe assetId
and propertyId
of an asset property.
A propertyAlias
, which is a data stream alias (for example,\n /company/windfarm/3/turbine/7/temperature
). To define an asset property's alias, see UpdateAssetProperty.
Get interpolated values for an asset property for a specified time interval, during a\n period of time. If your time series is missing data points during the specified time interval,\n you can use interpolation to estimate the missing data.
\nFor example, you can use this operation to return the interpolated temperature values for\n a wind turbine every 24 hours over a duration of 7 days.
\nTo identify an asset property, you must specify one of the following:
\nThe assetId
and propertyId
of an asset property.
A propertyAlias
, which is a data stream alias (for example,\n /company/windfarm/3/turbine/7/temperature
). To define an asset property's alias, see UpdateAssetProperty.
The interpolation type.
\nValid values: LINEAR_INTERPOLATION | LOCF_INTERPOLATION
\n
\n LINEAR_INTERPOLATION
– Estimates missing data using linear interpolation.
For example, you can use this operation to return the interpolated temperature values for a wind turbine every 24 hours over a duration of 7 days. \n If the interpolation starts on July 1, 2021, at 9 AM, IoT SiteWise returns the first interpolated value on July 2, 2021, at 9 AM, the second interpolated value \n on July 3, 2021, at 9 AM, and so on.
\n\n LOCF_INTERPOLATION
– Estimates missing data using last observation carried forward interpolation
If no data point is found for an interval, \n IoT SiteWise returns the last observed data point for the previous interval \n and carries forward this interpolated value until a new data point is found.
\nFor example, you can get the state of an on-off valve every 24 hours over a duration of 7 days. \n If the interpolation starts on July 1, 2021, at 9 AM, IoT SiteWise returns the last observed data point between July 1, 2021, \n at 9 AM and July 2, 2021, at 9 AM as the first interpolated value. \n If no data point is found after 9 AM on July 2, 2021, IoT SiteWise uses the same interpolated value for the rest of the days.
\nThe interpolation type.
\nValid values: LINEAR_INTERPOLATION | LOCF_INTERPOLATION
\n
\n LINEAR_INTERPOLATION
– Estimates missing data using linear\n interpolation.
For example, you can use this operation to return the interpolated temperature values\n for a wind turbine every 24 hours over a duration of 7 days. If the interpolation starts\n July 1, 2021, at 9 AM, IoT SiteWise returns the first interpolated value on July 2, 2021, at 9 AM,\n the second interpolated value on July 3, 2021, at 9 AM, and so on.
\n\n LOCF_INTERPOLATION
– Estimates missing data using last observation\n carried forward interpolation
If no data point is found for an interval, IoT SiteWise returns the last observed data point\n for the previous interval and carries forward this interpolated value until a new data\n point is found.
\nFor example, you can get the state of an on-off valve every 24 hours over a duration\n of 7 days. If the interpolation starts July 1, 2021, at 9 AM, IoT SiteWise returns the last\n observed data point between July 1, 2021, at 9 AM and July 2, 2021, at 9 AM as the first\n interpolated value. If a data point isn't found after 9 AM on July 2, 2021, IoT SiteWise uses the\n same interpolated value for the rest of the days.
\nThe query interval for the window in seconds. IoT SiteWise computes each interpolated value by using data points \n from the timestamp of each interval minus the window to the timestamp of each interval plus the window. \n If not specified, the window is between the start time minus the interval and the end time plus the interval.
\nIf you specify a value for the intervalWindowInSeconds
parameter, \n the type
parameter must be LINEAR_INTERPOLATION
.
If no data point is found during the specified query window, \n IoT SiteWise won't return an interpolated value for the interval. \n This indicates that there's a gap in the ingested data points.
\nFor example, you can get the interpolated temperature values for a wind turbine \n every 24 hours over a duration of 7 days. If the interpolation starts on July 1, 2021, \n at 9 AM with a window of 2 hours, IoT SiteWise uses the data points from 7 AM (9 AM - 2 hours) \n to 11 AM (9 AM + 2 hours) on July 2, 2021 to compute the first interpolated value, \n uses the data points from 7 AM (9 AM - 2 hours) to 11 AM (9 AM + 2 hours) on July 3, 2021 \n to compute the second interpolated value, and so on.
", + "smithy.api#documentation": "The query interval for the window, in seconds. IoT SiteWise computes each interpolated value by\n using data points from the timestamp of each interval, minus the window to the timestamp of\n each interval plus the window. If not specified, the window ranges between the start time\n minus the interval and the end time plus the interval.
\nIf you specify a value for the intervalWindowInSeconds
parameter, the\n value for the type
parameter must be\n LINEAR_INTERPOLATION
.
If a data point isn't found during the specified query window, IoT SiteWise won't return an\n interpolated value for the interval. This indicates that there's a gap in the ingested\n data points.
\nFor example, you can get the interpolated temperature values for a wind turbine every 24\n hours over a duration of 7 days. If the interpolation starts on July 1, 2021, at 9 AM with a\n window of 2 hours, IoT SiteWise uses the data points from 7 AM (9 AM minus 2 hours) to 11 AM (9 AM\n plus 2 hours) on July 2, 2021 to compute the first interpolated value. Next, IoT SiteWise uses the\n data points from 7 AM (9 AM minus 2 hours) to 11 AM (9 AM plus 2 hours) on July 3, 2021 to\n compute the second interpolated value, and so on.
", "smithy.api#httpQuery": "intervalWindowInSeconds" } } @@ -5342,7 +5708,7 @@ } }, "traits": { - "smithy.api#documentation": "Contains details for a gateway that runs on IoT Greengrass V2. To create a gateway that runs on IoT Greengrass V2, \n you must deploy the IoT SiteWise Edge component to your gateway device. \n Your Greengrass device role \n must use the AWSIoTSiteWiseEdgeAccess
policy. For more information, \n see Using IoT SiteWise at the edge \n in the IoT SiteWise User Guide.
Contains details for a gateway that runs on IoT Greengrass V2. To create a gateway that runs on IoT Greengrass\n V2, you must deploy the IoT SiteWise Edge component to your gateway device. Your Greengrass\n device role must use the AWSIoTSiteWiseEdgeAccess
policy. For more\n information, see Using IoT SiteWise at the edge in the\n IoT SiteWise User Guide.
Retrieves a paginated list of time series (data streams).
", + "smithy.api#endpoint": { + "hostPrefix": "api." + }, + "smithy.api#http": { + "method": "GET", + "uri": "/timeseries", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults" + } + } + }, + "com.amazonaws.iotsitewise#ListTimeSeriesRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.iotsitewise#NextToken", + "traits": { + "smithy.api#documentation": "The token to be used for the next set of paginated results.
", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.iotsitewise#MaxResults", + "traits": { + "smithy.api#documentation": "The maximum number of results to return for each paginated request.
", + "smithy.api#httpQuery": "maxResults" + } + }, + "assetId": { + "target": "com.amazonaws.iotsitewise#ID", + "traits": { + "smithy.api#documentation": "The ID of the asset in which the asset property was created.
", + "smithy.api#httpQuery": "assetId" + } + }, + "aliasPrefix": { + "target": "com.amazonaws.iotsitewise#PropertyAlias", + "traits": { + "smithy.api#documentation": "The alias prefix of the time series.
", + "smithy.api#httpQuery": "aliasPrefix" + } + }, + "timeSeriesType": { + "target": "com.amazonaws.iotsitewise#ListTimeSeriesType", + "traits": { + "smithy.api#documentation": "The type of the time series. The time series type can be one of the following\n values:
\n\n ASSOCIATED
– The time series is associated with an asset\n property.
\n DISASSOCIATED
– The time series isn't associated with any asset\n property.
One or more time series summaries to list.
", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.iotsitewise#NextToken", + "traits": { + "smithy.api#documentation": "The token for the next set of results, or null if there are no additional results.
" + } + } + } + }, + "com.amazonaws.iotsitewise#ListTimeSeriesType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ASSOCIATED", + "name": "ASSOCIATED" + }, + { + "value": "DISASSOCIATED", + "name": "DISASSOCIATED" + } + ] + } + }, "com.amazonaws.iotsitewise#LoggingLevel": { "type": "string", "traits": { @@ -6839,6 +7317,15 @@ "smithy.api#pattern": "^[A-Za-z0-9+/=]+$" } }, + "com.amazonaws.iotsitewise#NumberOfDays": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 30 + } + } + }, "com.amazonaws.iotsitewise#Offset": { "type": "string", "traits": { @@ -7363,7 +7850,7 @@ "kmsKeyId": { "target": "com.amazonaws.iotsitewise#KmsKeyId", "traits": { - "smithy.api#documentation": "The Key ID of the customer managed customer master key (CMK) used for KMS encryption.\n This is required if you use KMS_BASED_ENCRYPTION
.
The Key ID of the customer managed key used for KMS encryption. This is required if you\n use KMS_BASED_ENCRYPTION
.
The Key ARN of the KMS CMK used for KMS encryption if you use\n KMS_BASED_ENCRYPTION
.
The Key ARN of the KMS key used for KMS encryption if you use\n KMS_BASED_ENCRYPTION
.
The type of storage that you specified for your data. The storage type can be one of the following values:
\n\n SITEWISE_DEFAULT_STORAGE
– IoT SiteWise replicates your data into a service managed database.
\n MULTI_LAYER_STORAGE
– IoT SiteWise replicates your data into a service managed database and saves a copy of your raw data and metadata in an Amazon S3 object that you specified.
The storage tier that you specified for your data. \n The storageType
parameter can be one of the following values:
\n SITEWISE_DEFAULT_STORAGE
– IoT SiteWise saves your data into the hot tier. \n The hot tier is a service-managed database.
\n MULTI_LAYER_STORAGE
– IoT SiteWise saves your data in both the cold tier and the cold tier. \n The cold tier is a customer-managed Amazon S3 bucket.
Identifies a storage destination. If you specified MULTI_LAYER_STORAGE
for the storage type, \n you must specify a MultiLayerStorage
object.
Contains the storage configuration for time series (data streams) that aren't associated with asset properties. \n The disassociatedDataStorage
can be one of the following values:
\n ENABLED
– IoT SiteWise accepts time series that aren't associated with asset properties.
After the disassociatedDataStorage
is enabled, you can't disable it.
\n DISABLED
– IoT SiteWise doesn't accept time series (data streams) that aren't associated with asset properties.
For more information, see Data streams \n in the IoT SiteWise User Guide.
" + } + }, + "retentionPeriod": { + "target": "com.amazonaws.iotsitewise#RetentionPeriod" } } }, @@ -7513,7 +8009,7 @@ "storageType": { "target": "com.amazonaws.iotsitewise#StorageType", "traits": { - "smithy.api#documentation": "The type of storage that you specified for your data. The storage type can be one of the following values:
\n\n SITEWISE_DEFAULT_STORAGE
– IoT SiteWise replicates your data into a service managed database.
\n MULTI_LAYER_STORAGE
– IoT SiteWise replicates your data into a service managed database and saves a copy of your raw data and metadata in an Amazon S3 object that you specified.
The storage tier that you specified for your data. \n The storageType
parameter can be one of the following values:
\n SITEWISE_DEFAULT_STORAGE
– IoT SiteWise saves your data into the hot tier. \n The hot tier is a service-managed database.
\n MULTI_LAYER_STORAGE
– IoT SiteWise saves your data in both the cold tier and the cold tier. \n The cold tier is a customer-managed Amazon S3 bucket.
Contains information about the storage destination.
" } }, + "disassociatedDataStorage": { + "target": "com.amazonaws.iotsitewise#DisassociatedDataStorageState", + "traits": { + "smithy.api#documentation": "Contains the storage configuration for time series (data streams) that aren't associated with asset properties. \n The disassociatedDataStorage
can be one of the following values:
\n ENABLED
– IoT SiteWise accepts time series that aren't associated with asset properties.
After the disassociatedDataStorage
is enabled, you can't disable it.
\n DISABLED
– IoT SiteWise doesn't accept time series (data streams) that aren't associated with asset properties.
For more information, see Data streams \n in the IoT SiteWise User Guide.
" + } + }, + "retentionPeriod": { + "target": "com.amazonaws.iotsitewise#RetentionPeriod" + }, "configurationStatus": { "target": "com.amazonaws.iotsitewise#ConfigurationStatus", "traits": { @@ -7659,6 +8164,26 @@ ] } }, + "com.amazonaws.iotsitewise#RetentionPeriod": { + "type": "structure", + "members": { + "numberOfDays": { + "target": "com.amazonaws.iotsitewise#NumberOfDays", + "traits": { + "smithy.api#documentation": "The number of days that your data is kept.
\nIf you specified a value for this parameter, the unlimited
parameter must\n be false
.
If true, your data is kept indefinitely.
\nIf configured to true
, you must not specify a value for the\n numberOfDays
parameter.
How many days your data is kept in the hot tier. By default, your data is kept indefinitely in the hot tier.
" + } + }, "com.amazonaws.iotsitewise#SSOApplicationId": { "type": "string", "traits": { @@ -7877,6 +8402,81 @@ ] } }, + "com.amazonaws.iotsitewise#TimeSeriesId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 36, + "max": 73 + } + } + }, + "com.amazonaws.iotsitewise#TimeSeriesSummaries": { + "type": "list", + "member": { + "target": "com.amazonaws.iotsitewise#TimeSeriesSummary" + } + }, + "com.amazonaws.iotsitewise#TimeSeriesSummary": { + "type": "structure", + "members": { + "assetId": { + "target": "com.amazonaws.iotsitewise#ID", + "traits": { + "smithy.api#documentation": "The ID of the asset in which the asset property was created.
" + } + }, + "propertyId": { + "target": "com.amazonaws.iotsitewise#ID", + "traits": { + "smithy.api#documentation": "The ID of the asset property.
" + } + }, + "alias": { + "target": "com.amazonaws.iotsitewise#PropertyAlias", + "traits": { + "smithy.api#documentation": "The alias that identifies the time series.
" + } + }, + "timeSeriesId": { + "target": "com.amazonaws.iotsitewise#TimeSeriesId", + "traits": { + "smithy.api#documentation": "The ID of the time series.
", + "smithy.api#required": {} + } + }, + "dataType": { + "target": "com.amazonaws.iotsitewise#PropertyDataType", + "traits": { + "smithy.api#documentation": "The data type of the time series.
\nIf you specify STRUCT
, you must also specify dataTypeSpec
to identify the type of the structure for this time series.
The data type of the structure for this time series. This parameter is required for time series \n that have the STRUCT
data type.
The options for this parameter depend on the type of the composite model \n in which you created the asset property that is associated with your time series. \n Use AWS/ALARM_STATE
for alarm state in alarm composite models.
The date that the time series was created, in Unix epoch time.
", + "smithy.api#required": {} + } + }, + "timeSeriesLastUpdateDate": { + "target": "com.amazonaws.iotsitewise#Timestamp", + "traits": { + "smithy.api#documentation": "The date that the time series was last updated, in Unix epoch time.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Contains a summary of a time series (data stream).
" + } + }, "com.amazonaws.iotsitewise#Timestamp": { "type": "timestamp" }, @@ -7983,19 +8583,19 @@ "interval": { "target": "com.amazonaws.iotsitewise#Interval", "traits": { - "smithy.api#documentation": "The time interval for the tumbling window. The interval time must be between 1 minute and 1 week.
\nIoT SiteWise computes the 1w
interval the end of Sunday at midnight\n each week (UTC), the 1d
interval at the end of each day at midnight (UTC), the\n 1h
interval at the end of each hour, and so on.
When IoT SiteWise aggregates data points for metric computations, the start of each interval is\n exclusive and the end of each interval is inclusive. IoT SiteWise places the computed data point at\n the end of the interval.
", + "smithy.api#documentation": "The time interval for the tumbling window. The interval time must be between 1 minute and\n 1 week.
\nIoT SiteWise computes the 1w
interval the end of Sunday at midnight each week (UTC),\n the 1d
interval at the end of each day at midnight (UTC), the 1h
\n interval at the end of each hour, and so on.
When IoT SiteWise aggregates data points for metric computations, the start of each interval is\n exclusive and the end of each interval is inclusive. IoT SiteWise places the computed data point at\n the end of the interval.
", "smithy.api#required": {} } }, "offset": { "target": "com.amazonaws.iotsitewise#Offset", "traits": { - "smithy.api#documentation": "The offset for the tumbling window. The offset
parameter accepts the following:
The offset time.
\nFor example, if you specify 18h
for offset
\n and 1d
for interval
, IoT SiteWise aggregates data in one of the following ways:
If you create the metric before or at 6:00 PM (UTC), \n you get the first aggregation result at 6 PM (UTC) on the day when you create the metric.
\nIf you create the metric after 6:00 PM (UTC), \n you get the first aggregation result at 6 PM (UTC) the next day.
\nThe ISO 8601 format.
\nFor example, if you specify PT18H
for offset
\n and 1d
for interval
, IoT SiteWise aggregates data in one of the following ways:
If you create the metric before or at 6:00 PM (UTC), \n you get the first aggregation result at 6 PM (UTC) on the day when you create the metric.
\nIf you create the metric after 6:00 PM (UTC), \n you get the first aggregation result at 6 PM (UTC) the next day.
\nThe 24-hour clock.
\nFor example, if you specify 00:03:00
for offset
\n and 5m
for interval
, and you create the metric at 2 PM (UTC), \n you get the first aggregation result at 2:03 PM (UTC). \n You get the second aggregation result at 2:08 PM (UTC).
The offset time zone.
\nFor example, if you specify 2021-07-23T18:00-08
for offset
\n and 1d
for interval
, IoT SiteWise aggregates data in one of the following ways:
If you create the metric before or at 6:00 PM (PST), \n you get the first aggregation result at 6 PM (PST) on the day when you create the metric.
\nIf you create the metric after 6:00 PM (PST), \n you get the first aggregation result at 6 PM (PST) the next day.
\nThe offset for the tumbling window. The offset
parameter accepts the\n following:
The offset time.
\nFor example, if you specify 18h
for offset
and\n 1d
for interval
, IoT SiteWise aggregates data in one of the following\n ways:
If you create the metric before or at 6 PM (UTC), you get the first aggregation\n result at 6 PM (UTC) on the day when you create the metric.
\nIf you create the metric after 6 PM (UTC), you get the first aggregation result at\n 6 PM (UTC) the next day.
\nThe ISO 8601 format.
\nFor example, if you specify PT18H
for offset
and\n 1d
for interval
, IoT SiteWise aggregates data in one of the following\n ways:
If you create the metric before or at 6 PM (UTC), you get the first aggregation\n result at 6 PM (UTC) on the day when you create the metric.
\nIf you create the metric after 6 PM (UTC), you get the first aggregation result at\n 6 PM (UTC) the next day.
\nThe 24-hour clock.
\nFor example, if you specify 00:03:00
for offset
,\n 5m
for interval
, and you create the metric at 2 PM (UTC), you\n get the first aggregation result at 2:03 PM (UTC). You get the second aggregation result\n at 2:08 PM (UTC).
The offset time zone.
\nFor example, if you specify 2021-07-23T18:00-08
for offset
\n and 1d
for interval
, IoT SiteWise aggregates data in one of the\n following ways:
If you create the metric before or at 6 PM (PST), you get the first aggregation\n result at 6 PM (PST) on the day when you create the metric.
\nIf you create the metric after 6 PM (PST), you get the first aggregation result at\n 6 PM (PST) the next day.
\nContains a tumbling window, which is a repeating fixed-sized, non-overlapping, and\n contiguous time window. You use this window in metrics to aggregate data from properties and other assets.
\nYou can use m
, h
, d
, and w
\n when you specify an interval or offset. Note that m
represents minutes, \n and w
represents weeks. You can also use s
to represent seconds \n in offset
.
The interval
and offset
parameters support the \n ISO 8601 format. \n For example, PT5S
represents five seconds, PT5M
represents five minutes, \n and PT5H
represents five hours.
Contains a tumbling window, which is a repeating fixed-sized, non-overlapping, and\n contiguous time window. You can use this window in metrics to aggregate data from properties\n and other assets.
\nYou can use m
, h
, d
, and w
when you\n specify an interval or offset. Note that m
represents minutes, h
\n represents hours, d
represents days, and w
represents weeks. You can\n also use s
to represent seconds in offset
.
The interval
and offset
parameters support the ISO 8601 format. For example,\n PT5S
represents 5 seconds, PT5M
represents 5 minutes, and\n PT5H
represents 5 hours.
Get NetworkAnalyzer configuration.
", + "smithy.api#http": { + "method": "GET", + "uri": "/network-analyzer-configurations/{ConfigurationName}", + "code": 200 + } + } + }, + "com.amazonaws.iotwireless#GetNetworkAnalyzerConfigurationRequest": { + "type": "structure", + "members": { + "ConfigurationName": { + "target": "com.amazonaws.iotwireless#NetworkAnalyzerConfigurationName", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.iotwireless#GetNetworkAnalyzerConfigurationResponse": { + "type": "structure", + "members": { + "TraceContent": { + "target": "com.amazonaws.iotwireless#TraceContent" + }, + "WirelessDevices": { + "target": "com.amazonaws.iotwireless#WirelessDeviceList", + "traits": { + "smithy.api#documentation": "List of WirelessDevices in the NetworkAnalyzerConfiguration.
" + } + }, + "WirelessGateways": { + "target": "com.amazonaws.iotwireless#WirelessGatewayList", + "traits": { + "smithy.api#documentation": "List of WirelessGateways in the NetworkAnalyzerConfiguration.
" + } + } + } + }, "com.amazonaws.iotwireless#GetPartnerAccount": { "type": "operation", "input": { @@ -6279,6 +6345,17 @@ } } }, + "com.amazonaws.iotwireless#NetworkAnalyzerConfigurationName": { + "type": "string", + "traits": { + "smithy.api#documentation": "NetworkAnalyzer configuration name.
", + "smithy.api#length": { + "min": 1, + "max": 1024 + }, + "smithy.api#pattern": "^NetworkAnalyzerConfig_Default$" + } + }, "com.amazonaws.iotwireless#NextToken": { "type": "string", "traits": { @@ -7815,6 +7892,20 @@ "smithy.api#httpError": 400 } }, + "com.amazonaws.iotwireless#TraceContent": { + "type": "structure", + "members": { + "WirelessDeviceFrameInfo": { + "target": "com.amazonaws.iotwireless#WirelessDeviceFrameInfo" + }, + "LogLevel": { + "target": "com.amazonaws.iotwireless#LogLevel" + } + }, + "traits": { + "smithy.api#documentation": "Trace Content for resources.
" + } + }, "com.amazonaws.iotwireless#TransmitMode": { "type": "integer", "traits": { @@ -8182,6 +8273,83 @@ "type": "structure", "members": {} }, + "com.amazonaws.iotwireless#UpdateNetworkAnalyzerConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotwireless#UpdateNetworkAnalyzerConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.iotwireless#UpdateNetworkAnalyzerConfigurationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotwireless#AccessDeniedException" + }, + { + "target": "com.amazonaws.iotwireless#InternalServerException" + }, + { + "target": "com.amazonaws.iotwireless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotwireless#ThrottlingException" + }, + { + "target": "com.amazonaws.iotwireless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Update NetworkAnalyzer configuration.
", + "smithy.api#http": { + "method": "PATCH", + "uri": "/network-analyzer-configurations/{ConfigurationName}", + "code": 204 + } + } + }, + "com.amazonaws.iotwireless#UpdateNetworkAnalyzerConfigurationRequest": { + "type": "structure", + "members": { + "ConfigurationName": { + "target": "com.amazonaws.iotwireless#NetworkAnalyzerConfigurationName", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "TraceContent": { + "target": "com.amazonaws.iotwireless#TraceContent" + }, + "WirelessDevicesToAdd": { + "target": "com.amazonaws.iotwireless#WirelessDeviceList", + "traits": { + "smithy.api#documentation": "WirelessDevices to add into NetworkAnalyzerConfiguration.
" + } + }, + "WirelessDevicesToRemove": { + "target": "com.amazonaws.iotwireless#WirelessDeviceList", + "traits": { + "smithy.api#documentation": "WirelessDevices to remove from NetworkAnalyzerConfiguration.
" + } + }, + "WirelessGatewaysToAdd": { + "target": "com.amazonaws.iotwireless#WirelessGatewayList", + "traits": { + "smithy.api#documentation": "WirelessGateways to add into NetworkAnalyzerConfiguration.
" + } + }, + "WirelessGatewaysToRemove": { + "target": "com.amazonaws.iotwireless#WirelessGatewayList", + "traits": { + "smithy.api#documentation": "WirelessGateways to remove from NetworkAnalyzerConfiguration.
" + } + } + } + }, + "com.amazonaws.iotwireless#UpdateNetworkAnalyzerConfigurationResponse": { + "type": "structure", + "members": {} + }, "com.amazonaws.iotwireless#UpdatePartnerAccount": { "type": "operation", "input": { @@ -8604,6 +8772,22 @@ "smithy.api#documentation": "The list of wireless device event log options.
" } }, + "com.amazonaws.iotwireless#WirelessDeviceFrameInfo": { + "type": "string", + "traits": { + "smithy.api#documentation": "WirelessDevice FrameInfo for trace content.
", + "smithy.api#enum": [ + { + "value": "ENABLED", + "name": "ENABLED" + }, + { + "value": "DISABLED", + "name": "DISABLED" + } + ] + } + }, "com.amazonaws.iotwireless#WirelessDeviceId": { "type": "string", "traits": { @@ -8637,6 +8821,18 @@ ] } }, + "com.amazonaws.iotwireless#WirelessDeviceList": { + "type": "list", + "member": { + "target": "com.amazonaws.iotwireless#WirelessDeviceId" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 250 + } + } + }, "com.amazonaws.iotwireless#WirelessDeviceLogOption": { "type": "structure", "members": { @@ -8844,6 +9040,12 @@ ] } }, + "com.amazonaws.iotwireless#WirelessGatewayList": { + "type": "list", + "member": { + "target": "com.amazonaws.iotwireless#WirelessGatewayId" + } + }, "com.amazonaws.iotwireless#WirelessGatewayLogOption": { "type": "structure", "members": { @@ -9054,6 +9256,21 @@ }, "com.amazonaws.iotwireless#iotwireless": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "IoT Wireless", + "arnNamespace": "iotwireless", + "cloudFormationName": "IoTWireless", + "cloudTrailEventSource": "iotwireless.amazonaws.com", + "endpointPrefix": "api.iotwireless" + }, + "aws.auth#sigv4": { + "name": "iotwireless" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "AWS IoT Wireless API documentation
", + "smithy.api#title": "AWS IoT Wireless" + }, "version": "2020-11-22", "operations": [ { @@ -9173,6 +9390,9 @@ { "target": "com.amazonaws.iotwireless#GetMulticastGroupSession" }, + { + "target": "com.amazonaws.iotwireless#GetNetworkAnalyzerConfiguration" + }, { "target": "com.amazonaws.iotwireless#GetPartnerAccount" }, @@ -9293,6 +9513,9 @@ { "target": "com.amazonaws.iotwireless#UpdateMulticastGroup" }, + { + "target": "com.amazonaws.iotwireless#UpdateNetworkAnalyzerConfiguration" + }, { "target": "com.amazonaws.iotwireless#UpdatePartnerAccount" }, @@ -9305,22 +9528,7 @@ { "target": "com.amazonaws.iotwireless#UpdateWirelessGateway" } - ], - "traits": { - "aws.api#service": { - "sdkId": "IoT Wireless", - "arnNamespace": "iotwireless", - "cloudFormationName": "IoTWireless", - "cloudTrailEventSource": "iotwireless.amazonaws.com", - "endpointPrefix": "api.iotwireless" - }, - "aws.auth#sigv4": { - "name": "iotwireless" - }, - "aws.protocols#restJson1": {}, - "smithy.api#documentation": "AWS IoT Wireless API documentation
", - "smithy.api#title": "AWS IoT Wireless" - } + ] } } } diff --git a/codegen/sdk-codegen/aws-models/lambda.2015-03-31.json b/codegen/sdk-codegen/aws-models/lambda.2015-03-31.json index 9ef90bdc393..29e177920e1 100644 --- a/codegen/sdk-codegen/aws-models/lambda.2015-03-31.json +++ b/codegen/sdk-codegen/aws-models/lambda.2015-03-31.json @@ -43,7 +43,7 @@ "name": "lambda" }, "aws.protocols#restJson1": {}, - "smithy.api#documentation": "\n Overview\n
\nLambda is a compute service that lets you run code without provisioning or managing servers.\n Lambda runs your code on a high-availability compute infrastructure and performs all of the\n administration of the compute resources, including server and operating system maintenance, capacity provisioning\n and automatic scaling, code monitoring and logging. With Lambda, you can run code for virtually any\n type of application or backend service. For more information about the Lambda service, see What is Lambda in the Lambda Developer Guide.
\nThe Lambda API Reference provides information about\n each of the API methods, including details about the parameters in each API request and\n response.
\n \nYou can use Software Development Kits (SDKs), Integrated Development Environment (IDE) Toolkits, and command\n line tools to access the API. For installation instructions, see Tools for\n Amazon Web Services.
\nFor a list of Region-specific endpoints that Lambda supports, \n see Lambda\n endpoints and quotas in the Amazon Web Services General Reference.
", + "smithy.api#documentation": "\n Overview\n
\nLambda is a compute service that lets you run code without provisioning or managing servers.\n Lambda runs your code on a high-availability compute infrastructure and performs all of the\n administration of the compute resources, including server and operating system maintenance, capacity provisioning\n and automatic scaling, code monitoring and logging. With Lambda, you can run code for virtually any\n type of application or backend service. For more information about the Lambda service, see What is Lambda in the Lambda Developer Guide.
\nThe Lambda API Reference provides information about\n each of the API methods, including details about the parameters in each API request and\n response.
\n \nYou can use Software Development Kits (SDKs), Integrated Development Environment (IDE) Toolkits, and command\n line tools to access the API. For installation instructions, see Tools for\n Amazon Web Services.
\nFor a list of Region-specific endpoints that Lambda supports, \n see Lambda\n endpoints and quotas in the Amazon Web Services General Reference..
\nWhen making the API calls, you will need to\n authenticate your request by providing a signature. Lambda supports signature version 4. For more information,\n see Signature Version 4 signing process in the\n Amazon Web Services General Reference..
\n\n CA certificates\n
\n\nBecause Amazon Web Services SDKs use the CA certificates from your computer, changes to the certificates on the Amazon Web Services servers\n can cause connection failures when you attempt to use an SDK. You can prevent these failures by keeping your\n computer's CA certificates and operating system up-to-date. If you encounter this issue in a corporate\n environment and do not manage your own computer, you might need to ask an administrator to assist with the\n update process. The following list shows minimum operating system and Java versions:
\nMicrosoft Windows versions that have updates from January 2005 or later installed contain at least one\n of the required CAs in their trust list.
\nMac OS X 10.4 with Java for Mac OS X 10.4 Release 5 (February 2007), Mac OS X 10.5 (October 2007), and\n later versions contain at least one of the required CAs in their trust list.
\nRed Hat Enterprise Linux 5 (March 2007), 6, and 7 and CentOS 5, 6, and 7 all contain at least one of the\n required CAs in their default trusted CA list.
\nJava 1.4.2_12 (May 2006), 5 Update 2 (March 2005), and all later versions, including Java 6 (December\n 2006), 7, and 8, contain at least one of the required CAs in their default trusted CA list.
\nWhen accessing the Lambda management console or Lambda API endpoints, whether through browsers or\n programmatically, you will need to ensure your client machines support any of the following CAs:
\nAmazon Root CA 1
\nStarfield Services Root Certificate Authority - G2
\nStarfield Class 2 Certification Authority
\nRoot certificates from the first two authorities are available from Amazon trust services, but keeping your computer\n up-to-date is the more straightforward solution. To learn more about ACM-provided certificates, see Amazon Web Services Certificate Manager FAQs.\n
", "smithy.api#title": "AWS Lambda" }, "version": "2015-03-31", @@ -66,9 +66,6 @@ { "target": "com.amazonaws.lambda#CreateFunction" }, - { - "target": "com.amazonaws.lambda#CreateFunctionUrlConfig" - }, { "target": "com.amazonaws.lambda#DeleteAlias" }, @@ -90,9 +87,6 @@ { "target": "com.amazonaws.lambda#DeleteFunctionEventInvokeConfig" }, - { - "target": "com.amazonaws.lambda#DeleteFunctionUrlConfig" - }, { "target": "com.amazonaws.lambda#DeleteLayerVersion" }, @@ -126,9 +120,6 @@ { "target": "com.amazonaws.lambda#GetFunctionEventInvokeConfig" }, - { - "target": "com.amazonaws.lambda#GetFunctionUrlConfig" - }, { "target": "com.amazonaws.lambda#GetLayerVersion" }, @@ -168,9 +159,6 @@ { "target": "com.amazonaws.lambda#ListFunctionsByCodeSigningConfig" }, - { - "target": "com.amazonaws.lambda#ListFunctionUrlConfigs" - }, { "target": "com.amazonaws.lambda#ListLayers" }, @@ -233,9 +221,6 @@ }, { "target": "com.amazonaws.lambda#UpdateFunctionEventInvokeConfig" - }, - { - "target": "com.amazonaws.lambda#UpdateFunctionUrlConfig" } ] }, @@ -624,36 +609,6 @@ "smithy.api#documentation": "The traffic-shifting configuration of a Lambda function alias.
" } }, - "com.amazonaws.lambda#AllowCredentials": { - "type": "boolean", - "traits": { - "smithy.api#box": {} - } - }, - "com.amazonaws.lambda#AllowMethodsList": { - "type": "list", - "member": { - "target": "com.amazonaws.lambda#Method" - }, - "traits": { - "smithy.api#length": { - "min": 0, - "max": 6 - } - } - }, - "com.amazonaws.lambda#AllowOriginsList": { - "type": "list", - "member": { - "target": "com.amazonaws.lambda#Origin" - }, - "traits": { - "smithy.api#length": { - "min": 0, - "max": 100 - } - } - }, "com.amazonaws.lambda#AllowedPublishers": { "type": "structure", "members": { @@ -702,21 +657,6 @@ "smithy.api#pattern": "^arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\\-])+:([a-z]{2}(-gov)?-[a-z]+-\\d{1})?:(\\d{12})?:(.*)$" } }, - "com.amazonaws.lambda#AuthorizationType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "NONE", - "name": "NONE" - }, - { - "value": "AWS_IAM", - "name": "AWS_IAM" - } - ] - } - }, "com.amazonaws.lambda#BatchSize": { "type": "integer", "traits": { @@ -934,29 +874,6 @@ } } }, - "com.amazonaws.lambda#Cors": { - "type": "structure", - "members": { - "AllowCredentials": { - "target": "com.amazonaws.lambda#AllowCredentials" - }, - "AllowHeaders": { - "target": "com.amazonaws.lambda#HeadersList" - }, - "AllowMethods": { - "target": "com.amazonaws.lambda#AllowMethodsList" - }, - "AllowOrigins": { - "target": "com.amazonaws.lambda#AllowOriginsList" - }, - "ExposeHeaders": { - "target": "com.amazonaws.lambda#HeadersList" - }, - "MaxAge": { - "target": "com.amazonaws.lambda#MaxAge" - } - } - }, "com.amazonaws.lambda#CreateAlias": { "type": "operation", "input": { @@ -1150,7 +1067,13 @@ "BatchSize": { "target": "com.amazonaws.lambda#BatchSize", "traits": { - "smithy.api#documentation": "The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation\n (6 MB).
\n\n Amazon Kinesis - Default 100. Max 10,000.
\n\n Amazon DynamoDB Streams - Default 100. Max 1,000.
\n\n Amazon Simple Queue Service - Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.
\n\n Amazon Managed Streaming for Apache Kafka - Default 100. Max 10,000.
\n\n Self-Managed Apache Kafka - Default 100. Max 10,000.
\nThe maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation\n (6 MB).
\n\n Amazon Kinesis - Default 100. Max 10,000.
\n\n Amazon DynamoDB Streams - Default 100. Max 1,000.
\n\n Amazon Simple Queue Service - Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.
\n\n Amazon Managed Streaming for Apache Kafka - Default 100. Max 10,000.
\n\n Self-Managed Apache Kafka - Default 100. Max 10,000.
\n\n Amazon MQ (ActiveMQ and RabbitMQ) - Default 100. Max 10,000.
\n(Streams and Amazon SQS) An object that defines the filter criteria that\n determine whether Lambda should process an event. For more information, see Lambda event filtering.
" } }, "MaximumBatchingWindowInSeconds": { @@ -1234,7 +1157,7 @@ "FunctionResponseTypes": { "target": "com.amazonaws.lambda#FunctionResponseTypeList", "traits": { - "smithy.api#documentation": "(Streams only) A list of current response type enums applied to the event source mapping.
" + "smithy.api#documentation": "(Streams and Amazon SQS) A list of current response type enums applied to the event source mapping.
" } } } @@ -1298,7 +1221,7 @@ "Runtime": { "target": "com.amazonaws.lambda#Runtime", "traits": { - "smithy.api#documentation": "The identifier of the function's runtime.
" + "smithy.api#documentation": "The identifier of the function's runtime. Runtime is required if the deployment package is a .zip file archive. \n
" } }, "Role": { @@ -1311,7 +1234,7 @@ "Handler": { "target": "com.amazonaws.lambda#Handler", "traits": { - "smithy.api#documentation": "The name of the method within your code that Lambda calls to execute your function. The format includes the\n file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information,\n see Programming Model.
" + "smithy.api#documentation": "The name of the method within your code that Lambda calls to execute your function. \nHandler is required if the deployment package is a .zip file archive. The format includes the\n file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information,\n see Programming Model.
" } }, "Code": { @@ -1414,99 +1337,7 @@ "Architectures": { "target": "com.amazonaws.lambda#ArchitecturesList", "traits": { - "smithy.api#documentation": "The instruction set architecture that the function supports. Enter a string array with one of the valid values. \n The default value is x86_64
.
The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86_64).\n The default value is x86_64
.
The Amazon Resource Name (ARN) of the event source.
" } }, + "FilterCriteria": { + "target": "com.amazonaws.lambda#FilterCriteria", + "traits": { + "smithy.api#documentation": "(Streams and Amazon SQS) An object that defines the filter criteria that\n determine whether Lambda should process an event. For more information, see Lambda event filtering.
" + } + }, "FunctionArn": { "target": "com.amazonaws.lambda#FunctionArn", "traits": { @@ -2527,6 +2319,40 @@ } } }, + "com.amazonaws.lambda#Filter": { + "type": "structure", + "members": { + "Pattern": { + "target": "com.amazonaws.lambda#Pattern", + "traits": { + "smithy.api#documentation": "\n A filter pattern. For more information on the syntax of a filter pattern, see\n \n Filter rule syntax.\n
" + } + } + }, + "traits": { + "smithy.api#documentation": "\n A structure within a FilterCriteria
object that defines an event filtering pattern.\n
\n A list of filters.\n
" + } + } + }, + "traits": { + "smithy.api#documentation": "\n An object that contains the filters for an event source.\n
" + } + }, + "com.amazonaws.lambda#FilterList": { + "type": "list", + "member": { + "target": "com.amazonaws.lambda#Filter" + } + }, "com.amazonaws.lambda#FunctionArn": { "type": "string", "traits": { @@ -2889,69 +2715,6 @@ } } }, - "com.amazonaws.lambda#FunctionUrl": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 40, - "max": 100 - } - } - }, - "com.amazonaws.lambda#FunctionUrlConfig": { - "type": "structure", - "members": { - "FunctionUrl": { - "target": "com.amazonaws.lambda#FunctionUrl", - "traits": { - "smithy.api#required": {} - } - }, - "FunctionArn": { - "target": "com.amazonaws.lambda#FunctionArn", - "traits": { - "smithy.api#required": {} - } - }, - "CreationTime": { - "target": "com.amazonaws.lambda#Timestamp", - "traits": { - "smithy.api#required": {} - } - }, - "LastModifiedTime": { - "target": "com.amazonaws.lambda#Timestamp", - "traits": { - "smithy.api#required": {} - } - }, - "Cors": { - "target": "com.amazonaws.lambda#Cors" - }, - "AuthorizationType": { - "target": "com.amazonaws.lambda#AuthorizationType", - "traits": { - "smithy.api#required": {} - } - } - } - }, - "com.amazonaws.lambda#FunctionUrlConfigList": { - "type": "list", - "member": { - "target": "com.amazonaws.lambda#FunctionUrlConfig" - } - }, - "com.amazonaws.lambda#FunctionUrlQualifier": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 128 - }, - "smithy.api#pattern": "^(^\\$LATEST$)|((?!^[0-9]+$)([a-zA-Z0-9-_]+))$" - } - }, "com.amazonaws.lambda#FunctionVersion": { "type": "string", "traits": { @@ -3443,121 +3206,21 @@ } }, "Qualifier": { - "target": "com.amazonaws.lambda#Qualifier", - "traits": { - "smithy.api#documentation": "Specify a version or alias to get details about a published version of the function.
", - "smithy.api#httpQuery": "Qualifier" - } - } - } - }, - "com.amazonaws.lambda#GetFunctionEventInvokeConfig": { - "type": "operation", - "input": { - "target": "com.amazonaws.lambda#GetFunctionEventInvokeConfigRequest" - }, - "output": { - "target": "com.amazonaws.lambda#FunctionEventInvokeConfig" - }, - "errors": [ - { - "target": "com.amazonaws.lambda#InvalidParameterValueException" - }, - { - "target": "com.amazonaws.lambda#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.lambda#ServiceException" - }, - { - "target": "com.amazonaws.lambda#TooManyRequestsException" - } - ], - "traits": { - "smithy.api#documentation": "Retrieves the configuration for asynchronous invocation for a function, version, or alias.
\nTo configure options for asynchronous invocation, use PutFunctionEventInvokeConfig.
", - "smithy.api#http": { - "method": "GET", - "uri": "/2019-09-25/functions/{FunctionName}/event-invoke-config", - "code": 200 - } - } - }, - "com.amazonaws.lambda#GetFunctionEventInvokeConfigRequest": { - "type": "structure", - "members": { - "FunctionName": { - "target": "com.amazonaws.lambda#FunctionName", - "traits": { - "smithy.api#documentation": "The name of the Lambda function, version, or alias.
\n\n Name formats\n
\n\n Function name - my-function
(name-only), my-function:v1
(with alias).
\n Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function
.
\n Partial ARN - 123456789012:function:my-function
.
You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN.\n If you specify only the function name, it is limited to 64 characters in length.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "Qualifier": { - "target": "com.amazonaws.lambda#Qualifier", - "traits": { - "smithy.api#documentation": "A version number or alias name.
", - "smithy.api#httpQuery": "Qualifier" - } - } - } - }, - "com.amazonaws.lambda#GetFunctionRequest": { - "type": "structure", - "members": { - "FunctionName": { - "target": "com.amazonaws.lambda#NamespacedFunctionName", - "traits": { - "smithy.api#documentation": "The name of the Lambda function, version, or alias.
\n\n Name formats\n
\n\n Function name - my-function
(name-only), my-function:v1
(with alias).
\n Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function
.
\n Partial ARN - 123456789012:function:my-function
.
You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN.\n If you specify only the function name, it is limited to 64 characters in length.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "Qualifier": { - "target": "com.amazonaws.lambda#Qualifier", - "traits": { - "smithy.api#documentation": "Specify a version or alias to get details about a published version of the function.
", - "smithy.api#httpQuery": "Qualifier" - } - } - } - }, - "com.amazonaws.lambda#GetFunctionResponse": { - "type": "structure", - "members": { - "Configuration": { - "target": "com.amazonaws.lambda#FunctionConfiguration", - "traits": { - "smithy.api#documentation": "The configuration of the function or version.
" - } - }, - "Code": { - "target": "com.amazonaws.lambda#FunctionCodeLocation", - "traits": { - "smithy.api#documentation": "The deployment package of the function or version.
" - } - }, - "Tags": { - "target": "com.amazonaws.lambda#Tags", - "traits": { - "smithy.api#documentation": "The function's tags.
" - } - }, - "Concurrency": { - "target": "com.amazonaws.lambda#Concurrency", + "target": "com.amazonaws.lambda#Qualifier", "traits": { - "smithy.api#documentation": "The function's reserved\n concurrency.
" + "smithy.api#documentation": "Specify a version or alias to get details about a published version of the function.
", + "smithy.api#httpQuery": "Qualifier" } } } }, - "com.amazonaws.lambda#GetFunctionUrlConfig": { + "com.amazonaws.lambda#GetFunctionEventInvokeConfig": { "type": "operation", "input": { - "target": "com.amazonaws.lambda#GetFunctionUrlConfigRequest" + "target": "com.amazonaws.lambda#GetFunctionEventInvokeConfigRequest" }, "output": { - "target": "com.amazonaws.lambda#GetFunctionUrlConfigResponse" + "target": "com.amazonaws.lambda#FunctionEventInvokeConfig" }, "errors": [ { @@ -3574,65 +3237,79 @@ } ], "traits": { + "smithy.api#documentation": "Retrieves the configuration for asynchronous invocation for a function, version, or alias.
\nTo configure options for asynchronous invocation, use PutFunctionEventInvokeConfig.
", "smithy.api#http": { "method": "GET", - "uri": "/2021-10-31/functions/{FunctionName}/url", + "uri": "/2019-09-25/functions/{FunctionName}/event-invoke-config", "code": 200 } } }, - "com.amazonaws.lambda#GetFunctionUrlConfigRequest": { + "com.amazonaws.lambda#GetFunctionEventInvokeConfigRequest": { "type": "structure", "members": { "FunctionName": { "target": "com.amazonaws.lambda#FunctionName", "traits": { + "smithy.api#documentation": "The name of the Lambda function, version, or alias.
\n\n Name formats\n
\n\n Function name - my-function
(name-only), my-function:v1
(with alias).
\n Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function
.
\n Partial ARN - 123456789012:function:my-function
.
You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN.\n If you specify only the function name, it is limited to 64 characters in length.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } }, "Qualifier": { - "target": "com.amazonaws.lambda#FunctionUrlQualifier", + "target": "com.amazonaws.lambda#Qualifier", "traits": { + "smithy.api#documentation": "A version number or alias name.
", "smithy.api#httpQuery": "Qualifier" } } } }, - "com.amazonaws.lambda#GetFunctionUrlConfigResponse": { + "com.amazonaws.lambda#GetFunctionRequest": { "type": "structure", "members": { - "FunctionUrl": { - "target": "com.amazonaws.lambda#FunctionUrl", + "FunctionName": { + "target": "com.amazonaws.lambda#NamespacedFunctionName", "traits": { + "smithy.api#documentation": "The name of the Lambda function, version, or alias.
\n\n Name formats\n
\n\n Function name - my-function
(name-only), my-function:v1
(with alias).
\n Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function
.
\n Partial ARN - 123456789012:function:my-function
.
You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN.\n If you specify only the function name, it is limited to 64 characters in length.
", + "smithy.api#httpLabel": {}, "smithy.api#required": {} } }, - "FunctionArn": { - "target": "com.amazonaws.lambda#FunctionArn", + "Qualifier": { + "target": "com.amazonaws.lambda#Qualifier", "traits": { - "smithy.api#required": {} + "smithy.api#documentation": "Specify a version or alias to get details about a published version of the function.
", + "smithy.api#httpQuery": "Qualifier" } - }, - "AuthorizationType": { - "target": "com.amazonaws.lambda#AuthorizationType", + } + } + }, + "com.amazonaws.lambda#GetFunctionResponse": { + "type": "structure", + "members": { + "Configuration": { + "target": "com.amazonaws.lambda#FunctionConfiguration", "traits": { - "smithy.api#required": {} + "smithy.api#documentation": "The configuration of the function or version.
" } }, - "Cors": { - "target": "com.amazonaws.lambda#Cors" + "Code": { + "target": "com.amazonaws.lambda#FunctionCodeLocation", + "traits": { + "smithy.api#documentation": "The deployment package of the function or version.
" + } }, - "CreationTime": { - "target": "com.amazonaws.lambda#Timestamp", + "Tags": { + "target": "com.amazonaws.lambda#Tags", "traits": { - "smithy.api#required": {} + "smithy.api#documentation": "The function's tags.
" } }, - "LastModifiedTime": { - "target": "com.amazonaws.lambda#Timestamp", + "Concurrency": { + "target": "com.amazonaws.lambda#Concurrency", "traits": { - "smithy.api#required": {} + "smithy.api#documentation": "The function's reserved\n concurrency.
" } } } @@ -4035,28 +3712,6 @@ "smithy.api#pattern": "^[^\\s]+$" } }, - "com.amazonaws.lambda#Header": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 1024 - }, - "smithy.api#pattern": ".*" - } - }, - "com.amazonaws.lambda#HeadersList": { - "type": "list", - "member": { - "target": "com.amazonaws.lambda#Header" - }, - "traits": { - "smithy.api#length": { - "min": 0, - "max": 100 - } - } - }, "com.amazonaws.lambda#HttpStatus": { "type": "integer" }, @@ -4288,7 +3943,7 @@ "Payload": { "target": "com.amazonaws.lambda#Blob", "traits": { - "smithy.api#documentation": "The JSON that you want to provide to your Lambda function as input.
", + "smithy.api#documentation": "The JSON that you want to provide to your Lambda function as input.
\nYou can enter the JSON directly. For example, --payload '{ \"key\": \"value\" }'
. \n You can also specify a file path. For example, --payload file://payload.json
.\n
The type of authentication protocol, VPC components, or virtual host for your event source. For example: \"Type\":\"SASL_SCRAM_512_AUTH\"
.
\n BASIC_AUTH
- (Amazon MQ) The Secrets Manager secret that stores your broker credentials.
\n BASIC_AUTH
- (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL/PLAIN authentication of your Apache Kafka brokers.
\n VPC_SUBNET
- The subnets associated with your VPC. Lambda connects to these subnets to fetch data from your self-managed Apache Kafka cluster.
\n VPC_SECURITY_GROUP
- The VPC security group used to manage access to your self-managed Apache Kafka brokers.
\n SASL_SCRAM_256_AUTH
- The Secrets Manager ARN of your secret key used for SASL SCRAM-256 authentication of your self-managed Apache Kafka brokers.
\n SASL_SCRAM_512_AUTH
- The Secrets Manager ARN of your secret key used for SASL SCRAM-512 authentication of your self-managed Apache Kafka brokers.
\n VIRTUAL_HOST
- (Amazon MQ) The name of the virtual host in your RabbitMQ broker. Lambda uses this RabbitMQ host as the event source.
The type of authentication protocol, VPC components, or virtual host for your event source. For example: \"Type\":\"SASL_SCRAM_512_AUTH\"
.
\n BASIC_AUTH
- (Amazon MQ) The Secrets Manager secret that stores your broker credentials.
\n BASIC_AUTH
- (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL/PLAIN authentication of your Apache Kafka brokers.
\n VPC_SUBNET
- The subnets associated with your VPC. Lambda connects to these subnets to fetch data from your self-managed Apache Kafka cluster.
\n VPC_SECURITY_GROUP
- The VPC security group used to manage access to your self-managed Apache Kafka brokers.
\n SASL_SCRAM_256_AUTH
- The Secrets Manager ARN of your secret key used for SASL SCRAM-256 authentication of your self-managed Apache Kafka brokers.
\n SASL_SCRAM_512_AUTH
- The Secrets Manager ARN of your secret key used for SASL SCRAM-512 authentication of your self-managed Apache Kafka brokers.
\n VIRTUAL_HOST
- (Amazon MQ) The name of the virtual host in your RabbitMQ broker. Lambda uses this RabbitMQ host as the event source. \n This property cannot be specified in an UpdateEventSourceMapping API call.
\n CLIENT_CERTIFICATE_TLS_AUTH
- (Amazon MSK, Self-managed Apache Kafka) The Secrets Manager ARN of your secret key containing the certificate chain (X.509 PEM), \n private key (PKCS#8 PEM), and private key password (optional) used for mutual TLS authentication of your MSK/Apache Kafka brokers.
\n SERVER_ROOT_CA_CERTIFICATE
- (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key containing the root CA certificate (X.509 PEM) used for TLS encryption of your Apache Kafka brokers.\n
The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation\n (6 MB).
\n\n Amazon Kinesis - Default 100. Max 10,000.
\n\n Amazon DynamoDB Streams - Default 100. Max 1,000.
\n\n Amazon Simple Queue Service - Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.
\n\n Amazon Managed Streaming for Apache Kafka - Default 100. Max 10,000.
\n\n Self-Managed Apache Kafka - Default 100. Max 10,000.
\nThe maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation\n (6 MB).
\n\n Amazon Kinesis - Default 100. Max 10,000.
\n\n Amazon DynamoDB Streams - Default 100. Max 1,000.
\n\n Amazon Simple Queue Service - Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.
\n\n Amazon Managed Streaming for Apache Kafka - Default 100. Max 10,000.
\n\n Self-Managed Apache Kafka - Default 100. Max 10,000.
\n\n Amazon MQ (ActiveMQ and RabbitMQ) - Default 100. Max 10,000.
\n(Streams and Amazon SQS) An object that defines the filter criteria that\n determine whether Lambda should process an event. For more information, see Lambda event filtering.
" } }, "MaximumBatchingWindowInSeconds": { @@ -8085,7 +7642,7 @@ "FunctionResponseTypes": { "target": "com.amazonaws.lambda#FunctionResponseTypeList", "traits": { - "smithy.api#documentation": "(Streams only) A list of current response type enums applied to the event source mapping.
" + "smithy.api#documentation": "(Streams and Amazon SQS) A list of current response type enums applied to the event source mapping.
" } } } @@ -8201,7 +7758,7 @@ "Architectures": { "target": "com.amazonaws.lambda#ArchitecturesList", "traits": { - "smithy.api#documentation": "The instruction set architecture that the function supports. Enter a string array with one of the valid values. \n The default value is x86_64
.
The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86_64).\n The default value is x86_64
.
The name of the method within your code that Lambda calls to execute your function. The format includes the\n file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information,\n see Programming Model.
" + "smithy.api#documentation": "The name of the method within your code that Lambda calls to execute your function. \nHandler is required if the deployment package is a .zip file archive. The format includes the\n file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information,\n see Programming Model.
" } }, "Description": { @@ -8308,7 +7865,7 @@ "Runtime": { "target": "com.amazonaws.lambda#Runtime", "traits": { - "smithy.api#documentation": "The identifier of the function's runtime.
" + "smithy.api#documentation": "The identifier of the function's runtime. Runtime is required if the deployment package is a .zip file archive. \n
" } }, "DeadLetterConfig": { @@ -8427,101 +7984,6 @@ } } }, - "com.amazonaws.lambda#UpdateFunctionUrlConfig": { - "type": "operation", - "input": { - "target": "com.amazonaws.lambda#UpdateFunctionUrlConfigRequest" - }, - "output": { - "target": "com.amazonaws.lambda#UpdateFunctionUrlConfigResponse" - }, - "errors": [ - { - "target": "com.amazonaws.lambda#InvalidParameterValueException" - }, - { - "target": "com.amazonaws.lambda#ResourceConflictException" - }, - { - "target": "com.amazonaws.lambda#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.lambda#ServiceException" - }, - { - "target": "com.amazonaws.lambda#TooManyRequestsException" - } - ], - "traits": { - "smithy.api#http": { - "method": "PUT", - "uri": "/2021-10-31/functions/{FunctionName}/url", - "code": 200 - } - } - }, - "com.amazonaws.lambda#UpdateFunctionUrlConfigRequest": { - "type": "structure", - "members": { - "FunctionName": { - "target": "com.amazonaws.lambda#FunctionName", - "traits": { - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "Qualifier": { - "target": "com.amazonaws.lambda#FunctionUrlQualifier", - "traits": { - "smithy.api#httpQuery": "Qualifier" - } - }, - "AuthorizationType": { - "target": "com.amazonaws.lambda#AuthorizationType" - }, - "Cors": { - "target": "com.amazonaws.lambda#Cors" - } - } - }, - "com.amazonaws.lambda#UpdateFunctionUrlConfigResponse": { - "type": "structure", - "members": { - "FunctionUrl": { - "target": "com.amazonaws.lambda#FunctionUrl", - "traits": { - "smithy.api#required": {} - } - }, - "FunctionArn": { - "target": "com.amazonaws.lambda#FunctionArn", - "traits": { - "smithy.api#required": {} - } - }, - "AuthorizationType": { - "target": "com.amazonaws.lambda#AuthorizationType", - "traits": { - "smithy.api#required": {} - } - }, - "Cors": { - "target": "com.amazonaws.lambda#Cors" - }, - "CreationTime": { - "target": "com.amazonaws.lambda#Timestamp", - "traits": { - "smithy.api#required": {} - } - }, - "LastModifiedTime": { - "target": "com.amazonaws.lambda#Timestamp", - "traits": { - "smithy.api#required": {} - } - } - } - }, "com.amazonaws.lambda#Version": { "type": "string", "traits": { diff --git a/codegen/sdk-codegen/aws-models/macie2.2020-01-01.json b/codegen/sdk-codegen/aws-models/macie2.2020-01-01.json index cf6d872ccce..1259896679e 100644 --- a/codegen/sdk-codegen/aws-models/macie2.2020-01-01.json +++ b/codegen/sdk-codegen/aws-models/macie2.2020-01-01.json @@ -191,19 +191,19 @@ "status": { "target": "com.amazonaws.macie2#AdminStatus", "traits": { - "smithy.api#documentation": "The current status of the account as the delegated administrator of Amazon Macie for the organization.
", + "smithy.api#documentation": "The current status of the account as the delegated Amazon Macie administrator account for the organization.
", "smithy.api#jsonName": "status" } } }, "traits": { - "smithy.api#documentation": "Provides information about the delegated Amazon Macie administrator account for an Amazon Web Services organization.
" + "smithy.api#documentation": "Provides information about the delegated Amazon Macie administrator account for an organization in Organizations.
" } }, "com.amazonaws.macie2#AdminStatus": { "type": "string", "traits": { - "smithy.api#documentation": "The current status of an account as the delegated Amazon Macie administrator account for an Amazon Web Services organization. Possible values are:
", + "smithy.api#documentation": "The current status of an account as the delegated Amazon Macie administrator account for an organization in Organizations. Possible values are:
", "smithy.api#enum": [ { "value": "ENABLED", @@ -1433,7 +1433,7 @@ "description": { "target": "com.amazonaws.macie2#__string", "traits": { - "smithy.api#documentation": "A custom description of the custom data identifier. The description can contain as many as 512 characters.
We strongly recommend that you avoid including any sensitive data in the description of a custom data identifier. Other users of your account might be able to see the identifier's description, depending on the actions that they're allowed to perform in Amazon Macie.
", + "smithy.api#documentation": "A custom description of the custom data identifier. The description can contain as many as 512 characters.
We strongly recommend that you avoid including any sensitive data in the description of a custom data identifier. Other users of your account might be able to see this description, depending on the actions that they're allowed to perform in Amazon Macie.
", "smithy.api#jsonName": "description" } }, @@ -1461,7 +1461,7 @@ "name": { "target": "com.amazonaws.macie2#__string", "traits": { - "smithy.api#documentation": "A custom name for the custom data identifier. The name can contain as many as 128 characters.
We strongly recommend that you avoid including any sensitive data in the name of a custom data identifier. Other users of your account might be able to see the identifier's name, depending on the actions that they're allowed to perform in Amazon Macie.
", + "smithy.api#documentation": "A custom name for the custom data identifier. The name can contain as many as 128 characters.
We strongly recommend that you avoid including any sensitive data in the name of a custom data identifier. Other users of your account might be able to see this name, depending on the actions that they're allowed to perform in Amazon Macie.
", "smithy.api#jsonName": "name" } }, @@ -1562,7 +1562,7 @@ "description": { "target": "com.amazonaws.macie2#__string", "traits": { - "smithy.api#documentation": "A custom description of the filter. The description can contain as many as 512 characters.
We strongly recommend that you avoid including any sensitive data in the description of a filter. Other users of your account might be able to see the filter's description, depending on the actions that they're allowed to perform in Amazon Macie.
", + "smithy.api#documentation": "A custom description of the filter. The description can contain as many as 512 characters.
We strongly recommend that you avoid including any sensitive data in the description of a filter. Other users of your account might be able to see this description, depending on the actions that they're allowed to perform in Amazon Macie.
", "smithy.api#jsonName": "description" } }, @@ -1577,7 +1577,7 @@ "name": { "target": "com.amazonaws.macie2#__string", "traits": { - "smithy.api#documentation": "A custom name for the filter. The name must contain at least 3 characters and can contain as many as 64 characters.
We strongly recommend that you avoid including any sensitive data in the name of a filter. Other users of your account might be able to see the filter's name, depending on the actions that they're allowed to perform in Amazon Macie.
", + "smithy.api#documentation": "A custom name for the filter. The name must contain at least 3 characters and can contain as many as 64 characters.
We strongly recommend that you avoid including any sensitive data in the name of a filter. Other users of your account might be able to see this name, depending on the actions that they're allowed to perform in Amazon Macie.
", "smithy.api#jsonName": "name", "smithy.api#required": {} } @@ -1671,14 +1671,14 @@ "disableEmailNotification": { "target": "com.amazonaws.macie2#__boolean", "traits": { - "smithy.api#documentation": "Specifies whether to send an email notification to the root user of each account that the invitation will be sent to. This notification is in addition to an alert that the root user receives in Personal Health Dashboard. To send an email notification to the root user of each account, set this value to true.
", + "smithy.api#documentation": "Specifies whether to send the invitation as an email message. If this value is false, Amazon Macie sends the invitation (as an email message) to the email address that you specified for the recipient's account when you associated the account with your account. The default value is false.
", "smithy.api#jsonName": "disableEmailNotification" } }, "message": { "target": "com.amazonaws.macie2#__string", "traits": { - "smithy.api#documentation": "A custom message to include in the invitation. Amazon Macie adds this message to the standard content that it sends for an invitation.
", + "smithy.api#documentation": "Custom text to include in the email message that contains the invitation. The text can contain as many as 80 alphanumeric characters.
", "smithy.api#jsonName": "message" } } @@ -2782,7 +2782,7 @@ } ], "traits": { - "smithy.api#documentation": "Retrieves the Amazon Macie configuration settings for an Amazon Web Services organization.
", + "smithy.api#documentation": "Retrieves the Amazon Macie configuration settings for an organization in Organizations.
", "smithy.api#http": { "method": "GET", "uri": "/admin/configuration", @@ -2800,14 +2800,14 @@ "autoEnable": { "target": "com.amazonaws.macie2#__boolean", "traits": { - "smithy.api#documentation": "Specifies whether Amazon Macie is enabled automatically for accounts that are added to the Amazon Web Services organization.
", + "smithy.api#documentation": "Specifies whether Amazon Macie is enabled automatically for accounts that are added to the organization.
", "smithy.api#jsonName": "autoEnable" } }, "maxAccountLimitReached": { "target": "com.amazonaws.macie2#__boolean", "traits": { - "smithy.api#documentation": "Specifies whether the maximum number of Amazon Macie member accounts are part of the Amazon Web Services organization.
", + "smithy.api#documentation": "Specifies whether the maximum number of Amazon Macie member accounts are part of the organization.
", "smithy.api#jsonName": "maxAccountLimitReached" } } @@ -2845,7 +2845,7 @@ } ], "traits": { - "smithy.api#documentation": "Disables an Amazon Macie account and deletes Macie resources for the account.
", + "smithy.api#documentation": "Disables Amazon Macie and deletes all settings and resources for a Macie account.
", "smithy.api#http": { "method": "DELETE", "uri": "/macie", @@ -2893,7 +2893,7 @@ } ], "traits": { - "smithy.api#documentation": "Disables an account as the delegated Amazon Macie administrator account for an Amazon Web Services organization.
", + "smithy.api#documentation": "Disables an account as the delegated Amazon Macie administrator account for an organization in Organizations.
", "smithy.api#http": { "method": "DELETE", "uri": "/admin", @@ -3208,7 +3208,7 @@ } ], "traits": { - "smithy.api#documentation": "Designates an account as the delegated Amazon Macie administrator account for an Amazon Web Services organization.
", + "smithy.api#documentation": "Designates an account as the delegated Amazon Macie administrator account for an organization in Organizations.
", "smithy.api#http": { "method": "POST", "uri": "/admin", @@ -3767,7 +3767,7 @@ "administrator": { "target": "com.amazonaws.macie2#Invitation", "traits": { - "smithy.api#documentation": "The Amazon Web Services account ID for the administrator account. If the accounts are associated by a Macie membership invitation, this object also provides details about the invitation that was sent to establish the relationship between the accounts.
", + "smithy.api#documentation": "The Amazon Web Services account ID for the administrator account. If the accounts are associated by an Amazon Macie membership invitation, this object also provides details about the invitation that was sent to establish the relationship between the accounts.
", "smithy.api#jsonName": "administrator" } } @@ -3805,7 +3805,7 @@ } ], "traits": { - "smithy.api#documentation": "Retrieves (queries) aggregated statistical data for all the S3 buckets that Amazon Macie monitors and analyzes.
", + "smithy.api#documentation": "Retrieves (queries) aggregated statistical data about S3 buckets that Amazon Macie monitors and analyzes.
", "smithy.api#http": { "method": "POST", "uri": "/datasources/s3/statistics", @@ -4560,28 +4560,28 @@ "findingPublishingFrequency": { "target": "com.amazonaws.macie2#FindingPublishingFrequency", "traits": { - "smithy.api#documentation": "The frequency with which Macie publishes updates to policy findings for the account. This includes publishing updates to Security Hub and Amazon EventBridge (formerly called Amazon CloudWatch Events).
", + "smithy.api#documentation": "The frequency with which Amazon Macie publishes updates to policy findings for the account. This includes publishing updates to Security Hub and Amazon EventBridge (formerly called Amazon CloudWatch Events).
", "smithy.api#jsonName": "findingPublishingFrequency" } }, "serviceRole": { "target": "com.amazonaws.macie2#__string", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) of the service-linked role that allows Macie to monitor and analyze data in Amazon Web Services resources for the account.
", + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the service-linked role that allows Amazon Macie to monitor and analyze data in Amazon Web Services resources for the account.
", "smithy.api#jsonName": "serviceRole" } }, "status": { "target": "com.amazonaws.macie2#MacieStatus", "traits": { - "smithy.api#documentation": "The current status of the Macie account. Possible values are: PAUSED, the account is enabled but all Macie activities are suspended (paused) for the account; and, ENABLED, the account is enabled and all Macie activities are enabled for the account.
", + "smithy.api#documentation": "The current status of the Amazon Macie account. Possible values are: PAUSED, the account is enabled but all Macie activities are suspended (paused) for the account; and, ENABLED, the account is enabled and all Macie activities are enabled for the account.
", "smithy.api#jsonName": "status" } }, "updatedAt": { "target": "com.amazonaws.macie2#__timestampIso8601", "traits": { - "smithy.api#documentation": "The date and time, in UTC and extended ISO 8601 format, of the most recent change to the status of the Macie account.
", + "smithy.api#documentation": "The date and time, in UTC and extended ISO 8601 format, of the most recent change to the status of the Amazon Macie account.
", "smithy.api#jsonName": "updatedAt" } } @@ -4730,7 +4730,7 @@ "invitedAt": { "target": "com.amazonaws.macie2#__timestampIso8601", "traits": { - "smithy.api#documentation": "The date and time, in UTC and extended ISO 8601 format, when an Amazon Macie membership invitation was last sent to the account. This value is null if a Macie invitation hasn't been sent to the account.
", + "smithy.api#documentation": "The date and time, in UTC and extended ISO 8601 format, when an Amazon Macie membership invitation was last sent to the account. This value is null if an invitation hasn't been sent to the account.
", "smithy.api#jsonName": "invitedAt" } }, @@ -5058,7 +5058,7 @@ "invitationId": { "target": "com.amazonaws.macie2#__string", "traits": { - "smithy.api#documentation": "The unique identifier for the invitation. Amazon Macie uses this identifier to validate the inviter account with the invitee account.
", + "smithy.api#documentation": "The unique identifier for the invitation.
", "smithy.api#jsonName": "invitationId" } }, @@ -5072,13 +5072,13 @@ "relationshipStatus": { "target": "com.amazonaws.macie2#RelationshipStatus", "traits": { - "smithy.api#documentation": "The status of the relationship between the account that sent the invitation (inviter account) and the account that received the invitation (invitee account).
", + "smithy.api#documentation": "The status of the relationship between the account that sent the invitation and the account that received the invitation.
", "smithy.api#jsonName": "relationshipStatus" } } }, "traits": { - "smithy.api#documentation": "Provides information about an Amazon Macie membership invitation that was received by an account.
" + "smithy.api#documentation": "Provides information about an Amazon Macie membership invitation.
" } }, "com.amazonaws.macie2#IpAddressDetails": { @@ -6275,7 +6275,7 @@ "members": { "target": "com.amazonaws.macie2#__listOfMember", "traits": { - "smithy.api#documentation": "An array of objects, one for each account that's associated with the administrator account and meets the criteria specified by the onlyAssociated request parameter.
", + "smithy.api#documentation": "An array of objects, one for each account that's associated with the administrator account and meets the criteria specified in the request.
", "smithy.api#jsonName": "members" } }, @@ -6320,7 +6320,7 @@ } ], "traits": { - "smithy.api#documentation": "Retrieves information about the delegated Amazon Macie administrator account for an Amazon Web Services organization.
", + "smithy.api#documentation": "Retrieves information about the delegated Amazon Macie administrator account for an organization in Organizations.
", "smithy.api#http": { "method": "GET", "uri": "/admin", @@ -6825,7 +6825,7 @@ "invitedAt": { "target": "com.amazonaws.macie2#__timestampIso8601", "traits": { - "smithy.api#documentation": "The date and time, in UTC and extended ISO 8601 format, when an Amazon Macie membership invitation was last sent to the account. This value is null if a Macie invitation hasn't been sent to the account.
", + "smithy.api#documentation": "The date and time, in UTC and extended ISO 8601 format, when an Amazon Macie membership invitation was last sent to the account. This value is null if an invitation hasn't been sent to the account.
", "smithy.api#jsonName": "invitedAt" } }, @@ -7262,7 +7262,7 @@ "com.amazonaws.macie2#RelationshipStatus": { "type": "string", "traits": { - "smithy.api#documentation": "The current status of the relationship between an account and an associated Amazon Macie administrator account (inviter account). Possible values are:
", + "smithy.api#documentation": "The current status of the relationship between an account and an associated Amazon Macie administrator account. Possible values are:
", "smithy.api#enum": [ { "value": "Enabled", @@ -8318,7 +8318,7 @@ "severity": { "target": "com.amazonaws.macie2#DataIdentifierSeverity", "traits": { - "smithy.api#documentation": "The severity to assign to a finding if the number of occurrences is greater than or equal to the specified threshold (occurrencesThreshold) and, if applicable, is less than the threshold for the next consecutive severity level for the custom data identifier.
", + "smithy.api#documentation": "The severity to assign to a finding: if the number of occurrences is greater than or equal to the specified threshold (occurrencesThreshold); and, if applicable, the number of occurrences is less than the threshold for the next consecutive severity level for the custom data identifier, moving from LOW to HIGH.
", "smithy.api#jsonName": "severity", "smithy.api#required": {} } @@ -9036,7 +9036,7 @@ "description": { "target": "com.amazonaws.macie2#__string", "traits": { - "smithy.api#documentation": "A custom description of the filter. The description can contain as many as 512 characters.
We strongly recommend that you avoid including any sensitive data in the description of a filter. Other users might be able to see the filter's description, depending on the actions that they're allowed to perform in Amazon Macie.
", + "smithy.api#documentation": "A custom description of the filter. The description can contain as many as 512 characters.
We strongly recommend that you avoid including any sensitive data in the description of a filter. Other users might be able to see this description, depending on the actions that they're allowed to perform in Amazon Macie.
", "smithy.api#jsonName": "description" } }, @@ -9058,7 +9058,7 @@ "name": { "target": "com.amazonaws.macie2#__string", "traits": { - "smithy.api#documentation": "A custom name for the filter. The name must contain at least 3 characters and can contain as many as 64 characters.
We strongly recommend that you avoid including any sensitive data in the name of a filter. Other users might be able to see the filter's name, depending on the actions that they're allowed to perform in Amazon Macie.
", + "smithy.api#documentation": "A custom name for the filter. The name must contain at least 3 characters and can contain as many as 64 characters.
We strongly recommend that you avoid including any sensitive data in the name of a filter. Other users might be able to see this name, depending on the actions that they're allowed to perform in Amazon Macie.
", "smithy.api#jsonName": "name" } }, @@ -9130,7 +9130,7 @@ } ], "traits": { - "smithy.api#documentation": "Suspends or re-enables an Amazon Macie account, or updates the configuration settings for a Macie account.
", + "smithy.api#documentation": "Suspends or re-enables Amazon Macie, or updates the configuration settings for a Macie account.
", "smithy.api#http": { "method": "PATCH", "uri": "/macie", @@ -9258,7 +9258,7 @@ } ], "traits": { - "smithy.api#documentation": "Updates the Amazon Macie configuration settings for an Amazon Web Services organization.
", + "smithy.api#documentation": "Updates the Amazon Macie configuration settings for an organization in Organizations.
", "smithy.api#http": { "method": "PATCH", "uri": "/admin/configuration", @@ -9272,7 +9272,7 @@ "autoEnable": { "target": "com.amazonaws.macie2#__boolean", "traits": { - "smithy.api#documentation": "Specifies whether to enable Amazon Macie automatically for each account, when the account is added to the Amazon Web Services organization.
", + "smithy.api#documentation": "Specifies whether to enable Amazon Macie automatically for an account when the account is added to the organization in Organizations.
", "smithy.api#jsonName": "autoEnable", "smithy.api#required": {} } diff --git a/codegen/sdk-codegen/aws-models/mgn.2020-02-26.json b/codegen/sdk-codegen/aws-models/mgn.2020-02-26.json index b9baa706194..26586cbc317 100644 --- a/codegen/sdk-codegen/aws-models/mgn.2020-02-26.json +++ b/codegen/sdk-codegen/aws-models/mgn.2020-02-26.json @@ -46,35 +46,6 @@ }, "com.amazonaws.mgn#ApplicationMigrationService": { "type": "service", - "version": "2020-02-26", - "operations": [ - { - "target": "com.amazonaws.mgn#InitializeService" - }, - { - "target": "com.amazonaws.mgn#ListTagsForResource" - }, - { - "target": "com.amazonaws.mgn#TagResource" - }, - { - "target": "com.amazonaws.mgn#UntagResource" - } - ], - "resources": [ - { - "target": "com.amazonaws.mgn#AccountResource" - }, - { - "target": "com.amazonaws.mgn#JobResource" - }, - { - "target": "com.amazonaws.mgn#ReplicationConfigurationTemplateResource" - }, - { - "target": "com.amazonaws.mgn#SourceServerResource" - } - ], "traits": { "aws.api#service": { "sdkId": "mgn", @@ -103,7 +74,39 @@ }, "smithy.api#documentation": "The Application Migration Service service.
", "smithy.api#title": "Application Migration Service" - } + }, + "version": "2020-02-26", + "operations": [ + { + "target": "com.amazonaws.mgn#InitializeService" + }, + { + "target": "com.amazonaws.mgn#ListTagsForResource" + }, + { + "target": "com.amazonaws.mgn#TagResource" + }, + { + "target": "com.amazonaws.mgn#UntagResource" + } + ], + "resources": [ + { + "target": "com.amazonaws.mgn#AccountResource" + }, + { + "target": "com.amazonaws.mgn#JobResource" + }, + { + "target": "com.amazonaws.mgn#ReplicationConfigurationTemplateResource" + }, + { + "target": "com.amazonaws.mgn#SourceServerResource" + }, + { + "target": "com.amazonaws.mgn#VcenterClientResource" + } + ] }, "com.amazonaws.mgn#BoundedString": { "type": "string", @@ -459,6 +462,14 @@ { "value": "FAILED_TO_START_DATA_TRANSFER", "name": "FAILED_TO_START_DATA_TRANSFER" + }, + { + "value": "UNSUPPORTED_VM_CONFIGURATION", + "name": "UNSUPPORTED_VM_CONFIGURATION" + }, + { + "value": "LAST_SNAPSHOT_JOB_FAILED", + "name": "LAST_SNAPSHOT_JOB_FAILED" } ] } @@ -501,6 +512,12 @@ "traits": { "smithy.api#documentation": "Error in obtaining data replication info.
" } + }, + "lastSnapshotDateTime": { + "target": "com.amazonaws.mgn#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "Request to query data replication last snapshot time.
" + } } }, "traits": { @@ -730,6 +747,14 @@ { "value": "DISCONNECTED", "name": "DISCONNECTED" + }, + { + "value": "PENDING_SNAPSHOT_SHIPPING", + "name": "PENDING_SNAPSHOT_SHIPPING" + }, + { + "value": "SHIPPING_SNAPSHOT", + "name": "SHIPPING_SNAPSHOT" } ] } @@ -869,6 +894,44 @@ "type": "structure", "members": {} }, + "com.amazonaws.mgn#DeleteVcenterClient": { + "type": "operation", + "input": { + "target": "com.amazonaws.mgn#DeleteVcenterClientRequest" + }, + "errors": [ + { + "target": "com.amazonaws.mgn#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.mgn#UninitializedAccountException" + }, + { + "target": "com.amazonaws.mgn#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes a single vCenter client by ID.
", + "smithy.api#http": { + "method": "POST", + "uri": "/DeleteVcenterClient", + "code": 204 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.mgn#DeleteVcenterClientRequest": { + "type": "structure", + "members": { + "vcenterClientID": { + "target": "com.amazonaws.mgn#VcenterClientID", + "traits": { + "smithy.api#documentation": "ID of resource to be deleted.
", + "smithy.api#required": {} + } + } + } + }, "com.amazonaws.mgn#DescribeJobLogItems": { "type": "operation", "input": { @@ -1199,6 +1262,18 @@ "traits": { "smithy.api#documentation": "Request to filter Source Servers list by archived.
" } + }, + "replicationTypes": { + "target": "com.amazonaws.mgn#ReplicationTypes", + "traits": { + "smithy.api#documentation": "Request to filter Source Servers list by replication type.
" + } + }, + "lifeCycleStates": { + "target": "com.amazonaws.mgn#LifeCycleStates", + "traits": { + "smithy.api#documentation": "Request to filter Source Servers list by life cycle states.
" + } } }, "traits": { @@ -1234,6 +1309,77 @@ } } }, + "com.amazonaws.mgn#DescribeVcenterClients": { + "type": "operation", + "input": { + "target": "com.amazonaws.mgn#DescribeVcenterClientsRequest" + }, + "output": { + "target": "com.amazonaws.mgn#DescribeVcenterClientsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.mgn#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.mgn#UninitializedAccountException" + }, + { + "target": "com.amazonaws.mgn#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Lists all vCenter clients.
", + "smithy.api#http": { + "method": "GET", + "uri": "/DescribeVcenterClients", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "items", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.mgn#DescribeVcenterClientsRequest": { + "type": "structure", + "members": { + "maxResults": { + "target": "com.amazonaws.mgn#StrictlyPositiveInteger", + "traits": { + "smithy.api#documentation": "Maximum results to be returned in DescribeVcenterClients.
", + "smithy.api#httpQuery": "maxResults" + } + }, + "nextToken": { + "target": "com.amazonaws.mgn#PaginationToken", + "traits": { + "smithy.api#documentation": "Next pagination token to be provided for DescribeVcenterClients.
", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.mgn#DescribeVcenterClientsResponse": { + "type": "structure", + "members": { + "items": { + "target": "com.amazonaws.mgn#VcenterClientList", + "traits": { + "smithy.api#documentation": "List of items returned by DescribeVcenterClients.
" + } + }, + "nextToken": { + "target": "com.amazonaws.mgn#PaginationToken", + "traits": { + "smithy.api#documentation": "Next pagination token returned from DescribeVcenterClients.
" + } + } + } + }, "com.amazonaws.mgn#DisconnectFromService": { "type": "operation", "input": { @@ -1509,6 +1655,12 @@ "traits": { "smithy.api#documentation": "AWS Instance ID identification hint.
" } + }, + "vmPath": { + "target": "com.amazonaws.mgn#BoundedString", + "traits": { + "smithy.api#documentation": "vCenter VM path identification hint.
" + } } }, "traits": { @@ -2246,10 +2398,26 @@ { "value": "DISCONNECTED", "name": "DISCONNECTED" + }, + { + "value": "DISCOVERED", + "name": "DISCOVERED" } ] } }, + "com.amazonaws.mgn#LifeCycleStates": { + "type": "list", + "member": { + "target": "com.amazonaws.mgn#LifeCycleState" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 10 + } + } + }, "com.amazonaws.mgn#ListTagsForResource": { "type": "operation", "input": { @@ -2823,6 +2991,33 @@ } } }, + "com.amazonaws.mgn#ReplicationType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "AGENT_BASED", + "name": "AGENT_BASED" + }, + { + "value": "SNAPSHOT_SHIPPING", + "name": "SNAPSHOT_SHIPPING" + } + ] + } + }, + "com.amazonaws.mgn#ReplicationTypes": { + "type": "list", + "member": { + "target": "com.amazonaws.mgn#ReplicationType" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2 + } + } + }, "com.amazonaws.mgn#ResourceNotFoundException": { "type": "structure", "members": { @@ -2901,6 +3096,46 @@ "smithy.api#pattern": "^sg-[0-9a-fA-F]{8,}$" } }, + "com.amazonaws.mgn#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.mgn#LargeBoundedString" + }, + "code": { + "target": "com.amazonaws.mgn#LargeBoundedString" + }, + "resourceId": { + "target": "com.amazonaws.mgn#LargeBoundedString", + "traits": { + "smithy.api#documentation": "Exceeded the service quota resource Id.
" + } + }, + "resourceType": { + "target": "com.amazonaws.mgn#LargeBoundedString", + "traits": { + "smithy.api#documentation": "Exceeded the service quota resource type.
" + } + }, + "serviceCode": { + "target": "com.amazonaws.mgn#LargeBoundedString", + "traits": { + "smithy.api#documentation": "Exceeded the service quota service code.
" + } + }, + "quotaCode": { + "target": "com.amazonaws.mgn#LargeBoundedString", + "traits": { + "smithy.api#documentation": "Exceeded the service quota code.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The request could not be completed because its exceeded the service quota.
", + "smithy.api#error": "client", + "smithy.api#httpError": 402 + } + }, "com.amazonaws.mgn#SmallBoundedString": { "type": "string", "traits": { @@ -3016,6 +3251,18 @@ "traits": { "smithy.api#documentation": "Source server properties.
" } + }, + "replicationType": { + "target": "com.amazonaws.mgn#ReplicationType", + "traits": { + "smithy.api#documentation": "Source server replication type.
" + } + }, + "vcenterClientID": { + "target": "com.amazonaws.mgn#VcenterClientID", + "traits": { + "smithy.api#documentation": "Source server vCenter client id.
" + } } }, "traits": { @@ -3071,11 +3318,17 @@ { "target": "com.amazonaws.mgn#RetryDataReplication" }, + { + "target": "com.amazonaws.mgn#StartReplication" + }, { "target": "com.amazonaws.mgn#UpdateLaunchConfiguration" }, { "target": "com.amazonaws.mgn#UpdateReplicationConfiguration" + }, + { + "target": "com.amazonaws.mgn#UpdateSourceServerReplicationType" } ], "collectionOperations": [ @@ -3173,6 +3426,52 @@ } } }, + "com.amazonaws.mgn#StartReplication": { + "type": "operation", + "input": { + "target": "com.amazonaws.mgn#StartReplicationRequest" + }, + "output": { + "target": "com.amazonaws.mgn#SourceServer" + }, + "errors": [ + { + "target": "com.amazonaws.mgn#ConflictException" + }, + { + "target": "com.amazonaws.mgn#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.mgn#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.mgn#UninitializedAccountException" + }, + { + "target": "com.amazonaws.mgn#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Starts replication on source server by ID.
", + "smithy.api#http": { + "method": "POST", + "uri": "/StartReplication", + "code": 200 + } + } + }, + "com.amazonaws.mgn#StartReplicationRequest": { + "type": "structure", + "members": { + "sourceServerID": { + "target": "com.amazonaws.mgn#SourceServerID", + "traits": { + "smithy.api#documentation": "ID of source server on which to start replication.
", + "smithy.api#required": {} + } + } + } + }, "com.amazonaws.mgn#StartTest": { "type": "operation", "input": { @@ -3871,6 +4170,56 @@ } } }, + "com.amazonaws.mgn#UpdateSourceServerReplicationType": { + "type": "operation", + "input": { + "target": "com.amazonaws.mgn#UpdateSourceServerReplicationTypeRequest" + }, + "output": { + "target": "com.amazonaws.mgn#SourceServer" + }, + "errors": [ + { + "target": "com.amazonaws.mgn#ConflictException" + }, + { + "target": "com.amazonaws.mgn#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.mgn#UninitializedAccountException" + }, + { + "target": "com.amazonaws.mgn#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Updates source server Replication Type by ID.
", + "smithy.api#http": { + "method": "POST", + "uri": "/UpdateSourceServerReplicationType", + "code": 200 + } + } + }, + "com.amazonaws.mgn#UpdateSourceServerReplicationTypeRequest": { + "type": "structure", + "members": { + "sourceServerID": { + "target": "com.amazonaws.mgn#SourceServerID", + "traits": { + "smithy.api#documentation": "ID of source server on which to update replication type.
", + "smithy.api#required": {} + } + }, + "replicationType": { + "target": "com.amazonaws.mgn#ReplicationType", + "traits": { + "smithy.api#documentation": "Replication type to which to update source server.
", + "smithy.api#required": {} + } + } + } + }, "com.amazonaws.mgn#ValidationException": { "type": "structure", "members": { @@ -3947,6 +4296,100 @@ } ] } + }, + "com.amazonaws.mgn#VcenterClient": { + "type": "structure", + "members": { + "vcenterClientID": { + "target": "com.amazonaws.mgn#VcenterClientID", + "traits": { + "smithy.api#documentation": "ID of vCenter client.
" + } + }, + "arn": { + "target": "com.amazonaws.mgn#ARN", + "traits": { + "smithy.api#documentation": "Arn of vCenter client.
" + } + }, + "hostname": { + "target": "com.amazonaws.mgn#BoundedString", + "traits": { + "smithy.api#documentation": "Hostname of vCenter client .
" + } + }, + "vcenterUUID": { + "target": "com.amazonaws.mgn#BoundedString", + "traits": { + "smithy.api#documentation": "Vcenter UUID of vCenter client.
" + } + }, + "datacenterName": { + "target": "com.amazonaws.mgn#BoundedString", + "traits": { + "smithy.api#documentation": "Datacenter name of vCenter client.
" + } + }, + "lastSeenDatetime": { + "target": "com.amazonaws.mgn#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "Last seen time of vCenter client.
" + } + }, + "sourceServerTags": { + "target": "com.amazonaws.mgn#TagsMap", + "traits": { + "smithy.api#documentation": "Tags for Source Server of vCenter client.
" + } + }, + "tags": { + "target": "com.amazonaws.mgn#TagsMap", + "traits": { + "smithy.api#documentation": "Tags for vCenter client.
" + } + } + }, + "traits": { + "smithy.api#documentation": "vCenter client.
" + } + }, + "com.amazonaws.mgn#VcenterClientID": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 21, + "max": 21 + }, + "smithy.api#pattern": "^vcc-[0-9a-zA-Z]{17}$" + } + }, + "com.amazonaws.mgn#VcenterClientList": { + "type": "list", + "member": { + "target": "com.amazonaws.mgn#VcenterClient" + } + }, + "com.amazonaws.mgn#VcenterClientResource": { + "type": "resource", + "identifiers": { + "vcenterClientID": { + "target": "com.amazonaws.mgn#VcenterClientID" + } + }, + "delete": { + "target": "com.amazonaws.mgn#DeleteVcenterClient" + }, + "list": { + "target": "com.amazonaws.mgn#DescribeVcenterClients" + }, + "traits": { + "aws.api#arn": { + "template": "vcenter-client/{vcenterClientID}", + "absolute": false, + "noAccount": false, + "noRegion": false + } + } } } } \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/migrationhubrefactorspaces.2021-10-26.json b/codegen/sdk-codegen/aws-models/migrationhubrefactorspaces.2021-10-26.json new file mode 100644 index 00000000000..263702ddf86 --- /dev/null +++ b/codegen/sdk-codegen/aws-models/migrationhubrefactorspaces.2021-10-26.json @@ -0,0 +1,4351 @@ +{ + "smithy": "1.0", + "shapes": { + "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.migrationhubrefactorspaces#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The user does not have sufficient access to perform this action.
", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.migrationhubrefactorspaces#AccountId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 12, + "max": 12 + }, + "smithy.api#pattern": "^\\d{12}$" + } + }, + "com.amazonaws.migrationhubrefactorspaces#AdditionalDetails": { + "type": "map", + "key": { + "target": "com.amazonaws.migrationhubrefactorspaces#AdditionalDetailsKey" + }, + "value": { + "target": "com.amazonaws.migrationhubrefactorspaces#AdditionalDetailsValue" + } + }, + "com.amazonaws.migrationhubrefactorspaces#AdditionalDetailsKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 50 + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#AdditionalDetailsValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#ApiGatewayEndpointType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "REGIONAL", + "name": "REGIONAL" + }, + { + "value": "PRIVATE", + "name": "PRIVATE" + } + ] + } + }, + "com.amazonaws.migrationhubrefactorspaces#ApiGatewayId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 10, + "max": 10 + }, + "smithy.api#pattern": "^[a-z0-9]{10}$" + } + }, + "com.amazonaws.migrationhubrefactorspaces#ApiGatewayProxyConfig": { + "type": "structure", + "members": { + "ProxyUrl": { + "target": "com.amazonaws.migrationhubrefactorspaces#Uri", + "traits": { + "smithy.api#documentation": "The endpoint URL of the API Gateway proxy.
" + } + }, + "ApiGatewayId": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApiGatewayId", + "traits": { + "smithy.api#documentation": "The resource ID of the API Gateway for the proxy.
" + } + }, + "VpcLinkId": { + "target": "com.amazonaws.migrationhubrefactorspaces#VpcLinkId", + "traits": { + "smithy.api#documentation": "The VpcLink
ID of the API Gateway proxy.
The Amazon Resource Name (ARN) of the Network Load Balancer configured by the API Gateway proxy.
" + } + }, + "NlbName": { + "target": "com.amazonaws.migrationhubrefactorspaces#NlbName", + "traits": { + "smithy.api#documentation": "The name of the Network Load Balancer that is configured by the API Gateway proxy.
" + } + }, + "EndpointType": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApiGatewayEndpointType", + "traits": { + "smithy.api#documentation": "The type of API Gateway endpoint created.
" + } + }, + "StageName": { + "target": "com.amazonaws.migrationhubrefactorspaces#StageName", + "traits": { + "smithy.api#documentation": "The name of the API Gateway stage. The name defaults to prod
.
A wrapper object holding the Amazon API Gateway proxy configuration.
" + } + }, + "com.amazonaws.migrationhubrefactorspaces#ApiGatewayProxyInput": { + "type": "structure", + "members": { + "EndpointType": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApiGatewayEndpointType", + "traits": { + "smithy.api#documentation": "The type of endpoint to use for the API Gateway proxy. If no value is specified in\n the request, the value is set to REGIONAL
by default.
If the value is set to PRIVATE
in the request, this creates a private API\n endpoint that is isolated from the public internet. The private endpoint can only be accessed\n by using Amazon Virtual Private Cloud (Amazon VPC) endpoints for Amazon API Gateway that\n have been granted access.
The name of the API Gateway stage. The name defaults to prod
.
A wrapper object holding the Amazon API Gateway endpoint input.
" + } + }, + "com.amazonaws.migrationhubrefactorspaces#ApiGatewayProxySummary": { + "type": "structure", + "members": { + "ProxyUrl": { + "target": "com.amazonaws.migrationhubrefactorspaces#Uri", + "traits": { + "smithy.api#documentation": "The endpoint URL of the API Gateway proxy.
" + } + }, + "ApiGatewayId": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApiGatewayId", + "traits": { + "smithy.api#documentation": "The resource ID of the API Gateway for the proxy.
" + } + }, + "VpcLinkId": { + "target": "com.amazonaws.migrationhubrefactorspaces#VpcLinkId", + "traits": { + "smithy.api#documentation": "The VpcLink
ID of the API Gateway proxy.
The Amazon Resource Name (ARN) of the Network Load Balancer configured by the API Gateway proxy.
" + } + }, + "NlbName": { + "target": "com.amazonaws.migrationhubrefactorspaces#NlbName", + "traits": { + "smithy.api#documentation": "The name of the Network Load Balancer that is configured by the API Gateway proxy.
" + } + }, + "EndpointType": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApiGatewayEndpointType", + "traits": { + "smithy.api#documentation": "The type of API Gateway endpoint created.
" + } + }, + "StageName": { + "target": "com.amazonaws.migrationhubrefactorspaces#StageName", + "traits": { + "smithy.api#documentation": "The name of the API Gateway stage. The name defaults to prod
.
A wrapper object holding the Amazon API Gateway proxy summary.
" + } + }, + "com.amazonaws.migrationhubrefactorspaces#ApplicationId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 14, + "max": 14 + }, + "smithy.api#pattern": "^app-[0-9A-Za-z]{10}$" + } + }, + "com.amazonaws.migrationhubrefactorspaces#ApplicationName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 3, + "max": 63 + }, + "smithy.api#pattern": "^(?!app-)[a-zA-Z0-9]+[a-zA-Z0-9-_ ]+$" + } + }, + "com.amazonaws.migrationhubrefactorspaces#ApplicationState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CREATING", + "name": "CREATING" + }, + { + "value": "ACTIVE", + "name": "ACTIVE" + }, + { + "value": "DELETING", + "name": "DELETING" + }, + { + "value": "FAILED", + "name": "FAILED" + }, + { + "value": "UPDATING", + "name": "UPDATING" + } + ] + } + }, + "com.amazonaws.migrationhubrefactorspaces#ApplicationSummaries": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationSummary" + } + }, + "com.amazonaws.migrationhubrefactorspaces#ApplicationSummary": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationName", + "traits": { + "smithy.api#documentation": "The name of the application.
" + } + }, + "Arn": { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceArn", + "traits": { + "smithy.api#documentation": "he Amazon Resource Name (ARN) of the application.
" + } + }, + "OwnerAccountId": { + "target": "com.amazonaws.migrationhubrefactorspaces#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the application owner.
" + } + }, + "CreatedByAccountId": { + "target": "com.amazonaws.migrationhubrefactorspaces#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the application creator.
" + } + }, + "ApplicationId": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationId", + "traits": { + "smithy.api#documentation": "The unique identifier of the application.
" + } + }, + "EnvironmentId": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentId", + "traits": { + "smithy.api#documentation": "The unique identifier of the environment.
" + } + }, + "VpcId": { + "target": "com.amazonaws.migrationhubrefactorspaces#VpcId", + "traits": { + "smithy.api#documentation": "The ID of the virtual private cloud (VPC).
" + } + }, + "ProxyType": { + "target": "com.amazonaws.migrationhubrefactorspaces#ProxyType", + "traits": { + "smithy.api#documentation": "The proxy type of the proxy created within the application.
" + } + }, + "ApiGatewayProxy": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApiGatewayProxySummary", + "traits": { + "smithy.api#documentation": "The endpoint URL of the Amazon API Gateway proxy.
" + } + }, + "State": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationState", + "traits": { + "smithy.api#documentation": "The current state of the application.
" + } + }, + "Tags": { + "target": "com.amazonaws.migrationhubrefactorspaces#TagMap", + "traits": { + "smithy.api#documentation": "The tags assigned to the application.
" + } + }, + "Error": { + "target": "com.amazonaws.migrationhubrefactorspaces#ErrorResponse", + "traits": { + "smithy.api#documentation": "Any error associated with the application resource.
" + } + }, + "LastUpdatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the application was last updated.
" + } + }, + "CreatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the application is created.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The list of ApplicationSummary
objects.
The ID of the resource.
", + "smithy.api#required": {} + } + }, + "ResourceType": { + "target": "com.amazonaws.migrationhubrefactorspaces#String", + "traits": { + "smithy.api#documentation": "The type of resource.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Updating or deleting a resource can cause an inconsistent state.
", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.migrationhubrefactorspaces#CreateApplication": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubrefactorspaces#CreateApplicationRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubrefactorspaces#CreateApplicationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ConflictException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Creates an Amazon Web Services Migration Hub Refactor Spaces application. The account that owns the environment also owns the\n applications created inside the environment, regardless of the account that creates the\n application. Refactor Spaces provisions the Amazon API Gateway and Network Load Balancer for\n the application proxy inside your account.
", + "smithy.api#http": { + "method": "POST", + "uri": "/environments/{EnvironmentIdentifier}/applications", + "code": 200 + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#CreateApplicationRequest": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationName", + "traits": { + "smithy.api#documentation": "The name to use for the application.
", + "smithy.api#required": {} + } + }, + "EnvironmentIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentId", + "traits": { + "smithy.api#documentation": "The unique identifier of the environment.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "VpcId": { + "target": "com.amazonaws.migrationhubrefactorspaces#VpcId", + "traits": { + "smithy.api#documentation": "The ID of the virtual private cloud (VPC).
", + "smithy.api#required": {} + } + }, + "ProxyType": { + "target": "com.amazonaws.migrationhubrefactorspaces#ProxyType", + "traits": { + "smithy.api#documentation": "The proxy type of the proxy created within the application.
", + "smithy.api#required": {} + } + }, + "ApiGatewayProxy": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApiGatewayProxyInput", + "traits": { + "smithy.api#documentation": "A wrapper object holding the API Gateway endpoint type and stage name for the\n proxy.
" + } + }, + "Tags": { + "target": "com.amazonaws.migrationhubrefactorspaces#TagMap", + "traits": { + "smithy.api#documentation": "The tags to assign to the application. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.
" + } + }, + "ClientToken": { + "target": "com.amazonaws.migrationhubrefactorspaces#ClientToken", + "traits": { + "smithy.api#documentation": "A unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request.
", + "smithy.api#idempotencyToken": {} + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#CreateApplicationResponse": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationName", + "traits": { + "smithy.api#documentation": "The name of the application.
" + } + }, + "Arn": { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the application. The format for this ARN is \narn:aws:refactor-spaces:region:account-id:resource-type/resource-id\n
. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n Amazon Web Services General Reference.
The Amazon Web Services account ID of the application owner.
" + } + }, + "CreatedByAccountId": { + "target": "com.amazonaws.migrationhubrefactorspaces#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of application creator.
" + } + }, + "ApplicationId": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationId", + "traits": { + "smithy.api#documentation": "The unique identifier of the application.
" + } + }, + "EnvironmentId": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentId", + "traits": { + "smithy.api#documentation": "The ID of the environment in which the application is created.
" + } + }, + "VpcId": { + "target": "com.amazonaws.migrationhubrefactorspaces#VpcId", + "traits": { + "smithy.api#documentation": "The ID of the Amazon VPC.
" + } + }, + "ProxyType": { + "target": "com.amazonaws.migrationhubrefactorspaces#ProxyType", + "traits": { + "smithy.api#documentation": "The proxy type of the proxy created within the application.
" + } + }, + "ApiGatewayProxy": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApiGatewayProxyInput", + "traits": { + "smithy.api#documentation": "A wrapper object holding the API Gateway endpoint type and stage name for the\n proxy.
" + } + }, + "State": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationState", + "traits": { + "smithy.api#documentation": "The current state of the application.
" + } + }, + "Tags": { + "target": "com.amazonaws.migrationhubrefactorspaces#TagMap", + "traits": { + "smithy.api#documentation": "The tags assigned to the application. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.
" + } + }, + "LastUpdatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the application was last updated.
" + } + }, + "CreatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the application is created.
" + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#CreateEnvironment": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubrefactorspaces#CreateEnvironmentRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubrefactorspaces#CreateEnvironmentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ConflictException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Creates an Amazon Web Services Migration Hub Refactor Spaces environment. The caller owns the environment resource, and they\n are referred to as the environment owner. The environment owner has\n cross-account visibility and control of Refactor Spaces resources that are added to the environment\n by other accounts that the environment is shared with. When creating an environment, Refactor Spaces\n provisions a transit gateway in your account.
", + "smithy.api#http": { + "method": "POST", + "uri": "/environments", + "code": 200 + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#CreateEnvironmentRequest": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentName", + "traits": { + "smithy.api#documentation": "The name of the environment.
", + "smithy.api#required": {} + } + }, + "Description": { + "target": "com.amazonaws.migrationhubrefactorspaces#Description", + "traits": { + "smithy.api#documentation": "The description of the environment.
" + } + }, + "NetworkFabricType": { + "target": "com.amazonaws.migrationhubrefactorspaces#NetworkFabricType", + "traits": { + "smithy.api#documentation": "The network fabric type of the environment.
", + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.migrationhubrefactorspaces#TagMap", + "traits": { + "smithy.api#documentation": "The tags to assign to the environment. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.
" + } + }, + "ClientToken": { + "target": "com.amazonaws.migrationhubrefactorspaces#ClientToken", + "traits": { + "smithy.api#documentation": "A unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request.
", + "smithy.api#idempotencyToken": {} + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#CreateEnvironmentResponse": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentName", + "traits": { + "smithy.api#documentation": "The name of the environment.
" + } + }, + "Arn": { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the environment.
" + } + }, + "Description": { + "target": "com.amazonaws.migrationhubrefactorspaces#Description", + "traits": { + "smithy.api#documentation": "A description of the environment.
" + } + }, + "EnvironmentId": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentId", + "traits": { + "smithy.api#documentation": "The unique identifier of the environment.
" + } + }, + "NetworkFabricType": { + "target": "com.amazonaws.migrationhubrefactorspaces#NetworkFabricType", + "traits": { + "smithy.api#documentation": "The network fabric type of the environment.
" + } + }, + "OwnerAccountId": { + "target": "com.amazonaws.migrationhubrefactorspaces#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of environment owner.
" + } + }, + "State": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentState", + "traits": { + "smithy.api#documentation": "The current state of the environment.
" + } + }, + "Tags": { + "target": "com.amazonaws.migrationhubrefactorspaces#TagMap", + "traits": { + "smithy.api#documentation": "The tags assigned to the created environment. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair..
" + } + }, + "LastUpdatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the environment was last updated.
" + } + }, + "CreatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the environment is created.
" + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#CreateRoute": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubrefactorspaces#CreateRouteRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubrefactorspaces#CreateRouteResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ConflictException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Creates an Amazon Web Services Migration Hub Refactor Spaces route. The account owner of the service resource is always the\n environment owner, regardless of which account creates the route. Routes target a service in\n the application. If an application does not have any routes, then the first route must be\n created as a DEFAULT
\n RouteType
.
When you create a route, Refactor Spaces configures the Amazon API Gateway to send traffic\n to the target service as follows:
\nIf the service has a URL endpoint, and the endpoint resolves to a private IP address,\n Refactor Spaces routes traffic using the API Gateway VPC link.
\nIf the service has a URL endpoint, and the endpoint resolves to a public IP address,\n Refactor Spaces routes traffic over the public internet.
\nIf the service has an Lambda function endpoint, then Refactor Spaces uses\n the API Gateway\n Lambda integration.
\nA health check is performed on the service when the route is created. If the health check\n fails, the route transitions to FAILED
, and no traffic is sent to the service.
For Lambda functions, the Lambda function state is checked. If\n the function is not active, the function configuration is updated so that Lambda\n resources are provisioned. If the Lambda state is Failed
, then the\n route creation fails. For more information, see the GetFunctionConfiguration's State response parameter in the Lambda Developer Guide.
For public URLs, a connection is opened to the public endpoint. If the URL is not reachable,\n the health check fails. For private URLs, a target group is created and the target group\n health check is run.
\nThe HealthCheckProtocol
, HealthCheckPort
, and\n HealthCheckPath
are the same protocol, port, and path specified in the URL or\n health URL, if used. All other settings use the default values, as described in Health checks\n for your target groups. The health check is considered successful if at least one\n target within the target group transitions to a healthy state.
The ID of the environment in which the route is created.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ApplicationIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationId", + "traits": { + "smithy.api#documentation": "The ID of the application within which the route is being created.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ServiceIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceId", + "traits": { + "smithy.api#documentation": "The ID of the service in which the route is created. Traffic that matches this route is\n forwarded to this service.
", + "smithy.api#required": {} + } + }, + "RouteType": { + "target": "com.amazonaws.migrationhubrefactorspaces#RouteType", + "traits": { + "smithy.api#documentation": "The route type of the route. DEFAULT
indicates that all traffic that does not\n match another route is forwarded to the default route. Applications must have a default route\n before any other routes can be created. URI_PATH
indicates a route that is based\n on a URI path.
The configuration for the URI path route type.
" + } + }, + "Tags": { + "target": "com.amazonaws.migrationhubrefactorspaces#TagMap", + "traits": { + "smithy.api#documentation": "The tags to assign to the route. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair..
" + } + }, + "ClientToken": { + "target": "com.amazonaws.migrationhubrefactorspaces#ClientToken", + "traits": { + "smithy.api#documentation": "A unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request.
", + "smithy.api#idempotencyToken": {} + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#CreateRouteResponse": { + "type": "structure", + "members": { + "RouteId": { + "target": "com.amazonaws.migrationhubrefactorspaces#RouteId", + "traits": { + "smithy.api#documentation": "The unique identifier of the route.
" + } + }, + "Arn": { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the route. The format for this ARN is \narn:aws:refactor-spaces:region:account-id:resource-type/resource-id\n
. For more information about ARNs, \nsee \n Amazon Resource Names (ARNs) in the \n Amazon Web Services General Reference.
The Amazon Web Services account ID of the route owner.
" + } + }, + "CreatedByAccountId": { + "target": "com.amazonaws.migrationhubrefactorspaces#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the route creator.
" + } + }, + "RouteType": { + "target": "com.amazonaws.migrationhubrefactorspaces#RouteType", + "traits": { + "smithy.api#documentation": "The route type of the route.
" + } + }, + "ServiceId": { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceId", + "traits": { + "smithy.api#documentation": "The ID of service in which the rute iscreated. Traffic that matches this route is\n forwarded to this service.
" + } + }, + "ApplicationId": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationId", + "traits": { + "smithy.api#documentation": "The ID of the application in which the route is created.
" + } + }, + "UriPathRoute": { + "target": "com.amazonaws.migrationhubrefactorspaces#UriPathRouteInput", + "traits": { + "smithy.api#documentation": "onfiguration for the URI path route type.
" + } + }, + "State": { + "target": "com.amazonaws.migrationhubrefactorspaces#RouteState", + "traits": { + "smithy.api#documentation": "he current state of the route.
" + } + }, + "Tags": { + "target": "com.amazonaws.migrationhubrefactorspaces#TagMap", + "traits": { + "smithy.api#documentation": "The tags assigned to the created route. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.
" + } + }, + "LastUpdatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the route was last updated.
" + } + }, + "CreatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the route is created.
" + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#CreateService": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubrefactorspaces#CreateServiceRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubrefactorspaces#CreateServiceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ConflictException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Creates an Amazon Web Services Migration Hub Refactor Spaces service. The account owner of the service is always the\n environment owner, regardless of which account in the environment creates the service.\n Services have either a URL endpoint in a virtual private cloud (VPC), or a Lambda\n function endpoint.
\nIf an Amazon Web Services resourceis launched in a service VPC, and you want it to be\n accessible to all of an environment’s services with VPCs and routes, apply the\n RefactorSpacesSecurityGroup
to the resource. Alternatively, to add more\n cross-account constraints, apply your own security group.
The name of the service.
", + "smithy.api#required": {} + } + }, + "Description": { + "target": "com.amazonaws.migrationhubrefactorspaces#Description", + "traits": { + "smithy.api#documentation": "The description of the service.
" + } + }, + "EnvironmentIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentId", + "traits": { + "smithy.api#documentation": "The ID of the environment in which the service is created.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ApplicationIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationId", + "traits": { + "smithy.api#documentation": "The ID of the application which the service is created.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "VpcId": { + "target": "com.amazonaws.migrationhubrefactorspaces#VpcId", + "traits": { + "smithy.api#documentation": "The ID of the VPC.
" + } + }, + "EndpointType": { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceEndpointType", + "traits": { + "smithy.api#documentation": "The type of endpoint to use for the service. The type can be a URL in a VPC or an Lambda function.
", + "smithy.api#required": {} + } + }, + "UrlEndpoint": { + "target": "com.amazonaws.migrationhubrefactorspaces#UrlEndpointInput", + "traits": { + "smithy.api#documentation": "The configuration for the URL endpoint type.
" + } + }, + "LambdaEndpoint": { + "target": "com.amazonaws.migrationhubrefactorspaces#LambdaEndpointInput", + "traits": { + "smithy.api#documentation": "The configuration for the Lambda endpoint type.
" + } + }, + "Tags": { + "target": "com.amazonaws.migrationhubrefactorspaces#TagMap", + "traits": { + "smithy.api#documentation": "The tags to assign to the service. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair..
" + } + }, + "ClientToken": { + "target": "com.amazonaws.migrationhubrefactorspaces#ClientToken", + "traits": { + "smithy.api#documentation": "A unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request.
", + "smithy.api#idempotencyToken": {} + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#CreateServiceResponse": { + "type": "structure", + "members": { + "ServiceId": { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceId", + "traits": { + "smithy.api#documentation": "The unique identifier of the service.
" + } + }, + "Name": { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceName", + "traits": { + "smithy.api#documentation": "The name of the service.
" + } + }, + "Arn": { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the service.
" + } + }, + "OwnerAccountId": { + "target": "com.amazonaws.migrationhubrefactorspaces#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the service owner.
" + } + }, + "CreatedByAccountId": { + "target": "com.amazonaws.migrationhubrefactorspaces#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the service creator.
" + } + }, + "Description": { + "target": "com.amazonaws.migrationhubrefactorspaces#Description", + "traits": { + "smithy.api#documentation": "The description of the created service.
" + } + }, + "EnvironmentId": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentId", + "traits": { + "smithy.api#documentation": "The unique identifier of the environment.
" + } + }, + "ApplicationId": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationId", + "traits": { + "smithy.api#documentation": "The ID of the application that the created service belongs to.
" + } + }, + "VpcId": { + "target": "com.amazonaws.migrationhubrefactorspaces#VpcId", + "traits": { + "smithy.api#documentation": "The ID of the VPC.
" + } + }, + "EndpointType": { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceEndpointType", + "traits": { + "smithy.api#documentation": "The endpoint type of the service.
" + } + }, + "UrlEndpoint": { + "target": "com.amazonaws.migrationhubrefactorspaces#UrlEndpointInput", + "traits": { + "smithy.api#documentation": "The configuration for the URL endpoint type.
" + } + }, + "LambdaEndpoint": { + "target": "com.amazonaws.migrationhubrefactorspaces#LambdaEndpointInput", + "traits": { + "smithy.api#documentation": "The configuration for the Lambda endpoint type.
" + } + }, + "State": { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceState", + "traits": { + "smithy.api#documentation": "The current state of the service.
" + } + }, + "Tags": { + "target": "com.amazonaws.migrationhubrefactorspaces#TagMap", + "traits": { + "smithy.api#documentation": "The tags assigned to the created service. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair..
" + } + }, + "LastUpdatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the service was last updated.
" + } + }, + "CreatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the service is created.
" + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#DeleteApplication": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubrefactorspaces#DeleteApplicationRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubrefactorspaces#DeleteApplicationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ConflictException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes an Amazon Web Services Migration Hub Refactor Spaces application. Before you can delete an application, you must first\n delete any services or routes within the application.
", + "smithy.api#http": { + "method": "DELETE", + "uri": "/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.migrationhubrefactorspaces#DeleteApplicationRequest": { + "type": "structure", + "members": { + "EnvironmentIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentId", + "traits": { + "smithy.api#documentation": "The ID of the environment.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ApplicationIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationId", + "traits": { + "smithy.api#documentation": "The ID of the application.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#DeleteApplicationResponse": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationName", + "traits": { + "smithy.api#documentation": "The name of the application.
" + } + }, + "Arn": { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the application.
" + } + }, + "ApplicationId": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationId", + "traits": { + "smithy.api#documentation": "The ID of the application.
" + } + }, + "EnvironmentId": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentId", + "traits": { + "smithy.api#documentation": "The unique identifier of the application’s environment.
" + } + }, + "State": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationState", + "traits": { + "smithy.api#documentation": "The current state of the application.
" + } + }, + "LastUpdatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the environment was last updated.
" + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#DeleteEnvironment": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubrefactorspaces#DeleteEnvironmentRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubrefactorspaces#DeleteEnvironmentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ConflictException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes an Amazon Web Services Migration Hub Refactor Spaces environment. Before you can delete an environment, you must first\n delete any applications and services within the environment.
", + "smithy.api#http": { + "method": "DELETE", + "uri": "/environments/{EnvironmentIdentifier}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.migrationhubrefactorspaces#DeleteEnvironmentRequest": { + "type": "structure", + "members": { + "EnvironmentIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentId", + "traits": { + "smithy.api#documentation": "The ID of the environment.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#DeleteEnvironmentResponse": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentName", + "traits": { + "smithy.api#documentation": "The name of the environment.
" + } + }, + "Arn": { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the environment.
" + } + }, + "EnvironmentId": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentId", + "traits": { + "smithy.api#documentation": "The unique identifier of the environment.
" + } + }, + "State": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentState", + "traits": { + "smithy.api#documentation": "The current state of the environment.
" + } + }, + "LastUpdatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the environment was last updated.
" + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#DeleteResourcePolicy": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubrefactorspaces#DeleteResourcePolicyRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubrefactorspaces#DeleteResourcePolicyResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes the resource policy set for the environment.
", + "smithy.api#http": { + "method": "DELETE", + "uri": "/resourcepolicy/{Identifier}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.migrationhubrefactorspaces#DeleteResourcePolicyRequest": { + "type": "structure", + "members": { + "Identifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourcePolicyIdentifier", + "traits": { + "smithy.api#documentation": "Amazon Resource Name (ARN) of the resource associated with the policy.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#DeleteResourcePolicyResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.migrationhubrefactorspaces#DeleteRoute": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubrefactorspaces#DeleteRouteRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubrefactorspaces#DeleteRouteResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ConflictException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes an Amazon Web Services Migration Hub Refactor Spaces route.
", + "smithy.api#http": { + "method": "DELETE", + "uri": "/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/routes/{RouteIdentifier}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.migrationhubrefactorspaces#DeleteRouteRequest": { + "type": "structure", + "members": { + "EnvironmentIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentId", + "traits": { + "smithy.api#documentation": "The ID of the environment to delete the route from.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ApplicationIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationId", + "traits": { + "smithy.api#documentation": "The ID of the application to delete the route from.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "RouteIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#RouteId", + "traits": { + "smithy.api#documentation": "The ID of the route to delete.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#DeleteRouteResponse": { + "type": "structure", + "members": { + "RouteId": { + "target": "com.amazonaws.migrationhubrefactorspaces#RouteId", + "traits": { + "smithy.api#documentation": "The ID of the route to delete.
" + } + }, + "Arn": { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the route.
" + } + }, + "ServiceId": { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceId", + "traits": { + "smithy.api#documentation": "The ID of the service that the route belongs to.
" + } + }, + "ApplicationId": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationId", + "traits": { + "smithy.api#documentation": "he ID of the application that the route belongs to.
" + } + }, + "State": { + "target": "com.amazonaws.migrationhubrefactorspaces#RouteState", + "traits": { + "smithy.api#documentation": "The current state of the route.
" + } + }, + "LastUpdatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the route was last updated.
" + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#DeleteService": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubrefactorspaces#DeleteServiceRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubrefactorspaces#DeleteServiceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ConflictException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes an Amazon Web Services Migration Hub Refactor Spaces service.
", + "smithy.api#http": { + "method": "DELETE", + "uri": "/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/services/{ServiceIdentifier}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.migrationhubrefactorspaces#DeleteServiceRequest": { + "type": "structure", + "members": { + "EnvironmentIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentId", + "traits": { + "smithy.api#documentation": "The ID of the environment that the service is in.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ApplicationIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationId", + "traits": { + "smithy.api#documentation": "Deletes a Refactor Spaces service.
\nThe RefactorSpacesSecurityGroup
security group must be removed from all\n Amazon Web Services resources in the virtual private cloud (VPC) prior to deleting a service with a URL\n endpoint in a VPC.
The ID of the service to delete.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#DeleteServiceResponse": { + "type": "structure", + "members": { + "ServiceId": { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceId", + "traits": { + "smithy.api#documentation": "The unique identifier of the service.
" + } + }, + "Name": { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceName", + "traits": { + "smithy.api#documentation": "The name of the service.
" + } + }, + "Arn": { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the service.
" + } + }, + "EnvironmentId": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentId", + "traits": { + "smithy.api#documentation": "The unique identifier of the environment.
" + } + }, + "ApplicationId": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationId", + "traits": { + "smithy.api#documentation": "The ID of the application that the service is in.
" + } + }, + "State": { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceState", + "traits": { + "smithy.api#documentation": "The current state of the service.
" + } + }, + "LastUpdatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the service was last updated.
" + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#Description": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": "^[a-zA-Z0-9-_\\s\\.\\!\\*\\#\\@\\']+$" + } + }, + "com.amazonaws.migrationhubrefactorspaces#Ec2TagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 255 + }, + "smithy.api#pattern": "^.*$" + } + }, + "com.amazonaws.migrationhubrefactorspaces#EnvironmentId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 14, + "max": 14 + }, + "smithy.api#pattern": "^env-[0-9A-Za-z]{10}$" + } + }, + "com.amazonaws.migrationhubrefactorspaces#EnvironmentName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 3, + "max": 63 + }, + "smithy.api#pattern": "^(?!env-)[a-zA-Z0-9]+[a-zA-Z0-9-_ ]+$" + } + }, + "com.amazonaws.migrationhubrefactorspaces#EnvironmentState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CREATING", + "name": "CREATING" + }, + { + "value": "ACTIVE", + "name": "ACTIVE" + }, + { + "value": "DELETING", + "name": "DELETING" + }, + { + "value": "FAILED", + "name": "FAILED" + } + ] + } + }, + "com.amazonaws.migrationhubrefactorspaces#EnvironmentSummaries": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentSummary" + } + }, + "com.amazonaws.migrationhubrefactorspaces#EnvironmentSummary": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentName", + "traits": { + "smithy.api#documentation": "The name of the environment.
" + } + }, + "Arn": { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the environment.
" + } + }, + "Description": { + "target": "com.amazonaws.migrationhubrefactorspaces#Description", + "traits": { + "smithy.api#documentation": "A description of the environment.
" + } + }, + "EnvironmentId": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentId", + "traits": { + "smithy.api#documentation": "The unique identifier of the environment.
" + } + }, + "NetworkFabricType": { + "target": "com.amazonaws.migrationhubrefactorspaces#NetworkFabricType", + "traits": { + "smithy.api#documentation": "The network fabric type of the environment.
" + } + }, + "OwnerAccountId": { + "target": "com.amazonaws.migrationhubrefactorspaces#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the environment owner.
" + } + }, + "TransitGatewayId": { + "target": "com.amazonaws.migrationhubrefactorspaces#TransitGatewayId", + "traits": { + "smithy.api#documentation": "The ID of the transit gateway set up by the environment.
" + } + }, + "State": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentState", + "traits": { + "smithy.api#documentation": "The current state of the environment.
" + } + }, + "Tags": { + "target": "com.amazonaws.migrationhubrefactorspaces#TagMap", + "traits": { + "smithy.api#documentation": "The tags assigned to the environment.
" + } + }, + "Error": { + "target": "com.amazonaws.migrationhubrefactorspaces#ErrorResponse", + "traits": { + "smithy.api#documentation": "Any error associated with the environment resource.
" + } + }, + "LastUpdatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the environment was last updated.
" + } + }, + "CreatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the environment is created.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The summary information for environments as a response to ListEnvironments
.
The unique identifier of the environment.
" + } + }, + "VpcId": { + "target": "com.amazonaws.migrationhubrefactorspaces#VpcId", + "traits": { + "smithy.api#documentation": "The ID of the VPC.
" + } + }, + "AccountId": { + "target": "com.amazonaws.migrationhubrefactorspaces#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the virtual private cloud (VPC) owner.
" + } + }, + "CidrBlocks": { + "target": "com.amazonaws.migrationhubrefactorspaces#CidrBlocks", + "traits": { + "smithy.api#documentation": "The list of Amazon Virtual Private Cloud (Amazon VPC) CIDR blocks.
" + } + }, + "VpcName": { + "target": "com.amazonaws.migrationhubrefactorspaces#Ec2TagValue", + "traits": { + "smithy.api#documentation": "The name of the VPC at the time it is added to the environment.
" + } + }, + "LastUpdatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the VPC was last updated by the environment.
" + } + }, + "CreatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the VPC is first added to the environment.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Provides summary information for the EnvironmentVpc
resource as a response to\n ListEnvironmentVpc
.
The error code associated with the error.
" + } + }, + "Message": { + "target": "com.amazonaws.migrationhubrefactorspaces#ErrorMessage", + "traits": { + "smithy.api#documentation": "The message associated with the error.
" + } + }, + "AccountId": { + "target": "com.amazonaws.migrationhubrefactorspaces#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the resource owner.
" + } + }, + "ResourceIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceIdentifier", + "traits": { + "smithy.api#documentation": "The ID of the resource.
" + } + }, + "ResourceType": { + "target": "com.amazonaws.migrationhubrefactorspaces#ErrorResourceType", + "traits": { + "smithy.api#documentation": "The type of resource.
" + } + }, + "AdditionalDetails": { + "target": "com.amazonaws.migrationhubrefactorspaces#AdditionalDetails", + "traits": { + "smithy.api#documentation": "Additional details about the error.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Error associated with a resource returned for a Get or List resource response.
" + } + }, + "com.amazonaws.migrationhubrefactorspaces#GetApplication": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubrefactorspaces#GetApplicationRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubrefactorspaces#GetApplicationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Gets an Amazon Web Services Migration Hub Refactor Spaces application.
", + "smithy.api#http": { + "method": "GET", + "uri": "/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.migrationhubrefactorspaces#GetApplicationRequest": { + "type": "structure", + "members": { + "EnvironmentIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentId", + "traits": { + "smithy.api#documentation": "The ID of the environment.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ApplicationIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationId", + "traits": { + "smithy.api#documentation": "The ID of the application.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#GetApplicationResponse": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationName", + "traits": { + "smithy.api#documentation": "The name of the application.
" + } + }, + "Arn": { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the application.
" + } + }, + "OwnerAccountId": { + "target": "com.amazonaws.migrationhubrefactorspaces#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the application owner.
" + } + }, + "CreatedByAccountId": { + "target": "com.amazonaws.migrationhubrefactorspaces#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the application creator.
" + } + }, + "ApplicationId": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationId", + "traits": { + "smithy.api#documentation": "The unique identifier of the application.
" + } + }, + "EnvironmentId": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentId", + "traits": { + "smithy.api#documentation": "The unique identifier of the environment.
" + } + }, + "VpcId": { + "target": "com.amazonaws.migrationhubrefactorspaces#VpcId", + "traits": { + "smithy.api#documentation": "The ID of the virtual private cloud (VPC).
" + } + }, + "ProxyType": { + "target": "com.amazonaws.migrationhubrefactorspaces#ProxyType", + "traits": { + "smithy.api#documentation": "The proxy type of the proxy created within the application.
" + } + }, + "ApiGatewayProxy": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApiGatewayProxyConfig", + "traits": { + "smithy.api#documentation": "The endpoint URL of the API Gateway proxy.
" + } + }, + "State": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationState", + "traits": { + "smithy.api#documentation": "The current state of the application.
" + } + }, + "Tags": { + "target": "com.amazonaws.migrationhubrefactorspaces#TagMap", + "traits": { + "smithy.api#documentation": "The tags assigned to the application. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.
" + } + }, + "Error": { + "target": "com.amazonaws.migrationhubrefactorspaces#ErrorResponse", + "traits": { + "smithy.api#documentation": "Any error associated with the application resource.
" + } + }, + "LastUpdatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the application was last updated.
" + } + }, + "CreatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the application is created.
" + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#GetEnvironment": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubrefactorspaces#GetEnvironmentRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubrefactorspaces#GetEnvironmentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Gets an Amazon Web Services Migration Hub Refactor Spaces environment.
", + "smithy.api#http": { + "method": "GET", + "uri": "/environments/{EnvironmentIdentifier}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.migrationhubrefactorspaces#GetEnvironmentRequest": { + "type": "structure", + "members": { + "EnvironmentIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentId", + "traits": { + "smithy.api#documentation": "The ID of the environment.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#GetEnvironmentResponse": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentName", + "traits": { + "smithy.api#documentation": "The name of the environment.
" + } + }, + "Arn": { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the environment.
" + } + }, + "Description": { + "target": "com.amazonaws.migrationhubrefactorspaces#Description", + "traits": { + "smithy.api#documentation": "The description of the environment.
" + } + }, + "EnvironmentId": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentId", + "traits": { + "smithy.api#documentation": "The unique identifier of the environment.
" + } + }, + "NetworkFabricType": { + "target": "com.amazonaws.migrationhubrefactorspaces#NetworkFabricType", + "traits": { + "smithy.api#documentation": "The network fabric type of the environment.
" + } + }, + "OwnerAccountId": { + "target": "com.amazonaws.migrationhubrefactorspaces#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the environment owner.
" + } + }, + "TransitGatewayId": { + "target": "com.amazonaws.migrationhubrefactorspaces#TransitGatewayId", + "traits": { + "smithy.api#documentation": "The ID of the transit gateway set up by the environment.
" + } + }, + "State": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentState", + "traits": { + "smithy.api#documentation": "The current state of the environment.
" + } + }, + "Tags": { + "target": "com.amazonaws.migrationhubrefactorspaces#TagMap", + "traits": { + "smithy.api#documentation": "The tags to assign to the environment. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.
" + } + }, + "Error": { + "target": "com.amazonaws.migrationhubrefactorspaces#ErrorResponse", + "traits": { + "smithy.api#documentation": "Any error associated with the environment resource.
" + } + }, + "LastUpdatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the environment was last updated.
" + } + }, + "CreatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the environment is created.
" + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#GetResourcePolicy": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubrefactorspaces#GetResourcePolicyRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubrefactorspaces#GetResourcePolicyResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Gets the resource-based permission policy that is set for the given environment.
", + "smithy.api#http": { + "method": "GET", + "uri": "/resourcepolicy/{Identifier}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.migrationhubrefactorspaces#GetResourcePolicyRequest": { + "type": "structure", + "members": { + "Identifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourcePolicyIdentifier", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the resource associated with the policy.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#GetResourcePolicyResponse": { + "type": "structure", + "members": { + "Policy": { + "target": "com.amazonaws.migrationhubrefactorspaces#PolicyString", + "traits": { + "smithy.api#documentation": "A JSON-formatted string for an Amazon Web Services resource-based policy.
" + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#GetRoute": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubrefactorspaces#GetRouteRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubrefactorspaces#GetRouteResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Gets an Amazon Web Services Migration Hub Refactor Spaces route.
", + "smithy.api#http": { + "method": "GET", + "uri": "/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/routes/{RouteIdentifier}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.migrationhubrefactorspaces#GetRouteRequest": { + "type": "structure", + "members": { + "EnvironmentIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentId", + "traits": { + "smithy.api#documentation": "The ID of the environment.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ApplicationIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationId", + "traits": { + "smithy.api#documentation": "The ID of the application.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "RouteIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#RouteId", + "traits": { + "smithy.api#documentation": "The ID of the route.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#GetRouteResponse": { + "type": "structure", + "members": { + "RouteId": { + "target": "com.amazonaws.migrationhubrefactorspaces#RouteId", + "traits": { + "smithy.api#documentation": "The unique identifier of the route.
\n\n DEFAULT: All traffic that does not match another route is\n forwarded to the default route. Applications must have a default route before any other routes\n can be created.
\n\n URI_PATH: A route that is based on a URI path.
" + } + }, + "Arn": { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the route.
" + } + }, + "OwnerAccountId": { + "target": "com.amazonaws.migrationhubrefactorspaces#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the route owner.
" + } + }, + "CreatedByAccountId": { + "target": "com.amazonaws.migrationhubrefactorspaces#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the route creator.
" + } + }, + "RouteType": { + "target": "com.amazonaws.migrationhubrefactorspaces#RouteType", + "traits": { + "smithy.api#documentation": "The type of route.
" + } + }, + "ServiceId": { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceId", + "traits": { + "smithy.api#documentation": "The unique identifier of the service.
" + } + }, + "ApplicationId": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationId", + "traits": { + "smithy.api#documentation": "The ID of the application that the route belongs to.
" + } + }, + "EnvironmentId": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentId", + "traits": { + "smithy.api#documentation": "Unique identifier of the environment.
" + } + }, + "SourcePath": { + "target": "com.amazonaws.migrationhubrefactorspaces#UriPath", + "traits": { + "smithy.api#documentation": "The path to use to match traffic. Paths must start with /
and are relative to\n the base of the application.
A list of HTTP methods to match. An empty list matches all values. If a method is present,\n only HTTP requests using that method are forwarded to this route’s service.
" + } + }, + "IncludeChildPaths": { + "target": "com.amazonaws.migrationhubrefactorspaces#Boolean", + "traits": { + "smithy.api#documentation": "Indicates whether to match all subpaths of the given source path. If this value is\n false
, requests must match the source path exactly before they are forwarded to\n this route's service.
A mapping of Amazon API Gateway path resources to resource IDs.
" + } + }, + "State": { + "target": "com.amazonaws.migrationhubrefactorspaces#RouteState", + "traits": { + "smithy.api#documentation": "The current state of the route.
" + } + }, + "Tags": { + "target": "com.amazonaws.migrationhubrefactorspaces#TagMap", + "traits": { + "smithy.api#documentation": "The tags assigned to the route. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.
" + } + }, + "Error": { + "target": "com.amazonaws.migrationhubrefactorspaces#ErrorResponse", + "traits": { + "smithy.api#documentation": "Any error associated with the route resource.
" + } + }, + "LastUpdatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the route was last updated.
" + } + }, + "CreatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "The timestamp of when the route is created.
" + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#GetService": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubrefactorspaces#GetServiceRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubrefactorspaces#GetServiceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Gets an Amazon Web Services Migration Hub Refactor Spaces service.
", + "smithy.api#http": { + "method": "GET", + "uri": "/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/services/{ServiceIdentifier}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.migrationhubrefactorspaces#GetServiceRequest": { + "type": "structure", + "members": { + "EnvironmentIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentId", + "traits": { + "smithy.api#documentation": "The ID of the environment.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ApplicationIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationId", + "traits": { + "smithy.api#documentation": "The ID of the application.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ServiceIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceId", + "traits": { + "smithy.api#documentation": "The ID of the service.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#GetServiceResponse": { + "type": "structure", + "members": { + "ServiceId": { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceId", + "traits": { + "smithy.api#documentation": "The unique identifier of the service.
" + } + }, + "Name": { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceName", + "traits": { + "smithy.api#documentation": "The name of the service.
" + } + }, + "Arn": { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the service.
" + } + }, + "OwnerAccountId": { + "target": "com.amazonaws.migrationhubrefactorspaces#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the service owner.
" + } + }, + "CreatedByAccountId": { + "target": "com.amazonaws.migrationhubrefactorspaces#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the service creator.
" + } + }, + "Description": { + "target": "com.amazonaws.migrationhubrefactorspaces#Description", + "traits": { + "smithy.api#documentation": "The description of the service.
" + } + }, + "EnvironmentId": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentId", + "traits": { + "smithy.api#documentation": "The unique identifier of the environment.
" + } + }, + "ApplicationId": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationId", + "traits": { + "smithy.api#documentation": "The ID of the application.
" + } + }, + "VpcId": { + "target": "com.amazonaws.migrationhubrefactorspaces#VpcId", + "traits": { + "smithy.api#documentation": "The ID of the virtual private cloud (VPC).
" + } + }, + "EndpointType": { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceEndpointType", + "traits": { + "smithy.api#documentation": "The endpoint type of the service.
" + } + }, + "UrlEndpoint": { + "target": "com.amazonaws.migrationhubrefactorspaces#UrlEndpointConfig", + "traits": { + "smithy.api#documentation": "The configuration for the URL endpoint type.
\nThe Url isthe URL of the endpoint type.
\nThe HealthUrl is the health check URL of the endpoint\n type.
" + } + }, + "LambdaEndpoint": { + "target": "com.amazonaws.migrationhubrefactorspaces#LambdaEndpointConfig", + "traits": { + "smithy.api#documentation": "The configuration for the Lambda endpoint type.
\nThe Arn is the Amazon Resource Name (ARN) of the Lambda function associated with this service.
" + } + }, + "State": { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceState", + "traits": { + "smithy.api#documentation": "The current state of the service.
" + } + }, + "Tags": { + "target": "com.amazonaws.migrationhubrefactorspaces#TagMap", + "traits": { + "smithy.api#documentation": "The tags assigned to the service. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.
" + } + }, + "Error": { + "target": "com.amazonaws.migrationhubrefactorspaces#ErrorResponse", + "traits": { + "smithy.api#documentation": "Any error associated with the service resource.
" + } + }, + "LastUpdatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the service was last updated.
" + } + }, + "CreatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "The timestamp of when the service is created.
" + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#HttpMethod": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "DELETE", + "name": "DELETE" + }, + { + "value": "GET", + "name": "GET" + }, + { + "value": "HEAD", + "name": "HEAD" + }, + { + "value": "OPTIONS", + "name": "OPTIONS" + }, + { + "value": "PATCH", + "name": "PATCH" + }, + { + "value": "POST", + "name": "POST" + }, + { + "value": "PUT", + "name": "PUT" + } + ] + } + }, + "com.amazonaws.migrationhubrefactorspaces#HttpMethods": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhubrefactorspaces#HttpMethod" + } + }, + "com.amazonaws.migrationhubrefactorspaces#InternalServerException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.migrationhubrefactorspaces#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "An unexpected error occurred while processing the request.
", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.migrationhubrefactorspaces#InvalidResourcePolicyException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.migrationhubrefactorspaces#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The resource policy is not valid.
", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.migrationhubrefactorspaces#LambdaArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^arn:(aws[a-zA-Z-]*)?:lambda:[a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\\d{1}:\\d{12}:function:[a-zA-Z0-9-_]+(:\n(\\$LATEST|[a-zA-Z0-9-_]+))?$" + } + }, + "com.amazonaws.migrationhubrefactorspaces#LambdaEndpointConfig": { + "type": "structure", + "members": { + "Arn": { + "target": "com.amazonaws.migrationhubrefactorspaces#LambdaArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the Lambda endpoint.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The configuration for the Lambda endpoint type.
" + } + }, + "com.amazonaws.migrationhubrefactorspaces#LambdaEndpointInput": { + "type": "structure", + "members": { + "Arn": { + "target": "com.amazonaws.migrationhubrefactorspaces#LambdaArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the Lambda endpoint.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The input for the Lambda endpoint type.
" + } + }, + "com.amazonaws.migrationhubrefactorspaces#LambdaEndpointSummary": { + "type": "structure", + "members": { + "Arn": { + "target": "com.amazonaws.migrationhubrefactorspaces#LambdaArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the Lambda endpoint.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The summary for the Lambda endpoint type.
" + } + }, + "com.amazonaws.migrationhubrefactorspaces#ListApplications": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubrefactorspaces#ListApplicationsRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubrefactorspaces#ListApplicationsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ConflictException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Lists all the Amazon Web Services Migration Hub Refactor Spaces applications within an environment.
", + "smithy.api#http": { + "method": "GET", + "uri": "/environments/{EnvironmentIdentifier}/applications", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "ApplicationSummaryList", + "pageSize": "MaxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.migrationhubrefactorspaces#ListApplicationsRequest": { + "type": "structure", + "members": { + "EnvironmentIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentId", + "traits": { + "smithy.api#documentation": "The ID of the environment.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "NextToken": { + "target": "com.amazonaws.migrationhubrefactorspaces#NextToken", + "traits": { + "smithy.api#documentation": "The token for the next page of results.
", + "smithy.api#httpQuery": "nextToken" + } + }, + "MaxResults": { + "target": "com.amazonaws.migrationhubrefactorspaces#MaxResults", + "traits": { + "smithy.api#documentation": "The maximum number of results to return with a single call. To retrieve the remaining\n results, make another call with the returned nextToken
value.
The list of ApplicationSummary
objects.
The token for the next page of results.
" + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#ListEnvironmentVpcs": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubrefactorspaces#ListEnvironmentVpcsRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubrefactorspaces#ListEnvironmentVpcsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Lists all the virtual private clouds (VPCs) that are part of an Amazon Web Services Migration Hub Refactor Spaces environment.
", + "smithy.api#http": { + "method": "GET", + "uri": "/environments/{EnvironmentIdentifier}/vpcs", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "EnvironmentVpcList", + "pageSize": "MaxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.migrationhubrefactorspaces#ListEnvironmentVpcsRequest": { + "type": "structure", + "members": { + "EnvironmentIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentId", + "traits": { + "smithy.api#documentation": "The ID of the environment.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "NextToken": { + "target": "com.amazonaws.migrationhubrefactorspaces#NextToken", + "traits": { + "smithy.api#documentation": "The token for the next page of results.
", + "smithy.api#httpQuery": "nextToken" + } + }, + "MaxResults": { + "target": "com.amazonaws.migrationhubrefactorspaces#MaxResults", + "traits": { + "smithy.api#documentation": "The maximum number of results to return with a single call. To retrieve the remaining\n results, make another call with the returned nextToken
value.
The list of EnvironmentVpc
objects.
The token for the next page of results.
" + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#ListEnvironments": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubrefactorspaces#ListEnvironmentsRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubrefactorspaces#ListEnvironmentsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Lists Amazon Web Services Migration Hub Refactor Spaces environments owned by a caller account or shared with the caller\n account.
", + "smithy.api#http": { + "method": "GET", + "uri": "/environments", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "EnvironmentSummaryList", + "pageSize": "MaxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.migrationhubrefactorspaces#ListEnvironmentsRequest": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.migrationhubrefactorspaces#NextToken", + "traits": { + "smithy.api#documentation": "The token for the next page of results.
", + "smithy.api#httpQuery": "nextToken" + } + }, + "MaxResults": { + "target": "com.amazonaws.migrationhubrefactorspaces#MaxResults", + "traits": { + "smithy.api#documentation": "The maximum number of results to return with a single call. To retrieve the remaining\n results, make another call with the returned nextToken
value.
The list of EnvironmentSummary
objects.
The token for the next page of results.
" + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#ListRoutes": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubrefactorspaces#ListRoutesRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubrefactorspaces#ListRoutesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ConflictException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Lists all the Amazon Web Services Migration Hub Refactor Spaces routes within an application.
", + "smithy.api#http": { + "method": "GET", + "uri": "/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/routes", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "RouteSummaryList", + "pageSize": "MaxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.migrationhubrefactorspaces#ListRoutesRequest": { + "type": "structure", + "members": { + "EnvironmentIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentId", + "traits": { + "smithy.api#documentation": "The ID of the environment.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ApplicationIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationId", + "traits": { + "smithy.api#documentation": "The ID of the application.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "NextToken": { + "target": "com.amazonaws.migrationhubrefactorspaces#NextToken", + "traits": { + "smithy.api#documentation": "The token for the next page of results.
", + "smithy.api#httpQuery": "nextToken" + } + }, + "MaxResults": { + "target": "com.amazonaws.migrationhubrefactorspaces#MaxResults", + "traits": { + "smithy.api#documentation": "The maximum number of results to return with a single call. To retrieve the remaining\n results, make another call with the returned nextToken
value.
The list of RouteSummary
objects.
The token for the next page of results.
" + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#ListServices": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubrefactorspaces#ListServicesRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubrefactorspaces#ListServicesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ConflictException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Lists all the Amazon Web Services Migration Hub Refactor Spaces services within an application.
", + "smithy.api#http": { + "method": "GET", + "uri": "/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/services", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "ServiceSummaryList", + "pageSize": "MaxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.migrationhubrefactorspaces#ListServicesRequest": { + "type": "structure", + "members": { + "EnvironmentIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentId", + "traits": { + "smithy.api#documentation": "The ID of the environment.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ApplicationIdentifier": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationId", + "traits": { + "smithy.api#documentation": "The ID of the application.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "NextToken": { + "target": "com.amazonaws.migrationhubrefactorspaces#NextToken", + "traits": { + "smithy.api#documentation": "The token for the next page of results.
", + "smithy.api#httpQuery": "nextToken" + } + }, + "MaxResults": { + "target": "com.amazonaws.migrationhubrefactorspaces#MaxResults", + "traits": { + "smithy.api#documentation": "The maximum number of results to return with a single call. To retrieve the remaining\n results, make another call with the returned nextToken
value.
The list of ServiceSummary
objects.
The token for the next page of results.
" + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubrefactorspaces#ListTagsForResourceRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubrefactorspaces#ListTagsForResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubrefactorspaces#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Lists the tags of a resource. The caller account must be the same as the resource’s\n OwnerAccountId
. Listing tags in other accounts is not supported.
The Amazon Resource Name (ARN) of the resource.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "Tags": { + "target": "com.amazonaws.migrationhubrefactorspaces#TagMap", + "traits": { + "smithy.api#documentation": "The list of tags assigned to the resource.
" + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#MaxResults": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#NetworkFabricType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "TRANSIT_GATEWAY", + "name": "TRANSIT_GATEWAY" + } + ] + } + }, + "com.amazonaws.migrationhubrefactorspaces#NextToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^[a-zA-Z0-9/\\+\\=]{0,2048}$" + } + }, + "com.amazonaws.migrationhubrefactorspaces#NlbArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 20, + "max": 2048 + }, + "smithy.api#pattern": "^arn:aws:elasticloadbalancing:[a-zA-Z0-9\\-]+:\\w{12}:[a-zA-Z_0-9+=,.@\\-_/]+$" + } + }, + "com.amazonaws.migrationhubrefactorspaces#NlbName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 32 + }, + "smithy.api#pattern": "^(?!internal-)[a-zA-Z0-9]+[a-zA-Z0-9-_ ]+.*[^-]$" + } + }, + "com.amazonaws.migrationhubrefactorspaces#PathResourceToId": { + "type": "map", + "key": { + "target": "com.amazonaws.migrationhubrefactorspaces#PathResourceToIdKey" + }, + "value": { + "target": "com.amazonaws.migrationhubrefactorspaces#PathResourceToIdValue" + } + }, + "com.amazonaws.migrationhubrefactorspaces#PathResourceToIdKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#PathResourceToIdValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 10, + "max": 10 + }, + "smithy.api#pattern": "^[a-z0-9]{10}$" + } + }, + "com.amazonaws.migrationhubrefactorspaces#PolicyString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 300000 + }, + "smithy.api#pattern": "^.*\\S.*$" + } + }, + "com.amazonaws.migrationhubrefactorspaces#ProxyType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "API_GATEWAY", + "name": "API_GATEWAY" + } + ] + } + }, + "com.amazonaws.migrationhubrefactorspaces#PutResourcePolicy": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubrefactorspaces#PutResourcePolicyRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubrefactorspaces#PutResourcePolicyResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#InvalidResourcePolicyException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Attaches a resource-based permission policy to the Amazon Web Services Migration Hub Refactor Spaces environment. The policy\n must contain the same actions and condition statements as the\n arn:aws:ram::aws:permission/AWSRAMDefaultPermissionRefactorSpacesEnvironment
\n permission in Resource Access Manager. The policy must not contain new lines or blank lines.
The Amazon Resource Name (ARN) of the resource to which the policy is being attached.\n
", + "smithy.api#required": {} + } + }, + "Policy": { + "target": "com.amazonaws.migrationhubrefactorspaces#PolicyString", + "traits": { + "smithy.api#documentation": "A JSON-formatted string for an Amazon Web Services resource-based policy.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#PutResourcePolicyResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.migrationhubrefactorspaces#RefactorSpaces": { + "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "Migration Hub Refactor Spaces", + "arnNamespace": "refactor-spaces", + "cloudFormationName": "RefactorSpaces", + "cloudTrailEventSource": "refactor-spaces.amazonaws.com", + "endpointPrefix": "refactor-spaces" + }, + "aws.auth#sigv4": { + "name": "refactor-spaces" + }, + "aws.protocols#restJson1": {}, + "smithy.api#cors": { + "additionalAllowedHeaders": [ + "content-type" + ], + "additionalExposedHeaders": [ + "date", + "x-amz-apigw-id", + "x-amzn-trace-id", + "x-amzn-errortype", + "x-amzn-requestid", + "x-amzn-errormessage" + ] + }, + "smithy.api#documentation": "This API reference provides descriptions, syntax, and other details about each of the\n actions and data types for Amazon Web Services Migration Hub Refactor Spaces (Refactor Spaces). The topic for each action shows the API\n request parameters and the response. Alternatively, you can use one of the Amazon Web Services SDKs to\n access an API that is tailored to the programming language or platform that you're using. For\n more information, see Amazon Web Services SDKs.
", + "smithy.api#title": "AWS Migration Hub Refactor Spaces" + }, + "version": "2021-10-26", + "operations": [ + { + "target": "com.amazonaws.migrationhubrefactorspaces#CreateApplication" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#CreateEnvironment" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#CreateRoute" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#CreateService" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#DeleteApplication" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#DeleteEnvironment" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#DeleteResourcePolicy" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#DeleteRoute" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#DeleteService" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#GetApplication" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#GetEnvironment" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#GetResourcePolicy" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#GetRoute" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#GetService" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ListApplications" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ListEnvironments" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ListEnvironmentVpcs" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ListRoutes" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ListServices" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ListTagsForResource" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#PutResourcePolicy" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#TagResource" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#UntagResource" + } + ] + }, + "com.amazonaws.migrationhubrefactorspaces#ResourceArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 20, + "max": 2048 + }, + "smithy.api#pattern": "^arn:aws:refactor-spaces:[a-zA-Z0-9\\-]+:\\w{12}:[a-zA-Z_0-9+=,.@\\-_/]+$" + } + }, + "com.amazonaws.migrationhubrefactorspaces#ResourceIdentifier": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 3, + "max": 63 + }, + "smithy.api#pattern": "(^(env|svc|pxy|rte|app)-([0-9A-Za-z]{10}$))" + } + }, + "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.migrationhubrefactorspaces#String", + "traits": { + "smithy.api#required": {} + } + }, + "ResourceId": { + "target": "com.amazonaws.migrationhubrefactorspaces#String", + "traits": { + "smithy.api#documentation": "The ID of the resource.
", + "smithy.api#required": {} + } + }, + "ResourceType": { + "target": "com.amazonaws.migrationhubrefactorspaces#String", + "traits": { + "smithy.api#documentation": "The type of resource.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request references a resource that does not exist.
", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.migrationhubrefactorspaces#ResourcePolicyIdentifier": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 20, + "max": 2048 + }, + "smithy.api#pattern": "^arn:aws:refactor-spaces:[a-zA-Z0-9\\-]+:\\w{12}:[a-zA-Z_0-9+=,.@\\-_/]+$" + } + }, + "com.amazonaws.migrationhubrefactorspaces#RetryAfterSeconds": { + "type": "integer" + }, + "com.amazonaws.migrationhubrefactorspaces#RouteActivationState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ACTIVE", + "name": "ACTIVE" + } + ] + } + }, + "com.amazonaws.migrationhubrefactorspaces#RouteId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 14, + "max": 14 + }, + "smithy.api#pattern": "^rte-[0-9A-Za-z]{10}$" + } + }, + "com.amazonaws.migrationhubrefactorspaces#RouteState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CREATING", + "name": "CREATING" + }, + { + "value": "ACTIVE", + "name": "ACTIVE" + }, + { + "value": "DELETING", + "name": "DELETING" + }, + { + "value": "FAILED", + "name": "FAILED" + }, + { + "value": "UPDATING", + "name": "UPDATING" + }, + { + "value": "INACTIVE", + "name": "INACTIVE" + } + ] + } + }, + "com.amazonaws.migrationhubrefactorspaces#RouteSummaries": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhubrefactorspaces#RouteSummary" + } + }, + "com.amazonaws.migrationhubrefactorspaces#RouteSummary": { + "type": "structure", + "members": { + "RouteId": { + "target": "com.amazonaws.migrationhubrefactorspaces#RouteId", + "traits": { + "smithy.api#documentation": "The unique identifier of the route.
" + } + }, + "Arn": { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the route.
" + } + }, + "OwnerAccountId": { + "target": "com.amazonaws.migrationhubrefactorspaces#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the route owner.
" + } + }, + "CreatedByAccountId": { + "target": "com.amazonaws.migrationhubrefactorspaces#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the route creator.
" + } + }, + "RouteType": { + "target": "com.amazonaws.migrationhubrefactorspaces#RouteType", + "traits": { + "smithy.api#documentation": "The route type of the route.
" + } + }, + "ServiceId": { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceId", + "traits": { + "smithy.api#documentation": "The unique identifier of the service.
" + } + }, + "ApplicationId": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationId", + "traits": { + "smithy.api#documentation": "The unique identifier of the application.
" + } + }, + "EnvironmentId": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentId", + "traits": { + "smithy.api#documentation": "The unique identifier of the environment.
" + } + }, + "SourcePath": { + "target": "com.amazonaws.migrationhubrefactorspaces#UriPath", + "traits": { + "smithy.api#documentation": "The path to use to match traffic. Paths must start with /
and are relative to\n the base of the application.
A list of HTTP methods to match. An empty list matches all values. If a method is present,\n only HTTP requests using that method are forwarded to this route’s service.
" + } + }, + "IncludeChildPaths": { + "target": "com.amazonaws.migrationhubrefactorspaces#Boolean", + "traits": { + "smithy.api#documentation": "Indicates whether to match all subpaths of the given source path. If this value is\n false
, requests must match the source path exactly before they are forwarded to\n this route's service.
A mapping of Amazon API Gateway path resources to resource IDs.
" + } + }, + "State": { + "target": "com.amazonaws.migrationhubrefactorspaces#RouteState", + "traits": { + "smithy.api#documentation": "The current state of the route.
" + } + }, + "Tags": { + "target": "com.amazonaws.migrationhubrefactorspaces#TagMap", + "traits": { + "smithy.api#documentation": "The tags assigned to the route.
" + } + }, + "Error": { + "target": "com.amazonaws.migrationhubrefactorspaces#ErrorResponse", + "traits": { + "smithy.api#documentation": "Any error associated with the route resource.
" + } + }, + "LastUpdatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the route was last updated.
" + } + }, + "CreatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the route is created.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The summary information for the routes as a response to ListRoutes
.
The ID of the resource.
", + "smithy.api#required": {} + } + }, + "ResourceType": { + "target": "com.amazonaws.migrationhubrefactorspaces#String", + "traits": { + "smithy.api#documentation": "The type of resource.
", + "smithy.api#required": {} + } + }, + "QuotaCode": { + "target": "com.amazonaws.migrationhubrefactorspaces#String", + "traits": { + "smithy.api#documentation": "Service quota requirement to identify originating quota. Reached throttling quota\n exception.
" + } + }, + "ServiceCode": { + "target": "com.amazonaws.migrationhubrefactorspaces#String", + "traits": { + "smithy.api#documentation": "Service quota requirement to identify originating service. Reached throttling quota\n exception service code.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request would cause a service quota to be exceeded.
", + "smithy.api#error": "client", + "smithy.api#httpError": 402 + } + }, + "com.amazonaws.migrationhubrefactorspaces#ServiceState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CREATING", + "name": "CREATING" + }, + { + "value": "ACTIVE", + "name": "ACTIVE" + }, + { + "value": "DELETING", + "name": "DELETING" + }, + { + "value": "FAILED", + "name": "FAILED" + } + ] + } + }, + "com.amazonaws.migrationhubrefactorspaces#ServiceSummaries": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceSummary" + } + }, + "com.amazonaws.migrationhubrefactorspaces#ServiceSummary": { + "type": "structure", + "members": { + "ServiceId": { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceId", + "traits": { + "smithy.api#documentation": "The unique identifier of the service.
" + } + }, + "Name": { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceName", + "traits": { + "smithy.api#documentation": "The name of the service.
" + } + }, + "Arn": { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the service.
" + } + }, + "OwnerAccountId": { + "target": "com.amazonaws.migrationhubrefactorspaces#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the service owner.
" + } + }, + "CreatedByAccountId": { + "target": "com.amazonaws.migrationhubrefactorspaces#AccountId", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID of the service creator.
" + } + }, + "Description": { + "target": "com.amazonaws.migrationhubrefactorspaces#Description", + "traits": { + "smithy.api#documentation": "A description of the service.
" + } + }, + "EnvironmentId": { + "target": "com.amazonaws.migrationhubrefactorspaces#EnvironmentId", + "traits": { + "smithy.api#documentation": "The unique identifier of the environment.
" + } + }, + "ApplicationId": { + "target": "com.amazonaws.migrationhubrefactorspaces#ApplicationId", + "traits": { + "smithy.api#documentation": "The unique identifier of the application.
" + } + }, + "VpcId": { + "target": "com.amazonaws.migrationhubrefactorspaces#VpcId", + "traits": { + "smithy.api#documentation": "The ID of the virtual private cloud (VPC).
" + } + }, + "EndpointType": { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceEndpointType", + "traits": { + "smithy.api#documentation": "The endpoint type of the service.
" + } + }, + "UrlEndpoint": { + "target": "com.amazonaws.migrationhubrefactorspaces#UrlEndpointSummary", + "traits": { + "smithy.api#documentation": "The summary of the configuration for the URL endpoint type.
" + } + }, + "LambdaEndpoint": { + "target": "com.amazonaws.migrationhubrefactorspaces#LambdaEndpointSummary", + "traits": { + "smithy.api#documentation": "A summary of the configuration for the Lambda endpoint type.
" + } + }, + "State": { + "target": "com.amazonaws.migrationhubrefactorspaces#ServiceState", + "traits": { + "smithy.api#documentation": "The current state of the service.
" + } + }, + "Tags": { + "target": "com.amazonaws.migrationhubrefactorspaces#TagMap", + "traits": { + "smithy.api#documentation": "The tags assigned to the service.
" + } + }, + "Error": { + "target": "com.amazonaws.migrationhubrefactorspaces#ErrorResponse", + "traits": { + "smithy.api#documentation": "Any error associated with the service resource.
" + } + }, + "LastUpdatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the service was last updated.
" + } + }, + "CreatedTime": { + "target": "com.amazonaws.migrationhubrefactorspaces#Timestamp", + "traits": { + "smithy.api#documentation": "A timestamp that indicates when the service is created.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A summary for the service as a response to ListServices
.
Removes the tags of a given resource. Tags are metadata which can be used to manage a\n resource. To tag a resource, the caller account must be the same as the resource’s\n OwnerAccountId
. Tagging resources in other accounts is not supported.
Amazon Web Services Migration Hub Refactor Spaces does not propagate tags to orchestrated resources, such as an\n environment’s transit gateway.
\nThe Amazon Resource Name (ARN) of the resource
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.migrationhubrefactorspaces#TagMap", + "traits": { + "smithy.api#documentation": "The new or modified tags for the resource.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#TagResourceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.migrationhubrefactorspaces#ThrottlingException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.migrationhubrefactorspaces#String", + "traits": { + "smithy.api#required": {} + } + }, + "QuotaCode": { + "target": "com.amazonaws.migrationhubrefactorspaces#String", + "traits": { + "smithy.api#documentation": "Service quota requirement to identify originating quota. Reached throttling quota\n exception.
" + } + }, + "ServiceCode": { + "target": "com.amazonaws.migrationhubrefactorspaces#String", + "traits": { + "smithy.api#documentation": "Service quota requirement to identify originating service. Reached throttling quota\n exception service code.
" + } + }, + "RetryAfterSeconds": { + "target": "com.amazonaws.migrationhubrefactorspaces#RetryAfterSeconds", + "traits": { + "smithy.api#documentation": "The number of seconds to wait before retrying.
", + "smithy.api#httpHeader": "Retry-After" + } + } + }, + "traits": { + "smithy.api#documentation": "Request was denied because the request was throttled.
", + "smithy.api#error": "client", + "smithy.api#httpError": 429 + } + }, + "com.amazonaws.migrationhubrefactorspaces#Timestamp": { + "type": "timestamp" + }, + "com.amazonaws.migrationhubrefactorspaces#TransitGatewayId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 21, + "max": 21 + }, + "smithy.api#pattern": "^tgw-[-a-f0-9]{17}$" + } + }, + "com.amazonaws.migrationhubrefactorspaces#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubrefactorspaces#UntagResourceRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubrefactorspaces#UntagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubrefactorspaces#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubrefactorspaces#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Adds to or modifies the tags of the given resource. Tags are metadata which can be used to\n manage a resource. To untag a resource, the caller account must be the same as the resource’s\n OwnerAccountId
. Untagging resources across accounts is not supported.
The Amazon Resource Name (ARN) of the resource.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "TagKeys": { + "target": "com.amazonaws.migrationhubrefactorspaces#TagKeys", + "traits": { + "smithy.api#documentation": "The list of keys of the tags to be removed from the resource.
", + "smithy.api#httpQuery": "tagKeys", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.migrationhubrefactorspaces#UntagResourceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.migrationhubrefactorspaces#Uri": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^https?://[-a-zA-Z0-9+\\x38@#/%?=~_|!:,.;]*[-a-zA-Z0-9+\\x38@#/%=~_|]$" + } + }, + "com.amazonaws.migrationhubrefactorspaces#UriPath": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^(/[a-zA-Z0-9._-]+)+$" + } + }, + "com.amazonaws.migrationhubrefactorspaces#UriPathRouteInput": { + "type": "structure", + "members": { + "SourcePath": { + "target": "com.amazonaws.migrationhubrefactorspaces#UriPath", + "traits": { + "smithy.api#documentation": "The path to use to match traffic. Paths must start with /
and are relative to\n the base of the application.
Indicates whether traffic is forwarded to this route’s service after the route is created.
", + "smithy.api#required": {} + } + }, + "Methods": { + "target": "com.amazonaws.migrationhubrefactorspaces#HttpMethods", + "traits": { + "smithy.api#documentation": "A list of HTTP methods to match. An empty list matches all values. If a method is present,\n only HTTP requests using that method are forwarded to this route’s service.
" + } + }, + "IncludeChildPaths": { + "target": "com.amazonaws.migrationhubrefactorspaces#Boolean", + "traits": { + "smithy.api#documentation": "Indicates whether to match all subpaths of the given source path. If this value is\n false
, requests must match the source path exactly before they are forwarded to\n this route's service.
The configuration for the URI path route type.
" + } + }, + "com.amazonaws.migrationhubrefactorspaces#UrlEndpointConfig": { + "type": "structure", + "members": { + "Url": { + "target": "com.amazonaws.migrationhubrefactorspaces#Uri", + "traits": { + "smithy.api#documentation": "The HTTP URL endpoint.
" + } + }, + "HealthUrl": { + "target": "com.amazonaws.migrationhubrefactorspaces#Uri", + "traits": { + "smithy.api#documentation": "The health check URL of the URL endpoint type.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The configuration for the URL endpoint type.
" + } + }, + "com.amazonaws.migrationhubrefactorspaces#UrlEndpointInput": { + "type": "structure", + "members": { + "Url": { + "target": "com.amazonaws.migrationhubrefactorspaces#Uri", + "traits": { + "smithy.api#documentation": "The URL to route traffic to. The URL must be an rfc3986-formatted URL. If the\n host is a domain name, the name must be resolvable over the public internet. If the scheme is\n https
, the top level domain of the host must be listed in the IANA root zone database.
The health check URL of the URL endpoint type. If the URL is a public endpoint, the\n HealthUrl
must also be a public endpoint. If the URL is a private endpoint\n inside a virtual private cloud (VPC), the health URL must also be a private endpoint, and the\n host must be the same as the URL.
The configuration for the URL endpoint type.
" + } + }, + "com.amazonaws.migrationhubrefactorspaces#UrlEndpointSummary": { + "type": "structure", + "members": { + "Url": { + "target": "com.amazonaws.migrationhubrefactorspaces#Uri", + "traits": { + "smithy.api#documentation": " The URL to route traffic to. The URL must be an rfc3986-formatted URL. If the\n host is a domain name, the name must be resolvable over the public internet. If the scheme is\n https
, the top level domain of the host must be listed in the IANA root zone database.
The health check URL of the URL endpoint type. If the URL is a public endpoint, the\n HealthUrl
must also be a public endpoint. If the URL is a private endpoint\n inside a virtual private cloud (VPC), the health URL must also be a private endpoint, and the\n host must be the same as the URL.
The summary of the configuration for the URL endpoint type.
" + } + }, + "com.amazonaws.migrationhubrefactorspaces#ValidationException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.migrationhubrefactorspaces#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The input does not satisfy the constraints specified by an Amazon Web Service.
", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.migrationhubrefactorspaces#VpcId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 12, + "max": 21 + }, + "smithy.api#pattern": "^vpc-[-a-f0-9]{8}([-a-f0-9]{9})?$" + } + }, + "com.amazonaws.migrationhubrefactorspaces#VpcLinkId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 10, + "max": 10 + }, + "smithy.api#pattern": "^[a-z0-9]{10}$" + } + } + } +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/opensearch.2021-01-01.json b/codegen/sdk-codegen/aws-models/opensearch.2021-01-01.json index 1da3cb54d15..dceaa996590 100644 --- a/codegen/sdk-codegen/aws-models/opensearch.2021-01-01.json +++ b/codegen/sdk-codegen/aws-models/opensearch.2021-01-01.json @@ -1796,6 +1796,15 @@ ] } }, + "com.amazonaws.opensearch#DeploymentType": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 2, + "max": 128 + } + } + }, "com.amazonaws.opensearch#DescribeDomain": { "type": "operation", "input": { @@ -3182,6 +3191,29 @@ "smithy.api#box": {} } }, + "com.amazonaws.opensearch#DryRun": { + "type": "boolean", + "traits": { + "smithy.api#box": {} + } + }, + "com.amazonaws.opensearch#DryRunResults": { + "type": "structure", + "members": { + "DeploymentType": { + "target": "com.amazonaws.opensearch#DeploymentType", + "traits": { + "smithy.api#documentation": "\n Specifies the way in which Amazon OpenSearch Service applies the update.\n Possible responses are Blue/Green
(the update requires a blue/green deployment), DynamicUpdate
(no blue/green required), Undetermined
(the domain is undergoing an update and can't predict the deployment type; try again after the update is complete), and None
(the request doesn't include any configuration changes).\n
Contains an optional message associated with the DryRunResults.
" + } + } + } + }, "com.amazonaws.opensearch#Duration": { "type": "structure", "members": { @@ -4575,6 +4607,15 @@ "smithy.api#documentation": "\n Maximum number of instances that can be instantiated for a given InstanceType.\n
" } }, + "com.amazonaws.opensearch#Message": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + } + } + }, "com.amazonaws.opensearch#MinimumInstanceCount": { "type": "integer", "traits": { @@ -6578,6 +6619,12 @@ "traits": { "smithy.api#documentation": "Specifies Auto-Tune options.
" } + }, + "DryRun": { + "target": "com.amazonaws.opensearch#DryRun", + "traits": { + "smithy.api#documentation": "This flag, when set to True, specifies whether the UpdateDomain
request should return the results of validation checks (DryRunResults) without actually applying the change.
The status of the updated domain.
", "smithy.api#required": {} } + }, + "DryRunResults": { + "target": "com.amazonaws.opensearch#DryRunResults", + "traits": { + "smithy.api#documentation": "Contains result of DryRun.
" + } } }, "traits": { diff --git a/codegen/sdk-codegen/aws-models/outposts.2019-12-03.json b/codegen/sdk-codegen/aws-models/outposts.2019-12-03.json index c6fc7f5066c..a2cf3d87529 100644 --- a/codegen/sdk-codegen/aws-models/outposts.2019-12-03.json +++ b/codegen/sdk-codegen/aws-models/outposts.2019-12-03.json @@ -45,7 +45,7 @@ "com.amazonaws.outposts#AccountId": { "type": "string", "traits": { - "smithy.api#documentation": "The ID of the AWS account.
", + "smithy.api#documentation": "The ID of the Amazon Web Services account.
", "smithy.api#length": { "min": 12, "max": 12 @@ -53,6 +53,130 @@ "smithy.api#pattern": "^\\d{12}$" } }, + "com.amazonaws.outposts#Address": { + "type": "structure", + "members": { + "ContactName": { + "target": "com.amazonaws.outposts#ContactName", + "traits": { + "smithy.api#documentation": "The name of the contact.
" + } + }, + "ContactPhoneNumber": { + "target": "com.amazonaws.outposts#ContactPhoneNumber", + "traits": { + "smithy.api#documentation": "The phone number of the contact.
" + } + }, + "AddressLine1": { + "target": "com.amazonaws.outposts#AddressLine1", + "traits": { + "smithy.api#documentation": "The first line of the address.
", + "smithy.api#required": {} + } + }, + "AddressLine2": { + "target": "com.amazonaws.outposts#AddressLine2", + "traits": { + "smithy.api#documentation": "The second line of the address.
" + } + }, + "AddressLine3": { + "target": "com.amazonaws.outposts#AddressLine3", + "traits": { + "smithy.api#documentation": "The third line of the address.
" + } + }, + "City": { + "target": "com.amazonaws.outposts#City", + "traits": { + "smithy.api#documentation": "The city for the address.
", + "smithy.api#required": {} + } + }, + "StateOrRegion": { + "target": "com.amazonaws.outposts#StateOrRegion", + "traits": { + "smithy.api#documentation": "The state for the address.
", + "smithy.api#required": {} + } + }, + "DistrictOrCounty": { + "target": "com.amazonaws.outposts#DistrictOrCounty", + "traits": { + "smithy.api#documentation": "The district or county for the address.
" + } + }, + "PostalCode": { + "target": "com.amazonaws.outposts#PostalCode", + "traits": { + "smithy.api#documentation": "The postal code for the address.
", + "smithy.api#required": {} + } + }, + "CountryCode": { + "target": "com.amazonaws.outposts#CountryCode", + "traits": { + "smithy.api#documentation": "The ISO-3166 two-letter country code for the address.
", + "smithy.api#required": {} + } + }, + "Municipality": { + "target": "com.amazonaws.outposts#Municipality", + "traits": { + "smithy.api#documentation": "The municipality for the address.
" + } + } + }, + "traits": { + "smithy.api#documentation": "\n Information about an address.\n
" + } + }, + "com.amazonaws.outposts#AddressLine1": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 180 + }, + "smithy.api#pattern": "^\\S[\\S ]*$" + } + }, + "com.amazonaws.outposts#AddressLine2": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 60 + }, + "smithy.api#pattern": "^\\S[\\S ]*$" + } + }, + "com.amazonaws.outposts#AddressLine3": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 60 + }, + "smithy.api#pattern": "^\\S[\\S ]*$" + } + }, + "com.amazonaws.outposts#AddressType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "SHIPPING_ADDRESS", + "name": "SHIPPING_ADDRESS" + }, + { + "value": "OPERATING_ADDRESS", + "name": "OPERATING_ADDRESS" + } + ] + } + }, "com.amazonaws.outposts#Arn": { "type": "string", "traits": { @@ -109,6 +233,171 @@ } } }, + "com.amazonaws.outposts#CancelOrder": { + "type": "operation", + "input": { + "target": "com.amazonaws.outposts#CancelOrderInput" + }, + "output": { + "target": "com.amazonaws.outposts#CancelOrderOutput" + }, + "errors": [ + { + "target": "com.amazonaws.outposts#AccessDeniedException" + }, + { + "target": "com.amazonaws.outposts#ConflictException" + }, + { + "target": "com.amazonaws.outposts#InternalServerException" + }, + { + "target": "com.amazonaws.outposts#NotFoundException" + }, + { + "target": "com.amazonaws.outposts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "\n Cancels an order for an Outpost. \n
", + "smithy.api#http": { + "method": "POST", + "uri": "/orders/{OrderId}/cancel", + "code": 200 + } + } + }, + "com.amazonaws.outposts#CancelOrderInput": { + "type": "structure", + "members": { + "OrderId": { + "target": "com.amazonaws.outposts#OrderId", + "traits": { + "smithy.api#documentation": "\n The ID of the order to cancel.\n
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.outposts#CancelOrderOutput": { + "type": "structure", + "members": {} + }, + "com.amazonaws.outposts#CatalogItem": { + "type": "structure", + "members": { + "CatalogItemId": { + "target": "com.amazonaws.outposts#SkuCode", + "traits": { + "smithy.api#documentation": "\n The ID of the catalog item.\n
" + } + }, + "ItemStatus": { + "target": "com.amazonaws.outposts#CatalogItemStatus", + "traits": { + "smithy.api#documentation": "\n The status of a catalog item.\n
" + } + }, + "EC2Capacities": { + "target": "com.amazonaws.outposts#EC2CapacityListDefinition", + "traits": { + "smithy.api#documentation": "\n Information about the EC2 capacity of an item.\n
" + } + }, + "PowerKva": { + "target": "com.amazonaws.outposts#CatalogItemPowerKva", + "traits": { + "smithy.api#documentation": "\n Information about the power draw of an item.\n
" + } + }, + "WeightLbs": { + "target": "com.amazonaws.outposts#CatalogItemWeightLbs", + "traits": { + "smithy.api#documentation": "The weight of the item in pounds.
" + } + }, + "SupportedUplinkGbps": { + "target": "com.amazonaws.outposts#SupportedUplinkGbpsListDefinition", + "traits": { + "smithy.api#documentation": "\n The uplink speed this catalog item requires for the \n connection to the Region.\n
" + } + }, + "SupportedStorage": { + "target": "com.amazonaws.outposts#SupportedStorageList", + "traits": { + "smithy.api#documentation": "\n The supported storage options for the catalog item.\n
" + } + } + }, + "traits": { + "smithy.api#documentation": "Information about a catalog item.
" + } + }, + "com.amazonaws.outposts#CatalogItemClass": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "RACK", + "name": "RACK" + }, + { + "value": "SERVER", + "name": "SERVER" + } + ] + } + }, + "com.amazonaws.outposts#CatalogItemClassList": { + "type": "list", + "member": { + "target": "com.amazonaws.outposts#CatalogItemClass" + } + }, + "com.amazonaws.outposts#CatalogItemListDefinition": { + "type": "list", + "member": { + "target": "com.amazonaws.outposts#CatalogItem" + } + }, + "com.amazonaws.outposts#CatalogItemPowerKva": { + "type": "float", + "traits": { + "smithy.api#box": {} + } + }, + "com.amazonaws.outposts#CatalogItemStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "AVAILABLE", + "name": "AVAILABLE" + }, + { + "value": "DISCONTINUED", + "name": "DISCONTINUED" + } + ] + } + }, + "com.amazonaws.outposts#CatalogItemWeightLbs": { + "type": "integer", + "traits": { + "smithy.api#box": {} + } + }, + "com.amazonaws.outposts#City": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 50 + }, + "smithy.api#pattern": "^\\S[\\S ]*$" + } + }, "com.amazonaws.outposts#ConflictException": { "type": "structure", "members": { @@ -134,6 +423,36 @@ "smithy.api#httpError": 409 } }, + "com.amazonaws.outposts#ContactName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^\\S[\\S ]*$" + } + }, + "com.amazonaws.outposts#ContactPhoneNumber": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 20 + }, + "smithy.api#pattern": "^[\\S ]+$" + } + }, + "com.amazonaws.outposts#CountryCode": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 2, + "max": 2 + }, + "smithy.api#pattern": "^[A-Z]{2}$" + } + }, "com.amazonaws.outposts#CreateOrder": { "type": "operation", "input": { @@ -291,13 +610,13 @@ } } }, - "com.amazonaws.outposts#DeleteOutpost": { + "com.amazonaws.outposts#CreateSite": { "type": "operation", "input": { - "target": "com.amazonaws.outposts#DeleteOutpostInput" + "target": "com.amazonaws.outposts#CreateSiteInput" }, "output": { - "target": "com.amazonaws.outposts#DeleteOutpostOutput" + "target": "com.amazonaws.outposts#CreateSiteOutput" }, "errors": [ { @@ -310,37 +629,123 @@ "target": "com.amazonaws.outposts#InternalServerException" }, { - "target": "com.amazonaws.outposts#NotFoundException" + "target": "com.amazonaws.outposts#ServiceQuotaExceededException" }, { "target": "com.amazonaws.outposts#ValidationException" } ], "traits": { - "smithy.api#documentation": "Deletes the Outpost.
", + "smithy.api#documentation": "\n Creates a site for an Outpost.\n
", "smithy.api#http": { - "method": "DELETE", - "uri": "/outposts/{OutpostId}", + "method": "POST", + "uri": "/sites", "code": 200 } } }, - "com.amazonaws.outposts#DeleteOutpostInput": { + "com.amazonaws.outposts#CreateSiteInput": { "type": "structure", "members": { - "OutpostId": { - "target": "com.amazonaws.outposts#OutpostId", + "Name": { + "target": "com.amazonaws.outposts#SiteName", "traits": { - "smithy.api#documentation": "\n The ID of the Outpost.\n
", - "smithy.api#httpLabel": {}, "smithy.api#required": {} } + }, + "Description": { + "target": "com.amazonaws.outposts#SiteDescription" + }, + "Notes": { + "target": "com.amazonaws.outposts#SiteNotes", + "traits": { + "smithy.api#documentation": "Additional information that you provide about site access requirements, electrician\n scheduling, personal protective equipment, or regulation of equipment materials that could\n affect your installation process.
" + } + }, + "Tags": { + "target": "com.amazonaws.outposts#TagMap", + "traits": { + "smithy.api#documentation": "\n The tags to apply to a site.\n
" + } + }, + "OperatingAddress": { + "target": "com.amazonaws.outposts#Address", + "traits": { + "smithy.api#documentation": "\n The location to install and power on the hardware. This address might be \n different from the shipping address.\n
" + } + }, + "ShippingAddress": { + "target": "com.amazonaws.outposts#Address", + "traits": { + "smithy.api#documentation": "\n The location to ship the hardware. This address might be different \n from the operating address.\n
" + } + }, + "RackPhysicalProperties": { + "target": "com.amazonaws.outposts#RackPhysicalProperties", + "traits": { + "smithy.api#documentation": "Information about the physical and logistical details for the rack at this site.\n For more information\n about hardware requirements for racks, see Network \n readiness checklist in the Amazon Web Services Outposts User Guide.\n
" + } } } }, - "com.amazonaws.outposts#DeleteOutpostOutput": { + "com.amazonaws.outposts#CreateSiteOutput": { "type": "structure", - "members": {} + "members": { + "Site": { + "target": "com.amazonaws.outposts#Site" + } + } + }, + "com.amazonaws.outposts#DeleteOutpost": { + "type": "operation", + "input": { + "target": "com.amazonaws.outposts#DeleteOutpostInput" + }, + "output": { + "target": "com.amazonaws.outposts#DeleteOutpostOutput" + }, + "errors": [ + { + "target": "com.amazonaws.outposts#AccessDeniedException" + }, + { + "target": "com.amazonaws.outposts#ConflictException" + }, + { + "target": "com.amazonaws.outposts#InternalServerException" + }, + { + "target": "com.amazonaws.outposts#NotFoundException" + }, + { + "target": "com.amazonaws.outposts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes the Outpost.
", + "smithy.api#http": { + "method": "DELETE", + "uri": "/outposts/{OutpostId}", + "code": 200 + } + } + }, + "com.amazonaws.outposts#DeleteOutpostInput": { + "type": "structure", + "members": { + "OutpostId": { + "target": "com.amazonaws.outposts#OutpostId", + "traits": { + "smithy.api#documentation": "\n The ID of the Outpost.\n
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.outposts#DeleteOutpostOutput": { + "type": "structure", + "members": {} }, "com.amazonaws.outposts#DeleteSite": { "type": "operation", @@ -392,6 +797,54 @@ "type": "structure", "members": {} }, + "com.amazonaws.outposts#DistrictOrCounty": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 60 + }, + "smithy.api#pattern": "^\\S[\\S ]*$" + } + }, + "com.amazonaws.outposts#EC2Capacity": { + "type": "structure", + "members": { + "Family": { + "target": "com.amazonaws.outposts#Family", + "traits": { + "smithy.api#documentation": "\n The family of the EC2 capacity.\n
" + } + }, + "MaxSize": { + "target": "com.amazonaws.outposts#MaxSize", + "traits": { + "smithy.api#documentation": "\n The maximum size of the EC2 capacity.\n
" + } + }, + "Quantity": { + "target": "com.amazonaws.outposts#Quantity", + "traits": { + "smithy.api#documentation": "\n The quantity of the EC2 capacity.\n
" + } + } + }, + "traits": { + "smithy.api#documentation": "Information about EC2 capacity.
" + } + }, + "com.amazonaws.outposts#EC2CapacityListDefinition": { + "type": "list", + "member": { + "target": "com.amazonaws.outposts#EC2Capacity" + } + }, + "com.amazonaws.outposts#EC2FamilyList": { + "type": "list", + "member": { + "target": "com.amazonaws.outposts#Family" + } + }, "com.amazonaws.outposts#ErrorMessage": { "type": "string", "traits": { @@ -402,6 +855,132 @@ "smithy.api#pattern": "^[\\S \\n]+$" } }, + "com.amazonaws.outposts#Family": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + }, + "smithy.api#pattern": "^[a-z0-9]+$" + } + }, + "com.amazonaws.outposts#FiberOpticCableType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "SINGLE_MODE", + "name": "SINGLE_MODE" + }, + { + "value": "MULTI_MODE", + "name": "MULTI_MODE" + } + ] + } + }, + "com.amazonaws.outposts#GetCatalogItem": { + "type": "operation", + "input": { + "target": "com.amazonaws.outposts#GetCatalogItemInput" + }, + "output": { + "target": "com.amazonaws.outposts#GetCatalogItemOutput" + }, + "errors": [ + { + "target": "com.amazonaws.outposts#InternalServerException" + }, + { + "target": "com.amazonaws.outposts#NotFoundException" + }, + { + "target": "com.amazonaws.outposts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Gets information about a catalog item.
", + "smithy.api#http": { + "method": "GET", + "uri": "/catalog/item/{CatalogItemId}", + "code": 200 + } + } + }, + "com.amazonaws.outposts#GetCatalogItemInput": { + "type": "structure", + "members": { + "CatalogItemId": { + "target": "com.amazonaws.outposts#SkuCode", + "traits": { + "smithy.api#documentation": "The ID of the catalog item.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.outposts#GetCatalogItemOutput": { + "type": "structure", + "members": { + "CatalogItem": { + "target": "com.amazonaws.outposts#CatalogItem", + "traits": { + "smithy.api#documentation": "Information about this catalog item.
" + } + } + } + }, + "com.amazonaws.outposts#GetOrder": { + "type": "operation", + "input": { + "target": "com.amazonaws.outposts#GetOrderInput" + }, + "output": { + "target": "com.amazonaws.outposts#GetOrderOutput" + }, + "errors": [ + { + "target": "com.amazonaws.outposts#InternalServerException" + }, + { + "target": "com.amazonaws.outposts#NotFoundException" + }, + { + "target": "com.amazonaws.outposts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Gets an order.
", + "smithy.api#http": { + "method": "GET", + "uri": "/orders/{OrderId}", + "code": 200 + } + } + }, + "com.amazonaws.outposts#GetOrderInput": { + "type": "structure", + "members": { + "OrderId": { + "target": "com.amazonaws.outposts#OrderId", + "traits": { + "smithy.api#documentation": "The ID of the order.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.outposts#GetOrderOutput": { + "type": "structure", + "members": { + "Order": { + "target": "com.amazonaws.outposts#Order" + } + } + }, "com.amazonaws.outposts#GetOutpost": { "type": "operation", "input": { @@ -530,6 +1109,128 @@ } } }, + "com.amazonaws.outposts#GetSite": { + "type": "operation", + "input": { + "target": "com.amazonaws.outposts#GetSiteInput" + }, + "output": { + "target": "com.amazonaws.outposts#GetSiteOutput" + }, + "errors": [ + { + "target": "com.amazonaws.outposts#AccessDeniedException" + }, + { + "target": "com.amazonaws.outposts#InternalServerException" + }, + { + "target": "com.amazonaws.outposts#NotFoundException" + }, + { + "target": "com.amazonaws.outposts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "\n Gets information about the specified Outpost site.\n
", + "smithy.api#http": { + "method": "GET", + "uri": "/sites/{SiteId}", + "code": 200 + } + } + }, + "com.amazonaws.outposts#GetSiteAddress": { + "type": "operation", + "input": { + "target": "com.amazonaws.outposts#GetSiteAddressInput" + }, + "output": { + "target": "com.amazonaws.outposts#GetSiteAddressOutput" + }, + "errors": [ + { + "target": "com.amazonaws.outposts#AccessDeniedException" + }, + { + "target": "com.amazonaws.outposts#InternalServerException" + }, + { + "target": "com.amazonaws.outposts#NotFoundException" + }, + { + "target": "com.amazonaws.outposts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "\n Gets the site address.\n
", + "smithy.api#http": { + "method": "GET", + "uri": "/sites/{SiteId}/address", + "code": 200 + } + } + }, + "com.amazonaws.outposts#GetSiteAddressInput": { + "type": "structure", + "members": { + "SiteId": { + "target": "com.amazonaws.outposts#SiteId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "AddressType": { + "target": "com.amazonaws.outposts#AddressType", + "traits": { + "smithy.api#documentation": "The type of the address you request.
", + "smithy.api#httpQuery": "AddressType", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.outposts#GetSiteAddressOutput": { + "type": "structure", + "members": { + "SiteId": { + "target": "com.amazonaws.outposts#SiteId" + }, + "AddressType": { + "target": "com.amazonaws.outposts#AddressType", + "traits": { + "smithy.api#documentation": "The type of the address you receive.
" + } + }, + "Address": { + "target": "com.amazonaws.outposts#Address", + "traits": { + "smithy.api#documentation": "\n Information about the address.\n
" + } + } + } + }, + "com.amazonaws.outposts#GetSiteInput": { + "type": "structure", + "members": { + "SiteId": { + "target": "com.amazonaws.outposts#SiteId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.outposts#GetSiteOutput": { + "type": "structure", + "members": { + "Site": { + "target": "com.amazonaws.outposts#Site" + } + } + }, "com.amazonaws.outposts#ISO8601Timestamp": { "type": "timestamp" }, @@ -617,7 +1318,7 @@ } }, "Status": { - "target": "com.amazonaws.outposts#Status", + "target": "com.amazonaws.outposts#LineItemStatus", "traits": { "smithy.api#documentation": "The status of the line item.
" } @@ -680,6 +1381,213 @@ } } }, + "com.amazonaws.outposts#LineItemStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PREPARING", + "name": "PREPARING" + }, + { + "value": "BUILDING", + "name": "BUILDING" + }, + { + "value": "SHIPPED", + "name": "SHIPPED" + }, + { + "value": "DELIVERED", + "name": "DELIVERED" + }, + { + "value": "INSTALLING", + "name": "INSTALLING" + }, + { + "value": "INSTALLED", + "name": "INSTALLED" + }, + { + "value": "ERROR", + "name": "ERROR" + }, + { + "value": "CANCELLED", + "name": "CANCELLED" + } + ] + } + }, + "com.amazonaws.outposts#LineItemStatusCounts": { + "type": "map", + "key": { + "target": "com.amazonaws.outposts#LineItemStatus" + }, + "value": { + "target": "com.amazonaws.outposts#LineItemQuantity" + } + }, + "com.amazonaws.outposts#ListCatalogItems": { + "type": "operation", + "input": { + "target": "com.amazonaws.outposts#ListCatalogItemsInput" + }, + "output": { + "target": "com.amazonaws.outposts#ListCatalogItemsOutput" + }, + "errors": [ + { + "target": "com.amazonaws.outposts#InternalServerException" + }, + { + "target": "com.amazonaws.outposts#NotFoundException" + }, + { + "target": "com.amazonaws.outposts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Use to create a list of every item in the catalog. Add filters to your request to return a\n more specific list of results. Use filters to match an item class, storage\n option, or EC2 family.
\nIf you specify multiple filters, the filters are joined with an AND
, and\n the request returns only results that match all of the specified filters.
\n A filter for the class of items in the catalog.\n
\nFilter values are case sensitive. If you specify multiple \n values for a filter, the values are joined with an OR
, and the request returns \n all results that match any of the specified values.
\n A filter for the storage options of items in the catalog.\n
\nFilter values are case sensitive. If you specify multiple \n values for a filter, the values are joined with an OR
, and the request returns \n all results that match any of the specified values.
\n A filter for EC2 family options for items in the catalog.\n
\nFilter values are case sensitive. If you specify multiple \n values for a filter, the values are joined with an OR
, and the request returns \n all results that match any of the specified values.
Information about the catalog items.
" + } + }, + "NextToken": { + "target": "com.amazonaws.outposts#Token" + } + } + }, + "com.amazonaws.outposts#ListOrders": { + "type": "operation", + "input": { + "target": "com.amazonaws.outposts#ListOrdersInput" + }, + "output": { + "target": "com.amazonaws.outposts#ListOrdersOutput" + }, + "errors": [ + { + "target": "com.amazonaws.outposts#AccessDeniedException" + }, + { + "target": "com.amazonaws.outposts#InternalServerException" + }, + { + "target": "com.amazonaws.outposts#NotFoundException" + }, + { + "target": "com.amazonaws.outposts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Create a list of the Outpost orders for your Amazon Web Services account. You can filter your request by Outpost to \n return a more specific list of results.
", + "smithy.api#http": { + "method": "GET", + "uri": "/list-orders", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.outposts#ListOrdersInput": { + "type": "structure", + "members": { + "OutpostIdentifierFilter": { + "target": "com.amazonaws.outposts#OutpostIdentifier", + "traits": { + "smithy.api#documentation": "\n The ID or the Amazon Resource Name (ARN) of the Outpost.\n
", + "smithy.api#httpQuery": "OutpostIdentifierFilter" + } + }, + "NextToken": { + "target": "com.amazonaws.outposts#Token", + "traits": { + "smithy.api#httpQuery": "NextToken" + } + }, + "MaxResults": { + "target": "com.amazonaws.outposts#MaxResults1000", + "traits": { + "smithy.api#httpQuery": "MaxResults" + } + } + } + }, + "com.amazonaws.outposts#ListOrdersOutput": { + "type": "structure", + "members": { + "Orders": { + "target": "com.amazonaws.outposts#OrderSummaryListDefinition", + "traits": { + "smithy.api#documentation": "\n Information about the orders. \n
" + } + }, + "NextToken": { + "target": "com.amazonaws.outposts#Token" + } + } + }, "com.amazonaws.outposts#ListOutposts": { "type": "operation", "input": { @@ -700,7 +1608,7 @@ } ], "traits": { - "smithy.api#documentation": "Create a list of the Outposts for your AWS account. Add filters to your request to return\n a more specific list of results. Use filters to match an Outpost lifecycle status,\n Availibility Zone (us-east-1a
), and AZ ID (use1-az1
).
If you specify multiple filters, the filters are joined with an AND
, and the request returns only \n results that match all of the specified filters.
Create a list of the Outposts for your Amazon Web Services account. Add filters to your request to return\n a more specific list of results. Use filters to match an Outpost lifecycle status,\n Availability Zone (us-east-1a
), and AZ ID (use1-az1
).
If you specify multiple filters, the filters are joined with an AND
, and the request returns only \n results that match all of the specified filters.
\n A filter for the lifecycle status of the Outpost. \n
\n Filter values are case sensitive. If you specify multiple values for a filter, the values\n are joined with an OR
, and the request returns all results that match any of the\n specified values.
\n A filter for the lifecycle status of the Outpost. \n
\nFilter values are case sensitive. If you specify multiple \n values for a filter, the values are joined with an OR
, and the request returns \n all results that match any of the specified values.
A filter for the Availibility Zone (us-east-1a
) of the Outpost.
Filter values are case sensitive. If you specify multiple values for a filter, the values\n are joined with an OR
, and the request returns all results that match any of the\n specified values.
A filter for the Availability Zone (us-east-1a
) of the Outpost.
Filter values are case sensitive. If you specify multiple \n values for a filter, the values are joined with an OR
, and the request returns \n all results that match any of the specified values.
\n A filter for the AZ IDs (use1-az1
) of the Outpost.\n
Filter values are case sensitive. If you specify multiple values for a filter, the values\n are joined with an OR
, and the request returns all results that match any of the\n specified values.
\n A filter for the AZ IDs (use1-az1
) of the Outpost.\n
Filter values are case sensitive. If you specify multiple \n values for a filter, the values are joined with an OR
, and the request returns \n all results that match any of the specified values.
Lists the sites for the specified AWS account.
", + "smithy.api#documentation": "Lists the sites for your Amazon Web Services account.
", "smithy.api#http": { "method": "GET", "uri": "/sites", @@ -886,6 +1794,46 @@ } } }, + "com.amazonaws.outposts#MaxSize": { + "type": "string" + }, + "com.amazonaws.outposts#MaximumSupportedWeightLbs": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "NO_LIMIT", + "name": "NO_LIMIT" + }, + { + "value": "MAX_1400_LBS", + "name": "MAX_1400_LBS" + }, + { + "value": "MAX_1600_LBS", + "name": "MAX_1600_LBS" + }, + { + "value": "MAX_1800_LBS", + "name": "MAX_1800_LBS" + }, + { + "value": "MAX_2000_LBS", + "name": "MAX_2000_LBS" + } + ] + } + }, + "com.amazonaws.outposts#Municipality": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 180 + }, + "smithy.api#pattern": "^\\S[\\S ]*$" + } + }, "com.amazonaws.outposts#NotFoundException": { "type": "structure", "members": { @@ -899,13 +1847,72 @@ "smithy.api#httpError": 404 } }, + "com.amazonaws.outposts#OpticalStandard": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "OPTIC_10GBASE_SR", + "name": "OPTIC_10GBASE_SR" + }, + { + "value": "OPTIC_10GBASE_IR", + "name": "OPTIC_10GBASE_IR" + }, + { + "value": "OPTIC_10GBASE_LR", + "name": "OPTIC_10GBASE_LR" + }, + { + "value": "OPTIC_40GBASE_SR", + "name": "OPTIC_40GBASE_SR" + }, + { + "value": "OPTIC_40GBASE_ESR", + "name": "OPTIC_40GBASE_ESR" + }, + { + "value": "OPTIC_40GBASE_IR4_LR4L", + "name": "OPTIC_40GBASE_IR4_LR4L" + }, + { + "value": "OPTIC_40GBASE_LR4", + "name": "OPTIC_40GBASE_LR4" + }, + { + "value": "OPTIC_100GBASE_SR4", + "name": "OPTIC_100GBASE_SR4" + }, + { + "value": "OPTIC_100GBASE_CWDM4", + "name": "OPTIC_100GBASE_CWDM4" + }, + { + "value": "OPTIC_100GBASE_LR4", + "name": "OPTIC_100GBASE_LR4" + }, + { + "value": "OPTIC_100G_PSM4_MSA", + "name": "OPTIC_100G_PSM4_MSA" + }, + { + "value": "OPTIC_1000BASE_LX", + "name": "OPTIC_1000BASE_LX" + }, + { + "value": "OPTIC_1000BASE_SX", + "name": "OPTIC_1000BASE_SX" + } + ] + } + }, "com.amazonaws.outposts#Order": { "type": "structure", "members": { "OutpostId": { "target": "com.amazonaws.outposts#OutpostIdOnly", "traits": { - "smithy.api#documentation": "\n The ID of the Outpost.\n
" + "smithy.api#documentation": "The ID of the Outpost in the order.
" } }, "OrderId": { @@ -917,7 +1924,7 @@ "Status": { "target": "com.amazonaws.outposts#OrderStatus", "traits": { - "smithy.api#documentation": "The status of the order
" + "smithy.api#documentation": "The status of the order.
\n\n PREPARING
- Order is received and being prepared.
\n IN_PROGRESS
- Order is either being built, shipped, or installed. To get more\n details, see the LineItem
status.
\n COMPLETED
- Order is complete.
\n CANCELLED
- Order is cancelled.
\n ERROR
- Customer should contact support.
The following status are deprecated: RECEIVED
, PENDING
,\n PROCESSING
, INSTALLING
, and FULFILLED
.
\n The ID of the Outpost.\n
" + } + }, + "OrderId": { + "target": "com.amazonaws.outposts#OrderId", + "traits": { + "smithy.api#documentation": "\n The ID of the order.\n
" + } + }, + "OrderType": { + "target": "com.amazonaws.outposts#OrderType", + "traits": { + "smithy.api#documentation": "\n The type of order. \n
" + } + }, + "Status": { + "target": "com.amazonaws.outposts#OrderStatus", + "traits": { + "smithy.api#documentation": "The status of the order.
\n\n PREPARING
- Order is received and is being prepared.
\n IN_PROGRESS
- Order is either being built, shipped, or installed. For more\n information, see the LineItem
status.
\n COMPLETED
- Order is complete.
\n CANCELLED
- Order is cancelled.
\n ERROR
- Customer should contact support.
The following statuses are deprecated: RECEIVED
, PENDING
,\n PROCESSING
, INSTALLING
, and FULFILLED
.
\n The status of all line items in the order. \n
" + } + }, + "OrderSubmissionDate": { + "target": "com.amazonaws.outposts#ISO8601Timestamp", + "traits": { + "smithy.api#documentation": "\n Submission date for the order. \n
" + } + }, + "OrderFulfilledDate": { + "target": "com.amazonaws.outposts#ISO8601Timestamp", + "traits": { + "smithy.api#documentation": "\n Fulfilment date for the order.\n
" + } + } + }, + "traits": { + "smithy.api#documentation": "\n A summary of line items in your order.\n
" + } + }, + "com.amazonaws.outposts#OrderSummaryListDefinition": { + "type": "list", + "member": { + "target": "com.amazonaws.outposts#OrderSummary" + } + }, + "com.amazonaws.outposts#OrderType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "OUTPOST", + "name": "OUTPOST" + }, + { + "value": "REPLACEMENT", + "name": "REPLACEMENT" } ] } @@ -996,7 +2090,7 @@ "OutpostId": { "target": "com.amazonaws.outposts#OutpostId", "traits": { - "smithy.api#documentation": "\n The ID of the Outpost.\n
" + "smithy.api#documentation": "The ID of the Outpost.
" } }, "OwnerId": { @@ -1102,26 +2196,65 @@ }, "com.amazonaws.outposts#OutpostsOlafService": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "Outposts", + "arnNamespace": "outposts", + "cloudFormationName": "Outposts", + "cloudTrailEventSource": "outposts.amazonaws.com", + "endpointPrefix": "outposts" + }, + "aws.auth#sigv4": { + "name": "outposts" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "Amazon Web Services Outposts is a fully managed service that extends Amazon Web Services infrastructure, APIs, and tools\n to customer premises. By providing local access to Amazon Web Services managed infrastructure, Amazon Web Services Outposts\n enables customers to build and run applications on premises using the same programming\n interfaces as in Amazon Web Services Regions, while using local compute and storage resources for lower\n latency and local data processing needs.
", + "smithy.api#title": "AWS Outposts" + }, "version": "2019-12-03", "operations": [ + { + "target": "com.amazonaws.outposts#CancelOrder" + }, { "target": "com.amazonaws.outposts#CreateOrder" }, { "target": "com.amazonaws.outposts#CreateOutpost" }, + { + "target": "com.amazonaws.outposts#CreateSite" + }, { "target": "com.amazonaws.outposts#DeleteOutpost" }, { "target": "com.amazonaws.outposts#DeleteSite" }, + { + "target": "com.amazonaws.outposts#GetCatalogItem" + }, + { + "target": "com.amazonaws.outposts#GetOrder" + }, { "target": "com.amazonaws.outposts#GetOutpost" }, { "target": "com.amazonaws.outposts#GetOutpostInstanceTypes" }, + { + "target": "com.amazonaws.outposts#GetSite" + }, + { + "target": "com.amazonaws.outposts#GetSiteAddress" + }, + { + "target": "com.amazonaws.outposts#ListCatalogItems" + }, + { + "target": "com.amazonaws.outposts#ListOrders" + }, { "target": "com.amazonaws.outposts#ListOutposts" }, @@ -1136,28 +2269,22 @@ }, { "target": "com.amazonaws.outposts#UntagResource" - } - ], - "traits": { - "aws.api#service": { - "sdkId": "Outposts", - "arnNamespace": "outposts", - "cloudFormationName": "Outposts", - "cloudTrailEventSource": "outposts.amazonaws.com", - "endpointPrefix": "outposts" }, - "aws.auth#sigv4": { - "name": "outposts" + { + "target": "com.amazonaws.outposts#UpdateSite" }, - "aws.protocols#restJson1": {}, - "smithy.api#documentation": "AWS Outposts is a fully managed service that extends AWS infrastructure, APIs, and tools\n to customer premises. By providing local access to AWS managed infrastructure, AWS Outposts\n enables customers to build and run applications on premises using the same programming\n interfaces as in AWS Regions, while using local compute and storage resources for lower\n latency and local data processing needs.
", - "smithy.api#title": "AWS Outposts" - } + { + "target": "com.amazonaws.outposts#UpdateSiteAddress" + }, + { + "target": "com.amazonaws.outposts#UpdateSiteRackPhysicalProperties" + } + ] }, "com.amazonaws.outposts#OwnerId": { "type": "string", "traits": { - "smithy.api#documentation": "The AWS account ID of the Outpost owner.
", + "smithy.api#documentation": "The Amazon Web Services account ID of the Outpost owner.
", "smithy.api#length": { "min": 12, "max": 12 @@ -1195,6 +2322,153 @@ ] } }, + "com.amazonaws.outposts#PostalCode": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 20 + }, + "smithy.api#pattern": "^[a-zA-Z0-9 -]+$" + } + }, + "com.amazonaws.outposts#PowerConnector": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "L6_30P", + "name": "L6_30P" + }, + { + "value": "IEC309", + "name": "IEC309" + }, + { + "value": "AH530P7W", + "name": "AH530P7W" + }, + { + "value": "AH532P6W", + "name": "AH532P6W" + } + ] + } + }, + "com.amazonaws.outposts#PowerDrawKva": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "POWER_5_KVA", + "name": "POWER_5_KVA" + }, + { + "value": "POWER_10_KVA", + "name": "POWER_10_KVA" + }, + { + "value": "POWER_15_KVA", + "name": "POWER_15_KVA" + } + ] + } + }, + "com.amazonaws.outposts#PowerFeedDrop": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ABOVE_RACK", + "name": "ABOVE_RACK" + }, + { + "value": "BELOW_RACK", + "name": "BELOW_RACK" + } + ] + } + }, + "com.amazonaws.outposts#PowerPhase": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "SINGLE_PHASE", + "name": "SINGLE_PHASE" + }, + { + "value": "THREE_PHASE", + "name": "THREE_PHASE" + } + ] + } + }, + "com.amazonaws.outposts#Quantity": { + "type": "string" + }, + "com.amazonaws.outposts#RackPhysicalProperties": { + "type": "structure", + "members": { + "PowerDrawKva": { + "target": "com.amazonaws.outposts#PowerDrawKva", + "traits": { + "smithy.api#documentation": "The power draw available at the hardware placement position for the rack.
" + } + }, + "PowerPhase": { + "target": "com.amazonaws.outposts#PowerPhase", + "traits": { + "smithy.api#documentation": "The power option that you can provide for hardware.
" + } + }, + "PowerConnector": { + "target": "com.amazonaws.outposts#PowerConnector", + "traits": { + "smithy.api#documentation": "The power connector for the hardware.
" + } + }, + "PowerFeedDrop": { + "target": "com.amazonaws.outposts#PowerFeedDrop", + "traits": { + "smithy.api#documentation": "The position of the power feed.
" + } + }, + "UplinkGbps": { + "target": "com.amazonaws.outposts#UplinkGbps", + "traits": { + "smithy.api#documentation": "The uplink speed the rack supports for the connection to the Region.
" + } + }, + "UplinkCount": { + "target": "com.amazonaws.outposts#UplinkCount", + "traits": { + "smithy.api#documentation": "The number of uplinks each Outpost network device.
" + } + }, + "FiberOpticCableType": { + "target": "com.amazonaws.outposts#FiberOpticCableType", + "traits": { + "smithy.api#documentation": "The type of fiber used to attach the Outpost to the network.
" + } + }, + "OpticalStandard": { + "target": "com.amazonaws.outposts#OpticalStandard", + "traits": { + "smithy.api#documentation": "The type of optical standard used to attach the Outpost to the network. This field is\n dependent on uplink speed, fiber type, and distance to the upstream device. For more information\n about networking requirements for racks, see Network \n in the Amazon Web Services Outposts User Guide.\n
" + } + }, + "MaximumSupportedWeightLbs": { + "target": "com.amazonaws.outposts#MaximumSupportedWeightLbs", + "traits": { + "smithy.api#documentation": "The maximum rack weight that this site can support. NO_LIMIT
is over 2000 lbs\n (907 kg).
Information about the physical and logistical details for racks at sites.\n For more information\n about hardware requirements for racks, see Network \n readiness checklist in the Amazon Web Services Outposts User Guide.\n
" + } + }, "com.amazonaws.outposts#ResourceType": { "type": "string", "traits": { @@ -1202,6 +2476,10 @@ { "value": "OUTPOST", "name": "OUTPOST" + }, + { + "value": "ORDER", + "name": "ORDER" } ] } @@ -1240,8 +2518,38 @@ "smithy.api#documentation": "The site tags.
" } }, - "SiteArn": { - "target": "com.amazonaws.outposts#SiteArn" + "SiteArn": { + "target": "com.amazonaws.outposts#SiteArn" + }, + "Notes": { + "target": "com.amazonaws.outposts#SiteNotes", + "traits": { + "smithy.api#documentation": "\n Notes about a site. \n
" + } + }, + "OperatingAddressCountryCode": { + "target": "com.amazonaws.outposts#CountryCode", + "traits": { + "smithy.api#documentation": "\n The ISO-3166 two-letter country code where the hardware is installed and powered on.\n
" + } + }, + "OperatingAddressStateOrRegion": { + "target": "com.amazonaws.outposts#StateOrRegion", + "traits": { + "smithy.api#documentation": "State or region where the hardware is installed and powered on.
" + } + }, + "OperatingAddressCity": { + "target": "com.amazonaws.outposts#City", + "traits": { + "smithy.api#documentation": "\n City where the hardware is installed and powered on.\n
" + } + }, + "RackPhysicalProperties": { + "target": "com.amazonaws.outposts#RackPhysicalProperties", + "traits": { + "smithy.api#documentation": "\n Information about the physical and logistical details for a rack at the site.\n
" + } } }, "traits": { @@ -1292,6 +2600,16 @@ "smithy.api#pattern": "^[\\S ]+$" } }, + "com.amazonaws.outposts#SiteNotes": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2000 + }, + "smithy.api#pattern": "^[\\S \\n]+$" + } + }, "com.amazonaws.outposts#SkuCode": { "type": "string", "traits": { @@ -1302,14 +2620,14 @@ "smithy.api#pattern": "^OR-[A-Z0-9]{7}$" } }, - "com.amazonaws.outposts#Status": { + "com.amazonaws.outposts#StateOrRegion": { "type": "string", "traits": { "smithy.api#length": { "min": 1, - "max": 1000 + "max": 50 }, - "smithy.api#pattern": "^[\\S ]+$" + "smithy.api#pattern": "^\\S[\\S ]*$" } }, "com.amazonaws.outposts#String": { @@ -1322,6 +2640,36 @@ "smithy.api#pattern": "^[\\S \\n]+$" } }, + "com.amazonaws.outposts#SupportedStorageEnum": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "EBS", + "name": "EBS" + }, + { + "value": "S3", + "name": "S3" + } + ] + } + }, + "com.amazonaws.outposts#SupportedStorageList": { + "type": "list", + "member": { + "target": "com.amazonaws.outposts#SupportedStorageEnum" + } + }, + "com.amazonaws.outposts#SupportedUplinkGbps": { + "type": "integer" + }, + "com.amazonaws.outposts#SupportedUplinkGbpsListDefinition": { + "type": "list", + "member": { + "target": "com.amazonaws.outposts#SupportedUplinkGbps" + } + }, "com.amazonaws.outposts#TagKey": { "type": "string", "traits": { @@ -1485,6 +2833,327 @@ "type": "structure", "members": {} }, + "com.amazonaws.outposts#UpdateSite": { + "type": "operation", + "input": { + "target": "com.amazonaws.outposts#UpdateSiteInput" + }, + "output": { + "target": "com.amazonaws.outposts#UpdateSiteOutput" + }, + "errors": [ + { + "target": "com.amazonaws.outposts#AccessDeniedException" + }, + { + "target": "com.amazonaws.outposts#ConflictException" + }, + { + "target": "com.amazonaws.outposts#InternalServerException" + }, + { + "target": "com.amazonaws.outposts#NotFoundException" + }, + { + "target": "com.amazonaws.outposts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "\n Updates the site. \n
", + "smithy.api#http": { + "method": "PATCH", + "uri": "/sites/{SiteId}", + "code": 200 + } + } + }, + "com.amazonaws.outposts#UpdateSiteAddress": { + "type": "operation", + "input": { + "target": "com.amazonaws.outposts#UpdateSiteAddressInput" + }, + "output": { + "target": "com.amazonaws.outposts#UpdateSiteAddressOutput" + }, + "errors": [ + { + "target": "com.amazonaws.outposts#AccessDeniedException" + }, + { + "target": "com.amazonaws.outposts#ConflictException" + }, + { + "target": "com.amazonaws.outposts#InternalServerException" + }, + { + "target": "com.amazonaws.outposts#NotFoundException" + }, + { + "target": "com.amazonaws.outposts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "\n Updates the site address. \n
\n\n To update a site address\n with an order IN_PROGRESS
, you must wait for the order \n to complete or cancel the order. \n
You \n can update the operating address before you place an order at the \n site, or after all Outposts that belong to the site have been deactivated.\n
", + "smithy.api#http": { + "method": "PUT", + "uri": "/sites/{SiteId}/address", + "code": 200 + } + } + }, + "com.amazonaws.outposts#UpdateSiteAddressInput": { + "type": "structure", + "members": { + "SiteId": { + "target": "com.amazonaws.outposts#SiteId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "AddressType": { + "target": "com.amazonaws.outposts#AddressType", + "traits": { + "smithy.api#documentation": "\n The type of the address.\n
", + "smithy.api#required": {} + } + }, + "Address": { + "target": "com.amazonaws.outposts#Address", + "traits": { + "smithy.api#documentation": "\n The address for the site.\n
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.outposts#UpdateSiteAddressOutput": { + "type": "structure", + "members": { + "AddressType": { + "target": "com.amazonaws.outposts#AddressType", + "traits": { + "smithy.api#documentation": "\n The type of the address.\n
" + } + }, + "Address": { + "target": "com.amazonaws.outposts#Address", + "traits": { + "smithy.api#documentation": "\n Information about an address. \n
" + } + } + } + }, + "com.amazonaws.outposts#UpdateSiteInput": { + "type": "structure", + "members": { + "SiteId": { + "target": "com.amazonaws.outposts#SiteId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.outposts#SiteName" + }, + "Description": { + "target": "com.amazonaws.outposts#SiteDescription" + }, + "Notes": { + "target": "com.amazonaws.outposts#SiteNotes", + "traits": { + "smithy.api#documentation": "\n Notes about a site.\n
" + } + } + } + }, + "com.amazonaws.outposts#UpdateSiteOutput": { + "type": "structure", + "members": { + "Site": { + "target": "com.amazonaws.outposts#Site" + } + } + }, + "com.amazonaws.outposts#UpdateSiteRackPhysicalProperties": { + "type": "operation", + "input": { + "target": "com.amazonaws.outposts#UpdateSiteRackPhysicalPropertiesInput" + }, + "output": { + "target": "com.amazonaws.outposts#UpdateSiteRackPhysicalPropertiesOutput" + }, + "errors": [ + { + "target": "com.amazonaws.outposts#AccessDeniedException" + }, + { + "target": "com.amazonaws.outposts#ConflictException" + }, + { + "target": "com.amazonaws.outposts#InternalServerException" + }, + { + "target": "com.amazonaws.outposts#NotFoundException" + }, + { + "target": "com.amazonaws.outposts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Update the physical and logistical details for a rack at a site. For more information\n about hardware requirements for racks, see Network \n readiness checklist in the Amazon Web Services Outposts User Guide.\n
\nTo update a rack at a site with an order of IN_PROGRESS
, you must wait for\n the order to complete or cancel the order.
Specify in kVA the power draw available at the hardware placement position for the\n rack.
" + } + }, + "PowerPhase": { + "target": "com.amazonaws.outposts#PowerPhase", + "traits": { + "smithy.api#documentation": "Specify the power option that you can provide for hardware.
\nSingle-phase AC feed: 200 V to 277 V, 50 Hz or 60 Hz
\nThree-phase AC feed: 346 V to 480 V, 50 Hz or 60 Hz
\n Specify the power connector that Amazon Web Services should plan to provide for connections to the\n hardware. Note the correlation between PowerPhase
and\n PowerConnector
.
Single-phase AC feed
\n\n L6-30P – (common in US); 30A; single phase
\n\n IEC309 (blue) – P+N+E, 6hr; 32 A; single\n phase
\nThree-phase AC feed
\n\n AH530P7W (red) – 3P+N+E, 7hr; 30A; three\n phase
\n\n AH532P6W (red) – 3P+N+E, 6hr; 32A; three\n phase
\nSpecify whether the power feed comes above or below the rack.
" + } + }, + "UplinkGbps": { + "target": "com.amazonaws.outposts#UplinkGbps", + "traits": { + "smithy.api#documentation": "Specify the uplink speed the rack should support for the connection to the Region.\n
" + } + }, + "UplinkCount": { + "target": "com.amazonaws.outposts#UplinkCount", + "traits": { + "smithy.api#documentation": "Racks come with two Outpost network devices. Depending on the supported uplink speed at\n the site, the Outpost network devices provide a variable number of uplinks. Specify the number\n of uplinks for each Outpost network device that you intend to use to connect the rack to your\n network. Note the correlation between UplinkGbps
and UplinkCount
.
1Gbps - Uplinks available: 1, 2, 4, 6, 8
\n10Gbps - Uplinks available: 1, 2, 4, 8, 12, 16
\n40 and 100 Gbps- Uplinks available: 1, 2, 4
\nSpecify the type of fiber that you will use to attach the Outpost to your network.\n
" + } + }, + "OpticalStandard": { + "target": "com.amazonaws.outposts#OpticalStandard", + "traits": { + "smithy.api#documentation": "Specify the type of optical standard that you will use to attach the Outpost to your\n network. This field is dependent on uplink speed, fiber type, and distance to the upstream\n device. For more information\n about networking requirements for racks, see Network \n in the Amazon Web Services Outposts User Guide.\n
\n\n OPTIC_10GBASE_SR
: 10GBASE-SR
\n OPTIC_10GBASE_IR
: 10GBASE-IR
\n OPTIC_10GBASE_LR
: 10GBASE-LR
\n OPTIC_40GBASE_SR
: 40GBASE-SR
\n OPTIC_40GBASE_ESR
: 40GBASE-ESR
\n OPTIC_40GBASE_IR4_LR4L
: 40GBASE-IR (LR4L)
\n OPTIC_40GBASE_LR4
: 40GBASE-LR4
\n OPTIC_100GBASE_SR4
: 100GBASE-SR4
\n OPTIC_100GBASE_CWDM4
: 100GBASE-CWDM4
\n OPTIC_100GBASE_LR4
: 100GBASE-LR4
\n OPTIC_100G_PSM4_MSA
: 100G PSM4 MSA
\n OPTIC_1000BASE_LX
: 1000Base-LX
\n OPTIC_1000BASE_SX
: 1000Base-SX
Specify the maximum rack weight that this site can support. NO_LIMIT
is over\n 2000lbs.
Amazon Personalize is a machine learning service that makes it easy to add individualized\n recommendations to customers.
", + "smithy.api#title": "Amazon Personalize" + }, "version": "2018-05-22", "operations": [ { "target": "com.amazonaws.personalize#CreateBatchInferenceJob" }, + { + "target": "com.amazonaws.personalize#CreateBatchSegmentJob" + }, { "target": "com.amazonaws.personalize#CreateCampaign" }, @@ -155,6 +173,9 @@ { "target": "com.amazonaws.personalize#CreateFilter" }, + { + "target": "com.amazonaws.personalize#CreateRecommender" + }, { "target": "com.amazonaws.personalize#CreateSchema" }, @@ -179,6 +200,9 @@ { "target": "com.amazonaws.personalize#DeleteFilter" }, + { + "target": "com.amazonaws.personalize#DeleteRecommender" + }, { "target": "com.amazonaws.personalize#DeleteSchema" }, @@ -191,6 +215,9 @@ { "target": "com.amazonaws.personalize#DescribeBatchInferenceJob" }, + { + "target": "com.amazonaws.personalize#DescribeBatchSegmentJob" + }, { "target": "com.amazonaws.personalize#DescribeCampaign" }, @@ -218,6 +245,9 @@ { "target": "com.amazonaws.personalize#DescribeRecipe" }, + { + "target": "com.amazonaws.personalize#DescribeRecommender" + }, { "target": "com.amazonaws.personalize#DescribeSchema" }, @@ -233,6 +263,9 @@ { "target": "com.amazonaws.personalize#ListBatchInferenceJobs" }, + { + "target": "com.amazonaws.personalize#ListBatchSegmentJobs" + }, { "target": "com.amazonaws.personalize#ListCampaigns" }, @@ -257,6 +290,9 @@ { "target": "com.amazonaws.personalize#ListRecipes" }, + { + "target": "com.amazonaws.personalize#ListRecommenders" + }, { "target": "com.amazonaws.personalize#ListSchemas" }, @@ -271,23 +307,11 @@ }, { "target": "com.amazonaws.personalize#UpdateCampaign" - } - ], - "traits": { - "aws.api#service": { - "sdkId": "Personalize", - "arnNamespace": "personalize", - "cloudFormationName": "Personalize", - "cloudTrailEventSource": "personalize.amazonaws.com", - "endpointPrefix": "personalize" - }, - "aws.auth#sigv4": { - "name": "personalize" }, - "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "Amazon Personalize is a machine learning service that makes it easy to add individualized\n recommendations to customers.
", - "smithy.api#title": "Amazon Personalize" - } + { + "target": "com.amazonaws.personalize#UpdateRecommender" + } + ] }, "com.amazonaws.personalize#Arn": { "type": "string", @@ -546,6 +570,176 @@ } } }, + "com.amazonaws.personalize#BatchSegmentJob": { + "type": "structure", + "members": { + "jobName": { + "target": "com.amazonaws.personalize#Name", + "traits": { + "smithy.api#documentation": "The name of the batch segment job.
" + } + }, + "batchSegmentJobArn": { + "target": "com.amazonaws.personalize#Arn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the batch segment job.
" + } + }, + "filterArn": { + "target": "com.amazonaws.personalize#Arn", + "traits": { + "smithy.api#documentation": "The ARN of the filter used on the batch segment job.
" + } + }, + "failureReason": { + "target": "com.amazonaws.personalize#FailureReason", + "traits": { + "smithy.api#documentation": "If the batch segment job failed, the reason for the failure.
" + } + }, + "solutionVersionArn": { + "target": "com.amazonaws.personalize#Arn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the solution version used by the batch segment job to generate batch segments.
" + } + }, + "numResults": { + "target": "com.amazonaws.personalize#NumBatchResults", + "traits": { + "smithy.api#documentation": "The number of predicted users generated by the batch segment job for each line of input data.
" + } + }, + "jobInput": { + "target": "com.amazonaws.personalize#BatchSegmentJobInput", + "traits": { + "smithy.api#documentation": "The Amazon S3 path that leads to the input data used to generate the batch segment job.
" + } + }, + "jobOutput": { + "target": "com.amazonaws.personalize#BatchSegmentJobOutput", + "traits": { + "smithy.api#documentation": "The Amazon S3 bucket that contains the output data generated by the batch segment job.
" + } + }, + "roleArn": { + "target": "com.amazonaws.personalize#RoleArn", + "traits": { + "smithy.api#documentation": "The ARN of the Amazon Identity and Access Management (IAM) role that requested the batch segment job.
" + } + }, + "status": { + "target": "com.amazonaws.personalize#Status", + "traits": { + "smithy.api#documentation": "The status of the batch segment job. The status is one of the following values:
\nPENDING
\nIN PROGRESS
\nACTIVE
\nCREATE FAILED
\nThe time at which the batch segment job was created.
" + } + }, + "lastUpdatedDateTime": { + "target": "com.amazonaws.personalize#Date", + "traits": { + "smithy.api#documentation": "The time at which the batch segment job last updated.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Contains information on a batch segment job.
" + } + }, + "com.amazonaws.personalize#BatchSegmentJobInput": { + "type": "structure", + "members": { + "s3DataSource": { + "target": "com.amazonaws.personalize#S3DataConfig", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The input configuration of a batch segment job.
" + } + }, + "com.amazonaws.personalize#BatchSegmentJobOutput": { + "type": "structure", + "members": { + "s3DataDestination": { + "target": "com.amazonaws.personalize#S3DataConfig", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The output configuration parameters of a batch segment job.
" + } + }, + "com.amazonaws.personalize#BatchSegmentJobSummary": { + "type": "structure", + "members": { + "batchSegmentJobArn": { + "target": "com.amazonaws.personalize#Arn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the batch segment job.
" + } + }, + "jobName": { + "target": "com.amazonaws.personalize#Name", + "traits": { + "smithy.api#documentation": "The name of the batch segment job.
" + } + }, + "status": { + "target": "com.amazonaws.personalize#Status", + "traits": { + "smithy.api#documentation": "The status of the batch segment job. The status is one of the following values:
\nPENDING
\nIN PROGRESS
\nACTIVE
\nCREATE FAILED
\nThe time at which the batch segment job was created.
" + } + }, + "lastUpdatedDateTime": { + "target": "com.amazonaws.personalize#Date", + "traits": { + "smithy.api#documentation": "The time at which the batch segment job was last updated.
" + } + }, + "failureReason": { + "target": "com.amazonaws.personalize#FailureReason", + "traits": { + "smithy.api#documentation": "If the batch segment job failed, the reason for the failure.
" + } + }, + "solutionVersionArn": { + "target": "com.amazonaws.personalize#Arn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the solution version used by the batch segment job to generate batch segments.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A truncated version of the BatchSegmentJob datatype. The ListBatchSegmentJobs operation returns a list of batch segment job\n summaries.
" + } + }, + "com.amazonaws.personalize#BatchSegmentJobs": { + "type": "list", + "member": { + "target": "com.amazonaws.personalize#BatchSegmentJobSummary" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, "com.amazonaws.personalize#Boolean": { "type": "boolean", "traits": { @@ -614,7 +808,7 @@ } }, "traits": { - "smithy.api#documentation": "Describes a deployed solution version, otherwise known as a campaign.\n For more information on campaigns, see CreateCampaign.
" + "smithy.api#documentation": "An object that describes the deployment of a solution version.\n For more information on campaigns, see CreateCampaign.
" } }, "com.amazonaws.personalize#CampaignConfig": { @@ -623,7 +817,7 @@ "itemExplorationConfig": { "target": "com.amazonaws.personalize#HyperParameters", "traits": { - "smithy.api#documentation": "A string to string map specifying the exploration configuration hyperparameters, including explorationWeight
and \n explorationItemAgeCutOff
, you want to use to configure the amount of item exploration Amazon Personalize uses when\n recommending items. Provide itemExplorationConfig
data only if your solution uses the\n User-Personalization recipe.
Specifies the exploration configuration hyperparameters, including explorationWeight
and \n explorationItemAgeCutOff
, you want to use to configure the amount of item exploration Amazon Personalize uses when\n recommending items. Provide itemExplorationConfig
data only if your solution uses the\n User-Personalization recipe.
Creates a batch segment job. The operation can handle up to 50 million records and the\n input file must be in JSON format. For more information, see recommendations-batch.
" + } + }, + "com.amazonaws.personalize#CreateBatchSegmentJobRequest": { + "type": "structure", + "members": { + "jobName": { + "target": "com.amazonaws.personalize#Name", + "traits": { + "smithy.api#documentation": "The name of the batch segment job to create.
", + "smithy.api#required": {} + } + }, + "solutionVersionArn": { + "target": "com.amazonaws.personalize#Arn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the solution version you want the batch segment job to use to generate\n batch segments.
", + "smithy.api#required": {} + } + }, + "filterArn": { + "target": "com.amazonaws.personalize#Arn", + "traits": { + "smithy.api#documentation": "The ARN of the filter to apply to the batch segment job. For more information on using\n filters, see filter-batch.
" + } + }, + "numResults": { + "target": "com.amazonaws.personalize#NumBatchResults", + "traits": { + "smithy.api#documentation": "The number of predicted users generated by the batch segment job for each line of input data.
" + } + }, + "jobInput": { + "target": "com.amazonaws.personalize#BatchSegmentJobInput", + "traits": { + "smithy.api#documentation": "The Amazon S3 path for the input data used to generate the batch segment job.
", + "smithy.api#required": {} + } + }, + "jobOutput": { + "target": "com.amazonaws.personalize#BatchSegmentJobOutput", + "traits": { + "smithy.api#documentation": "The Amazon S3 path for the bucket where the job's output will be stored.
", + "smithy.api#required": {} + } + }, + "roleArn": { + "target": "com.amazonaws.personalize#RoleArn", + "traits": { + "smithy.api#documentation": "The ARN of the Amazon Identity and Access Management role that has permissions to read and write to your input and output\n Amazon S3 buckets respectively.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.personalize#CreateBatchSegmentJobResponse": { + "type": "structure", + "members": { + "batchSegmentJobArn": { + "target": "com.amazonaws.personalize#Arn", + "traits": { + "smithy.api#documentation": "The ARN of the batch segment job.
" + } + } + } + }, "com.amazonaws.personalize#CreateCampaign": { "type": "operation", "input": { @@ -965,7 +1251,7 @@ } ], "traits": { - "smithy.api#documentation": "Creates a campaign by deploying a solution version. When a client calls the\n GetRecommendations\n and\n GetPersonalizedRanking\n APIs, a campaign is specified in the request.
\n\n\n Minimum Provisioned TPS and Auto-Scaling\n
\n \nA transaction is a single GetRecommendations
or\n GetPersonalizedRanking
call. Transactions per second (TPS) is the throughput\n and unit of billing for Amazon Personalize. The minimum provisioned TPS\n (minProvisionedTPS
) specifies the baseline throughput provisioned by\n Amazon Personalize, and thus, the minimum billing charge. \n
\n If your TPS increases beyond\n minProvisionedTPS
, Amazon Personalize auto-scales the provisioned capacity up and down,\n but never below minProvisionedTPS
.\n There's a short time delay while the capacity is increased that might cause loss of\n transactions.
The actual TPS used is calculated as the average requests/second within a 5-minute window.\n You pay for maximum of either the minimum provisioned TPS or the actual TPS.\n We recommend starting with a low minProvisionedTPS
, track\n your usage using Amazon CloudWatch metrics, and then increase the minProvisionedTPS
\n as necessary.
\n Status\n
\nA campaign can be in one of the following states:
\nCREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
\nDELETE PENDING > DELETE IN_PROGRESS
\nTo get the campaign status, call DescribeCampaign.
\nWait until the status
of the campaign\n is ACTIVE
before asking the campaign for recommendations.
\n Related APIs\n
\n\n ListCampaigns\n
\n\n DescribeCampaign\n
\n\n UpdateCampaign\n
\n\n DeleteCampaign\n
\nCreates a campaign that deploys a solution version. When a client calls the\n GetRecommendations\n and\n GetPersonalizedRanking\n APIs, a campaign is specified in the request.
\n\n\n Minimum Provisioned TPS and Auto-Scaling\n
\n \nA transaction is a single GetRecommendations
or\n GetPersonalizedRanking
call. Transactions per second (TPS) is the throughput\n and unit of billing for Amazon Personalize. The minimum provisioned TPS\n (minProvisionedTPS
) specifies the baseline throughput provisioned by\n Amazon Personalize, and thus, the minimum billing charge. \n
\n If your TPS increases beyond\n minProvisionedTPS
, Amazon Personalize auto-scales the provisioned capacity up and down,\n but never below minProvisionedTPS
.\n There's a short time delay while the capacity is increased that might cause loss of\n transactions.
The actual TPS used is calculated as the average requests/second within a 5-minute window.\n You pay for maximum of either the minimum provisioned TPS or the actual TPS.\n We recommend starting with a low minProvisionedTPS
, track\n your usage using Amazon CloudWatch metrics, and then increase the minProvisionedTPS
\n as necessary.
\n Status\n
\nA campaign can be in one of the following states:
\nCREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
\nDELETE PENDING > DELETE IN_PROGRESS
\nTo get the campaign status, call DescribeCampaign.
\nWait until the status
of the campaign\n is ACTIVE
before asking the campaign for recommendations.
\n Related APIs\n
\n\n ListCampaigns\n
\n\n DescribeCampaign\n
\n\n UpdateCampaign\n
\n\n DeleteCampaign\n
\nCreates an empty dataset group. A dataset group contains related datasets that supply data\n for training a model. A dataset group can contain at most three datasets, one for each type of\n dataset:
\nInteractions
\nItems
\nUsers
\nTo train a model (create a solution), a dataset group that contains an\n Interactions
dataset is required. Call CreateDataset to add a\n dataset to the group.
A dataset group can be in one of the following states:
\nCREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
\nDELETE PENDING
\nTo get the status of the dataset group, call DescribeDatasetGroup. If\n the status shows as CREATE FAILED, the response includes a failureReason
key,\n which describes why the creation failed.
You must wait until the status
of the dataset group is ACTIVE
\n before adding a dataset to the group.
You can specify an Key Management Service (KMS) key to encrypt the datasets in the group. If you\n specify a KMS key, you must also include an Identity and Access Management (IAM) role that has permission to\n access the key.
\n\n APIs that require a dataset group ARN in the request\n
\n\n CreateDataset\n
\n\n CreateEventTracker\n
\n\n CreateSolution\n
\n\n Related APIs\n
\n\n ListDatasetGroups\n
\n\n DescribeDatasetGroup\n
\n\n DeleteDatasetGroup\n
\nCreates an empty dataset group. A dataset group is a container for Amazon Personalize resources. \n A dataset group can contain at most three datasets, one for each type of\n dataset:
\nInteractions
\nItems
\nUsers
\n\n A dataset group can be a Domain dataset group, where you specify a domain and use\n pre-configured resources like recommenders, or a Custom dataset group, where you use custom resources, such as a solution with a solution version, that\n you deploy with a campaign. If you start with a Domain dataset group, you can still add custom resources such as\n solutions and solution versions trained with recipes for custom use cases and deployed with campaigns.\n
\nA dataset group can be in one of the following states:
\nCREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
\nDELETE PENDING
\nTo get the status of the dataset group, call DescribeDatasetGroup. If\n the status shows as CREATE FAILED, the response includes a failureReason
key,\n which describes why the creation failed.
You must wait until the status
of the dataset group is ACTIVE
\n before adding a dataset to the group.
You can specify an Key Management Service (KMS) key to encrypt the datasets in the group. If you\n specify a KMS key, you must also include an Identity and Access Management (IAM) role that has permission to\n access the key.
\n\n APIs that require a dataset group ARN in the request\n
\n\n CreateDataset\n
\n\n CreateEventTracker\n
\n\n CreateSolution\n
\n\n Related APIs\n
\n\n ListDatasetGroups\n
\n\n DescribeDatasetGroup\n
\n\n DeleteDatasetGroup\n
\nThe Amazon Resource Name (ARN) of a Key Management Service (KMS) key used to encrypt the datasets.
" } + }, + "domain": { + "target": "com.amazonaws.personalize#Domain", + "traits": { + "smithy.api#documentation": "The domain of the dataset group. Specify a domain to create a Domain dataset group. The domain you specify \n determines the default schemas for datasets and the use cases available for recommenders. If you don't specify a domain,\n you create a Custom dataset group with solution versions that you deploy with a campaign.\n
" + } } } }, @@ -1176,6 +1468,12 @@ "traits": { "smithy.api#documentation": "The Amazon Resource Name (ARN) of the new dataset group.
" } + }, + "domain": { + "target": "com.amazonaws.personalize#Domain", + "traits": { + "smithy.api#documentation": "The domain for the new Domain dataset group.
" + } } } }, @@ -1425,6 +1723,76 @@ } } }, + "com.amazonaws.personalize#CreateRecommender": { + "type": "operation", + "input": { + "target": "com.amazonaws.personalize#CreateRecommenderRequest" + }, + "output": { + "target": "com.amazonaws.personalize#CreateRecommenderResponse" + }, + "errors": [ + { + "target": "com.amazonaws.personalize#InvalidInputException" + }, + { + "target": "com.amazonaws.personalize#LimitExceededException" + }, + { + "target": "com.amazonaws.personalize#ResourceAlreadyExistsException" + }, + { + "target": "com.amazonaws.personalize#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "Creates a recommender with the recipe (a Domain dataset group use case) you specify. \n You create recommenders for a Domain dataset group and specify the recommender's Amazon Resource Name (ARN) when you make a\n GetRecommendations\n request.\n
\n \n \n \n\n Status\n
\nA recommender can be in one of the following states:
\nCREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
\nDELETE PENDING > DELETE IN_PROGRESS
\nTo get the recommender status, call DescribeRecommender.
\nWait until the status
of the recommender\n is ACTIVE
before asking the recommender for recommendations.
\n Related APIs\n
\n\n ListRecommenders\n
\n\n DescribeRecommender\n
\n\n UpdateRecommender\n
\n\n DeleteRecommender\n
\nThe name of the recommender.
", + "smithy.api#required": {} + } + }, + "datasetGroupArn": { + "target": "com.amazonaws.personalize#Arn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the destination domain dataset group for the recommender.
", + "smithy.api#required": {} + } + }, + "recipeArn": { + "target": "com.amazonaws.personalize#Arn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the recipe that the recommender will use. For a recommender, a recipe is a Domain dataset group\n use case. Only Domain dataset group use cases can be used to create a recommender. For information about use cases see Choosing recommender use cases.\n
", + "smithy.api#required": {} + } + }, + "recommenderConfig": { + "target": "com.amazonaws.personalize#RecommenderConfig", + "traits": { + "smithy.api#documentation": "The configuration details of the recommender.
" + } + } + } + }, + "com.amazonaws.personalize#CreateRecommenderResponse": { + "type": "structure", + "members": { + "recommenderArn": { + "target": "com.amazonaws.personalize#Arn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the recommender.
" + } + } + } + }, "com.amazonaws.personalize#CreateSchema": { "type": "operation", "input": { @@ -1445,7 +1813,7 @@ } ], "traits": { - "smithy.api#documentation": "Creates an Amazon Personalize schema from the specified schema string. The schema you create\n must be in Avro JSON format.
\nAmazon Personalize recognizes three schema variants. Each schema is associated with a dataset\n type and has a set of required field and keywords.\n You specify a schema when you call CreateDataset.
\n \n\n Related APIs\n
\n\n ListSchemas\n
\n\n DescribeSchema\n
\n\n DeleteSchema\n
\nCreates an Amazon Personalize schema from the specified schema string. The schema you create\n must be in Avro JSON format.
\nAmazon Personalize recognizes three schema variants. Each schema is associated with a dataset\n type and has a set of required field and keywords. If you are creating a schema for a dataset in a Domain dataset group, you\n provide the domain of the Domain dataset group.\n You specify a schema when you call CreateDataset.
\n \n\n Related APIs\n
\n\n ListSchemas\n
\n\n DescribeSchema\n
\n\n DeleteSchema\n
\nA schema in Avro JSON format.
", "smithy.api#required": {} } + }, + "domain": { + "target": "com.amazonaws.personalize#Domain", + "traits": { + "smithy.api#documentation": "The domain for the schema. If you are creating a schema for a dataset in a Domain dataset group, specify\n the domain you chose when you created the Domain dataset group.
" + } } } }, @@ -1591,7 +1965,7 @@ } ], "traits": { - "smithy.api#documentation": "Trains or retrains an active solution. A solution is created using the CreateSolution operation and must be in the ACTIVE state before calling\n CreateSolutionVersion
. A new version of the solution is created every time you\n call this operation.
\n Status\n
\nA solution version can be in one of the following states:
\nCREATE PENDING
\nCREATE IN_PROGRESS
\nACTIVE
\nCREATE FAILED
\nCREATE STOPPING
\nCREATE STOPPED
\nTo get the status of the version, call DescribeSolutionVersion. Wait\n until the status shows as ACTIVE before calling CreateCampaign
.
If the status shows as CREATE FAILED, the response includes a failureReason
\n key, which describes why the job failed.
\n Related APIs\n
\n\n ListSolutionVersions\n
\n\n ListSolutions\n
\n\n CreateSolution\n
\n\n DescribeSolution\n
\n\n DeleteSolution\n
\nTrains or retrains an active solution in a Custom dataset group. A solution is created using the CreateSolution operation and must be in the ACTIVE state before calling\n CreateSolutionVersion
. A new version of the solution is created every time you\n call this operation.
\n Status\n
\nA solution version can be in one of the following states:
\nCREATE PENDING
\nCREATE IN_PROGRESS
\nACTIVE
\nCREATE FAILED
\nCREATE STOPPING
\nCREATE STOPPED
\nTo get the status of the version, call DescribeSolutionVersion. Wait\n until the status shows as ACTIVE before calling CreateCampaign
.
If the status shows as CREATE FAILED, the response includes a failureReason
\n key, which describes why the job failed.
\n Related APIs\n
\n\n ListSolutionVersions\n
\n\n ListSolutions\n
\n\n CreateSolution\n
\n\n DescribeSolution\n
\n\n DeleteSolution\n
\nIf creating a dataset group fails, provides the reason why.
" } + }, + "domain": { + "target": "com.amazonaws.personalize#Domain", + "traits": { + "smithy.api#documentation": "The domain of a Domain dataset group.
" + } } }, "traits": { @@ -1925,6 +2305,12 @@ "traits": { "smithy.api#documentation": "If creating a dataset group fails, the reason behind the failure.
" } + }, + "domain": { + "target": "com.amazonaws.personalize#Domain", + "traits": { + "smithy.api#documentation": "The domain of a Domain dataset group.
" + } } }, "traits": { @@ -2093,6 +2479,12 @@ "traits": { "smithy.api#documentation": "The date and time (in Unix time) that the schema was last updated.
" } + }, + "domain": { + "target": "com.amazonaws.personalize#Domain", + "traits": { + "smithy.api#documentation": "The domain of a schema that you created for a dataset in a Domain dataset group.
" + } } }, "traits": { @@ -2125,6 +2517,12 @@ "traits": { "smithy.api#documentation": "The date and time (in Unix time) that the schema was last updated.
" } + }, + "domain": { + "target": "com.amazonaws.personalize#Domain", + "traits": { + "smithy.api#documentation": "The domain of a schema that you created for a dataset in a Domain dataset group.
" + } } }, "traits": { @@ -2515,6 +2913,39 @@ } } }, + "com.amazonaws.personalize#DeleteRecommender": { + "type": "operation", + "input": { + "target": "com.amazonaws.personalize#DeleteRecommenderRequest" + }, + "errors": [ + { + "target": "com.amazonaws.personalize#InvalidInputException" + }, + { + "target": "com.amazonaws.personalize#ResourceInUseException" + }, + { + "target": "com.amazonaws.personalize#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "Deactivates and removes a recommender. A deleted recommender can no longer be specified in a GetRecommendations\n request.
", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.personalize#DeleteRecommenderRequest": { + "type": "structure", + "members": { + "recommenderArn": { + "target": "com.amazonaws.personalize#Arn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the recommender to delete.
", + "smithy.api#required": {} + } + } + } + }, "com.amazonaws.personalize#DeleteSchema": { "type": "operation", "input": { @@ -2669,6 +3100,50 @@ } } }, + "com.amazonaws.personalize#DescribeBatchSegmentJob": { + "type": "operation", + "input": { + "target": "com.amazonaws.personalize#DescribeBatchSegmentJobRequest" + }, + "output": { + "target": "com.amazonaws.personalize#DescribeBatchSegmentJobResponse" + }, + "errors": [ + { + "target": "com.amazonaws.personalize#InvalidInputException" + }, + { + "target": "com.amazonaws.personalize#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "Gets the properties of a batch segment job including name, Amazon Resource Name (ARN),\n status, input and output configurations, and the ARN of the solution version used to generate\n segments.
", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.personalize#DescribeBatchSegmentJobRequest": { + "type": "structure", + "members": { + "batchSegmentJobArn": { + "target": "com.amazonaws.personalize#Arn", + "traits": { + "smithy.api#documentation": "The ARN of the batch segment job to describe.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.personalize#DescribeBatchSegmentJobResponse": { + "type": "structure", + "members": { + "batchSegmentJob": { + "target": "com.amazonaws.personalize#BatchSegmentJob", + "traits": { + "smithy.api#documentation": "Information on the specified batch segment job.
" + } + } + } + }, "com.amazonaws.personalize#DescribeCampaign": { "type": "operation", "input": { @@ -3065,6 +3540,50 @@ } } }, + "com.amazonaws.personalize#DescribeRecommender": { + "type": "operation", + "input": { + "target": "com.amazonaws.personalize#DescribeRecommenderRequest" + }, + "output": { + "target": "com.amazonaws.personalize#DescribeRecommenderResponse" + }, + "errors": [ + { + "target": "com.amazonaws.personalize#InvalidInputException" + }, + { + "target": "com.amazonaws.personalize#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "Describes the given recommender, including its status.
\nA recommender can be in one of the following states:
\nCREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
\nDELETE PENDING > DELETE IN_PROGRESS
\nWhen the status
is CREATE FAILED
, the response includes the\n failureReason
key, which describes why.
For more information on recommenders, see CreateRecommender.
", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.personalize#DescribeRecommenderRequest": { + "type": "structure", + "members": { + "recommenderArn": { + "target": "com.amazonaws.personalize#Arn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the recommender to describe.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.personalize#DescribeRecommenderResponse": { + "type": "structure", + "members": { + "recommender": { + "target": "com.amazonaws.personalize#Recommender", + "traits": { + "smithy.api#documentation": "The properties of the recommender.
" + } + } + } + }, "com.amazonaws.personalize#DescribeSchema": { "type": "operation", "input": { @@ -3209,6 +3728,21 @@ } } }, + "com.amazonaws.personalize#Domain": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ECOMMERCE", + "name": "ECOMMERCE" + }, + { + "value": "VIDEO_ON_DEMAND", + "name": "VIDEO_ON_DEMAND" + } + ] + } + }, "com.amazonaws.personalize#ErrorMessage": { "type": "string" }, @@ -3835,6 +4369,10 @@ "com.amazonaws.personalize#KmsKeyArn": { "type": "string", "traits": { + "smithy.api#length": { + "min": 0, + "max": 2048 + }, "smithy.api#pattern": "^arn:aws.*:kms:.*:[0-9]{12}:key/" } }, @@ -3857,7 +4395,74 @@ "target": "com.amazonaws.personalize#ListBatchInferenceJobsRequest" }, "output": { - "target": "com.amazonaws.personalize#ListBatchInferenceJobsResponse" + "target": "com.amazonaws.personalize#ListBatchInferenceJobsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.personalize#InvalidInputException" + }, + { + "target": "com.amazonaws.personalize#InvalidNextTokenException" + } + ], + "traits": { + "smithy.api#documentation": "Gets a list of the batch inference jobs that have been performed off of a solution\n version.
", + "smithy.api#idempotent": {}, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "batchInferenceJobs", + "pageSize": "maxResults" + } + } + }, + "com.amazonaws.personalize#ListBatchInferenceJobsRequest": { + "type": "structure", + "members": { + "solutionVersionArn": { + "target": "com.amazonaws.personalize#Arn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the solution version from which the batch inference jobs\n were created.
" + } + }, + "nextToken": { + "target": "com.amazonaws.personalize#NextToken", + "traits": { + "smithy.api#documentation": "The token to request the next page of results.
" + } + }, + "maxResults": { + "target": "com.amazonaws.personalize#MaxResults", + "traits": { + "smithy.api#documentation": "The maximum number of batch inference job results to return in each page. The default\n value is 100.
" + } + } + } + }, + "com.amazonaws.personalize#ListBatchInferenceJobsResponse": { + "type": "structure", + "members": { + "batchInferenceJobs": { + "target": "com.amazonaws.personalize#BatchInferenceJobs", + "traits": { + "smithy.api#documentation": "A list containing information on each job that is returned.
" + } + }, + "nextToken": { + "target": "com.amazonaws.personalize#NextToken", + "traits": { + "smithy.api#documentation": "The token to use to retrieve the next page of results. The value is null
when\n there are no more results to return.
Gets a list of the batch inference jobs that have been performed off of a solution\n version.
", + "smithy.api#documentation": "Gets a list of the batch segment jobs that have been performed off of a solution\n version that you specify.
", "smithy.api#idempotent": {}, "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", - "items": "batchInferenceJobs", + "items": "batchSegmentJobs", "pageSize": "maxResults" } } }, - "com.amazonaws.personalize#ListBatchInferenceJobsRequest": { + "com.amazonaws.personalize#ListBatchSegmentJobsRequest": { "type": "structure", "members": { "solutionVersionArn": { "target": "com.amazonaws.personalize#Arn", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) of the solution version from which the batch inference jobs\n were created.
" + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the solution version that the batch segment jobs used to generate batch segments.
" } }, "nextToken": { @@ -3896,16 +4501,16 @@ "maxResults": { "target": "com.amazonaws.personalize#MaxResults", "traits": { - "smithy.api#documentation": "The maximum number of batch inference job results to return in each page. The default\n value is 100.
" + "smithy.api#documentation": "The maximum number of batch segment job results to return in each page. The default\n value is 100.
" } } } }, - "com.amazonaws.personalize#ListBatchInferenceJobsResponse": { + "com.amazonaws.personalize#ListBatchSegmentJobsResponse": { "type": "structure", "members": { - "batchInferenceJobs": { - "target": "com.amazonaws.personalize#BatchInferenceJobs", + "batchSegmentJobs": { + "target": "com.amazonaws.personalize#BatchSegmentJobs", "traits": { "smithy.api#documentation": "A list containing information on each job that is returned.
" } @@ -4387,6 +4992,9 @@ "target": "com.amazonaws.personalize#ListRecipesResponse" }, "errors": [ + { + "target": "com.amazonaws.personalize#InvalidInputException" + }, { "target": "com.amazonaws.personalize#InvalidNextTokenException" } @@ -4422,6 +5030,12 @@ "traits": { "smithy.api#documentation": "The maximum number of recipes to return.
" } + }, + "domain": { + "target": "com.amazonaws.personalize#Domain", + "traits": { + "smithy.api#documentation": "\n Filters returned recipes by domain for a Domain dataset group. Only recipes (Domain dataset group use cases)\n for this domain are included in the response. If you don't specify a domain, only non-domain recipes are returned.\n
" + } } } }, @@ -4442,6 +5056,73 @@ } } }, + "com.amazonaws.personalize#ListRecommenders": { + "type": "operation", + "input": { + "target": "com.amazonaws.personalize#ListRecommendersRequest" + }, + "output": { + "target": "com.amazonaws.personalize#ListRecommendersResponse" + }, + "errors": [ + { + "target": "com.amazonaws.personalize#InvalidInputException" + }, + { + "target": "com.amazonaws.personalize#InvalidNextTokenException" + } + ], + "traits": { + "smithy.api#documentation": "Returns a list of recommenders in a given Domain dataset group.\n When a Domain dataset group is not specified, all the recommenders associated with the account are listed.\n The response provides the properties for each recommender, including the Amazon Resource Name (ARN).\n For more information on recommenders, see CreateRecommender.
", + "smithy.api#idempotent": {}, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "recommenders", + "pageSize": "maxResults" + } + } + }, + "com.amazonaws.personalize#ListRecommendersRequest": { + "type": "structure", + "members": { + "datasetGroupArn": { + "target": "com.amazonaws.personalize#Arn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the Domain dataset group to list the recommenders for. When\n a Domain dataset group is not specified, all the recommenders associated with the account are listed.
" + } + }, + "nextToken": { + "target": "com.amazonaws.personalize#NextToken", + "traits": { + "smithy.api#documentation": "A token returned from the previous call to ListRecommenders
for getting\n the next set of recommenders (if they exist).
The maximum number of recommenders to return.
" + } + } + } + }, + "com.amazonaws.personalize#ListRecommendersResponse": { + "type": "structure", + "members": { + "recommenders": { + "target": "com.amazonaws.personalize#Recommenders", + "traits": { + "smithy.api#documentation": "A list of the recommenders.
" + } + }, + "nextToken": { + "target": "com.amazonaws.personalize#NextToken", + "traits": { + "smithy.api#documentation": "A token for getting the next set of recommenders (if they exist).
" + } + } + } + }, "com.amazonaws.personalize#ListSchemas": { "type": "operation", "input": { @@ -4698,7 +5379,7 @@ "traits": { "smithy.api#length": { "min": 0, - "max": 1300 + "max": 1500 } } }, @@ -4880,6 +5561,12 @@ "traits": { "smithy.api#documentation": "The date and time (in Unix time) that the recipe was last updated.
" } + }, + "domain": { + "target": "com.amazonaws.personalize#Domain", + "traits": { + "smithy.api#documentation": "The domain of the recipe (if the recipe is a Domain dataset group use case).
" + } } }, "traits": { @@ -4907,6 +5594,194 @@ } } }, + "com.amazonaws.personalize#Recommender": { + "type": "structure", + "members": { + "recommenderArn": { + "target": "com.amazonaws.personalize#Arn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the recommender.
" + } + }, + "datasetGroupArn": { + "target": "com.amazonaws.personalize#Arn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the Domain dataset group that contains the recommender.
" + } + }, + "name": { + "target": "com.amazonaws.personalize#Name", + "traits": { + "smithy.api#documentation": "The name of the recommender.
" + } + }, + "recipeArn": { + "target": "com.amazonaws.personalize#Arn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the recipe (Domain dataset group use case) that the recommender was created for.\n
" + } + }, + "recommenderConfig": { + "target": "com.amazonaws.personalize#RecommenderConfig", + "traits": { + "smithy.api#documentation": "The configuration details of the recommender.
" + } + }, + "creationDateTime": { + "target": "com.amazonaws.personalize#Date", + "traits": { + "smithy.api#documentation": "The date and time (in Unix format) that the recommender was created.
" + } + }, + "lastUpdatedDateTime": { + "target": "com.amazonaws.personalize#Date", + "traits": { + "smithy.api#documentation": "The date and time (in Unix format) that the recommender was last updated.
" + } + }, + "status": { + "target": "com.amazonaws.personalize#Status", + "traits": { + "smithy.api#documentation": "The status of the recommender.
\nA recommender can be in one of the following states:
\nCREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
\nDELETE PENDING > DELETE IN_PROGRESS
\nIf a recommender fails, the reason behind the failure.
" + } + }, + "latestRecommenderUpdate": { + "target": "com.amazonaws.personalize#RecommenderUpdateSummary", + "traits": { + "smithy.api#documentation": "Provides a summary of the latest updates to the recommender.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Describes a recommendation generator for a Domain dataset group. You create a recommender in a Domain dataset group\n for a specific domain use case (domain recipe), and specify the recommender in a GetRecommendations request.
" + } + }, + "com.amazonaws.personalize#RecommenderConfig": { + "type": "structure", + "members": { + "itemExplorationConfig": { + "target": "com.amazonaws.personalize#HyperParameters", + "traits": { + "smithy.api#documentation": "Specifies the exploration configuration hyperparameters, including explorationWeight
and \n explorationItemAgeCutOff
, you want to use to configure the amount of item exploration Amazon Personalize uses when\n recommending items. Provide itemExplorationConfig
data only if your recommenders generate personalized recommendations for a user\n (not popular items or similar items).
The configuration details of the recommender.
" + } + }, + "com.amazonaws.personalize#RecommenderSummary": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.personalize#Name", + "traits": { + "smithy.api#documentation": "The name of the recommender.
" + } + }, + "recommenderArn": { + "target": "com.amazonaws.personalize#Arn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the recommender.
" + } + }, + "datasetGroupArn": { + "target": "com.amazonaws.personalize#Arn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the Domain dataset group that contains the recommender.
" + } + }, + "recipeArn": { + "target": "com.amazonaws.personalize#Arn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the recipe (Domain dataset group use case) that the recommender was created for.
" + } + }, + "recommenderConfig": { + "target": "com.amazonaws.personalize#RecommenderConfig", + "traits": { + "smithy.api#documentation": "The configuration details of the recommender.
" + } + }, + "status": { + "target": "com.amazonaws.personalize#Status", + "traits": { + "smithy.api#documentation": "The status of the recommender. A recommender can be in one of the following states:
\nCREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
\nDELETE PENDING > DELETE IN_PROGRESS
\nThe date and time (in Unix format) that the recommender was created.
" + } + }, + "lastUpdatedDateTime": { + "target": "com.amazonaws.personalize#Date", + "traits": { + "smithy.api#documentation": "The date and time (in Unix format) that the recommender was last updated.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Provides a summary of the properties of the recommender.
" + } + }, + "com.amazonaws.personalize#RecommenderUpdateSummary": { + "type": "structure", + "members": { + "recommenderConfig": { + "target": "com.amazonaws.personalize#RecommenderConfig", + "traits": { + "smithy.api#documentation": "The configuration details of the recommender update.
" + } + }, + "creationDateTime": { + "target": "com.amazonaws.personalize#Date", + "traits": { + "smithy.api#documentation": "The date and time (in Unix format) that the recommender update was created.
" + } + }, + "lastUpdatedDateTime": { + "target": "com.amazonaws.personalize#Date", + "traits": { + "smithy.api#documentation": "The date and time (in Unix time) that the recommender update was last updated.
" + } + }, + "status": { + "target": "com.amazonaws.personalize#Status", + "traits": { + "smithy.api#documentation": "The status of the recommender update.
\nA recommender can be in one of the following states:
\nCREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
\nDELETE PENDING > DELETE IN_PROGRESS
\nIf a recommender update fails, the reason behind the failure.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Provides a summary of the properties of a recommender update. For a complete listing, call the\n DescribeRecommender API.
" + } + }, + "com.amazonaws.personalize#Recommenders": { + "type": "list", + "member": { + "target": "com.amazonaws.personalize#RecommenderSummary" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, "com.amazonaws.personalize#ResourceAlreadyExistsException": { "type": "structure", "members": { @@ -5277,7 +6152,7 @@ } }, "traits": { - "smithy.api#documentation": "An object that provides information about a specific version of a Solution.
" + "smithy.api#documentation": "An object that provides information about a specific version of a Solution in a Custom dataset group.
" } }, "com.amazonaws.personalize#SolutionVersionSummary": { @@ -5516,6 +6391,60 @@ } } } + }, + "com.amazonaws.personalize#UpdateRecommender": { + "type": "operation", + "input": { + "target": "com.amazonaws.personalize#UpdateRecommenderRequest" + }, + "output": { + "target": "com.amazonaws.personalize#UpdateRecommenderResponse" + }, + "errors": [ + { + "target": "com.amazonaws.personalize#InvalidInputException" + }, + { + "target": "com.amazonaws.personalize#ResourceInUseException" + }, + { + "target": "com.amazonaws.personalize#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "Updates the recommender to modify the recommender configuration.
", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.personalize#UpdateRecommenderRequest": { + "type": "structure", + "members": { + "recommenderArn": { + "target": "com.amazonaws.personalize#Arn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the recommender to modify.
", + "smithy.api#required": {} + } + }, + "recommenderConfig": { + "target": "com.amazonaws.personalize#RecommenderConfig", + "traits": { + "smithy.api#documentation": "The configuration details of the recommender.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.personalize#UpdateRecommenderResponse": { + "type": "structure", + "members": { + "recommenderArn": { + "target": "com.amazonaws.personalize#Arn", + "traits": { + "smithy.api#documentation": "The same recommender Amazon Resource Name (ARN) as given in the request.
" + } + } + } } } } diff --git a/codegen/sdk-codegen/aws-models/personalizeruntime.2018-05-22.json b/codegen/sdk-codegen/aws-models/personalizeruntime.2018-05-22.json index a6aad5c9f27..77157277432 100644 --- a/codegen/sdk-codegen/aws-models/personalizeruntime.2018-05-22.json +++ b/codegen/sdk-codegen/aws-models/personalizeruntime.2018-05-22.json @@ -31,15 +31,6 @@ "shapes": { "com.amazonaws.personalizeruntime#AmazonPersonalizeRuntime": { "type": "service", - "version": "2018-05-22", - "operations": [ - { - "target": "com.amazonaws.personalizeruntime#GetPersonalizedRanking" - }, - { - "target": "com.amazonaws.personalizeruntime#GetRecommendations" - } - ], "traits": { "aws.api#service": { "sdkId": "Personalize Runtime", @@ -54,7 +45,16 @@ "aws.protocols#restJson1": {}, "smithy.api#documentation": "", "smithy.api#title": "Amazon Personalize Runtime" - } + }, + "version": "2018-05-22", + "operations": [ + { + "target": "com.amazonaws.personalizeruntime#GetPersonalizedRanking" + }, + { + "target": "com.amazonaws.personalizeruntime#GetRecommendations" + } + ] }, "com.amazonaws.personalizeruntime#Arn": { "type": "string", @@ -63,7 +63,7 @@ "min": 0, "max": 256 }, - "smithy.api#pattern": "arn:([a-z\\d-]+):personalize:.*:.*:.+" + "smithy.api#pattern": "^arn:([a-z\\d-]+):personalize:.*:.*:.+$" } }, "com.amazonaws.personalizeruntime#AttributeName": { @@ -73,7 +73,7 @@ "min": 0, "max": 150 }, - "smithy.api#pattern": "[A-Za-z\\d_]+" + "smithy.api#pattern": "^[A-Za-z\\d_]+$" } }, "com.amazonaws.personalizeruntime#AttributeValue": { @@ -111,7 +111,7 @@ "min": 0, "max": 50 }, - "smithy.api#pattern": "[A-Za-z0-9_]+" + "smithy.api#pattern": "^[A-Za-z0-9_]+$" } }, "com.amazonaws.personalizeruntime#FilterAttributeValue": { @@ -243,7 +243,7 @@ } ], "traits": { - "smithy.api#documentation": "Returns a list of recommended items. The required input depends on the recipe type used to\n create the solution backing the campaign, as follows:
\nRELATED_ITEMS - itemId
required, userId
not used
USER_PERSONALIZATION - itemId
optional, userId
\n required
Campaigns that are backed by a solution created using a recipe of type\n PERSONALIZED_RANKING use the API.
\nReturns a list of recommended items. For campaigns, the campaign's Amazon Resource Name (ARN) is required and the required user and item input depends on the recipe type used to\n create the solution backing the campaign as follows:
\nUSER_PERSONALIZATION - userId
required, itemId
not used
RELATED_ITEMS - itemId
required, userId
not used
Campaigns that are backed by a solution created using a recipe of type\n PERSONALIZED_RANKING use the API.
\n\n For recommenders, the recommender's ARN is required and the required item and user input depends on the use case (domain-based recipe) backing the recommender.\n For information on use case requirements see Choosing recommender use cases.\n
", "smithy.api#http": { "method": "POST", "uri": "/recommendations", @@ -258,8 +258,7 @@ "campaignArn": { "target": "com.amazonaws.personalizeruntime#Arn", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) of the campaign to use for getting recommendations.
", - "smithy.api#required": {} + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the campaign to use for getting recommendations.
" } }, "itemId": { @@ -297,6 +296,12 @@ "traits": { "smithy.api#documentation": "The values to use when filtering recommendations. For each placeholder parameter in your filter expression, provide the parameter name (in matching case)\n as a key and the filter value(s) as the corresponding value. Separate multiple values for one parameter with a comma.\n
\nFor filter expressions that use an INCLUDE
element to include items,\n you must provide values for all parameters that are defined in the expression. For\n filters with expressions that use an EXCLUDE
element to exclude items, you\n can omit the filter-values
.In this case, Amazon Personalize doesn't use that portion of\n the expression to filter recommendations.
For more information, see\n Filtering Recommendations.
" } + }, + "recommenderArn": { + "target": "com.amazonaws.personalizeruntime#Arn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the recommender to use to get recommendations. Provide a recommender ARN if you\n created a Domain dataset group with a recommender for a domain use case.
" + } } } }, @@ -306,7 +311,7 @@ "itemList": { "target": "com.amazonaws.personalizeruntime#ItemList", "traits": { - "smithy.api#documentation": "A list of recommendations sorted in ascending order by prediction score. There can be a\n maximum of 500 items in the list.
" + "smithy.api#documentation": "A list of recommendations sorted in descending order by prediction score. There can be a\n maximum of 500 items in the list.
" } }, "recommendationId": { diff --git a/codegen/sdk-codegen/aws-models/pinpoint.2016-12-01.json b/codegen/sdk-codegen/aws-models/pinpoint.2016-12-01.json index 9419a9f8d62..1984fc1cbfa 100644 --- a/codegen/sdk-codegen/aws-models/pinpoint.2016-12-01.json +++ b/codegen/sdk-codegen/aws-models/pinpoint.2016-12-01.json @@ -12951,6 +12951,21 @@ }, "com.amazonaws.pinpoint#Pinpoint": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "Pinpoint", + "arnNamespace": "mobiletargeting", + "cloudFormationName": "Pinpoint", + "cloudTrailEventSource": "pinpoint.amazonaws.com", + "endpointPrefix": "pinpoint" + }, + "aws.auth#sigv4": { + "name": "mobiletargeting" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "Doc Engage API - Amazon Pinpoint API
", + "smithy.api#title": "Amazon Pinpoint" + }, "version": "2016-12-01", "operations": [ { @@ -13223,6 +13238,9 @@ { "target": "com.amazonaws.pinpoint#SendMessages" }, + { + "target": "com.amazonaws.pinpoint#SendOTPMessage" + }, { "target": "com.amazonaws.pinpoint#SendUsersMessages" }, @@ -13303,23 +13321,11 @@ }, { "target": "com.amazonaws.pinpoint#UpdateVoiceTemplate" - } - ], - "traits": { - "aws.api#service": { - "sdkId": "Pinpoint", - "arnNamespace": "mobiletargeting", - "cloudFormationName": "Pinpoint", - "cloudTrailEventSource": "pinpoint.amazonaws.com", - "endpointPrefix": "pinpoint" }, - "aws.auth#sigv4": { - "name": "mobiletargeting" - }, - "aws.protocols#restJson1": {}, - "smithy.api#documentation": "Doc Engage API - Amazon Pinpoint API
", - "smithy.api#title": "Amazon Pinpoint" - } + { + "target": "com.amazonaws.pinpoint#VerifyOTPMessage" + } + ] }, "com.amazonaws.pinpoint#PublicEndpoint": { "type": "structure", @@ -14893,6 +14899,157 @@ } } }, + "com.amazonaws.pinpoint#SendOTPMessage": { + "type": "operation", + "input": { + "target": "com.amazonaws.pinpoint#SendOTPMessageRequest" + }, + "output": { + "target": "com.amazonaws.pinpoint#SendOTPMessageResponse" + }, + "errors": [ + { + "target": "com.amazonaws.pinpoint#BadRequestException" + }, + { + "target": "com.amazonaws.pinpoint#ForbiddenException" + }, + { + "target": "com.amazonaws.pinpoint#InternalServerErrorException" + }, + { + "target": "com.amazonaws.pinpoint#MethodNotAllowedException" + }, + { + "target": "com.amazonaws.pinpoint#NotFoundException" + }, + { + "target": "com.amazonaws.pinpoint#PayloadTooLargeException" + }, + { + "target": "com.amazonaws.pinpoint#TooManyRequestsException" + } + ], + "traits": { + "smithy.api#documentation": "Send an OTP message
", + "smithy.api#http": { + "method": "POST", + "uri": "/v1/apps/{ApplicationId}/otp", + "code": 200 + } + } + }, + "com.amazonaws.pinpoint#SendOTPMessageRequest": { + "type": "structure", + "members": { + "ApplicationId": { + "target": "com.amazonaws.pinpoint#__string", + "traits": { + "smithy.api#documentation": "The unique ID of your Amazon Pinpoint application.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "SendOTPMessageRequestParameters": { + "target": "com.amazonaws.pinpoint#SendOTPMessageRequestParameters", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.pinpoint#SendOTPMessageRequestParameters": { + "type": "structure", + "members": { + "AllowedAttempts": { + "target": "com.amazonaws.pinpoint#__integer", + "traits": { + "smithy.api#documentation": "The attempts allowed to validate an OTP.
" + } + }, + "BrandName": { + "target": "com.amazonaws.pinpoint#__string", + "traits": { + "smithy.api#documentation": "The brand name that will be substituted into the OTP message body. Should be owned by calling AWS account.
", + "smithy.api#required": {} + } + }, + "Channel": { + "target": "com.amazonaws.pinpoint#__string", + "traits": { + "smithy.api#documentation": "Channel type for the OTP message. Supported values: [SMS].
", + "smithy.api#required": {} + } + }, + "CodeLength": { + "target": "com.amazonaws.pinpoint#__integer", + "traits": { + "smithy.api#documentation": "The number of characters in the generated OTP.
" + } + }, + "DestinationIdentity": { + "target": "com.amazonaws.pinpoint#__string", + "traits": { + "smithy.api#documentation": "The destination identity to send OTP to.
", + "smithy.api#required": {} + } + }, + "EntityId": { + "target": "com.amazonaws.pinpoint#__string", + "traits": { + "smithy.api#documentation": "A unique Entity ID received from DLT after entity registration is approved.
" + } + }, + "Language": { + "target": "com.amazonaws.pinpoint#__string", + "traits": { + "smithy.api#documentation": "The language to be used for the outgoing message body containing the OTP.
" + } + }, + "OriginationIdentity": { + "target": "com.amazonaws.pinpoint#__string", + "traits": { + "smithy.api#documentation": "The origination identity used to send OTP from.
", + "smithy.api#required": {} + } + }, + "ReferenceId": { + "target": "com.amazonaws.pinpoint#__string", + "traits": { + "smithy.api#documentation": "Developer-specified reference identifier. Required to match during OTP verification.
", + "smithy.api#required": {} + } + }, + "TemplateId": { + "target": "com.amazonaws.pinpoint#__string", + "traits": { + "smithy.api#documentation": "A unique Template ID received from DLT after entity registration is approved.
" + } + }, + "ValidityPeriod": { + "target": "com.amazonaws.pinpoint#__integer", + "traits": { + "smithy.api#documentation": "The time in minutes before the OTP is no longer valid.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Send OTP message request parameters.
" + } + }, + "com.amazonaws.pinpoint#SendOTPMessageResponse": { + "type": "structure", + "members": { + "MessageResponse": { + "target": "com.amazonaws.pinpoint#MessageResponse", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + } + }, "com.amazonaws.pinpoint#SendUsersMessageRequest": { "type": "structure", "members": { @@ -17645,6 +17802,121 @@ } } }, + "com.amazonaws.pinpoint#VerificationResponse": { + "type": "structure", + "members": { + "Valid": { + "target": "com.amazonaws.pinpoint#__boolean", + "traits": { + "smithy.api#documentation": "Specifies whether the OTP is valid or not.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Verify OTP Message Response.
" + } + }, + "com.amazonaws.pinpoint#VerifyOTPMessage": { + "type": "operation", + "input": { + "target": "com.amazonaws.pinpoint#VerifyOTPMessageRequest" + }, + "output": { + "target": "com.amazonaws.pinpoint#VerifyOTPMessageResponse" + }, + "errors": [ + { + "target": "com.amazonaws.pinpoint#BadRequestException" + }, + { + "target": "com.amazonaws.pinpoint#ForbiddenException" + }, + { + "target": "com.amazonaws.pinpoint#InternalServerErrorException" + }, + { + "target": "com.amazonaws.pinpoint#MethodNotAllowedException" + }, + { + "target": "com.amazonaws.pinpoint#NotFoundException" + }, + { + "target": "com.amazonaws.pinpoint#PayloadTooLargeException" + }, + { + "target": "com.amazonaws.pinpoint#TooManyRequestsException" + } + ], + "traits": { + "smithy.api#documentation": "Verify an OTP
", + "smithy.api#http": { + "method": "POST", + "uri": "/v1/apps/{ApplicationId}/verify-otp", + "code": 200 + } + } + }, + "com.amazonaws.pinpoint#VerifyOTPMessageRequest": { + "type": "structure", + "members": { + "ApplicationId": { + "target": "com.amazonaws.pinpoint#__string", + "traits": { + "smithy.api#documentation": "The unique ID of your Amazon Pinpoint application.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "VerifyOTPMessageRequestParameters": { + "target": "com.amazonaws.pinpoint#VerifyOTPMessageRequestParameters", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.pinpoint#VerifyOTPMessageRequestParameters": { + "type": "structure", + "members": { + "DestinationIdentity": { + "target": "com.amazonaws.pinpoint#__string", + "traits": { + "smithy.api#documentation": "The destination identity to send OTP to.
", + "smithy.api#required": {} + } + }, + "Otp": { + "target": "com.amazonaws.pinpoint#__string", + "traits": { + "smithy.api#documentation": "The OTP the end user provided for verification.
", + "smithy.api#required": {} + } + }, + "ReferenceId": { + "target": "com.amazonaws.pinpoint#__string", + "traits": { + "smithy.api#documentation": "The reference identifier provided when the OTP was previously sent.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Verify OTP message request.
" + } + }, + "com.amazonaws.pinpoint#VerifyOTPMessageResponse": { + "type": "structure", + "members": { + "VerificationResponse": { + "target": "com.amazonaws.pinpoint#VerificationResponse", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + } + }, "com.amazonaws.pinpoint#VoiceChannelRequest": { "type": "structure", "members": { diff --git a/codegen/sdk-codegen/aws-models/proton.2020-07-20.json b/codegen/sdk-codegen/aws-models/proton.2020-07-20.json index e34937c4657..6e44d21c409 100644 --- a/codegen/sdk-codegen/aws-models/proton.2020-07-20.json +++ b/codegen/sdk-codegen/aws-models/proton.2020-07-20.json @@ -30,7 +30,7 @@ } ], "traits": { - "smithy.api#documentation": "In a management account, an environment account connection request is accepted. When the environment account connection request is\n accepted, AWS Proton can use the associated IAM role to provision environment infrastructure resources in the associated environment\n account.
\nFor more information, see Environment account\n connections in the AWS Proton Administrator guide.
", + "smithy.api#documentation": "In a management account, an environment account connection request is accepted. When the environment account connection request is accepted,\n Proton can use the associated IAM role to provision environment infrastructure resources in the associated environment account.
\nFor more information, see Environment account\n connections in the Proton Administrator guide.
", "smithy.api#idempotent": {} } }, @@ -59,7 +59,7 @@ "environmentAccountConnection": { "target": "com.amazonaws.proton#EnvironmentAccountConnection", "traits": { - "smithy.api#documentation": "The environment account connection data that's returned by AWS Proton.
", + "smithy.api#documentation": "The environment account connection data that's returned by Proton.
", "smithy.api#required": {} } } @@ -85,14 +85,20 @@ "type": "structure", "members": { "pipelineServiceRoleArn": { - "target": "com.amazonaws.proton#Arn", + "target": "com.amazonaws.proton#PipelineRoleArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the Proton pipeline service role.
" + } + }, + "pipelineProvisioningRepository": { + "target": "com.amazonaws.proton#RepositoryBranch", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) of the AWS Proton pipeline service role.
" + "smithy.api#documentation": "The repository that you provide with pull request provisioning.
\nProvisioning by pull request is currently in feature preview and is\n only usable with Terraform based Proton Templates. To learn more about\n Amazon Web Services Feature Preview terms, see section 2 on Beta and\n Previews.
\nThe AWS Proton pipeline service role data.
" + "smithy.api#documentation": "The Proton pipeline service role and repository data.
" } }, "com.amazonaws.proton#AccountSettingsResource": { @@ -121,6 +127,21 @@ }, "com.amazonaws.proton#AwsProton20200720": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "Proton", + "arnNamespace": "awsproton20200720", + "cloudFormationName": "AwsProton20200720", + "cloudTrailEventSource": "awsproton20200720.amazonaws.com", + "endpointPrefix": "proton" + }, + "aws.auth#sigv4": { + "name": "proton" + }, + "aws.protocols#awsJson1_0": {}, + "smithy.api#documentation": "This is the Proton Service API Reference. It provides descriptions, syntax and usage examples for each of the\n actions and data types for the Proton\n service.
\nThe documentation for each action shows the Query API request parameters and the XML response.
\nAlternatively, you can use the Amazon Web Services CLI to access an API. For more information, see the Amazon Web Services Command Line Interface User\n Guide.
\nThe Proton service is a two-pronged automation framework. Administrators create service templates to provide\n standardized infrastructure and deployment tooling for serverless and container based applications. Developers, in\n turn, select from the available service templates to automate their application or service deployments.
\nBecause administrators define the infrastructure and tooling that Proton deploys and manages, they need\n permissions to use all of the listed API operations.
\nWhen developers select a specific infrastructure and tooling set, Proton deploys their applications. To\n monitor their applications that are running on Proton, developers need permissions to the service\n create, list, update and delete\n API operations and the service instance list and update API\n operations.
\nTo learn more about Proton administration, see the Proton Administrator Guide.
\nTo learn more about deploying serverless and containerized applications on Proton, see the Proton User Guide.
\n\n Ensuring Idempotency\n
\nWhen you make a mutating API request, the request typically returns a result before the asynchronous workflows\n of the operation are complete. Operations might also time out or encounter other server issues before they're\n complete, even if the request already returned a result. This might make it difficult to determine whether the\n request succeeded. Moreover, you might need to retry the request multiple times to ensure that the operation\n completes successfully. However, if the original request and the subsequent retries are successful, the operation\n occurs multiple times. This means that you might create more resources than you intended.
\n\n Idempotency ensures that an API request action completes no more than one time. With an\n idempotent request, if the original request action completes successfully, any subsequent retries complete\n successfully without performing any further actions. However, the result might contain updated information, such as\n the current creation status.
\nThe following lists of APIs are grouped according to methods that ensure idempotency.
\n\n Idempotent create APIs with a client token\n
\nThe API actions in this list support idempotency with the use of a client token. The\n corresponding Amazon Web Services CLI commands also support idempotency using a client token. A client token is a unique,\n case-sensitive string of up to 64 ASCII characters. To make an idempotent API request using one of these actions,\n specify a client token in the request. We recommend that you don't reuse the same client token\n for other API requests. If you don’t provide a client token for these APIs, a default client token is automatically\n provided by SDKs.
\nGiven a request action that has succeeded:
\nIf you retry the request using the same client token and the same parameters, the retry succeeds without\n performing any further actions other than returning the original resource detail data in the response.
\nIf you retry the request using the same client token, but one or more of the parameters are different, the retry\n throws a ValidationException
with an IdempotentParameterMismatch
error.
Client tokens expire eight hours after a request is made. If you retry the request with the expired token, a new\n resource is created.
\nIf the original resource is deleted and you retry the request, a new resource is created.
\nIdempotent create APIs with a client token:
\nCreateEnvironmentTemplateVersion
\nCreateServiceTemplateVersion
\nCreateEnvironmentAccountConnection
\n\n Idempotent create APIs\n
\nGiven a request action that has succeeded:
\nIf you retry the request with an API from this group, and the original resource hasn't been\n modified, the retry succeeds without performing any further actions other than returning the original resource detail\n data in the response.
\nIf the original resource has been modified, the retry throws a ConflictException
.
If you retry with different input parameters, the retry throws a ValidationException
with an\n IdempotentParameterMismatch
error.
Idempotent create APIs:
\nCreateEnvironmentTemplate
\nCreateServiceTemplate
\nCreateEnvironment
\nCreateService
\n\n Idempotent delete APIs\n
\nGiven a request action that has succeeded:
\nWhen you retry the request with an API from this group and the resource was deleted, its metadata is returned in\n the response.
\nIf you retry and the resource doesn't exist, the response is empty.
\nIn both cases, the retry succeeds.
\nIdempotent delete APIs:
\nDeleteEnvironmentTemplate
\nDeleteEnvironmentTemplateVersion
\nDeleteServiceTemplate
\nDeleteServiceTemplateVersion
\nDeleteEnvironmentAccountConnection
\n\n Asynchronous idempotent delete APIs\n
\nGiven a request action that has succeeded:
\nIf you retry the request with an API from this group, if the original request delete operation status is\n DELETE_IN_PROGRESS
, the retry returns the resource detail data in the response without performing any\n further actions.
If the original request delete operation is complete, a retry returns an empty response.
\nAsynchronous idempotent delete APIs:
\nDeleteEnvironment
\nDeleteService
\nThis is the AWS Proton Service API Reference. It provides descriptions, syntax and usage examples for each of the actions and data types for the AWS Proton service.
\nThe documentation for each action shows the Query API request parameters and the XML response.
\nAlternatively, you can use the AWS CLI to access an API. For more information, see the AWS Command Line Interface User Guide.
\nThe AWS Proton service is a two-pronged automation framework. Administrators create service templates to provide standardized\n infrastructure and deployment tooling for serverless and container based applications. Developers, in turn, select from the available\n service templates to automate their application or service deployments.
\nBecause administrators define the infrastructure and tooling that AWS Proton deploys and manages, they need permissions to use all of the\n listed API operations.
\nWhen developers select a specific infrastructure and tooling set, AWS Proton deploys their applications. To monitor their applications\n that are running on AWS Proton, developers need permissions to the service create, list,\n update and delete API operations and the service instance list and\n update API operations.
\nTo learn more about AWS Proton administration, see the AWS Proton\n Administrator Guide.
\nTo learn more about deploying serverless and containerized applications on AWS Proton, see the AWS Proton User Guide.
\n\n Ensuring Idempotency\n
\nWhen you make a mutating API request, the request typically returns a result before the asynchronous workflows of the operation are\n complete. Operations might also time out or encounter other server issues before they're complete, even if the request already returned a\n result. This might make it difficult to determine whether the request succeeded. Moreover, you might need to retry the request multiple\n times to ensure that the operation completes successfully. However, if the original request and the subsequent retries are successful, the\n operation occurs multiple times. This means that you might create more resources than you intended.
\n\n Idempotency ensures that an API request action completes no more than one time. With an idempotent request, if the\n original request action completes successfully, any subsequent retries complete successfully without performing any further actions.\n However, the result might contain updated information, such as the current creation status.
\nThe following lists of APIs are grouped according to methods that ensure idempotency.
\n\n Idempotent create APIs with a client token\n
\nThe API actions in this list support idempotency with the use of a client token. The corresponding AWS CLI\n commands also support idempotency using a client token. A client token is a unique, case-sensitive string of up to 64 ASCII characters. To\n make an idempotent API request using one of these actions, specify a client token in the request. We recommend that you\n don't reuse the same client token for other API requests. If you don’t provide a client token for these APIs, a\n default client token is automatically provided by SDKs.
\nGiven a request action that has succeeded:
\nIf you retry the request using the same client token and the same parameters, the retry succeeds without performing any further actions\n other than returning the original resource detail data in the response.
\nIf you retry the request using the same client token, but one or more of the parameters are different, the retry throws a\n ValidationException
with an IdempotentParameterMismatch
error.
Client tokens expire eight hours after a request is made. If you retry the request with the expired token, a new resource is\n created.
\nIf the original resource is deleted and you retry the request, a new resource is created.
\nIdempotent create APIs with a client token:
\nCreateEnvironmentTemplateVersion
\nCreateServiceTemplateVersion
\nCreateEnvironmentAccountConnection
\n\n Idempotent create APIs\n
\nGiven a request action that has succeeded:
\nIf you retry the request with an API from this group, and the original resource hasn't been modified, the retry\n succeeds without performing any further actions other than returning the original resource detail data in the response.
\nIf the original resource has been modified, the retry throws a ConflictException
.
If you retry with different input parameters, the retry throws a ValidationException
with an\n IdempotentParameterMismatch
error.
Idempotent create APIs:
\nCreateEnvironmentTemplate
\nCreateServiceTemplate
\nCreateEnvironment
\nCreateService
\n\n Idempotent delete APIs\n
\nGiven a request action that has succeeded:
\nWhen you retry the request with an API from this group and the resource was deleted, its metadata is returned in the response.
\nIf you retry and the resource doesn't exist, the response is empty.
\nIn both cases, the retry succeeds.
\nIdempotent delete APIs:
\nDeleteEnvironmentTemplate
\nDeleteEnvironmentTemplateVersion
\nDeleteServiceTemplate
\nDeleteServiceTemplateVersion
\nDeleteEnvironmentAccountConnection
\n\n Asynchronous idempotent delete APIs\n
\nGiven a request action that has succeeded:
\nIf you retry the request with an API from this group, if the original request delete operation status is\n DELETE_IN_PROGRESS
, the retry returns the resource detail data in the response without performing any further actions.
If the original request delete operation is complete, a retry returns an empty response.
\nAsynchronous idempotent delete APIs:
\nDeleteEnvironment
\nDeleteService
\nAttempts to cancel an environment deployment on an UpdateEnvironment action, if the deployment is\n IN_PROGRESS
. For more information, see Update an environment in the AWS Proton Administrator guide.
The following list includes potential cancellation scenarios.
\nIf the cancellation attempt succeeds, the resulting deployment state is CANCELLED
.
If the cancellation attempt fails, the resulting deployment state is FAILED
.
If the current UpdateEnvironment action succeeds before the cancellation attempt starts, the resulting\n deployment state is SUCCEEDED
and the cancellation attempt has no effect.
Attempts to cancel an environment deployment on an UpdateEnvironment action, if the deployment is IN_PROGRESS
.\n For more information, see Update an environment in the\n Proton Administrator guide.
The following list includes potential cancellation scenarios.
\nIf the cancellation attempt succeeds, the resulting deployment state is CANCELLED
.
If the cancellation attempt fails, the resulting deployment state is FAILED
.
If the current UpdateEnvironment action succeeds before the cancellation attempt starts, the resulting deployment state is\n SUCCEEDED
and the cancellation attempt has no effect.
The environment summary data that's returned by AWS Proton.
", + "smithy.api#documentation": "The environment summary data that's returned by Proton.
", "smithy.api#required": {} } } @@ -285,7 +327,7 @@ } ], "traits": { - "smithy.api#documentation": "Attempts to cancel a service instance deployment on an UpdateServiceInstance action, if the deployment is\n IN_PROGRESS
. For more information, see Update a service instance in the AWS Proton Administrator guide or the AWS Proton User guide.
The following list includes potential cancellation scenarios.
\nIf the cancellation attempt succeeds, the resulting deployment state is CANCELLED
.
If the cancellation attempt fails, the resulting deployment state is FAILED
.
If the current UpdateServiceInstance action succeeds before the cancellation attempt starts, the resulting\n deployment state is SUCCEEDED
and the cancellation attempt has no effect.
Attempts to cancel a service instance deployment on an UpdateServiceInstance action, if the deployment is\n IN_PROGRESS
. For more information, see Update a service instance in the Proton Administrator guide or the Proton User guide.
The following list includes potential cancellation scenarios.
\nIf the cancellation attempt succeeds, the resulting deployment state is CANCELLED
.
If the cancellation attempt fails, the resulting deployment state is FAILED
.
If the current UpdateServiceInstance action succeeds before the cancellation attempt starts, the resulting deployment\n state is SUCCEEDED
and the cancellation attempt has no effect.
The service instance summary data that's returned by AWS Proton.
", + "smithy.api#documentation": "The service instance summary data that's returned by Proton.
", "smithy.api#required": {} } } @@ -359,7 +401,7 @@ } ], "traits": { - "smithy.api#documentation": "Attempts to cancel a service pipeline deployment on an UpdateServicePipeline action, if the deployment is\n IN_PROGRESS
. For more information, see Update a service pipeline in the AWS Proton Administrator guide or the AWS Proton User guide.
The following list includes potential cancellation scenarios.
\nIf the cancellation attempt succeeds, the resulting deployment state is CANCELLED
.
If the cancellation attempt fails, the resulting deployment state is FAILED
.
If the current UpdateServicePipeline action succeeds before the cancellation attempt starts, the resulting\n deployment state is SUCCEEDED
and the cancellation attempt has no effect.
Attempts to cancel a service pipeline deployment on an UpdateServicePipeline action, if the deployment is\n IN_PROGRESS
. For more information, see Update a service pipeline in the Proton Administrator guide or the Proton User guide.
The following list includes potential cancellation scenarios.
\nIf the cancellation attempt succeeds, the resulting deployment state is CANCELLED
.
If the cancellation attempt fails, the resulting deployment state is FAILED
.
If the current UpdateServicePipeline action succeeds before the cancellation attempt starts, the resulting deployment\n state is SUCCEEDED
and the cancellation attempt has no effect.
The service pipeline detail data that's returned by AWS Proton.
", + "smithy.api#documentation": "The service pipeline detail data that's returned by Proton.
", "smithy.api#required": {} } } @@ -515,7 +557,7 @@ } ], "traits": { - "smithy.api#documentation": "Deploy a new environment. An AWS Proton environment is created from an environment template that defines infrastructure and resources\n that can be shared across services. For more information, see the Environments in the AWS Proton Administrator\n Guide.\n
", + "smithy.api#documentation": "Deploy a new environment. An Proton environment is created from an environment template that defines infrastructure and resources that can\n be shared across services.
\n\n You can provision environments using the following methods:\n
\nStandard provisioning: Proton makes direct calls to provision your resources.
\nPull request provisioning: Proton makes pull requests on your repository to provide compiled infrastructure as code (IaC) files that your\n IaC engine uses to provision resources.
\nFor more information, see the Environments in the\n Proton Administrator Guide.\n
", "smithy.api#idempotent": {} } }, @@ -548,7 +590,7 @@ } ], "traits": { - "smithy.api#documentation": "Create an environment account connection in an environment account so that environment infrastructure resources can be provisioned in\n the environment account from a management account.
\nAn environment account connection is a secure bi-directional connection between a management account and an\n environment account that maintains authorization and permissions. For more information, see Environment account connections in the\n AWS Proton Administrator guide.
", + "smithy.api#documentation": "Create an environment account connection in an environment account so that environment infrastructure resources can be provisioned in the\n environment account from a management account.
\nAn environment account connection is a secure bi-directional connection between a management account and an\n environment account that maintains authorization and permissions. For more information, see Environment account connections in the Proton Administrator\n guide.
", "smithy.api#idempotent": {} } }, @@ -558,30 +600,36 @@ "clientToken": { "target": "com.amazonaws.proton#ClientToken", "traits": { - "smithy.api#documentation": "When included, if two identicial requests are made with the same client token, AWS Proton returns the environment account connection that\n the first request created.
", + "smithy.api#documentation": "When included, if two identical requests are made with the same client token, Proton returns the environment account connection that the\n first request created.
", "smithy.api#idempotencyToken": {} } }, "managementAccountId": { "target": "com.amazonaws.proton#AwsAccountId", "traits": { - "smithy.api#documentation": "The ID of the management account that accepts or rejects the environment account connection. You create an manage the AWS Proton\n environment in this account. If the management account accepts the environment account connection, AWS Proton can use the associated IAM\n role to provision environment infrastructure resources in the associated environment account.
", + "smithy.api#documentation": "The ID of the management account that accepts or rejects the environment account connection. You create an manage the Proton environment in\n this account. If the management account accepts the environment account connection, Proton can use the associated IAM role to provision\n environment infrastructure resources in the associated environment account.
", "smithy.api#required": {} } }, "roleArn": { "target": "com.amazonaws.proton#Arn", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) of the IAM service role that's created in the environment account. AWS Proton uses this role to provision\n infrastructure resources in the associated environment account.
", + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the IAM service role that's created in the environment account. Proton uses this role to provision\n infrastructure resources in the associated environment account.
", "smithy.api#required": {} } }, "environmentName": { "target": "com.amazonaws.proton#ResourceName", "traits": { - "smithy.api#documentation": "The name of the AWS Proton environment that's created in the associated management account.
", + "smithy.api#documentation": "The name of the Proton environment that's created in the associated management account.
", "smithy.api#required": {} } + }, + "tags": { + "target": "com.amazonaws.proton#TagList", + "traits": { + "smithy.api#documentation": "Tags for your environment account connection. For more information, see Proton resources and tagging in the Proton Administrator\n Guide.
" + } } } }, @@ -591,7 +639,7 @@ "environmentAccountConnection": { "target": "com.amazonaws.proton#EnvironmentAccountConnection", "traits": { - "smithy.api#documentation": "The environment account connection detail data that's returned by AWS Proton.
", + "smithy.api#documentation": "The environment account connection detail data that's returned by Proton.
", "smithy.api#required": {} } } @@ -610,21 +658,21 @@ "templateName": { "target": "com.amazonaws.proton#ResourceName", "traits": { - "smithy.api#documentation": "The name of the environment template. For more information, see Environment Templates in the AWS Proton Administrator\n Guide.
", + "smithy.api#documentation": "The name of the environment template. For more information, see Environment Templates in the Proton Administrator Guide.
", "smithy.api#required": {} } }, "templateMajorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "The ID of the major version of the environment template.
", + "smithy.api#documentation": "The major version of the environment template.
", "smithy.api#required": {} } }, "templateMinorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "The ID of the minor version of the environment template.
" + "smithy.api#documentation": "The minor version of the environment template.
" } }, "description": { @@ -636,26 +684,32 @@ "spec": { "target": "com.amazonaws.proton#SpecContents", "traits": { - "smithy.api#documentation": "A link to a YAML formatted spec file that provides inputs as defined in the environment template bundle schema file. For more\n information, see Environments in the\n AWS Proton Administrator Guide.
", + "smithy.api#documentation": "A link to a YAML formatted spec file that provides inputs as defined in the environment template bundle schema file. For more information, see\n Environments in the Proton Administrator\n Guide.
", "smithy.api#required": {} } }, "protonServiceRoleArn": { "target": "com.amazonaws.proton#Arn", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) of the AWS Proton service role that allows AWS Proton to make calls to other services on your behalf. You\n must include either the environmentAccountConnectionId
or protonServiceRoleArn
parameter and value.
The Amazon Resource Name (ARN) of the Proton service role that allows Proton to make calls to other services on your behalf. You must\n include either the environmentAccountConnectionId
or protonServiceRoleArn
parameter and value and omit the\n provisioningRepository
parameter when you use standard provisioning.
The ID of the environment account connection that you provide if you're provisioning your environment infrastructure resources to an\n environment account. You must include either the environmentAccountConnectionId
or protonServiceRoleArn
\n parameter and value. For more information, see Environment account connections in the AWS Proton Administrator guide.
The ID of the environment account connection that you provide if you're provisioning your environment infrastructure resources to an\n environment account. You must include either the environmentAccountConnectionId
or protonServiceRoleArn
parameter and\n value and omit the provisioningRepository
parameter and values. For more information, see Environment account connections in the Proton Administrator\n guide.
Create tags for your environment. For more information, see AWS Proton resources and tagging in the AWS Proton Administrator Guide or AWS Proton User Guide.
" + "smithy.api#documentation": "Create tags for your environment. For more information, see Proton resources and tagging in the Proton Administrator Guide or Proton User Guide.
" + } + }, + "provisioningRepository": { + "target": "com.amazonaws.proton#RepositoryBranchInput", + "traits": { + "smithy.api#documentation": "The repository that you provide with pull request provisioning. If you provide this parameter, you must omit the\n environmentAccountConnectionId
and protonServiceRoleArn
parameters.
Provisioning by pull request is currently in feature preview and is\n only usable with Terraform based Proton Templates. To learn more about\n Amazon Web Services Feature Preview terms, see section 2 on Beta and\n Previews.
\nThe environment detail data that's returned by AWS Proton.
", + "smithy.api#documentation": "The environment detail data that's returned by Proton.
", "smithy.api#required": {} } } @@ -701,7 +755,7 @@ } ], "traits": { - "smithy.api#documentation": "Create an environment template for AWS Proton. For more information, see Environment Templates in the AWS Proton Administrator\n Guide.
\nYou can create an environment template in one of the two following ways:
\nRegister and publish a standard environment template that instructs AWS Proton to deploy and manage\n environment infrastructure.
\nRegister and publish a customer managed environment template that connects AWS Proton to your existing\n provisioned infrastructure that you manage. AWS Proton doesn't manage your existing provisioned\n infrastructure. To create an environment template for customer provisioned and managed infrastructure, include the\n provisioning
parameter and set the value to CUSTOMER_MANAGED
. For more information, see Register and publish an environment template\n in the AWS Proton Administrator Guide.
Create an environment template for Proton. For more information, see Environment Templates in the Proton Administrator Guide.
\nYou can create an environment template in one of the two following ways:
\nRegister and publish a standard environment template that instructs Proton to deploy and manage environment\n infrastructure.
\nRegister and publish a customer managed environment template that connects Proton to your existing provisioned\n infrastructure that you manage. Proton doesn't manage your existing provisioned infrastructure. To create an environment\n template for customer provisioned and managed infrastructure, include the provisioning
parameter and set the value to\n CUSTOMER_MANAGED
. For more information, see Register and publish an environment template in the Proton Administrator Guide.
A customer provided encryption key that AWS Proton uses to encrypt data.
" + "smithy.api#documentation": "A customer provided encryption key that Proton uses to encrypt data.
" } }, "provisioning": { @@ -742,7 +796,7 @@ "tags": { "target": "com.amazonaws.proton#TagList", "traits": { - "smithy.api#documentation": "Create tags for your environment template. For more information, see AWS Proton resources and tagging in the AWS Proton Administrator Guide or AWS Proton User Guide.
" + "smithy.api#documentation": "Create tags for your environment template. For more information, see Proton resources and tagging in the Proton Administrator Guide or Proton User Guide.
" } } } @@ -753,7 +807,7 @@ "environmentTemplate": { "target": "com.amazonaws.proton#EnvironmentTemplate", "traits": { - "smithy.api#documentation": "The environment template detail data that's returned by AWS Proton.
", + "smithy.api#documentation": "The environment template detail data that's returned by Proton.
", "smithy.api#required": {} } } @@ -791,7 +845,7 @@ } ], "traits": { - "smithy.api#documentation": "Create a new major or minor version of an environment template. A major version of an environment template is a version that\n isn't backwards compatible. A minor version of an environment template is a version that's backwards compatible\n within its major version.
", + "smithy.api#documentation": "Create a new major or minor version of an environment template. A major version of an environment template is a version that\n isn't backwards compatible. A minor version of an environment template is a version that's backwards compatible within its\n major version.
", "smithy.api#idempotent": {} } }, @@ -801,7 +855,7 @@ "clientToken": { "target": "com.amazonaws.proton#ClientToken", "traits": { - "smithy.api#documentation": "When included, if two identicial requests are made with the same client token, AWS Proton returns the environment template version that\n the first request created.
", + "smithy.api#documentation": "When included, if two identical requests are made with the same client token, Proton returns the environment template version that the\n first request created.
", "smithy.api#idempotencyToken": {} } }, @@ -821,7 +875,7 @@ "majorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "To create a new minor version of the environment template, include a majorVersion
.
To create a new major and minor version of the environment template, exclude\n majorVersion
.
To create a new minor version of the environment template, include a major Version
.
To create a new major and minor version of the environment template, exclude\n major Version
.
The environment template detail data that's returned by AWS Proton.
", + "smithy.api#documentation": "The environment template detail data that's returned by Proton.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.proton#CreateRepository": { + "type": "operation", + "input": { + "target": "com.amazonaws.proton#CreateRepositoryInput" + }, + "output": { + "target": "com.amazonaws.proton#CreateRepositoryOutput" + }, + "errors": [ + { + "target": "com.amazonaws.proton#AccessDeniedException" + }, + { + "target": "com.amazonaws.proton#ConflictException" + }, + { + "target": "com.amazonaws.proton#InternalServerException" + }, + { + "target": "com.amazonaws.proton#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.proton#ThrottlingException" + }, + { + "target": "com.amazonaws.proton#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Create and register a link to a repository that can be used with pull request provisioning or template sync configurations. For more\n information, see Template bundles and Template sync configurations in the Proton\n Administrator Guide.
", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.proton#CreateRepositoryInput": { + "type": "structure", + "members": { + "provider": { + "target": "com.amazonaws.proton#RepositoryProvider", + "traits": { + "smithy.api#documentation": "The repository provider.
", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.proton#RepositoryName", + "traits": { + "smithy.api#documentation": "The repository name, for example myrepos/myrepo
.
The Amazon Resource Name (ARN) of your Amazon Web Services CodeStar connection. For more information, see Setting up for Proton in the Proton Administrator Guide.
", + "smithy.api#required": {} + } + }, + "encryptionKey": { + "target": "com.amazonaws.proton#Arn", + "traits": { + "smithy.api#documentation": "The ARN of your customer Amazon Web Services Key Management Service (Amazon Web Services KMS) key.
" + } + } + } + }, + "com.amazonaws.proton#CreateRepositoryOutput": { + "type": "structure", + "members": { + "repository": { + "target": "com.amazonaws.proton#Repository", + "traits": { + "smithy.api#documentation": "The repository detail data that's returned by Proton.
", "smithy.api#required": {} } } @@ -883,7 +1014,7 @@ } ], "traits": { - "smithy.api#documentation": "Create an AWS Proton service. An AWS Proton service is an instantiation of a service template and often includes several service instances\n and pipeline. For more information, see Services in\n the AWS Proton Administrator Guide and Services in the AWS Proton User Guide.
", + "smithy.api#documentation": "Create an Proton service. An Proton service is an instantiation of a service template and often includes several service instances and\n pipeline. For more information, see Services in the\n Proton Administrator Guide and Services\n in the Proton User Guide.
", "smithy.api#idempotent": {} } }, @@ -900,7 +1031,7 @@ "description": { "target": "com.amazonaws.proton#Description", "traits": { - "smithy.api#documentation": "A description of the AWS Proton service.
" + "smithy.api#documentation": "A description of the Proton service.
" } }, "templateName": { @@ -913,45 +1044,45 @@ "templateMajorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "The ID of the major version of the service template that was used to create the service.
", + "smithy.api#documentation": "The major version of the service template that was used to create the service.
", "smithy.api#required": {} } }, "templateMinorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "The ID of the minor version of the service template that was used to create the service.
" + "smithy.api#documentation": "The minor version of the service template that was used to create the service.
" } }, "spec": { "target": "com.amazonaws.proton#SpecContents", "traits": { - "smithy.api#documentation": "A link to a spec file that provides inputs as defined in the service template bundle schema file. The spec file is in YAML format. Don’t\n include pipeline inputs in the spec if your service template doesn’t include a service pipeline. For more\n information, see Create a service in the\n AWS Proton Administrator Guide and Create a service in the AWS Proton User Guide.
", + "smithy.api#documentation": "A link to a spec file that provides inputs as defined in the service template bundle schema file. The spec file is in YAML format. Don’t\n include pipeline inputs in the spec if your service template doesn’t include a service pipeline. For more information, see\n Create a service in the Proton\n Administrator Guide and Create a service in the\n Proton User Guide.
", "smithy.api#required": {} } }, "repositoryConnectionArn": { "target": "com.amazonaws.proton#Arn", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) of the repository connection. For more information, see Set up repository connection in the\n AWS Proton Administrator Guide and Setting up with AWS Proton in the AWS Proton\n User Guide. Don't include this parameter if your service template doesn't include\n a service pipeline.
" + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the repository connection. For more information, see Set up repository connection in the Proton\n Administrator Guide and Setting up\n with Proton in the Proton User Guide. Don't include this parameter if your service\n template doesn't include a service pipeline.
" } }, "repositoryId": { "target": "com.amazonaws.proton#RepositoryId", "traits": { - "smithy.api#documentation": "The ID of the code repository. Don't include this parameter if your service template doesn't\n include a service pipeline.
" + "smithy.api#documentation": "The ID of the code repository. Don't include this parameter if your service template doesn't include\n a service pipeline.
" } }, "branchName": { "target": "com.amazonaws.proton#GitBranchName", "traits": { - "smithy.api#documentation": "The name of the code repository branch that holds the code that's deployed in AWS Proton. Don't include this\n parameter if your service template doesn't include a service pipeline.
" + "smithy.api#documentation": "The name of the code repository branch that holds the code that's deployed in Proton. Don't include this parameter if\n your service template doesn't include a service pipeline.
" } }, "tags": { "target": "com.amazonaws.proton#TagList", "traits": { - "smithy.api#documentation": "Create tags for your service. For more information, see AWS Proton resources and tagging in the AWS Proton Administrator Guide or AWS Proton User Guide.
" + "smithy.api#documentation": "Create tags for your service. For more information, see Proton resources and tagging in the Proton Administrator Guide or Proton User Guide.
" } } } @@ -962,7 +1093,7 @@ "service": { "target": "com.amazonaws.proton#Service", "traits": { - "smithy.api#documentation": "The service detail data that's returned by AWS Proton.
", + "smithy.api#documentation": "The service detail data that's returned by Proton.
", "smithy.api#required": {} } } @@ -997,7 +1128,7 @@ } ], "traits": { - "smithy.api#documentation": "Create a service template. The administrator creates a service template to define standardized infrastructure and an optional CICD\n service pipeline. Developers, in turn, select the service template from AWS Proton. If the selected service template includes a service\n pipeline definition, they provide a link to their source code repository. AWS Proton then deploys and manages the infrastructure defined by\n the selected service template. For more information, see Service Templates in the AWS Proton Administrator\n Guide.
", + "smithy.api#documentation": "Create a service template. The administrator creates a service template to define standardized infrastructure and an optional CICD service\n pipeline. Developers, in turn, select the service template from Proton. If the selected service template includes a service pipeline definition,\n they provide a link to their source code repository. Proton then deploys and manages the infrastructure defined by the selected service\n template. For more information, see Service\n Templates in the Proton Administrator Guide.
", "smithy.api#idempotent": {} } }, @@ -1032,13 +1163,13 @@ "pipelineProvisioning": { "target": "com.amazonaws.proton#Provisioning", "traits": { - "smithy.api#documentation": "AWS Proton includes a service pipeline for your service by default. When included, this parameter indicates that an AWS Proton service\n pipeline won't be included for your service. Once specified, this parameter can't be changed.\n For more information, see Service template\n bundles in the AWS Proton Administrator Guide.
" + "smithy.api#documentation": "Proton includes a service pipeline for your service by default. When included, this parameter indicates that an Proton service pipeline\n won't be included for your service. Once specified, this parameter can't be changed. For more\n information, see Service template bundles in the\n Proton Administrator Guide.
" } }, "tags": { "target": "com.amazonaws.proton#TagList", "traits": { - "smithy.api#documentation": "Create tags for your service template. For more information, see AWS Proton resources and tagging in the AWS Proton Administrator Guide or AWS Proton User Guide.
" + "smithy.api#documentation": "Create tags for your service template. For more information, see Proton resources and tagging in the Proton Administrator Guide or Proton User Guide.
" } } } @@ -1049,7 +1180,7 @@ "serviceTemplate": { "target": "com.amazonaws.proton#ServiceTemplate", "traits": { - "smithy.api#documentation": "The service template detail data that's returned by AWS Proton.
", + "smithy.api#documentation": "The service template detail data that's returned by Proton.
", "smithy.api#required": {} } } @@ -1087,7 +1218,7 @@ } ], "traits": { - "smithy.api#documentation": "Create a new major or minor version of a service template. A major version of a service template is a version that\n isn't backwards compatible. A minor version of a service template is a version that's backwards compatible within\n its major version.
", + "smithy.api#documentation": "Create a new major or minor version of a service template. A major version of a service template is a version that isn't\n backward compatible. A minor version of a service template is a version that's backward compatible within its major version.
", "smithy.api#idempotent": {} } }, @@ -1097,7 +1228,7 @@ "clientToken": { "target": "com.amazonaws.proton#ClientToken", "traits": { - "smithy.api#documentation": "When included, if two identicial requests are made with the same client token, AWS Proton returns the service template version that the\n first request created.
", + "smithy.api#documentation": "When included, if two identical requests are made with the same client token, Proton returns the service template version that the first\n request created.
", "smithy.api#idempotencyToken": {} } }, @@ -1117,7 +1248,7 @@ "majorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "To create a new minor version of the service template, include a majorVersion
.
To create a new major and minor version of the service template, exclude\n majorVersion
.
To create a new minor version of the service template, include a major Version
.
To create a new major and minor version of the service template, exclude\n major Version
.
The service template version summary of detail data that's returned by AWS Proton.
", + "smithy.api#documentation": "The service template version summary of detail data that's returned by Proton.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.proton#CreateTemplateSyncConfig": { + "type": "operation", + "input": { + "target": "com.amazonaws.proton#CreateTemplateSyncConfigInput" + }, + "output": { + "target": "com.amazonaws.proton#CreateTemplateSyncConfigOutput" + }, + "errors": [ + { + "target": "com.amazonaws.proton#AccessDeniedException" + }, + { + "target": "com.amazonaws.proton#ConflictException" + }, + { + "target": "com.amazonaws.proton#InternalServerException" + }, + { + "target": "com.amazonaws.proton#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.proton#ThrottlingException" + }, + { + "target": "com.amazonaws.proton#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Set up a template for automated template version creation. When a commit is pushed to your registered repository, Proton checks for changes to your repository template bundles. If it\n detects a template bundle change, a new minor or major version of its template is created, if the version doesn’t already exist. For more\n information, see Template sync configurations in\n the Proton Administrator Guide.
", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.proton#CreateTemplateSyncConfigInput": { + "type": "structure", + "members": { + "templateName": { + "target": "com.amazonaws.proton#ResourceName", + "traits": { + "smithy.api#documentation": "The name of your registered template.
", + "smithy.api#required": {} + } + }, + "templateType": { + "target": "com.amazonaws.proton#TemplateType", + "traits": { + "smithy.api#documentation": "The type of the registered template.
", + "smithy.api#required": {} + } + }, + "repositoryProvider": { + "target": "com.amazonaws.proton#RepositoryProvider", + "traits": { + "smithy.api#documentation": "The provider type for your repository.
", + "smithy.api#required": {} + } + }, + "repositoryName": { + "target": "com.amazonaws.proton#RepositoryName", + "traits": { + "smithy.api#documentation": "The name of your repository, for example myrepos/myrepo
.
The branch of the registered repository for your template.
", "smithy.api#required": {} } + }, + "subdirectory": { + "target": "com.amazonaws.proton#Subdirectory", + "traits": { + "smithy.api#documentation": "A repository subdirectory path to your template bundle directory. When included, Proton limits the template bundle search to this\n repository directory.
" + } + } + } + }, + "com.amazonaws.proton#CreateTemplateSyncConfigOutput": { + "type": "structure", + "members": { + "templateSyncConfig": { + "target": "com.amazonaws.proton#TemplateSyncConfig", + "traits": { + "smithy.api#documentation": "The template sync configuration detail data that's returned by Proton.
" + } } } }, @@ -1216,7 +1437,7 @@ } ], "traits": { - "smithy.api#documentation": "In an environment account, delete an environment account connection.
\nAfter you delete an environment account connection that’s in use by an AWS Proton environment, AWS Proton can’t\n manage the environment infrastructure resources until a new environment account connection is accepted for the environment account and\n associated environment. You're responsible for cleaning up provisioned resources that remain without an environment connection.
\nFor more information, see Environment account\n connections in the AWS Proton Administrator guide.
", + "smithy.api#documentation": "In an environment account, delete an environment account connection.
\nAfter you delete an environment account connection that’s in use by an Proton environment, Proton can’t manage the\n environment infrastructure resources until a new environment account connection is accepted for the environment account and associated environment.\n You're responsible for cleaning up provisioned resources that remain without an environment connection.
\nFor more information, see Environment account\n connections in the Proton Administrator guide.
", "smithy.api#idempotent": {} } }, @@ -1245,7 +1466,7 @@ "environmentAccountConnection": { "target": "com.amazonaws.proton#EnvironmentAccountConnection", "traits": { - "smithy.api#documentation": "The environment account connection detail data that's returned by AWS Proton.
" + "smithy.api#documentation": "The environment account connection detail data that's returned by Proton.
" } } } @@ -1275,7 +1496,7 @@ "environment": { "target": "com.amazonaws.proton#Environment", "traits": { - "smithy.api#documentation": "The environment detail data that's returned by AWS Proton.
" + "smithy.api#documentation": "The environment detail data that's returned by Proton.
" } } } @@ -1338,7 +1559,7 @@ "environmentTemplate": { "target": "com.amazonaws.proton#EnvironmentTemplate", "traits": { - "smithy.api#documentation": "The environment template detail data that's returned by AWS Proton.
" + "smithy.api#documentation": "The environment template detail data that's returned by Proton.
" } } } @@ -1372,7 +1593,7 @@ } ], "traits": { - "smithy.api#documentation": "If no other minor versions of an environment template exist, delete a major version of the environment template if it's not the\n Recommended
version. Delete the Recommended
version of the environment template if no other major versions\n or minor versions of the environment template exist. A major version of an environment template is a version that's not backwards\n compatible.
Delete a minor version of an environment template if it isn't the Recommended
version. Delete a\n Recommended
minor version of the environment template if no other minor versions of the environment template exist. A\n minor version of an environment template is a version that's backwards compatible.
If no other minor versions of an environment template exist, delete a major version of the environment template if it's not the\n Recommended
version. Delete the Recommended
version of the environment template if no other major versions or minor\n versions of the environment template exist. A major version of an environment template is a version that's not backward compatible.
Delete a minor version of an environment template if it isn't the Recommended
version. Delete a\n Recommended
minor version of the environment template if no other minor versions of the environment template exist. A minor version\n of an environment template is a version that's backward compatible.
The environment template version detail data that's returned by AWS Proton.
" + "smithy.api#documentation": "The environment template version detail data that's returned by Proton.
" + } + } + } + }, + "com.amazonaws.proton#DeleteRepository": { + "type": "operation", + "input": { + "target": "com.amazonaws.proton#DeleteRepositoryInput" + }, + "output": { + "target": "com.amazonaws.proton#DeleteRepositoryOutput" + }, + "errors": [ + { + "target": "com.amazonaws.proton#AccessDeniedException" + }, + { + "target": "com.amazonaws.proton#ConflictException" + }, + { + "target": "com.amazonaws.proton#InternalServerException" + }, + { + "target": "com.amazonaws.proton#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.proton#ThrottlingException" + }, + { + "target": "com.amazonaws.proton#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "De-register and unlink your repository.
", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.proton#DeleteRepositoryInput": { + "type": "structure", + "members": { + "provider": { + "target": "com.amazonaws.proton#RepositoryProvider", + "traits": { + "smithy.api#documentation": "The repository provider.
", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.proton#RepositoryName", + "traits": { + "smithy.api#documentation": "The name of the repository.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#references": [ + { + "resource": "com.amazonaws.proton#RepositoryResource" + } + ] + } + }, + "com.amazonaws.proton#DeleteRepositoryOutput": { + "type": "structure", + "members": { + "repository": { + "target": "com.amazonaws.proton#Repository", + "traits": { + "smithy.api#documentation": "The repository detail data that's returned by Proton.
" } } } @@ -1478,7 +1769,7 @@ "service": { "target": "com.amazonaws.proton#Service", "traits": { - "smithy.api#documentation": "The service detail data that's returned by AWS Proton.
" + "smithy.api#documentation": "The service detail data that's returned by Proton.
" } } } @@ -1541,7 +1832,7 @@ "serviceTemplate": { "target": "com.amazonaws.proton#ServiceTemplate", "traits": { - "smithy.api#documentation": "The service template detail data that's returned by AWS Proton.
" + "smithy.api#documentation": "The service template detail data that's returned by Proton.
" } } } @@ -1575,7 +1866,7 @@ } ], "traits": { - "smithy.api#documentation": "If no other minor versions of a service template exist, delete a major version of the service template if it's not the\n Recommended
version. Delete the Recommended
version of the service template if no other major versions or\n minor versions of the service template exist. A major version of a service template is a version that isn't backwards\n compatible.
Delete a minor version of a service template if it's not the Recommended
version. Delete a Recommended
minor\n version of the service template if no other minor versions of the service template exist. A minor version of a service template is a\n version that's backwards compatible.
If no other minor versions of a service template exist, delete a major version of the service template if it's not the\n Recommended
version. Delete the Recommended
version of the service template if no other major versions or minor versions\n of the service template exist. A major version of a service template is a version that isn't backwards compatible.
Delete a minor version of a service template if it's not the Recommended
version. Delete a Recommended
minor version\n of the service template if no other minor versions of the service template exist. A minor version of a service template is a version that's\n backwards compatible.
The service template version detail data that's returned by AWS Proton.
" + "smithy.api#documentation": "The service template version detail data that's returned by Proton.
" } } } }, - "com.amazonaws.proton#DeploymentStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "IN_PROGRESS", - "name": "IN_PROGRESS" - }, - { + "com.amazonaws.proton#DeleteTemplateSyncConfig": { + "type": "operation", + "input": { + "target": "com.amazonaws.proton#DeleteTemplateSyncConfigInput" + }, + "output": { + "target": "com.amazonaws.proton#DeleteTemplateSyncConfigOutput" + }, + "errors": [ + { + "target": "com.amazonaws.proton#AccessDeniedException" + }, + { + "target": "com.amazonaws.proton#ConflictException" + }, + { + "target": "com.amazonaws.proton#InternalServerException" + }, + { + "target": "com.amazonaws.proton#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.proton#ThrottlingException" + }, + { + "target": "com.amazonaws.proton#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Delete a template sync configuration.
", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.proton#DeleteTemplateSyncConfigInput": { + "type": "structure", + "members": { + "templateName": { + "target": "com.amazonaws.proton#ResourceName", + "traits": { + "smithy.api#documentation": "The template name.
", + "smithy.api#required": {} + } + }, + "templateType": { + "target": "com.amazonaws.proton#TemplateType", + "traits": { + "smithy.api#documentation": "The template type.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.proton#DeleteTemplateSyncConfigOutput": { + "type": "structure", + "members": { + "templateSyncConfig": { + "target": "com.amazonaws.proton#TemplateSyncConfig", + "traits": { + "smithy.api#documentation": "The template sync configuration detail data that's returned by Proton.
" + } + } + } + }, + "com.amazonaws.proton#DeploymentId": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" + } + }, + "com.amazonaws.proton#DeploymentStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "IN_PROGRESS", + "name": "IN_PROGRESS" + }, + { "value": "FAILED", "name": "FAILED" }, @@ -1705,6 +2065,15 @@ "smithy.api#sensitive": {} } }, + "com.amazonaws.proton#EmptyNextToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 0 + } + } + }, "com.amazonaws.proton#Environment": { "type": "structure", "members": { @@ -1786,7 +2155,7 @@ "protonServiceRoleArn": { "target": "com.amazonaws.proton#Arn", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) of the AWS Proton service role that allows AWS Proton to make calls to other services on your\n behalf.
" + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the Proton service role that allows Proton to make calls to other services on your behalf.
" } }, "environmentAccountConnectionId": { @@ -1812,10 +2181,16 @@ "traits": { "smithy.api#documentation": "When included, indicates that the environment template is for customer provisioned and managed infrastructure.
" } + }, + "provisioningRepository": { + "target": "com.amazonaws.proton#RepositoryBranch", + "traits": { + "smithy.api#documentation": "The repository that you provide with pull request provisioning.
\nProvisioning by pull request is currently in feature preview and is\n only usable with Terraform based Proton Templates. To learn more about\n Amazon Web Services Feature Preview terms, see section 2 on Beta and\n Previews.
\nThe environment detail data. An AWS Proton environment is a set resources shared across an AWS Proton service.
" + "smithy.api#documentation": "The environment detail data. An Proton environment is a set resources shared across an Proton service.
" } }, "com.amazonaws.proton#EnvironmentAccountConnection": { @@ -2067,6 +2442,34 @@ } } }, + "com.amazonaws.proton#EnvironmentOutputResource": { + "type": "resource", + "identifiers": { + "environmentName": { + "target": "com.amazonaws.proton#ResourceName" + }, + "key": { + "target": "com.amazonaws.proton#OutputKey" + } + }, + "list": { + "target": "com.amazonaws.proton#ListEnvironmentOutputs" + } + }, + "com.amazonaws.proton#EnvironmentProvisionedResourceResource": { + "type": "resource", + "identifiers": { + "environmentName": { + "target": "com.amazonaws.proton#ResourceName" + }, + "name": { + "target": "com.amazonaws.proton#ProvisionedResourceName" + } + }, + "list": { + "target": "com.amazonaws.proton#ListEnvironmentProvisionedResources" + } + }, "com.amazonaws.proton#EnvironmentResource": { "type": "resource", "identifiers": { @@ -2153,14 +2556,14 @@ "templateMajorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "The ID of the major version of the environment template.
", + "smithy.api#documentation": "The major version of the environment template.
", "smithy.api#required": {} } }, "templateMinorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "The ID of the minor version of the environment template.
", + "smithy.api#documentation": "The minor version of the environment template.
", "smithy.api#required": {} } }, @@ -2180,7 +2583,7 @@ "protonServiceRoleArn": { "target": "com.amazonaws.proton#Arn", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) of the AWS Proton service role that allows AWS Proton to make calls to other services on your\n behalf.
" + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the Proton service role that allows Proton to make calls to other services on your behalf.
" } }, "environmentAccountConnectionId": { @@ -2392,7 +2795,7 @@ "recommendedVersion": { "target": "com.amazonaws.proton#FullTemplateVersionNumber", "traits": { - "smithy.api#documentation": "The ID of the recommended version of the environment template.
" + "smithy.api#documentation": "The recommended version of the environment template.
" } }, "provisioning": { @@ -2425,21 +2828,21 @@ "majorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "The ID of the latest major version that's associated with the version of an environment template.
", + "smithy.api#documentation": "The latest major version that's associated with the version of an environment template.
", "smithy.api#required": {} } }, "minorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "The ID of the minor version of an environment template.
", + "smithy.api#documentation": "The minor version of an environment template.
", "smithy.api#required": {} } }, "recommendedMinorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "The ID of the recommended minor version of the environment template.
" + "smithy.api#documentation": "The recommended minor version of the environment template.
" } }, "status": { @@ -2551,21 +2954,21 @@ "majorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "The ID of the latest major version that's associated with the version of an environment template.
", + "smithy.api#documentation": "The latest major version that's associated with the version of an environment template.
", "smithy.api#required": {} } }, "minorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "The ID of the version of an environment template.
", + "smithy.api#documentation": "The version of an environment template.
", "smithy.api#required": {} } }, "recommendedMinorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "The ID of the recommended minor version of the environment template.
" + "smithy.api#documentation": "The recommended minor version of the environment template.
" } }, "status": { @@ -2661,7 +3064,7 @@ } ], "traits": { - "smithy.api#documentation": "Get detail data for the AWS Proton pipeline service role.
", + "smithy.api#documentation": "Get detail data for the Proton pipeline service role.
", "smithy.api#readonly": {} } }, @@ -2675,7 +3078,7 @@ "accountSettings": { "target": "com.amazonaws.proton#AccountSettings", "traits": { - "smithy.api#documentation": "The AWS Proton pipeline service role detail data that's returned by AWS Proton.
" + "smithy.api#documentation": "The Proton pipeline service role detail data that's returned by Proton.
" } } } @@ -2765,7 +3168,7 @@ } ], "traits": { - "smithy.api#documentation": "In an environment account, view the detail data for an environment account connection.
\nFor more information, see Environment account\n connections in the AWS Proton Administrator guide.
", + "smithy.api#documentation": "In an environment account, view the detail data for an environment account connection.
\nFor more information, see Environment account\n connections in the Proton Administrator guide.
", "smithy.api#readonly": {} } }, @@ -2794,7 +3197,7 @@ "environmentAccountConnection": { "target": "com.amazonaws.proton#EnvironmentAccountConnection", "traits": { - "smithy.api#documentation": "The environment account connection detail data that's returned by AWS Proton.
", + "smithy.api#documentation": "The environment account connection detail data that's returned by Proton.
", "smithy.api#required": {} } } @@ -2825,7 +3228,7 @@ "environment": { "target": "com.amazonaws.proton#Environment", "traits": { - "smithy.api#documentation": "The environment detail data that's returned by AWS Proton.
", + "smithy.api#documentation": "The environment detail data that's returned by Proton.
", "smithy.api#required": {} } } @@ -2879,7 +3282,7 @@ "environmentTemplate": { "target": "com.amazonaws.proton#EnvironmentTemplate", "traits": { - "smithy.api#documentation": "The environment template detail data that's returned by AWS Proton.
", + "smithy.api#documentation": "The environment template detail data that's returned by Proton.
", "smithy.api#required": {} } } @@ -2966,7 +3369,7 @@ "majorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "To view environment template major version detail data, include majorVersion
.
To view environment template major version detail data, include major Version
.
The environment template version detail data that's returned by AWS Proton.
", + "smithy.api#documentation": "The environment template version detail data that's returned by Proton.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.proton#GetRepository": { + "type": "operation", + "input": { + "target": "com.amazonaws.proton#GetRepositoryInput" + }, + "output": { + "target": "com.amazonaws.proton#GetRepositoryOutput" + }, + "errors": [ + { + "target": "com.amazonaws.proton#AccessDeniedException" + }, + { + "target": "com.amazonaws.proton#InternalServerException" + }, + { + "target": "com.amazonaws.proton#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.proton#ThrottlingException" + }, + { + "target": "com.amazonaws.proton#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Get detail data for a repository.
", + "smithy.api#readonly": {} + } + }, + "com.amazonaws.proton#GetRepositoryInput": { + "type": "structure", + "members": { + "provider": { + "target": "com.amazonaws.proton#RepositoryProvider", + "traits": { + "smithy.api#documentation": "The repository provider.
", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.proton#RepositoryName", + "traits": { + "smithy.api#documentation": "The repository name, for example myrepos/myrepo
.
The repository detail data that's returned by Proton.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.proton#GetRepositorySyncStatus": { + "type": "operation", + "input": { + "target": "com.amazonaws.proton#GetRepositorySyncStatusInput" + }, + "output": { + "target": "com.amazonaws.proton#GetRepositorySyncStatusOutput" + }, + "errors": [ + { + "target": "com.amazonaws.proton#AccessDeniedException" + }, + { + "target": "com.amazonaws.proton#InternalServerException" + }, + { + "target": "com.amazonaws.proton#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.proton#ThrottlingException" + }, + { + "target": "com.amazonaws.proton#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Get the repository sync status.
" + } + }, + "com.amazonaws.proton#GetRepositorySyncStatusInput": { + "type": "structure", + "members": { + "repositoryName": { + "target": "com.amazonaws.proton#RepositoryName", + "traits": { + "smithy.api#documentation": "The repository name.
", + "smithy.api#required": {} + } + }, + "repositoryProvider": { + "target": "com.amazonaws.proton#RepositoryProvider", + "traits": { + "smithy.api#documentation": "The repository provider.
", + "smithy.api#required": {} + } + }, + "branch": { + "target": "com.amazonaws.proton#GitBranchName", + "traits": { + "smithy.api#documentation": "The repository branch.
", + "smithy.api#required": {} + } + }, + "syncType": { + "target": "com.amazonaws.proton#SyncType", + "traits": { + "smithy.api#documentation": "The repository sync type.
", "smithy.api#required": {} } } } }, + "com.amazonaws.proton#GetRepositorySyncStatusOutput": { + "type": "structure", + "members": { + "latestSync": { + "target": "com.amazonaws.proton#RepositorySyncAttempt", + "traits": { + "smithy.api#documentation": "The repository sync status detail data that's returned by Proton.
" + } + } + } + }, "com.amazonaws.proton#GetService": { "type": "operation", "input": { @@ -3229,7 +3773,7 @@ } ], "traits": { - "smithy.api#documentation": "Get detail data for a service instance. A service instance is an instantiation of service template, which is running in a specific\n environment.
", + "smithy.api#documentation": "Get detail data for a service instance. A service instance is an instantiation of service template, which is running in a specific\n environment.
", "smithy.api#readonly": {}, "smithy.waiters#waitable": { "ServiceInstanceDeployed": { @@ -3294,7 +3838,7 @@ "serviceInstance": { "target": "com.amazonaws.proton#ServiceInstance", "traits": { - "smithy.api#documentation": "The service instance detail data that's returned by AWS Proton.
", + "smithy.api#documentation": "The service instance detail data that's returned by Proton.
", "smithy.api#required": {} } } @@ -3306,7 +3850,7 @@ "service": { "target": "com.amazonaws.proton#Service", "traits": { - "smithy.api#documentation": "The service detail data that's returned by AWS Proton.
" + "smithy.api#documentation": "The service detail data that's returned by Proton.
" } } } @@ -3366,7 +3910,7 @@ "serviceTemplate": { "target": "com.amazonaws.proton#ServiceTemplate", "traits": { - "smithy.api#documentation": "The service template detail data that's returned by AWS Proton.
", + "smithy.api#documentation": "The service template detail data that's returned by Proton.
", "smithy.api#required": {} } } @@ -3453,7 +3997,7 @@ "majorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "To view service template major version detail data, include majorVersion
.
To view service template major version detail data, include major Version
.
The service template version detail data that's returned by AWS Proton.
", - "smithy.api#required": {} - } - } - } - }, - "com.amazonaws.proton#GitBranchName": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 200 - } - } - }, - "com.amazonaws.proton#InternalServerException": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.proton#ErrorMessage", - "traits": { + "smithy.api#documentation": "The service template version detail data that's returned by Proton.
", "smithy.api#required": {} } } - }, - "traits": { - "smithy.api#documentation": "The request failed to register with the service.
", - "smithy.api#error": "server", - "smithy.api#httpError": 500, - "smithy.api#retryable": {} } }, - "com.amazonaws.proton#ListEnvironmentAccountConnections": { + "com.amazonaws.proton#GetTemplateSyncConfig": { "type": "operation", "input": { - "target": "com.amazonaws.proton#ListEnvironmentAccountConnectionsInput" + "target": "com.amazonaws.proton#GetTemplateSyncConfigInput" }, "output": { - "target": "com.amazonaws.proton#ListEnvironmentAccountConnectionsOutput" + "target": "com.amazonaws.proton#GetTemplateSyncConfigOutput" }, "errors": [ { @@ -3526,6 +4044,9 @@ { "target": "com.amazonaws.proton#InternalServerException" }, + { + "target": "com.amazonaws.proton#ResourceNotFoundException" + }, { "target": "com.amazonaws.proton#ThrottlingException" }, @@ -3534,77 +4055,47 @@ } ], "traits": { - "smithy.api#documentation": "View a list of environment account connections.
\nFor more information, see Environment account\n connections in the AWS Proton Administrator guide.
", - "smithy.api#paginated": { - "inputToken": "nextToken", - "outputToken": "nextToken", - "items": "environmentAccountConnections", - "pageSize": "maxResults" - }, + "smithy.api#documentation": "Get detail data for a template sync configuration.
", "smithy.api#readonly": {} } }, - "com.amazonaws.proton#ListEnvironmentAccountConnectionsInput": { + "com.amazonaws.proton#GetTemplateSyncConfigInput": { "type": "structure", "members": { - "requestedBy": { - "target": "com.amazonaws.proton#EnvironmentAccountConnectionRequesterAccountType", + "templateName": { + "target": "com.amazonaws.proton#ResourceName", "traits": { - "smithy.api#documentation": "The type of account making the ListEnvironmentAccountConnections
request.
The template name.
", "smithy.api#required": {} } }, - "environmentName": { - "target": "com.amazonaws.proton#ResourceName", + "templateType": { + "target": "com.amazonaws.proton#TemplateType", "traits": { - "smithy.api#documentation": "The environment name that's associated with each listed environment account connection.
" - } - }, - "statuses": { - "target": "com.amazonaws.proton#EnvironmentAccountConnectionStatusList", - "traits": { - "smithy.api#documentation": "The status details for each listed environment account connection.
" - } - }, - "nextToken": { - "target": "com.amazonaws.proton#NextToken", - "traits": { - "smithy.api#documentation": "A token to indicate the location of the next environment account connection in the array of environment account connections, after the\n list of environment account connections that was previously requested.
" - } - }, - "maxResults": { - "target": "com.amazonaws.proton#MaxPageResults", - "traits": { - "smithy.api#documentation": "The maximum number of environment account connections to list.
" + "smithy.api#documentation": "The template type.
", + "smithy.api#required": {} } } } }, - "com.amazonaws.proton#ListEnvironmentAccountConnectionsOutput": { + "com.amazonaws.proton#GetTemplateSyncConfigOutput": { "type": "structure", "members": { - "environmentAccountConnections": { - "target": "com.amazonaws.proton#EnvironmentAccountConnectionSummaryList", - "traits": { - "smithy.api#documentation": "An array of environment account connections with details that's returned by AWS Proton.
", - "smithy.api#required": {} - } - }, - "nextToken": { - "target": "com.amazonaws.proton#NextToken", + "templateSyncConfig": { + "target": "com.amazonaws.proton#TemplateSyncConfig", "traits": { - "smithy.api#documentation": "A token to indicate the location of the next environment account connection in the array of environment account connections, after the\n current requested list of environment account connections.
" + "smithy.api#documentation": "The template sync configuration detail data that's returned by Proton.
" } } } }, - "com.amazonaws.proton#ListEnvironmentTemplateVersions": { + "com.amazonaws.proton#GetTemplateSyncStatus": { "type": "operation", "input": { - "target": "com.amazonaws.proton#ListEnvironmentTemplateVersionsInput" + "target": "com.amazonaws.proton#GetTemplateSyncStatusInput" }, "output": { - "target": "com.amazonaws.proton#ListEnvironmentTemplateVersionsOutput" + "target": "com.amazonaws.proton#GetTemplateSyncStatusOutput" }, "errors": [ { @@ -3624,71 +4115,91 @@ } ], "traits": { - "smithy.api#documentation": "List major or minor versions of an environment template with detail data.
", - "smithy.api#paginated": { - "inputToken": "nextToken", - "outputToken": "nextToken", - "items": "templateVersions", - "pageSize": "maxResults" - }, - "smithy.api#readonly": {} + "smithy.api#documentation": "Get the status of a template sync.
" } }, - "com.amazonaws.proton#ListEnvironmentTemplateVersionsInput": { + "com.amazonaws.proton#GetTemplateSyncStatusInput": { "type": "structure", "members": { - "nextToken": { - "target": "com.amazonaws.proton#NextToken", - "traits": { - "smithy.api#documentation": "A token to indicate the location of the next major or minor version in the array of major or minor versions of an environment template,\n after the list of major or minor versions that was previously requested.
" - } - }, - "maxResults": { - "target": "com.amazonaws.proton#MaxPageResults", + "templateName": { + "target": "com.amazonaws.proton#ResourceName", "traits": { - "smithy.api#documentation": "The maximum number of major or minor versions of an environment template to list.
" + "smithy.api#documentation": "The template name.
", + "smithy.api#required": {} } }, - "templateName": { - "target": "com.amazonaws.proton#ResourceName", + "templateType": { + "target": "com.amazonaws.proton#TemplateType", "traits": { - "smithy.api#documentation": "The name of the environment template.
", + "smithy.api#documentation": "The template type.
", "smithy.api#required": {} } }, - "majorVersion": { + "templateVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "To view a list of minor of versions under a major version of an environment template, include majorVersion
.
To view a list of major versions of an environment template, exclude\n majorVersion
.
The template version.
", + "smithy.api#required": {} } } } }, - "com.amazonaws.proton#ListEnvironmentTemplateVersionsOutput": { + "com.amazonaws.proton#GetTemplateSyncStatusOutput": { "type": "structure", "members": { - "nextToken": { - "target": "com.amazonaws.proton#NextToken", + "latestSync": { + "target": "com.amazonaws.proton#ResourceSyncAttempt", "traits": { - "smithy.api#documentation": "A token to indicate the location of the next major or minor version in the array of major or minor versions of an environment template,\n after the list of major or minor versions that was previously requested.
" + "smithy.api#documentation": "The details of the last sync that's returned by Proton.
" } }, - "templateVersions": { - "target": "com.amazonaws.proton#EnvironmentTemplateVersionSummaryList", + "latestSuccessfulSync": { + "target": "com.amazonaws.proton#ResourceSyncAttempt", + "traits": { + "smithy.api#documentation": "The details of the last successful sync that's returned by Proton.
" + } + }, + "desiredState": { + "target": "com.amazonaws.proton#Revision", + "traits": { + "smithy.api#documentation": "The template sync desired state that's returned by Proton.
" + } + } + } + }, + "com.amazonaws.proton#GitBranchName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 200 + } + } + }, + "com.amazonaws.proton#InternalServerException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.proton#ErrorMessage", "traits": { - "smithy.api#documentation": "An array of major or minor versions of an environment template detail data.
", "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#documentation": "The request failed to register with the service.
", + "smithy.api#error": "server", + "smithy.api#httpError": 500, + "smithy.api#retryable": {} } }, - "com.amazonaws.proton#ListEnvironmentTemplates": { + "com.amazonaws.proton#ListEnvironmentAccountConnections": { "type": "operation", "input": { - "target": "com.amazonaws.proton#ListEnvironmentTemplatesInput" + "target": "com.amazonaws.proton#ListEnvironmentAccountConnectionsInput" }, "output": { - "target": "com.amazonaws.proton#ListEnvironmentTemplatesOutput" + "target": "com.amazonaws.proton#ListEnvironmentAccountConnectionsOutput" }, "errors": [ { @@ -3705,58 +4216,77 @@ } ], "traits": { - "smithy.api#documentation": "List environment templates.
", + "smithy.api#documentation": "View a list of environment account connections.
\nFor more information, see Environment account\n connections in the Proton Administrator guide.
", "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", - "items": "templates", + "items": "environmentAccountConnections", "pageSize": "maxResults" }, "smithy.api#readonly": {} } }, - "com.amazonaws.proton#ListEnvironmentTemplatesInput": { + "com.amazonaws.proton#ListEnvironmentAccountConnectionsInput": { "type": "structure", "members": { + "requestedBy": { + "target": "com.amazonaws.proton#EnvironmentAccountConnectionRequesterAccountType", + "traits": { + "smithy.api#documentation": "The type of account making the ListEnvironmentAccountConnections
request.
The environment name that's associated with each listed environment account connection.
" + } + }, + "statuses": { + "target": "com.amazonaws.proton#EnvironmentAccountConnectionStatusList", + "traits": { + "smithy.api#documentation": "The status details for each listed environment account connection.
" + } + }, "nextToken": { "target": "com.amazonaws.proton#NextToken", "traits": { - "smithy.api#documentation": "A token to indicate the location of the next environment template in the array of environment templates, after the list of environment\n templates that was previously requested.
" + "smithy.api#documentation": "A token to indicate the location of the next environment account connection in the array of environment account connections, after the list of\n environment account connections that was previously requested.
" } }, "maxResults": { "target": "com.amazonaws.proton#MaxPageResults", "traits": { - "smithy.api#documentation": "The maximum number of environment templates to list.
" + "smithy.api#documentation": "The maximum number of environment account connections to list.
" } } } }, - "com.amazonaws.proton#ListEnvironmentTemplatesOutput": { + "com.amazonaws.proton#ListEnvironmentAccountConnectionsOutput": { "type": "structure", "members": { - "nextToken": { - "target": "com.amazonaws.proton#NextToken", + "environmentAccountConnections": { + "target": "com.amazonaws.proton#EnvironmentAccountConnectionSummaryList", "traits": { - "smithy.api#documentation": "A token to indicate the location of the next environment template in the array of environment templates, after the current requested\n list of environment templates.
" + "smithy.api#documentation": "An array of environment account connections with details that's returned by Proton.
", + "smithy.api#required": {} } }, - "templates": { - "target": "com.amazonaws.proton#EnvironmentTemplateSummaryList", + "nextToken": { + "target": "com.amazonaws.proton#NextToken", "traits": { - "smithy.api#documentation": "An array of environment templates with detail data.
", - "smithy.api#required": {} + "smithy.api#documentation": "A token to indicate the location of the next environment account connection in the array of environment account connections, after the current\n requested list of environment account connections.
" } } } }, - "com.amazonaws.proton#ListEnvironments": { + "com.amazonaws.proton#ListEnvironmentOutputs": { "type": "operation", "input": { - "target": "com.amazonaws.proton#ListEnvironmentsInput" + "target": "com.amazonaws.proton#ListEnvironmentOutputsInput" }, "output": { - "target": "com.amazonaws.proton#ListEnvironmentsOutput" + "target": "com.amazonaws.proton#ListEnvironmentOutputsOutput" }, "errors": [ { @@ -3776,64 +4306,58 @@ } ], "traits": { - "smithy.api#documentation": "List environments with detail data summaries.
", + "smithy.api#documentation": "List the infrastructure as code outputs for your environment.
", "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", - "items": "environments", - "pageSize": "maxResults" + "items": "outputs" }, "smithy.api#readonly": {} } }, - "com.amazonaws.proton#ListEnvironmentsInput": { + "com.amazonaws.proton#ListEnvironmentOutputsInput": { "type": "structure", "members": { - "nextToken": { - "target": "com.amazonaws.proton#NextToken", - "traits": { - "smithy.api#documentation": "A token to indicate the location of the next environment in the array of environments, after the list of environments that was\n previously requested.
" - } - }, - "maxResults": { - "target": "com.amazonaws.proton#MaxPageResults", + "environmentName": { + "target": "com.amazonaws.proton#ResourceName", "traits": { - "smithy.api#documentation": "The maximum number of environments to list.
" + "smithy.api#documentation": "The environment name.
", + "smithy.api#required": {} } }, - "environmentTemplates": { - "target": "com.amazonaws.proton#EnvironmentTemplateFilterList", + "nextToken": { + "target": "com.amazonaws.proton#EmptyNextToken", "traits": { - "smithy.api#documentation": "An array of the versions of the environment template.
" + "smithy.api#documentation": "A token to indicate the location of the next environment output in the array of environment outputs, after the list of environment outputs\n that was previously requested.
" } } } }, - "com.amazonaws.proton#ListEnvironmentsOutput": { + "com.amazonaws.proton#ListEnvironmentOutputsOutput": { "type": "structure", "members": { "nextToken": { - "target": "com.amazonaws.proton#NextToken", + "target": "com.amazonaws.proton#EmptyNextToken", "traits": { - "smithy.api#documentation": "A token to indicate the location of the next environment in the array of environments, after the current requested list of\n environments.
" + "smithy.api#documentation": "A token to indicate the location of the next environment output in the array of environment outputs, after the current requested list of\n environment outputs.
" } }, - "environments": { - "target": "com.amazonaws.proton#EnvironmentSummaryList", + "outputs": { + "target": "com.amazonaws.proton#OutputsList", "traits": { - "smithy.api#documentation": "An array of environment detail data summaries.
", + "smithy.api#documentation": "An array of environment outputs with detail data.
", "smithy.api#required": {} } } } }, - "com.amazonaws.proton#ListServiceInstances": { + "com.amazonaws.proton#ListEnvironmentProvisionedResources": { "type": "operation", "input": { - "target": "com.amazonaws.proton#ListServiceInstancesInput" + "target": "com.amazonaws.proton#ListEnvironmentProvisionedResourcesInput" }, "output": { - "target": "com.amazonaws.proton#ListServiceInstancesOutput" + "target": "com.amazonaws.proton#ListEnvironmentProvisionedResourcesOutput" }, "errors": [ { @@ -3853,64 +4377,58 @@ } ], "traits": { - "smithy.api#documentation": "List service instances with summaries of detail data.
", + "smithy.api#documentation": "List the provisioned resources for your environment.
", "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", - "items": "serviceInstances", - "pageSize": "maxResults" + "items": "provisionedResources" }, "smithy.api#readonly": {} } }, - "com.amazonaws.proton#ListServiceInstancesInput": { + "com.amazonaws.proton#ListEnvironmentProvisionedResourcesInput": { "type": "structure", "members": { - "serviceName": { + "environmentName": { "target": "com.amazonaws.proton#ResourceName", "traits": { - "smithy.api#documentation": "The name of the service that the service instance belongs to.
" + "smithy.api#documentation": "The environment name.
", + "smithy.api#required": {} } }, "nextToken": { - "target": "com.amazonaws.proton#NextToken", - "traits": { - "smithy.api#documentation": "A token to indicate the location of the next service in the array of service instances, after the list of service instances that was\n previously requested.
" - } - }, - "maxResults": { - "target": "com.amazonaws.proton#MaxPageResults", + "target": "com.amazonaws.proton#EmptyNextToken", "traits": { - "smithy.api#documentation": "The maximum number of service instances to list.
" + "smithy.api#documentation": "A token to indicate the location of the next environment provisioned resource in the array of environment provisioned resources, after the\n list of environment provisioned resources that was previously requested.
" } } } }, - "com.amazonaws.proton#ListServiceInstancesOutput": { + "com.amazonaws.proton#ListEnvironmentProvisionedResourcesOutput": { "type": "structure", "members": { "nextToken": { - "target": "com.amazonaws.proton#NextToken", + "target": "com.amazonaws.proton#EmptyNextToken", "traits": { - "smithy.api#documentation": "A token to indicate the location of the next service instance in the array of service instances, after the current requested list of\n service instances.
" + "smithy.api#documentation": "A token to indicate the location of the next environment provisioned resource in the array of provisioned resources, after the current\n requested list of environment provisioned resources.
" } }, - "serviceInstances": { - "target": "com.amazonaws.proton#ServiceInstanceSummaryList", + "provisionedResources": { + "target": "com.amazonaws.proton#ProvisionedResourceList", "traits": { - "smithy.api#documentation": "An array of service instances with summaries of detail data.
", + "smithy.api#documentation": "An array of environment provisioned resources.
", "smithy.api#required": {} } } } }, - "com.amazonaws.proton#ListServiceTemplateVersions": { + "com.amazonaws.proton#ListEnvironmentTemplateVersions": { "type": "operation", "input": { - "target": "com.amazonaws.proton#ListServiceTemplateVersionsInput" + "target": "com.amazonaws.proton#ListEnvironmentTemplateVersionsInput" }, "output": { - "target": "com.amazonaws.proton#ListServiceTemplateVersionsOutput" + "target": "com.amazonaws.proton#ListEnvironmentTemplateVersionsOutput" }, "errors": [ { @@ -3930,7 +4448,7 @@ } ], "traits": { - "smithy.api#documentation": "List major or minor versions of a service template with detail data.
", + "smithy.api#documentation": "List major or minor versions of an environment template with detail data.
", "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -3940,61 +4458,61 @@ "smithy.api#readonly": {} } }, - "com.amazonaws.proton#ListServiceTemplateVersionsInput": { + "com.amazonaws.proton#ListEnvironmentTemplateVersionsInput": { "type": "structure", "members": { "nextToken": { "target": "com.amazonaws.proton#NextToken", "traits": { - "smithy.api#documentation": "A token to indicate the location of the next major or minor version in the array of major or minor versions of a service template, after\n the list of major or minor versions that was previously requested.
" + "smithy.api#documentation": "A token to indicate the location of the next major or minor version in the array of major or minor versions of an environment template, after\n the list of major or minor versions that was previously requested.
" } }, "maxResults": { "target": "com.amazonaws.proton#MaxPageResults", "traits": { - "smithy.api#documentation": "The maximum number of major or minor versions of a service template to list.
" + "smithy.api#documentation": "The maximum number of major or minor versions of an environment template to list.
" } }, "templateName": { "target": "com.amazonaws.proton#ResourceName", "traits": { - "smithy.api#documentation": "The name of the service template.
", + "smithy.api#documentation": "The name of the environment template.
", "smithy.api#required": {} } }, "majorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "To view a list of minor of versions under a major version of a service template, include majorVersion
.
To view a list of major versions of a service template, exclude\n majorVersion
.
To view a list of minor of versions under a major version of an environment template, include major Version
.
To view a list of major versions of an environment template, exclude\n major Version
.
A token to indicate the location of the next major or minor version in the array of major or minor versions of a service template, after\n the list of major or minor versions that was previously requested.
" + "smithy.api#documentation": "A token to indicate the location of the next major or minor version in the array of major or minor versions of an environment template, after\n the list of major or minor versions that was previously requested.
" } }, "templateVersions": { - "target": "com.amazonaws.proton#ServiceTemplateVersionSummaryList", + "target": "com.amazonaws.proton#EnvironmentTemplateVersionSummaryList", "traits": { - "smithy.api#documentation": "An array of major or minor versions of a service template with detail data.
", + "smithy.api#documentation": "An array of major or minor versions of an environment template detail data.
", "smithy.api#required": {} } } } }, - "com.amazonaws.proton#ListServiceTemplates": { + "com.amazonaws.proton#ListEnvironmentTemplates": { "type": "operation", "input": { - "target": "com.amazonaws.proton#ListServiceTemplatesInput" + "target": "com.amazonaws.proton#ListEnvironmentTemplatesInput" }, "output": { - "target": "com.amazonaws.proton#ListServiceTemplatesOutput" + "target": "com.amazonaws.proton#ListEnvironmentTemplatesOutput" }, "errors": [ { @@ -4011,7 +4529,7 @@ } ], "traits": { - "smithy.api#documentation": "List service templates with detail data.
", + "smithy.api#documentation": "List environment templates.
", "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -4021,48 +4539,48 @@ "smithy.api#readonly": {} } }, - "com.amazonaws.proton#ListServiceTemplatesInput": { + "com.amazonaws.proton#ListEnvironmentTemplatesInput": { "type": "structure", "members": { "nextToken": { "target": "com.amazonaws.proton#NextToken", "traits": { - "smithy.api#documentation": "A token to indicate the location of the next service template in the array of service templates, after the list of service templates\n previously requested.
" + "smithy.api#documentation": "A token to indicate the location of the next environment template in the array of environment templates, after the list of environment\n templates that was previously requested.
" } }, "maxResults": { "target": "com.amazonaws.proton#MaxPageResults", "traits": { - "smithy.api#documentation": "The maximum number of service templates to list.
" + "smithy.api#documentation": "The maximum number of environment templates to list.
" } } } }, - "com.amazonaws.proton#ListServiceTemplatesOutput": { + "com.amazonaws.proton#ListEnvironmentTemplatesOutput": { "type": "structure", "members": { "nextToken": { "target": "com.amazonaws.proton#NextToken", "traits": { - "smithy.api#documentation": "A token to indicate the location of the next service template in the array of service templates, after the current requested list of\n service templates.
" + "smithy.api#documentation": "A token to indicate the location of the next environment template in the array of environment templates, after the current requested list of\n environment templates.
" } }, "templates": { - "target": "com.amazonaws.proton#ServiceTemplateSummaryList", + "target": "com.amazonaws.proton#EnvironmentTemplateSummaryList", "traits": { - "smithy.api#documentation": "An array of service templates with detail data.
", + "smithy.api#documentation": "An array of environment templates with detail data.
", "smithy.api#required": {} } } } }, - "com.amazonaws.proton#ListServices": { + "com.amazonaws.proton#ListEnvironments": { "type": "operation", "input": { - "target": "com.amazonaws.proton#ListServicesInput" + "target": "com.amazonaws.proton#ListEnvironmentsInput" }, "output": { - "target": "com.amazonaws.proton#ListServicesOutput" + "target": "com.amazonaws.proton#ListEnvironmentsOutput" }, "errors": [ { @@ -4071,6 +4589,9 @@ { "target": "com.amazonaws.proton#InternalServerException" }, + { + "target": "com.amazonaws.proton#ResourceNotFoundException" + }, { "target": "com.amazonaws.proton#ThrottlingException" }, @@ -4079,58 +4600,64 @@ } ], "traits": { - "smithy.api#documentation": "List services with summaries of detail data.
", + "smithy.api#documentation": "List environments with detail data summaries.
", "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", - "items": "services", + "items": "environments", "pageSize": "maxResults" }, "smithy.api#readonly": {} } }, - "com.amazonaws.proton#ListServicesInput": { + "com.amazonaws.proton#ListEnvironmentsInput": { "type": "structure", "members": { "nextToken": { "target": "com.amazonaws.proton#NextToken", "traits": { - "smithy.api#documentation": "A token to indicate the location of the next service in the array of services, after the list of services that was previously\n requested.
" + "smithy.api#documentation": "A token to indicate the location of the next environment in the array of environments, after the list of environments that was previously\n requested.
" } }, "maxResults": { "target": "com.amazonaws.proton#MaxPageResults", "traits": { - "smithy.api#documentation": "The maximum number of services to list.
" + "smithy.api#documentation": "The maximum number of environments to list.
" + } + }, + "environmentTemplates": { + "target": "com.amazonaws.proton#EnvironmentTemplateFilterList", + "traits": { + "smithy.api#documentation": "An array of the versions of the environment template.
" } } } }, - "com.amazonaws.proton#ListServicesOutput": { + "com.amazonaws.proton#ListEnvironmentsOutput": { "type": "structure", "members": { "nextToken": { "target": "com.amazonaws.proton#NextToken", "traits": { - "smithy.api#documentation": "A token to indicate the location of the next service in the array of services, after the current requested list of services.
" + "smithy.api#documentation": "A token to indicate the location of the next environment in the array of environments, after the current requested list of\n environments.
" } }, - "services": { - "target": "com.amazonaws.proton#ServiceSummaryList", + "environments": { + "target": "com.amazonaws.proton#EnvironmentSummaryList", "traits": { - "smithy.api#documentation": "An array of services with summaries of detail data.
", + "smithy.api#documentation": "An array of environment detail data summaries.
", "smithy.api#required": {} } } } }, - "com.amazonaws.proton#ListTagsForResource": { + "com.amazonaws.proton#ListRepositories": { "type": "operation", "input": { - "target": "com.amazonaws.proton#ListTagsForResourceInput" + "target": "com.amazonaws.proton#ListRepositoriesInput" }, "output": { - "target": "com.amazonaws.proton#ListTagsForResourceOutput" + "target": "com.amazonaws.proton#ListRepositoriesOutput" }, "errors": [ { @@ -4150,103 +4677,223 @@ } ], "traits": { - "smithy.api#documentation": "List tags for a resource. For more information, see AWS Proton resources and tagging in the AWS Proton Administrator Guide or AWS Proton User Guide.
", + "smithy.api#documentation": "List repositories with detail data.
", "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", - "items": "tags", + "items": "repositories", "pageSize": "maxResults" }, "smithy.api#readonly": {} } }, - "com.amazonaws.proton#ListTagsForResourceInput": { + "com.amazonaws.proton#ListRepositoriesInput": { "type": "structure", "members": { - "resourceArn": { - "target": "com.amazonaws.proton#Arn", + "nextToken": { + "target": "com.amazonaws.proton#NextToken", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) of the resource for the listed tags.
", - "smithy.api#httpQuery": "resourceArn", - "smithy.api#required": {} + "smithy.api#documentation": "A token to indicate the location of the next repository in the array of repositories, after the list of repositories previously\n requested.
" } }, + "maxResults": { + "target": "com.amazonaws.proton#MaxPageResults", + "traits": { + "smithy.api#documentation": "The maximum number of repositories to list.
" + } + } + } + }, + "com.amazonaws.proton#ListRepositoriesOutput": { + "type": "structure", + "members": { "nextToken": { - "target": "smithy.api#String", + "target": "com.amazonaws.proton#NextToken", "traits": { - "smithy.api#documentation": "A token to indicate the location of the next resource tag in the array of resource tags, after the list of resource tags that was\n previously requested.
", - "smithy.api#httpQuery": "nextToken" + "smithy.api#documentation": "A token to indicate the location of the next repository in the array of repositories, after the current requested list of repositories.\n
" } }, - "maxResults": { - "target": "com.amazonaws.proton#MaxPageResults", + "repositories": { + "target": "com.amazonaws.proton#RepositorySummaryList", "traits": { - "smithy.api#documentation": "The maximum number of tags to list.
", - "smithy.api#httpQuery": "maxResults" + "smithy.api#documentation": "An array of repositories.
", + "smithy.api#required": {} } } } }, - "com.amazonaws.proton#ListTagsForResourceOutput": { + "com.amazonaws.proton#ListRepositorySyncDefinitions": { + "type": "operation", + "input": { + "target": "com.amazonaws.proton#ListRepositorySyncDefinitionsInput" + }, + "output": { + "target": "com.amazonaws.proton#ListRepositorySyncDefinitionsOutput" + }, + "errors": [ + { + "target": "com.amazonaws.proton#AccessDeniedException" + }, + { + "target": "com.amazonaws.proton#InternalServerException" + }, + { + "target": "com.amazonaws.proton#ThrottlingException" + }, + { + "target": "com.amazonaws.proton#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "List repository sync definitions with detail data.
", + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "syncDefinitions" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.proton#ListRepositorySyncDefinitionsInput": { "type": "structure", "members": { - "tags": { - "target": "com.amazonaws.proton#TagList", + "repositoryName": { + "target": "com.amazonaws.proton#RepositoryName", "traits": { - "smithy.api#documentation": "An array of resource tags with detail data.
", + "smithy.api#documentation": "The repository name.
", + "smithy.api#required": {} + } + }, + "repositoryProvider": { + "target": "com.amazonaws.proton#RepositoryProvider", + "traits": { + "smithy.api#documentation": "The repository provider.
", + "smithy.api#required": {} + } + }, + "syncType": { + "target": "com.amazonaws.proton#SyncType", + "traits": { + "smithy.api#documentation": "The sync type. The only supported value is TEMPLATE_SYNC
.
A token to indicate the location of the next resource tag in the array of resource tags, after the current requested list of resource\n tags.
" + "smithy.api#documentation": "A token to indicate the location of the next repository sync definition in the array of repository sync definitions, after the list of\n repository sync definitions previously requested.
" } } } }, - "com.amazonaws.proton#MaxPageResults": { - "type": "integer", - "traits": { - "smithy.api#box": {}, - "smithy.api#range": { - "min": 1, - "max": 100 + "com.amazonaws.proton#ListRepositorySyncDefinitionsOutput": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.proton#EmptyNextToken", + "traits": { + "smithy.api#documentation": "A token to indicate the location of the next repository sync definition in the array of repository sync definitions, after the current\n requested list of repository sync definitions.
" + } + }, + "syncDefinitions": { + "target": "com.amazonaws.proton#RepositorySyncDefinitionList", + "traits": { + "smithy.api#documentation": "An array of repository sync definitions.
", + "smithy.api#required": {} + } } } }, - "com.amazonaws.proton#NextToken": { - "type": "string", + "com.amazonaws.proton#ListServiceInstanceOutputs": { + "type": "operation", + "input": { + "target": "com.amazonaws.proton#ListServiceInstanceOutputsInput" + }, + "output": { + "target": "com.amazonaws.proton#ListServiceInstanceOutputsOutput" + }, + "errors": [ + { + "target": "com.amazonaws.proton#AccessDeniedException" + }, + { + "target": "com.amazonaws.proton#InternalServerException" + }, + { + "target": "com.amazonaws.proton#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.proton#ThrottlingException" + }, + { + "target": "com.amazonaws.proton#ValidationException" + } + ], "traits": { - "smithy.api#pattern": "^[A-Za-z0-9+=/]+$" + "smithy.api#documentation": "View a list service instance infrastructure as code outputs with detail data.
", + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "outputs" + }, + "smithy.api#readonly": {} } }, - "com.amazonaws.proton#Provisioning": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CUSTOMER_MANAGED", - "name": "CUSTOMER_MANAGED" + "com.amazonaws.proton#ListServiceInstanceOutputsInput": { + "type": "structure", + "members": { + "serviceInstanceName": { + "target": "com.amazonaws.proton#ResourceName", + "traits": { + "smithy.api#documentation": "The service instance name.
", + "smithy.api#required": {} } - ] + }, + "serviceName": { + "target": "com.amazonaws.proton#ResourceName", + "traits": { + "smithy.api#documentation": "The service name.
", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.proton#EmptyNextToken", + "traits": { + "smithy.api#documentation": "A token to indicate the location of the next output in the array of outputs, after the list of outputs that was previously requested.
" + } + } } }, - "com.amazonaws.proton#RejectEnvironmentAccountConnection": { + "com.amazonaws.proton#ListServiceInstanceOutputsOutput": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.proton#EmptyNextToken", + "traits": { + "smithy.api#documentation": "A token to indicate the location of the next output in the array of outputs, after the current requested list of outputs.
" + } + }, + "outputs": { + "target": "com.amazonaws.proton#OutputsList", + "traits": { + "smithy.api#documentation": "An array of service instance infrastructure as code outputs.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.proton#ListServiceInstanceProvisionedResources": { "type": "operation", "input": { - "target": "com.amazonaws.proton#RejectEnvironmentAccountConnectionInput" + "target": "com.amazonaws.proton#ListServiceInstanceProvisionedResourcesInput" }, "output": { - "target": "com.amazonaws.proton#RejectEnvironmentAccountConnectionOutput" + "target": "com.amazonaws.proton#ListServiceInstanceProvisionedResourcesOutput" }, "errors": [ { "target": "com.amazonaws.proton#AccessDeniedException" }, - { - "target": "com.amazonaws.proton#ConflictException" - }, { "target": "com.amazonaws.proton#InternalServerException" }, @@ -4261,74 +4908,1444 @@ } ], "traits": { - "smithy.api#documentation": "In a management account, reject an environment account connection from another environment account.
\nAfter you reject an environment account connection request, you won’t be able to accept or use the rejected\n environment account connection.
\nYou can’t reject an environment account connection that is connected to an environment.
\nFor more information, see Environment account\n connections in the AWS Proton Administrator guide.
", - "smithy.api#idempotent": {} + "smithy.api#documentation": "List provisioned resources for a service instance with details.
", + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "provisionedResources" + }, + "smithy.api#readonly": {} } }, - "com.amazonaws.proton#RejectEnvironmentAccountConnectionInput": { + "com.amazonaws.proton#ListServiceInstanceProvisionedResourcesInput": { "type": "structure", "members": { - "id": { - "target": "com.amazonaws.proton#EnvironmentAccountConnectionId", + "serviceName": { + "target": "com.amazonaws.proton#ResourceName", "traits": { - "smithy.api#documentation": "The ID of the environment account connection to reject.
", + "smithy.api#documentation": "The service name.
", + "smithy.api#required": {} + } + }, + "serviceInstanceName": { + "target": "com.amazonaws.proton#ResourceName", + "traits": { + "smithy.api#documentation": "The service instance name.
", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.proton#EmptyNextToken", + "traits": { + "smithy.api#documentation": "A token to indicate the location of the next provisioned resource in the array of provisioned resources, after the list of provisioned\n resources that was previously requested.
" + } + } + } + }, + "com.amazonaws.proton#ListServiceInstanceProvisionedResourcesOutput": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.proton#EmptyNextToken", + "traits": { + "smithy.api#documentation": "A token to indicate the location of the next provisioned resource in the array of provisioned resources, after the current requested list of\n provisioned resources.
" + } + }, + "provisionedResources": { + "target": "com.amazonaws.proton#ProvisionedResourceList", + "traits": { + "smithy.api#documentation": "An array of provisioned resources for a service instance.
", "smithy.api#required": {} } } + } + }, + "com.amazonaws.proton#ListServiceInstances": { + "type": "operation", + "input": { + "target": "com.amazonaws.proton#ListServiceInstancesInput" + }, + "output": { + "target": "com.amazonaws.proton#ListServiceInstancesOutput" }, + "errors": [ + { + "target": "com.amazonaws.proton#AccessDeniedException" + }, + { + "target": "com.amazonaws.proton#InternalServerException" + }, + { + "target": "com.amazonaws.proton#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.proton#ThrottlingException" + }, + { + "target": "com.amazonaws.proton#ValidationException" + } + ], "traits": { - "smithy.api#references": [ - { - "resource": "com.amazonaws.proton#EnvironmentAccountConnectionResource" + "smithy.api#documentation": "List service instances with summaries of detail data.
", + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "serviceInstances", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.proton#ListServiceInstancesInput": { + "type": "structure", + "members": { + "serviceName": { + "target": "com.amazonaws.proton#ResourceName", + "traits": { + "smithy.api#documentation": "The name of the service that the service instance belongs to.
" } - ] + }, + "nextToken": { + "target": "com.amazonaws.proton#NextToken", + "traits": { + "smithy.api#documentation": "A token to indicate the location of the next service in the array of service instances, after the list of service instances that was\n previously requested.
" + } + }, + "maxResults": { + "target": "com.amazonaws.proton#MaxPageResults", + "traits": { + "smithy.api#documentation": "The maximum number of service instances to list.
" + } + } } }, - "com.amazonaws.proton#RejectEnvironmentAccountConnectionOutput": { + "com.amazonaws.proton#ListServiceInstancesOutput": { "type": "structure", "members": { - "environmentAccountConnection": { - "target": "com.amazonaws.proton#EnvironmentAccountConnection", + "nextToken": { + "target": "com.amazonaws.proton#NextToken", + "traits": { + "smithy.api#documentation": "A token to indicate the location of the next service instance in the array of service instances, after the current requested list of service\n instances.
" + } + }, + "serviceInstances": { + "target": "com.amazonaws.proton#ServiceInstanceSummaryList", + "traits": { + "smithy.api#documentation": "An array of service instances with summaries of detail data.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.proton#ListServicePipelineOutputs": { + "type": "operation", + "input": { + "target": "com.amazonaws.proton#ListServicePipelineOutputsInput" + }, + "output": { + "target": "com.amazonaws.proton#ListServicePipelineOutputsOutput" + }, + "errors": [ + { + "target": "com.amazonaws.proton#AccessDeniedException" + }, + { + "target": "com.amazonaws.proton#InternalServerException" + }, + { + "target": "com.amazonaws.proton#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.proton#ThrottlingException" + }, + { + "target": "com.amazonaws.proton#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "View a list service pipeline infrastructure as code outputs with detail.
", + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "outputs" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.proton#ListServicePipelineOutputsInput": { + "type": "structure", + "members": { + "serviceName": { + "target": "com.amazonaws.proton#ResourceName", + "traits": { + "smithy.api#documentation": "The service name.
", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.proton#EmptyNextToken", + "traits": { + "smithy.api#documentation": "A token to indicate the location of the next output in the array of outputs, after the list of outputs that was previously requested.
" + } + } + } + }, + "com.amazonaws.proton#ListServicePipelineOutputsOutput": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.proton#EmptyNextToken", + "traits": { + "smithy.api#documentation": "A token to indicate the location of the next output in the array of outputs, after the current requested list of outputs.
" + } + }, + "outputs": { + "target": "com.amazonaws.proton#OutputsList", + "traits": { + "smithy.api#documentation": "An array of outputs.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.proton#ListServicePipelineProvisionedResources": { + "type": "operation", + "input": { + "target": "com.amazonaws.proton#ListServicePipelineProvisionedResourcesInput" + }, + "output": { + "target": "com.amazonaws.proton#ListServicePipelineProvisionedResourcesOutput" + }, + "errors": [ + { + "target": "com.amazonaws.proton#AccessDeniedException" + }, + { + "target": "com.amazonaws.proton#InternalServerException" + }, + { + "target": "com.amazonaws.proton#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.proton#ThrottlingException" + }, + { + "target": "com.amazonaws.proton#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "List provisioned resources for a service and pipeline with details.
", + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "provisionedResources" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.proton#ListServicePipelineProvisionedResourcesInput": { + "type": "structure", + "members": { + "serviceName": { + "target": "com.amazonaws.proton#ResourceName", + "traits": { + "smithy.api#documentation": "The service name.
", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.proton#EmptyNextToken", + "traits": { + "smithy.api#documentation": "A token to indicate the location of the next provisioned resource in the array of provisioned resources, after the list of provisioned\n resources that was previously requested.
" + } + } + } + }, + "com.amazonaws.proton#ListServicePipelineProvisionedResourcesOutput": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.proton#EmptyNextToken", + "traits": { + "smithy.api#documentation": "A token to indicate the location of the next provisioned resource in the array of provisioned resources, after the current requested list of\n provisioned resources.
" + } + }, + "provisionedResources": { + "target": "com.amazonaws.proton#ProvisionedResourceList", + "traits": { + "smithy.api#documentation": "An array of provisioned resources for a service and pipeline.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.proton#ListServiceTemplateVersions": { + "type": "operation", + "input": { + "target": "com.amazonaws.proton#ListServiceTemplateVersionsInput" + }, + "output": { + "target": "com.amazonaws.proton#ListServiceTemplateVersionsOutput" + }, + "errors": [ + { + "target": "com.amazonaws.proton#AccessDeniedException" + }, + { + "target": "com.amazonaws.proton#InternalServerException" + }, + { + "target": "com.amazonaws.proton#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.proton#ThrottlingException" + }, + { + "target": "com.amazonaws.proton#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "List major or minor versions of a service template with detail data.
", + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "templateVersions", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.proton#ListServiceTemplateVersionsInput": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.proton#NextToken", + "traits": { + "smithy.api#documentation": "A token to indicate the location of the next major or minor version in the array of major or minor versions of a service template, after the\n list of major or minor versions that was previously requested.
" + } + }, + "maxResults": { + "target": "com.amazonaws.proton#MaxPageResults", + "traits": { + "smithy.api#documentation": "The maximum number of major or minor versions of a service template to list.
" + } + }, + "templateName": { + "target": "com.amazonaws.proton#ResourceName", + "traits": { + "smithy.api#documentation": "The name of the service template.
", + "smithy.api#required": {} + } + }, + "majorVersion": { + "target": "com.amazonaws.proton#TemplateVersionPart", + "traits": { + "smithy.api#documentation": "To view a list of minor of versions under a major version of a service template, include major Version
.
To view a list of major versions of a service template, exclude\n major Version
.
A token to indicate the location of the next major or minor version in the array of major or minor versions of a service template, after the\n current requested list of service major or minor versions.
" + } + }, + "templateVersions": { + "target": "com.amazonaws.proton#ServiceTemplateVersionSummaryList", + "traits": { + "smithy.api#documentation": "An array of major or minor versions of a service template with detail data.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.proton#ListServiceTemplates": { + "type": "operation", + "input": { + "target": "com.amazonaws.proton#ListServiceTemplatesInput" + }, + "output": { + "target": "com.amazonaws.proton#ListServiceTemplatesOutput" + }, + "errors": [ + { + "target": "com.amazonaws.proton#AccessDeniedException" + }, + { + "target": "com.amazonaws.proton#InternalServerException" + }, + { + "target": "com.amazonaws.proton#ThrottlingException" + }, + { + "target": "com.amazonaws.proton#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "List service templates with detail data.
", + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "templates", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.proton#ListServiceTemplatesInput": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.proton#NextToken", + "traits": { + "smithy.api#documentation": "A token to indicate the location of the next service template in the array of service templates, after the list of service templates\n previously requested.
" + } + }, + "maxResults": { + "target": "com.amazonaws.proton#MaxPageResults", + "traits": { + "smithy.api#documentation": "The maximum number of service templates to list.
" + } + } + } + }, + "com.amazonaws.proton#ListServiceTemplatesOutput": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.proton#NextToken", + "traits": { + "smithy.api#documentation": "A token to indicate the location of the next service template in the array of service templates, after the current requested list of service\n templates.
" + } + }, + "templates": { + "target": "com.amazonaws.proton#ServiceTemplateSummaryList", + "traits": { + "smithy.api#documentation": "An array of service templates with detail data.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.proton#ListServices": { + "type": "operation", + "input": { + "target": "com.amazonaws.proton#ListServicesInput" + }, + "output": { + "target": "com.amazonaws.proton#ListServicesOutput" + }, + "errors": [ + { + "target": "com.amazonaws.proton#AccessDeniedException" + }, + { + "target": "com.amazonaws.proton#InternalServerException" + }, + { + "target": "com.amazonaws.proton#ThrottlingException" + }, + { + "target": "com.amazonaws.proton#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "List services with summaries of detail data.
", + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "services", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.proton#ListServicesInput": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.proton#NextToken", + "traits": { + "smithy.api#documentation": "A token to indicate the location of the next service in the array of services, after the list of services that was previously\n requested.
" + } + }, + "maxResults": { + "target": "com.amazonaws.proton#MaxPageResults", + "traits": { + "smithy.api#documentation": "The maximum number of services to list.
" + } + } + } + }, + "com.amazonaws.proton#ListServicesOutput": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.proton#NextToken", + "traits": { + "smithy.api#documentation": "A token to indicate the location of the next service in the array of services, after the current requested list of services.
" + } + }, + "services": { + "target": "com.amazonaws.proton#ServiceSummaryList", + "traits": { + "smithy.api#documentation": "An array of services with summaries of detail data.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.proton#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.proton#ListTagsForResourceInput" + }, + "output": { + "target": "com.amazonaws.proton#ListTagsForResourceOutput" + }, + "errors": [ + { + "target": "com.amazonaws.proton#AccessDeniedException" + }, + { + "target": "com.amazonaws.proton#InternalServerException" + }, + { + "target": "com.amazonaws.proton#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.proton#ThrottlingException" + }, + { + "target": "com.amazonaws.proton#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "List tags for a resource. For more information, see Proton resources and tagging in the Proton Administrator Guide or Proton User Guide.
", + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "tags", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.proton#ListTagsForResourceInput": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.proton#Arn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the resource for the listed tags.
", + "smithy.api#httpQuery": "resourceArn", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A token to indicate the location of the next resource tag in the array of resource tags, after the list of resource tags that was previously\n requested.
", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.proton#MaxPageResults", + "traits": { + "smithy.api#documentation": "The maximum number of tags to list.
", + "smithy.api#httpQuery": "maxResults" + } + } + } + }, + "com.amazonaws.proton#ListTagsForResourceOutput": { + "type": "structure", + "members": { + "tags": { + "target": "com.amazonaws.proton#TagList", + "traits": { + "smithy.api#documentation": "An array of resource tags with detail data.
", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A token to indicate the location of the next resource tag in the array of resource tags, after the current requested list of resource\n tags.
" + } + } + } + }, + "com.amazonaws.proton#MaxPageResults": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.proton#NextToken": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[A-Za-z0-9+=/]+$" + } + }, + "com.amazonaws.proton#NotifyResourceDeploymentStatusChange": { + "type": "operation", + "input": { + "target": "com.amazonaws.proton#NotifyResourceDeploymentStatusChangeInput" + }, + "output": { + "target": "com.amazonaws.proton#NotifyResourceDeploymentStatusChangeOutput" + }, + "errors": [ + { + "target": "com.amazonaws.proton#AccessDeniedException" + }, + { + "target": "com.amazonaws.proton#ConflictException" + }, + { + "target": "com.amazonaws.proton#InternalServerException" + }, + { + "target": "com.amazonaws.proton#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.proton#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.proton#ThrottlingException" + }, + { + "target": "com.amazonaws.proton#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Notify Proton of status changes to a provisioned resource when you use pull request provisioning. For more information, see Template bundles.
\nProvisioning by pull request is currently in feature preview and is\n only usable with Terraform based Proton Templates. To learn more about\n Amazon Web Services Feature Preview terms, see section 2 on Beta and\n Previews.
\nThe provisioned resource Amazon Resource Name (ARN).
", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.proton#ResourceDeploymentStatus", + "traits": { + "smithy.api#documentation": "The status of your provisioned resource.
", + "smithy.api#required": {} + } + }, + "outputs": { + "target": "com.amazonaws.proton#OutputsList", + "traits": { + "smithy.api#documentation": "The provisioned resource state change detail data that's returned by Proton.
", + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "deploymentId": { + "target": "com.amazonaws.proton#DeploymentId", + "traits": { + "smithy.api#documentation": "The deployment ID for your provisioned resource.
" + } + }, + "statusMessage": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The deployment status message for your provisioned resource.
", + "smithy.api#length": { + "min": 0, + "max": 5000 + }, + "smithy.api#sensitive": {} + } + } + } + }, + "com.amazonaws.proton#NotifyResourceDeploymentStatusChangeOutput": { + "type": "structure", + "members": {} + }, + "com.amazonaws.proton#Output": { + "type": "structure", + "members": { + "key": { + "target": "com.amazonaws.proton#OutputKey", + "traits": { + "smithy.api#documentation": "The output key.
" + } + }, + "valueString": { + "target": "com.amazonaws.proton#OutputValueString", + "traits": { + "smithy.api#documentation": "The output value.
" + } + } + }, + "traits": { + "smithy.api#documentation": "An infrastructure as code defined resource output.
", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.proton#OutputKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + } + } + }, + "com.amazonaws.proton#OutputValueString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + } + } + }, + "com.amazonaws.proton#OutputsList": { + "type": "list", + "member": { + "target": "com.amazonaws.proton#Output" + } + }, + "com.amazonaws.proton#PipelineRoleArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2048 + }, + "smithy.api#pattern": "(^$)|(^arn:[a-zA-Z-]+:[a-zA-Z0-9-]+:[a-zA-Z0-9-]*:\\d*:[\\w+=\\/:,\\.@-]*)" + } + }, + "com.amazonaws.proton#ProvisionedResource": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.proton#ProvisionedResourceName", + "traits": { + "smithy.api#documentation": "The provisioned resource name.
" + } + }, + "identifier": { + "target": "com.amazonaws.proton#ProvisionedResourceIdentifier", + "traits": { + "smithy.api#documentation": "The provisioned resource identifier.
" + } + }, + "provisioningEngine": { + "target": "com.amazonaws.proton#ProvisionedResourceEngine", + "traits": { + "smithy.api#documentation": "The resource provisioning engine.
\nProvisioning by pull request is currently in feature preview and is\n only usable with Terraform based Proton Templates. To learn more about\n Amazon Web Services Feature Preview terms, see section 2 on Beta and\n Previews.
\nDetail data for a provisioned resource.
" + } + }, + "com.amazonaws.proton#ProvisionedResourceEngine": { + "type": "string", + "traits": { + "smithy.api#documentation": "List of provisioning engines", + "smithy.api#enum": [ + { + "value": "CLOUDFORMATION", + "name": "CLOUDFORMATION" + }, + { + "value": "TERRAFORM", + "name": "TERRAFORM" + } + ] + } + }, + "com.amazonaws.proton#ProvisionedResourceIdentifier": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 200 + } + } + }, + "com.amazonaws.proton#ProvisionedResourceList": { + "type": "list", + "member": { + "target": "com.amazonaws.proton#ProvisionedResource" + } + }, + "com.amazonaws.proton#ProvisionedResourceName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 200 + } + } + }, + "com.amazonaws.proton#Provisioning": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CUSTOMER_MANAGED", + "name": "CUSTOMER_MANAGED" + } + ] + } + }, + "com.amazonaws.proton#RejectEnvironmentAccountConnection": { + "type": "operation", + "input": { + "target": "com.amazonaws.proton#RejectEnvironmentAccountConnectionInput" + }, + "output": { + "target": "com.amazonaws.proton#RejectEnvironmentAccountConnectionOutput" + }, + "errors": [ + { + "target": "com.amazonaws.proton#AccessDeniedException" + }, + { + "target": "com.amazonaws.proton#ConflictException" + }, + { + "target": "com.amazonaws.proton#InternalServerException" + }, + { + "target": "com.amazonaws.proton#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.proton#ThrottlingException" + }, + { + "target": "com.amazonaws.proton#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "In a management account, reject an environment account connection from another environment account.
\nAfter you reject an environment account connection request, you won’t be able to accept or use the rejected environment\n account connection.
\nYou can’t reject an environment account connection that is connected to an environment.
\nFor more information, see Environment account\n connections in the Proton Administrator guide.
", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.proton#RejectEnvironmentAccountConnectionInput": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.proton#EnvironmentAccountConnectionId", + "traits": { + "smithy.api#documentation": "The ID of the environment account connection to reject.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#references": [ + { + "resource": "com.amazonaws.proton#EnvironmentAccountConnectionResource" + } + ] + } + }, + "com.amazonaws.proton#RejectEnvironmentAccountConnectionOutput": { + "type": "structure", + "members": { + "environmentAccountConnection": { + "target": "com.amazonaws.proton#EnvironmentAccountConnection", + "traits": { + "smithy.api#documentation": "The environment connection account detail data that's returned by Proton.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.proton#Repository": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.proton#RepositoryArn", + "traits": { + "smithy.api#documentation": "The repository Amazon Resource Name (ARN).
", + "smithy.api#required": {} + } + }, + "provider": { + "target": "com.amazonaws.proton#RepositoryProvider", + "traits": { + "smithy.api#documentation": "The repository provider.
", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.proton#RepositoryName", + "traits": { + "smithy.api#documentation": "The repository name.
", + "smithy.api#required": {} + } + }, + "connectionArn": { + "target": "com.amazonaws.proton#Arn", + "traits": { + "smithy.api#documentation": "The repository Amazon Web Services CodeStar connection that connects Proton to your repository.
", + "smithy.api#required": {} + } + }, + "encryptionKey": { + "target": "com.amazonaws.proton#Arn", + "traits": { + "smithy.api#documentation": "Your customer Amazon Web Services KMS encryption key.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Detail date for a repository that has been registered with Proton.
" + } + }, + "com.amazonaws.proton#RepositoryArn": { + "type": "string", + "traits": { + "aws.api#arnReference": { + "resource": "com.amazonaws.proton#RepositoryResource" + } + } + }, + "com.amazonaws.proton#RepositoryBranch": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.proton#RepositoryArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the repository branch.
", + "smithy.api#required": {} + } + }, + "provider": { + "target": "com.amazonaws.proton#RepositoryProvider", + "traits": { + "smithy.api#documentation": "The repository provider.
", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.proton#RepositoryName", + "traits": { + "smithy.api#documentation": "The repository name.
", + "smithy.api#required": {} + } + }, + "branch": { + "target": "com.amazonaws.proton#GitBranchName", + "traits": { + "smithy.api#documentation": "The repository branch.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Detail data for a repository branch.
\nProvisioning by pull request is currently in feature preview and is\n only usable with Terraform based Proton Templates. To learn more about\n Amazon Web Services Feature Preview terms, see section 2 on Beta and\n Previews.
\nThe repository provider.
", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.proton#RepositoryName", + "traits": { + "smithy.api#documentation": "The repository name.
", + "smithy.api#required": {} + } + }, + "branch": { + "target": "com.amazonaws.proton#GitBranchName", + "traits": { + "smithy.api#documentation": "The repository branch.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Detail input data for a repository branch.
\nProvisioning by pull request is currently in feature preview and is\n only usable with Terraform based Proton Templates. To learn more about\n Amazon Web Services Feature Preview terms, see section 2 on Beta and\n Previews.
\nThe Amazon Resource Name (ARN) for a repository.
", + "smithy.api#required": {} + } + }, + "provider": { + "target": "com.amazonaws.proton#RepositoryProvider", + "traits": { + "smithy.api#documentation": "The repository provider.
", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.proton#RepositoryName", + "traits": { + "smithy.api#documentation": "The repository name.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A summary of detail data for a registered repository.
" + } + }, + "com.amazonaws.proton#RepositorySummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.proton#RepositorySummary" + } + }, + "com.amazonaws.proton#RepositorySyncAttempt": { + "type": "structure", + "members": { + "startedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The time when the sync attempt started.
", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.proton#RepositorySyncStatus", + "traits": { + "smithy.api#documentation": "The sync attempt status.
", + "smithy.api#required": {} + } + }, + "events": { + "target": "com.amazonaws.proton#RepositorySyncEvents", + "traits": { + "smithy.api#documentation": "Detail data for sync attempt events.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Detail data for a repository sync attempt activated by a push to a repository.
" + } + }, + "com.amazonaws.proton#RepositorySyncDefinition": { + "type": "structure", + "members": { + "target": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The resource that is synced to.
", + "smithy.api#required": {} + } + }, + "parent": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The resource that is synced from.
", + "smithy.api#required": {} + } + }, + "branch": { + "target": "com.amazonaws.proton#GitBranchName", + "traits": { + "smithy.api#documentation": "The repository branch.
", + "smithy.api#required": {} + } + }, + "directory": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The directory in the repository.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The repository sync definition.
" + } + }, + "com.amazonaws.proton#RepositorySyncDefinitionList": { + "type": "list", + "member": { + "target": "com.amazonaws.proton#RepositorySyncDefinition" + } + }, + "com.amazonaws.proton#RepositorySyncEvent": { + "type": "structure", + "members": { + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The type of event.
", + "smithy.api#required": {} + } + }, + "externalId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The external ID of the sync event.
" + } + }, + "time": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The time that the sync event occurred.
", + "smithy.api#required": {} + } + }, + "event": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Event detail for a repository sync attempt.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Repository sync event detail data for a sync attempt.
" + } + }, + "com.amazonaws.proton#RepositorySyncEvents": { + "type": "list", + "member": { + "target": "com.amazonaws.proton#RepositorySyncEvent" + } + }, + "com.amazonaws.proton#RepositorySyncStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "INITIATED", + "name": "INITIATED", + "documentation": " A repository sync attempt has been created and will begin soon.\n" + }, + { + "value": "IN_PROGRESS", + "name": "IN_PROGRESS", + "documentation": " A repository sync attempt has started and work is being done to reconcile the branch.\n" + }, + { + "value": "SUCCEEDED", + "name": "SUCCEEDED", + "documentation": " The repository sync attempt has completed successfully.\n" + }, + { + "value": "FAILED", + "name": "FAILED", + "documentation": " The repository sync attempt has failed.\n" + }, + { + "value": "QUEUED", + "name": "QUEUED", + "documentation": " The repository sync attempt didn't execute and was queued.\n" + } + ] + } + }, + "com.amazonaws.proton#ResourceDeploymentStatus": { + "type": "string", + "traits": { + "smithy.api#documentation": "The state that a PR-based deployment can be updated to.", + "smithy.api#enum": [ + { + "value": "IN_PROGRESS", + "name": "IN_PROGRESS" + }, + { + "value": "FAILED", + "name": "FAILED" + }, + { + "value": "SUCCEEDED", + "name": "SUCCEEDED" + } + ] + } + }, + "com.amazonaws.proton#ResourceName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + }, + "smithy.api#pattern": "^[0-9A-Za-z]+[0-9A-Za-z_\\-]*$" + } + }, + "com.amazonaws.proton#ResourceNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.proton#ErrorMessage", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The requested resource wasn't found.
", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.proton#ResourceSyncAttempt": { + "type": "structure", + "members": { + "initialRevision": { + "target": "com.amazonaws.proton#Revision", + "traits": { + "smithy.api#documentation": "Detail data for the initial repository commit, path and push.
", + "smithy.api#required": {} + } + }, + "targetRevision": { + "target": "com.amazonaws.proton#Revision", + "traits": { + "smithy.api#documentation": "Detail data for the target revision.
", + "smithy.api#required": {} + } + }, + "target": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The resource that is synced to.
", + "smithy.api#required": {} + } + }, + "startedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The time when the sync attempt started.
", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.proton#ResourceSyncStatus", + "traits": { + "smithy.api#documentation": "The status of the sync attempt.
", + "smithy.api#required": {} + } + }, + "events": { + "target": "com.amazonaws.proton#ResourceSyncEvents", + "traits": { + "smithy.api#documentation": "An array of events with detail data.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Detail data for a resource sync attempt activated by a push to a repository.
" + } + }, + "com.amazonaws.proton#ResourceSyncEvent": { + "type": "structure", + "members": { + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The type of event.
", + "smithy.api#required": {} + } + }, + "externalId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The external ID for the event.
" + } + }, + "time": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The time when the event occurred.
", + "smithy.api#required": {} + } + }, + "event": { + "target": "smithy.api#String", "traits": { - "smithy.api#documentation": "The environment connection account detail data that's returned by AWS Proton.
", + "smithy.api#documentation": "A resource sync event.
", "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#documentation": "Detail data for a resource sync event.
" } }, - "com.amazonaws.proton#RepositoryId": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 200 - } + "com.amazonaws.proton#ResourceSyncEvents": { + "type": "list", + "member": { + "target": "com.amazonaws.proton#ResourceSyncEvent" } }, - "com.amazonaws.proton#ResourceName": { + "com.amazonaws.proton#ResourceSyncStatus": { "type": "string", "traits": { - "smithy.api#length": { - "min": 1, - "max": 100 - }, - "smithy.api#pattern": "^[0-9A-Za-z]+[0-9A-Za-z_\\-]*$" + "smithy.api#enum": [ + { + "value": "INITIATED", + "name": "INITIATED", + "documentation": " A sync attempt has been created and will begin soon.\n" + }, + { + "value": "IN_PROGRESS", + "name": "IN_PROGRESS", + "documentation": " Syncing has started and work is being done to reconcile state.\n" + }, + { + "value": "SUCCEEDED", + "name": "SUCCEEDED", + "documentation": " Syncing has completed successfully.\n" + }, + { + "value": "FAILED", + "name": "FAILED", + "documentation": " Syncing has failed.\n" + } + ] } }, - "com.amazonaws.proton#ResourceNotFoundException": { + "com.amazonaws.proton#Revision": { "type": "structure", "members": { - "message": { - "target": "com.amazonaws.proton#ErrorMessage", + "repositoryName": { + "target": "com.amazonaws.proton#RepositoryName", + "traits": { + "smithy.api#documentation": "The repository name.
", + "smithy.api#required": {} + } + }, + "repositoryProvider": { + "target": "com.amazonaws.proton#RepositoryProvider", + "traits": { + "smithy.api#documentation": "The repository provider.
", + "smithy.api#required": {} + } + }, + "sha": { + "target": "com.amazonaws.proton#SHA", + "traits": { + "smithy.api#documentation": "The secure hash algorithm (SHA) hash for the revision.
", + "smithy.api#required": {} + } + }, + "directory": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The repository directory changed by a commit and push that activated the sync attempt.
", + "smithy.api#required": {} + } + }, + "branch": { + "target": "com.amazonaws.proton#GitBranchName", "traits": { + "smithy.api#documentation": "The repository branch.
", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "The requested resource wasn't found.
", - "smithy.api#error": "client", - "smithy.api#httpError": 404 + "smithy.api#documentation": "Revision detail data for a commit and push that activates a sync attempt
" } }, "com.amazonaws.proton#S3Bucket": { @@ -4372,6 +6389,15 @@ "smithy.api#documentation": "Template bundle S3 bucket data.
" } }, + "com.amazonaws.proton#SHA": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + } + } + }, "com.amazonaws.proton#Service": { "type": "structure", "members": { @@ -4445,19 +6471,19 @@ "repositoryConnectionArn": { "target": "com.amazonaws.proton#Arn", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) of the repository connection. For more information, see Set up a repository connection in the\n AWS Proton Administrator Guide and Setting up with AWS Proton in the AWS Proton\n User Guide.
" + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the repository connection. For more information, see Set up a repository connection in the Proton\n Administrator Guide and Setting up\n with Proton in the Proton User Guide.
" } }, "repositoryId": { "target": "com.amazonaws.proton#RepositoryId", "traits": { - "smithy.api#documentation": "The ID of the code repository.
" + "smithy.api#documentation": "The ID of the source code repository.
" } }, "branchName": { "target": "com.amazonaws.proton#GitBranchName", "traits": { - "smithy.api#documentation": "The name of the code repository branch that holds the code that's deployed in AWS Proton.
" + "smithy.api#documentation": "The name of the code repository branch that holds the code that's deployed in Proton.
" } } }, @@ -4535,14 +6561,14 @@ "templateMajorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "The ID of the major version of the service template that was used to create the service instance.
", + "smithy.api#documentation": "The major version of the service template that was used to create the service instance.
", "smithy.api#required": {} } }, "templateMinorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "The ID of the minor version of the service template that was used to create the service instance.
", + "smithy.api#documentation": "The minor version of the service template that was used to create the service instance.
", "smithy.api#required": {} } }, @@ -4583,6 +6609,40 @@ } } }, + "com.amazonaws.proton#ServiceInstanceOutputResource": { + "type": "resource", + "identifiers": { + "serviceName": { + "target": "com.amazonaws.proton#ResourceName" + }, + "serviceInstanceName": { + "target": "com.amazonaws.proton#ResourceName" + }, + "key": { + "target": "com.amazonaws.proton#OutputKey" + } + }, + "list": { + "target": "com.amazonaws.proton#ListServiceInstanceOutputs" + } + }, + "com.amazonaws.proton#ServiceInstanceProvisionedResourceResource": { + "type": "resource", + "identifiers": { + "serviceName": { + "target": "com.amazonaws.proton#ResourceName" + }, + "serviceInstanceName": { + "target": "com.amazonaws.proton#ResourceName" + }, + "name": { + "target": "com.amazonaws.proton#ProvisionedResourceName" + } + }, + "list": { + "target": "com.amazonaws.proton#ListServiceInstanceProvisionedResources" + } + }, "com.amazonaws.proton#ServiceInstanceResource": { "type": "resource", "identifiers": { @@ -4673,14 +6733,14 @@ "templateMajorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "The ID of the major version of a service template.
", + "smithy.api#documentation": "The service instance template major version.
", "smithy.api#required": {} } }, "templateMinorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "The ID of the minor version of a service template.
", + "smithy.api#documentation": "The service instance template minor version.
", "smithy.api#required": {} } }, @@ -4754,14 +6814,14 @@ "templateMajorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "The ID of the major version of the service template that was used to create the service pipeline.
", + "smithy.api#documentation": "The major version of the service template that was used to create the service pipeline.
", "smithy.api#required": {} } }, "templateMinorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "The ID of the minor version of the service template that was used to create the service pipeline.
", + "smithy.api#documentation": "The minor version of the service template that was used to create the service pipeline.
", "smithy.api#required": {} } }, @@ -4789,6 +6849,34 @@ "smithy.api#documentation": "The service pipeline detail data.
" } }, + "com.amazonaws.proton#ServicePipelineOutputResource": { + "type": "resource", + "identifiers": { + "serviceName": { + "target": "com.amazonaws.proton#ResourceName" + }, + "key": { + "target": "com.amazonaws.proton#OutputKey" + } + }, + "list": { + "target": "com.amazonaws.proton#ListServicePipelineOutputs" + } + }, + "com.amazonaws.proton#ServicePipelineProvisionedResourceResource": { + "type": "resource", + "identifiers": { + "serviceName": { + "target": "com.amazonaws.proton#ResourceName" + }, + "name": { + "target": "com.amazonaws.proton#ProvisionedResourceName" + } + }, + "list": { + "target": "com.amazonaws.proton#ListServicePipelineProvisionedResources" + } + }, "com.amazonaws.proton#ServicePipelineResource": { "type": "resource", "identifiers": { @@ -4811,7 +6899,7 @@ } }, "traits": { - "smithy.api#documentation": "A quota was exceeded. For more information, see AWS Proton\n Quotas in the AWS Proton Administrator Guide.
", + "smithy.api#documentation": "A quota was exceeded. For more information, see Proton Quotas in the Proton Administrator\n Guide.
", "smithy.api#error": "client", "smithy.api#httpError": 402 } @@ -5025,7 +7113,7 @@ "recommendedVersion": { "target": "com.amazonaws.proton#FullTemplateVersionNumber", "traits": { - "smithy.api#documentation": "The ID of the recommended version of the service template.
" + "smithy.api#documentation": "The recommended version of the service template.
" } }, "encryptionKey": { @@ -5037,7 +7125,7 @@ "pipelineProvisioning": { "target": "com.amazonaws.proton#Provisioning", "traits": { - "smithy.api#documentation": "If pipelineProvisioning
is true
, a service pipeline is included in the service template. Otherwise, a service\n pipeline isn't included in the service template.
If pipelineProvisioning
is true
, a service pipeline is included in the service template. Otherwise, a service\n pipeline isn't included in the service template.
The ID of the recommended version of the service template.
" + "smithy.api#documentation": "The recommended version of the service template.
" } }, "pipelineProvisioning": { "target": "com.amazonaws.proton#Provisioning", "traits": { - "smithy.api#documentation": "If pipelineProvisioning
is true
, a service pipeline is included in the service template, otherwise a service\n pipeline isn't included in the service template.
If pipelineProvisioning
is true
, a service pipeline is included in the service template, otherwise a service\n pipeline isn't included in the service template.
The ID of the latest major version that's associated with the version of a service template.
", + "smithy.api#documentation": "The latest major version that's associated with the version of a service template.
", "smithy.api#required": {} } }, "minorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "The ID of the minor version of a service template.
", + "smithy.api#documentation": "The minor version of a service template.
", "smithy.api#required": {} } }, "recommendedMinorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "The ID of the recommended minor version of the service template.
" + "smithy.api#documentation": "The recommended minor version of the service template.
" } }, "status": { @@ -5297,21 +7385,21 @@ "majorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "The ID of the latest major version that's associated with the version of a service template.
", + "smithy.api#documentation": "The latest major version that's associated with the version of a service template.
", "smithy.api#required": {} } }, "minorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "The ID of the minor version of a service template.
", + "smithy.api#documentation": "The minor version of a service template.
", "smithy.api#required": {} } }, "recommendedMinorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "The ID of the recommended minor version of the service template.
" + "smithy.api#documentation": "The recommended minor version of the service template.
" } }, "status": { @@ -5382,6 +7470,26 @@ "smithy.api#sensitive": {} } }, + "com.amazonaws.proton#Subdirectory": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 4096 + } + } + }, + "com.amazonaws.proton#SyncType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "TEMPLATE_SYNC", + "name": "TEMPLATE_SYNC" + } + ] + } + }, "com.amazonaws.proton#Tag": { "type": "structure", "members": { @@ -5466,7 +7574,7 @@ } ], "traits": { - "smithy.api#documentation": "Tag a resource. For more information, see AWS Proton resources and tagging in the AWS Proton Administrator Guide or AWS Proton User Guide.
", + "smithy.api#documentation": "Tag a resource. For more information, see Proton resources and tagging in the Proton Administrator Guide or Proton User Guide.
", "smithy.api#idempotent": {} } }, @@ -5514,6 +7622,85 @@ "smithy.api#sensitive": {} } }, + "com.amazonaws.proton#TemplateSyncConfig": { + "type": "structure", + "members": { + "templateName": { + "target": "com.amazonaws.proton#ResourceName", + "traits": { + "smithy.api#documentation": "The template name.
", + "smithy.api#required": {} + } + }, + "templateType": { + "target": "com.amazonaws.proton#TemplateType", + "traits": { + "smithy.api#documentation": "The template type.
", + "smithy.api#required": {} + } + }, + "repositoryProvider": { + "target": "com.amazonaws.proton#RepositoryProvider", + "traits": { + "smithy.api#documentation": "The repository provider.
", + "smithy.api#required": {} + } + }, + "repositoryName": { + "target": "com.amazonaws.proton#RepositoryName", + "traits": { + "smithy.api#documentation": "The name of the repository, for example myrepos/myrepo
.
The repository branch.
", + "smithy.api#required": {} + } + }, + "subdirectory": { + "target": "com.amazonaws.proton#Subdirectory", + "traits": { + "smithy.api#documentation": "A subdirectory path to your template bundle version.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The detail data for a template sync configuration.
" + } + }, + "com.amazonaws.proton#TemplateSyncConfigResource": { + "type": "resource", + "put": { + "target": "com.amazonaws.proton#CreateTemplateSyncConfig" + }, + "read": { + "target": "com.amazonaws.proton#GetTemplateSyncConfig" + }, + "update": { + "target": "com.amazonaws.proton#UpdateTemplateSyncConfig" + }, + "delete": { + "target": "com.amazonaws.proton#DeleteTemplateSyncConfig" + } + }, + "com.amazonaws.proton#TemplateType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ENVIRONMENT", + "name": "ENVIRONMENT" + }, + { + "value": "SERVICE", + "name": "SERVICE" + } + ] + } + }, "com.amazonaws.proton#TemplateVersionPart": { "type": "string", "traits": { @@ -5609,7 +7796,7 @@ } ], "traits": { - "smithy.api#documentation": "Remove a tag from a resource. For more information, see AWS Proton resources and tagging in the AWS Proton Administrator Guide or AWS Proton User Guide.
", + "smithy.api#documentation": "Remove a tag from a resource. For more information, see Proton resources and tagging in the Proton Administrator Guide or Proton User Guide.
", "smithy.api#idempotent": {} } }, @@ -5663,16 +7850,22 @@ } ], "traits": { - "smithy.api#documentation": "Update the AWS Proton pipeline service account settings.
" + "smithy.api#documentation": "Update the Proton service pipeline role or repository settings.
" } }, "com.amazonaws.proton#UpdateAccountSettingsInput": { "type": "structure", "members": { "pipelineServiceRoleArn": { - "target": "com.amazonaws.proton#Arn", + "target": "com.amazonaws.proton#PipelineRoleArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the Proton pipeline service role.
\nProvisioning by pull request is currently in feature preview and is\n only usable with Terraform based Proton Templates. To learn more about\n Amazon Web Services Feature Preview terms, see section 2 on Beta and\n Previews.
\nThe Amazon Resource Name (ARN) of the AWS Proton pipeline service role.
" + "smithy.api#documentation": "The repository that you provide with pull request provisioning.
\nProvisioning by pull request is currently in feature preview and is\n only usable with Terraform based Proton Templates. To learn more about\n Amazon Web Services Feature Preview terms, see section 2 on Beta and\n Previews.
\nThe AWS Proton pipeline service role detail data that's returned by AWS Proton.
", + "smithy.api#documentation": "The Proton pipeline service role repository detail data that's returned by Proton.
", "smithy.api#required": {} } } @@ -5718,7 +7911,7 @@ } ], "traits": { - "smithy.api#documentation": "Update an environment.
\nIf the environment is associated with an environment account connection, don't update or include the\n protonServiceRoleArn
parameter to update or connect to an environment account connection.
You can only update to a new environment account connection if it was created in the same environment account that the current\n environment account connection was created in and is associated with the current environment.
\nIf the environment isn't associated with an environment account connection, don't update or\n include the environmentAccountConnectionId
parameter to update or connect to an environment account connection.
You can update either the environmentAccountConnectionId
or protonServiceRoleArn
parameter and value. You\n can’t update both.
There are four modes for updating an environment as described in the following. The deploymentType
field defines the\n mode.
\n NONE
\n
In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated.
\n\n CURRENT_VERSION
\n
In this mode, the environment is deployed and updated with the new spec that you provide. Only requested parameters are\n updated. Don’t include minor or major version parameters when you use this\n deployment-type
.
\n MINOR_VERSION
\n
In this mode, the environment is deployed and updated with the published, recommended (latest) minor version of the current\n major version in use, by default. You can also specify a different minor version of the current major version in use.
\n\n MAJOR_VERSION
\n
In this mode, the environment is deployed and updated with the published, recommended (latest) major and minor version of\n the current template, by default. You can also specify a different major version that's higher than the major version in use\n and a minor version (optional).
\nUpdate an environment.
\nIf the environment is associated with an environment account connection, don't update or include the\n protonServiceRoleArn
and provisioningRepository
parameter to update or connect to an environment account\n connection.
You can only update to a new environment account connection if it was created in the same environment account that the current environment\n account connection was created in and is associated with the current environment.
\nIf the environment isn't associated with an environment account connection, don't update or include\n the environmentAccountConnectionId
parameter to update or connect to an environment account connection.
You can update either the environmentAccountConnectionId
or protonServiceRoleArn
parameter and value. You can’t\n update both.
If the environment was provisioned with pull request provisioning, include the provisioningRepository
parameter and omit the\n protonServiceRoleArn
and environmentAccountConnectionId
parameters.
If the environment wasn't provisioned with pull request provisioning, omit the provisioningRepository
parameter.
There are four modes for updating an environment as described in the following. The deploymentType
field defines the mode.
\n NONE
\n
In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated.
\n\n CURRENT_VERSION
\n
In this mode, the environment is deployed and updated with the new spec that you provide. Only requested parameters are updated.\n Don’t include minor or major version parameters when you use this deployment-type
.
\n MINOR_VERSION
\n
In this mode, the environment is deployed and updated with the published, recommended (latest) minor version of the current major version\n in use, by default. You can also specify a different minor version of the current major version in use.
\n\n MAJOR_VERSION
\n
In this mode, the environment is deployed and updated with the published, recommended (latest) major and minor version of the current\n template, by default. You can also specify a different major version that's higher than the major version in use and a minor version\n (optional).
\nIn an environment account, update an environment account connection to use a new IAM role.
\nFor more information, see Environment account\n connections in the AWS Proton Administrator guide.
", + "smithy.api#documentation": "In an environment account, update an environment account connection to use a new IAM role.
\nFor more information, see Environment account\n connections in the Proton Administrator guide.
", "smithy.api#idempotent": {} } }, @@ -5786,7 +7979,7 @@ "environmentAccountConnection": { "target": "com.amazonaws.proton#EnvironmentAccountConnection", "traits": { - "smithy.api#documentation": "The environment account connection detail data that's returned by AWS Proton.
", + "smithy.api#documentation": "The environment account connection detail data that's returned by Proton.
", "smithy.api#required": {} } } @@ -5817,32 +8010,38 @@ "templateMajorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "The ID of the major version of the environment to update.
" + "smithy.api#documentation": "The major version of the environment to update.
" } }, "templateMinorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "The ID of the minor version of the environment to update.
" + "smithy.api#documentation": "The minor version of the environment to update.
" } }, "protonServiceRoleArn": { "target": "com.amazonaws.proton#Arn", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) of the AWS Proton service role that allows AWS Proton to make API calls to other services your\n behalf.
" + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the Proton service role that allows Proton to make API calls to other services your behalf.
" } }, "deploymentType": { "target": "com.amazonaws.proton#DeploymentUpdateType", "traits": { - "smithy.api#documentation": "There are four modes for updating an environment as described in the following. The deploymentType
field defines the\n mode.
\n NONE
\n
In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated.
\n\n CURRENT_VERSION
\n
In this mode, the environment is deployed and updated with the new spec that you provide. Only requested parameters are\n updated. Don’t include minor or major version parameters when you use this\n deployment-type
.
\n MINOR_VERSION
\n
In this mode, the environment is deployed and updated with the published, recommended (latest) minor version of the current\n major version in use, by default. You can also specify a different minor version of the current major version in use.
\n\n MAJOR_VERSION
\n
In this mode, the environment is deployed and updated with the published, recommended (latest) major and minor version of\n the current template, by default. You can also specify a different major version that is higher than the major version in use\n and a minor version (optional).
\nThere are four modes for updating an environment as described in the following. The deploymentType
field defines the mode.
\n NONE
\n
In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated.
\n\n CURRENT_VERSION
\n
In this mode, the environment is deployed and updated with the new spec that you provide. Only requested parameters are updated.\n Don’t include minor or major version parameters when you use this deployment-type
.
\n MINOR_VERSION
\n
In this mode, the environment is deployed and updated with the published, recommended (latest) minor version of the current major version\n in use, by default. You can also specify a different minor version of the current major version in use.
\n\n MAJOR_VERSION
\n
In this mode, the environment is deployed and updated with the published, recommended (latest) major and minor version of the current\n template, by default. You can also specify a different major version that is higher than the major version in use and a minor version\n (optional).
\nThe ID of the environment account connection.
\nYou can only update to a new environment account connection if it was created in the same environment account that the current\n environment account connection was created in and is associated with the current environment.
" + "smithy.api#documentation": "The ID of the environment account connection.
\nYou can only update to a new environment account connection if it was created in the same environment account that the current environment\n account connection was created in and is associated with the current environment.
" + } + }, + "provisioningRepository": { + "target": "com.amazonaws.proton#RepositoryBranchInput", + "traits": { + "smithy.api#documentation": "The repository that you provide with pull request provisioning.
\nProvisioning by pull request is currently in feature preview and is\n only usable with Terraform based Proton Templates. To learn more about\n Amazon Web Services Feature Preview terms, see section 2 on Beta and\n Previews.
\nThe environment detail data that's returned by AWS Proton.
", + "smithy.api#documentation": "The environment detail data that's returned by Proton.
", "smithy.api#required": {} } } @@ -5935,7 +8134,7 @@ "environmentTemplate": { "target": "com.amazonaws.proton#EnvironmentTemplate", "traits": { - "smithy.api#documentation": "The environment template detail data that's returned by AWS Proton.
", + "smithy.api#documentation": "The environment template detail data that's returned by Proton.
", "smithy.api#required": {} } } @@ -5986,7 +8185,7 @@ "majorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "To update a major version of an environment template, include majorVersion
.
To update a major version of an environment template, include major Version
.
The environment template version detail data that's returned by AWS Proton.
", + "smithy.api#documentation": "The environment template version detail data that's returned by Proton.
", "smithy.api#required": {} } } @@ -6062,7 +8261,7 @@ } ], "traits": { - "smithy.api#documentation": "Edit a service description or use a spec to add and delete service instances.
\nExisting service instances and the service pipeline can't be edited using this API. They can only be\n deleted.
\nUse the description
parameter to modify the description.
Edit the spec
parameter to add or delete instances.
Edit a service description or use a spec to add and delete service instances.
\nExisting service instances and the service pipeline can't be edited using this API. They can only be deleted.
\nUse the description
parameter to modify the description.
Edit the spec
parameter to add or delete instances.
Lists the service instances to add and the existing service instances to remain. Omit the existing service instances to delete from the\n list. Don't include edits to the existing service instances or pipeline. For more information, see Edit a\n service in the AWS Proton Administrator\n Guide or the AWS Proton User Guide.
" + "smithy.api#documentation": "Lists the service instances to add and the existing service instances to remain. Omit the existing service instances to delete from the list.\n Don't include edits to the existing service instances or pipeline. For more information, see Edit a\n service in the Proton Administrator Guide or\n the Proton User Guide.
" } } }, @@ -6125,7 +8324,7 @@ } ], "traits": { - "smithy.api#documentation": "Update a service instance.
\nThere are four modes for updating a service instance as described in the following. The deploymentType
field defines the\n mode.
\n NONE
\n
In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated.
\n\n CURRENT_VERSION
\n
In this mode, the service instance is deployed and updated with the new spec that you provide. Only requested parameters are\n updated. Don’t include minor or major version parameters when you use this\n deployment-type
.
\n MINOR_VERSION
\n
In this mode, the service instance is deployed and updated with the published, recommended (latest) minor version of the\n current major version in use, by default. You can also specify a different minor version of the current major version in\n use.
\n\n MAJOR_VERSION
\n
In this mode, the service instance is deployed and updated with the published, recommended (latest) major and minor version\n of the current template, by default. You can also specify a different major version that is higher than the major version in\n use and a minor version (optional).
\nUpdate a service instance.
\nThere are four modes for updating a service instance as described in the following. The deploymentType
field defines the\n mode.
\n NONE
\n
In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated.
\n\n CURRENT_VERSION
\n
In this mode, the service instance is deployed and updated with the new spec that you provide. Only requested parameters are updated.\n Don’t include minor or major version parameters when you use this deployment-type
.
\n MINOR_VERSION
\n
In this mode, the service instance is deployed and updated with the published, recommended (latest) minor version of the current major\n version in use, by default. You can also specify a different minor version of the current major version in use.
\n\n MAJOR_VERSION
\n
In this mode, the service instance is deployed and updated with the published, recommended (latest) major and minor version of the current\n template, by default. You can also specify a different major version that is higher than the major version in use and a minor version\n (optional).
\nThe deployment type.
\nThere are four modes for updating a service instance as described in the following. The deploymentType
field defines the\n mode.
\n NONE
\n
In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated.
\n\n CURRENT_VERSION
\n
In this mode, the service instance is deployed and updated with the new spec that you provide. Only requested parameters are\n updated. Don’t include minor or major version parameters when you use this\n deployment-type
.
\n MINOR_VERSION
\n
In this mode, the service instance is deployed and updated with the published, recommended (latest) minor version of the\n current major version in use, by default. You can also specify a different minor version of the current major version in\n use.
\n\n MAJOR_VERSION
\n
In this mode, the service instance is deployed and updated with the published, recommended (latest) major and minor version\n of the current template, by default. You can also specify a different major version that is higher than the major version in\n use and a minor version (optional).
\nThe deployment type.
\nThere are four modes for updating a service instance as described in the following. The deploymentType
field defines the\n mode.
\n NONE
\n
In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated.
\n\n CURRENT_VERSION
\n
In this mode, the service instance is deployed and updated with the new spec that you provide. Only requested parameters are updated.\n Don’t include minor or major version parameters when you use this deployment-type
.
\n MINOR_VERSION
\n
In this mode, the service instance is deployed and updated with the published, recommended (latest) minor version of the current major\n version in use, by default. You can also specify a different minor version of the current major version in use.
\n\n MAJOR_VERSION
\n
In this mode, the service instance is deployed and updated with the published, recommended (latest) major and minor version of the current\n template, by default. You can also specify a different major version that is higher than the major version in use and a minor version\n (optional).
\nThe service instance summary data returned by AWS Proton.
", + "smithy.api#documentation": "The service instance summary data returned by Proton.
", "smithy.api#required": {} } } @@ -6197,7 +8396,7 @@ "service": { "target": "com.amazonaws.proton#Service", "traits": { - "smithy.api#documentation": "The service detail data that's returned by AWS Proton.
", + "smithy.api#documentation": "The service detail data that's returned by Proton.
", "smithy.api#required": {} } } @@ -6232,7 +8431,7 @@ } ], "traits": { - "smithy.api#documentation": "Update the service pipeline.
\nThere are four modes for updating a service pipeline as described in the following. The deploymentType
field defines the\n mode.
\n NONE
\n
In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated.
\n\n CURRENT_VERSION
\n
In this mode, the service pipeline is deployed and updated with the new spec that you provide. Only requested parameters are\n updated. Don’t include minor or major version parameters when you use this\n deployment-type
.
\n MINOR_VERSION
\n
In this mode, the service pipeline is deployed and updated with the published, recommended (latest) minor version of the\n current major version in use, by default. You can also specify a different minor version of the current major version in\n use.
\n\n MAJOR_VERSION
\n
In this mode, the service pipeline is deployed and updated with the published, recommended (latest) major and minor version\n of the current template by default. You can also specify a different major version that is higher than the major version in\n use and a minor version (optional).
\nUpdate the service pipeline.
\nThere are four modes for updating a service pipeline as described in the following. The deploymentType
field defines the\n mode.
\n NONE
\n
In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated.
\n\n CURRENT_VERSION
\n
In this mode, the service pipeline is deployed and updated with the new spec that you provide. Only requested parameters are updated.\n Don’t include minor or major version parameters when you use this deployment-type
.
\n MINOR_VERSION
\n
In this mode, the service pipeline is deployed and updated with the published, recommended (latest) minor version of the current major\n version in use, by default. You can also specify a different minor version of the current major version in use.
\n\n MAJOR_VERSION
\n
In this mode, the service pipeline is deployed and updated with the published, recommended (latest) major and minor version of the current\n template by default. You can also specify a different major version that is higher than the major version in use and a minor version\n (optional).
\nThe deployment type.
\nThere are four modes for updating a service pipeline as described in the following. The deploymentType
field defines the\n mode.
\n NONE
\n
In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated.
\n\n CURRENT_VERSION
\n
In this mode, the service pipeline is deployed and updated with the new spec that you provide. Only requested parameters are\n updated. Don’t include minor or major version parameters when you use this\n deployment-type
.
\n MINOR_VERSION
\n
In this mode, the service pipeline is deployed and updated with the published, recommended (latest) minor version of the\n current major version in use, by default. You can also specify a different minor version of the current major version in\n use.
\n\n MAJOR_VERSION
\n
In this mode, the service pipeline is deployed and updated with the published, recommended (latest) major and minor version\n of the current template, by default. You can also specify a different major version that is higher than the major version in\n use and a minor version (optional).
\nThe deployment type.
\nThere are four modes for updating a service pipeline as described in the following. The deploymentType
field defines the\n mode.
\n NONE
\n
In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated.
\n\n CURRENT_VERSION
\n
In this mode, the service pipeline is deployed and updated with the new spec that you provide. Only requested parameters are updated.\n Don’t include minor or major version parameters when you use this deployment-type
.
\n MINOR_VERSION
\n
In this mode, the service pipeline is deployed and updated with the published, recommended (latest) minor version of the current major\n version in use, by default. You can also specify a different minor version of the current major version in use.
\n\n MAJOR_VERSION
\n
In this mode, the service pipeline is deployed and updated with the published, recommended (latest) major and minor version of the current\n template, by default. You can also specify a different major version that is higher than the major version in use and a minor version\n (optional).
\nThe pipeline details returned by AWS Proton.
", + "smithy.api#documentation": "The pipeline details returned by Proton.
", "smithy.api#required": {} } } @@ -6364,7 +8563,7 @@ "serviceTemplate": { "target": "com.amazonaws.proton#ServiceTemplate", "traits": { - "smithy.api#documentation": "The service template detail data that's returned by AWS Proton.
", + "smithy.api#documentation": "The service template detail data that's returned by Proton.
", "smithy.api#required": {} } } @@ -6415,7 +8614,7 @@ "majorVersion": { "target": "com.amazonaws.proton#TemplateVersionPart", "traits": { - "smithy.api#documentation": "To update a major version of a service template, include majorVersion
.
To update a major version of a service template, include major Version
.
The service template version detail data that's returned by AWS Proton.
", + "smithy.api#documentation": "The service template version detail data that's returned by Proton.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.proton#UpdateTemplateSyncConfig": { + "type": "operation", + "input": { + "target": "com.amazonaws.proton#UpdateTemplateSyncConfigInput" + }, + "output": { + "target": "com.amazonaws.proton#UpdateTemplateSyncConfigOutput" + }, + "errors": [ + { + "target": "com.amazonaws.proton#AccessDeniedException" + }, + { + "target": "com.amazonaws.proton#ConflictException" + }, + { + "target": "com.amazonaws.proton#InternalServerException" + }, + { + "target": "com.amazonaws.proton#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.proton#ThrottlingException" + }, + { + "target": "com.amazonaws.proton#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Update template sync configuration parameters, except for the templateName
and templateType
.
The synced template name.
", + "smithy.api#required": {} + } + }, + "templateType": { + "target": "com.amazonaws.proton#TemplateType", + "traits": { + "smithy.api#documentation": "The synced template type.
", + "smithy.api#required": {} + } + }, + "repositoryProvider": { + "target": "com.amazonaws.proton#RepositoryProvider", + "traits": { + "smithy.api#documentation": "The repository provider.
", + "smithy.api#required": {} + } + }, + "repositoryName": { + "target": "com.amazonaws.proton#RepositoryName", + "traits": { + "smithy.api#documentation": "The name of the repository, for example myrepos/myrepo
.
The repository branch.
", "smithy.api#required": {} } + }, + "subdirectory": { + "target": "com.amazonaws.proton#Subdirectory", + "traits": { + "smithy.api#documentation": "A subdirectory path to your template bundle version. When included, limits the template bundle search to this repository directory.
" + } + } + } + }, + "com.amazonaws.proton#UpdateTemplateSyncConfigOutput": { + "type": "structure", + "members": { + "templateSyncConfig": { + "target": "com.amazonaws.proton#TemplateSyncConfig", + "traits": { + "smithy.api#documentation": "The template sync configuration detail data that's returned by Proton.
" + } } } }, diff --git a/codegen/sdk-codegen/aws-models/quicksight.2018-04-01.json b/codegen/sdk-codegen/aws-models/quicksight.2018-04-01.json index f04e89bdae6..13908731666 100644 --- a/codegen/sdk-codegen/aws-models/quicksight.2018-04-01.json +++ b/codegen/sdk-codegen/aws-models/quicksight.2018-04-01.json @@ -56,10 +56,16 @@ "traits": { "smithy.api#documentation": "The default theme for this Amazon QuickSight subscription.
" } + }, + "DefaultEmailCustomizationTemplate": { + "target": "com.amazonaws.quicksight#Arn", + "traits": { + "smithy.api#documentation": "The default email customization template.
" + } } }, "traits": { - "smithy.api#documentation": "The Amazon QuickSight customizations associated with your Amazon Web Services account or a Amazon QuickSight namespace in a specific Amazon Web Services Region.
" + "smithy.api#documentation": "The Amazon QuickSight customizations associated with your Amazon Web Services account or a QuickSight namespace in a specific Amazon Web Services Region.
" } }, "com.amazonaws.quicksight#AccountSettings": { @@ -112,7 +118,7 @@ "AssignmentName": { "target": "com.amazonaws.quicksight#IAMPolicyAssignmentName", "traits": { - "smithy.api#documentation": "A name for the IAMpolicy assignment.
" + "smithy.api#documentation": "A name for the IAM policy assignment.
" } }, "PolicyArn": { @@ -189,9 +195,13 @@ "Domain": { "target": "com.amazonaws.quicksight#Domain", "traits": { + "smithy.api#documentation": "The OpenSearch domain.
", "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#documentation": "The parameters for OpenSearch.
" } }, "com.amazonaws.quicksight#Analysis": { @@ -511,12 +521,12 @@ "Dashboard": { "target": "com.amazonaws.quicksight#AnonymousUserDashboardEmbeddingConfiguration", "traits": { - "smithy.api#documentation": "The type of embedding experience. In this case, an Amazon QuickSight dashboard.
" + "smithy.api#documentation": "The type of embedding experience. In this case, Amazon QuickSight dashboards.
" } } }, "traits": { - "smithy.api#documentation": "The type of experience you want to embed. For anonymous users, you can embed an Amazon QuickSight dashboard.
" + "smithy.api#documentation": "The type of experience you want to embed. For anonymous users, you can embed Amazon QuickSight dashboards.
" } }, "com.amazonaws.quicksight#Arn": { @@ -1135,7 +1145,7 @@ } }, "traits": { - "smithy.api#documentation": "A tag for a column in a TagColumnOperation structure. This is a\n variant type structure. For this structure to be valid, only one of the attributes can\n be non-null.
" + "smithy.api#documentation": "A tag for a column in a\n \n TagColumnOperation\n
\n structure. This is a\n variant type structure. For this structure to be valid, only one of the attributes can\n be non-null.
Creates Amazon QuickSight customizations the current Amazon Web Services Region. Currently, you can\n add a custom default theme by using the CreateAccountCustomization
or\n UpdateAccountCustomization
API operation. To further customize\n Amazon QuickSight by removing Amazon QuickSight sample assets and videos for all new users, see Customizing Amazon QuickSight in the Amazon QuickSight User\n Guide.\n
You can create customizations for your Amazon Web Services account or, if you specify a namespace, for\n a Amazon QuickSight namespace instead. Customizations that apply to a namespace always override\n customizations that apply to an Amazon Web Services account. To find out which customizations apply, use\n the DescribeAccountCustomization
API operation.
Before you use the CreateAccountCustomization
API operation to add a theme\n as the namespace default, make sure that you first share the theme with the namespace.\n If you don't share it with the namespace, the theme isn't visible to your users\n even if you make it the default theme.\n To check if the theme is shared, view the current permissions by using the\n \n DescribeThemePermissions\n
API operation.\n To share the theme, grant permissions by using the\n \n UpdateThemePermissions\n
API operation.
Creates Amazon QuickSight customizations the current Amazon Web Services Region. Currently, you can\n add a custom default theme by using the CreateAccountCustomization
or\n UpdateAccountCustomization
API operation. To further customize\n Amazon QuickSight by removing Amazon QuickSight sample assets and videos for all new users, see Customizing Amazon QuickSight in the Amazon QuickSight User\n Guide.\n
You can create customizations for your Amazon Web Services account or, if you specify a namespace, for\n a QuickSight namespace instead. Customizations that apply to a namespace always override\n customizations that apply to an Amazon Web Services account. To find out which customizations apply, use\n the DescribeAccountCustomization
API operation.
Before you use the CreateAccountCustomization
API operation to add a theme\n as the namespace default, make sure that you first share the theme with the namespace.\n If you don't share it with the namespace, the theme isn't visible to your users\n even if you make it the default theme.\n To check if the theme is shared, view the current permissions by using the\n \n DescribeThemePermissions\n
\n API operation.\n To share the theme, grant permissions by using the\n \n UpdateThemePermissions\n
\n API operation.
The Amazon QuickSight customizations you're adding in the current Amazon Web Services Region. You can add\n these to an Amazon Web Services account and a Amazon QuickSight namespace.
\nFor example, you can add a default theme by setting AccountCustomization
\n to the midnight theme: \"AccountCustomization\": { \"DefaultTheme\":\n \"arn:aws:quicksight::aws:theme/MIDNIGHT\" }
. Or, you can add a custom theme by\n specifying \"AccountCustomization\": { \"DefaultTheme\":\n \"arn:aws:quicksight:us-west-2:111122223333:theme/bdb844d0-0fe9-4d9d-b520-0fe602d93639\"\n }
.
The Amazon QuickSight customizations you're adding in the current Amazon Web Services Region. You can add\n these to an Amazon Web Services account and a QuickSight namespace.
\nFor example, you can add a default theme by setting AccountCustomization
\n to the midnight theme: \"AccountCustomization\": { \"DefaultTheme\":\n \"arn:aws:quicksight::aws:theme/MIDNIGHT\" }
. Or, you can add a custom theme by\n specifying \"AccountCustomization\": { \"DefaultTheme\":\n \"arn:aws:quicksight:us-west-2:111122223333:theme/bdb844d0-0fe9-4d9d-b520-0fe602d93639\"\n }
.
Creates a dashboard from a template. To first create a template, see the \n CreateTemplate\n
API operation.
A dashboard is an entity in Amazon QuickSight that identifies Amazon QuickSight reports, created\n from analyses. You can share Amazon QuickSight dashboards. With the right permissions, you can\n create scheduled email reports from them. If you have the correct permissions, you can\n create a dashboard from a template that exists in a different Amazon Web Services account.
", + "smithy.api#documentation": "Creates a dashboard from a template. To first create a template, see the \n \n CreateTemplate\n
\n API operation.
A dashboard is an entity in Amazon QuickSight that identifies Amazon QuickSight reports, created\n from analyses. You can share Amazon QuickSight dashboards. With the right permissions, you can\n create scheduled email reports from them. If you have the correct permissions, you can\n create a dashboard from a template that exists in a different Amazon Web Services account.
", "smithy.api#http": { "method": "POST", "uri": "/accounts/{AwsAccountId}/dashboards/{DashboardId}", @@ -1531,7 +1544,7 @@ "DashboardId": { "target": "com.amazonaws.quicksight#RestrictiveResourceId", "traits": { - "smithy.api#documentation": "The ID for the dashboard, also added to the IAMpolicy.
", + "smithy.api#documentation": "The ID for the dashboard, also added to the IAM policy.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1552,13 +1565,13 @@ "Permissions": { "target": "com.amazonaws.quicksight#ResourcePermissionList", "traits": { - "smithy.api#documentation": "A structure that contains the permissions of the dashboard. You can use this structure\n for granting permissions by providing a list of IAMaction information for each\n principal ARN.
\n\nTo specify no permissions, omit the permissions list.
" + "smithy.api#documentation": "A structure that contains the permissions of the dashboard. You can use this structure\n for granting permissions by providing a list of IAM action information for each\n principal ARN.
\n\nTo specify no permissions, omit the permissions list.
" } }, "SourceEntity": { "target": "com.amazonaws.quicksight#DashboardSourceEntity", "traits": { - "smithy.api#documentation": "The entity that you are using as a source when you create the dashboard. In\n SourceEntity
, you specify the type of object you're using as source. You\n can only create a dashboard from a template, so you use a SourceTemplate
\n entity. If you need to create a dashboard from an analysis, first convert the analysis\n to a template by using the CreateTemplate API operation. For\n SourceTemplate
, specify the Amazon Resource Name (ARN) of the source\n template. The SourceTemplate
ARN can contain any Amazon Web Services account and any\n Amazon QuickSight-supported Amazon Web Services Region.
Use the DataSetReferences
entity within SourceTemplate
to\n list the replacement datasets for the placeholders listed in the original. The schema in\n each dataset must match its placeholder.
The entity that you are using as a source when you create the dashboard. In\n SourceEntity
, you specify the type of object you're using as source. You\n can only create a dashboard from a template, so you use a SourceTemplate
\n entity. If you need to create a dashboard from an analysis, first convert the analysis\n to a template by using the \n CreateTemplate\n
\n API operation. For\n SourceTemplate
, specify the Amazon Resource Name (ARN) of the source\n template. The SourceTemplate
ARN can contain any Amazon Web Services account and any\n Amazon QuickSight-supported Amazon Web Services Region.
Use the DataSetReferences
entity within SourceTemplate
to\n list the replacement datasets for the placeholders listed in the original. The schema in\n each dataset must match its placeholder.
A set of one or more definitions of a \n ColumnLevelPermissionRule\n
.
A set of one or more definitions of a \n ColumnLevelPermissionRule\n
.
The AWS Account ID.
", + "smithy.api#documentation": "The ID for the Amazon Web Services account that contains the folder.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2062,7 +2075,7 @@ "FolderId": { "target": "com.amazonaws.quicksight#RestrictiveResourceId", "traits": { - "smithy.api#documentation": "The folder ID.
", + "smithy.api#documentation": "The ID of the folder.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2091,7 +2104,7 @@ "Status": { "target": "com.amazonaws.quicksight#StatusCode", "traits": { - "smithy.api#documentation": "The status of the folder membership. If succeeded, the status is SC_OK (200)
.
The HTTP status of the request.
" } }, "FolderMember": { @@ -2103,7 +2116,7 @@ "RequestId": { "target": "com.amazonaws.quicksight#String", "traits": { - "smithy.api#documentation": "The request ID.
" + "smithy.api#documentation": "The Amazon Web Services request ID for this operation.
" } } } @@ -2114,7 +2127,7 @@ "AwsAccountId": { "target": "com.amazonaws.quicksight#AwsAccountId", "traits": { - "smithy.api#documentation": "The AWS Account ID.
", + "smithy.api#documentation": "The ID for the Amazon Web Services account where you want to create the folder.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2122,7 +2135,7 @@ "FolderId": { "target": "com.amazonaws.quicksight#RestrictiveResourceId", "traits": { - "smithy.api#documentation": "The folder ID.
", + "smithy.api#documentation": "The ID of the folder.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2142,13 +2155,13 @@ "ParentFolderArn": { "target": "com.amazonaws.quicksight#Arn", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) for the parent folder.
\n\t\n ParentFolderArn
can be null. An empty parentFolderArn
creates a root-level folder.
The Amazon Resource Name (ARN) for the parent folder.
\n\n ParentFolderArn
can be null. An empty parentFolderArn
creates a root-level folder.
A structure that describes the principals and the resource-level permissions of a folder.
\n\tTo specify no permissions, omit Permissions
.
A structure that describes the principals and the resource-level permissions of a folder.
\nTo specify no permissions, omit Permissions
.
The status of the newly created folder. If succeeded, the status is SC_OK (200)
.
The HTTP status of the request.
", "smithy.api#httpResponseCode": {} } }, @@ -2297,7 +2310,7 @@ "AwsAccountId": { "target": "com.amazonaws.quicksight#AwsAccountId", "traits": { - "smithy.api#documentation": "The ID for the Amazon Web Services account that the group is in. Currently, you use the ID for the\n\t\t\tAmazon Web Services account that contains your Amazon QuickSight account.
", + "smithy.api#documentation": "The ID for the Amazon Web Services account that the group is in. Currently, you use the ID for the \n\t\t\tAmazon Web Services account that contains your Amazon QuickSight account.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2432,7 +2445,7 @@ } ], "traits": { - "smithy.api#documentation": "Creates an assignment with one specified IAMpolicy, identified by its Amazon Resource Name \n\t\t\t(ARN). This policy assignment is attached to the specified groups or users of Amazon QuickSight.\n\t\t\tAssignment names are unique per Amazon Web Services account. To avoid overwriting rules in other namespaces, \n\t\t\tuse assignment names that are unique.
", + "smithy.api#documentation": "Creates an assignment with one specified IAM policy, identified by its Amazon Resource Name\n\t\t\t(ARN). This policy assignment is attached to the specified groups or users of Amazon QuickSight.\n\t\t\tAssignment names are unique per Amazon Web Services account. To avoid overwriting rules in other namespaces,\n\t\t\tuse assignment names that are unique.
", "smithy.api#http": { "method": "POST", "uri": "/accounts/{AwsAccountId}/namespaces/{Namespace}/iam-policy-assignments", @@ -2446,7 +2459,7 @@ "AwsAccountId": { "target": "com.amazonaws.quicksight#AwsAccountId", "traits": { - "smithy.api#documentation": "The ID of the Amazon Web Services account where you want to assign an IAMpolicy to Amazon QuickSight users or\n\t\t\tgroups.
", + "smithy.api#documentation": "The ID of the Amazon Web Services account where you want to assign an IAM policy to Amazon QuickSight users or\n\t\t\tgroups.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2468,7 +2481,7 @@ "PolicyArn": { "target": "com.amazonaws.quicksight#Arn", "traits": { - "smithy.api#documentation": "The ARN for the IAMpolicy to apply to the Amazon QuickSight users and groups\n\t\t\tspecified in this assignment.
" + "smithy.api#documentation": "The ARN for the IAM policy to apply to the Amazon QuickSight users and groups\n\t\t\tspecified in this assignment.
" } }, "Identities": { @@ -2511,13 +2524,13 @@ "PolicyArn": { "target": "com.amazonaws.quicksight#Arn", "traits": { - "smithy.api#documentation": "The ARN for the IAMpolicy that is applied to the Amazon QuickSight users and groups specified in this assignment.
" + "smithy.api#documentation": "The ARN for the IAM policy that is applied to the Amazon QuickSight users and groups specified in this assignment.
" } }, "Identities": { "target": "com.amazonaws.quicksight#IdentityMap", "traits": { - "smithy.api#documentation": "The Amazon QuickSight users, groups, or both that the IAMpolicy is assigned to.
" + "smithy.api#documentation": "The Amazon QuickSight users, groups, or both that the IAM policy is assigned to.
" } }, "RequestId": { @@ -3191,7 +3204,7 @@ "BaseThemeId": { "target": "com.amazonaws.quicksight#RestrictiveResourceId", "traits": { - "smithy.api#documentation": "The ID of the theme that a custom theme will inherit from. All themes inherit from one of\n\t\t\tthe starting themes defined by Amazon QuickSight. For a list of the starting themes, use\n\t\t\t\tListThemes
or choose Themes from\n\t\t\twithin a Amazon QuickSight analysis.
The ID of the theme that a custom theme will inherit from. All themes inherit from one of\n\t\t\tthe starting themes defined by Amazon QuickSight. For a list of the starting themes, use\n\t\t\t\tListThemes
or choose Themes from\n\t\t\twithin an analysis.
A set of one or more definitions of a \n ColumnLevelPermissionRule\n
.
A set of one or more definitions of a \n ColumnLevelPermissionRule\n
.
Credential pair. For more information, see CredentialPair.
" + "smithy.api#documentation": "Credential pair. For more information, see\n \n CredentialPair\n
.
The parameters for OpenSearch.
" + } + }, + "ExasolParameters": { + "target": "com.amazonaws.quicksight#ExasolParameters", + "traits": { + "smithy.api#documentation": "The parameters for Exasol.
" + } } }, "traits": { @@ -4548,6 +4570,10 @@ { "value": "AMAZON_OPENSEARCH", "name": "AMAZON_OPENSEARCH" + }, + { + "value": "EXASOL", + "name": "EXASOL" } ] } @@ -4641,6 +4667,9 @@ { "target": "com.amazonaws.quicksight#AccessDeniedException" }, + { + "target": "com.amazonaws.quicksight#ConflictException" + }, { "target": "com.amazonaws.quicksight#InternalFailureException" }, @@ -5163,7 +5192,7 @@ "AwsAccountId": { "target": "com.amazonaws.quicksight#AwsAccountId", "traits": { - "smithy.api#documentation": "The AWS Account ID.
", + "smithy.api#documentation": "The ID for the Amazon Web Services account that contains the folder.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5200,13 +5229,13 @@ "Status": { "target": "com.amazonaws.quicksight#StatusCode", "traits": { - "smithy.api#documentation": "The status of deleting the asset. If succeeded, the status is SC_OK (200)
.
The HTTP status of the request.
" } }, "RequestId": { "target": "com.amazonaws.quicksight#String", "traits": { - "smithy.api#documentation": "The request ID.
" + "smithy.api#documentation": "The Amazon Web Services request ID for this operation.
" } } } @@ -5217,7 +5246,7 @@ "AwsAccountId": { "target": "com.amazonaws.quicksight#AwsAccountId", "traits": { - "smithy.api#documentation": "The AWS Account ID for the folder.
", + "smithy.api#documentation": "The ID for the Amazon Web Services account that contains the folder.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5225,7 +5254,7 @@ "FolderId": { "target": "com.amazonaws.quicksight#RestrictiveResourceId", "traits": { - "smithy.api#documentation": "The folder ID.
", + "smithy.api#documentation": "The ID of the folder.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -5238,7 +5267,7 @@ "Status": { "target": "com.amazonaws.quicksight#StatusCode", "traits": { - "smithy.api#documentation": "The status of deleting the folder. If succeeded, the status is SC_OK (200)
.
The HTTP status of the request.
", "smithy.api#httpResponseCode": {} } }, @@ -5251,13 +5280,13 @@ "FolderId": { "target": "com.amazonaws.quicksight#RestrictiveResourceId", "traits": { - "smithy.api#documentation": "The folder ID.
" + "smithy.api#documentation": "The ID of the folder.
" } }, "RequestId": { "target": "com.amazonaws.quicksight#String", "traits": { - "smithy.api#documentation": "The request ID.
" + "smithy.api#documentation": "The Amazon Web Services request ID for this operation.
" } } } @@ -5476,7 +5505,7 @@ } ], "traits": { - "smithy.api#documentation": "Deletes an existing IAMpolicy assignment.
", + "smithy.api#documentation": "Deletes an existing IAM policy assignment.
", "smithy.api#http": { "method": "DELETE", "uri": "/accounts/{AwsAccountId}/namespace/{Namespace}/iam-policy-assignments/{AssignmentName}", @@ -5490,7 +5519,7 @@ "AwsAccountId": { "target": "com.amazonaws.quicksight#AwsAccountId", "traits": { - "smithy.api#documentation": "The Amazon Web Services account ID where you want to delete the IAMpolicy assignment.
", + "smithy.api#documentation": "The Amazon Web Services account ID where you want to delete the IAM policy assignment.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6228,7 +6257,7 @@ } ], "traits": { - "smithy.api#documentation": "Describes the customizations associated with the provided Amazon Web Services account and Amazon\n Amazon QuickSight namespace in an Amazon Web Services Region. The Amazon QuickSight console evaluates which\n customizations to apply by running this API operation with the Resolved
flag\n included.
To determine what customizations display when you run this command, it can help to\n visualize the relationship of the entities involved.
\n\n Amazon Web Services account
- The Amazon Web Services account exists at the top of the hierarchy.\n It has the potential to use all of the Amazon Web Services Regions and AWS Services. When you\n subscribe to Amazon QuickSight, you choose one Amazon Web Services Region to use as your home Region.\n That's where your free SPICE capacity is located. You can use Amazon QuickSight in any\n supported Amazon Web Services Region.
\n Amazon Web Services Region
- In each Amazon Web Services Region where you sign in to Amazon QuickSight\n at least once, Amazon QuickSight acts as a separate instance of the same service. If\n you have a user directory, it resides in us-east-1, which is the US East (N.\n Virginia). Generally speaking, these users have access to Amazon QuickSight in any\n Amazon Web Services Region, unless they are constrained to a namespace.
To run the command in a different Amazon Web Services Region, you change your Region settings.\n If you're using the AWS CLI, you can use one of the following options:
\nUse command line options.
\nUse named profiles.
\nRun aws configure
to change your default Amazon Web Services Region. Use\n Enter to key the same settings for your keys. For more information, see\n Configuring the AWS CLI.
\n Namespace
- A Amazon QuickSight namespace is a partition that contains\n users and assets (data sources, datasets, dashboards, and so on). To access\n assets that are in a specific namespace, users and groups must also be part of\n the same namespace. People who share a namespace are completely isolated from\n users and assets in other namespaces, even if they are in the same Amazon Web Services account\n and Amazon Web Services Region.
\n Applied customizations
- Within an Amazon Web Services Region, a set of\n Amazon QuickSight customizations can apply to an Amazon Web Services account or to a namespace.\n Settings that you apply to a namespace override settings that you apply to an\n Amazon Web Services account. All settings are isolated to a single Amazon Web Services Region. To apply them in\n other Amazon Web Services Regions, run the CreateAccountCustomization
command in\n each Amazon Web Services Region where you want to apply the same customizations.
Describes the customizations associated with the provided Amazon Web Services account and Amazon\n Amazon QuickSight namespace in an Amazon Web Services Region. The Amazon QuickSight console evaluates which\n customizations to apply by running this API operation with the Resolved
flag\n included.
To determine what customizations display when you run this command, it can help to\n visualize the relationship of the entities involved.
\n\n Amazon Web Services account
- The Amazon Web Services account exists at the top of the hierarchy.\n It has the potential to use all of the Amazon Web Services Regions and Amazon Web Services Services. When you\n subscribe to Amazon QuickSight, you choose one Amazon Web Services Region to use as your home Region.\n That's where your free SPICE capacity is located. You can use Amazon QuickSight in any\n supported Amazon Web Services Region.
\n Amazon Web Services Region
- In each Amazon Web Services Region where you sign in to Amazon QuickSight\n at least once, Amazon QuickSight acts as a separate instance of the same service. If\n you have a user directory, it resides in us-east-1, which is the US East (N.\n Virginia). Generally speaking, these users have access to Amazon QuickSight in any\n Amazon Web Services Region, unless they are constrained to a namespace.
To run the command in a different Amazon Web Services Region, you change your Region settings.\n If you're using the CLI, you can use one of the following options:
\nUse command line options.
\nUse named profiles.
\nRun aws configure
to change your default Amazon Web Services Region. Use\n Enter to key the same settings for your keys. For more information, see\n Configuring the CLI.
\n Namespace
- A QuickSight namespace is a partition that contains\n users and assets (data sources, datasets, dashboards, and so on). To access\n assets that are in a specific namespace, users and groups must also be part of\n the same namespace. People who share a namespace are completely isolated from\n users and assets in other namespaces, even if they are in the same Amazon Web Services account\n and Amazon Web Services Region.
\n Applied customizations
- Within an Amazon Web Services Region, a set of\n Amazon QuickSight customizations can apply to an Amazon Web Services account or to a namespace.\n Settings that you apply to a namespace override settings that you apply to an\n Amazon Web Services account. All settings are isolated to a single Amazon Web Services Region. To apply them in\n other Amazon Web Services Regions, run the CreateAccountCustomization
command in\n each Amazon Web Services Region where you want to apply the same customizations.
The Amazon QuickSight settings for this Amazon Web Services account. This information includes the edition of Amazon\n Amazon QuickSight that you subscribed to (Standard or Enterprise) and the notification email for the\n Amazon QuickSight subscription. In the Amazon QuickSight console, the Amazon QuickSight subscription is sometimes\n referred to as a Amazon QuickSight \"account\" even though it's technically not an account\n by itself. Instead, it's a subscription to the Amazon QuickSight service for your Amazon Web Services account. The\n edition that you subscribe to applies to Amazon QuickSight in every Amazon Web Services Region where you use it.
" + "smithy.api#documentation": "The Amazon QuickSight settings for this Amazon Web Services account. This information includes the edition of Amazon\n Amazon QuickSight that you subscribed to (Standard or Enterprise) and the notification email for the\n Amazon QuickSight subscription. In the QuickSight console, the Amazon QuickSight subscription is sometimes\n referred to as a QuickSight \"account\" even though it's technically not an account\n by itself. Instead, it's a subscription to the Amazon QuickSight service for your Amazon Web Services account. The\n edition that you subscribe to applies to Amazon QuickSight in every Amazon Web Services Region where you use it.
" } }, "RequestId": { @@ -6637,7 +6666,7 @@ "DashboardId": { "target": "com.amazonaws.quicksight#RestrictiveResourceId", "traits": { - "smithy.api#documentation": "The ID for the dashboard, also added to the IAMpolicy.
", + "smithy.api#documentation": "The ID for the dashboard, also added to the IAM policy.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -6677,6 +6706,12 @@ "traits": { "smithy.api#documentation": "The Amazon Web Services request ID for this operation.
" } + }, + "LinkSharingConfiguration": { + "target": "com.amazonaws.quicksight#LinkSharingConfiguration", + "traits": { + "smithy.api#documentation": "A structure that contains the configuration of a shareable link that grants access to\n the dashboard. Your users can use the link to view and interact with the dashboard, if\n the dashboard has been shared with them. For more information about sharing dashboards,\n see Sharing Dashboards.
" + } } } }, @@ -7159,7 +7194,7 @@ "AwsAccountId": { "target": "com.amazonaws.quicksight#AwsAccountId", "traits": { - "smithy.api#documentation": "The AWS Account ID.
", + "smithy.api#documentation": "The ID for the Amazon Web Services account that contains the folder.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -7167,7 +7202,7 @@ "FolderId": { "target": "com.amazonaws.quicksight#RestrictiveResourceId", "traits": { - "smithy.api#documentation": "The folder ID.
", + "smithy.api#documentation": "The ID of the folder.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -7180,14 +7215,14 @@ "Status": { "target": "com.amazonaws.quicksight#StatusCode", "traits": { - "smithy.api#documentation": "The status. If succeeded, the status is SC_OK
.
The HTTP status of the request.
", "smithy.api#httpResponseCode": {} } }, "FolderId": { "target": "com.amazonaws.quicksight#RestrictiveResourceId", "traits": { - "smithy.api#documentation": "The folder ID.
" + "smithy.api#documentation": "The ID of the folder.
" } }, "Arn": { @@ -7205,7 +7240,7 @@ "RequestId": { "target": "com.amazonaws.quicksight#String", "traits": { - "smithy.api#documentation": "The request ID.
" + "smithy.api#documentation": "The Amazon Web Services request ID for this operation.
" } } } @@ -7216,7 +7251,7 @@ "AwsAccountId": { "target": "com.amazonaws.quicksight#AwsAccountId", "traits": { - "smithy.api#documentation": "The AWS account ID.
", + "smithy.api#documentation": "The ID for the Amazon Web Services account that contains the folder.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -7224,7 +7259,7 @@ "FolderId": { "target": "com.amazonaws.quicksight#RestrictiveResourceId", "traits": { - "smithy.api#documentation": "The folder ID.
", + "smithy.api#documentation": "The ID of the folder.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -7274,7 +7309,7 @@ "AwsAccountId": { "target": "com.amazonaws.quicksight#AwsAccountId", "traits": { - "smithy.api#documentation": "The AWS account ID.
", + "smithy.api#documentation": "The ID for the Amazon Web Services account that contains the folder.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -7282,7 +7317,7 @@ "FolderId": { "target": "com.amazonaws.quicksight#RestrictiveResourceId", "traits": { - "smithy.api#documentation": "The folder ID.
", + "smithy.api#documentation": "The ID of the folder.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -7295,32 +7330,32 @@ "Status": { "target": "com.amazonaws.quicksight#StatusCode", "traits": { - "smithy.api#documentation": "The status. If succeeded, the status is SC_OK
\n
The HTTP status of the request.
", "smithy.api#httpResponseCode": {} } }, "FolderId": { "target": "com.amazonaws.quicksight#RestrictiveResourceId", "traits": { - "smithy.api#documentation": "The folder ID.
" + "smithy.api#documentation": "The ID of the folder.
" } }, "Arn": { "target": "com.amazonaws.quicksight#Arn", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN).
" + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the folder.
" } }, "Permissions": { "target": "com.amazonaws.quicksight#ResourcePermissionList", "traits": { - "smithy.api#documentation": "Information about the permissions on the dashboard.
" + "smithy.api#documentation": "Information about the permissions for the folder.
" } }, "RequestId": { "target": "com.amazonaws.quicksight#String", "traits": { - "smithy.api#documentation": "The request ID.
" + "smithy.api#documentation": "The Amazon Web Services request ID for this operation.
" } } } @@ -7331,7 +7366,7 @@ "Status": { "target": "com.amazonaws.quicksight#StatusCode", "traits": { - "smithy.api#documentation": "The status. If succeeded, the status is SC_OK (200)
.
The HTTP status of the request.
", "smithy.api#httpResponseCode": {} } }, @@ -7344,7 +7379,7 @@ "RequestId": { "target": "com.amazonaws.quicksight#String", "traits": { - "smithy.api#documentation": "The request ID.
" + "smithy.api#documentation": "The Amazon Web Services request ID for this operation.
" } } } @@ -7471,7 +7506,7 @@ } ], "traits": { - "smithy.api#documentation": "Describes an existing IAMpolicy assignment, as specified by the assignment name.
", + "smithy.api#documentation": "Describes an existing IAM policy assignment, as specified by the assignment name.
", "smithy.api#http": { "method": "GET", "uri": "/accounts/{AwsAccountId}/namespaces/{Namespace}/iam-policy-assignments/{AssignmentName}", @@ -7514,7 +7549,7 @@ "IAMPolicyAssignment": { "target": "com.amazonaws.quicksight#IAMPolicyAssignment", "traits": { - "smithy.api#documentation": "Information describing the IAMpolicy assignment.
" + "smithy.api#documentation": "Information describing the IAM policy assignment.
" } }, "RequestId": { @@ -7648,7 +7683,7 @@ } ], "traits": { - "smithy.api#documentation": "Provides a summary and status of IP Rules.
", + "smithy.api#documentation": "Provides a summary and status of IP rules.
", "smithy.api#http": { "method": "GET", "uri": "/accounts/{AwsAccountId}/ip-restriction", @@ -7662,7 +7697,7 @@ "AwsAccountId": { "target": "com.amazonaws.quicksight#AwsAccountId", "traits": { - "smithy.api#documentation": "Your AWS account ID.
", + "smithy.api#documentation": "The ID of the Amazon Web Services account that contains the IP rules.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -7675,31 +7710,31 @@ "AwsAccountId": { "target": "com.amazonaws.quicksight#AwsAccountId", "traits": { - "smithy.api#documentation": "Your AWS account ID.
" + "smithy.api#documentation": "The ID of the Amazon Web Services account that contains the IP rules.
" } }, "IpRestrictionRuleMap": { "target": "com.amazonaws.quicksight#IpRestrictionRuleMap", "traits": { - "smithy.api#documentation": "Describes the IP rules with CIDR range and description.
" + "smithy.api#documentation": "A map that describes the IP rules with CIDR range and description.
" } }, "Enabled": { "target": "com.amazonaws.quicksight#NullableBoolean", "traits": { - "smithy.api#documentation": "Whether or not IP rules are enabled.
" + "smithy.api#documentation": "A value that specifies whether IP rules are turned on.
" } }, "RequestId": { "target": "com.amazonaws.quicksight#String", "traits": { - "smithy.api#documentation": "The ID of the describe request.
" + "smithy.api#documentation": "The Amazon Web Services request ID for this operation.
" } }, "Status": { "target": "com.amazonaws.quicksight#StatusCode", "traits": { - "smithy.api#documentation": "The status of a set of IP restrictions. A successful request returns a 200 status code.
", + "smithy.api#documentation": "The HTTP status of the request.
", "smithy.api#httpResponseCode": {} } } @@ -8558,6 +8593,28 @@ "smithy.api#documentation": "Error information for the SPICE ingestion of a dataset.
" } }, + "com.amazonaws.quicksight#ExasolParameters": { + "type": "structure", + "members": { + "Host": { + "target": "com.amazonaws.quicksight#Host", + "traits": { + "smithy.api#documentation": "The hostname or IP address of the Exasol data source.
", + "smithy.api#required": {} + } + }, + "Port": { + "target": "com.amazonaws.quicksight#Port", + "traits": { + "smithy.api#documentation": "The port for the Exasol data source.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The required parameters for connecting to an Exasol data source.
" + } + }, "com.amazonaws.quicksight#ExceptionResourceType": { "type": "string", "traits": { @@ -8734,13 +8791,13 @@ "FolderId": { "target": "com.amazonaws.quicksight#RestrictiveResourceId", "traits": { - "smithy.api#documentation": "The folder ID.
" + "smithy.api#documentation": "The ID of the folder.
" } }, "Arn": { "target": "com.amazonaws.quicksight#Arn", "traits": { - "smithy.api#documentation": "The folder Amazon Resource Name (ARN).
" + "smithy.api#documentation": "The Amazon Resource Name (ARN) for the folder.
" } }, "Name": { @@ -8752,13 +8809,13 @@ "FolderType": { "target": "com.amazonaws.quicksight#FolderType", "traits": { - "smithy.api#documentation": "The type of the folder.
" + "smithy.api#documentation": "The type of folder it is.
" } }, "FolderPath": { "target": "com.amazonaws.quicksight#Path", "traits": { - "smithy.api#documentation": "An array of ancestor folder ARN strings.
" + "smithy.api#documentation": "An array of ancestor ARN strings for the folder.
" } }, "CreatedTime": { @@ -8775,7 +8832,7 @@ } }, "traits": { - "smithy.api#documentation": "A folder.
" + "smithy.api#documentation": "A folder in Amazon QuickSight.
" } }, "com.amazonaws.quicksight#FolderColumnList": { @@ -8807,18 +8864,18 @@ "MemberId": { "target": "com.amazonaws.quicksight#RestrictiveResourceId", "traits": { - "smithy.api#documentation": "The ID of the asset.
" + "smithy.api#documentation": "The ID of an asset in the folder.
" } }, "MemberType": { "target": "com.amazonaws.quicksight#MemberType", "traits": { - "smithy.api#documentation": "The type of the asset.
" + "smithy.api#documentation": "The type of asset that it is.
" } } }, "traits": { - "smithy.api#documentation": "An asset in a folder, such as a dashboard, analysis, or dataset.
" + "smithy.api#documentation": "An asset in a Amazon QuickSight folder, such as a dashboard, analysis, or dataset.
" } }, "com.amazonaws.quicksight#FolderMemberList": { @@ -8848,13 +8905,13 @@ "Operator": { "target": "com.amazonaws.quicksight#FilterOperator", "traits": { - "smithy.api#documentation": "The comparison operator that you want to use as a filter. For example, \"Operator\": \"StringEquals\"
.
The comparison operator that you want to use in the filter. For example, \"Operator\": \"StringEquals\"
.
The name of the value that you want to use as a filter. For example, \"Name\": \"PARENT_FOLDER_ARN\"
.
The name of a value that you want to use in the filter. For example, \"Name\": \"PARENT_FOLDER_ARN\"
.
Searches a folder by a filter.
" + "smithy.api#documentation": "A filter to use to search a Amazon QuickSight folder.
" } }, "com.amazonaws.quicksight#FolderSearchFilterList": { @@ -8886,13 +8943,13 @@ "Arn": { "target": "com.amazonaws.quicksight#Arn", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN).
" + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the folder.
" } }, "FolderId": { "target": "com.amazonaws.quicksight#RestrictiveResourceId", "traits": { - "smithy.api#documentation": "The folder ID.
" + "smithy.api#documentation": "The ID of the folder.
" } }, "Name": { @@ -8921,7 +8978,7 @@ } }, "traits": { - "smithy.api#documentation": "A summary of the folder.
" + "smithy.api#documentation": "A summary of information about an existing Amazon QuickSight folder.
" } }, "com.amazonaws.quicksight#FolderSummaryList": { @@ -9136,7 +9193,7 @@ "ExperienceConfiguration": { "target": "com.amazonaws.quicksight#RegisteredUserEmbeddingExperienceConfiguration", "traits": { - "smithy.api#documentation": "The experience you are embedding. For registered users, you can embed Amazon QuickSight dashboards, the entire Amazon QuickSight console, or the Amazon QuickSight Q search bar.
", + "smithy.api#documentation": "The experience you are embedding. For registered users, you can embed Amazon QuickSight dashboards or the entire Amazon QuickSight console.
", "smithy.api#required": {} } } @@ -9148,7 +9205,7 @@ "EmbedUrl": { "target": "com.amazonaws.quicksight#EmbeddingUrl", "traits": { - "smithy.api#documentation": "The embed URL for the Amazon QuickSight dashboard, console, or Q search bar.
", + "smithy.api#documentation": "The embed URL for the Amazon QuickSight dashboard or console.
", "smithy.api#required": {} } }, @@ -9357,7 +9414,7 @@ "UserArn": { "target": "com.amazonaws.quicksight#Arn", "traits": { - "smithy.api#documentation": "The Amazon QuickSight user's Amazon Resource Name (ARN), for use with QUICKSIGHT
identity type.\n\t\t\tYou can use this for any Amazon QuickSight users in your account (readers, authors, or\n\t\t\tadmins) authenticated as one of the following:
Active Directory (AD) users or group members
\n\t\t\tInvited nonfederated users
\n\t\t\tIAMusers and IAMrole-based sessions authenticated through Federated Single Sign-On using\n\t\t\t\t\tSAML, OpenID Connect, or IAMfederation.
\n\t\t\tOmit this parameter for users in the third group – IAMusers and IAM\n role-based sessions.
", + "smithy.api#documentation": "The Amazon QuickSight user's Amazon Resource Name (ARN), for use with QUICKSIGHT
identity type.\n\t\t\tYou can use this for any Amazon QuickSight users in your account (readers, authors, or\n\t\t\tadmins) authenticated as one of the following:
Active Directory (AD) users or group members
\n\t\t\tInvited nonfederated users
\n\t\t\tIAM users and IAM role-based sessions authenticated through Federated Single Sign-On using\n\t\t\t\t\tSAML, OpenID Connect, or IAM federation.
\n\t\t\tOmit this parameter for users in the third group – IAM users and IAM\n role-based sessions.
", "smithy.api#httpQuery": "user-arn" } }, @@ -9371,7 +9428,7 @@ "AdditionalDashboardIds": { "target": "com.amazonaws.quicksight#AdditionalDashboardIdList", "traits": { - "smithy.api#documentation": "A list of one or more dashboard IDs that you want to add to a session that includes\n anonymous users. The IdentityType
parameter must be set to\n ANONYMOUS
for this to work, because other identity types authenticate\n as Amazon QuickSight or IAMusers. For example, if you set \"--dashboard-id dash_id1\n --dashboard-id dash_id2 dash_id3 identity-type ANONYMOUS
\", the session\n can access all three dashboards.
A list of one or more dashboard IDs that you want to add to a session that includes\n anonymous users. The IdentityType
parameter must be set to\n ANONYMOUS
for this to work, because other identity types authenticate\n as Amazon QuickSight or IAM users. For example, if you set \"--dashboard-id dash_id1\n --dashboard-id dash_id2 dash_id3 identity-type ANONYMOUS
\", the session\n can access all three dashboards.
Generates a session URL and authorization code that you can use to embed the Amazon\n Amazon QuickSight console in your web server code. Use GetSessionEmbedUrl
where\n you want to provide an authoring portal that allows users to create data sources,\n datasets, analyses, and dashboards. The users who access an embedded Amazon QuickSight console\n need belong to the author or admin security cohort. If you want to restrict permissions\n to some of these features, add a custom permissions profile to the user with the\n \n UpdateUser\n
API operation. Use \n RegisterUser\n
API operation to add a new user with a custom permission profile attached. For more\n information, see the following sections in the Amazon QuickSight User\n Guide:
\n Embedding Analytics\n
\nGenerates a session URL and authorization code that you can use to embed the Amazon\n Amazon QuickSight console in your web server code. Use GetSessionEmbedUrl
where\n you want to provide an authoring portal that allows users to create data sources,\n datasets, analyses, and dashboards. The users who access an embedded Amazon QuickSight console\n need belong to the author or admin security cohort. If you want to restrict permissions\n to some of these features, add a custom permissions profile to the user with the\n \n UpdateUser\n
API operation. Use \n RegisterUser\n
\n API operation to add a new user with a custom permission profile attached. For more\n information, see the following sections in the Amazon QuickSight User\n Guide:
\n Embedding Analytics\n
\nThe Amazon Resource Name (ARN) for the IAMpolicy.
" + "smithy.api#documentation": "The Amazon Resource Name (ARN) for the IAM policy.
" } }, "Identities": { @@ -9700,7 +9757,7 @@ } }, "traits": { - "smithy.api#documentation": "IAMpolicy assignment summary.
" + "smithy.api#documentation": "IAM policy assignment summary.
" } }, "com.amazonaws.quicksight#IAMPolicyAssignmentSummaryList": { @@ -10458,6 +10515,20 @@ "smithy.api#httpError": 409 } }, + "com.amazonaws.quicksight#LinkSharingConfiguration": { + "type": "structure", + "members": { + "Permissions": { + "target": "com.amazonaws.quicksight#ResourcePermissionList", + "traits": { + "smithy.api#documentation": "A structure that contains the permissions of a shareable link.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A structure that contains the configuration of a shareable link to the dashboard.
" + } + }, "com.amazonaws.quicksight#ListAnalyses": { "type": "operation", "input": { @@ -10994,7 +11065,7 @@ "AwsAccountId": { "target": "com.amazonaws.quicksight#AwsAccountId", "traits": { - "smithy.api#documentation": "The AWS account ID.
", + "smithy.api#documentation": "The ID for the Amazon Web Services account that contains the folder.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -11002,7 +11073,7 @@ "FolderId": { "target": "com.amazonaws.quicksight#RestrictiveResourceId", "traits": { - "smithy.api#documentation": "The folder ID.
", + "smithy.api#documentation": "The ID of the folder.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -11030,7 +11101,7 @@ "Status": { "target": "com.amazonaws.quicksight#StatusCode", "traits": { - "smithy.api#documentation": "The status. If succeeded, the status is SC_OK
\n
The HTTP status of the request.
", "smithy.api#httpResponseCode": {} } }, @@ -11049,7 +11120,7 @@ "RequestId": { "target": "com.amazonaws.quicksight#String", "traits": { - "smithy.api#documentation": "The request ID.
" + "smithy.api#documentation": "The Amazon Web Services request ID for this operation.
" } } } @@ -11100,7 +11171,7 @@ "AwsAccountId": { "target": "com.amazonaws.quicksight#AwsAccountId", "traits": { - "smithy.api#documentation": "The AWS account ID.
", + "smithy.api#documentation": "The ID for the Amazon Web Services account that contains the folder.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -11128,14 +11199,14 @@ "Status": { "target": "com.amazonaws.quicksight#StatusCode", "traits": { - "smithy.api#documentation": "The status. If succeeded, the status is SC_OK
\n
The HTTP status of the request.
", "smithy.api#httpResponseCode": {} } }, "FolderSummaryList": { "target": "com.amazonaws.quicksight#FolderSummaryList", "traits": { - "smithy.api#documentation": "A structure that contains all of the folders in your AWS account. This structure provides basic information about the folders.
" + "smithy.api#documentation": "A structure that contains all of the folders in the Amazon Web Services account. This structure provides basic information about the folders.
" } }, "NextToken": { @@ -11147,7 +11218,7 @@ "RequestId": { "target": "com.amazonaws.quicksight#String", "traits": { - "smithy.api#documentation": "The request ID.
" + "smithy.api#documentation": "The Amazon Web Services request ID for this operation.
" } } } @@ -11407,7 +11478,7 @@ } ], "traits": { - "smithy.api#documentation": "Lists IAMpolicy assignments in the current Amazon QuickSight account.
", + "smithy.api#documentation": "Lists IAM policy assignments in the current Amazon QuickSight account.
", "smithy.api#http": { "method": "GET", "uri": "/accounts/{AwsAccountId}/namespaces/{Namespace}/iam-policy-assignments", @@ -11447,7 +11518,7 @@ } ], "traits": { - "smithy.api#documentation": "Lists all the IAMpolicy assignments, including the Amazon Resource Names (ARNs) for the IAM\n\t\t\tpolicies assigned to the specified user and group or groups that the user belongs\n\t\t\tto.
", + "smithy.api#documentation": "Lists all the IAM policy assignments, including the Amazon Resource Names (ARNs) for the IAM\n\t\t\tpolicies assigned to the specified user and group or groups that the user belongs\n\t\t\tto.
", "smithy.api#http": { "method": "GET", "uri": "/accounts/{AwsAccountId}/namespaces/{Namespace}/users/{UserName}/iam-policy-assignments", @@ -11535,7 +11606,7 @@ "AwsAccountId": { "target": "com.amazonaws.quicksight#AwsAccountId", "traits": { - "smithy.api#documentation": "The ID of the Amazon Web Services account that contains these IAMpolicy assignments.
", + "smithy.api#documentation": "The ID of the Amazon Web Services account that contains these IAM policy assignments.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -11577,7 +11648,7 @@ "IAMPolicyAssignments": { "target": "com.amazonaws.quicksight#IAMPolicyAssignmentSummaryList", "traits": { - "smithy.api#documentation": "Information describing the IAMpolicy assignments.
" + "smithy.api#documentation": "Information describing the IAM policy assignments.
" } }, "NextToken": { @@ -12941,7 +13012,7 @@ } }, "traits": { - "smithy.api#documentation": "An object that consists of the member Amazon Resource Name (ARN) and member ID.
" + "smithy.api#documentation": "An object that consists of a member Amazon Resource Name (ARN) and a member ID.
" } }, "com.amazonaws.quicksight#MemberType": { @@ -13503,6 +13574,21 @@ }, "com.amazonaws.quicksight#QuickSight_20180401": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "QuickSight", + "arnNamespace": "quicksight", + "cloudFormationName": "QuickSight", + "cloudTrailEventSource": "quicksight.amazonaws.com", + "endpointPrefix": "quicksight" + }, + "aws.auth#sigv4": { + "name": "quicksight" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "Amazon QuickSight is a fully managed, serverless business intelligence service for the\n Amazon Web Services Cloud that makes it easy to extend data and insights to every user in your\n organization. This API reference contains documentation for a programming interface that\n you can use to manage Amazon QuickSight.
", + "smithy.api#title": "Amazon QuickSight" + }, "version": "2018-04-01", "operations": [ { @@ -13850,22 +13936,7 @@ { "target": "com.amazonaws.quicksight#UpdateUser" } - ], - "traits": { - "aws.api#service": { - "sdkId": "QuickSight", - "arnNamespace": "quicksight", - "cloudFormationName": "QuickSight", - "cloudTrailEventSource": "quicksight.amazonaws.com", - "endpointPrefix": "quicksight" - }, - "aws.auth#sigv4": { - "name": "quicksight" - }, - "aws.protocols#restJson1": {}, - "smithy.api#documentation": "Amazon QuickSight is a fully managed, serverless business intelligence service for the\n Amazon Web Services Cloud that makes it easy to extend data and insights to every user in your\n organization. This API reference contains documentation for a programming interface that\n you can use to manage Amazon QuickSight.
", - "smithy.api#title": "Amazon QuickSight" - } + ] }, "com.amazonaws.quicksight#RdsParameters": { "type": "structure", @@ -13970,7 +14041,7 @@ } ], "traits": { - "smithy.api#documentation": "Creates an Amazon QuickSight user, whose identity is associated with the AWS Identity\n\t\t\tand Access Management (IAM) identity or role specified in the request.
", + "smithy.api#documentation": "Creates an Amazon QuickSight user, whose identity is associated with the Identity and Access Management (IAM) identity or role specified in the request.
", "smithy.api#http": { "method": "POST", "uri": "/accounts/{AwsAccountId}/namespaces/{Namespace}/users", @@ -13984,7 +14055,7 @@ "IdentityType": { "target": "com.amazonaws.quicksight#IdentityType", "traits": { - "smithy.api#documentation": "Amazon QuickSight supports several ways of managing the identity of users. This\n\t\t\tparameter accepts two values:
\n\t\t\n IAM
: A user whose identity maps to an existing IAMuser or role.\n\t\t\t\t
\n QUICKSIGHT
: A user whose identity is owned and managed internally by\n\t\t\t\t\tAmazon QuickSight.
Amazon QuickSight supports several ways of managing the identity of users. This\n\t\t\tparameter accepts two values:
\n\t\t\n IAM
: A user whose identity maps to an existing IAM user or role.\n\t\t\t\t
\n QUICKSIGHT
: A user whose identity is owned and managed internally by\n\t\t\t\t\tAmazon QuickSight.
The ARN of the IAMuser or role that you are registering with Amazon QuickSight.
" + "smithy.api#documentation": "The ARN of the IAM user or role that you are registering with Amazon QuickSight.
" } }, "SessionName": { "target": "com.amazonaws.quicksight#RoleSessionName", "traits": { - "smithy.api#documentation": "You need to use this parameter only when you register one or more users using an assumed\n\t\t\tIAMrole. You don't need to provide the session name for other scenarios, for example when\n\t\t\tyou are registering an IAMuser or an Amazon QuickSight user. You can register multiple\n\t\t\tusers using the same IAMrole if each user has a different session name. For more\n\t\t\tinformation on assuming IAMroles, see \n assume-role
\n in the AWS CLI Reference.\n
You need to use this parameter only when you register one or more users using an assumed\n\t\t\tIAM role. You don't need to provide the session name for other scenarios, for example when\n\t\t\tyou are registering an IAM user or an Amazon QuickSight user. You can register multiple\n\t\t\tusers using the same IAM role if each user has a different session name. For more\n\t\t\tinformation on assuming IAM roles, see \n assume-role
\n in the CLI Reference.\n
(Enterprise edition only) The name of the custom permissions profile that you want to\n assign to this user. Customized permissions allows you to control a user's access by\n restricting access the following operations:
\nCreate and update data sources
\nCreate and update datasets
\nCreate and update email reports
\nSubscribe to email reports
\nTo add custom permissions to an existing user, use \n UpdateUser\n
instead.
A set of custom permissions includes any combination of these restrictions. Currently,\n you need to create the profile names for custom permission sets by using the Amazon QuickSight\n console. Then, you use the RegisterUser
API operation to assign the named set of\n permissions to a Amazon QuickSight user.
Amazon QuickSight custom permissions are applied through IAMpolicies. Therefore, they\n override the permissions typically granted by assigning Amazon QuickSight users to one of the\n default security cohorts in Amazon QuickSight (admin, author, reader).
\nThis feature is available only to Amazon QuickSight Enterprise edition subscriptions.
" + "smithy.api#documentation": "(Enterprise edition only) The name of the custom permissions profile that you want to\n assign to this user. Customized permissions allows you to control a user's access by\n restricting access the following operations:
\nCreate and update data sources
\nCreate and update datasets
\nCreate and update email reports
\nSubscribe to email reports
\nTo add custom permissions to an existing user, use \n UpdateUser\n
instead.
A set of custom permissions includes any combination of these restrictions. Currently,\n you need to create the profile names for custom permission sets by using the Amazon QuickSight\n console. Then, you use the RegisterUser
API operation to assign the named set of\n permissions to a QuickSight user.
Amazon QuickSight custom permissions are applied through IAM policies. Therefore, they\n override the permissions typically granted by assigning Amazon QuickSight users to one of the\n default security cohorts in Amazon QuickSight (admin, author, reader).
\nThis feature is available only to Amazon QuickSight Enterprise edition subscriptions.
" } }, "ExternalLoginFederationProviderType": { @@ -14119,18 +14190,18 @@ "QuickSightConsole": { "target": "com.amazonaws.quicksight#RegisteredUserQuickSightConsoleEmbeddingConfiguration", "traits": { - "smithy.api#documentation": "The configuration details for providing an Amazon QuickSight console embedding experience. This can be used along with custom permissions to restrict access to certain features. For more information, see Customizing Access to the Amazon QuickSight Console in the Amazon QuickSight User\n Guide.
\nUse GenerateEmbedUrlForRegisteredUser
where\n you want to provide an authoring portal that allows users to create data sources,\n datasets, analyses, and dashboards. The users who accesses an embedded Amazon QuickSight console\n needs to belong to the author or admin security cohort. If you want to restrict permissions\n to some of these features, add a custom permissions profile to the user with the\n \n UpdateUser\n
API operation. Use \n RegisterUser\n
API operation to add a new user with a custom permission profile attached. For more\n information, see the following sections in the Amazon QuickSight User\n Guide:
\n Embedding the Full Functionality of the Amazon QuickSight Console for Authenticated Users\n
\nFor more information about the high-level steps for embedding and for an interactive demo of the ways you can customize embedding, visit the Amazon QuickSight Developer Portal.
" + "smithy.api#documentation": "The configuration details for providing each Amazon QuickSight console embedding experience. This can be used along with custom permissions to restrict access to certain features. For more information, see Customizing Access to the Amazon QuickSight Console in the Amazon QuickSight User\n Guide.
\nUse \n GenerateEmbedUrlForRegisteredUser\n
\n where\n you want to provide an authoring portal that allows users to create data sources,\n datasets, analyses, and dashboards. The users who accesses an embedded Amazon QuickSight console\n needs to belong to the author or admin security cohort. If you want to restrict permissions\n to some of these features, add a custom permissions profile to the user with the\n \n UpdateUser\n
API operation. Use the \n RegisterUser\n
API operation to add a new user with a custom permission profile attached. For more\n information, see the following sections in the Amazon QuickSight User\n Guide:
\n Embedding the Full Functionality of the Amazon QuickSight Console for Authenticated Users\n
\nFor more information about the high-level steps for embedding and for an interactive demo of the ways you can customize embedding, visit the Amazon QuickSight Developer Portal.
" } }, "QSearchBar": { "target": "com.amazonaws.quicksight#RegisteredUserQSearchBarEmbeddingConfiguration", "traits": { - "smithy.api#documentation": "The configuration details for embedding the Q search bar.
\nFor more information about embedding the Q search bar, see Embedding Overview.
" + "smithy.api#documentation": "The configuration details for embedding the Q search bar.
\nFor more information about embedding the Q search bar, see\n Embedding Overview.
" } } }, "traits": { - "smithy.api#documentation": "The type of experience you want to embed. For registered users, you can embed an Amazon QuickSight dashboard or the Amazon QuickSight console.
\nExactly one of the experience configurations is required. You can choose Dashboard
or QuickSightConsole
. You cannot choose more than one experience configuraton.
The type of experience you want to embed. For registered users, you can embed Amazon QuickSight dashboards or the Amazon QuickSight console.
\nExactly one of the experience configurations is required. You can choose\n Dashboard
or QuickSightConsole
. You cannot choose more\n than one experience configuration.
The ID of the Q topic that you want to make the starting topic in the Q search bar. You can find a topic ID by navigating to the Topics pane in the Amazon QuickSight application and opening a topic. The ID is in the URL for the topic that you open.
\nIf you don't specify an initial topic, a list of all shared topics is shown in the Q bar for your readers. When you select an initial topic, you can specify whether or not readers are allowed to select other topics from the available ones in the list.
" + "smithy.api#documentation": "The ID of the Q topic that you want to make the starting topic in the Q search bar.\n You can find a topic ID by navigating to the Topics pane in the Amazon QuickSight application and opening\n a topic. The ID is in the URL for the topic that you open.
\nIf you don't specify an initial topic, a list of all shared topics is shown in the Q bar\n for your readers. When you select an initial topic, you can specify whether or not readers\n are allowed to select other topics from the available ones in the list.
" } } }, @@ -14319,14 +14390,14 @@ "Principal": { "target": "com.amazonaws.quicksight#Principal", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) of the principal. This can be one of the\n following:
\nThe ARN of an Amazon QuickSight user or group associated with a data source or dataset. (This is common.)
\nThe ARN of an Amazon QuickSight user, group, or namespace associated with an analysis, dashboard, template, or theme. (This is common.)
\nThe ARN of an Amazon Web Services account root: This is an IAMARN rather than a Amazon QuickSight\n ARN. Use this option only to share resources (templates) across Amazon Web Services accounts.\n (This is less common.)
\nThe Amazon Resource Name (ARN) of the principal. This can be one of the\n following:
\nThe ARN of an Amazon QuickSight user or group associated with a data source or dataset. (This is common.)
\nThe ARN of an Amazon QuickSight user, group, or namespace associated with an analysis, dashboard, template, or theme. (This is common.)
\nThe ARN of an Amazon Web Services account root: This is an IAM ARN rather than a QuickSight\n ARN. Use this option only to share resources (templates) across Amazon Web Services accounts.\n (This is less common.)
\nThe IAMaction to grant or revoke permissions on.
", + "smithy.api#documentation": "The IAM action to grant or revoke permissions on.
", "smithy.api#required": {} } } @@ -15017,7 +15088,7 @@ "AwsAccountId": { "target": "com.amazonaws.quicksight#AwsAccountId", "traits": { - "smithy.api#documentation": "The AWS account ID.
", + "smithy.api#documentation": "The ID for the Amazon Web Services account that contains the folder.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -15050,14 +15121,14 @@ "Status": { "target": "com.amazonaws.quicksight#StatusCode", "traits": { - "smithy.api#documentation": "The status. If succeeded, the status is SC_OK
.
The HTTP status of the request.
", "smithy.api#httpResponseCode": {} } }, "FolderSummaryList": { "target": "com.amazonaws.quicksight#FolderSummaryList", "traits": { - "smithy.api#documentation": "A structure that contains all of the folders in your AWS account. This structure provides basic information about the folders.
" + "smithy.api#documentation": "A structure that contains all of the folders in the Amazon Web Services account. This structure provides basic information about the folders.
" } }, "NextToken": { @@ -15069,7 +15140,7 @@ "RequestId": { "target": "com.amazonaws.quicksight#String", "traits": { - "smithy.api#documentation": "The request ID.
" + "smithy.api#documentation": "The Amazon Web Services request ID for this operation.
" } } } @@ -15516,7 +15587,7 @@ } ], "traits": { - "smithy.api#documentation": "Assigns one or more tags (key-value pairs) to the specified Amazon QuickSight resource.
\n\t\tTags can help you organize and categorize your resources. You can also use them to\n\t\t\tscope user permissions, by granting a user permission to access or change only resources\n\t\t\twith certain tag values. You can use the TagResource
operation with a\n\t\t\tresource that already has tags. If you specify a new tag key for the resource, this tag\n\t\t\tis appended to the list of tags associated with the resource. If you specify a tag key\n\t\t\tthat is already associated with the resource, the new tag value that you specify\n\t\t\treplaces the previous value for that tag.
You can associate as many as 50 tags with a resource. Amazon QuickSight supports tagging on data\n\t\t\tset, data source, dashboard, and template.
\n\t\tTagging for Amazon QuickSight works in a similar way to tagging for other AWS services, except for\n\t\t\tthe following:
\n\t\tYou can't use tags to track AWS costs for Amazon QuickSight. This restriction is because Amazon QuickSight\n\t\t\t\t\tcosts are based on users and SPICE capacity, which aren't taggable\n\t\t\t\t\tresources.
\nAmazon QuickSight doesn't currently support the Tag Editor for Resource Groups.
\nAssigns one or more tags (key-value pairs) to the specified Amazon QuickSight resource.
\n\t\tTags can help you organize and categorize your resources. You can also use them to\n\t\t\tscope user permissions, by granting a user permission to access or change only resources\n\t\t\twith certain tag values. You can use the TagResource
operation with a\n\t\t\tresource that already has tags. If you specify a new tag key for the resource, this tag\n\t\t\tis appended to the list of tags associated with the resource. If you specify a tag key\n\t\t\tthat is already associated with the resource, the new tag value that you specify\n\t\t\treplaces the previous value for that tag.
You can associate as many as 50 tags with a resource. Amazon QuickSight supports tagging on data\n\t\t\tset, data source, dashboard, and template.
\n\t\tTagging for Amazon QuickSight works in a similar way to tagging for other Amazon Web Services services, except for\n\t\t\tthe following:
\n\t\tYou can't use tags to track costs for Amazon QuickSight. This isn't\n\t\t\t\tpossible because you can't tag the resources that Amazon QuickSight costs are based \n\t\t\t\ton, for example Amazon QuickSight storage capacity (SPICE), number of users, type \n\t\t\t\tof users, and usage metrics.
\n\t\t\tAmazon QuickSight doesn't currently support the tag editor for Resource Groups.
\n\t\t\t\tThis error indicates that you are calling an embedding operation in Amazon QuickSight\n\t\t\twithout the required pricing plan on your Amazon Web Services account. Before you can use embedding \n\t\t\tfor anonymous users, a Amazon QuickSight administrator needs to add capacity pricing to Amazon QuickSight. You \n\t\t can do this on the Manage Amazon QuickSight page.
\nAfter capacity pricing is added, you can use the \n GetDashboardEmbedUrl API operation with the \n --identity-type ANONYMOUS
option.
This error indicates that you are calling an embedding operation in Amazon QuickSight\n\t\t\twithout the required pricing plan on your Amazon Web Services account. Before you can use embedding \n\t\t\tfor anonymous users, a QuickSight administrator needs to add capacity pricing to Amazon QuickSight. You \n\t\t can do this on the Manage Amazon QuickSight page.
\nAfter capacity pricing is added, you can use the \n \n GetDashboardEmbedUrl\n
API operation with the \n --identity-type ANONYMOUS
option.
Updates a dashboard in an Amazon Web Services account.
\nUpdating a Dashboard creates a new dashboard version but does not immediately publish\n the new version. You can update the published version of a dashboard by\n using the UpdateDashboardPublishedVersion API operation.
\nUpdates a dashboard in an Amazon Web Services account.
\nUpdating a Dashboard creates a new dashboard version but does not immediately publish\n the new version. You can update the published version of a dashboard by\n using the \n UpdateDashboardPublishedVersion\n
API operation.
The permissions that you want to revoke from this resource.
" } + }, + "GrantLinkPermissions": { + "target": "com.amazonaws.quicksight#UpdateLinkPermissionList", + "traits": { + "smithy.api#documentation": "Grants link permissions to all users in a defined namespace.
" + } + }, + "RevokeLinkPermissions": { + "target": "com.amazonaws.quicksight#UpdateLinkPermissionList", + "traits": { + "smithy.api#documentation": "Revokes link permissions from all users in a defined namespace.
" + } } } }, @@ -17276,6 +17362,12 @@ "smithy.api#documentation": "The HTTP status of the request.
", "smithy.api#httpResponseCode": {} } + }, + "LinkSharingConfiguration": { + "target": "com.amazonaws.quicksight#LinkSharingConfiguration", + "traits": { + "smithy.api#documentation": "Updates the permissions of a shared link to an Amazon QuickSight dashboard.
" + } } } }, @@ -17404,7 +17496,7 @@ "SourceEntity": { "target": "com.amazonaws.quicksight#DashboardSourceEntity", "traits": { - "smithy.api#documentation": "The entity that you are using as a source when you update the dashboard. In\n SourceEntity
, you specify the type of object you're using as source. You\n can only update a dashboard from a template, so you use a SourceTemplate
\n entity. If you need to update a dashboard from an analysis, first convert the analysis\n to a template by using the CreateTemplate API operation. For\n SourceTemplate
, specify the Amazon Resource Name (ARN) of the source\n template. The SourceTemplate
ARN can contain any Amazon Web Services account and any\n Amazon QuickSight-supported Amazon Web Services Region.
Use the DataSetReferences
entity within SourceTemplate
to\n list the replacement datasets for the placeholders listed in the original. The schema in\n each dataset must match its placeholder.
The entity that you are using as a source when you update the dashboard. In\n SourceEntity
, you specify the type of object you're using as source. You\n can only update a dashboard from a template, so you use a SourceTemplate
\n entity. If you need to update a dashboard from an analysis, first convert the analysis\n to a template by using the \n CreateTemplate\n
API operation. For\n SourceTemplate
, specify the Amazon Resource Name (ARN) of the source\n template. The SourceTemplate
ARN can contain any Amazon Web Services account and any\n Amazon QuickSight-supported Amazon Web Services Region.
Use the DataSetReferences
entity within SourceTemplate
to\n list the replacement datasets for the placeholders listed in the original. The schema in\n each dataset must match its placeholder.
A set of one or more definitions of a \n ColumnLevelPermissionRule\n
.
A set of one or more definitions of a \n ColumnLevelPermissionRule\n
.
The AWS account ID.
", + "smithy.api#documentation": "The ID for the Amazon Web Services account that contains the folder to update.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -18063,7 +18155,7 @@ "FolderId": { "target": "com.amazonaws.quicksight#RestrictiveResourceId", "traits": { - "smithy.api#documentation": "The folder ID.
", + "smithy.api#documentation": "The ID of the folder.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -18088,31 +18180,31 @@ "Status": { "target": "com.amazonaws.quicksight#StatusCode", "traits": { - "smithy.api#documentation": "The status. If succeeded, the status is SC_OK
.
The HTTP status of the request.
" } }, "Arn": { "target": "com.amazonaws.quicksight#Arn", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN).
" + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the folder.
" } }, "FolderId": { "target": "com.amazonaws.quicksight#RestrictiveResourceId", "traits": { - "smithy.api#documentation": "The folder ID.
" + "smithy.api#documentation": "The ID of the folder.
" } }, "Permissions": { "target": "com.amazonaws.quicksight#ResourcePermissionList", "traits": { - "smithy.api#documentation": "Information about the permissions on the dashboard.
" + "smithy.api#documentation": "Information about the permissions for the folder.
" } }, "RequestId": { "target": "com.amazonaws.quicksight#String", "traits": { - "smithy.api#documentation": "The request ID.
" + "smithy.api#documentation": "The Amazon Web Services request ID for this operation.
" } } } @@ -18123,7 +18215,7 @@ "AwsAccountId": { "target": "com.amazonaws.quicksight#AwsAccountId", "traits": { - "smithy.api#documentation": "The AWS account ID.
", + "smithy.api#documentation": "The ID for the Amazon Web Services account that contains the folder to update.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -18131,7 +18223,7 @@ "FolderId": { "target": "com.amazonaws.quicksight#RestrictiveResourceId", "traits": { - "smithy.api#documentation": "The folder ID.
", + "smithy.api#documentation": "The ID of the folder.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -18151,26 +18243,26 @@ "Status": { "target": "com.amazonaws.quicksight#StatusCode", "traits": { - "smithy.api#documentation": "The status. If succeeded, the status is SC_OK
.
The HTTP status of the request.
", "smithy.api#httpResponseCode": {} } }, "Arn": { "target": "com.amazonaws.quicksight#Arn", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN).
" + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the folder.
" } }, "FolderId": { "target": "com.amazonaws.quicksight#RestrictiveResourceId", "traits": { - "smithy.api#documentation": "The folder ID.
" + "smithy.api#documentation": "The ID of the folder.
" } }, "RequestId": { "target": "com.amazonaws.quicksight#String", "traits": { - "smithy.api#documentation": "The request ID.
" + "smithy.api#documentation": "The Amazon Web Services request ID for this operation.
" } } } @@ -18306,7 +18398,7 @@ } ], "traits": { - "smithy.api#documentation": "Updates an existing IAMpolicy assignment. This operation updates only the optional\n\t\t\tparameter or parameters that are specified in the request. \n\t\t This overwrites all of the users included in Identities
. \n\t\t
Updates an existing IAM policy assignment. This operation updates only the optional\n\t\t\tparameter or parameters that are specified in the request.\n\t\t This overwrites all of the users included in Identities
.\n\t\t
The ID of the Amazon Web Services account that contains the IAMpolicy assignment.
", + "smithy.api#documentation": "The ID of the Amazon Web Services account that contains the IAM policy assignment.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -18350,7 +18442,7 @@ "PolicyArn": { "target": "com.amazonaws.quicksight#Arn", "traits": { - "smithy.api#documentation": "The ARN for the IAMpolicy to apply to the Amazon QuickSight users and groups\n\t\t\tspecified in this assignment.
" + "smithy.api#documentation": "The ARN for the IAM policy to apply to the Amazon QuickSight users and groups\n\t\t\tspecified in this assignment.
" } }, "Identities": { @@ -18379,13 +18471,13 @@ "PolicyArn": { "target": "com.amazonaws.quicksight#Arn", "traits": { - "smithy.api#documentation": "The ARN for the IAMpolicy applied to the Amazon QuickSight users and groups specified in this\n\t\t\tassignment.
" + "smithy.api#documentation": "The ARN for the IAM policy applied to the Amazon QuickSight users and groups specified in this\n\t\t\tassignment.
" } }, "Identities": { "target": "com.amazonaws.quicksight#IdentityMap", "traits": { - "smithy.api#documentation": "The Amazon QuickSight users, groups, or both that the IAMpolicy is assigned to.
" + "smithy.api#documentation": "The Amazon QuickSight users, groups, or both that the IAM policy is assigned to.
" } }, "AssignmentStatus": { @@ -18438,7 +18530,7 @@ } ], "traits": { - "smithy.api#documentation": "Updates content and status of IP Rules.
", + "smithy.api#documentation": "Updates the content and status of IP rules. To use this operation, you need to provide the entire map of rules. You can use the DescribeIpRestriction
operation to get the current rule map.
Your AWS account ID.
", + "smithy.api#documentation": "The ID of the Amazon Web Services account that contains the IP rules.
", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -18460,13 +18552,13 @@ "IpRestrictionRuleMap": { "target": "com.amazonaws.quicksight#IpRestrictionRuleMap", "traits": { - "smithy.api#documentation": "Describes updated IP rules.
" + "smithy.api#documentation": "A map that describes the updated IP rules with CIDR ranges and descriptions.
" } }, "Enabled": { "target": "com.amazonaws.quicksight#NullableBoolean", "traits": { - "smithy.api#documentation": "Whether or not IP rules are enabled.
" + "smithy.api#documentation": "A value that specifies whether IP rules are turned on.
" } } } @@ -18477,24 +18569,36 @@ "AwsAccountId": { "target": "com.amazonaws.quicksight#AwsAccountId", "traits": { - "smithy.api#documentation": "Your AWS account ID.
" + "smithy.api#documentation": "The ID of the Amazon Web Services account that contains the IP rules.
" } }, "RequestId": { "target": "com.amazonaws.quicksight#String", "traits": { - "smithy.api#documentation": "The ID of the update request.
" + "smithy.api#documentation": "The Amazon Web Services request ID for this operation.
" } }, "Status": { "target": "com.amazonaws.quicksight#StatusCode", "traits": { - "smithy.api#documentation": "The status of the updated IP rules. A successful request returns a 200 code.
", + "smithy.api#documentation": "The HTTP status of the request.
", "smithy.api#httpResponseCode": {} } } } }, + "com.amazonaws.quicksight#UpdateLinkPermissionList": { + "type": "list", + "member": { + "target": "com.amazonaws.quicksight#ResourcePermission" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2 + } + } + }, "com.amazonaws.quicksight#UpdateResourcePermissionList": { "type": "list", "member": { @@ -19253,7 +19357,7 @@ "CustomPermissionsName": { "target": "com.amazonaws.quicksight#RoleName", "traits": { - "smithy.api#documentation": "(Enterprise edition only) The name of the custom permissions profile that you want to\n assign to this user. Customized permissions allows you to control a user's access by\n restricting access the following operations:
\nCreate and update data sources
\nCreate and update datasets
\nCreate and update email reports
\nSubscribe to email reports
\nA set of custom permissions includes any combination of these restrictions. Currently,\n you need to create the profile names for custom permission sets by using the Amazon QuickSight\n console. Then, you use the RegisterUser
API operation to assign the named set of\n permissions to a Amazon QuickSight user.
Amazon QuickSight custom permissions are applied through IAMpolicies. Therefore, they\n override the permissions typically granted by assigning Amazon QuickSight users to one of the\n default security cohorts in Amazon QuickSight (admin, author, reader).
\nThis feature is available only to Amazon QuickSight Enterprise edition subscriptions.
" + "smithy.api#documentation": "(Enterprise edition only) The name of the custom permissions profile that you want to\n assign to this user. Customized permissions allows you to control a user's access by\n restricting access the following operations:
\nCreate and update data sources
\nCreate and update datasets
\nCreate and update email reports
\nSubscribe to email reports
\nA set of custom permissions includes any combination of these restrictions. Currently,\n you need to create the profile names for custom permission sets by using the Amazon QuickSight\n console. Then, you use the RegisterUser
API operation to assign the named set of\n permissions to a QuickSight user.
Amazon QuickSight custom permissions are applied through IAM policies. Therefore, they\n override the permissions typically granted by assigning Amazon QuickSight users to one of the\n default security cohorts in Amazon QuickSight (admin, author, reader).
\nThis feature is available only to Amazon QuickSight Enterprise edition subscriptions.
" } }, "UnapplyCustomPermissions": { @@ -19265,7 +19369,7 @@ "ExternalLoginFederationProviderType": { "target": "com.amazonaws.quicksight#String", "traits": { - "smithy.api#documentation": "The type of supported external login provider that provides identity to let a user federate into Amazon QuickSight with an associated Identity and Access Management(IAM) role. The type of supported external login provider can be one of the following.
\n\n COGNITO
: Amazon Cognito. The provider URL is cognito-identity.amazonaws.com. When choosing the COGNITO
provider type, don’t use the \"CustomFederationProviderUrl\" parameter which is only needed when the external provider is custom.
\n CUSTOM_OIDC
: Custom OpenID Connect (OIDC) provider. When choosing CUSTOM_OIDC
type, use the CustomFederationProviderUrl
parameter to provide the custom OIDC provider URL.
\n NONE
: This clears all the previously saved external login information for a user. Use \n DescribeUser\n
API to check the external login information.
The type of supported external login provider that provides identity to let a user federate into Amazon QuickSight with an associated Identity and Access Management(IAM) role. The type of supported external login provider can be one of the following.
\n\n COGNITO
: Amazon Cognito. The provider URL is cognito-identity.amazonaws.com. When choosing the COGNITO
provider type, don’t use the \"CustomFederationProviderUrl\" parameter which is only needed when the external provider is custom.
\n CUSTOM_OIDC
: Custom OpenID Connect (OIDC) provider. When choosing CUSTOM_OIDC
type, use the CustomFederationProviderUrl
parameter to provide the custom OIDC provider URL.
\n NONE
: This clears all the previously saved external login information for a user. Use the\n \n DescribeUser\n
\n API operation to check the external login information.
The user's user name.
" + "smithy.api#documentation": "The user's user name. In the output, the value for UserName
is\n N/A
when the value for IdentityType
is IAM
\n and the corresponding IAM user is deleted.
The type of supported external login provider that provides identity to let the user\n federate into Amazon QuickSight with an associated IAMrole. The type can be one of the following.
\n\n COGNITO
: Amazon Cognito. The provider URL is cognito-identity.amazonaws.com.
\n CUSTOM_OIDC
: Custom OpenID Connect (OIDC) provider.
The type of supported external login provider that provides identity to let the user\n federate into Amazon QuickSight with an associated IAM role. The type can be one of the following.
\n\n COGNITO
: Amazon Cognito. The provider URL is cognito-identity.amazonaws.com.
\n CUSTOM_OIDC
: Custom OpenID Connect (OIDC) provider.
This is the Recycle Bin API Reference. This documentation provides \n descriptions and syntax for each of the actions and data types in Recycle Bin.
\n \nRecycle Bin is a snapshot recovery feature that enables you to restore accidentally \n deleted snapshots. When using Recycle Bin, if your snapshots are deleted, they are retained \n in the Recycle Bin for a time period that you specify.
\n \nYou can restore a snapshot from the Recycle Bin at any time before its retention period \n expires. After you restore a snapshot from the Recycle Bin, the snapshot is removed from the \n Recycle Bin, and you can then use it in the same way you use any other snapshot in your \n account. If the retention period expires and the snapshot is not restored, the snapshot is \n permanently deleted from the Recycle Bin and is no longer available for recovery. For more \n information about Recycle Bin, see \n Recycle Bin in the Amazon EC2 User Guide.
", + "smithy.api#title": "Amazon Recycle Bin" + }, + "version": "2021-06-15", + "operations": [ + { + "target": "com.amazonaws.rbin#CreateRule" + }, + { + "target": "com.amazonaws.rbin#DeleteRule" + }, + { + "target": "com.amazonaws.rbin#GetRule" + }, + { + "target": "com.amazonaws.rbin#ListRules" + }, + { + "target": "com.amazonaws.rbin#ListTagsForResource" + }, + { + "target": "com.amazonaws.rbin#TagResource" + }, + { + "target": "com.amazonaws.rbin#UntagResource" + }, + { + "target": "com.amazonaws.rbin#UpdateRule" + } + ] + }, + "com.amazonaws.rbin#CreateRule": { + "type": "operation", + "input": { + "target": "com.amazonaws.rbin#CreateRuleRequest" + }, + "output": { + "target": "com.amazonaws.rbin#CreateRuleResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rbin#InternalServerException" + }, + { + "target": "com.amazonaws.rbin#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.rbin#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Creates a Recycle Bin retention rule. For more information, see \n Create Recycle Bin retention rules in the Amazon EC2 User Guide.
", + "smithy.api#http": { + "method": "POST", + "uri": "/rules", + "code": 201 + } + } + }, + "com.amazonaws.rbin#CreateRuleRequest": { + "type": "structure", + "members": { + "RetentionPeriod": { + "target": "com.amazonaws.rbin#RetentionPeriod", + "traits": { + "smithy.api#documentation": "Information about the retention period for which the retention rule is to retain resources.
", + "smithy.api#required": {} + } + }, + "Description": { + "target": "com.amazonaws.rbin#Description", + "traits": { + "smithy.api#documentation": "A brief description for the retention rule.
" + } + }, + "Tags": { + "target": "com.amazonaws.rbin#TagList", + "traits": { + "smithy.api#documentation": "Information about the tags to assign to the retention rule.
" + } + }, + "ResourceType": { + "target": "com.amazonaws.rbin#ResourceType", + "traits": { + "smithy.api#documentation": "The resource type to be retained by the retention rule. Currently, only Amazon EBS snapshots are \n supported.
", + "smithy.api#required": {} + } + }, + "ResourceTags": { + "target": "com.amazonaws.rbin#ResourceTags", + "traits": { + "smithy.api#documentation": "Information about the resource tags to use to identify resources that are to be retained \n by the retention rule. The retention rule retains only deleted snapshots that have one or more \n of the specified tag key and value pairs. If a snapshot is deleted, but it does not have \n any of the specified tag key and value pairs, it is immediately deleted without being retained \n by the retention rule.
\nYou can add the same tag key and value pair to a maximum or five retention rules.
" + } + } + } + }, + "com.amazonaws.rbin#CreateRuleResponse": { + "type": "structure", + "members": { + "Identifier": { + "target": "com.amazonaws.rbin#RuleIdentifier", + "traits": { + "smithy.api#documentation": "The unique identifier of the retention rule.
" + } + }, + "RetentionPeriod": { + "target": "com.amazonaws.rbin#RetentionPeriod" + }, + "Description": { + "target": "com.amazonaws.rbin#Description", + "traits": { + "smithy.api#documentation": "The retention rule description.
" + } + }, + "Tags": { + "target": "com.amazonaws.rbin#TagList", + "traits": { + "smithy.api#documentation": "The tags assigned to the retention rule.
" + } + }, + "ResourceType": { + "target": "com.amazonaws.rbin#ResourceType", + "traits": { + "smithy.api#documentation": "The resource type retained by the retention rule.
" + } + }, + "ResourceTags": { + "target": "com.amazonaws.rbin#ResourceTags", + "traits": { + "smithy.api#documentation": "Information about the resource tags used to identify resources that are retained by the retention \n rule.
" + } + }, + "Status": { + "target": "com.amazonaws.rbin#RuleStatus", + "traits": { + "smithy.api#documentation": "The state of the retention rule. Only retention rules that are in the available
state retain snapshots.
Deletes a Recycle Bin retention rule. For more information, see \n Delete Recycle Bin retention rules in the Amazon EC2 User Guide.
", + "smithy.api#http": { + "method": "DELETE", + "uri": "/rules/{Identifier}", + "code": 204 + } + } + }, + "com.amazonaws.rbin#DeleteRuleRequest": { + "type": "structure", + "members": { + "Identifier": { + "target": "com.amazonaws.rbin#RuleIdentifier", + "traits": { + "smithy.api#documentation": "The unique ID of the retention rule to delete.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.rbin#DeleteRuleResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.rbin#Description": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[\\S ]{0,255}$" + } + }, + "com.amazonaws.rbin#ErrorMessage": { + "type": "string" + }, + "com.amazonaws.rbin#GetRule": { + "type": "operation", + "input": { + "target": "com.amazonaws.rbin#GetRuleRequest" + }, + "output": { + "target": "com.amazonaws.rbin#GetRuleResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rbin#InternalServerException" + }, + { + "target": "com.amazonaws.rbin#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.rbin#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Gets information about a Recycle Bin retention rule.
", + "smithy.api#http": { + "method": "GET", + "uri": "/rules/{Identifier}", + "code": 200 + } + } + }, + "com.amazonaws.rbin#GetRuleRequest": { + "type": "structure", + "members": { + "Identifier": { + "target": "com.amazonaws.rbin#RuleIdentifier", + "traits": { + "smithy.api#documentation": "The unique ID of the retention rule.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.rbin#GetRuleResponse": { + "type": "structure", + "members": { + "Identifier": { + "target": "com.amazonaws.rbin#RuleIdentifier", + "traits": { + "smithy.api#documentation": "The unique ID of the retention rule.
" + } + }, + "Description": { + "target": "com.amazonaws.rbin#Description", + "traits": { + "smithy.api#documentation": "The description assigned to the retention rule.
" + } + }, + "ResourceType": { + "target": "com.amazonaws.rbin#ResourceType", + "traits": { + "smithy.api#documentation": "The resource type retained by the retention rule. Currently, only Amazon EBS snapshots are supported.
" + } + }, + "RetentionPeriod": { + "target": "com.amazonaws.rbin#RetentionPeriod", + "traits": { + "smithy.api#documentation": "Information about the period for which the retention rule retains resources.
" + } + }, + "ResourceTags": { + "target": "com.amazonaws.rbin#ResourceTags", + "traits": { + "smithy.api#documentation": "The resource tags used to identify resources that are to be retained by the retention rule.
" + } + }, + "Status": { + "target": "com.amazonaws.rbin#RuleStatus", + "traits": { + "smithy.api#documentation": "The state of the retention rule. Only retention rules that are in the available
state retain snapshots.
The service could not respond to the request due to an internal problem.
", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.rbin#ListRules": { + "type": "operation", + "input": { + "target": "com.amazonaws.rbin#ListRulesRequest" + }, + "output": { + "target": "com.amazonaws.rbin#ListRulesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rbin#InternalServerException" + }, + { + "target": "com.amazonaws.rbin#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Lists the Recycle Bin retention rules in the Region.
", + "smithy.api#http": { + "method": "POST", + "uri": "/list-rules", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.rbin#ListRulesRequest": { + "type": "structure", + "members": { + "MaxResults": { + "target": "com.amazonaws.rbin#MaxResults", + "traits": { + "smithy.api#documentation": "The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken
value. This value can be between 5 and 500. If maxResults
is given a larger value than 500, you receive an error.
The token to use to retrieve the next page of results.
" + } + }, + "ResourceType": { + "target": "com.amazonaws.rbin#ResourceType", + "traits": { + "smithy.api#documentation": "The resource type retained by the retention rule. Only retention rules that retain the specified resource type \n are listed.
", + "smithy.api#required": {} + } + }, + "ResourceTags": { + "target": "com.amazonaws.rbin#ResourceTags", + "traits": { + "smithy.api#documentation": "The tags used to identify resources that are to be retained by the retention rule.
" + } + } + } + }, + "com.amazonaws.rbin#ListRulesResponse": { + "type": "structure", + "members": { + "Rules": { + "target": "com.amazonaws.rbin#RuleSummaryList", + "traits": { + "smithy.api#documentation": "Information about the retention rules.
" + } + }, + "NextToken": { + "target": "com.amazonaws.rbin#NextToken", + "traits": { + "smithy.api#documentation": "The token to use to retrieve the next page of results. This value is null
when there are no more results to return.
Lists the tags assigned a specific resource.
", + "smithy.api#http": { + "method": "GET", + "uri": "/tags/{ResourceArn}", + "code": 200 + } + } + }, + "com.amazonaws.rbin#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "ResourceArn": { + "target": "com.amazonaws.rbin#RuleArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the resource for which to list the tags.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.rbin#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "Tags": { + "target": "com.amazonaws.rbin#TagList", + "traits": { + "smithy.api#documentation": "Information about the tags assigned to the resource.
" + } + } + } + }, + "com.amazonaws.rbin#MaxResults": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 1000 + } + } + }, + "com.amazonaws.rbin#NextToken": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[A-Za-z0-9+/=]{1,2048}$" + } + }, + "com.amazonaws.rbin#ResourceNotFoundException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.rbin#ErrorMessage" + }, + "Reason": { + "target": "com.amazonaws.rbin#ResourceNotFoundExceptionReason", + "traits": { + "smithy.api#documentation": "The reason for the exception.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The specified resource was not found.
", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.rbin#ResourceNotFoundExceptionReason": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "RULE_NOT_FOUND", + "name": "RULE_NOT_FOUND" + } + ] + } + }, + "com.amazonaws.rbin#ResourceTag": { + "type": "structure", + "members": { + "ResourceTagKey": { + "target": "com.amazonaws.rbin#ResourceTagKey", + "traits": { + "smithy.api#documentation": "The tag key.
", + "smithy.api#required": {} + } + }, + "ResourceTagValue": { + "target": "com.amazonaws.rbin#ResourceTagValue", + "traits": { + "smithy.api#documentation": "The tag value.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Information about a resource tag used to identify resources that are to be retained by a Recycle Bin retention rule.
" + } + }, + "com.amazonaws.rbin#ResourceTagKey": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[\\S\\s]{1,128}$" + } + }, + "com.amazonaws.rbin#ResourceTagValue": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[\\S\\s]{0,256}$" + } + }, + "com.amazonaws.rbin#ResourceTags": { + "type": "list", + "member": { + "target": "com.amazonaws.rbin#ResourceTag" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "com.amazonaws.rbin#ResourceType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "EBS_SNAPSHOT", + "name": "EBS_SNAPSHOT" + } + ] + } + }, + "com.amazonaws.rbin#RetentionPeriod": { + "type": "structure", + "members": { + "RetentionPeriodValue": { + "target": "com.amazonaws.rbin#RetentionPeriodValue", + "traits": { + "smithy.api#documentation": "The period value for which the retention rule is to retain resources. The period is measured using \n the unit specified for RetentionPeriodUnit.
", + "smithy.api#required": {} + } + }, + "RetentionPeriodUnit": { + "target": "com.amazonaws.rbin#RetentionPeriodUnit", + "traits": { + "smithy.api#documentation": "The unit of time in which the retention period is measured. Currently, only DAYS
\n is supported.
Information about the retention period for which a retention rule is to retain resources.
" + } + }, + "com.amazonaws.rbin#RetentionPeriodUnit": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "DAYS", + "name": "DAYS" + } + ] + } + }, + "com.amazonaws.rbin#RetentionPeriodValue": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 3650 + } + } + }, + "com.amazonaws.rbin#RuleArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1011 + }, + "smithy.api#pattern": "^arn:aws(-[a-z]{1,3}){0,2}:rbin:[a-z\\-0-9]{0,63}:[0-9]{12}:rule/[0-9a-zA-Z]{11}{0,1011}$" + } + }, + "com.amazonaws.rbin#RuleIdentifier": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[0-9a-zA-Z]{11}$" + } + }, + "com.amazonaws.rbin#RuleStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "pending", + "name": "PENDING" + }, + { + "value": "available", + "name": "AVAILABLE" + } + ] + } + }, + "com.amazonaws.rbin#RuleSummary": { + "type": "structure", + "members": { + "Identifier": { + "target": "com.amazonaws.rbin#RuleIdentifier", + "traits": { + "smithy.api#documentation": "The unique ID of the retention rule.
" + } + }, + "Description": { + "target": "com.amazonaws.rbin#Description", + "traits": { + "smithy.api#documentation": "The description for the retention rule.
" + } + }, + "RetentionPeriod": { + "target": "com.amazonaws.rbin#RetentionPeriod", + "traits": { + "smithy.api#documentation": "Information about the retention period for which the retention rule retains resources
" + } + } + }, + "traits": { + "smithy.api#documentation": "Information about a Recycle Bin retention rule.
" + } + }, + "com.amazonaws.rbin#RuleSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.rbin#RuleSummary" + } + }, + "com.amazonaws.rbin#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.rbin#ErrorMessage" + }, + "Reason": { + "target": "com.amazonaws.rbin#ServiceQuotaExceededExceptionReason", + "traits": { + "smithy.api#documentation": "The reason for the exception.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The request would cause a service quota for the number of tags per resource to be exceeded.
", + "smithy.api#error": "client", + "smithy.api#httpError": 402 + } + }, + "com.amazonaws.rbin#ServiceQuotaExceededExceptionReason": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "SERVICE_QUOTA_EXCEEDED", + "name": "SERVICE_QUOTA_EXCEEDED" + } + ] + } + }, + "com.amazonaws.rbin#Tag": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.rbin#TagKey", + "traits": { + "smithy.api#documentation": "The tag key.
", + "smithy.api#required": {} + } + }, + "Value": { + "target": "com.amazonaws.rbin#TagValue", + "traits": { + "smithy.api#documentation": "The tag value.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Information about the tags assigned to a Recycle Bin retention rule.
" + } + }, + "com.amazonaws.rbin#TagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$" + } + }, + "com.amazonaws.rbin#TagKeyList": { + "type": "list", + "member": { + "target": "com.amazonaws.rbin#TagKey" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.rbin#TagList": { + "type": "list", + "member": { + "target": "com.amazonaws.rbin#Tag" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.rbin#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.rbin#TagResourceRequest" + }, + "output": { + "target": "com.amazonaws.rbin#TagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rbin#InternalServerException" + }, + { + "target": "com.amazonaws.rbin#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.rbin#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.rbin#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Assigns tags to the specified resource.
", + "smithy.api#http": { + "method": "POST", + "uri": "/tags/{ResourceArn}", + "code": 201 + } + } + }, + "com.amazonaws.rbin#TagResourceRequest": { + "type": "structure", + "members": { + "ResourceArn": { + "target": "com.amazonaws.rbin#RuleArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the resource to which to assign the tags.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.rbin#TagList", + "traits": { + "smithy.api#documentation": "Information about the tags to assign to the resource.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.rbin#TagResourceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.rbin#TagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + }, + "smithy.api#pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$" + } + }, + "com.amazonaws.rbin#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.rbin#UntagResourceRequest" + }, + "output": { + "target": "com.amazonaws.rbin#UntagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rbin#InternalServerException" + }, + { + "target": "com.amazonaws.rbin#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.rbin#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Unassigns a tag from a resource.
", + "smithy.api#http": { + "method": "DELETE", + "uri": "/tags/{ResourceArn}", + "code": 204 + } + } + }, + "com.amazonaws.rbin#UntagResourceRequest": { + "type": "structure", + "members": { + "ResourceArn": { + "target": "com.amazonaws.rbin#RuleArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the resource from which to unassign the tags.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "TagKeys": { + "target": "com.amazonaws.rbin#TagKeyList", + "traits": { + "smithy.api#documentation": "Information about the tags to unassign from the resource.
", + "smithy.api#httpQuery": "tagKeys", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.rbin#UntagResourceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.rbin#UpdateRule": { + "type": "operation", + "input": { + "target": "com.amazonaws.rbin#UpdateRuleRequest" + }, + "output": { + "target": "com.amazonaws.rbin#UpdateRuleResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rbin#InternalServerException" + }, + { + "target": "com.amazonaws.rbin#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.rbin#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Updates an existing Recycle Bin retention rule. For more information, see \n Update Recycle Bin retention rules in the Amazon EC2 User Guide.
", + "smithy.api#http": { + "method": "PATCH", + "uri": "/rules/{Identifier}", + "code": 200 + } + } + }, + "com.amazonaws.rbin#UpdateRuleRequest": { + "type": "structure", + "members": { + "Identifier": { + "target": "com.amazonaws.rbin#RuleIdentifier", + "traits": { + "smithy.api#documentation": "The unique ID of the retention rule to update.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "RetentionPeriod": { + "target": "com.amazonaws.rbin#RetentionPeriod", + "traits": { + "smithy.api#documentation": "Information about the retention period for which the retention rule is to retain resources.
" + } + }, + "Description": { + "target": "com.amazonaws.rbin#Description", + "traits": { + "smithy.api#documentation": "The retention rule description.
" + } + }, + "ResourceType": { + "target": "com.amazonaws.rbin#ResourceType", + "traits": { + "smithy.api#documentation": "The resource type to be retained by the retention rule. Currently, only Amazon EBS snapshots are supported.
" + } + }, + "ResourceTags": { + "target": "com.amazonaws.rbin#ResourceTags", + "traits": { + "smithy.api#documentation": "Information about the resource tags to use to identify resources that are to be retained \n by the retention rule. The retention rule retains only deleted snapshots that have one or more \n of the specified tag key and value pairs. If a snapshot is deleted, but it does not have \n any of the specified tag key and value pairs, it is immediately deleted without being retained \n by the retention rule.
\nYou can add the same tag key and value pair to a maximum or five retention rules.
" + } + } + } + }, + "com.amazonaws.rbin#UpdateRuleResponse": { + "type": "structure", + "members": { + "Identifier": { + "target": "com.amazonaws.rbin#RuleIdentifier", + "traits": { + "smithy.api#documentation": "The unique ID of the retention rule.
" + } + }, + "RetentionPeriod": { + "target": "com.amazonaws.rbin#RetentionPeriod" + }, + "Description": { + "target": "com.amazonaws.rbin#Description", + "traits": { + "smithy.api#documentation": "The retention rule description.
" + } + }, + "ResourceType": { + "target": "com.amazonaws.rbin#ResourceType", + "traits": { + "smithy.api#documentation": "The resource type retained by the retention rule.
" + } + }, + "ResourceTags": { + "target": "com.amazonaws.rbin#ResourceTags", + "traits": { + "smithy.api#documentation": "Information about the resource tags used to identify resources that are retained by the retention \n rule.
" + } + }, + "Status": { + "target": "com.amazonaws.rbin#RuleStatus", + "traits": { + "smithy.api#documentation": "The state of the retention rule. Only retention rules that are in the available
state retain snapshots.
The reason for the exception.
" + } + } + }, + "traits": { + "smithy.api#documentation": "One or more of the parameters in the request is not valid.
", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.rbin#ValidationExceptionReason": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "INVALID_PAGE_TOKEN", + "name": "INVALID_PAGE_TOKEN" + }, + { + "value": "INVALID_PARAMETER_VALUE", + "name": "INVALID_PARAMETER_VALUE" + } + ] + } + } + } +} diff --git a/codegen/sdk-codegen/aws-models/rds.2014-10-31.json b/codegen/sdk-codegen/aws-models/rds.2014-10-31.json index 9f3fce7c2bc..f56820ee0d1 100644 --- a/codegen/sdk-codegen/aws-models/rds.2014-10-31.json +++ b/codegen/sdk-codegen/aws-models/rds.2014-10-31.json @@ -142,7 +142,7 @@ } ], "traits": { - "smithy.api#documentation": "Associates an Identity and Access Management (IAM) role from an Amazon Aurora DB cluster.\n For more information, see Authorizing Amazon Aurora MySQL \n to Access Other Amazon Web Services Services on Your Behalf in the Amazon Aurora User Guide.
\nThis action only applies to Aurora DB clusters.
\nAssociates an Identity and Access Management (IAM) role with a DB cluster.
" } }, "com.amazonaws.rds#AddRoleToDBClusterMessage": { @@ -158,7 +158,7 @@ "RoleArn": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) of the IAM role to associate with the Aurora DB\n cluster, for example, arn:aws:iam::123456789012:role/AuroraAccessRole
.
The Amazon Resource Name (ARN) of the IAM role to associate with the Aurora DB\n cluster, for example arn:aws:iam::123456789012:role/AuroraAccessRole
.
\n
Amazon Relational Database Service (Amazon RDS) is a web service that makes it easier to set up, operate, and \n scale a relational database in the cloud. It provides cost-efficient, resizeable capacity for an industry-standard relational \n database and manages common database administration tasks, freeing up developers to focus on what makes their applications \n and businesses unique.
\nAmazon RDS gives you access to the capabilities of a MySQL, MariaDB, PostgreSQL, Microsoft SQL Server, \n Oracle, or Amazon Aurora database server. These capabilities mean that the code, applications, and tools \n you already use today with your existing databases work with Amazon RDS without modification. Amazon RDS \n automatically backs up your database and maintains the database software that powers your DB instance. Amazon RDS \n is flexible: you can scale your DB instance's compute resources and storage capacity to meet your \n application's demand. As with all Amazon Web Services, there are no up-front investments, and you pay only for \n the resources you use.
\nThis interface reference for Amazon RDS contains documentation for a programming or command line interface \n you can use to manage Amazon RDS. Amazon RDS is asynchronous, which means that some interfaces might \n require techniques such as polling or callback functions to determine when a command has been applied. In this \n reference, the parameter descriptions indicate whether a command is applied immediately, on the next instance reboot, \n or during the maintenance window. The reference structure is as follows, and we list following some related topics \n from the user guide.
\n \n\n Amazon RDS API Reference\n
\n \nFor the alphabetical list of API actions, see \n API Actions.
\nFor the alphabetical list of data types, see \n Data Types.
\nFor a list of common query parameters, see \n Common Parameters.
\nFor descriptions of the error codes, see \n Common Errors.
\n\n Amazon RDS User Guide\n
\n \nFor a summary of the Amazon RDS interfaces, see \n Available RDS Interfaces.
\nFor more information about how to use the Query API, see \n Using the Query API.
\n\n
Amazon Relational Database Service (Amazon RDS) is a web service that makes it easier to set up, operate, and \n scale a relational database in the cloud. It provides cost-efficient, resizeable capacity for an industry-standard relational \n database and manages common database administration tasks, freeing up developers to focus on what makes their applications \n and businesses unique.
\nAmazon RDS gives you access to the capabilities of a MySQL, MariaDB, PostgreSQL, Microsoft SQL Server, \n Oracle, or Amazon Aurora database server. These capabilities mean that the code, applications, and tools \n you already use today with your existing databases work with Amazon RDS without modification. Amazon RDS \n automatically backs up your database and maintains the database software that powers your DB instance. Amazon RDS \n is flexible: you can scale your DB instance's compute resources and storage capacity to meet your \n application's demand. As with all Amazon Web Services, there are no up-front investments, and you pay only for \n the resources you use.
\nThis interface reference for Amazon RDS contains documentation for a programming or command line interface \n you can use to manage Amazon RDS. Amazon RDS is asynchronous, which means that some interfaces might \n require techniques such as polling or callback functions to determine when a command has been applied. In this \n reference, the parameter descriptions indicate whether a command is applied immediately, on the next instance reboot, \n or during the maintenance window. The reference structure is as follows, and we list following some related topics \n from the user guide.
\n \n\n Amazon RDS API Reference\n
\n \nFor the alphabetical list of API actions, see \n API Actions.
\nFor the alphabetical list of data types, see \n Data Types.
\nFor a list of common query parameters, see \n Common Parameters.
\nFor descriptions of the error codes, see \n Common Errors.
\n\n Amazon RDS User Guide\n
\n \nFor a summary of the Amazon RDS interfaces, see \n Available RDS Interfaces.
\nFor more information about how to use the Query API, see \n Using the Query API.
\nEnables ingress to a DBSecurityGroup using one of two forms of authorization. First, EC2 or VPC security \n groups can be added to the DBSecurityGroup if the application using the database is running on EC2 or VPC \n instances. Second, IP ranges are available if the application accessing your database is running on the Internet. \n Required parameters for this API are one of CIDR range, EC2SecurityGroupId for VPC, or (EC2SecurityGroupOwnerId \n and either EC2SecurityGroupName or EC2SecurityGroupId for non-VPC).
\nYou can't authorize ingress from an EC2 security group in one Amazon Web Services Region to an Amazon RDS DB instance in \n another. You can't authorize ingress from a VPC security group in one VPC to an Amazon RDS DB instance in another.
\nFor an overview of CIDR ranges, go to the \n Wikipedia Tutorial.\n
" + "smithy.api#documentation": "Enables ingress to a DBSecurityGroup using one of two forms of authorization. First, EC2 or VPC security \n groups can be added to the DBSecurityGroup if the application using the database is running on EC2 or VPC \n instances. Second, IP ranges are available if the application accessing your database is running on the internet. \n Required parameters for this API are one of CIDR range, EC2SecurityGroupId for VPC, or (EC2SecurityGroupOwnerId \n and either EC2SecurityGroupName or EC2SecurityGroupId for non-VPC).
\nYou can't authorize ingress from an EC2 security group in one Amazon Web Services Region to an Amazon RDS DB instance in \n another. You can't authorize ingress from a VPC security group in one VPC to an Amazon RDS DB instance in another.
\nFor an overview of CIDR ranges, go to the \n Wikipedia Tutorial.\n
" } }, "com.amazonaws.rds#AuthorizeDBSecurityGroupIngressMessage": { @@ -1469,7 +1472,7 @@ } ], "traits": { - "smithy.api#documentation": "Copies the specified DB cluster parameter group.
\nThis action only applies to Aurora DB clusters.
\nCopies the specified DB cluster parameter group.
" } }, "com.amazonaws.rds#CopyDBClusterParameterGroupMessage": { @@ -1538,7 +1541,7 @@ } ], "traits": { - "smithy.api#documentation": "Copies a snapshot of a DB cluster.
\nTo copy a DB cluster snapshot from a shared manual DB cluster snapshot, SourceDBClusterSnapshotIdentifier
\n must be the Amazon Resource Name (ARN) of the shared DB cluster snapshot.
You can copy an encrypted DB cluster snapshot from another Amazon Web Services Region. In that case, the Amazon Web Services Region where you call the CopyDBClusterSnapshot
action \n is the destination Amazon Web Services Region for the encrypted DB cluster snapshot to be copied to. To copy an encrypted DB cluster snapshot from another Amazon Web Services Region, \n you must provide the following values:
\n KmsKeyId
- The Amazon Web Services Key Management System (Amazon Web Services KMS) key identifier for the key to use to \n encrypt the copy of the DB cluster snapshot in the destination Amazon Web Services Region.
\n PreSignedUrl
- A URL that contains a Signature Version 4 signed request for the \n CopyDBClusterSnapshot
action to be called in the source Amazon Web Services Region where the DB cluster snapshot is copied from. \n The pre-signed URL must be a valid request for the CopyDBClusterSnapshot
API action that can be executed in the \n source Amazon Web Services Region that contains the encrypted DB cluster snapshot to be copied.
The pre-signed URL request must contain the following parameter values:
\n\n KmsKeyId
- The Amazon Web Services KMS key identifier for the KMS key to use to encrypt the copy of the DB \n cluster snapshot in the destination Amazon Web Services Region. This is the same identifier for both the CopyDBClusterSnapshot
\n action that is called in the destination Amazon Web Services Region, and the action contained in the pre-signed URL.
\n DestinationRegion
- The name of the Amazon Web Services Region that the DB cluster snapshot is to be created in.
\n SourceDBClusterSnapshotIdentifier
- The DB cluster snapshot identifier for the encrypted DB cluster \n snapshot to be copied. This identifier must be in the Amazon Resource Name (ARN) format for the source Amazon Web Services Region. For example, \n if you are copying an encrypted DB cluster snapshot from the us-west-2 Amazon Web Services Region, then your SourceDBClusterSnapshotIdentifier
\n looks like the following example: arn:aws:rds:us-west-2:123456789012:cluster-snapshot:aurora-cluster1-snapshot-20161115
.
To learn how to generate a Signature Version 4 signed request, see \n \n Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4) and\n \n Signature Version 4 Signing Process.
\nIf you are using an Amazon Web Services SDK tool or the CLI, you can specify SourceRegion
(or --source-region
for the CLI) \n instead of specifying PreSignedUrl
manually. Specifying SourceRegion
autogenerates a pre-signed URL that is a valid \n request for the operation that can be executed in the source Amazon Web Services Region.
\n TargetDBClusterSnapshotIdentifier
- The identifier for the new copy of the DB cluster snapshot in the destination Amazon Web Services Region.
\n SourceDBClusterSnapshotIdentifier
- The DB cluster snapshot identifier for the encrypted DB cluster snapshot to be copied. \n This identifier must be in the ARN format for the source Amazon Web Services Region and is the same value as the SourceDBClusterSnapshotIdentifier
in the pre-signed URL.
To cancel the copy operation once it is in progress, delete the target DB cluster snapshot identified\n by TargetDBClusterSnapshotIdentifier
while that DB cluster snapshot is in \"copying\" status.
For more information on copying encrypted DB cluster snapshots from one Amazon Web Services Region to another, see \n \n Copying a Snapshot in the Amazon Aurora User Guide.\n
\nFor more information on Amazon Aurora, see \n \n What Is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nThis action only applies to Aurora DB clusters.
\nCopies a snapshot of a DB cluster.
\nTo copy a DB cluster snapshot from a shared manual DB cluster snapshot, SourceDBClusterSnapshotIdentifier
\n must be the Amazon Resource Name (ARN) of the shared DB cluster snapshot.
You can copy an encrypted DB cluster snapshot from another Amazon Web Services Region. In that case, the Amazon Web Services Region where you call the CopyDBClusterSnapshot
action \n is the destination Amazon Web Services Region for the encrypted DB cluster snapshot to be copied to. To copy an encrypted DB cluster snapshot from another Amazon Web Services Region, \n you must provide the following values:
\n KmsKeyId
- The Amazon Web Services Key Management System (Amazon Web Services KMS) key identifier for the key to use to \n encrypt the copy of the DB cluster snapshot in the destination Amazon Web Services Region.
\n PreSignedUrl
- A URL that contains a Signature Version 4 signed request for the \n CopyDBClusterSnapshot
action to be called in the source Amazon Web Services Region where the DB cluster snapshot is copied from. \n The pre-signed URL must be a valid request for the CopyDBClusterSnapshot
API action that can be executed in the \n source Amazon Web Services Region that contains the encrypted DB cluster snapshot to be copied.
The pre-signed URL request must contain the following parameter values:
\n\n KmsKeyId
- The Amazon Web Services KMS key identifier for the KMS key to use to encrypt the copy of the DB \n cluster snapshot in the destination Amazon Web Services Region. This is the same identifier for both the CopyDBClusterSnapshot
\n action that is called in the destination Amazon Web Services Region, and the action contained in the pre-signed URL.
\n DestinationRegion
- The name of the Amazon Web Services Region that the DB cluster snapshot is to be created in.
\n SourceDBClusterSnapshotIdentifier
- The DB cluster snapshot identifier for the encrypted DB cluster \n snapshot to be copied. This identifier must be in the Amazon Resource Name (ARN) format for the source Amazon Web Services Region. For example, \n if you are copying an encrypted DB cluster snapshot from the us-west-2 Amazon Web Services Region, then your SourceDBClusterSnapshotIdentifier
\n looks like the following example: arn:aws:rds:us-west-2:123456789012:cluster-snapshot:aurora-cluster1-snapshot-20161115
.
To learn how to generate a Signature Version 4 signed request, see \n \n Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4) and\n \n Signature Version 4 Signing Process.
\nIf you are using an Amazon Web Services SDK tool or the CLI, you can specify SourceRegion
(or --source-region
for the CLI) \n instead of specifying PreSignedUrl
manually. Specifying SourceRegion
autogenerates a pre-signed URL that is a valid \n request for the operation that can be executed in the source Amazon Web Services Region.
\n TargetDBClusterSnapshotIdentifier
- The identifier for the new copy of the DB cluster snapshot in the destination Amazon Web Services Region.
\n SourceDBClusterSnapshotIdentifier
- The DB cluster snapshot identifier for the encrypted DB cluster snapshot to be copied. \n This identifier must be in the ARN format for the source Amazon Web Services Region and is the same value as the SourceDBClusterSnapshotIdentifier
in the pre-signed URL.
To cancel the copy operation once it is in progress, delete the target DB cluster snapshot identified\n by TargetDBClusterSnapshotIdentifier
while that DB cluster snapshot is in \"copying\" status.
For more information on copying encrypted Amazon Aurora DB cluster snapshots from one Amazon Web Services Region to another, see \n \n Copying a Snapshot in the Amazon Aurora User Guide.\n
\nFor more information on Amazon Aurora DB clusters, see \n \n What is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nFor more information on Multi-AZ DB clusters, see \n \n Multi-AZ deployments with two readable standby DB instances in the Amazon RDS User Guide.\n
\nThe Multi-AZ DB clusters feature is in preview and is subject to change.
\nCreates a custom DB engine version (CEV). A CEV is a binary volume snapshot of a database engine and \n specific AMI. The only supported engine is Oracle Database 19c Enterprise Edition with the January 2021 \n or later RU/RUR. For \n more information, see \n Amazon RDS Custom requirements and limitations in the Amazon RDS User Guide.
\nAmazon RDS, which is a fully managed service, supplies the Amazon Machine Image (AMI) and database software.\n The Amazon RDS database software is preinstalled, so you need only select a DB engine and version, and create\n your database. With Amazon RDS Custom, you upload your database installation files in Amazon S3. For \n more information, see \n Preparing to create a CEV in the Amazon RDS User Guide.
\nWhen you create a custom engine version, you specify the files in a JSON document called a CEV manifest. \n This document describes installation .zip files stored in Amazon S3. RDS Custom creates your CEV from \n the installation files that you provided. This service model is called Bring Your Own Media (BYOM).
\nCreation takes approximately two hours. If creation fails, RDS Custom issues RDS-EVENT-0196
with \n the message Creation failed for custom engine version
, and includes details about the failure. \n For example, the event prints missing files.
After you create the CEV, it is available for use. You can create multiple CEVs, and create multiple \n RDS Custom instances from any CEV. You can also change the status of a CEV to make it available or\n inactive.
\nThe MediaImport service that imports files from Amazon S3 to create CEVs isn't integrated with \n Amazon Web Services CloudTrail. If you turn on data logging for Amazon RDS in CloudTrail, calls to the \n CreateCustomDbEngineVersion
event aren't logged. However, you might see calls from the \n API gateway that accesses your Amazon S3 bucket. These calls originate from the MediaImport service for \n the CreateCustomDbEngineVersion
event.
For more information, see \n Creating a CEV in the Amazon RDS User Guide.
" + "smithy.api#documentation": "Creates a custom DB engine version (CEV). A CEV is a binary volume snapshot of a database engine and specific\n AMI. The only supported engine is Oracle Database 19c Enterprise Edition with the January 2021 or later\n RU/RUR.
\nAmazon RDS, which is a fully managed service, supplies the Amazon Machine Image (AMI) and database software.\n The Amazon RDS database software is preinstalled, so you need only select a DB engine and version, and create\n your database. With Amazon RDS Custom, you upload your database installation files in Amazon S3.
\nWhen you create a custom engine version, you specify the files in a JSON document called a CEV manifest. \n This document describes installation .zip files stored in Amazon S3. RDS Custom creates your CEV from \n the installation files that you provided. This service model is called Bring Your Own Media (BYOM).
\nCreation takes approximately two hours. If creation fails, RDS Custom issues RDS-EVENT-0196
with \n the message Creation failed for custom engine version
, and includes details about the failure. \n For example, the event prints missing files.
After you create the CEV, it is available for use. You can create multiple CEVs, and create multiple \n RDS Custom instances from any CEV. You can also change the status of a CEV to make it available or\n inactive.
\nThe MediaImport service that imports files from Amazon S3 to create CEVs isn't integrated with \n Amazon Web Services CloudTrail. If you turn on data logging for Amazon RDS in CloudTrail, calls to the \n CreateCustomDbEngineVersion
event aren't logged. However, you might see calls from the \n API gateway that accesses your Amazon S3 bucket. These calls originate from the MediaImport service for \n the CreateCustomDbEngineVersion
event.
For more information, see \n Creating a CEV in the Amazon RDS User Guide.
" } }, "com.amazonaws.rds#CreateCustomDBEngineVersionMessage": { @@ -2020,7 +2023,7 @@ } ], "traits": { - "smithy.api#documentation": "Creates a new Amazon Aurora DB cluster.
\nYou can use the ReplicationSourceIdentifier
parameter to create the DB\n cluster as a read replica of another DB cluster or Amazon RDS MySQL or PostgreSQL DB instance. For\n cross-region replication where the DB cluster identified by\n ReplicationSourceIdentifier
is encrypted, you must also specify the\n PreSignedUrl
parameter.
For more information on Amazon Aurora, see \n \n What Is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nThis action only applies to Aurora DB clusters.
\nCreates a new Amazon Aurora DB cluster or Multi-AZ DB cluster.
\nYou can use the ReplicationSourceIdentifier
parameter to create an Amazon\n Aurora DB cluster as a read replica of another DB cluster or Amazon RDS MySQL or\n PostgreSQL DB instance. For cross-Region replication where the DB cluster identified by\n ReplicationSourceIdentifier
is encrypted, also specify the\n PreSignedUrl
parameter.
For more information on Amazon Aurora, see \n \n What is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nFor more information on Multi-AZ DB clusters, see \n \n Multi-AZ deployments with two readable standby DB instances in the Amazon RDS User Guide.\n
\nThe Multi-AZ DB clusters feature is in preview and is subject to change.
\nCreates a new custom endpoint and associates it with an Amazon Aurora DB cluster.
\nThis action only applies to Aurora DB clusters.
\nCreates a new custom endpoint and associates it with an Amazon Aurora DB cluster.
\nThis action only applies to Aurora DB clusters.
\nThe type of the endpoint. One of: READER
, WRITER
, ANY
.
The type of the endpoint, one of: READER
, WRITER
, ANY
.
List of DB instance identifiers that aren't part of the custom endpoint group.\n All other eligible instances are reachable through the custom endpoint.\n Only relevant if the list of static members is empty.
" + "smithy.api#documentation": "List of DB instance identifiers that aren't part of the custom endpoint group.\n All other eligible instances are reachable through the custom endpoint.\n This parameter is relevant only if the list of static members is empty.
" } }, "Tags": { @@ -2105,201 +2108,267 @@ "AvailabilityZones": { "target": "com.amazonaws.rds#AvailabilityZones", "traits": { - "smithy.api#documentation": "A list of Availability Zones (AZs) where instances in the DB cluster can be created. For information on\n Amazon Web Services Regions and Availability Zones, see \n Choosing the Regions and \n Availability Zones in the Amazon Aurora User Guide.\n
" + "smithy.api#documentation": "A list of Availability Zones (AZs) where DB instances in the DB cluster can be created.\n
\nFor information on Amazon Web Services Regions and Availability Zones, see \n Choosing the Regions and \n Availability Zones in the Amazon Aurora User Guide.
\nValid for: Aurora DB clusters only
" } }, "BackupRetentionPeriod": { "target": "com.amazonaws.rds#IntegerOptional", "traits": { - "smithy.api#documentation": "The number of days for which automated backups are retained.
\nDefault: 1
\nConstraints:
\nMust be a value from 1 to 35
\nThe number of days for which automated backups are retained.
\nDefault: 1
\nConstraints:
\nMust be a value from 1 to 35
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "CharacterSetName": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "A value that indicates that the DB cluster should be associated with the specified CharacterSet.
" + "smithy.api#documentation": "A value that indicates that the DB cluster should be associated with the specified CharacterSet.
\nValid for: Aurora DB clusters only
" } }, "DatabaseName": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The name for your database of up to 64 alphanumeric characters. If you do not\n provide a name, Amazon RDS doesn't create a database in the DB cluster you are\n creating.
" + "smithy.api#documentation": "The name for your database of up to 64 alphanumeric characters. If you do not\n provide a name, Amazon RDS doesn't create a database in the DB cluster you are\n creating.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "DBClusterIdentifier": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The DB cluster identifier. This parameter is stored as a lowercase string.
\nConstraints:
\nMust contain from 1 to 63 letters, numbers, or hyphens.
\nFirst character must be a letter.
\nCan't end with a hyphen or contain two consecutive hyphens.
\nExample: my-cluster1
\n
The DB cluster identifier. This parameter is stored as a lowercase string.
\nConstraints:
\nMust contain from 1 to 63 letters, numbers, or hyphens.
\nFirst character must be a letter.
\nCan't end with a hyphen or contain two consecutive hyphens.
\nExample: my-cluster1
\n
Valid for: Aurora DB clusters and Multi-AZ DB clusters
", "smithy.api#required": {} } }, "DBClusterParameterGroupName": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "\n The name of the DB cluster parameter group to associate\n with this DB cluster. If you do not specify a value, then \n the default DB cluster parameter group for the specified DB engine and version is used.\n
\nConstraints:
\nIf supplied, must match the name of an existing DB cluster parameter group.
\n\n The name of the DB cluster parameter group to associate\n with this DB cluster. If you do not specify a value, then \n the default DB cluster parameter group for the specified DB engine and version is used.\n
\nConstraints:
\nIf supplied, must match the name of an existing DB cluster parameter group.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "VpcSecurityGroupIds": { "target": "com.amazonaws.rds#VpcSecurityGroupIdList", "traits": { - "smithy.api#documentation": "A list of EC2 VPC security groups to associate with this DB cluster.
" + "smithy.api#documentation": "A list of EC2 VPC security groups to associate with this DB cluster.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "DBSubnetGroupName": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "A DB subnet group to associate with this DB cluster.
\nConstraints: Must match the name of an existing DBSubnetGroup. Must not be default.
\nExample: mySubnetgroup
\n
A DB subnet group to associate with this DB cluster.
\nThis setting is required to create a Multi-AZ DB cluster.
\nConstraints: Must match the name of an existing DBSubnetGroup. Must not be default.
\nExample: mySubnetgroup
\n
Valid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "Engine": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The name of the database engine to be used for this DB cluster.
\nValid Values: aurora
(for MySQL 5.6-compatible Aurora), aurora-mysql
(for MySQL 5.7-compatible Aurora), and aurora-postgresql
\n
The name of the database engine to be used for this DB cluster.
\nValid Values:
\n\n aurora
(for MySQL 5.6-compatible Aurora)
\n aurora-mysql
(for MySQL 5.7-compatible Aurora)
\n aurora-postgresql
\n
\n mysql
\n
\n postgres
\n
Valid for: Aurora DB clusters and Multi-AZ DB clusters
", "smithy.api#required": {} } }, "EngineVersion": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The version number of the database engine to use.
\nTo list all of the available engine versions for aurora
(for MySQL 5.6-compatible Aurora), use the following command:
\n aws rds describe-db-engine-versions --engine aurora --query \"DBEngineVersions[].EngineVersion\"
\n
To list all of the available engine versions for aurora-mysql
(for MySQL 5.7-compatible Aurora), use the following command:
\n aws rds describe-db-engine-versions --engine aurora-mysql --query \"DBEngineVersions[].EngineVersion\"
\n
To list all of the available engine versions for aurora-postgresql
, use the following command:
\n aws rds describe-db-engine-versions --engine aurora-postgresql --query \"DBEngineVersions[].EngineVersion\"
\n
\n Aurora MySQL\n
\nExample: 5.6.10a
, 5.6.mysql_aurora.1.19.2
, 5.7.12
, 5.7.mysql_aurora.2.04.5
\n
\n Aurora PostgreSQL\n
\nExample: 9.6.3
, 10.7
\n
The version number of the database engine to use.
\nTo list all of the available engine versions for MySQL 5.6-compatible Aurora, use the following command:
\n\n aws rds describe-db-engine-versions --engine aurora --query \"DBEngineVersions[].EngineVersion\"
\n
To list all of the available engine versions for MySQL 5.7-compatible Aurora, use the following command:
\n\n aws rds describe-db-engine-versions --engine aurora-mysql --query \"DBEngineVersions[].EngineVersion\"
\n
To list all of the available engine versions for Aurora PostgreSQL, use the following command:
\n\n aws rds describe-db-engine-versions --engine aurora-postgresql --query \"DBEngineVersions[].EngineVersion\"
\n
To list all of the available engine versions for RDS for MySQL, use the following command:
\n\n aws rds describe-db-engine-versions --engine mysql --query \"DBEngineVersions[].EngineVersion\"
\n
To list all of the available engine versions for RDS for PostgreSQL, use the following command:
\n\n aws rds describe-db-engine-versions --engine postgres --query \"DBEngineVersions[].EngineVersion\"
\n
\n Aurora MySQL\n
\nFor information, see MySQL on Amazon RDS Versions in the \n Amazon Aurora User Guide.\n
\n\n Aurora PostgreSQL\n
\nFor information, see Amazon Aurora PostgreSQL releases and engine versions in the \n Amazon Aurora User Guide.\n
\n\n MySQL\n
\nFor information, see MySQL on Amazon RDS Versions in the \n Amazon RDS User Guide.\n
\n\n PostgreSQL\n
\nFor information, see Amazon RDS for PostgreSQL versions and extensions in the \n Amazon RDS User Guide.\n
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "Port": { "target": "com.amazonaws.rds#IntegerOptional", "traits": { - "smithy.api#documentation": "The port number on which the instances in the DB cluster accept connections.
\n\n Default: 3306
if engine is set as aurora or 5432
if set to aurora-postgresql.\n
The port number on which the instances in the DB cluster accept connections.
\n\n RDS for MySQL and Aurora MySQL\n
\n\n Default: 3306
\n
\n Valid values: 1150-65535
\n
\n RDS for PostgreSQL and Aurora PostgreSQL\n
\n\n Default: 5432
\n
\n Valid values: 1150-65535
\n
Valid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "MasterUsername": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The name of the master user for the DB cluster.
\nConstraints:
\nMust be 1 to 16 letters or numbers.
\nFirst character must be a letter.
\nCan't be a reserved word for the chosen database engine.
\nThe name of the master user for the DB cluster.
\nConstraints:
\nMust be 1 to 16 letters or numbers.
\nFirst character must be a letter.
\nCan't be a reserved word for the chosen database engine.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "MasterUserPassword": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The password for the master database user. This password can contain any printable ASCII character except \"/\", \"\"\", or \"@\".
\nConstraints: Must contain from 8 to 41 characters.
" + "smithy.api#documentation": "The password for the master database user. This password can contain any printable ASCII character except \"/\", \"\"\", or \"@\".
\nConstraints: Must contain from 8 to 41 characters.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "OptionGroupName": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "A value that indicates that the DB cluster should be associated with the specified option group.
\nPermanent options can't be removed from an option group. The option group can't be removed from a DB cluster once it is associated with a DB cluster.
" + "smithy.api#documentation": "A value that indicates that the DB cluster should be associated with the specified option group.
\nDB clusters are associated with a default option group that can't be modified.
" } }, "PreferredBackupWindow": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The daily time range during which automated backups are created\n if automated backups are enabled\n using the BackupRetentionPeriod
parameter.\n
The default is a 30-minute window selected at random from an\n 8-hour block of time for each Amazon Web Services Region. \n To view the time blocks available, see \n \n Backup window in the Amazon Aurora User Guide.\n
\nConstraints:
\nMust be in the format hh24:mi-hh24:mi
.
Must be in Universal Coordinated Time (UTC).
\nMust not conflict with the preferred maintenance window.
\nMust be at least 30 minutes.
\nThe daily time range during which automated backups are created\n if automated backups are enabled\n using the BackupRetentionPeriod
parameter.\n
The default is a 30-minute window selected at random from an\n 8-hour block of time for each Amazon Web Services Region. \n To view the time blocks available, see \n \n Backup window in the Amazon Aurora User Guide.\n
\nConstraints:
\nMust be in the format hh24:mi-hh24:mi
.
Must be in Universal Coordinated Time (UTC).
\nMust not conflict with the preferred maintenance window.
\nMust be at least 30 minutes.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "PreferredMaintenanceWindow": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
\nFormat: ddd:hh24:mi-ddd:hh24:mi
\n
The default is a 30-minute window selected at random from an\n 8-hour block of time for each Amazon Web Services Region, occurring on a random day of the\n week. To see the time blocks available, see \n \n Adjusting the Preferred DB Cluster Maintenance Window in the Amazon Aurora User Guide.\n
\nValid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.
\nConstraints: Minimum 30-minute window.
" + "smithy.api#documentation": "The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
\nFormat: ddd:hh24:mi-ddd:hh24:mi
\n
The default is a 30-minute window selected at random from an\n 8-hour block of time for each Amazon Web Services Region, occurring on a random day of the\n week. To see the time blocks available, see \n \n Adjusting the Preferred DB Cluster Maintenance Window in the Amazon Aurora User Guide.\n
\nValid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.
\nConstraints: Minimum 30-minute window.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "ReplicationSourceIdentifier": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) of the source DB instance or DB cluster if this DB\n cluster is created as a read replica.
" + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the source DB instance or DB cluster if this DB\n cluster is created as a read replica.
\nValid for: Aurora DB clusters only
" } }, "Tags": { "target": "com.amazonaws.rds#TagList", "traits": { - "smithy.api#documentation": "Tags to assign to the DB cluster.
" + "smithy.api#documentation": "Tags to assign to the DB cluster.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "StorageEncrypted": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether the DB cluster is encrypted.
" + "smithy.api#documentation": "A value that indicates whether the DB cluster is encrypted.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "KmsKeyId": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The Amazon Web Services KMS key identifier for an encrypted DB cluster.
\nThe Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.\n To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN.
\nWhen a KMS key isn't specified in KmsKeyId
:
If ReplicationSourceIdentifier
identifies an encrypted\n source, then Amazon RDS will use the KMS key used to encrypt the\n source. Otherwise, Amazon RDS will use your default KMS key.
If the StorageEncrypted
parameter is enabled and\n ReplicationSourceIdentifier
isn't specified, then Amazon RDS\n will use your default KMS key.
There is a default KMS key for your Amazon Web Services account. Your Amazon Web Services account\n has a different default KMS key for each Amazon Web Services Region.
\nIf you create a read replica of an encrypted DB cluster in another Amazon Web Services Region, you\n must set KmsKeyId
to a KMS key identifier that is valid in the destination Amazon Web Services\n Region. This KMS key is used to encrypt the read replica in that Amazon Web Services Region.
The Amazon Web Services KMS key identifier for an encrypted DB cluster.
\nThe Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.\n To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN.
\nWhen a KMS key isn't specified in KmsKeyId
:
If ReplicationSourceIdentifier
identifies an encrypted\n source, then Amazon RDS will use the KMS key used to encrypt the\n source. Otherwise, Amazon RDS will use your default KMS key.
If the StorageEncrypted
parameter is enabled and\n ReplicationSourceIdentifier
isn't specified, then Amazon RDS\n will use your default KMS key.
There is a default KMS key for your Amazon Web Services account. Your Amazon Web Services account\n has a different default KMS key for each Amazon Web Services Region.
\nIf you create a read replica of an encrypted DB cluster in another Amazon Web Services Region, you\n must set KmsKeyId
to a KMS key identifier that is valid in the destination Amazon Web Services\n Region. This KMS key is used to encrypt the read replica in that Amazon Web Services Region.
Valid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "PreSignedUrl": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "A URL that contains a Signature Version 4 signed request for \n the CreateDBCluster
action to be called in the source Amazon Web Services Region where the DB cluster is replicated from. \n You only need to specify PreSignedUrl
when you are performing cross-region replication from an encrypted DB cluster.
The pre-signed URL must be a valid request for the CreateDBCluster
API action \n that can be executed in the source Amazon Web Services Region that contains the encrypted DB cluster to be copied.
The pre-signed URL request must contain the following parameter values:
\n\n KmsKeyId
- The Amazon Web Services KMS key identifier for the KMS key to use to encrypt the copy of \n the DB cluster in the destination Amazon Web Services Region. This should refer to the same KMS key for both the CreateDBCluster
\n action that is called in the destination Amazon Web Services Region, and the action contained in the pre-signed URL.
\n DestinationRegion
- The name of the Amazon Web Services Region that Aurora read replica will\n be created in.
\n ReplicationSourceIdentifier
- The DB cluster identifier for the encrypted DB cluster to be copied. \n This identifier must be in the Amazon Resource Name (ARN) format for the source Amazon Web Services Region. For example, if you are copying an \n encrypted DB cluster from the us-west-2 Amazon Web Services Region, then your ReplicationSourceIdentifier
would look like\n Example: arn:aws:rds:us-west-2:123456789012:cluster:aurora-cluster1
.
To learn how to generate a Signature Version 4 signed request, see \n \n Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4) and\n \n Signature Version 4 Signing Process.
\nIf you are using an Amazon Web Services SDK tool or the CLI, you can specify SourceRegion
(or --source-region
for the CLI) \n instead of specifying PreSignedUrl
manually. Specifying SourceRegion
autogenerates a pre-signed URL that is a valid \n request for the operation that can be executed in the source Amazon Web Services Region.
A URL that contains a Signature Version 4 signed request for \n the CreateDBCluster
action to be called in the source Amazon Web Services Region where the DB cluster is replicated from. \n Specify PreSignedUrl
only when you are performing cross-Region replication from an encrypted DB cluster.
The pre-signed URL must be a valid request for the CreateDBCluster
API action \n that can be executed in the source Amazon Web Services Region that contains the encrypted DB cluster to be copied.
The pre-signed URL request must contain the following parameter values:
\n\n KmsKeyId
- The Amazon Web Services KMS key identifier for the KMS key to use to encrypt the copy of \n the DB cluster in the destination Amazon Web Services Region. This should refer to the same KMS key for both the CreateDBCluster
\n action that is called in the destination Amazon Web Services Region, and the action contained in the pre-signed URL.
\n DestinationRegion
- The name of the Amazon Web Services Region that Aurora read replica will\n be created in.
\n ReplicationSourceIdentifier
- The DB cluster identifier for the encrypted DB cluster to be copied. \n This identifier must be in the Amazon Resource Name (ARN) format for the source Amazon Web Services Region. For example, if you are copying an \n encrypted DB cluster from the us-west-2 Amazon Web Services Region, then your ReplicationSourceIdentifier
would look like\n Example: arn:aws:rds:us-west-2:123456789012:cluster:aurora-cluster1
.
To learn how to generate a Signature Version 4 signed request, see \n \n Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4) and\n \n Signature Version 4 Signing Process.
\nIf you are using an Amazon Web Services SDK tool or the CLI, you can specify SourceRegion
(or --source-region
for the CLI) \n instead of specifying PreSignedUrl
manually. Specifying SourceRegion
autogenerates a pre-signed URL that is a valid \n request for the operation that can be executed in the source Amazon Web Services Region.
Valid for: Aurora DB clusters only
" } }, "EnableIAMDatabaseAuthentication": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether to enable mapping of Amazon Web Services Identity and Access\n Management (IAM) accounts to database accounts. By default, mapping is disabled.
\n \nFor more information, see \n \n IAM Database Authentication in the Amazon Aurora User Guide.\n
" + "smithy.api#documentation": "A value that indicates whether to enable mapping of Amazon Web Services Identity and Access\n Management (IAM) accounts to database accounts. By default, mapping isn't\n enabled.
\nFor more information, see \n \n IAM Database Authentication in the Amazon Aurora User Guide.\n
\nValid for: Aurora DB clusters only
" } }, "BacktrackWindow": { "target": "com.amazonaws.rds#LongOptional", "traits": { - "smithy.api#documentation": "The target backtrack window, in seconds. To disable backtracking, set this value to\n 0.
\nCurrently, Backtrack is only supported for Aurora MySQL DB clusters.
\nDefault: 0
\nConstraints:
\nIf specified, this value must be set to a number from 0 to 259,200 (72 hours).
\nThe target backtrack window, in seconds. To disable backtracking, set this value to\n 0.
\n\nDefault: 0
\nConstraints:
\nIf specified, this value must be set to a number from 0 to 259,200 (72 hours).
\nValid for: Aurora MySQL DB clusters only
" } }, "EnableCloudwatchLogsExports": { "target": "com.amazonaws.rds#LogTypeList", "traits": { - "smithy.api#documentation": "The list of log types that need to be enabled for exporting to CloudWatch Logs. The values\n in the list depend on the DB engine being used. For more information, see \n Publishing Database Logs to Amazon CloudWatch Logs in the Amazon Aurora User Guide.
\n\n Aurora MySQL\n
\nPossible values are audit
, error
, general
, and slowquery
. \n
\n Aurora PostgreSQL\n
\nPossible value is postgresql
.\n
The list of log types that need to be enabled for exporting to CloudWatch Logs. The values\n in the list depend on the DB engine being used. For more information, see \n Publishing Database Logs to Amazon CloudWatch Logs in the Amazon Aurora User Guide.
\n\n Aurora MySQL\n
\nPossible values are audit
, error
, general
, and slowquery
.
\n Aurora PostgreSQL\n
\nPossible value is postgresql
.
Valid for: Aurora DB clusters only
" } }, "EngineMode": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The DB engine mode of the DB cluster, either provisioned
, serverless
, \n parallelquery
, global
, or multimaster
.
The parallelquery
engine mode isn't required for Aurora MySQL version 1.23 and higher 1.x versions, \n and version 2.09 and higher 2.x versions.
The global
engine mode isn't required for Aurora MySQL version 1.22 and higher 1.x versions, \n and global
engine mode isn't required for any 2.x versions.
The multimaster
engine mode only applies for DB clusters created with Aurora MySQL version 5.6.10a.
For Aurora PostgreSQL, the global
engine mode isn't required, and both the parallelquery
\n and the multimaster
engine modes currently aren't supported.
Limitations and requirements apply to some DB engine modes. For more information, see the \n following sections in the Amazon Aurora User Guide:
\nThe DB engine mode of the DB cluster, either provisioned
, serverless
, \n parallelquery
, global
, or multimaster
.
The parallelquery
engine mode isn't required for Aurora MySQL version 1.23 and higher 1.x versions, \n and version 2.09 and higher 2.x versions.
The global
engine mode isn't required for Aurora MySQL version 1.22 and higher 1.x versions, \n and global
engine mode isn't required for any 2.x versions.
The multimaster
engine mode only applies for DB clusters created with Aurora MySQL version 5.6.10a.
For Aurora PostgreSQL, the global
engine mode isn't required, and both the parallelquery
\n and the multimaster
engine modes currently aren't supported.
Limitations and requirements apply to some DB engine modes. For more information, see the \n following sections in the Amazon Aurora User Guide:
\nValid for: Aurora DB clusters only
" } }, "ScalingConfiguration": { "target": "com.amazonaws.rds#ScalingConfiguration", "traits": { - "smithy.api#documentation": "For DB clusters in serverless
DB engine mode, the scaling properties of the DB cluster.
For DB clusters in serverless
DB engine mode, the scaling properties of the DB cluster.
Valid for: Aurora DB clusters only
" } }, "DeletionProtection": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether the DB cluster has deletion protection enabled. \n The database can't be deleted when deletion protection is enabled. By default, \n deletion protection is disabled.
" + "smithy.api#documentation": "A value that indicates whether the DB cluster has deletion protection enabled. \n The database can't be deleted when deletion protection is enabled. By default, \n deletion protection isn't enabled.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "GlobalClusterIdentifier": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "\n The global cluster ID of an Aurora cluster that becomes the primary cluster\n in the new global database cluster.\n
" + "smithy.api#documentation": "\n The global cluster ID of an Aurora cluster that becomes the primary cluster\n in the new global database cluster.\n
\nValid for: Aurora DB clusters only
" } }, "EnableHttpEndpoint": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether to enable the HTTP endpoint for an Aurora Serverless DB cluster. By default, the HTTP endpoint \n is disabled.
\nWhen enabled, the HTTP endpoint provides a connectionless web service API for running\n SQL queries on the Aurora Serverless DB cluster. You can also query your database\n from inside the RDS console with the query editor.
\nFor more information, see Using the Data API for Aurora Serverless in the \n Amazon Aurora User Guide.
" + "smithy.api#documentation": "A value that indicates whether to enable the HTTP endpoint for an Aurora Serverless DB cluster. By default, the HTTP endpoint \n is disabled.
\nWhen enabled, the HTTP endpoint provides a connectionless web service API for running\n SQL queries on the Aurora Serverless DB cluster. You can also query your database\n from inside the RDS console with the query editor.
\nFor more information, see Using the Data API for Aurora Serverless in the \n Amazon Aurora User Guide.
\nValid for: Aurora DB clusters only
" } }, "CopyTagsToSnapshot": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether to copy all tags from the DB cluster to snapshots of the DB cluster. \n The default is not to copy them.
" + "smithy.api#documentation": "A value that indicates whether to copy all tags from the DB cluster to snapshots of the DB cluster. \n The default is not to copy them.
\nValid for: Aurora DB clusters only
" } }, "Domain": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The Active Directory directory ID to create the DB cluster in.
\n\n For Amazon Aurora DB clusters, Amazon RDS can use Kerberos Authentication to authenticate users that connect to the DB cluster.\n For more information, see Kerberos Authentication\n in the Amazon Aurora User Guide.\n
" + "smithy.api#documentation": "The Active Directory directory ID to create the DB cluster in.
\n\n For Amazon Aurora DB clusters, Amazon RDS can use Kerberos authentication to authenticate users that connect to the DB cluster.
\nFor more information, see Kerberos authentication\n in the Amazon Aurora User Guide.
\nValid for: Aurora DB clusters only
" } }, "DomainIAMRoleName": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "Specify the name of the IAM role to be used when making API calls to the Directory Service.
" + "smithy.api#documentation": "Specify the name of the IAM role to be used when making API calls to the Directory Service.
\nValid for: Aurora DB clusters only
" } }, "EnableGlobalWriteForwarding": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether to enable this DB cluster to forward write operations to the primary cluster of an\n Aurora global database (GlobalCluster). By default, write operations are not allowed on Aurora DB clusters that\n are secondary clusters in an Aurora global database.
\nYou can set this value only on Aurora DB clusters that are members of an Aurora global database. With this parameter\n enabled, a secondary cluster can forward writes to the current primary cluster and the resulting changes are replicated back to\n this cluster. For the primary DB cluster of an Aurora global database, this value is used immediately if the\n primary is demoted by the FailoverGlobalCluster API operation, but it does nothing until then.\n
" + "smithy.api#documentation": "A value that indicates whether to enable this DB cluster to forward write operations to the primary cluster of an\n Aurora global database (GlobalCluster). By default, write operations are not allowed on Aurora DB clusters that\n are secondary clusters in an Aurora global database.
\nYou can set this value only on Aurora DB clusters that are members of an Aurora global database. With this parameter\n enabled, a secondary cluster can forward writes to the current primary cluster and the resulting changes are replicated back to\n this cluster. For the primary DB cluster of an Aurora global database, this value is used immediately if the\n primary is demoted by the FailoverGlobalCluster API operation, but it does nothing until then.\n
\nValid for: Aurora DB clusters only
" + } + }, + "DBClusterInstanceClass": { + "target": "com.amazonaws.rds#String", + "traits": { + "smithy.api#documentation": "The compute and memory capacity of each DB instance in the Multi-AZ DB cluster, for example db.m6g.xlarge.\n Not all DB instance classes are available in all Amazon Web Services Regions, or for all database engines.
\nFor the full list of DB instance classes and availability for your engine, see DB instance class in the Amazon RDS User Guide.\n
\nThis setting is required to create a Multi-AZ DB cluster.
\nValid for: Multi-AZ DB clusters only
" + } + }, + "AllocatedStorage": { + "target": "com.amazonaws.rds#IntegerOptional", + "traits": { + "smithy.api#documentation": "The amount of storage in gibibytes (GiB) to allocate to each DB instance in the Multi-AZ DB cluster.
\nThis setting is required to create a Multi-AZ DB cluster.
\nValid for: Multi-AZ DB clusters only
" + } + }, + "StorageType": { + "target": "com.amazonaws.rds#String", + "traits": { + "smithy.api#documentation": "Specifies the storage type to be associated with the DB cluster.
\nThis setting is required to create a Multi-AZ DB cluster.
\n\n Valid values: standard | gp2 | io1
\n
\n If you specify io1
, also include a value for the\n Iops
parameter.\n
\n Default: io1
if the Iops
parameter\n is specified, otherwise gp2
\n
Valid for: Multi-AZ DB clusters only
" + } + }, + "Iops": { + "target": "com.amazonaws.rds#IntegerOptional", + "traits": { + "smithy.api#documentation": "The amount of Provisioned IOPS (input/output operations per second) to be initially allocated \n for each DB instance in the Multi-AZ DB cluster.
\nFor information about valid Iops
values, see Amazon RDS Provisioned IOPS storage to improve performance in the Amazon RDS User Guide.\n
This setting is required to create a Multi-AZ DB cluster.
\nConstraints: Must be a multiple between .5 and 50 of the storage amount for the DB cluster.
\nValid for: Multi-AZ DB clusters only
" + } + }, + "PubliclyAccessible": { + "target": "com.amazonaws.rds#BooleanOptional", + "traits": { + "smithy.api#documentation": "A value that indicates whether the DB cluster is publicly accessible.
\nWhen the DB cluster is publicly accessible, its Domain Name System (DNS) endpoint\n resolves to the private IP address from within the DB cluster's virtual private cloud\n (VPC). It resolves to the public IP address from outside of the DB cluster's VPC. Access\n to the DB cluster is ultimately controlled by the security group it uses. That public\n access isn't permitted if the security group assigned to the DB cluster doesn't permit\n it.
\nWhen the DB cluster isn't publicly accessible, it is an internal DB cluster with a DNS name that resolves to a private IP address.
\nDefault: The default behavior varies depending on whether DBSubnetGroupName
is specified.
If DBSubnetGroupName
isn't specified, and PubliclyAccessible
isn't specified, the following applies:
If the default VPC in the target Region doesn’t have an internet gateway attached to it, the DB cluster is private.
\nIf the default VPC in the target Region has an internet gateway attached to it, the DB cluster is public.
\nIf DBSubnetGroupName
is specified, and PubliclyAccessible
isn't specified, the following applies:
If the subnets are part of a VPC that doesn’t have an internet gateway attached to it, the DB cluster is private.
\nIf the subnets are part of a VPC that has an internet gateway attached to it, the DB cluster is public.
\nValid for: Multi-AZ DB clusters only
" + } + }, + "AutoMinorVersionUpgrade": { + "target": "com.amazonaws.rds#BooleanOptional", + "traits": { + "smithy.api#documentation": "A value that indicates whether minor engine upgrades are applied automatically to the DB cluster during the maintenance window. \n By default, minor engine upgrades are applied automatically.
\nValid for: Multi-AZ DB clusters only
" + } + }, + "MonitoringInterval": { + "target": "com.amazonaws.rds#IntegerOptional", + "traits": { + "smithy.api#documentation": "The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB cluster. To turn off \n collecting Enhanced Monitoring metrics, specify 0. The default is 0.
\nIf MonitoringRoleArn
is specified, also set MonitoringInterval
\n to a value other than 0.
Valid Values: 0, 1, 5, 10, 15, 30, 60
\n
Valid for: Multi-AZ DB clusters only
" + } + }, + "MonitoringRoleArn": { + "target": "com.amazonaws.rds#String", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) for the IAM role that permits RDS to send Enhanced Monitoring metrics to Amazon CloudWatch Logs. \n An example is arn:aws:iam:123456789012:role/emaccess
. For information on creating a monitoring role,\n see Setting \n up and enabling Enhanced Monitoring in the Amazon RDS User Guide.
If MonitoringInterval
is set to a value other than 0, supply a MonitoringRoleArn
value.
Valid for: Multi-AZ DB clusters only
" + } + }, + "EnablePerformanceInsights": { + "target": "com.amazonaws.rds#BooleanOptional", + "traits": { + "smithy.api#documentation": "A value that indicates whether to turn on Performance Insights for the DB cluster.\n
\nFor more information, see \n Using Amazon Performance Insights in the Amazon RDS User Guide.\n
\nValid for: Multi-AZ DB clusters only
" + } + }, + "PerformanceInsightsKMSKeyId": { + "target": "com.amazonaws.rds#String", + "traits": { + "smithy.api#documentation": "The Amazon Web Services KMS key identifier for encryption of Performance Insights data.
\nThe Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.
\nIf you don't specify a value for PerformanceInsightsKMSKeyId
, then Amazon RDS \n uses your default KMS key. There is a default KMS key for your Amazon Web Services account. \n Your Amazon Web Services account has a different default KMS key for each Amazon Web Services Region.
Valid for: Multi-AZ DB clusters only
" + } + }, + "PerformanceInsightsRetentionPeriod": { + "target": "com.amazonaws.rds#IntegerOptional", + "traits": { + "smithy.api#documentation": "The amount of time, in days, to retain Performance Insights data. Valid values are 7 or 731 (2 years).
\nValid for: Multi-AZ DB clusters only
" } } }, @@ -2324,7 +2393,7 @@ } ], "traits": { - "smithy.api#documentation": "Creates a new DB cluster parameter group.
\nParameters in a DB cluster parameter group apply to all of the instances in a DB cluster.
\n\n A DB cluster parameter group is initially created with the default parameters for the\n database engine used by instances in the DB cluster. To provide custom values for any of the\n parameters, you must modify the group after creating it using\n ModifyDBClusterParameterGroup
. Once you've created a DB cluster parameter group, you need to\n associate it with your DB cluster using ModifyDBCluster
. When you associate\n a new DB cluster parameter group with a running DB cluster, you need to reboot the DB\n instances in the DB cluster without failover for the new DB cluster parameter group and \n associated settings to take effect. \n
After you create a DB cluster parameter group, you should wait at least 5 minutes\n before creating your first DB cluster\n that uses that DB cluster parameter group as the default parameter \n group. This allows Amazon RDS to fully complete the create action before the DB cluster parameter \n group is used as the default for a new DB cluster. This is especially important for parameters \n that are critical when creating the default database for a DB cluster, such as the character set \n for the default database defined by the character_set_database
parameter. You can use the \n Parameter Groups option of the Amazon RDS console or the \n DescribeDBClusterParameters
action to verify \n that your DB cluster parameter group has been created or modified.
For more information on Amazon Aurora, see \n \n What Is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nThis action only applies to Aurora DB clusters.
\nCreates a new DB cluster parameter group.
\nParameters in a DB cluster parameter group apply to all of the instances in a DB cluster.
\n\n A DB cluster parameter group is initially created with the default parameters for the\n database engine used by instances in the DB cluster. To provide custom values for any of the\n parameters, you must modify the group after creating it using\n ModifyDBClusterParameterGroup
. Once you've created a DB cluster parameter group, you need to\n associate it with your DB cluster using ModifyDBCluster
.
When you associate a new DB cluster parameter group with a running Aurora DB cluster, reboot the DB\n instances in the DB cluster without failover for the new DB cluster parameter group and \n associated settings to take effect. \n
\nWhen you associate a new DB cluster parameter group with a running Multi-AZ DB cluster, reboot the DB\n cluster without failover for the new DB cluster parameter group and associated settings to take effect. \n
\nAfter you create a DB cluster parameter group, you should wait at least 5 minutes\n before creating your first DB cluster\n that uses that DB cluster parameter group as the default parameter \n group. This allows Amazon RDS to fully complete the create action before the DB cluster parameter \n group is used as the default for a new DB cluster. This is especially important for parameters \n that are critical when creating the default database for a DB cluster, such as the character set \n for the default database defined by the character_set_database
parameter. You can use the \n Parameter Groups option of the Amazon RDS console or the \n DescribeDBClusterParameters
action to verify \n that your DB cluster parameter group has been created or modified.
For more information on Amazon Aurora, see \n \n What is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nFor more information on Multi-AZ DB clusters, see \n \n Multi-AZ deployments with two readable standby DB instances in the Amazon RDS User Guide.\n
\nThe Multi-AZ DB clusters feature is in preview and is subject to change.
\nThe name of the DB cluster parameter group.
\nConstraints:
\nMust match the name of an existing DB cluster parameter group.
\nThis value is stored as a lowercase string.
\nThe name of the DB cluster parameter group.
\nConstraints:
\nMust not match the name of an existing DB cluster parameter group.
\nThis value is stored as a lowercase string.
\nThe DB cluster parameter group family name. A DB cluster parameter group can be associated with one and only one DB cluster \n parameter group family, and can be applied only to a DB cluster running a database engine and engine version compatible with that DB cluster parameter group family.
\n\n Aurora MySQL\n
\nExample: aurora5.6
, aurora-mysql5.7
\n
\n Aurora PostgreSQL\n
\nExample: aurora-postgresql9.6
\n
To list all of the available parameter group families for a DB engine, use the following command:
\n\n aws rds describe-db-engine-versions --query \"DBEngineVersions[].DBParameterGroupFamily\" --engine
\n
For example, to list all of the available parameter group families for the Aurora PostgreSQL DB engine, use the following command:
\n\n aws rds describe-db-engine-versions --query \"DBEngineVersions[].DBParameterGroupFamily\" --engine aurora-postgresql
\n
The output contains duplicates.
\nThe following are the valid DB engine values:
\n\n aurora
(for MySQL 5.6-compatible Aurora)
\n aurora-mysql
(for MySQL 5.7-compatible Aurora)
\n aurora-postgresql
\n
The DB cluster parameter group family name. A DB cluster parameter group can be associated with one and only one DB cluster \n parameter group family, and can be applied only to a DB cluster running a database engine and engine version compatible with that DB cluster parameter group family.
\n\n Aurora MySQL\n
\nExample: aurora5.6
, aurora-mysql5.7
\n
\n Aurora PostgreSQL\n
\nExample: aurora-postgresql9.6
\n
\n RDS for MySQL\n
\nExample: mysql8.0
\n
\n RDS for PostgreSQL\n
\nExample: postgres12
\n
To list all of the available parameter group families for a DB engine, use the following command:
\n\n aws rds describe-db-engine-versions --query \"DBEngineVersions[].DBParameterGroupFamily\" --engine
\n
For example, to list all of the available parameter group families for the Aurora PostgreSQL DB engine, use the following command:
\n\n aws rds describe-db-engine-versions --query \"DBEngineVersions[].DBParameterGroupFamily\" --engine aurora-postgresql
\n
The output contains duplicates.
\nThe following are the valid DB engine values:
\n\n aurora
(for MySQL 5.6-compatible Aurora)
\n aurora-mysql
(for MySQL 5.7-compatible Aurora)
\n aurora-postgresql
\n
\n mysql
\n
\n postgres
\n
Creates a snapshot of a DB cluster. For more information on Amazon Aurora, see \n \n What Is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nThis action only applies to Aurora DB clusters.
\nCreates a snapshot of a DB cluster.
\nFor more information on Amazon Aurora, see What is Amazon\n Aurora? in the Amazon Aurora User Guide.\n
\nFor more information on Multi-AZ DB clusters, see \n \n Multi-AZ deployments with two readable standby DB instances in the Amazon RDS User Guide.\n
\nThe Multi-AZ DB clusters feature is in preview and is subject to change.
\nThe compute and memory capacity of the DB instance, for example, db.m4.large
.\n Not all DB instance classes are available in all Amazon Web Services Regions, or for all database engines.\n For the full list of DB instance classes,\n and availability for your engine, see\n DB Instance Class in the Amazon RDS User Guide.\n
The compute and memory capacity of the DB instance, for example db.m4.large.\n Not all DB instance classes are available in all Amazon Web Services Regions, or for all database engines.\n For the full list of DB instance classes,\n and availability for your engine, see\n DB Instance Class in the Amazon RDS User Guide.\n
", "smithy.api#required": {} } }, @@ -2553,7 +2622,7 @@ "MasterUsername": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The name for the master user.
\n\n\n Amazon Aurora\n
\nNot applicable. The name for the master user is managed by the DB cluster.\n
\n\n\n MariaDB\n
\nConstraints:
\nRequired for MariaDB.
\nMust be 1 to 16 letters or numbers.
\nCan't be a reserved word for the chosen database engine.
\n\n Microsoft SQL Server\n
\nConstraints:
\nRequired for SQL Server.
\nMust be 1 to 128 letters or numbers.
\nThe first character must be a letter.
\nCan't be a reserved word for the chosen database engine.
\n\n MySQL\n
\nConstraints:
\nRequired for MySQL.
\nMust be 1 to 16 letters or numbers.
\nFirst character must be a letter.
\nCan't be a reserved word for the chosen database engine.
\n\n Oracle\n
\nConstraints:
\nRequired for Oracle.
\nMust be 1 to 30 letters or numbers.
\nFirst character must be a letter.
\nCan't be a reserved word for the chosen database engine.
\n\n PostgreSQL\n
\nConstraints:
\nRequired for PostgreSQL.
\nMust be 1 to 63 letters or numbers.
\nFirst character must be a letter.
\nCan't be a reserved word for the chosen database engine.
\nThe name for the master user.
\n\n\n Amazon Aurora\n
\nNot applicable. The name for the master user is managed by the DB cluster.\n
\n \n\n Amazon RDS\n
\nConstraints:
\nRequired.
\nMust be 1 to 16 letters, numbers, or underscores.
\nFirst character must be a letter.
\nCan't be a reserved word for the chosen database engine.
\nThe version number of the database engine to use.
\nFor a list of valid engine versions, use the DescribeDBEngineVersions
action.
The following are the database engines and links to information about the major and minor versions that are available with \n Amazon RDS. Not every database engine is available for every Amazon Web Services Region.
\n \n\n Amazon Aurora\n
\nNot applicable. The version number of the database engine to be used by the DB\n instance is managed by the DB cluster.
\n \n\n Amazon RDS Custom\n
\nA custom engine version (CEV) that you have previously created. This setting is required for RDS Custom. The CEV \n name has the following format: 19.customized_string\n
. An example identifier is \n 19.my_cev1
. For more information, see \n Creating an RDS Custom DB instance in the Amazon RDS User Guide..
\n MariaDB\n
\n\nSee MariaDB on Amazon RDS Versions in the \n Amazon RDS User Guide.\n
\n \n\n Microsoft SQL Server\n
\n \nSee Microsoft SQL Server Versions on Amazon RDS in the \n Amazon RDS User Guide.\n
\n \n\n MySQL\n
\n\nSee MySQL on Amazon RDS Versions in the \n Amazon RDS User Guide.\n
\n \n\n Oracle\n
\n \nSee Oracle Database Engine Release Notes in the \n Amazon RDS User Guide.\n
\n\n\n PostgreSQL\n
\n\nSee Amazon RDS for PostgreSQL versions and extensions in the \n Amazon RDS User Guide.\n
" + "smithy.api#documentation": "The version number of the database engine to use.
\nFor a list of valid engine versions, use the DescribeDBEngineVersions
action.
The following are the database engines and links to information about the major and minor versions that are available with \n Amazon RDS. Not every database engine is available for every Amazon Web Services Region.
\n \n\n Amazon Aurora\n
\nNot applicable. The version number of the database engine to be used by the DB\n instance is managed by the DB cluster.
\n \n\n Amazon RDS Custom\n
\nA custom engine version (CEV) that you have previously created. This setting is required for RDS Custom. The CEV \n name has the following format: 19.customized_string\n
. An example identifier is \n 19.my_cev1
. For more information, see \n Creating an RDS Custom DB instance in the Amazon RDS User Guide..
\n MariaDB\n
\n\nFor information, see MariaDB on Amazon RDS Versions in the \n Amazon RDS User Guide.\n
\n \n\n Microsoft SQL Server\n
\n \nFor information, see Microsoft SQL Server Versions on Amazon RDS in the \n Amazon RDS User Guide.\n
\n \n\n MySQL\n
\n\nFor information, see MySQL on Amazon RDS Versions in the \n Amazon RDS User Guide.\n
\n \n\n Oracle\n
\n \nFor information, see Oracle Database Engine Release Notes in the \n Amazon RDS User Guide.\n
\n\n\n PostgreSQL\n
\n\nFor information, see Amazon RDS for PostgreSQL versions and extensions in the \n Amazon RDS User Guide.\n
" } }, "AutoMinorVersionUpgrade": { @@ -2643,7 +2712,7 @@ "Iops": { "target": "com.amazonaws.rds#IntegerOptional", "traits": { - "smithy.api#documentation": "The amount of Provisioned IOPS (input/output operations per second) to be initially allocated for the DB instance.\n For information about valid Iops values, see Amazon RDS Provisioned IOPS Storage to Improve Performance in the Amazon RDS User Guide.\n
\nConstraints: For MariaDB, MySQL, Oracle, and PostgreSQL DB instances, must be a multiple between .5 and 50 of the storage amount for the DB instance. \n For SQL Server DB instances, must be a multiple between 1 and 50 of the storage amount for the DB instance.\n
" + "smithy.api#documentation": "The amount of Provisioned IOPS (input/output operations per second) to be initially allocated for the DB instance.\n For information about valid Iops
values, see Amazon RDS Provisioned IOPS storage to improve performance in the Amazon RDS User Guide.\n
Constraints: For MariaDB, MySQL, Oracle, and PostgreSQL DB instances, must be a multiple between .5 and 50 \n of the storage amount for the DB instance. For SQL Server DB instances, must be a multiple between 1 and 50 \n of the storage amount for the DB instance.\n
" } }, "OptionGroupName": { @@ -2667,7 +2736,7 @@ "PubliclyAccessible": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether the DB instance is publicly accessible.
\nWhen the DB instance is publicly accessible, its DNS endpoint resolves to the private IP address from within the DB instance's VPC, \n and to the public IP address from outside of the DB instance's VPC. Access to the DB instance is ultimately controlled by the security group it uses, \n and that public access is not permitted if the security group assigned to the DB instance doesn't permit it.
\nWhen the DB instance isn't publicly accessible, it is an internal DB instance with a DNS name that resolves to a private IP address.
\nDefault: The default behavior varies depending on whether DBSubnetGroupName
is specified.
If DBSubnetGroupName
isn't specified, and PubliclyAccessible
isn't specified, the following applies:
If the default VPC in the target region doesn’t have an Internet gateway attached to it, the DB instance is private.
\nIf the default VPC in the target region has an Internet gateway attached to it, the DB instance is public.
\nIf DBSubnetGroupName
is specified, and PubliclyAccessible
isn't specified, the following applies:
If the subnets are part of a VPC that doesn’t have an Internet gateway attached to it, the DB instance is private.
\nIf the subnets are part of a VPC that has an Internet gateway attached to it, the DB instance is public.
\nA value that indicates whether the DB instance is publicly accessible.
\nWhen the DB instance is publicly accessible, its Domain Name System (DNS) endpoint resolves to the private IP address from \n within the DB instance's virtual private cloud (VPC). It resolves to the public IP address from outside of the DB instance's VPC. \n Access to the DB instance is ultimately controlled by the security group it uses. \n That public access is not permitted if the security group assigned to the DB instance doesn't permit it.
\nWhen the DB instance isn't publicly accessible, it is an internal DB instance with a DNS name that resolves to a private IP address.
\nDefault: The default behavior varies depending on whether DBSubnetGroupName
is specified.
If DBSubnetGroupName
isn't specified, and PubliclyAccessible
isn't specified, the following applies:
If the default VPC in the target Region doesn’t have an internet gateway attached to it, the DB instance is private.
\nIf the default VPC in the target Region has an internet gateway attached to it, the DB instance is public.
\nIf DBSubnetGroupName
is specified, and PubliclyAccessible
isn't specified, the following applies:
If the subnets are part of a VPC that doesn’t have an internet gateway attached to it, the DB instance is private.
\nIf the subnets are part of a VPC that has an internet gateway attached to it, the DB instance is public.
\nA value that indicates whether to enable mapping of Amazon Web Services Identity and Access\n Management (IAM) accounts to database accounts. By default, mapping is disabled.
\nThis setting doesn't apply to RDS Custom or Amazon Aurora. In Aurora, mapping Amazon Web Services IAM accounts \n to database accounts is managed by the DB cluster.
\nFor more information, see \n \n IAM Database Authentication for MySQL and PostgreSQL in the Amazon RDS User Guide.\n
" + "smithy.api#documentation": "A value that indicates whether to enable mapping of Amazon Web Services Identity and Access Management\n (IAM) accounts to database accounts. By default, mapping isn't enabled.
\nThis setting doesn't apply to RDS Custom or Amazon Aurora. In Aurora, mapping Amazon Web Services IAM accounts \n to database accounts is managed by the DB cluster.
\nFor more information, see \n \n IAM Database Authentication for MySQL and PostgreSQL in the Amazon RDS User Guide.\n
" } }, "EnablePerformanceInsights": { @@ -2781,7 +2850,7 @@ "EnableCloudwatchLogsExports": { "target": "com.amazonaws.rds#LogTypeList", "traits": { - "smithy.api#documentation": "The list of log types that need to be enabled for exporting to CloudWatch Logs. The values\n in the list depend on the DB engine. For more information, see \n Publishing Database Logs to Amazon CloudWatch Logs in the Amazon Relational Database\n Service User Guide.
\n\n Amazon Aurora\n
\nNot applicable. CloudWatch Logs exports are managed by the DB cluster.\n
\n\n RDS Custom\n
\nNot applicable.\n
\n\n MariaDB\n
\nPossible values are audit
, error
, general
, and slowquery
. \n
\n Microsoft SQL Server\n
\nPossible values are agent
and error
.\n
\n MySQL\n
\nPossible values are audit
, error
, general
, and slowquery
. \n
\n Oracle\n
\nPossible values are alert
, audit
, listener
, trace
, and\n oemagent
.\n
\n PostgreSQL\n
\nPossible values are postgresql
and upgrade
.\n
The list of log types that need to be enabled for exporting to CloudWatch Logs. The values\n in the list depend on the DB engine. For more information, see \n Publishing Database Logs to Amazon CloudWatch Logs in the Amazon Relational Database\n Service User Guide.
\n\n Amazon Aurora\n
\nNot applicable. CloudWatch Logs exports are managed by the DB cluster.\n
\n\n RDS Custom\n
\nNot applicable.\n
\n\n MariaDB\n
\nPossible values are audit
, error
, general
, and slowquery
. \n
\n Microsoft SQL Server\n
\nPossible values are agent
and error
.\n
\n MySQL\n
\nPossible values are audit
, error
, general
, and slowquery
. \n
\n Oracle\n
\nPossible values are alert
, audit
, listener
, trace
, and\n oemagent
.\n
\n PostgreSQL\n
\nPossible values are postgresql
and upgrade
.\n
A value that indicates whether the DB instance has deletion protection enabled. \n The database can't be deleted when deletion protection is enabled. By default, \n deletion protection is disabled. For more information, see \n \n Deleting a DB Instance.\n
\n\n Amazon Aurora\n
\nNot applicable. You can enable or disable deletion protection for the DB cluster. \n For more information, see CreateDBCluster
. DB instances in a DB \n cluster can be deleted even when deletion protection is enabled for the DB cluster.\n
A value that indicates whether the DB instance has deletion protection enabled. \n The database can't be deleted when deletion protection is enabled. By default, \n deletion protection isn't enabled. For more information, see \n \n Deleting a DB Instance.\n
\n\n Amazon Aurora\n
\nNot applicable. You can enable or disable deletion protection for the DB cluster. \n For more information, see CreateDBCluster
. DB instances in a DB \n cluster can be deleted even when deletion protection is enabled for the DB cluster.\n
The instance profile associated with the underlying Amazon EC2 instance of an \n RDS Custom DB instance. The instance profile must meet the following requirements:
\nThe profile must exist in your account.
\nThe profile must have an IAM role that Amazon EC2 has permissions to assume.
\nThe instance profile name and the associated IAM role name must start with the prefix AWSRDSCustom
.
For the list of permissions required for the IAM role, see \n \n Configure IAM and your VPC in the Amazon Relational Database Service\n User Guide.
\nThis setting is required for RDS Custom.
" } + }, + "BackupTarget": { + "target": "com.amazonaws.rds#String", + "traits": { + "smithy.api#documentation": "Specifies where automated backups and manual snapshots are stored.
\nPossible values are outposts
(Amazon Web Services Outposts) and region
(Amazon Web Services Region). The default is region
.
For more information, see Working \n with Amazon RDS on Amazon Web Services Outposts in the Amazon RDS User Guide.
" + } } }, "traits": { @@ -2903,14 +2978,14 @@ "SourceDBInstanceIdentifier": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The identifier of the DB instance that will act as the source for the read replica.\n Each DB instance can have up to five read replicas.
\nConstraints:
\nMust be the identifier of an existing MySQL, MariaDB, Oracle, PostgreSQL, or SQL Server DB\n instance.
\nCan specify a DB instance that is a MySQL read replica only if the source is running MySQL\n 5.6 or later.
\nFor the limitations of Oracle read replicas, see Read Replica Limitations with Oracle in the\n Amazon RDS User Guide.
\nFor the limitations of SQL Server read replicas, see Read Replica\n Limitations with Microsoft SQL Server in the Amazon RDS User Guide.
\nCan specify a PostgreSQL DB instance only if the source is running PostgreSQL 9.3.5 or\n later (9.4.7 and higher for cross-region replication).
\nThe specified DB instance must have automatic backups enabled, that is, its backup\n retention period must be greater than 0.
\nIf the source DB instance is in the same Amazon Web Services Region as the read replica, specify a valid DB\n instance identifier.
\nIf the source DB instance is in a different Amazon Web Services Region from the read replica, specify a valid DB instance ARN. \n For more information, see Constructing an ARN for Amazon RDS \n in the Amazon RDS User Guide. This doesn't apply to SQL Server or RDS Custom, which don't support \n cross-Region replicas.
\nThe identifier of the DB instance that will act as the source for the read replica.\n Each DB instance can have up to five read replicas.
\nConstraints:
\nMust be the identifier of an existing MySQL, MariaDB, Oracle, PostgreSQL, or SQL Server DB\n instance.
\nCan specify a DB instance that is a MySQL read replica only if the source is running MySQL\n 5.6 or later.
\nFor the limitations of Oracle read replicas, see Read Replica Limitations with Oracle in the\n Amazon RDS User Guide.
\nFor the limitations of SQL Server read replicas, see Read Replica\n Limitations with Microsoft SQL Server in the Amazon RDS User Guide.
\nCan specify a PostgreSQL DB instance only if the source is running PostgreSQL 9.3.5 or\n later (9.4.7 and higher for cross-Region replication).
\nThe specified DB instance must have automatic backups enabled, that is, its backup\n retention period must be greater than 0.
\nIf the source DB instance is in the same Amazon Web Services Region as the read replica, specify a valid DB\n instance identifier.
\nIf the source DB instance is in a different Amazon Web Services Region from the read replica, specify a valid DB instance ARN. \n For more information, see Constructing an ARN for Amazon RDS \n in the Amazon RDS User Guide. This doesn't apply to SQL Server or RDS Custom, which don't support \n cross-Region replicas.
\nThe compute and memory capacity of the read replica, for example,\n db.m4.large
. Not all DB instance classes are available in all Amazon Web Services\n Regions, or for all database engines. For the full list of DB instance classes, and\n availability for your engine, see DB Instance\n Class in the Amazon RDS User Guide.\n
Default: Inherits from the source DB instance.
" + "smithy.api#documentation": "The compute and memory capacity of the read replica, for example\n db.m4.large. Not all DB instance classes are available in all Amazon Web Services\n Regions, or for all database engines. For the full list of DB instance classes, and\n availability for your engine, see DB Instance\n Class in the Amazon RDS User Guide.\n
\nDefault: Inherits from the source DB instance.
" } }, "AvailabilityZone": { @@ -2952,13 +3027,13 @@ "DBParameterGroupName": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The name of the DB parameter group to associate with this DB instance.
\nIf you do not specify a value for DBParameterGroupName
, then Amazon RDS\n uses the DBParameterGroup
of source DB instance for a same region read\n replica, or the default DBParameterGroup
for the specified DB engine for a\n cross region read replica.
Specifying a parameter group for this operation is only supported for Oracle DB instances. It \n isn't supported for RDS Custom.
\nConstraints:
\nMust be 1 to 255 letters, numbers, or hyphens.
\nFirst character must be a letter
\nCan't end with a hyphen or contain two consecutive hyphens
\nThe name of the DB parameter group to associate with this DB instance.
\nIf you do not specify a value for DBParameterGroupName
, then Amazon RDS\n uses the DBParameterGroup
of source DB instance for a same Region read\n replica, or the default DBParameterGroup
for the specified DB engine for a\n cross-Region read replica.
Specifying a parameter group for this operation is only supported for Oracle DB instances. It \n isn't supported for RDS Custom.
\nConstraints:
\nMust be 1 to 255 letters, numbers, or hyphens.
\nFirst character must be a letter
\nCan't end with a hyphen or contain two consecutive hyphens
\nA value that indicates whether the DB instance is publicly accessible.
\nWhen the DB instance is publicly accessible, its DNS endpoint resolves to the private IP address from within the DB instance's VPC, \n and to the public IP address from outside of the DB instance's VPC. Access to the DB instance is ultimately controlled by the security group it uses, \n and that public access is not permitted if the security group assigned to the DB instance doesn't permit it.
\nWhen the DB instance isn't publicly accessible, it is an internal DB instance with a DNS name that resolves to a private IP address.
\nFor more information, see CreateDBInstance.
" + "smithy.api#documentation": "A value that indicates whether the DB instance is publicly accessible.
\nWhen the DB cluster is publicly accessible, its Domain Name System (DNS) endpoint\n resolves to the private IP address from within the DB cluster's virtual private cloud\n (VPC). It resolves to the public IP address from outside of the DB cluster's VPC. Access\n to the DB cluster is ultimately controlled by the security group it uses. That public\n access isn't permitted if the security group assigned to the DB cluster doesn't permit\n it.
\nWhen the DB instance isn't publicly accessible, it is an internal DB instance with a DNS name that resolves to a private IP address.
\nFor more information, see CreateDBInstance.
" } }, "Tags": { @@ -3009,13 +3084,13 @@ "PreSignedUrl": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The URL that contains a Signature Version 4 signed request for the CreateDBInstanceReadReplica
API action \n in the source Amazon Web Services Region that contains the source DB instance.\n
You must specify this parameter when you create an encrypted read replica from\n another Amazon Web Services Region by using the Amazon RDS API. Don't specify\n PreSignedUrl
when you are creating an encrypted read replica in the\n same Amazon Web Services Region.
The presigned URL must be a valid request for the CreateDBInstanceReadReplica
API action \n that can be executed in the source Amazon Web Services Region that contains the encrypted source DB instance. \n The presigned URL request must contain the following parameter values:\n
\n DestinationRegion
- The Amazon Web Services Region that the encrypted read\n replica is created in. This Amazon Web Services Region is the same one where the\n CreateDBInstanceReadReplica
action is called that contains this presigned URL.
For example, if you create an encrypted DB instance in the us-west-1 Amazon Web Services Region,\n from a source DB instance in the us-east-2 Amazon Web Services Region, \n then you call the CreateDBInstanceReadReplica
action in\n the us-east-1 Amazon Web Services Region and provide a presigned URL that contains a call to the\n CreateDBInstanceReadReplica
action in the us-west-2 Amazon Web Services Region. For this\n example, the DestinationRegion
in the presigned URL must be set to\n the us-east-1 Amazon Web Services Region.\n
\n KmsKeyId
- The Amazon Web Services KMS key identifier for the key to use to\n encrypt the read replica in the destination Amazon Web Services Region. This is the same\n identifier for both the CreateDBInstanceReadReplica
action that is\n called in the destination Amazon Web Services Region, and the action contained in the presigned\n URL.
\n SourceDBInstanceIdentifier
- The DB instance identifier for\n the encrypted DB instance to be replicated. This identifier must be in the\n Amazon Resource Name (ARN) format for the source Amazon Web Services Region. For example, if you\n are creating an encrypted read replica from a DB instance in the us-west-2 Amazon Web Services\n Region, then your SourceDBInstanceIdentifier
looks like the\n following example:\n arn:aws:rds:us-west-2:123456789012:instance:mysql-instance1-20161115
.
To learn how to generate a Signature Version 4 signed request, see \n Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4) and\n Signature Version 4 Signing Process.\n
\n \nIf you are using an Amazon Web Services SDK tool or the CLI, you can specify\n SourceRegion
(or --source-region
for the CLI)\n instead of specifying PreSignedUrl
manually. Specifying\n SourceRegion
autogenerates a presigned URL that is a valid request\n for the operation that can be executed in the source Amazon Web Services Region.
\n SourceRegion
isn't supported for SQL Server, because SQL Server on Amazon RDS\n doesn't support cross-region read replicas.
This setting doesn't apply to RDS Custom.
" + "smithy.api#documentation": "The URL that contains a Signature Version 4 signed request for the CreateDBInstanceReadReplica
API action \n in the source Amazon Web Services Region that contains the source DB instance.\n
You must specify this parameter when you create an encrypted read replica from\n another Amazon Web Services Region by using the Amazon RDS API. Don't specify\n PreSignedUrl
when you are creating an encrypted read replica in the\n same Amazon Web Services Region.
The presigned URL must be a valid request for the CreateDBInstanceReadReplica
API action \n that can be executed in the source Amazon Web Services Region that contains the encrypted source DB instance. \n The presigned URL request must contain the following parameter values:\n
\n DestinationRegion
- The Amazon Web Services Region that the encrypted read\n replica is created in. This Amazon Web Services Region is the same one where the\n CreateDBInstanceReadReplica
action is called that contains this presigned URL.
For example, if you create an encrypted DB instance in the us-west-1 Amazon Web Services Region,\n from a source DB instance in the us-east-2 Amazon Web Services Region, \n then you call the CreateDBInstanceReadReplica
action in\n the us-east-1 Amazon Web Services Region and provide a presigned URL that contains a call to the\n CreateDBInstanceReadReplica
action in the us-west-2 Amazon Web Services Region. For this\n example, the DestinationRegion
in the presigned URL must be set to\n the us-east-1 Amazon Web Services Region.\n
\n KmsKeyId
- The Amazon Web Services KMS key identifier for the key to use to\n encrypt the read replica in the destination Amazon Web Services Region. This is the same\n identifier for both the CreateDBInstanceReadReplica
action that is\n called in the destination Amazon Web Services Region, and the action contained in the presigned\n URL.
\n SourceDBInstanceIdentifier
- The DB instance identifier for\n the encrypted DB instance to be replicated. This identifier must be in the\n Amazon Resource Name (ARN) format for the source Amazon Web Services Region. For example, if you\n are creating an encrypted read replica from a DB instance in the us-west-2 Amazon Web Services\n Region, then your SourceDBInstanceIdentifier
looks like the\n following example:\n arn:aws:rds:us-west-2:123456789012:instance:mysql-instance1-20161115
.
To learn how to generate a Signature Version 4 signed request, see \n Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4) and\n Signature Version 4 Signing Process.\n
\n \nIf you are using an Amazon Web Services SDK tool or the CLI, you can specify\n SourceRegion
(or --source-region
for the CLI)\n instead of specifying PreSignedUrl
manually. Specifying\n SourceRegion
autogenerates a presigned URL that is a valid request\n for the operation that can be executed in the source Amazon Web Services Region.
\n SourceRegion
isn't supported for SQL Server, because SQL Server on Amazon RDS\n doesn't support cross-Region read replicas.
This setting doesn't apply to RDS Custom.
" } }, "EnableIAMDatabaseAuthentication": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether to enable mapping of Amazon Web Services Identity and Access\n Management (IAM) accounts to database accounts. By default, mapping is disabled.
\n \nFor more information about IAM database authentication, see \n \n IAM Database Authentication for MySQL and PostgreSQL in the Amazon RDS User Guide.\n
\nThis setting doesn't apply to RDS Custom.
" + "smithy.api#documentation": "A value that indicates whether to enable mapping of Amazon Web Services Identity and Access Management\n (IAM) accounts to database accounts. By default, mapping isn't enabled.
\n \nFor more information about IAM database authentication, see \n \n IAM Database Authentication for MySQL and PostgreSQL in the Amazon RDS User Guide.\n
\nThis setting doesn't apply to RDS Custom.
" } }, "EnablePerformanceInsights": { @@ -3057,7 +3132,7 @@ "DeletionProtection": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether the DB instance has deletion protection enabled. \n The database can't be deleted when deletion protection is enabled. By default, \n deletion protection is disabled. For more information, see \n \n Deleting a DB Instance.\n
" + "smithy.api#documentation": "A value that indicates whether the DB instance has deletion protection enabled. \n The database can't be deleted when deletion protection is enabled. By default, \n deletion protection isn't enabled. For more information, see \n \n Deleting a DB Instance.\n
" } }, "Domain": { @@ -4336,10 +4411,70 @@ "traits": { "smithy.api#documentation": "A value that specifies that changes to the DB cluster are pending. This element is only included when changes are pending. \n Specific changes are identified by subelements.
" } + }, + "DBClusterInstanceClass": { + "target": "com.amazonaws.rds#String", + "traits": { + "smithy.api#documentation": "The name of the compute and memory capacity class of the DB instance.
\nThis setting is only for non-Aurora Multi-AZ DB clusters.
" + } + }, + "StorageType": { + "target": "com.amazonaws.rds#String", + "traits": { + "smithy.api#documentation": "The storage type associated with DB instance.
\nThis setting is only for non-Aurora Multi-AZ DB clusters.
" + } + }, + "Iops": { + "target": "com.amazonaws.rds#IntegerOptional", + "traits": { + "smithy.api#documentation": "The Provisioned IOPS (I/O operations per second) value.
\nThis setting is only for non-Aurora Multi-AZ DB clusters.
" + } + }, + "PubliclyAccessible": { + "target": "com.amazonaws.rds#BooleanOptional", + "traits": { + "smithy.api#documentation": "Specifies the accessibility options for the DB instance.
\nWhen the DB instance is publicly accessible, its Domain Name System (DNS) endpoint resolves to the private \n IP address from within the DB instance's virtual private cloud (VPC). \n It resolves to the public IP address from outside of the DB instance's VPC. \n Access to the DB instance is ultimately controlled by the security group it uses. \n That public access is not permitted if the security group assigned to the DB instance doesn't permit it.
\nWhen the DB instance isn't publicly accessible, it is an internal DB instance with a DNS name that resolves to a private IP address.
\nFor more information, see CreateDBInstance.
\nThis setting is only for non-Aurora Multi-AZ DB clusters.
" + } + }, + "AutoMinorVersionUpgrade": { + "target": "com.amazonaws.rds#Boolean", + "traits": { + "smithy.api#documentation": "A value that indicates that minor version patches are applied automatically.
\nThis setting is only for non-Aurora Multi-AZ DB clusters.
" + } + }, + "MonitoringInterval": { + "target": "com.amazonaws.rds#IntegerOptional", + "traits": { + "smithy.api#documentation": "The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB cluster.
\nThis setting is only for non-Aurora Multi-AZ DB clusters.
" + } + }, + "MonitoringRoleArn": { + "target": "com.amazonaws.rds#String", + "traits": { + "smithy.api#documentation": "The ARN for the IAM role that permits RDS to send Enhanced Monitoring metrics to Amazon CloudWatch Logs.
\nThis setting is only for non-Aurora Multi-AZ DB clusters.
" + } + }, + "PerformanceInsightsEnabled": { + "target": "com.amazonaws.rds#BooleanOptional", + "traits": { + "smithy.api#documentation": "True if Performance Insights is enabled for the DB cluster, and otherwise false.
\nThis setting is only for non-Aurora Multi-AZ DB clusters.
" + } + }, + "PerformanceInsightsKMSKeyId": { + "target": "com.amazonaws.rds#String", + "traits": { + "smithy.api#documentation": "The Amazon Web Services KMS key identifier for encryption of Performance Insights data.
\nThe Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.
\nThis setting is only for non-Aurora Multi-AZ DB clusters.
" + } + }, + "PerformanceInsightsRetentionPeriod": { + "target": "com.amazonaws.rds#IntegerOptional", + "traits": { + "smithy.api#documentation": "The amount of time, in days, to retain Performance Insights data. Valid values are 7 or 731 (2 years).
\nThis setting is only for non-Aurora Multi-AZ DB clusters.
" + } } }, "traits": { - "smithy.api#documentation": "Contains the details of an Amazon Aurora DB cluster.\n
\nThis data type is used as a response element in the DescribeDBClusters
,\n StopDBCluster
, and StartDBCluster
actions.\n
Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster.\n
\nFor an Amazon Aurora DB cluster, this data type is used as a response element in the operations \n CreateDBCluster
, DeleteDBCluster
, DescribeDBClusters
, \n FailoverDBCluster
, ModifyDBCluster
, PromoteReadReplicaDBCluster
, \n RestoreDBClusterFromS3
, RestoreDBClusterFromSnapshot
, \n RestoreDBClusterToPointInTime
, StartDBCluster
, and StopDBCluster
.
For a Multi-AZ DB cluster, this data type is used as a response element in the operations \n CreateDBCluster
, DeleteDBCluster
, DescribeDBClusters
, \n FailoverDBCluster
, ModifyDBCluster
, RebootDBCluster
, \n RestoreDBClusterFromSnapshot
, and RestoreDBClusterToPointInTime
.
For more information on Amazon Aurora DB clusters, see \n \n What is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nFor more information on Multi-AZ DB clusters, see \n \n Multi-AZ deployments with two readable standby DB instances in the Amazon RDS User Guide.\n
\nThe Multi-AZ DB clusters feature is in preview and is subject to change.
\nContains one or more identifiers of Aurora DB clusters to which the RDS DB instance\n is replicated as a read replica. For example, when you create an Aurora read replica of\n an RDS MySQL DB instance, the Aurora MySQL DB cluster for the Aurora read replica is\n shown. This output does not contain information about cross region Aurora read\n replicas.
\nCurrently, each RDS DB instance can have only one Aurora read replica.
\nContains one or more identifiers of Aurora DB clusters to which the RDS DB instance\n is replicated as a read replica. For example, when you create an Aurora read replica of\n an RDS for MySQL DB instance, the Aurora MySQL DB cluster for the Aurora read replica is\n shown. This output doesn't contain information about cross-Region Aurora read\n replicas.
\nCurrently, each RDS DB instance can have only one Aurora read replica.
\nSpecifies the accessibility options for the DB instance.
\nWhen the DB instance is publicly accessible, its DNS endpoint resolves to the private IP address from within the DB instance's VPC, \n and to the public IP address from outside of the DB instance's VPC. Access to the DB instance is ultimately controlled by the security group it uses, \n and that public access is not permitted if the security group assigned to the DB instance doesn't permit it.
\nWhen the DB instance isn't publicly accessible, it is an internal DB instance with a DNS name that resolves to a private IP address.
\nFor more information, see CreateDBInstance.
" + "smithy.api#documentation": "Specifies the accessibility options for the DB instance.
\nWhen the DB cluster is publicly accessible, its Domain Name System (DNS) endpoint\n resolves to the private IP address from within the DB cluster's virtual private cloud\n (VPC). It resolves to the public IP address from outside of the DB cluster's VPC. Access\n to the DB cluster is ultimately controlled by the security group it uses. That public\n access isn't permitted if the security group assigned to the DB cluster doesn't permit\n it.
\nWhen the DB instance isn't publicly accessible, it is an internal DB instance with a DNS name that resolves to a private IP address.
\nFor more information, see CreateDBInstance.
" } }, "StatusInfos": { @@ -5840,10 +5975,16 @@ "traits": { "smithy.api#documentation": "The instance profile associated with the underlying Amazon EC2 instance of an \n RDS Custom DB instance. The instance profile must meet the following requirements:
\nThe profile must exist in your account.
\nThe profile must have an IAM role that Amazon EC2 has permissions to assume.
\nThe instance profile name and the associated IAM role name must start with the prefix AWSRDSCustom
.
For the list of permissions required for the IAM role, see \n \n Configure IAM and your VPC in the Amazon Relational Database Service\n User Guide.
" } + }, + "BackupTarget": { + "target": "com.amazonaws.rds#String", + "traits": { + "smithy.api#documentation": "Specifies where automated backups and manual snapshots are stored: Amazon Web Services Outposts or the Amazon Web Services Region.
" + } } }, "traits": { - "smithy.api#documentation": "Contains the details of an Amazon RDS DB instance.\n
\nThis data type is used as a response element in the DescribeDBInstances
action.\n
Contains the details of an Amazon RDS DB instance.\n
\nThis data type is used as a response element in the operations CreateDBInstance
, \n CreateDBInstanceReadReplica
, DeleteDBInstance
, DescribeDBInstances
, \n ModifyDBInstance
, PromoteReadReplica
, RebootDBInstance
, \n RestoreDBInstanceFromDBSnapshot
, RestoreDBInstanceFromS3
, RestoreDBInstanceToPointInTime
, \n StartDBInstance
, and StopDBInstance
.\n
The list of replications to different Amazon Web Services Regions associated with the automated backup.
" } + }, + "BackupTarget": { + "target": "com.amazonaws.rds#String", + "traits": { + "smithy.api#documentation": "Specifies where automated backups are stored: Amazon Web Services Outposts or the Amazon Web Services Region.
" + } } }, "traits": { @@ -7400,6 +7547,12 @@ "traits": { "smithy.api#documentation": "Specifies the time of the CreateDBSnapshot operation in Coordinated Universal Time (UTC). Doesn't change when the snapshot is copied.
" } + }, + "SnapshotTarget": { + "target": "com.amazonaws.rds#String", + "traits": { + "smithy.api#documentation": "Specifies where manual snapshots are stored: Amazon Web Services Outposts or the Amazon Web Services Region.
" + } } }, "traits": { @@ -7815,7 +7968,7 @@ } ], "traits": { - "smithy.api#documentation": "The DeleteDBCluster action deletes a previously provisioned DB cluster. \n When you delete a DB cluster, all automated backups for that DB cluster are deleted and can't be recovered. \n Manual DB cluster snapshots of the specified DB cluster are not deleted.
\n \nFor more information on Amazon Aurora, see \n \n What Is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nThis action only applies to Aurora DB clusters.
\nThe DeleteDBCluster action deletes a previously provisioned DB cluster. \n When you delete a DB cluster, all automated backups for that DB cluster are deleted and can't be recovered. \n Manual DB cluster snapshots of the specified DB cluster are not deleted.
\nFor more information on Amazon Aurora, see \n \n What is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nFor more information on Multi-AZ DB clusters, see \n \n Multi-AZ deployments with two readable standby DB instances in the Amazon RDS User Guide.\n
\nThe Multi-AZ DB clusters feature is in preview and is subject to change.
\nDeletes a specified DB cluster parameter group. The DB cluster parameter group to be deleted can't be associated with any DB clusters.
\nFor more information on Amazon Aurora, see \n \n What Is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nThis action only applies to Aurora DB clusters.
\nDeletes a specified DB cluster parameter group. The DB cluster parameter group to be deleted can't be associated with any DB clusters.
\nFor more information on Amazon Aurora, see \n \n What is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nFor more information on Multi-AZ DB clusters, see \n \n Multi-AZ deployments with two readable standby DB instances in the Amazon RDS User Guide.\n
\nThe Multi-AZ DB clusters feature is in preview and is subject to change.
\nDeletes a DB cluster snapshot. If the snapshot is being copied, the copy operation is terminated.
\nThe DB cluster snapshot must be in the available
state to be\n deleted.
For more information on Amazon Aurora, see \n \n What Is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nThis action only applies to Aurora DB clusters.
\nDeletes a DB cluster snapshot. If the snapshot is being copied, the copy operation is terminated.
\nThe DB cluster snapshot must be in the available
state to be\n deleted.
For more information on Amazon Aurora, see \n \n What is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nFor more information on Multi-AZ DB clusters, see \n \n Multi-AZ deployments with two readable standby DB instances in the Amazon RDS User Guide.\n
\nThe Multi-AZ DB clusters feature is in preview and is subject to change.
\nReturns information about backtracks for a DB cluster.
\nFor more information on Amazon Aurora, see \n \n What Is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nThis action only applies to Aurora MySQL DB clusters.
\nReturns information about backtracks for a DB cluster.
\nFor more information on Amazon Aurora, see \n \n What is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nThis action only applies to Aurora MySQL DB clusters.
\n\n Returns a list of DBClusterParameterGroup
descriptions. If a \n DBClusterParameterGroupName
parameter is specified,\n the list will contain only the description of the specified DB cluster parameter group.\n
For more information on Amazon Aurora, see \n \n What Is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nThis action only applies to Aurora DB clusters.
\n\n Returns a list of DBClusterParameterGroup
descriptions. If a \n DBClusterParameterGroupName
parameter is specified,\n the list will contain only the description of the specified DB cluster parameter group.\n
For more information on Amazon Aurora, see \n \n What is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nFor more information on Multi-AZ DB clusters, see \n \n Multi-AZ deployments with two readable standby DB instances in the Amazon RDS User Guide.\n
\nThe Multi-AZ DB clusters feature is in preview and is subject to change.
\nReturns the detailed parameter list for a particular DB cluster parameter group.
\nFor more information on Amazon Aurora, see \n \n What Is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nThis action only applies to Aurora DB clusters.
\nReturns the detailed parameter list for a particular DB cluster parameter group.
\nFor more information on Amazon Aurora, see \n \n What is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nFor more information on Multi-AZ DB clusters, see \n \n Multi-AZ deployments with two readable standby DB instances in the Amazon RDS User Guide.\n
\nThe Multi-AZ DB clusters feature is in preview and is subject to change.
\nReturns a list of DB cluster snapshot attribute names and values for a manual DB cluster snapshot.
\nWhen sharing snapshots with other Amazon Web Services accounts, DescribeDBClusterSnapshotAttributes
\n returns the restore
attribute and a list of IDs for the Amazon Web Services accounts that are \n authorized to copy or restore the manual DB cluster snapshot. If all
is included in the list of\n values for the restore
attribute, then the manual DB cluster snapshot is public and\n can be copied or restored by all Amazon Web Services accounts.
To add or remove access for an Amazon Web Services account to copy or restore a manual DB cluster snapshot, or to make the\n manual DB cluster snapshot public or private, use the ModifyDBClusterSnapshotAttribute
API action.
This action only applies to Aurora DB clusters.
\nReturns a list of DB cluster snapshot attribute names and values for a manual DB cluster snapshot.
\nWhen sharing snapshots with other Amazon Web Services accounts, DescribeDBClusterSnapshotAttributes
\n returns the restore
attribute and a list of IDs for the Amazon Web Services accounts that are \n authorized to copy or restore the manual DB cluster snapshot. If all
is included in the list of\n values for the restore
attribute, then the manual DB cluster snapshot is public and\n can be copied or restored by all Amazon Web Services accounts.
To add or remove access for an Amazon Web Services account to copy or restore a manual DB cluster snapshot, or to make the\n manual DB cluster snapshot public or private, use the ModifyDBClusterSnapshotAttribute
API action.
Returns information about DB cluster snapshots. This API action supports pagination.
\nFor more information on Amazon Aurora, see \n \n What Is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nThis action only applies to Aurora DB clusters.
\nReturns information about DB cluster snapshots. This API action supports pagination.
\nFor more information on Amazon Aurora DB clusters, see \n \n What is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nFor more information on Multi-AZ DB clusters, see \n \n Multi-AZ deployments with two readable standby DB instances in the Amazon RDS User Guide.\n
\nThe Multi-AZ DB clusters feature is in preview and is subject to change.
\nReturns information about provisioned Aurora DB clusters. This API supports pagination.
\nFor more information on Amazon Aurora, see \n \n What Is Amazon Aurora? in the Amazon Aurora User Guide. \n
\nThis operation can also return information for Amazon Neptune DB instances and Amazon DocumentDB instances.
\nReturns information about Amazon Aurora DB clusters and Multi-AZ DB clusters. This API supports pagination.
\nFor more information on Amazon Aurora DB clusters, see \n \n What is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nFor more information on Multi-AZ DB clusters, see \n \n Multi-AZ deployments with two readable standby DB instances in the Amazon RDS User Guide.\n
\nThe Multi-AZ DB clusters feature is in preview and is subject to change.
\nThis operation can also return information for Amazon Neptune DB instances and Amazon DocumentDB instances.
", "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -10458,7 +10611,7 @@ "target": "com.amazonaws.rds#DescribeEngineDefaultClusterParametersResult" }, "traits": { - "smithy.api#documentation": "Returns the default engine and system parameter information for the cluster database engine.
\nFor more information on Amazon Aurora, see \n \n What Is Amazon Aurora? in the Amazon Aurora User Guide.\n
" + "smithy.api#documentation": "Returns the default engine and system parameter information for the cluster database engine.
\nFor more information on Amazon Aurora, see \n \n What is Amazon Aurora? in the Amazon Aurora User Guide.\n
" } }, "com.amazonaws.rds#DescribeEngineDefaultClusterParametersMessage": { @@ -10769,7 +10922,7 @@ "Filters": { "target": "com.amazonaws.rds#FilterList", "traits": { - "smithy.api#documentation": "Filters specify one or more snapshot exports to describe. The filters are specified as name-value pairs that define what to\n include in the output. Filter names and values are case-sensitive.
\nSupported filters include the following:
\n\n export-task-identifier
- An identifier for the snapshot export task.
\n s3-bucket
- The Amazon S3 bucket the snapshot is exported to.
\n source-arn
- The Amazon Resource Name (ARN) of the snapshot exported to Amazon S3
\n status
- The status of the export task. Must be lowercase. Valid statuses are the following:
\n canceled
\n
\n canceling
\n
\n complete
\n
\n failed
\n
\n starting
\n
Filters specify one or more snapshot exports to describe. The filters are specified as name-value pairs that define what to\n include in the output. Filter names and values are case-sensitive.
\nSupported filters include the following:
\n\n export-task-identifier
- An identifier for the snapshot export task.
\n s3-bucket
- The Amazon S3 bucket the snapshot is exported to.
\n source-arn
- The Amazon Resource Name (ARN) of the snapshot exported to Amazon S3
\n status
- The status of the export task. Must be lowercase. Valid statuses are the following:
\n canceled
\n
\n canceling
\n
\n complete
\n
\n failed
\n
\n in_progress
\n
\n starting
\n
\n Returns information about Aurora global database clusters. This API supports pagination.\n
\n\n For more information on Amazon Aurora, see What Is Amazon Aurora? in the\n Amazon Aurora User Guide.\n
\nThis action only applies to Aurora DB clusters.
\n\n Returns information about Aurora global database clusters. This API supports pagination.\n
\n\n For more information on Amazon Aurora, see What is Amazon Aurora? in the\n Amazon Aurora User Guide.\n
\nThis action only applies to Aurora DB clusters.
\nReturns a list of orderable DB instance options for the specified engine.
", + "smithy.api#documentation": "Returns a list of orderable DB instance options for the specified DB engine, DB engine version, and DB instance class.
", "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -12153,7 +12306,7 @@ } ], "traits": { - "smithy.api#documentation": "Forces a failover for a DB cluster.
\nA failover for a DB cluster promotes one of the Aurora Replicas (read-only instances)\n in the DB cluster to be the primary instance (the cluster writer).
\nAmazon Aurora will automatically fail over to an Aurora Replica, if one exists,\n when the primary instance fails. You can force a failover when you want to simulate a failure of a primary instance for testing. \n Because each instance in a DB cluster has its own endpoint address, you will need to clean up and re-establish any existing \n connections that use those endpoint addresses when the failover is complete.
\nFor more information on Amazon Aurora, see \n \n What Is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nThis action only applies to Aurora DB clusters.
\nForces a failover for a DB cluster.
\nFor an Aurora DB cluster, failover for a DB cluster promotes one of the Aurora Replicas (read-only instances)\n in the DB cluster to be the primary DB instance (the cluster writer).
\nFor a Multi-AZ DB cluster, failover for a DB cluster promotes one of the readable standby DB instances (read-only instances)\n in the DB cluster to be the primary DB instance (the cluster writer).
\nAn Amazon Aurora DB cluster automatically fails over to an Aurora Replica, if one exists,\n when the primary DB instance fails. A Multi-AZ DB cluster automatically fails over to a readbable standby \n DB instance when the primary DB instance fails.
\nTo simulate a failure of a primary instance for testing, you can force a failover. \n Because each instance in a DB cluster has its own endpoint address, make sure to clean up and re-establish any existing \n connections that use those endpoint addresses when the failover is complete.
\nFor more information on Amazon Aurora DB clusters, see \n \n What is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nFor more information on Multi-AZ DB clusters, see \n \n Multi-AZ deployments with two readable standby DB instances in the Amazon RDS User Guide.\n
\nThe Multi-AZ DB clusters feature is in preview and is subject to change.
\nThe name of the instance to promote to the primary instance.
\nYou must specify the instance identifier for an Aurora Replica in the DB cluster.\n For example, mydbcluster-replica1
.
The name of the DB instance to promote to the primary DB instance.
\nSpecify the DB instance identifier for an Aurora Replica or a Multi-AZ readable standby in the DB cluster,\n for example mydbcluster-replica1
.
This setting isn't supported for RDS for MySQL Multi-AZ DB clusters.
" } } }, @@ -13567,7 +13720,7 @@ } ], "traits": { - "smithy.api#documentation": "Modifies the status of a custom engine version (CEV). You can find CEVs to modify by calling \n DescribeDBEngineVersions
.
The MediaImport service that imports files from Amazon S3 to create CEVs isn't integrated with \n Amazon Web Services CloudTrail. If you turn on data logging for Amazon RDS in CloudTrail, calls to the \n ModifyCustomDbEngineVersion
event aren't logged. However, you might see calls from the \n API gateway that accesses your Amazon S3 bucket. These calls originate from the MediaImport service for \n the ModifyCustomDbEngineVersion
event.
For more information, see Modifying CEV status \n in the Amazon RDS User Guide.
" + "smithy.api#documentation": "Modifies the status of a custom engine version (CEV). You can find CEVs to modify by calling \n DescribeDBEngineVersions
.
The MediaImport service that imports files from Amazon S3 to create CEVs isn't integrated with \n Amazon Web Services CloudTrail. If you turn on data logging for Amazon RDS in CloudTrail, calls to the \n ModifyCustomDbEngineVersion
event aren't logged. However, you might see calls from the \n API gateway that accesses your Amazon S3 bucket. These calls originate from the MediaImport service for \n the ModifyCustomDbEngineVersion
event.
For more information, see Modifying CEV status \n in the Amazon RDS User Guide.
" } }, "com.amazonaws.rds#ModifyCustomDBEngineVersionMessage": { @@ -13648,7 +13801,7 @@ } ], "traits": { - "smithy.api#documentation": "Modify a setting for an Amazon Aurora DB cluster. \n You can change one\n or more database configuration parameters by specifying these parameters and the new values in the\n request. For more information on Amazon Aurora, see \n \n What Is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nThis action only applies to Aurora DB clusters.
\nModify the settings for an Amazon Aurora DB cluster or a Multi-AZ DB cluster. \n You can change one or more settings by specifying these parameters and the new values in the\n request.
\nFor more information on Amazon Aurora DB clusters, see \n \n What is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nFor more information on Multi-AZ DB clusters, see \n \n Multi-AZ deployments with two readable standby DB instances in the Amazon RDS User Guide.\n
\nThe Multi-AZ DB clusters feature is in preview and is subject to change.
\nThe DB cluster identifier for the cluster being modified. This parameter isn't case-sensitive.
\nConstraints: This identifier must match the identifier of an existing DB\n cluster.
", + "smithy.api#documentation": "The DB cluster identifier for the cluster being modified. This parameter isn't case-sensitive.
\nConstraints: This identifier must match the identifier of an existing DB\n cluster.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
", "smithy.api#required": {} } }, "NewDBClusterIdentifier": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The new DB cluster identifier for the DB cluster when renaming a DB cluster. This value is stored as a lowercase string.
\nConstraints:
\nMust contain from 1 to 63 letters, numbers, or hyphens
\nThe first character must be a letter
\nCan't end with a hyphen or contain two consecutive hyphens
\nExample: my-cluster2
\n
The new DB cluster identifier for the DB cluster when renaming a DB cluster. This value is stored as a lowercase string.
\nConstraints:
\nMust contain from 1 to 63 letters, numbers, or hyphens
\nThe first character must be a letter
\nCan't end with a hyphen or contain two consecutive hyphens
\nExample: my-cluster2
\n
Valid for: Aurora DB clusters only
" } }, "ApplyImmediately": { "target": "com.amazonaws.rds#Boolean", "traits": { - "smithy.api#documentation": "A value that indicates whether the modifications in this request and\n any pending modifications are asynchronously applied\n as soon as possible, regardless of the\n PreferredMaintenanceWindow
setting for the DB cluster. \n If this parameter is disabled, changes to the\n DB cluster are applied during the next maintenance window.
The ApplyImmediately
parameter only affects the EnableIAMDatabaseAuthentication
, \n MasterUserPassword
, and NewDBClusterIdentifier
values. If the ApplyImmediately
\n parameter is disabled, then changes to the EnableIAMDatabaseAuthentication
, MasterUserPassword
, \n and NewDBClusterIdentifier
values are applied during the next maintenance window. All other changes are\n applied immediately, regardless of the value of the ApplyImmediately
parameter.
By default, this parameter is disabled.
" + "smithy.api#documentation": "A value that indicates whether the modifications in this request and\n any pending modifications are asynchronously applied\n as soon as possible, regardless of the\n PreferredMaintenanceWindow
setting for the DB cluster. \n If this parameter is disabled, changes to the\n DB cluster are applied during the next maintenance window.
The ApplyImmediately
parameter only affects the EnableIAMDatabaseAuthentication
, \n MasterUserPassword
, and NewDBClusterIdentifier
values. If the ApplyImmediately
\n parameter is disabled, then changes to the EnableIAMDatabaseAuthentication
, MasterUserPassword
, \n and NewDBClusterIdentifier
values are applied during the next maintenance window. All other changes are\n applied immediately, regardless of the value of the ApplyImmediately
parameter.
By default, this parameter is disabled.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "BackupRetentionPeriod": { "target": "com.amazonaws.rds#IntegerOptional", "traits": { - "smithy.api#documentation": "The number of days for which automated backups are retained. You must specify a minimum value of 1.
\nDefault: 1
\nConstraints:
\nMust be a value from 1 to 35
\nThe number of days for which automated backups are retained. Specify a minimum value of 1.
\nDefault: 1
\nConstraints:
\nMust be a value from 1 to 35
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "DBClusterParameterGroupName": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The name of the DB cluster parameter group to use for the DB cluster.
" + "smithy.api#documentation": "The name of the DB cluster parameter group to use for the DB cluster.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "VpcSecurityGroupIds": { "target": "com.amazonaws.rds#VpcSecurityGroupIdList", "traits": { - "smithy.api#documentation": "A list of VPC security groups that the DB cluster will belong to.
" + "smithy.api#documentation": "A list of VPC security groups that the DB cluster will belong to.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "Port": { "target": "com.amazonaws.rds#IntegerOptional", "traits": { - "smithy.api#documentation": "The port number on which the DB cluster accepts connections.
\nConstraints: Value must be 1150-65535
\n
Default: The same port as the original DB cluster.
" + "smithy.api#documentation": "The port number on which the DB cluster accepts connections.
\nConstraints: Value must be 1150-65535
\n
Default: The same port as the original DB cluster.
\nValid for: Aurora DB clusters only
" } }, "MasterUserPassword": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The new password for the master database user. This password can contain any printable ASCII character except \"/\", \"\"\", or \"@\".
\nConstraints: Must contain from 8 to 41 characters.
" + "smithy.api#documentation": "The new password for the master database user. This password can contain any printable ASCII character except \"/\", \"\"\", or \"@\".
\nConstraints: Must contain from 8 to 41 characters.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "OptionGroupName": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "A value that indicates that the DB cluster should be associated with the specified option group. \n Changing this parameter doesn't result in an outage except in the following case, and the change \n is applied during the next maintenance window\n unless the ApplyImmediately
is enabled for this request. If the parameter change results in an option group that \n enables OEM, this change can cause a brief (sub-second) period during which new connections \n are rejected but existing connections are not interrupted.\n
Permanent options can't be removed from an option group. The option group can't be removed from a DB cluster once it is associated with a DB cluster.
" + "smithy.api#documentation": "A value that indicates that the DB cluster should be associated with the specified option group.
\nDB clusters are associated with a default option group that can't be modified.
" } }, "PreferredBackupWindow": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The daily time range during which automated backups are created\n if automated backups are enabled,\n using the BackupRetentionPeriod
parameter.\n
The default is a 30-minute window selected at random from an\n 8-hour block of time for each Amazon Web Services Region. \n To view the time blocks available, see \n \n Backup window in the Amazon Aurora User Guide.\n
\nConstraints:
\nMust be in the format hh24:mi-hh24:mi
.
Must be in Universal Coordinated Time (UTC).
\nMust not conflict with the preferred maintenance window.
\nMust be at least 30 minutes.
\nThe daily time range during which automated backups are created\n if automated backups are enabled,\n using the BackupRetentionPeriod
parameter.\n
The default is a 30-minute window selected at random from an\n 8-hour block of time for each Amazon Web Services Region. \n To view the time blocks available, see \n \n Backup window in the Amazon Aurora User Guide.\n
\nConstraints:
\nMust be in the format hh24:mi-hh24:mi
.
Must be in Universal Coordinated Time (UTC).
\nMust not conflict with the preferred maintenance window.
\nMust be at least 30 minutes.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "PreferredMaintenanceWindow": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
\nFormat: ddd:hh24:mi-ddd:hh24:mi
\n
The default is a 30-minute window selected at random from an\n 8-hour block of time for each Amazon Web Services Region, occurring on a random day of the\n week. To see the time blocks available, see \n \n Adjusting the Preferred DB Cluster Maintenance Window in the Amazon Aurora User Guide.\n
\nValid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.
\nConstraints: Minimum 30-minute window.
" + "smithy.api#documentation": "The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
\nFormat: ddd:hh24:mi-ddd:hh24:mi
\n
The default is a 30-minute window selected at random from an\n 8-hour block of time for each Amazon Web Services Region, occurring on a random day of the\n week. To see the time blocks available, see \n \n Adjusting the Preferred DB Cluster Maintenance Window in the Amazon Aurora User Guide.\n
\nValid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.
\nConstraints: Minimum 30-minute window.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "EnableIAMDatabaseAuthentication": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether to enable mapping of Amazon Web Services Identity and Access\n Management (IAM) accounts to database accounts. By default, mapping is disabled.
\n \nFor more information, see \n \n IAM Database Authentication in the Amazon Aurora User Guide.\n
" + "smithy.api#documentation": "A value that indicates whether to enable mapping of Amazon Web Services Identity and Access\n Management (IAM) accounts to database accounts. By default, mapping isn't\n enabled.
\nFor more information, see \n \n IAM Database Authentication in the Amazon Aurora User Guide.\n
\nValid for: Aurora DB clusters only
" } }, "BacktrackWindow": { "target": "com.amazonaws.rds#LongOptional", "traits": { - "smithy.api#documentation": "The target backtrack window, in seconds. To disable backtracking, set this value to\n 0.
\nCurrently, Backtrack is only supported for Aurora MySQL DB clusters.
\nDefault: 0
\nConstraints:
\nIf specified, this value must be set to a number from 0 to 259,200 (72 hours).
\nThe target backtrack window, in seconds. To disable backtracking, set this value to\n 0.
\nDefault: 0
\nConstraints:
\nIf specified, this value must be set to a number from 0 to 259,200 (72 hours).
\nValid for: Aurora MySQL DB clusters only
" } }, "CloudwatchLogsExportConfiguration": { "target": "com.amazonaws.rds#CloudwatchLogsExportConfiguration", "traits": { - "smithy.api#documentation": "The configuration setting for the log types to be enabled for export to CloudWatch Logs for a specific DB cluster.
" + "smithy.api#documentation": "The configuration setting for the log types to be enabled for export to CloudWatch Logs for a specific DB cluster.
\nValid for: Aurora DB clusters only
" } }, "EngineVersion": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The version number of the database engine to which you want to upgrade. \n Changing this parameter results in an outage. The change is applied during\n the next maintenance window unless ApplyImmediately
is enabled.
To list all of the available engine versions for aurora
(for MySQL 5.6-compatible Aurora), use the following command:
\n aws rds describe-db-engine-versions --engine aurora --query \"DBEngineVersions[].EngineVersion\"
\n
To list all of the available engine versions for aurora-mysql
(for MySQL 5.7-compatible Aurora), use the following command:
\n aws rds describe-db-engine-versions --engine aurora-mysql --query \"DBEngineVersions[].EngineVersion\"
\n
To list all of the available engine versions for aurora-postgresql
, use the following command:
\n aws rds describe-db-engine-versions --engine aurora-postgresql --query \"DBEngineVersions[].EngineVersion\"
\n
The version number of the database engine to which you want to upgrade. \n Changing this parameter results in an outage. The change is applied during\n the next maintenance window unless ApplyImmediately
is enabled.
To list all of the available engine versions for MySQL 5.6-compatible Aurora, use the following command:
\n\n aws rds describe-db-engine-versions --engine aurora --query \"DBEngineVersions[].EngineVersion\"
\n
To list all of the available engine versions for MySQL 5.7-compatible Aurora, use the following command:
\n\n aws rds describe-db-engine-versions --engine aurora-mysql --query \"DBEngineVersions[].EngineVersion\"
\n
To list all of the available engine versions for Aurora PostgreSQL, use the following command:
\n\n aws rds describe-db-engine-versions --engine aurora-postgresql --query \"DBEngineVersions[].EngineVersion\"
\n
To list all of the available engine versions for RDS for MySQL, use the following command:
\n\n aws rds describe-db-engine-versions --engine mysql --query \"DBEngineVersions[].EngineVersion\"
\n
To list all of the available engine versions for RDS for PostgreSQL, use the following command:
\n\n aws rds describe-db-engine-versions --engine postgres --query \"DBEngineVersions[].EngineVersion\"
\n
Valid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "AllowMajorVersionUpgrade": { "target": "com.amazonaws.rds#Boolean", "traits": { - "smithy.api#documentation": "A value that indicates whether major version upgrades are allowed.
\nConstraints: You must allow major version upgrades when specifying a value for the\n EngineVersion
parameter that is a different major version than the DB\n cluster's current version.
A value that indicates whether major version upgrades are allowed.
\nConstraints: You must allow major version upgrades when specifying a value for the\n EngineVersion
parameter that is a different major version than the DB\n cluster's current version.
Valid for: Aurora DB clusters only
" } }, "DBInstanceParameterGroupName": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The name of the DB parameter group to apply to all instances of the DB cluster.
\nWhen you apply a parameter group using the DBInstanceParameterGroupName
parameter, the DB\n cluster isn't rebooted automatically. Also, parameter changes aren't\n applied during the next maintenance window but instead are applied immediately.
Default: The existing name setting
\nConstraints:
\nThe DB parameter group must be in the same DB parameter group family as this DB cluster.
\nThe DBInstanceParameterGroupName
parameter is only valid in combination with \n the AllowMajorVersionUpgrade
parameter.
The name of the DB parameter group to apply to all instances of the DB cluster.
\nWhen you apply a parameter group using the DBInstanceParameterGroupName
parameter, the DB\n cluster isn't rebooted automatically. Also, parameter changes aren't\n applied during the next maintenance window but instead are applied immediately.
Default: The existing name setting
\nConstraints:
\nThe DB parameter group must be in the same DB parameter group family as this DB cluster.
\nThe DBInstanceParameterGroupName
parameter is only valid in combination with \n the AllowMajorVersionUpgrade
parameter.
Valid for: Aurora DB clusters only
" } }, "Domain": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The Active Directory directory ID to move the DB cluster to. \n Specify none
to remove the cluster from its current domain.\n The domain must be created prior to this operation.\n
For more information, see Kerberos Authentication\n in the Amazon Aurora User Guide.\n
" + "smithy.api#documentation": "The Active Directory directory ID to move the DB cluster to. \n Specify none
to remove the cluster from its current domain.\n The domain must be created prior to this operation.\n
For more information, see Kerberos Authentication\n in the Amazon Aurora User Guide.\n
\nValid for: Aurora DB clusters only
" } }, "DomainIAMRoleName": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "Specify the name of the IAM role to be used when making API calls to the Directory Service.
" + "smithy.api#documentation": "Specify the name of the IAM role to be used when making API calls to the Directory Service.
\nValid for: Aurora DB clusters only
" } }, "ScalingConfiguration": { "target": "com.amazonaws.rds#ScalingConfiguration", "traits": { - "smithy.api#documentation": "The scaling properties of the DB cluster. You can only modify scaling properties for DB clusters in serverless
DB engine mode.
The scaling properties of the DB cluster. You can only modify scaling properties for DB clusters in serverless
DB engine mode.
Valid for: Aurora DB clusters only
" } }, "DeletionProtection": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether the DB cluster has deletion protection enabled. \n The database can't be deleted when deletion protection is enabled. By default, \n deletion protection is disabled.\n
" + "smithy.api#documentation": "A value that indicates whether the DB cluster has deletion protection enabled. \n The database can't be deleted when deletion protection is enabled. By default, \n deletion protection isn't enabled.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "EnableHttpEndpoint": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether to enable the HTTP endpoint for an Aurora Serverless DB cluster. By default, the HTTP endpoint \n is disabled.
\nWhen enabled, the HTTP endpoint provides a connectionless web service API for running\n SQL queries on the Aurora Serverless DB cluster. You can also query your database\n from inside the RDS console with the query editor.
\nFor more information, see Using the Data API for Aurora Serverless in the \n Amazon Aurora User Guide.
" + "smithy.api#documentation": "A value that indicates whether to enable the HTTP endpoint for an Aurora Serverless DB cluster. By default, the HTTP endpoint \n is disabled.
\nWhen enabled, the HTTP endpoint provides a connectionless web service API for running\n SQL queries on the Aurora Serverless DB cluster. You can also query your database\n from inside the RDS console with the query editor.
\nFor more information, see Using the Data API for Aurora Serverless in the \n Amazon Aurora User Guide.
\nValid for: Aurora DB clusters only
" } }, "CopyTagsToSnapshot": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether to copy all tags from the DB cluster to snapshots of the DB cluster. \n The default is not to copy them.
" + "smithy.api#documentation": "A value that indicates whether to copy all tags from the DB cluster to snapshots of the DB cluster. \n The default is not to copy them.
\nValid for: Aurora DB clusters only
" } }, "EnableGlobalWriteForwarding": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether to enable this DB cluster to forward write operations to the primary cluster of an\n Aurora global database (GlobalCluster). By default, write operations are not allowed on Aurora DB clusters that\n are secondary clusters in an Aurora global database.
\nYou can set this value only on Aurora DB clusters that are members of an Aurora global database. With this parameter\n enabled, a secondary cluster can forward writes to the current primary cluster and the resulting changes are replicated back to\n this cluster. For the primary DB cluster of an Aurora global database, this value is used immediately if the primary is\n demoted by the FailoverGlobalCluster API operation, but it does nothing until then.\n
" + "smithy.api#documentation": "A value that indicates whether to enable this DB cluster to forward write operations to the primary cluster of an\n Aurora global database (GlobalCluster). By default, write operations are not allowed on Aurora DB clusters that\n are secondary clusters in an Aurora global database.
\nYou can set this value only on Aurora DB clusters that are members of an Aurora global database. With this parameter\n enabled, a secondary cluster can forward writes to the current primary cluster and the resulting changes are replicated back to\n this cluster. For the primary DB cluster of an Aurora global database, this value is used immediately if the primary is\n demoted by the FailoverGlobalCluster API operation, but it does nothing until then.\n
\nValid for: Aurora DB clusters only
" + } + }, + "DBClusterInstanceClass": { + "target": "com.amazonaws.rds#String", + "traits": { + "smithy.api#documentation": "The compute and memory capacity of each DB instance in the Multi-AZ DB cluster, for example db.m6g.xlarge.\n Not all DB instance classes are available in all Amazon Web Services Regions, or for all database engines.
\nFor the full list of DB instance classes and availability for your engine, see DB Instance Class in the Amazon RDS User Guide.\n
\nValid for: Multi-AZ DB clusters only
" + } + }, + "AllocatedStorage": { + "target": "com.amazonaws.rds#IntegerOptional", + "traits": { + "smithy.api#documentation": "The amount of storage in gibibytes (GiB) to allocate to each DB instance in the Multi-AZ DB cluster.
\nType: Integer
\nValid for: Multi-AZ DB clusters only
" + } + }, + "StorageType": { + "target": "com.amazonaws.rds#String", + "traits": { + "smithy.api#documentation": "Specifies the storage type to be associated with the DB cluster.
\n\n Valid values: standard | gp2 | io1
\n
\n If you specify io1
, you must also include a value for the\n Iops
parameter.\n
\n Default: io1
if the Iops
parameter\n is specified, otherwise gp2
\n
Valid for: Multi-AZ DB clusters only
" + } + }, + "Iops": { + "target": "com.amazonaws.rds#IntegerOptional", + "traits": { + "smithy.api#documentation": "The amount of Provisioned IOPS (input/output operations per second) to be initially allocated \n for each DB instance in the Multi-AZ DB cluster.
\nFor information about valid Iops values, see Amazon RDS Provisioned IOPS Storage to Improve Performance in the Amazon RDS User Guide.\n
\nConstraints: Must be a multiple between .5 and 50 of the storage amount for the DB cluster.
\nValid for: Multi-AZ DB clusters only
" + } + }, + "AutoMinorVersionUpgrade": { + "target": "com.amazonaws.rds#BooleanOptional", + "traits": { + "smithy.api#documentation": "A value that indicates whether minor engine upgrades are applied automatically to the DB cluster during the maintenance window. \n By default, minor engine upgrades are applied automatically.
\nValid for: Multi-AZ DB clusters only
" + } + }, + "MonitoringInterval": { + "target": "com.amazonaws.rds#IntegerOptional", + "traits": { + "smithy.api#documentation": "The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB cluster. \n To turn off collecting Enhanced Monitoring metrics, specify 0. The default is 0.
\nIf MonitoringRoleArn
is specified, also set MonitoringInterval
\n to a value other than 0.
Valid Values: 0, 1, 5, 10, 15, 30, 60
\n
Valid for: Multi-AZ DB clusters only
" + } + }, + "MonitoringRoleArn": { + "target": "com.amazonaws.rds#String", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) for the IAM role that permits RDS to send Enhanced Monitoring metrics to Amazon CloudWatch Logs. An\n example is arn:aws:iam:123456789012:role/emaccess
. For information on creating a monitoring role,\n see To \n create an IAM role for Amazon RDS Enhanced Monitoring in the Amazon RDS User Guide.\n
If MonitoringInterval
is set to a value other than 0, supply a MonitoringRoleArn
value.
Valid for: Multi-AZ DB clusters only
" + } + }, + "EnablePerformanceInsights": { + "target": "com.amazonaws.rds#BooleanOptional", + "traits": { + "smithy.api#documentation": "A value that indicates whether to turn on Performance Insights for the DB cluster.
\nFor more information, see \n Using Amazon Performance Insights in the Amazon RDS User Guide.\n
\nValid for: Multi-AZ DB clusters only
" + } + }, + "PerformanceInsightsKMSKeyId": { + "target": "com.amazonaws.rds#String", + "traits": { + "smithy.api#documentation": "The Amazon Web Services KMS key identifier for encryption of Performance Insights data.
\nThe Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.
\nIf you don't specify a value for PerformanceInsightsKMSKeyId
, then Amazon RDS \n uses your default KMS key. There is a default KMS key for your Amazon Web Services account. \n Your Amazon Web Services account has a different default KMS key for each Amazon Web Services Region.
Valid for: Multi-AZ DB clusters only
" + } + }, + "PerformanceInsightsRetentionPeriod": { + "target": "com.amazonaws.rds#IntegerOptional", + "traits": { + "smithy.api#documentation": "The amount of time, in days, to retain Performance Insights data. Valid values are 7 or 731 (2 years).
\nValid for: Multi-AZ DB clusters only
" } } }, @@ -13880,7 +14093,7 @@ } ], "traits": { - "smithy.api#documentation": "\n Modifies the parameters of a DB cluster parameter group. To modify more than one parameter,\n submit a list of the following: ParameterName
, ParameterValue
, \n and ApplyMethod
. A maximum of 20\n parameters can be modified in a single request.\n
For more information on Amazon Aurora, see \n \n What Is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nAfter you create a DB cluster parameter group, you should wait at least 5 minutes\n before creating your first DB cluster that uses that DB cluster parameter group as the default parameter \n group. This allows Amazon RDS to fully complete the create action before the parameter \n group is used as the default for a new DB cluster. This is especially important for parameters \n that are critical when creating the default database for a DB cluster, such as the character set \n for the default database defined by the character_set_database
parameter. You can use the \n Parameter Groups option of the Amazon RDS console or the \n DescribeDBClusterParameters
action to verify \n that your DB cluster parameter group has been created or modified.
If the modified DB cluster parameter group is used by an Aurora Serverless cluster, Aurora\n applies the update immediately. The cluster restart might interrupt your workload. In that case,\n your application must reopen any connections and retry any transactions that were active\n when the parameter changes took effect.
\nThis action only applies to Aurora DB clusters.
\n\n Modifies the parameters of a DB cluster parameter group. To modify more than one parameter,\n submit a list of the following: ParameterName
, ParameterValue
, \n and ApplyMethod
. A maximum of 20\n parameters can be modified in a single request.\n
After you create a DB cluster parameter group, you should wait at least 5 minutes\n before creating your first DB cluster that uses that DB cluster parameter group as the default parameter \n group. This allows Amazon RDS to fully complete the create action before the parameter \n group is used as the default for a new DB cluster. This is especially important for parameters \n that are critical when creating the default database for a DB cluster, such as the character set \n for the default database defined by the character_set_database
parameter. You can use the \n Parameter Groups option of the Amazon RDS console or the \n DescribeDBClusterParameters
action to verify \n that your DB cluster parameter group has been created or modified.
If the modified DB cluster parameter group is used by an Aurora Serverless cluster, Aurora\n applies the update immediately. The cluster restart might interrupt your workload. In that case,\n your application must reopen any connections and retry any transactions that were active\n when the parameter changes took effect.
\nFor more information on Amazon Aurora DB clusters, see \n \n What is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nFor more information on Multi-AZ DB clusters, see \n \n Multi-AZ deployments with two readable standby DB instances in the Amazon RDS User Guide.\n
\nThe Multi-AZ DB clusters feature is in preview and is subject to change.
\nAdds an attribute and values to, or removes an attribute and values from, a manual DB cluster snapshot.
\nTo share a manual DB cluster snapshot with other Amazon Web Services accounts, specify\n restore
as the AttributeName
and use the\n ValuesToAdd
parameter to add a list of IDs of the Amazon Web Services accounts that are\n authorized to restore the manual DB cluster snapshot. Use the value all
to\n make the manual DB cluster snapshot public, which means that it can be copied or\n restored by all Amazon Web Services accounts.
Don't add the all
value for any manual DB cluster snapshots\n that contain private information that you don't want available to all Amazon Web Services\n accounts.
If a manual DB cluster snapshot is encrypted, it can be shared, but only by\n specifying a list of authorized Amazon Web Services account IDs for the ValuesToAdd
\n parameter. You can't use all
as a value for that parameter in this\n case.
To view which Amazon Web Services accounts have access to copy or restore a manual DB cluster\n snapshot, or whether a manual DB cluster snapshot is public or private, use the DescribeDBClusterSnapshotAttributes API action. The accounts are\n returned as values for the restore
attribute.
This action only applies to Aurora DB clusters.
\nAdds an attribute and values to, or removes an attribute and values from, a manual DB cluster snapshot.
\nTo share a manual DB cluster snapshot with other Amazon Web Services accounts, specify\n restore
as the AttributeName
and use the\n ValuesToAdd
parameter to add a list of IDs of the Amazon Web Services accounts that are\n authorized to restore the manual DB cluster snapshot. Use the value all
to\n make the manual DB cluster snapshot public, which means that it can be copied or\n restored by all Amazon Web Services accounts.
Don't add the all
value for any manual DB cluster snapshots\n that contain private information that you don't want available to all Amazon Web Services\n accounts.
If a manual DB cluster snapshot is encrypted, it can be shared, but only by\n specifying a list of authorized Amazon Web Services account IDs for the ValuesToAdd
\n parameter. You can't use all
as a value for that parameter in this\n case.
To view which Amazon Web Services accounts have access to copy or restore a manual DB cluster\n snapshot, or whether a manual DB cluster snapshot is public or private, use the DescribeDBClusterSnapshotAttributes API action. The accounts are\n returned as values for the restore
attribute.
The new compute and memory capacity of the DB instance, for example, db.m4.large
.\n Not all DB instance classes are available in all Amazon Web Services Regions, or for all database engines.\n For the full list of DB instance classes,\n and availability for your engine, see\n DB Instance Class in the Amazon RDS User Guide.\n
If you modify the DB instance class, an outage occurs during the change.\n The change is applied during the next maintenance window,\n unless ApplyImmediately
is enabled for this request.\n
This setting doesn't apply to RDS Custom.
\nDefault: Uses existing setting
" + "smithy.api#documentation": "The new compute and memory capacity of the DB instance, for example db.m4.large.\n Not all DB instance classes are available in all Amazon Web Services Regions, or for all database engines.\n For the full list of DB instance classes,\n and availability for your engine, see\n DB Instance Class in the Amazon RDS User Guide.\n
\nIf you modify the DB instance class, an outage occurs during the change.\n The change is applied during the next maintenance window,\n unless ApplyImmediately
is enabled for this request.\n
This setting doesn't apply to RDS Custom.
\nDefault: Uses existing setting
" } }, "DBSubnetGroupName": { @@ -14224,7 +14437,7 @@ "PubliclyAccessible": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether the DB instance is publicly accessible.\n
\nWhen the DB instance is publicly accessible, its DNS endpoint resolves to the private IP address from within the DB instance's VPC, \n and to the public IP address from outside of the DB instance's VPC. Access to the DB instance is ultimately controlled by the security group it uses, \n and that public access is not permitted if the security group assigned to the DB instance doesn't permit it.
\nWhen the DB instance isn't publicly accessible, it is an internal DB instance with a DNS name that resolves to a private IP address.
\n\n PubliclyAccessible
only applies to DB instances in a VPC. The DB instance must be part of a \n public subnet and PubliclyAccessible
must be enabled for it to be publicly accessible.\n
Changes to the PubliclyAccessible
parameter are applied immediately regardless\n of the value of the ApplyImmediately
parameter.
This setting doesn't apply to RDS Custom.
" + "smithy.api#documentation": "A value that indicates whether the DB instance is publicly accessible.\n
\nWhen the DB cluster is publicly accessible, its Domain Name System (DNS) endpoint\n resolves to the private IP address from within the DB cluster's virtual private cloud\n (VPC). It resolves to the public IP address from outside of the DB cluster's VPC. Access\n to the DB cluster is ultimately controlled by the security group it uses. That public\n access isn't permitted if the security group assigned to the DB cluster doesn't permit\n it.
\nWhen the DB instance isn't publicly accessible, it is an internal DB instance with a DNS name that resolves to a private IP address.
\n\n PubliclyAccessible
only applies to DB instances in a VPC. The DB instance must be part of a \n public subnet and PubliclyAccessible
must be enabled for it to be publicly accessible.\n
Changes to the PubliclyAccessible
parameter are applied immediately regardless\n of the value of the ApplyImmediately
parameter.
This setting doesn't apply to RDS Custom.
" } }, "MonitoringRoleArn": { @@ -14248,7 +14461,7 @@ "EnableIAMDatabaseAuthentication": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether to enable mapping of Amazon Web Services Identity and Access\n Management (IAM) accounts to database accounts. By default, mapping is disabled.
\nThis setting doesn't apply to Amazon Aurora. Mapping Amazon Web Services IAM accounts to database accounts is managed by the DB\n cluster.
\nFor more information about IAM database authentication, see \n \n IAM Database Authentication for MySQL and PostgreSQL in the Amazon RDS User Guide.\n
\nThis setting doesn't apply to RDS Custom.
" + "smithy.api#documentation": "A value that indicates whether to enable mapping of Amazon Web Services Identity and Access Management\n (IAM) accounts to database accounts. By default, mapping isn't enabled.
\nThis setting doesn't apply to Amazon Aurora. Mapping Amazon Web Services IAM accounts to database accounts is managed by the DB\n cluster.
\nFor more information about IAM database authentication, see \n \n IAM Database Authentication for MySQL and PostgreSQL in the Amazon RDS User Guide.\n
\nThis setting doesn't apply to RDS Custom.
" } }, "EnablePerformanceInsights": { @@ -14290,7 +14503,7 @@ "DeletionProtection": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether the DB instance has deletion protection enabled. \n The database can't be deleted when deletion protection is enabled. By default, \n deletion protection is disabled. For more information, see \n \n Deleting a DB Instance.\n
" + "smithy.api#documentation": "A value that indicates whether the DB instance has deletion protection enabled. \n The database can't be deleted when deletion protection is enabled. By default, \n deletion protection isn't enabled. For more information, see \n \n Deleting a DB Instance.\n
" } }, "MaxAllocatedStorage": { @@ -14885,7 +15098,7 @@ } ], "traits": { - "smithy.api#documentation": "\n Modify a setting for an Amazon Aurora global cluster. You can change one or more database configuration\n parameters by specifying these parameters and the new values in the request. For more information on\n Amazon Aurora, see What Is Amazon Aurora? in the\n Amazon Aurora User Guide.\n
\nThis action only applies to Aurora DB clusters.
\n\n Modify a setting for an Amazon Aurora global cluster. You can change one or more database configuration\n parameters by specifying these parameters and the new values in the request. For more information on\n Amazon Aurora, see What is Amazon Aurora? in the\n Amazon Aurora User Guide.\n
\nThis action only applies to Aurora DB clusters.
\nA value that indicates whether you can use Aurora global databases with a specific combination of other DB engine attributes.
" } + }, + "SupportsClusters": { + "target": "com.amazonaws.rds#Boolean", + "traits": { + "smithy.api#documentation": "Whether DB instances can be configured as a Multi-AZ DB cluster.
\nThe Multi-AZ DB clusters feature is in preview and is subject to change.
\nFor more information on Multi-AZ DB clusters, see \n \n Multi-AZ deployments with two readable standby DB instances in the Amazon RDS User Guide.\n
" + } } }, "traits": { @@ -16213,7 +16432,7 @@ } ], "traits": { - "smithy.api#documentation": "Promotes a read replica DB cluster to a standalone DB cluster.
\nThis action only applies to Aurora DB clusters.
\nPromotes a read replica DB cluster to a standalone DB cluster.
" } }, "com.amazonaws.rds#PromoteReadReplicaDBClusterMessage": { @@ -16420,6 +16639,49 @@ "target": "com.amazonaws.rds#String" } }, + "com.amazonaws.rds#RebootDBCluster": { + "type": "operation", + "input": { + "target": "com.amazonaws.rds#RebootDBClusterMessage" + }, + "output": { + "target": "com.amazonaws.rds#RebootDBClusterResult" + }, + "errors": [ + { + "target": "com.amazonaws.rds#DBClusterNotFoundFault" + }, + { + "target": "com.amazonaws.rds#InvalidDBClusterStateFault" + }, + { + "target": "com.amazonaws.rds#InvalidDBInstanceStateFault" + } + ], + "traits": { + "smithy.api#documentation": "You might need to reboot your DB cluster, usually for maintenance reasons. \n For example, if you make certain modifications, \n or if you change the DB cluster parameter group associated with the DB cluster, \n reboot the DB cluster for the changes to take effect.\n
\n \nRebooting a DB cluster restarts the database engine service. Rebooting a DB \n cluster results in a momentary outage, during which the DB cluster status is set to rebooting.\n
\n \nUse this operation only for a non-Aurora Multi-AZ DB cluster. \n The Multi-AZ DB clusters feature is in preview and is subject to change.
\n \nFor more information on Multi-AZ DB clusters, see \n \n Multi-AZ deployments with two readable standby DB instances in the \n Amazon RDS User Guide.\n
" + } + }, + "com.amazonaws.rds#RebootDBClusterMessage": { + "type": "structure", + "members": { + "DBClusterIdentifier": { + "target": "com.amazonaws.rds#String", + "traits": { + "smithy.api#documentation": "The DB cluster identifier. This parameter is stored as a lowercase string.
\nConstraints:
\nMust match the identifier of an existing DBCluster.
\n\n Detaches an Aurora secondary cluster from an Aurora global database cluster. The cluster becomes a\n standalone cluster with read-write capability instead of being read-only and receiving data from a\n primary cluster in a different region.\n
\nThis action only applies to Aurora DB clusters.
\n\n Detaches an Aurora secondary cluster from an Aurora global database cluster. The cluster becomes a\n standalone cluster with read-write capability instead of being read-only and receiving data from a\n primary cluster in a different Region.\n
\nThis action only applies to Aurora DB clusters.
\nDisassociates an Amazon Web Services Identity and Access Management (IAM) role from an Amazon Aurora DB cluster.\n For more information, see Authorizing Amazon Aurora MySQL \n to Access Other Amazon Web Services Services on Your Behalf in the Amazon Aurora User Guide.
\nThis action only applies to Aurora DB clusters.
\nRemoves the asssociation of an Amazon Web Services Identity and Access Management (IAM) role from a\n DB cluster.
\nFor more information on Amazon Aurora DB clusters, see \n \n What is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nFor more information on Multi-AZ DB clusters, see \n \n Multi-AZ deployments with two readable standby DB instances in the Amazon RDS User Guide.\n
\nThe Multi-AZ DB clusters feature is in preview and is subject to change.
\n\n Modifies the parameters of a DB cluster parameter group to the default value. To\n reset specific parameters submit a list of the following: ParameterName
\n and ApplyMethod
. To reset the\n entire DB cluster parameter group, specify the DBClusterParameterGroupName
\n and ResetAllParameters
parameters.\n
\n When resetting the entire group, dynamic parameters are updated immediately and static parameters\n are set to pending-reboot
to take effect on the next DB instance restart \n or RebootDBInstance
request. You must call RebootDBInstance
for every\n DB instance in your DB cluster that you want the updated static parameter to apply to.
For more information on Amazon Aurora, see \n \n What Is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nThis action only applies to Aurora DB clusters.
\n\n Modifies the parameters of a DB cluster parameter group to the default value. To\n reset specific parameters submit a list of the following: ParameterName
\n and ApplyMethod
. To reset the\n entire DB cluster parameter group, specify the DBClusterParameterGroupName
\n and ResetAllParameters
parameters.\n
\n When resetting the entire group, dynamic parameters are updated immediately and static parameters\n are set to pending-reboot
to take effect on the next DB instance restart \n or RebootDBInstance
request. You must call RebootDBInstance
for every\n DB instance in your DB cluster that you want the updated static parameter to apply to.
For more information on Amazon Aurora DB clusters, see \n \n What is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nFor more information on Multi-AZ DB clusters, see \n \n Multi-AZ deployments with two readable standby DB instances in the Amazon RDS User Guide.\n
\nThe Multi-AZ DB clusters feature is in preview and is subject to change.
\nCreates an Amazon Aurora DB cluster from MySQL data stored in an Amazon S3 bucket.\n Amazon RDS must be authorized to access the Amazon S3 bucket and the data must be\n created using the Percona XtraBackup utility as described in Migrating Data from MySQL by Using an Amazon S3 Bucket in the\n Amazon Aurora User Guide.
\nThis action only restores the DB cluster, not the DB instances for that DB\n cluster. You must invoke the CreateDBInstance
action to create DB\n instances for the restored DB cluster, specifying the identifier of the restored DB\n cluster in DBClusterIdentifier
. You can create DB instances only after\n the RestoreDBClusterFromS3
action has completed and the DB\n cluster is available.
For more information on Amazon Aurora, see \n \n What Is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nThis action only applies to Aurora DB clusters. The source DB engine must be\n MySQL.
\nCreates an Amazon Aurora DB cluster from MySQL data stored in an Amazon S3 bucket.\n Amazon RDS must be authorized to access the Amazon S3 bucket and the data must be\n created using the Percona XtraBackup utility as described in Migrating Data from MySQL by Using an Amazon S3 Bucket in the\n Amazon Aurora User Guide.
\nThis action only restores the DB cluster, not the DB instances for that DB\n cluster. You must invoke the CreateDBInstance
action to create DB\n instances for the restored DB cluster, specifying the identifier of the restored DB\n cluster in DBClusterIdentifier
. You can create DB instances only after\n the RestoreDBClusterFromS3
action has completed and the DB\n cluster is available.
For more information on Amazon Aurora, see \n \n What is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nThis action only applies to Aurora DB clusters. The source DB engine must be\n MySQL.
\nA value that indicates whether to enable mapping of Amazon Web Services Identity and Access\n Management (IAM) accounts to database accounts. By default, mapping is disabled.
\n \nFor more information, see \n \n IAM Database Authentication in the Amazon Aurora User Guide.\n
" + "smithy.api#documentation": "A value that indicates whether to enable mapping of Amazon Web Services Identity and Access\n Management (IAM) accounts to database accounts. By default, mapping isn't\n enabled.
\n \nFor more information, see \n \n IAM Database Authentication in the Amazon Aurora User Guide.\n
" } }, "SourceEngine": { @@ -17490,7 +17752,7 @@ "DeletionProtection": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether the DB cluster has deletion protection enabled. \n The database can't be deleted when deletion protection is enabled. By default, \n deletion protection is disabled.\n
" + "smithy.api#documentation": "A value that indicates whether the DB cluster has deletion protection enabled. \n The database can't be deleted when deletion protection is enabled. By default, \n deletion protection isn't enabled.\n
" } }, "CopyTagsToSnapshot": { @@ -17583,7 +17845,7 @@ } ], "traits": { - "smithy.api#documentation": "Creates a new DB cluster from a DB snapshot or DB cluster snapshot. This action\n only applies to Aurora DB clusters.
\nThe target DB cluster is created from the source snapshot with a default\n configuration. If you don't specify a security group, the new DB cluster is\n associated with the default security group.
\nThis action only restores the DB cluster, not the DB instances for that DB\n cluster. You must invoke the CreateDBInstance
action to create DB\n instances for the restored DB cluster, specifying the identifier of the restored DB\n cluster in DBClusterIdentifier
. You can create DB instances only after\n the RestoreDBClusterFromSnapshot
action has completed and the DB\n cluster is available.
For more information on Amazon Aurora, see \n \n What Is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nThis action only applies to Aurora DB clusters.
\nCreates a new DB cluster from a DB snapshot or DB cluster snapshot.
\nThe target DB cluster is created from the source snapshot with a default\n configuration. If you don't specify a security group, the new DB cluster is\n associated with the default security group.
\nThis action only restores the DB cluster, not the DB instances for that DB\n cluster. You must invoke the CreateDBInstance
action to create DB\n instances for the restored DB cluster, specifying the identifier of the restored DB\n cluster in DBClusterIdentifier
. You can create DB instances only after\n the RestoreDBClusterFromSnapshot
action has completed and the DB\n cluster is available.
For more information on Amazon Aurora DB clusters, see \n \n What is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nFor more information on Multi-AZ DB clusters, see \n \n Multi-AZ deployments with two readable standby DB instances in the Amazon RDS User Guide.\n
\nThe Multi-AZ DB clusters feature is in preview and is subject to change.
\nProvides the list of Availability Zones (AZs) where instances in the restored DB\n cluster can be created.
" + "smithy.api#documentation": "Provides the list of Availability Zones (AZs) where instances in the restored DB\n cluster can be created.
\nValid for: Aurora DB clusters only
" } }, "DBClusterIdentifier": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The name of the DB cluster to create from the DB snapshot or DB cluster snapshot.\n This parameter isn't case-sensitive.
\nConstraints:
\nMust contain from 1 to 63 letters, numbers, or hyphens
\nFirst character must be a letter
\nCan't end with a hyphen or contain two consecutive hyphens
\nExample: my-snapshot-id
\n
The name of the DB cluster to create from the DB snapshot or DB cluster snapshot.\n This parameter isn't case-sensitive.
\nConstraints:
\nMust contain from 1 to 63 letters, numbers, or hyphens
\nFirst character must be a letter
\nCan't end with a hyphen or contain two consecutive hyphens
\nExample: my-snapshot-id
\n
Valid for: Aurora DB clusters and Multi-AZ DB clusters
", "smithy.api#required": {} } }, "SnapshotIdentifier": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The identifier for the DB snapshot or DB cluster snapshot to restore from.
\nYou can use either the name or the Amazon Resource Name (ARN) to specify a DB\n cluster snapshot. However, you can use only the ARN to specify a DB snapshot.
\nConstraints:
\nMust match the identifier of an existing Snapshot.
\nThe identifier for the DB snapshot or DB cluster snapshot to restore from.
\nYou can use either the name or the Amazon Resource Name (ARN) to specify a DB\n cluster snapshot. However, you can use only the ARN to specify a DB snapshot.
\nConstraints:
\nMust match the identifier of an existing Snapshot.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
", "smithy.api#required": {} } }, "Engine": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The database engine to use for the new DB cluster.
\nDefault: The same as source
\nConstraint: Must be compatible with the engine of the source
", + "smithy.api#documentation": "The database engine to use for the new DB cluster.
\nDefault: The same as source
\nConstraint: Must be compatible with the engine of the source
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
", "smithy.api#required": {} } }, "EngineVersion": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The version of the database engine to use for the new DB cluster.
\nTo list all of the available engine versions for aurora
(for MySQL 5.6-compatible Aurora), use the following command:
\n aws rds describe-db-engine-versions --engine aurora --query \"DBEngineVersions[].EngineVersion\"
\n
To list all of the available engine versions for aurora-mysql
(for MySQL 5.7-compatible Aurora), use the following command:
\n aws rds describe-db-engine-versions --engine aurora-mysql --query \"DBEngineVersions[].EngineVersion\"
\n
To list all of the available engine versions for aurora-postgresql
, use the following command:
\n aws rds describe-db-engine-versions --engine aurora-postgresql --query \"DBEngineVersions[].EngineVersion\"
\n
If you aren't using the default engine version, then you must specify the engine version.
\n\n Aurora MySQL\n
\nExample: 5.6.10a
, 5.6.mysql_aurora.1.19.2
, 5.7.12
, 5.7.mysql_aurora.2.04.5
\n
\n Aurora PostgreSQL\n
\nExample: 9.6.3
, 10.7
\n
The version of the database engine to use for the new DB cluster.
\nTo list all of the available engine versions for MySQL 5.6-compatible Aurora, use the following command:
\n\n aws rds describe-db-engine-versions --engine aurora --query \"DBEngineVersions[].EngineVersion\"
\n
To list all of the available engine versions for MySQL 5.7-compatible Aurora, use the following command:
\n\n aws rds describe-db-engine-versions --engine aurora-mysql --query \"DBEngineVersions[].EngineVersion\"
\n
To list all of the available engine versions for Aurora PostgreSQL, use the following command:
\n\n aws rds describe-db-engine-versions --engine aurora-postgresql --query \"DBEngineVersions[].EngineVersion\"
\n
To list all of the available engine versions for RDS for MySQL, use the following command:
\n\n aws rds describe-db-engine-versions --engine mysql --query \"DBEngineVersions[].EngineVersion\"
\n
To list all of the available engine versions for RDS for PostgreSQL, use the following command:
\n\n aws rds describe-db-engine-versions --engine postgres --query \"DBEngineVersions[].EngineVersion\"
\n
\n Aurora MySQL\n
\nSee MySQL on Amazon RDS Versions in the \n Amazon Aurora User Guide.\n
\n\n Aurora PostgreSQL\n
\nSee Amazon Aurora PostgreSQL releases and engine versions in the \n Amazon Aurora User Guide.\n
\n\n MySQL\n
\nSee MySQL on Amazon RDS Versions in the \n Amazon RDS User Guide.\n
\n\n PostgreSQL\n
\nSee Amazon RDS for PostgreSQL versions and extensions in the \n Amazon RDS User Guide.\n
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "Port": { "target": "com.amazonaws.rds#IntegerOptional", "traits": { - "smithy.api#documentation": "The port number on which the new DB cluster accepts connections.
\nConstraints: This value must be 1150-65535
\n
Default: The same port as the original DB cluster.
" + "smithy.api#documentation": "The port number on which the new DB cluster accepts connections.
\nConstraints: This value must be 1150-65535
\n
Default: The same port as the original DB cluster.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "DBSubnetGroupName": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The name of the DB subnet group to use for the new DB cluster.
\nConstraints: If supplied, must match the name of an existing DB subnet group.
\nExample: mySubnetgroup
\n
The name of the DB subnet group to use for the new DB cluster.
\nConstraints: If supplied, must match the name of an existing DB subnet group.
\nExample: mySubnetgroup
\n
Valid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "DatabaseName": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The database name for the restored DB cluster.
" + "smithy.api#documentation": "The database name for the restored DB cluster.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "OptionGroupName": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The name of the option group to use for the restored DB cluster.
" + "smithy.api#documentation": "The name of the option group to use for the restored DB cluster.
\nDB clusters are associated with a default option group that can't be modified.
" } }, "VpcSecurityGroupIds": { "target": "com.amazonaws.rds#VpcSecurityGroupIdList", "traits": { - "smithy.api#documentation": "A list of VPC security groups that the new DB cluster will belong to.
" + "smithy.api#documentation": "A list of VPC security groups that the new DB cluster will belong to.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "Tags": { "target": "com.amazonaws.rds#TagList", "traits": { - "smithy.api#documentation": "The tags to be assigned to the restored DB cluster.
" + "smithy.api#documentation": "The tags to be assigned to the restored DB cluster.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "KmsKeyId": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The Amazon Web Services KMS key identifier to use when restoring an encrypted DB cluster from a DB\n snapshot or DB cluster snapshot.
\nThe Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.\n To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN.
\nWhen you don't specify a value for the KmsKeyId
parameter, then the\n following occurs:
If the DB snapshot or DB cluster snapshot in\n SnapshotIdentifier
is encrypted, then the restored DB cluster\n is encrypted using the KMS key that was used to encrypt the DB snapshot or DB\n cluster snapshot.
If the DB snapshot or DB cluster snapshot in \n SnapshotIdentifier
isn't encrypted, then the restored DB cluster\n isn't encrypted.
The Amazon Web Services KMS key identifier to use when restoring an encrypted DB cluster from a DB\n snapshot or DB cluster snapshot.
\nThe Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.\n To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN.
\nWhen you don't specify a value for the KmsKeyId
parameter, then the\n following occurs:
If the DB snapshot or DB cluster snapshot in\n SnapshotIdentifier
is encrypted, then the restored DB cluster\n is encrypted using the KMS key that was used to encrypt the DB snapshot or DB\n cluster snapshot.
If the DB snapshot or DB cluster snapshot in \n SnapshotIdentifier
isn't encrypted, then the restored DB cluster\n isn't encrypted.
Valid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "EnableIAMDatabaseAuthentication": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether to enable mapping of Amazon Web Services Identity and Access\n Management (IAM) accounts to database accounts. By default, mapping is disabled.
\n \nFor more information, see \n \n IAM Database Authentication in the Amazon Aurora User Guide.\n
" + "smithy.api#documentation": "A value that indicates whether to enable mapping of Amazon Web Services Identity and Access\n Management (IAM) accounts to database accounts. By default, mapping isn't\n enabled.
\nFor more information, see \n \n IAM Database Authentication in the Amazon Aurora User Guide.\n
\nValid for: Aurora DB clusters only
" } }, "BacktrackWindow": { "target": "com.amazonaws.rds#LongOptional", "traits": { - "smithy.api#documentation": "The target backtrack window, in seconds. To disable backtracking, set this value to\n 0.
\nCurrently, Backtrack is only supported for Aurora MySQL DB clusters.
\nDefault: 0
\nConstraints:
\nIf specified, this value must be set to a number from 0 to 259,200 (72 hours).
\nThe target backtrack window, in seconds. To disable backtracking, set this value to\n 0.
\nCurrently, Backtrack is only supported for Aurora MySQL DB clusters.
\nDefault: 0
\nConstraints:
\nIf specified, this value must be set to a number from 0 to 259,200 (72 hours).
\nValid for: Aurora DB clusters only
" } }, "EnableCloudwatchLogsExports": { "target": "com.amazonaws.rds#LogTypeList", "traits": { - "smithy.api#documentation": "The list of logs that the restored DB cluster is to export to Amazon CloudWatch Logs.\n The values in the list depend on the DB engine being used. For more information, see\n Publishing Database Logs to Amazon CloudWatch Logs in the Amazon\n Aurora User Guide.
" + "smithy.api#documentation": "The list of logs that the restored DB cluster is to export to Amazon CloudWatch Logs.\n The values in the list depend on the DB engine being used.
\nFor more information, see Publishing Database Logs to Amazon CloudWatch Logs in the Amazon\n Aurora User Guide.
\nValid for: Aurora DB clusters only
" } }, "EngineMode": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The DB engine mode of the DB cluster, either provisioned
, serverless
,\n parallelquery
, global
, or multimaster
.
For more information, see \n CreateDBCluster.
" + "smithy.api#documentation": "The DB engine mode of the DB cluster, either provisioned
, serverless
,\n parallelquery
, global
, or multimaster
.
For more information, see \n CreateDBCluster.
\nValid for: Aurora DB clusters only
" } }, "ScalingConfiguration": { "target": "com.amazonaws.rds#ScalingConfiguration", "traits": { - "smithy.api#documentation": "For DB clusters in serverless
DB engine mode, the scaling properties of the DB cluster.
For DB clusters in serverless
DB engine mode, the scaling properties of the DB cluster.
Valid for: Aurora DB clusters only
" } }, "DBClusterParameterGroupName": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The name of the DB cluster parameter group to associate with this DB cluster. If this\n argument is omitted, the default DB cluster parameter group for the specified engine is\n used.
\nConstraints:
\nIf supplied, must match the name of an existing default DB cluster parameter group.
\nMust be 1 to 255 letters, numbers, or hyphens.
\nFirst character must be a letter.
\nCan't end with a hyphen or contain two consecutive hyphens.
\nThe name of the DB cluster parameter group to associate with this DB cluster. If this\n argument is omitted, the default DB cluster parameter group for the specified engine is\n used.
\nConstraints:
\nIf supplied, must match the name of an existing default DB cluster parameter group.
\nMust be 1 to 255 letters, numbers, or hyphens.
\nFirst character must be a letter.
\nCan't end with a hyphen or contain two consecutive hyphens.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "DeletionProtection": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether the DB cluster has deletion protection enabled. \n The database can't be deleted when deletion protection is enabled. By default, \n deletion protection is disabled.\n
" + "smithy.api#documentation": "A value that indicates whether the DB cluster has deletion protection enabled. \n The database can't be deleted when deletion protection is enabled. By default, \n deletion protection isn't enabled.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "CopyTagsToSnapshot": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether to copy all tags from the restored DB cluster to snapshots of the restored DB cluster. The default is not to copy them.
" + "smithy.api#documentation": "A value that indicates whether to copy all tags from the restored DB cluster to snapshots of the restored DB cluster. The default is not to copy them.
\nValid for: Aurora DB clusters only
" } }, "Domain": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "Specify the Active Directory directory ID to restore the DB cluster in.\n The domain must be created prior to this operation. Currently, only MySQL, Microsoft SQL \n Server, Oracle, and PostgreSQL DB instances can be created in an Active Directory Domain.
\nFor more information, see \n Kerberos Authentication in the Amazon RDS User Guide.\n
" + "smithy.api#documentation": "Specify the Active Directory directory ID to restore the DB cluster in.\n The domain must be created prior to this operation. Currently, only MySQL, Microsoft SQL \n Server, Oracle, and PostgreSQL DB instances can be created in an Active Directory Domain.
\nFor more information, see \n Kerberos Authentication in the Amazon RDS User Guide.
\nValid for: Aurora DB clusters only
" } }, "DomainIAMRoleName": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "Specify the name of the IAM role to be used when making API calls to the Directory Service.
" + "smithy.api#documentation": "Specify the name of the IAM role to be used when making API calls to the Directory Service.
\nValid for: Aurora DB clusters only
" + } + }, + "DBClusterInstanceClass": { + "target": "com.amazonaws.rds#String", + "traits": { + "smithy.api#documentation": "The compute and memory capacity of the each DB instance in the Multi-AZ DB cluster, for example db.m6g.xlarge.\n Not all DB instance classes are available in all Amazon Web Services Regions, or for all database engines.
\nFor the full list of DB instance classes, and availability for your engine, see\n DB Instance Class in the Amazon RDS User Guide.\n
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" + } + }, + "StorageType": { + "target": "com.amazonaws.rds#String", + "traits": { + "smithy.api#documentation": "Specifies the storage type to be associated with the each DB instance in the Multi-AZ DB cluster.
\n\n Valid values: standard | gp2 | io1
\n
\n If you specify io1
, you must also include a value for the\n Iops
parameter.\n
\n Default: io1
if the Iops
parameter\n is specified, otherwise gp2
\n
Valid for: Aurora DB clusters and Multi-AZ DB clusters
" + } + }, + "Iops": { + "target": "com.amazonaws.rds#IntegerOptional", + "traits": { + "smithy.api#documentation": "The amount of Provisioned IOPS (input/output operations per second) to be initially allocated for \n each DB instance in the Multi-AZ DB cluster.
\nFor information about valid Iops values, see Amazon RDS Provisioned IOPS Storage to Improve Performance in the Amazon RDS User Guide.\n
\nConstraints: Must be a multiple between .5 and 50 of the storage amount for the DB instance.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" + } + }, + "PubliclyAccessible": { + "target": "com.amazonaws.rds#BooleanOptional", + "traits": { + "smithy.api#documentation": "A value that indicates whether the DB cluster is publicly accessible.
\nWhen the DB cluster is publicly accessible, its Domain Name System (DNS) endpoint resolves to the private IP address \n from within the DB cluster's virtual private cloud (VPC). It resolves to the public IP address from outside of the DB cluster's VPC. \n Access to the DB cluster is ultimately controlled by the security group it uses. \n That public access is not permitted if the security group assigned to the DB cluster doesn't permit it.
\nWhen the DB cluster isn't publicly accessible, it is an internal DB cluster with a DNS name that resolves to a private IP address.
\nDefault: The default behavior varies depending on whether DBSubnetGroupName
is specified.
If DBSubnetGroupName
isn't specified, and PubliclyAccessible
isn't specified, the following applies:
If the default VPC in the target Region doesn’t have an internet gateway attached to it, the DB cluster is private.
\nIf the default VPC in the target Region has an internet gateway attached to it, the DB cluster is public.
\nIf DBSubnetGroupName
is specified, and PubliclyAccessible
isn't specified, the following applies:
If the subnets are part of a VPC that doesn’t have an internet gateway attached to it, the DB cluster is private.
\nIf the subnets are part of a VPC that has an internet gateway attached to it, the DB cluster is public.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } } }, @@ -17802,7 +18088,7 @@ } ], "traits": { - "smithy.api#documentation": "Restores a DB cluster to an arbitrary point in time. Users can restore to any point\n in time before LatestRestorableTime
for up to\n BackupRetentionPeriod
days. The target DB cluster is created from the\n source DB cluster with the same configuration as the original DB cluster, except that\n the new DB cluster is created with the default DB security group.
This action only restores the DB cluster, not the DB instances for that DB\n cluster. You must invoke the CreateDBInstance
action to create DB\n instances for the restored DB cluster, specifying the identifier of the restored DB\n cluster in DBClusterIdentifier
. You can create DB instances only after\n the RestoreDBClusterToPointInTime
action has completed and the DB\n cluster is available.
For more information on Amazon Aurora, see \n \n What Is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nThis action only applies to Aurora DB clusters.
\nRestores a DB cluster to an arbitrary point in time. Users can restore to any point\n in time before LatestRestorableTime
for up to\n BackupRetentionPeriod
days. The target DB cluster is created from the\n source DB cluster with the same configuration as the original DB cluster, except that\n the new DB cluster is created with the default DB security group.
For Aurora, this action only restores the DB cluster, not the DB instances for that DB\n cluster. You must invoke the CreateDBInstance
action to create DB\n instances for the restored DB cluster, specifying the identifier of the restored DB\n cluster in DBClusterIdentifier
. You can create DB instances only after\n the RestoreDBClusterToPointInTime
action has completed and the DB\n cluster is available.
For more information on Amazon Aurora DB clusters, see \n \n What is Amazon Aurora? in the Amazon Aurora User Guide.\n
\nFor more information on Multi-AZ DB clusters, see \n \n Multi-AZ deployments with two readable standby DB instances in the Amazon RDS User Guide.\n
\nThe Multi-AZ DB clusters feature is in preview and is subject to change.
\nThe name of the new DB cluster to be created.
\nConstraints:
\nMust contain from 1 to 63 letters, numbers, or hyphens
\nFirst character must be a letter
\nCan't end with a hyphen or contain two consecutive hyphens
\nThe name of the new DB cluster to be created.
\nConstraints:
\nMust contain from 1 to 63 letters, numbers, or hyphens
\nFirst character must be a letter
\nCan't end with a hyphen or contain two consecutive hyphens
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
", "smithy.api#required": {} } }, "RestoreType": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The type of restore to be performed. You can specify one of the following values:
\n\n full-copy
- The new DB cluster is restored as a full copy of the\n source DB cluster.
\n copy-on-write
- The new DB cluster is restored as a clone of the\n source DB cluster.
Constraints: You can't specify copy-on-write
if the engine version of the source DB cluster is earlier than 1.11.
If you don't specify a RestoreType
value, then the new DB cluster is\n restored as a full copy of the source DB cluster.
The type of restore to be performed. You can specify one of the following values:
\n\n full-copy
- The new DB cluster is restored as a full copy of the\n source DB cluster.
\n copy-on-write
- The new DB cluster is restored as a clone of the\n source DB cluster.
Constraints: You can't specify copy-on-write
if the engine version of the source DB cluster is earlier than 1.11.
If you don't specify a RestoreType
value, then the new DB cluster is\n restored as a full copy of the source DB cluster.
Valid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "SourceDBClusterIdentifier": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The identifier of the source DB cluster from which to restore.
\nConstraints:
\nMust match the identifier of an existing DBCluster.
\nThe identifier of the source DB cluster from which to restore.
\nConstraints:
\nMust match the identifier of an existing DBCluster.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
", "smithy.api#required": {} } }, "RestoreToTime": { "target": "com.amazonaws.rds#TStamp", "traits": { - "smithy.api#documentation": "The date and time to restore the DB cluster to.
\nValid Values: Value must be a time in Universal Coordinated Time (UTC) format
\nConstraints:
\nMust be before the latest restorable time for the DB instance
\nMust be specified if UseLatestRestorableTime
parameter isn't provided
Can't be specified if the UseLatestRestorableTime
parameter is enabled
Can't be specified if the RestoreType
parameter is copy-on-write
\n
Example: 2015-03-07T23:45:00Z
\n
The date and time to restore the DB cluster to.
\nValid Values: Value must be a time in Universal Coordinated Time (UTC) format
\nConstraints:
\nMust be before the latest restorable time for the DB instance
\nMust be specified if UseLatestRestorableTime
parameter isn't provided
Can't be specified if the UseLatestRestorableTime
parameter is enabled
Can't be specified if the RestoreType
parameter is copy-on-write
\n
Example: 2015-03-07T23:45:00Z
\n
Valid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "UseLatestRestorableTime": { "target": "com.amazonaws.rds#Boolean", "traits": { - "smithy.api#documentation": "A value that indicates whether to restore the DB cluster to the latest \n restorable backup time. By default, the DB cluster isn't restored to the latest \n restorable backup time.\n
\nConstraints: Can't be specified if RestoreToTime
parameter is provided.
A value that indicates whether to restore the DB cluster to the latest \n restorable backup time. By default, the DB cluster isn't restored to the latest \n restorable backup time.\n
\nConstraints: Can't be specified if RestoreToTime
parameter is provided.
Valid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "Port": { "target": "com.amazonaws.rds#IntegerOptional", "traits": { - "smithy.api#documentation": "The port number on which the new DB cluster accepts connections.
\nConstraints: A value from 1150-65535
.\n
Default: The default port for the engine.
" + "smithy.api#documentation": "The port number on which the new DB cluster accepts connections.
\nConstraints: A value from 1150-65535
.\n
Default: The default port for the engine.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "DBSubnetGroupName": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The DB subnet group name to use for the new DB cluster.
\nConstraints: If supplied, must match the name of an existing DBSubnetGroup.
\nExample: mySubnetgroup
\n
The DB subnet group name to use for the new DB cluster.
\nConstraints: If supplied, must match the name of an existing DBSubnetGroup.
\nExample: mySubnetgroup
\n
Valid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "OptionGroupName": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The name of the option group for the new DB cluster.
" + "smithy.api#documentation": "The name of the option group for the new DB cluster.
\nDB clusters are associated with a default option group that can't be modified.
" } }, "VpcSecurityGroupIds": { "target": "com.amazonaws.rds#VpcSecurityGroupIdList", "traits": { - "smithy.api#documentation": "A list of VPC security groups that the new DB cluster belongs to.
" + "smithy.api#documentation": "A list of VPC security groups that the new DB cluster belongs to.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "Tags": { @@ -17870,67 +18156,91 @@ "KmsKeyId": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The Amazon Web Services KMS key identifier to use when restoring an encrypted DB cluster from an encrypted DB cluster.
\nThe Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.\n To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN.
\nYou can restore to a new DB cluster and encrypt the new DB cluster with a KMS key that is different from the\n KMS key used to encrypt the source DB cluster. The new DB cluster is encrypted with the KMS key\n identified by the KmsKeyId
parameter.
If you don't specify a value for the KmsKeyId
parameter, then the following occurs:
If the DB cluster is encrypted, then the restored DB cluster is encrypted using the KMS key that was used to encrypt the source DB cluster.
\nIf the DB cluster isn't encrypted, then the restored DB cluster isn't encrypted.
\nIf DBClusterIdentifier
refers to a DB cluster that isn't encrypted, then the restore request\n is rejected.
The Amazon Web Services KMS key identifier to use when restoring an encrypted DB cluster from an encrypted DB cluster.
\nThe Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.\n To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN.
\nYou can restore to a new DB cluster and encrypt the new DB cluster with a KMS key that is different from the\n KMS key used to encrypt the source DB cluster. The new DB cluster is encrypted with the KMS key\n identified by the KmsKeyId
parameter.
If you don't specify a value for the KmsKeyId
parameter, then the following occurs:
If the DB cluster is encrypted, then the restored DB cluster is encrypted using the KMS key that was used to encrypt the source DB cluster.
\nIf the DB cluster isn't encrypted, then the restored DB cluster isn't encrypted.
\nIf DBClusterIdentifier
refers to a DB cluster that isn't encrypted, then the restore request\n is rejected.
Valid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "EnableIAMDatabaseAuthentication": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether to enable mapping of Amazon Web Services Identity and Access\n Management (IAM) accounts to database accounts. By default, mapping is disabled.
\n \nFor more information, see \n \n IAM Database Authentication in the Amazon Aurora User Guide.\n
" + "smithy.api#documentation": "A value that indicates whether to enable mapping of Amazon Web Services Identity and Access\n Management (IAM) accounts to database accounts. By default, mapping isn't\n enabled.
\nFor more information, see \n \n IAM Database Authentication in the Amazon Aurora User Guide.\n
\nValid for: Aurora DB clusters only
" } }, "BacktrackWindow": { "target": "com.amazonaws.rds#LongOptional", "traits": { - "smithy.api#documentation": "The target backtrack window, in seconds. To disable backtracking, set this value to\n 0.
\nCurrently, Backtrack is only supported for Aurora MySQL DB clusters.
\nDefault: 0
\nConstraints:
\nIf specified, this value must be set to a number from 0 to 259,200 (72 hours).
\nThe target backtrack window, in seconds. To disable backtracking, set this value to\n 0.
\nDefault: 0
\nConstraints:
\nIf specified, this value must be set to a number from 0 to 259,200 (72 hours).
\nValid for: Aurora MySQL DB clusters only
" } }, "EnableCloudwatchLogsExports": { "target": "com.amazonaws.rds#LogTypeList", "traits": { - "smithy.api#documentation": "The list of logs that the restored DB cluster is to export to CloudWatch Logs. The values\n in the list depend on the DB engine being used. For more information, see \n Publishing Database Logs to Amazon CloudWatch Logs in the Amazon Aurora User Guide.
" + "smithy.api#documentation": "The list of logs that the restored DB cluster is to export to CloudWatch Logs. The values\n in the list depend on the DB engine being used.
\nFor more information, see Publishing Database Logs to Amazon CloudWatch Logs in the Amazon Aurora User Guide.
\nValid for: Aurora DB clusters only
" } }, "DBClusterParameterGroupName": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The name of the DB cluster parameter group to associate with this DB cluster. \n If this argument is omitted, the default DB cluster parameter group for the specified engine is used.
\nConstraints:
\nIf supplied, must match the name of an existing DB cluster parameter group.
\nMust be 1 to 255 letters, numbers, or hyphens.
\nFirst character must be a letter.
\nCan't end with a hyphen or contain two consecutive hyphens.
\nThe name of the DB cluster parameter group to associate with this DB cluster. \n If this argument is omitted, the default DB cluster parameter group for the specified engine is used.
\nConstraints:
\nIf supplied, must match the name of an existing DB cluster parameter group.
\nMust be 1 to 255 letters, numbers, or hyphens.
\nFirst character must be a letter.
\nCan't end with a hyphen or contain two consecutive hyphens.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "DeletionProtection": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether the DB cluster has deletion protection enabled. \n The database can't be deleted when deletion protection is enabled. By default, \n deletion protection is disabled.\n
" + "smithy.api#documentation": "A value that indicates whether the DB cluster has deletion protection enabled. \n The database can't be deleted when deletion protection is enabled. By default, \n deletion protection isn't enabled.
\nValid for: Aurora DB clusters and Multi-AZ DB clusters
" } }, "CopyTagsToSnapshot": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether to copy all tags from the restored DB cluster to snapshots of the restored DB cluster. The default is not to copy them.
" + "smithy.api#documentation": "A value that indicates whether to copy all tags from the restored DB cluster to snapshots of the restored DB cluster. The default is not to copy them.
\nValid for: Aurora DB clusters only
" } }, "Domain": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "Specify the Active Directory directory ID to restore the DB cluster in.\n The domain must be created prior to this operation.\n
\n\n For Amazon Aurora DB clusters, Amazon RDS can use Kerberos Authentication to authenticate users that connect to the DB cluster.\n For more information, see Kerberos Authentication\n in the Amazon Aurora User Guide.\n
" + "smithy.api#documentation": "Specify the Active Directory directory ID to restore the DB cluster in.\n The domain must be created prior to this operation.\n
\n\n For Amazon Aurora DB clusters, Amazon RDS can use Kerberos Authentication to authenticate users that connect to the DB cluster.\n For more information, see Kerberos Authentication\n in the Amazon Aurora User Guide.\n
\nValid for: Aurora DB clusters only
" } }, "DomainIAMRoleName": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "Specify the name of the IAM role to be used when making API calls to the Directory Service.
" + "smithy.api#documentation": "Specify the name of the IAM role to be used when making API calls to the Directory Service.
\nValid for: Aurora DB clusters only
" } }, "ScalingConfiguration": { "target": "com.amazonaws.rds#ScalingConfiguration", "traits": { - "smithy.api#documentation": "For DB clusters in serverless
DB engine mode, the scaling properties of the DB cluster.
For DB clusters in serverless
DB engine mode, the scaling properties of the DB cluster.
Valid for: Aurora DB clusters only
" } }, "EngineMode": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The engine mode of the new cluster. Specify provisioned
or serverless
,\n depending on the type of the cluster you are creating. You can create an Aurora Serverless clone\n from a provisioned cluster, or a provisioned clone from an Aurora Serverless cluster. To create a clone\n that is an Aurora Serverless cluster, the original cluster must be an Aurora Serverless cluster or\n an encrypted provisioned cluster.
The engine mode of the new cluster. Specify provisioned
or serverless
,\n depending on the type of the cluster you are creating. You can create an Aurora Serverless clone\n from a provisioned cluster, or a provisioned clone from an Aurora Serverless cluster. To create a clone\n that is an Aurora Serverless cluster, the original cluster must be an Aurora Serverless cluster or\n an encrypted provisioned cluster.
Valid for: Aurora DB clusters only
" + } + }, + "DBClusterInstanceClass": { + "target": "com.amazonaws.rds#String", + "traits": { + "smithy.api#documentation": "The compute and memory capacity of the each DB instance in the Multi-AZ DB cluster,\n for example db.m6g.xlarge. Not all DB instance classes are available in all Amazon Web Services\n Regions, or for all database engines.
\nFor the full list of DB instance classes, and availability for your engine, see DB instance class in the Amazon RDS User Guide.\n
\nValid for: Multi-AZ DB clusters only
" + } + }, + "StorageType": { + "target": "com.amazonaws.rds#String", + "traits": { + "smithy.api#documentation": "Specifies the storage type to be associated with the each DB instance in the Multi-AZ DB cluster.
\n\n Valid values: standard | gp2 | io1
\n
\n If you specify io1
, also include a value for the\n Iops
parameter.\n
\n Default: io1
if the Iops
parameter\n is specified, otherwise gp2
\n
Valid for: Multi-AZ DB clusters only
" + } + }, + "PubliclyAccessible": { + "target": "com.amazonaws.rds#BooleanOptional", + "traits": { + "smithy.api#documentation": "A value that indicates whether the DB cluster is publicly accessible.
\nWhen the DB cluster is publicly accessible, its Domain Name System (DNS) endpoint resolves to the private IP address \n from within the DB cluster's virtual private cloud (VPC). It resolves\n to the public IP address from outside of the DB cluster's VPC. \n Access to the DB cluster is ultimately controlled by the security group it uses. \n That public access is not permitted if the security group assigned to the DB cluster doesn't permit it.
\nWhen the DB cluster isn't publicly accessible, it is an internal DB cluster with a DNS name that resolves to a private IP address.
\nDefault: The default behavior varies depending on whether DBSubnetGroupName
is specified.
If DBSubnetGroupName
isn't specified, and PubliclyAccessible
isn't specified, the following applies:
If the default VPC in the target Region doesn’t have an internet gateway attached to it, the DB cluster is private.
\nIf the default VPC in the target Region has an internet gateway attached to it, the DB cluster is public.
\nIf DBSubnetGroupName
is specified, and PubliclyAccessible
isn't specified, the following applies:
If the subnets are part of a VPC that doesn’t have an internet gateway attached to it, the DB cluster is private.
\nIf the subnets are part of a VPC that has an internet gateway attached to it, the DB cluster is public.
\nValid for: Multi-AZ DB clusters only
" + } + }, + "Iops": { + "target": "com.amazonaws.rds#IntegerOptional", + "traits": { + "smithy.api#documentation": "The amount of Provisioned IOPS (input/output operations per second) to be initially allocated for \n each DB instance in the Multi-AZ DB cluster.
\nFor information about valid Iops
values, see Amazon RDS Provisioned IOPS storage to improve performance in the Amazon RDS User Guide.\n
Constraints: Must be a multiple between .5 and 50 of the storage amount for the DB instance. \n
\nValid for: Multi-AZ DB clusters only
" } } }, @@ -18040,7 +18350,7 @@ "DBInstanceClass": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The compute and memory capacity of the Amazon RDS DB instance, for example, db.m4.large
.\n Not all DB instance classes are available in all Amazon Web Services Regions, or for all database engines.\n For the full list of DB instance classes,\n and availability for your engine, see\n DB Instance Class in the Amazon RDS User Guide.\n
Default: The same DBInstanceClass as the original DB instance.
" + "smithy.api#documentation": "The compute and memory capacity of the Amazon RDS DB instance, for example db.m4.large.\n Not all DB instance classes are available in all Amazon Web Services Regions, or for all database engines.\n For the full list of DB instance classes,\n and availability for your engine, see\n DB Instance Class in the Amazon RDS User Guide.\n
\nDefault: The same DBInstanceClass as the original DB instance.
" } }, "Port": { @@ -18070,7 +18380,7 @@ "PubliclyAccessible": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether the DB instance is publicly accessible.
\nWhen the DB instance is publicly accessible, its DNS endpoint resolves to the private IP address from within the DB instance's VPC, \n and to the public IP address from outside of the DB instance's VPC. Access to the DB instance is ultimately controlled by the security group it uses, \n and that public access is not permitted if the security group assigned to the DB instance doesn't permit it.
\nWhen the DB instance isn't publicly accessible, it is an internal DB instance with a DNS name that resolves to a private IP address.
\nFor more information, see CreateDBInstance.
" + "smithy.api#documentation": "A value that indicates whether the DB instance is publicly accessible.
\nWhen the DB instance is publicly accessible, its Domain Name System (DNS) endpoint resolves to the private IP address \n from within the DB instance's virtual private cloud (VPC). \n It resolves to the public IP address from outside of the DB instance's VPC. Access to the DB instance is ultimately controlled \n by the security group it uses. That public access is not permitted if the security group assigned to the DB instance doesn't permit it.
\nWhen the DB instance isn't publicly accessible, it is an internal DB instance with a DNS name that resolves to a private IP address.
\nFor more information, see CreateDBInstance.
" } }, "AutoMinorVersionUpgrade": { @@ -18157,7 +18467,7 @@ "EnableIAMDatabaseAuthentication": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether to enable mapping of Amazon Web Services Identity and Access\n Management (IAM) accounts to database accounts. By default, mapping is disabled.
\n \nFor more information about IAM database authentication, see \n \n IAM Database Authentication for MySQL and PostgreSQL in the Amazon RDS User Guide.\n
\nThis setting doesn't apply to RDS Custom.
" + "smithy.api#documentation": "A value that indicates whether to enable mapping of Amazon Web Services Identity and Access\n Management (IAM) accounts to database accounts. By default, mapping is disabled.
\n\nFor more information about IAM database authentication, see \n \n IAM Database Authentication for MySQL and PostgreSQL in the Amazon RDS User Guide.\n
\nThis setting doesn't apply to RDS Custom.
" } }, "EnableCloudwatchLogsExports": { @@ -18187,7 +18497,7 @@ "DeletionProtection": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether the DB instance has deletion protection enabled. \n The database can't be deleted when deletion protection is enabled. By default, \n deletion protection is disabled. For more information, see \n \n Deleting a DB Instance.\n
" + "smithy.api#documentation": "A value that indicates whether the DB instance has deletion protection enabled. \n The database can't be deleted when deletion protection is enabled. By default, \n deletion protection isn't enabled. For more information, see \n \n Deleting a DB Instance.\n
" } }, "EnableCustomerOwnedIp": { @@ -18201,6 +18511,12 @@ "traits": { "smithy.api#documentation": "The instance profile associated with the underlying Amazon EC2 instance of an \n RDS Custom DB instance. The instance profile must meet the following requirements:
\nThe profile must exist in your account.
\nThe profile must have an IAM role that Amazon EC2 has permissions to assume.
\nThe instance profile name and the associated IAM role name must start with the prefix AWSRDSCustom
.
For the list of permissions required for the IAM role, see \n \n Configure IAM and your VPC in the Amazon Relational Database Service\n User Guide.
\nThis setting is required for RDS Custom.
" } + }, + "BackupTarget": { + "target": "com.amazonaws.rds#String", + "traits": { + "smithy.api#documentation": "Specifies where automated backups and manual snapshots are stored for the restored DB instance.
\nPossible values are outposts
(Amazon Web Services Outposts) and region
(Amazon Web Services Region). The default is region
.
For more information, see Working \n with Amazon RDS on Amazon Web Services Outposts in the Amazon RDS User Guide.
" + } } }, "traits": { @@ -18305,7 +18621,7 @@ "DBInstanceClass": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The compute and memory capacity of the DB instance, \n for example, db.m4.large
.\n Not all DB instance classes are available in all Amazon Web Services Regions, \n or for all database engines.\n For the full list of DB instance classes,\n and availability for your engine, see DB Instance Class in the Amazon RDS User Guide.\n
Importing from Amazon S3 isn't supported on the db.t2.micro DB instance class.\n
", + "smithy.api#documentation": "The compute and memory capacity of the DB instance, \n for example db.m4.large.\n Not all DB instance classes are available in all Amazon Web Services Regions, \n or for all database engines.\n For the full list of DB instance classes,\n and availability for your engine, see DB Instance Class in the Amazon RDS User Guide.\n
\nImporting from Amazon S3 isn't supported on the db.t2.micro DB instance class.\n
", "smithy.api#required": {} } }, @@ -18421,7 +18737,7 @@ "PubliclyAccessible": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether the DB instance is publicly accessible.
\nWhen the DB instance is publicly accessible, its DNS endpoint resolves to the private IP address from within the DB instance's VPC, \n and to the public IP address from outside of the DB instance's VPC. Access to the DB instance is ultimately controlled by the security group it uses, \n and that public access is not permitted if the security group assigned to the DB instance doesn't permit it.
\nWhen the DB instance isn't publicly accessible, it is an internal DB instance with a DNS name that resolves to a private IP address.
\nFor more information, see CreateDBInstance.
" + "smithy.api#documentation": "A value that indicates whether the DB instance is publicly accessible.
\nWhen the DB instance is publicly accessible, its Domain Name System (DNS) endpoint resolves to the private IP address \n from within the DB instance's virtual private cloud (VPC). \n It resolves to the public IP address from outside of the DB instance's VPC. \n Access to the DB instance is ultimately controlled by the security group it uses. \n That public access is not permitted if the security group assigned to the DB instance doesn't permit it.
\nWhen the DB instance isn't publicly accessible, it is an internal DB instance with a DNS name that resolves to a private IP address.
\nFor more information, see CreateDBInstance.
" } }, "Tags": { @@ -18469,7 +18785,7 @@ "EnableIAMDatabaseAuthentication": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether to enable mapping of Amazon Web Services Identity and Access\n Management (IAM) accounts to database accounts. By default, mapping is disabled.
\n \nFor more information about IAM database authentication, see \n \n IAM Database Authentication for MySQL and PostgreSQL in the Amazon RDS User Guide.\n
" + "smithy.api#documentation": "A value that indicates whether to enable mapping of Amazon Web Services Identity and Access Management\n (IAM) accounts to database accounts. By default, mapping isn't enabled.
\n \nFor more information about IAM database authentication, see \n \n IAM Database Authentication for MySQL and PostgreSQL in the Amazon RDS User Guide.\n
" } }, "SourceEngine": { @@ -18545,7 +18861,7 @@ "DeletionProtection": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether the DB instance has deletion protection enabled. \n The database can't be deleted when deletion protection is enabled. By default, \n deletion protection is disabled. For more information, see \n \n Deleting a DB Instance.\n
" + "smithy.api#documentation": "A value that indicates whether the DB instance has deletion protection enabled. \n The database can't be deleted when deletion protection is enabled. By default, \n deletion protection isn't enabled. For more information, see \n \n Deleting a DB Instance.\n
" } }, "MaxAllocatedStorage": { @@ -18675,7 +18991,7 @@ "DBInstanceClass": { "target": "com.amazonaws.rds#String", "traits": { - "smithy.api#documentation": "The compute and memory capacity of the Amazon RDS DB instance, for example, db.m4.large
.\n Not all DB instance classes are available in all Amazon Web Services Regions, or for all database engines.\n For the full list of DB instance classes,\n and availability for your engine, see\n DB Instance Class in the Amazon RDS User Guide.\n
Default: The same DBInstanceClass as the original DB instance.
" + "smithy.api#documentation": "The compute and memory capacity of the Amazon RDS DB instance, for example\n db.m4.large. Not all DB instance classes are available in all Amazon Web Services\n Regions, or for all database engines. For the full list of DB instance classes, and\n availability for your engine, see DB Instance\n Class in the Amazon RDS User Guide.\n
\nDefault: The same DBInstanceClass as the original DB instance.
" } }, "Port": { @@ -18705,7 +19021,7 @@ "PubliclyAccessible": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether the DB instance is publicly accessible.
\nWhen the DB instance is publicly accessible, its DNS endpoint resolves to the private IP address from within the DB instance's VPC, \n and to the public IP address from outside of the DB instance's VPC. Access to the DB instance is ultimately controlled by the security group it uses, \n and that public access is not permitted if the security group assigned to the DB instance doesn't permit it.
\nWhen the DB instance isn't publicly accessible, it is an internal DB instance with a DNS name that resolves to a private IP address.
\nFor more information, see CreateDBInstance.
" + "smithy.api#documentation": "A value that indicates whether the DB instance is publicly accessible.
\nWhen the DB cluster is publicly accessible, its Domain Name System (DNS) endpoint\n resolves to the private IP address from within the DB cluster's virtual private cloud\n (VPC). It resolves to the public IP address from outside of the DB cluster's VPC. Access\n to the DB cluster is ultimately controlled by the security group it uses. That public\n access isn't permitted if the security group assigned to the DB cluster doesn't permit\n it.
\nWhen the DB instance isn't publicly accessible, it is an internal DB instance with a DNS name that resolves to a private IP address.
\nFor more information, see CreateDBInstance.
" } }, "AutoMinorVersionUpgrade": { @@ -18792,7 +19108,7 @@ "EnableIAMDatabaseAuthentication": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether to enable mapping of Amazon Web Services Identity and Access\n Management (IAM) accounts to database accounts. By default, mapping is disabled.
\n \nThis setting doesn't apply to RDS Custom.
\n \nFor more information about IAM database authentication, see \n \n IAM Database Authentication for MySQL and PostgreSQL in the Amazon RDS User Guide.\n
" + "smithy.api#documentation": "A value that indicates whether to enable mapping of Amazon Web Services Identity and Access Management\n (IAM) accounts to database accounts. By default, mapping isn't enabled.
\n \nThis setting doesn't apply to RDS Custom.
\n \nFor more information about IAM database authentication, see \n \n IAM Database Authentication for MySQL and PostgreSQL in the Amazon RDS User Guide.\n
" } }, "EnableCloudwatchLogsExports": { @@ -18822,7 +19138,7 @@ "DeletionProtection": { "target": "com.amazonaws.rds#BooleanOptional", "traits": { - "smithy.api#documentation": "A value that indicates whether the DB instance has deletion protection enabled. \n The database can't be deleted when deletion protection is enabled. By default, \n deletion protection is disabled. For more information, see \n \n Deleting a DB Instance.\n
" + "smithy.api#documentation": "A value that indicates whether the DB instance has deletion protection enabled. \n The database can't be deleted when deletion protection is enabled. By default, \n deletion protection isn't enabled. For more information, see \n \n Deleting a DB Instance.\n
" } }, "SourceDbiResourceId": { @@ -18854,6 +19170,12 @@ "traits": { "smithy.api#documentation": "The instance profile associated with the underlying Amazon EC2 instance of an \n RDS Custom DB instance. The instance profile must meet the following requirements:
\nThe profile must exist in your account.
\nThe profile must have an IAM role that Amazon EC2 has permissions to assume.
\nThe instance profile name and the associated IAM role name must start with the prefix AWSRDSCustom
.
For the list of permissions required for the IAM role, see \n \n Configure IAM and your VPC in the Amazon Relational Database Service\n User Guide.
\nThis setting is required for RDS Custom.
" } + }, + "BackupTarget": { + "target": "com.amazonaws.rds#String", + "traits": { + "smithy.api#documentation": "Specifies where automated backups and manual snapshots are stored for the restored DB instance.
\nPossible values are outposts
(Amazon Web Services Outposts) and region
(Amazon Web Services Region). The default is region
.
For more information, see Working \n with Amazon RDS on Amazon Web Services Outposts in the Amazon RDS User Guide.
" + } } }, "traits": { diff --git a/codegen/sdk-codegen/aws-models/redshift.2012-12-01.json b/codegen/sdk-codegen/aws-models/redshift.2012-12-01.json index f8faa5bc6bc..55fe8c09cac 100644 --- a/codegen/sdk-codegen/aws-models/redshift.2012-12-01.json +++ b/codegen/sdk-codegen/aws-models/redshift.2012-12-01.json @@ -1322,6 +1322,12 @@ "traits": { "smithy.api#documentation": "The Amazon Resource Name (ARN) for the IAM role set as default for the cluster.
" } + }, + "ReservedNodeExchangeStatus": { + "target": "com.amazonaws.redshift#ReservedNodeExchangeStatus", + "traits": { + "smithy.api#documentation": "The status of the reserved-node exchange request. Statuses include in-progress and requested.
" + } } }, "traits": { @@ -5380,7 +5386,13 @@ } ], "traits": { - "smithy.api#documentation": "Shows the status of any inbound or outbound datashares available in the specified\n account.
" + "smithy.api#documentation": "Shows the status of any inbound or outbound datashares available in the specified\n account.
", + "smithy.api#paginated": { + "inputToken": "Marker", + "outputToken": "Marker", + "items": "DataShares", + "pageSize": "MaxRecords" + } } }, "com.amazonaws.redshift#DescribeDataSharesForConsumer": { @@ -5397,7 +5409,13 @@ } ], "traits": { - "smithy.api#documentation": "Returns a list of datashares where the account identifier being called is a consumer account identifier.
" + "smithy.api#documentation": "Returns a list of datashares where the account identifier being called is a consumer account identifier.
", + "smithy.api#paginated": { + "inputToken": "Marker", + "outputToken": "Marker", + "items": "DataShares", + "pageSize": "MaxRecords" + } } }, "com.amazonaws.redshift#DescribeDataSharesForConsumerMessage": { @@ -5460,7 +5478,13 @@ } ], "traits": { - "smithy.api#documentation": "Returns a list of datashares when the account identifier being called is a producer account identifier.
" + "smithy.api#documentation": "Returns a list of datashares when the account identifier being called is a producer account identifier.
", + "smithy.api#paginated": { + "inputToken": "Marker", + "outputToken": "Marker", + "items": "DataShares", + "pageSize": "MaxRecords" + } } }, "com.amazonaws.redshift#DescribeDataSharesForProducerMessage": { @@ -6244,6 +6268,81 @@ } } }, + "com.amazonaws.redshift#DescribeReservedNodeExchangeStatus": { + "type": "operation", + "input": { + "target": "com.amazonaws.redshift#DescribeReservedNodeExchangeStatusInputMessage" + }, + "output": { + "target": "com.amazonaws.redshift#DescribeReservedNodeExchangeStatusOutputMessage" + }, + "errors": [ + { + "target": "com.amazonaws.redshift#ReservedNodeExchangeNotFoundFault" + }, + { + "target": "com.amazonaws.redshift#ReservedNodeNotFoundFault" + }, + { + "target": "com.amazonaws.redshift#UnsupportedOperationFault" + } + ], + "traits": { + "smithy.api#documentation": "Returns exchange status details and associated metadata for a reserved-node\n exchange. Statuses include such values as in progress and requested.
", + "smithy.api#paginated": { + "inputToken": "Marker", + "outputToken": "Marker", + "items": "ReservedNodeExchangeStatusDetails", + "pageSize": "MaxRecords" + } + } + }, + "com.amazonaws.redshift#DescribeReservedNodeExchangeStatusInputMessage": { + "type": "structure", + "members": { + "ReservedNodeId": { + "target": "com.amazonaws.redshift#String", + "traits": { + "smithy.api#documentation": "The identifier of the source reserved node in a reserved-node exchange request.
" + } + }, + "ReservedNodeExchangeRequestId": { + "target": "com.amazonaws.redshift#String", + "traits": { + "smithy.api#documentation": "The identifier of the reserved-node exchange request.
" + } + }, + "MaxRecords": { + "target": "com.amazonaws.redshift#IntegerOptional", + "traits": { + "smithy.api#documentation": "The maximum number of response records to return in each call. If the number of\n remaining response records exceeds the specified MaxRecords
value, a value\n is returned in a Marker
field of the response. You can retrieve the next\n set of records by retrying the command with the returned marker value.
An optional pagination token provided by a previous DescribeReservedNodeExchangeStatus
request. If this \n parameter is specified, the response includes only records beyond the marker, up to the value \n specified by the MaxRecords
parameter. You can retrieve the next set of response\n records by providing the returned marker value in the Marker
parameter and\n retrying the request.
The details of the reserved-node exchange request, including the status, request\n time, source reserved-node identifier, and additional details.
" + } + }, + "Marker": { + "target": "com.amazonaws.redshift#String", + "traits": { + "smithy.api#documentation": "A pagination token provided by a previous DescribeReservedNodeExchangeStatus
request.
The request parameters to get cluster credentials.
" } }, + "com.amazonaws.redshift#GetReservedNodeExchangeConfigurationOptions": { + "type": "operation", + "input": { + "target": "com.amazonaws.redshift#GetReservedNodeExchangeConfigurationOptionsInputMessage" + }, + "output": { + "target": "com.amazonaws.redshift#GetReservedNodeExchangeConfigurationOptionsOutputMessage" + }, + "errors": [ + { + "target": "com.amazonaws.redshift#ClusterNotFoundFault" + }, + { + "target": "com.amazonaws.redshift#ClusterSnapshotNotFoundFault" + }, + { + "target": "com.amazonaws.redshift#DependentServiceUnavailableFault" + }, + { + "target": "com.amazonaws.redshift#InvalidReservedNodeStateFault" + }, + { + "target": "com.amazonaws.redshift#ReservedNodeAlreadyMigratedFault" + }, + { + "target": "com.amazonaws.redshift#ReservedNodeNotFoundFault" + }, + { + "target": "com.amazonaws.redshift#ReservedNodeOfferingNotFoundFault" + }, + { + "target": "com.amazonaws.redshift#UnsupportedOperationFault" + } + ], + "traits": { + "smithy.api#documentation": "Gets the configuration options for the reserved-node exchange. These options\n include information about the source reserved node and target reserved node offering.\n Details include the node type, the price, the node count, and the offering type.
", + "smithy.api#paginated": { + "inputToken": "Marker", + "outputToken": "Marker", + "items": "ReservedNodeConfigurationOptionList", + "pageSize": "MaxRecords" + } + } + }, + "com.amazonaws.redshift#GetReservedNodeExchangeConfigurationOptionsInputMessage": { + "type": "structure", + "members": { + "ActionType": { + "target": "com.amazonaws.redshift#ReservedNodeExchangeActionType", + "traits": { + "smithy.api#documentation": "The action type of the reserved-node configuration. The action type can be an exchange initiated from either a snapshot or a resize.
", + "smithy.api#required": {} + } + }, + "ClusterIdentifier": { + "target": "com.amazonaws.redshift#String", + "traits": { + "smithy.api#documentation": "The identifier for the cluster that is the source for a reserved-node exchange.
" + } + }, + "SnapshotIdentifier": { + "target": "com.amazonaws.redshift#String", + "traits": { + "smithy.api#documentation": "The identifier for the snapshot that is the source for the reserved-node exchange.
" + } + }, + "MaxRecords": { + "target": "com.amazonaws.redshift#IntegerOptional", + "traits": { + "smithy.api#documentation": "The maximum number of response records to return in each call. If the number of\n remaining response records exceeds the specified MaxRecords
value, a value\n is returned in a Marker
field of the response. You can retrieve the next\n set of records by retrying the command with the returned marker value.
An optional pagination token provided by a previous GetReservedNodeExchangeConfigurationOptions
request. If this \n parameter is specified, the response includes only records beyond the marker, up to the value \n specified by the MaxRecords
parameter. You can retrieve the next set of response\n records by providing the returned marker value in the Marker
parameter and\n retrying the request.
A pagination token provided by a previous GetReservedNodeExchangeConfigurationOptions
request.
the configuration options for the reserved-node\n exchange. These options include information about the source reserved node and target reserved\n node. Details include the node type, the price, the node count, and the offering\n type.
" + } + } + } + }, "com.amazonaws.redshift#GetReservedNodeExchangeOfferings": { "type": "operation", "input": { @@ -11129,6 +11325,9 @@ { "target": "com.amazonaws.redshift#DescribePartners" }, + { + "target": "com.amazonaws.redshift#DescribeReservedNodeExchangeStatus" + }, { "target": "com.amazonaws.redshift#DescribeReservedNodeOfferings" }, @@ -11177,6 +11376,9 @@ { "target": "com.amazonaws.redshift#GetClusterCredentials" }, + { + "target": "com.amazonaws.redshift#GetReservedNodeExchangeConfigurationOptions" + }, { "target": "com.amazonaws.redshift#GetReservedNodeExchangeOfferings" }, @@ -11421,6 +11623,169 @@ "smithy.api#httpError": 400 } }, + "com.amazonaws.redshift#ReservedNodeConfigurationOption": { + "type": "structure", + "members": { + "SourceReservedNode": { + "target": "com.amazonaws.redshift#ReservedNode" + }, + "TargetReservedNodeCount": { + "target": "com.amazonaws.redshift#Integer", + "traits": { + "smithy.api#documentation": "The target reserved-node count.
" + } + }, + "TargetReservedNodeOffering": { + "target": "com.amazonaws.redshift#ReservedNodeOffering" + } + }, + "traits": { + "smithy.api#documentation": "Details for a reserved-node exchange. Examples include the node type for a\n reserved node, the price for a node, the node's state, and other details.
" + } + }, + "com.amazonaws.redshift#ReservedNodeConfigurationOptionList": { + "type": "list", + "member": { + "target": "com.amazonaws.redshift#ReservedNodeConfigurationOption", + "traits": { + "smithy.api#xmlName": "ReservedNodeConfigurationOption" + } + } + }, + "com.amazonaws.redshift#ReservedNodeExchangeActionType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "restore-cluster", + "name": "RESTORE_CLUSTER" + }, + { + "value": "resize-cluster", + "name": "RESIZE_CLUSTER" + } + ] + } + }, + "com.amazonaws.redshift#ReservedNodeExchangeNotFoundFault": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.redshift#ExceptionMessage" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "ReservedNodeExchangeNotFond", + "httpResponseCode": 404 + }, + "smithy.api#documentation": "The reserved-node exchange status wasn't found.
", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.redshift#ReservedNodeExchangeStatus": { + "type": "structure", + "members": { + "ReservedNodeExchangeRequestId": { + "target": "com.amazonaws.redshift#String", + "traits": { + "smithy.api#documentation": "The identifier of the reserved-node exchange request.
" + } + }, + "Status": { + "target": "com.amazonaws.redshift#ReservedNodeExchangeStatusType", + "traits": { + "smithy.api#documentation": "The status of the reserved-node exchange request. Statuses include in-progress and requested.
" + } + }, + "RequestTime": { + "target": "com.amazonaws.redshift#TStamp", + "traits": { + "smithy.api#documentation": "A date and time that indicate when the reserved-node exchange was requested.
" + } + }, + "SourceReservedNodeId": { + "target": "com.amazonaws.redshift#String", + "traits": { + "smithy.api#documentation": "The identifier of the source reserved node.
" + } + }, + "SourceReservedNodeType": { + "target": "com.amazonaws.redshift#String", + "traits": { + "smithy.api#documentation": "The source reserved-node type, for example ds2.xlarge.
" + } + }, + "SourceReservedNodeCount": { + "target": "com.amazonaws.redshift#Integer", + "traits": { + "smithy.api#documentation": "The source reserved-node count in the cluster.
" + } + }, + "TargetReservedNodeOfferingId": { + "target": "com.amazonaws.redshift#String", + "traits": { + "smithy.api#documentation": "The identifier of the target reserved node offering.
" + } + }, + "TargetReservedNodeType": { + "target": "com.amazonaws.redshift#String", + "traits": { + "smithy.api#documentation": "The node type of the target reserved node, for example ra3.4xlarge.
" + } + }, + "TargetReservedNodeCount": { + "target": "com.amazonaws.redshift#Integer", + "traits": { + "smithy.api#documentation": "The count of target reserved nodes in the cluster.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Reserved-node status details, such as the source reserved-node\n identifier, the target reserved-node identifier, the node type, the node count, and\n other details.
" + } + }, + "com.amazonaws.redshift#ReservedNodeExchangeStatusList": { + "type": "list", + "member": { + "target": "com.amazonaws.redshift#ReservedNodeExchangeStatus", + "traits": { + "smithy.api#xmlName": "ReservedNodeExchangeStatus" + } + } + }, + "com.amazonaws.redshift#ReservedNodeExchangeStatusType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "REQUESTED", + "name": "REQUESTED" + }, + { + "value": "PENDING", + "name": "PENDING" + }, + { + "value": "IN_PROGRESS", + "name": "IN_PROGRESS" + }, + { + "value": "RETRYING", + "name": "RETRYING" + }, + { + "value": "SUCCEEDED", + "name": "SUCCEEDED" + }, + { + "value": "FAILED", + "name": "FAILED" + } + ] + } + }, "com.amazonaws.redshift#ReservedNodeList": { "type": "list", "member": { @@ -11666,12 +12031,18 @@ { "target": "com.amazonaws.redshift#ClusterNotFoundFault" }, + { + "target": "com.amazonaws.redshift#DependentServiceUnavailableFault" + }, { "target": "com.amazonaws.redshift#InsufficientClusterCapacityFault" }, { "target": "com.amazonaws.redshift#InvalidClusterStateFault" }, + { + "target": "com.amazonaws.redshift#InvalidReservedNodeStateFault" + }, { "target": "com.amazonaws.redshift#LimitExceededFault" }, @@ -11681,6 +12052,18 @@ { "target": "com.amazonaws.redshift#NumberOfNodesQuotaExceededFault" }, + { + "target": "com.amazonaws.redshift#ReservedNodeAlreadyExistsFault" + }, + { + "target": "com.amazonaws.redshift#ReservedNodeAlreadyMigratedFault" + }, + { + "target": "com.amazonaws.redshift#ReservedNodeNotFoundFault" + }, + { + "target": "com.amazonaws.redshift#ReservedNodeOfferingNotFoundFault" + }, { "target": "com.amazonaws.redshift#UnauthorizedOperation" }, @@ -11728,6 +12111,18 @@ "traits": { "smithy.api#documentation": "A boolean value indicating whether the resize operation is using the classic resize\n process. If you don't provide this parameter or set the value to\n false
, the resize type is elastic.
The identifier of the reserved node.
" + } + }, + "TargetReservedNodeOfferingId": { + "target": "com.amazonaws.redshift#String", + "traits": { + "smithy.api#documentation": "The identifier of the target reserved node offering.
" + } } }, "traits": { @@ -11942,6 +12337,9 @@ { "target": "com.amazonaws.redshift#DependentServiceRequestThrottlingFault" }, + { + "target": "com.amazonaws.redshift#DependentServiceUnavailableFault" + }, { "target": "com.amazonaws.redshift#HsmClientCertificateNotFoundFault" }, @@ -11963,6 +12361,9 @@ { "target": "com.amazonaws.redshift#InvalidElasticIpFault" }, + { + "target": "com.amazonaws.redshift#InvalidReservedNodeStateFault" + }, { "target": "com.amazonaws.redshift#InvalidRestoreFault" }, @@ -11984,6 +12385,18 @@ { "target": "com.amazonaws.redshift#NumberOfNodesQuotaExceededFault" }, + { + "target": "com.amazonaws.redshift#ReservedNodeAlreadyExistsFault" + }, + { + "target": "com.amazonaws.redshift#ReservedNodeAlreadyMigratedFault" + }, + { + "target": "com.amazonaws.redshift#ReservedNodeNotFoundFault" + }, + { + "target": "com.amazonaws.redshift#ReservedNodeOfferingNotFoundFault" + }, { "target": "com.amazonaws.redshift#SnapshotScheduleNotFoundFault" }, @@ -11992,6 +12405,9 @@ }, { "target": "com.amazonaws.redshift#UnauthorizedOperation" + }, + { + "target": "com.amazonaws.redshift#UnsupportedOperationFault" } ], "traits": { @@ -12176,6 +12592,18 @@ "traits": { "smithy.api#documentation": "The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was last modified while it was restored from a snapshot.
" } + }, + "ReservedNodeId": { + "target": "com.amazonaws.redshift#String", + "traits": { + "smithy.api#documentation": "The identifier of the target reserved node offering.
" + } + }, + "TargetReservedNodeOfferingId": { + "target": "com.amazonaws.redshift#String", + "traits": { + "smithy.api#documentation": "The identifier of the target reserved node offering.
" + } } }, "traits": { diff --git a/codegen/sdk-codegen/aws-models/rum.2018-05-10.json b/codegen/sdk-codegen/aws-models/rum.2018-05-10.json new file mode 100644 index 00000000000..fa772c360eb --- /dev/null +++ b/codegen/sdk-codegen/aws-models/rum.2018-05-10.json @@ -0,0 +1,1536 @@ +{ + "smithy": "1.0", + "shapes": { + "com.amazonaws.rum#AccessDeniedException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "You don't have sufficient permissions to perform this action.
", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.rum#AppMonitor": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.rum#AppMonitorName", + "traits": { + "smithy.api#documentation": "The name of the app monitor.
" + } + }, + "Domain": { + "target": "com.amazonaws.rum#AppMonitorDomain", + "traits": { + "smithy.api#documentation": "The top-level internet domain name for which your application has administrative authority.
" + } + }, + "Id": { + "target": "com.amazonaws.rum#AppMonitorId", + "traits": { + "smithy.api#documentation": "The unique ID of this app monitor.
" + } + }, + "Created": { + "target": "com.amazonaws.rum#ISOTimestampString", + "traits": { + "smithy.api#documentation": "The date and time that this app monitor was created.
" + } + }, + "LastModified": { + "target": "com.amazonaws.rum#ISOTimestampString", + "traits": { + "smithy.api#documentation": "The date and time of the most recent changes to this app monitor's configuration.
" + } + }, + "Tags": { + "target": "com.amazonaws.rum#TagMap", + "traits": { + "smithy.api#documentation": "The list of tag keys and values associated with this app monitor.
" + } + }, + "State": { + "target": "com.amazonaws.rum#StateEnum", + "traits": { + "smithy.api#documentation": "The current state of the app monitor.
" + } + }, + "AppMonitorConfiguration": { + "target": "com.amazonaws.rum#AppMonitorConfiguration", + "traits": { + "smithy.api#documentation": "A structure that contains much of the configuration data for the app monitor.
" + } + }, + "DataStorage": { + "target": "com.amazonaws.rum#DataStorage", + "traits": { + "smithy.api#documentation": "A structure that contains information about whether this app monitor stores a copy of\n the telemetry data that RUM collects using CloudWatch Logs.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A RUM app monitor collects telemetry data from your application and sends that\n data to RUM. The data includes performance and reliability information such as page load time, client-side errors, \n and user behavior.
" + } + }, + "com.amazonaws.rum#AppMonitorConfiguration": { + "type": "structure", + "members": { + "IdentityPoolId": { + "target": "com.amazonaws.rum#IdentityPoolId", + "traits": { + "smithy.api#documentation": "The ID of the Amazon Cognito identity pool \n that is used to authorize the sending of data to RUM.
" + } + }, + "ExcludedPages": { + "target": "com.amazonaws.rum#Pages", + "traits": { + "smithy.api#documentation": "A list of URLs in your website or application to exclude from RUM data collection.
\nYou can't include both ExcludedPages
and IncludedPages
in the same operation.
If this app monitor is to collect data from only certain pages in your application, this structure lists those pages.
\n \nYou can't include both ExcludedPages
and IncludedPages
in the same operation.
A list of pages in the CloudWatch RUM console that are to be displayed with a \"favorite\" icon.
" + } + }, + "SessionSampleRate": { + "target": "com.amazonaws.rum#SessionSampleRate", + "traits": { + "smithy.api#documentation": "Specifies the percentage of user sessions to use for RUM data collection. Choosing a higher percentage gives you\n more data but also incurs more costs.
\nThe number you specify is the percentage of user sessions that will be used.
\nIf you omit this parameter, the default of 10 is used.
" + } + }, + "GuestRoleArn": { + "target": "com.amazonaws.rum#Arn", + "traits": { + "smithy.api#documentation": "The ARN of the guest IAM role that is attached to the Amazon Cognito identity pool \n that is used to authorize the sending of data to RUM.
" + } + }, + "AllowCookies": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If you set this to true
, the RUM web client sets two cookies, a session\n cookie and a user cookie. The cookies allow the RUM web client to collect data relating to\n the number of users an application has and the behavior of the application across a\n sequence of events. Cookies are stored in the top-level domain of the current page.
An array that lists the types of telemetry data that this app monitor is to collect.
\n\n errors
indicates that RUM collects data about unhandled JavaScript errors raised\n by your application.
\n performance
indicates that RUM collects performance data about how your application\n and its resources are loaded and rendered. This includes Core Web Vitals.
\n http
indicates that RUM collects data about HTTP errors thrown by your application.
If you set this to true
, RUM enables X-Ray tracing for\n the user sessions that RUM samples. RUM adds an X-Ray trace header to allowed\n HTTP requests. It also records an X-Ray segment for allowed HTTP requests.\n You can see traces and segments from these user sessions in the X-Ray console\n and the CloudWatch ServiceLens console. For more information, see What is X-Ray?\n
This structure contains much of the configuration data for the app monitor.
" + } + }, + "com.amazonaws.rum#AppMonitorDetails": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the app monitor.
" + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique ID of the app monitor.
" + } + }, + "version": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The version of the app monitor.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A structure that contains information about the RUM app monitor.
" + } + }, + "com.amazonaws.rum#AppMonitorDomain": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 253 + }, + "smithy.api#pattern": "^(localhost)|^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$|^(?![-.])([A-Za-z0-9-\\.\\-]{0,63})((?![-])([a-zA-Z0-9]{1}|^[a-zA-Z0-9]{0,1}))\\.(?![-])[A-Za-z-0-9]{1,63}((?![-])([a-zA-Z0-9]{1}|^[a-zA-Z0-9]{0,1}))|^(\\*\\.)(?![-.])([A-Za-z0-9-\\.\\-]{0,63})((?![-])([a-zA-Z0-9]{1}|^[a-zA-Z0-9]{0,1}))\\.(?![-])[A-Za-z-0-9]{1,63}((?![-])([a-zA-Z0-9]{1}|^[a-zA-Z0-9]{0,1}))" + } + }, + "com.amazonaws.rum#AppMonitorId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 36, + "max": 36 + }, + "smithy.api#pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" + } + }, + "com.amazonaws.rum#AppMonitorName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^(?!\\.)[\\.\\-_#A-Za-z0-9]+$" + } + }, + "com.amazonaws.rum#AppMonitorResource": { + "type": "resource", + "identifiers": { + "Name": { + "target": "com.amazonaws.rum#AppMonitorName" + } + }, + "read": { + "target": "com.amazonaws.rum#GetAppMonitor" + }, + "update": { + "target": "com.amazonaws.rum#UpdateAppMonitor" + }, + "delete": { + "target": "com.amazonaws.rum#DeleteAppMonitor" + }, + "list": { + "target": "com.amazonaws.rum#ListAppMonitors" + }, + "operations": [ + { + "target": "com.amazonaws.rum#CreateAppMonitor" + }, + { + "target": "com.amazonaws.rum#GetAppMonitorData" + } + ], + "traits": { + "aws.api#arn": { + "template": "appmonitor/{Name}", + "absolute": false, + "noAccount": false, + "noRegion": false + } + } + }, + "com.amazonaws.rum#AppMonitorSummary": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.rum#AppMonitorName", + "traits": { + "smithy.api#documentation": "The name of this app monitor.
" + } + }, + "Id": { + "target": "com.amazonaws.rum#AppMonitorId", + "traits": { + "smithy.api#documentation": "The unique ID of this app monitor.
" + } + }, + "Created": { + "target": "com.amazonaws.rum#ISOTimestampString", + "traits": { + "smithy.api#documentation": "The date and time that the app monitor was created.
" + } + }, + "LastModified": { + "target": "com.amazonaws.rum#ISOTimestampString", + "traits": { + "smithy.api#documentation": "The date and time of the most recent changes to this app monitor's configuration.
" + } + }, + "State": { + "target": "com.amazonaws.rum#StateEnum", + "traits": { + "smithy.api#documentation": "The current state of this app monitor.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A structure that includes some data about app monitors and their settings.
" + } + }, + "com.amazonaws.rum#AppMonitorSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.rum#AppMonitorSummary" + } + }, + "com.amazonaws.rum#Arn": { + "type": "string", + "traits": { + "smithy.api#pattern": "arn:[^:]*:[^:]*:[^:]*:[^:]*:.*" + } + }, + "com.amazonaws.rum#ConflictException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "resourceName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the resource that is associated with the error.
", + "smithy.api#required": {} + } + }, + "resourceType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The type of the resource that is associated with the error.
" + } + } + }, + "traits": { + "smithy.api#documentation": "This operation attempted to create a resource that already exists.
", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.rum#CreateAppMonitor": { + "type": "operation", + "input": { + "target": "com.amazonaws.rum#CreateAppMonitorRequest" + }, + "output": { + "target": "com.amazonaws.rum#CreateAppMonitorResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rum#AccessDeniedException" + }, + { + "target": "com.amazonaws.rum#ConflictException" + }, + { + "target": "com.amazonaws.rum#InternalServerException" + }, + { + "target": "com.amazonaws.rum#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.rum#ThrottlingException" + }, + { + "target": "com.amazonaws.rum#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Creates a Amazon CloudWatch RUM app monitor, which collects telemetry data from your application and sends that\n data to RUM. The data includes performance and reliability information such as page load time, client-side errors, \n and user behavior.
\nYou use this operation only to create a new app monitor. To update an existing app monitor, use UpdateAppMonitor instead.
\nAfter you create an app monitor, sign in to the CloudWatch RUM console to get \n the JavaScript code snippet to add to your web application. For more information, see\n How do I find a code snippet\n that I've already generated?\n
", + "smithy.api#externalDocumentation": { + "API Reference": "https://docs.aws.amazon.com/rum/latest/developerguide/CreateAppMonitor.html" + }, + "smithy.api#http": { + "method": "POST", + "uri": "/appmonitor", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.rum#CreateAppMonitorRequest": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.rum#AppMonitorName", + "traits": { + "smithy.api#documentation": "A name for the app monitor.
", + "smithy.api#required": {} + } + }, + "Domain": { + "target": "com.amazonaws.rum#AppMonitorDomain", + "traits": { + "smithy.api#documentation": "The top-level internet domain name for which your application has administrative authority.
", + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.rum#TagMap", + "traits": { + "smithy.api#documentation": "Assigns one or more tags (key-value pairs) to the app monitor.
\nTags can help you organize and categorize your resources. You can also use them to scope user\n permissions by granting a user\n permission to access or change only resources with certain tag values.
\nTags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.
\n \nYou can associate as many as 50 tags with an app monitor.
\nFor more information, see Tagging Amazon Web Services resources.
" + } + }, + "AppMonitorConfiguration": { + "target": "com.amazonaws.rum#AppMonitorConfiguration", + "traits": { + "smithy.api#documentation": "A structure that contains much of the configuration data for the app monitor. If you are using \n Amazon Cognito for authorization, you must include this structure in your request, and it must include the ID of the \n Amazon Cognito identity pool to use for authorization. If you don't include AppMonitorConfiguration
, you must set up your own \n authorization method. For more information, see \n Authorize your application\n to send data to Amazon Web Services.
If you omit this argument, the sample rate used for RUM is set to 10% of the user sessions.
" + } + }, + "CwLogEnabled": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Data collected by RUM is kept by RUM for 30 days and then deleted. This parameter specifies whether RUM \n sends a copy of this telemetry data to Amazon CloudWatch Logs\n in your account. This enables you to keep the telemetry data for more than 30 days, but it does incur\n Amazon CloudWatch Logs charges.
\nIf you omit this parameter, the default is false
.
The unique ID of the new app monitor.
" + } + } + } + }, + "com.amazonaws.rum#CwLog": { + "type": "structure", + "members": { + "CwLogEnabled": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Indicated whether the app monitor stores copies of the data\n that RUM collects in CloudWatch Logs.
" + } + }, + "CwLogGroup": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the log group where the copies are stored.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A structure that contains the information about whether the app monitor stores copies of the data\n that RUM collects in CloudWatch Logs. If it does, this structure also contains the name of the log group.
" + } + }, + "com.amazonaws.rum#DataStorage": { + "type": "structure", + "members": { + "CwLog": { + "target": "com.amazonaws.rum#CwLog", + "traits": { + "smithy.api#documentation": "A structure that contains the information about whether the app monitor stores copies of the data\n that RUM collects in CloudWatch Logs. If it does, this structure also contains the name of the log group.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A structure that contains information about whether this app monitor stores a copy of\n the telemetry data that RUM collects using CloudWatch Logs.
" + } + }, + "com.amazonaws.rum#DeleteAppMonitor": { + "type": "operation", + "input": { + "target": "com.amazonaws.rum#DeleteAppMonitorRequest" + }, + "output": { + "target": "com.amazonaws.rum#DeleteAppMonitorResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rum#AccessDeniedException" + }, + { + "target": "com.amazonaws.rum#ConflictException" + }, + { + "target": "com.amazonaws.rum#InternalServerException" + }, + { + "target": "com.amazonaws.rum#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.rum#ThrottlingException" + }, + { + "target": "com.amazonaws.rum#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes an existing app monitor. This immediately stops the collection of data.
", + "smithy.api#http": { + "method": "DELETE", + "uri": "/appmonitor/{Name}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.rum#DeleteAppMonitorRequest": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.rum#AppMonitorName", + "traits": { + "smithy.api#documentation": "The name of the app monitor to delete.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.rum#DeleteAppMonitorResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.rum#EventData": { + "type": "string" + }, + "com.amazonaws.rum#EventDataList": { + "type": "list", + "member": { + "target": "com.amazonaws.rum#EventData" + } + }, + "com.amazonaws.rum#FavoritePages": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "com.amazonaws.rum#GetAppMonitor": { + "type": "operation", + "input": { + "target": "com.amazonaws.rum#GetAppMonitorRequest" + }, + "output": { + "target": "com.amazonaws.rum#GetAppMonitorResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rum#AccessDeniedException" + }, + { + "target": "com.amazonaws.rum#InternalServerException" + }, + { + "target": "com.amazonaws.rum#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.rum#ThrottlingException" + }, + { + "target": "com.amazonaws.rum#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Retrieves the complete configuration information for one app monitor.
", + "smithy.api#http": { + "method": "GET", + "uri": "/appmonitor/{Name}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.rum#GetAppMonitorData": { + "type": "operation", + "input": { + "target": "com.amazonaws.rum#GetAppMonitorDataRequest" + }, + "output": { + "target": "com.amazonaws.rum#GetAppMonitorDataResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rum#AccessDeniedException" + }, + { + "target": "com.amazonaws.rum#InternalServerException" + }, + { + "target": "com.amazonaws.rum#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.rum#ThrottlingException" + }, + { + "target": "com.amazonaws.rum#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Retrieves the raw performance events that RUM has collected from your web application,\n so that you can do your own processing or analysis of this data.
", + "smithy.api#http": { + "method": "POST", + "uri": "/appmonitor/{Name}/data", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "Events", + "pageSize": "MaxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.rum#GetAppMonitorDataRequest": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.rum#AppMonitorName", + "traits": { + "smithy.api#documentation": "The name of the app monitor that collected the data that you want to retrieve.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "TimeRange": { + "target": "com.amazonaws.rum#TimeRange", + "traits": { + "smithy.api#documentation": "A structure that defines the time range that you want to retrieve results from.
", + "smithy.api#required": {} + } + }, + "Filters": { + "target": "com.amazonaws.rum#QueryFilters", + "traits": { + "smithy.api#documentation": "An array of structures that you can use to filter the results to those that match one or\n more sets of key-value pairs that you specify.
" + } + }, + "MaxResults": { + "target": "com.amazonaws.rum#MaxQueryResults", + "traits": { + "smithy.api#documentation": "The maximum number of results to return in one operation.
" + } + }, + "NextToken": { + "target": "com.amazonaws.rum#Token", + "traits": { + "smithy.api#documentation": "Use the token returned by the previous operation to request the next page of results.
" + } + } + } + }, + "com.amazonaws.rum#GetAppMonitorDataResponse": { + "type": "structure", + "members": { + "Events": { + "target": "com.amazonaws.rum#EventDataList", + "traits": { + "smithy.api#documentation": "The events that RUM collected that match your request.
" + } + }, + "NextToken": { + "target": "com.amazonaws.rum#Token", + "traits": { + "smithy.api#documentation": "A token that you can use in a subsequent operation to retrieve the next set of\n results.
" + } + } + } + }, + "com.amazonaws.rum#GetAppMonitorRequest": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.rum#AppMonitorName", + "traits": { + "smithy.api#documentation": "The app monitor to retrieve information for.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.rum#GetAppMonitorResponse": { + "type": "structure", + "members": { + "AppMonitor": { + "target": "com.amazonaws.rum#AppMonitor", + "traits": { + "smithy.api#documentation": "A structure containing all the configuration information for the app monitor.
" + } + } + } + }, + "com.amazonaws.rum#ISOTimestampString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 19, + "max": 19 + }, + "smithy.api#pattern": "/d{4}-[01]/d-[0-3]/dT[0-2]/d:[0-5]/d:[0-5]/d/./d+([+-][0-2]/d:[0-5]/d|Z)" + } + }, + "com.amazonaws.rum#IdentityPoolId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 55 + }, + "smithy.api#pattern": "[\\w-]+:[0-9a-f-]+" + } + }, + "com.amazonaws.rum#InternalServerException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "retryAfterSeconds": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The value of a parameter in the request caused an error.
", + "smithy.api#httpHeader": "Retry-After" + } + } + }, + "traits": { + "smithy.api#documentation": "Internal service exception.
", + "smithy.api#error": "server", + "smithy.api#httpError": 500, + "smithy.api#retryable": {} + } + }, + "com.amazonaws.rum#JsonValue": { + "type": "string", + "traits": { + "smithy.api#mediaType": "application/json" + } + }, + "com.amazonaws.rum#ListAppMonitors": { + "type": "operation", + "input": { + "target": "com.amazonaws.rum#ListAppMonitorsRequest" + }, + "output": { + "target": "com.amazonaws.rum#ListAppMonitorsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rum#AccessDeniedException" + }, + { + "target": "com.amazonaws.rum#InternalServerException" + }, + { + "target": "com.amazonaws.rum#ThrottlingException" + }, + { + "target": "com.amazonaws.rum#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Returns a list of the Amazon CloudWatch RUM app monitors in the account.
", + "smithy.api#http": { + "method": "POST", + "uri": "/appmonitors", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "AppMonitorSummaries", + "pageSize": "MaxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.rum#ListAppMonitorsRequest": { + "type": "structure", + "members": { + "MaxResults": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The maximum number of results to return in one operation.
", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Use the token returned by the previous operation to request the next page of results.
", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.rum#ListAppMonitorsResponse": { + "type": "structure", + "members": { + "NextToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A token that you can use in a subsequent operation to retrieve the next set of\n results.
" + } + }, + "AppMonitorSummaries": { + "target": "com.amazonaws.rum#AppMonitorSummaryList", + "traits": { + "smithy.api#documentation": "An array of structures that contain information about the returned app monitors.
" + } + } + } + }, + "com.amazonaws.rum#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.rum#ListTagsForResourceRequest" + }, + "output": { + "target": "com.amazonaws.rum#ListTagsForResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rum#InternalServerException" + }, + { + "target": "com.amazonaws.rum#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.rum#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Displays the tags associated with a CloudWatch RUM resource.
", + "smithy.api#http": { + "method": "GET", + "uri": "/tags/{ResourceArn}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.rum#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "ResourceArn": { + "target": "com.amazonaws.rum#Arn", + "traits": { + "smithy.api#documentation": "The ARN of the resource that you want to see the tags of.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.rum#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "ResourceArn": { + "target": "com.amazonaws.rum#Arn", + "traits": { + "smithy.api#documentation": "The ARN of the resource that you are viewing.
", + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.rum#TagMap", + "traits": { + "smithy.api#documentation": "The list of tag keys and values associated with the resource you specified.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.rum#MaxQueryResults": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 0, + "max": 100 + } + } + }, + "com.amazonaws.rum#Pages": { + "type": "list", + "member": { + "target": "com.amazonaws.rum#Url" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "com.amazonaws.rum#PutRumEvents": { + "type": "operation", + "input": { + "target": "com.amazonaws.rum#PutRumEventsRequest" + }, + "output": { + "target": "com.amazonaws.rum#PutRumEventsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rum#AccessDeniedException" + }, + { + "target": "com.amazonaws.rum#InternalServerException" + }, + { + "target": "com.amazonaws.rum#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.rum#ThrottlingException" + }, + { + "target": "com.amazonaws.rum#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Sends telemetry events about your application performance and user behavior to CloudWatch RUM. The code \n snippet that RUM generates for you to add to your application includes PutRumEvents
operations to \n send this data to RUM.
Each PutRumEvents
operation can send a batch of events from one user session.
The ID of the app monitor that is sending this data.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "BatchId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique identifier for this batch of RUM event data.
", + "smithy.api#required": {} + } + }, + "AppMonitorDetails": { + "target": "com.amazonaws.rum#AppMonitorDetails", + "traits": { + "smithy.api#documentation": "A structure that contains information about the app monitor that collected this telemetry information.
", + "smithy.api#required": {} + } + }, + "UserDetails": { + "target": "com.amazonaws.rum#UserDetails", + "traits": { + "smithy.api#documentation": "A structure that contains information about the user session that this batch of events was collected from.
", + "smithy.api#required": {} + } + }, + "RumEvents": { + "target": "com.amazonaws.rum#RumEventList", + "traits": { + "smithy.api#documentation": "An array of structures that contain the telemetry event data.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.rum#PutRumEventsResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.rum#QueryFilter": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.rum#QueryFilterKey", + "traits": { + "smithy.api#documentation": "The name of a key to search for. \n The filter returns only the events that match the Name
\n and Values
that you specify.\n
Valid values for Name
are Browser
| Device
| Country
|\n Page
| OS
| EventType
| Invert
\n
The values of the Name
that are to be be included in the returned results.
A structure that defines a key and values that you can use to filter the results. The\n only performance events that are returned are those that have values matching the ones that\n you specify in one of your QueryFilter
structures.
For example, you could specify Browser
as the Name
\n and specify Chrome,Firefox
as the Values
to return \n events generated only from those browsers.
Specifying Invert
as the Name
\n works as a \"not equal to\" filter. For example, specify Invert
as the Name
\n and specify Chrome
as the value to return all events except events from \n user sessions with the Chrome browser.
With Amazon CloudWatch RUM, you can perform real-user monitoring to collect client-side data about \n your web application performance from actual user sessions in real time. The data collected includes page load \n times, client-side errors, and user behavior. When you view this data, you can see it all aggregated together and \n also see breakdowns by the browsers and devices that your customers use.
\n \nYou can use the collected data to quickly identify and debug client-side performance issues. CloudWatch \n RUM helps you visualize anomalies in your application performance and find relevant debugging data such as error \n messages, stack traces, and user sessions. You can also use RUM to \n understand the range of end-user impact including the number of users, geolocations, and browsers used.
", + "smithy.api#title": "CloudWatch RUM" + }, + "version": "2018-05-10", + "operations": [ + { + "target": "com.amazonaws.rum#ListTagsForResource" + }, + { + "target": "com.amazonaws.rum#PutRumEvents" + }, + { + "target": "com.amazonaws.rum#TagResource" + }, + { + "target": "com.amazonaws.rum#UntagResource" + } + ], + "resources": [ + { + "target": "com.amazonaws.rum#AppMonitorResource" + } + ] + }, + "com.amazonaws.rum#ResourceNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "resourceName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the resource that is associated with the error.
", + "smithy.api#required": {} + } + }, + "resourceType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The type of the resource that is associated with the error.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Resource not found.
", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.rum#RumEvent": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique ID for this event.
", + "smithy.api#required": {} + } + }, + "timestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The exact time that this event occurred.
", + "smithy.api#required": {} + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The JSON schema that denotes the type of event this is, such as a page load or a new session.
", + "smithy.api#required": {} + } + }, + "metadata": { + "target": "com.amazonaws.rum#JsonValue", + "traits": { + "smithy.api#documentation": "Metadata about this event, which contains a JSON serialization of the identity of the user for\n this session. The user information comes from information such as the HTTP user-agent request header\n and document interface.
" + } + }, + "details": { + "target": "com.amazonaws.rum#JsonValue", + "traits": { + "smithy.api#documentation": "A string containing details about the event.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A structure that contains the information for one performance event that RUM collects from a user session with your\n application.
" + } + }, + "com.amazonaws.rum#RumEventList": { + "type": "list", + "member": { + "target": "com.amazonaws.rum#RumEvent" + } + }, + "com.amazonaws.rum#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "This request exceeds a service quota.
", + "smithy.api#error": "client", + "smithy.api#httpError": 402 + } + }, + "com.amazonaws.rum#SessionSampleRate": { + "type": "double", + "traits": { + "smithy.api#range": { + "min": 0, + "max": 1 + } + } + }, + "com.amazonaws.rum#StateEnum": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CREATED", + "name": "CREATED" + }, + { + "value": "DELETING", + "name": "DELETING" + }, + { + "value": "ACTIVE", + "name": "ACTIVE" + } + ] + } + }, + "com.amazonaws.rum#TagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^(?!aws:)[a-zA-Z+-=._:/]+$" + } + }, + "com.amazonaws.rum#TagKeyList": { + "type": "list", + "member": { + "target": "com.amazonaws.rum#TagKey" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "com.amazonaws.rum#TagMap": { + "type": "map", + "key": { + "target": "com.amazonaws.rum#TagKey" + }, + "value": { + "target": "com.amazonaws.rum#TagValue" + } + }, + "com.amazonaws.rum#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.rum#TagResourceRequest" + }, + "output": { + "target": "com.amazonaws.rum#TagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rum#InternalServerException" + }, + { + "target": "com.amazonaws.rum#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.rum#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Assigns one or more tags (key-value pairs) to the specified CloudWatch RUM resource. Currently, \n the only resources that \n can be tagged app monitors.
\nTags can help you organize and categorize your resources. You can also use them to scope user\n permissions by granting a user\n permission to access or change only resources with certain tag values.
\nTags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.
\nYou can use the TagResource
action with a resource that already has tags. \n If you specify a new tag key for the resource, \n this tag is appended to the list of tags associated\n with the alarm. If you specify a tag key that is already associated with the resource, the new tag value that you specify replaces\n the previous value for that tag.
You can associate as many as 50 tags with a resource.
\nFor more information, see Tagging Amazon Web Services resources.
", + "smithy.api#http": { + "method": "POST", + "uri": "/tags/{ResourceArn}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.rum#TagResourceRequest": { + "type": "structure", + "members": { + "ResourceArn": { + "target": "com.amazonaws.rum#Arn", + "traits": { + "smithy.api#documentation": "The ARN of the CloudWatch RUM resource that you're adding tags to.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.rum#TagMap", + "traits": { + "smithy.api#documentation": "The list of key-value pairs to associate with the resource.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.rum#TagResourceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.rum#TagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, + "com.amazonaws.rum#Telemetries": { + "type": "list", + "member": { + "target": "com.amazonaws.rum#Telemetry" + } + }, + "com.amazonaws.rum#Telemetry": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "errors", + "name": "ERRORS", + "documentation": "Includes JS error event plugin" + }, + { + "value": "performance", + "name": "PERFORMANCE", + "documentation": "Includes navigation, paint, resource and web vital event plugins" + }, + { + "value": "http", + "name": "HTTP", + "documentation": "Includes X-Ray Xhr and X-Ray Fetch plugin" + } + ] + } + }, + "com.amazonaws.rum#ThrottlingException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "serviceCode": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ID of the service that is associated with the error.
" + } + }, + "quotaCode": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ID of the service quota that was exceeded.
" + } + }, + "retryAfterSeconds": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The value of a parameter in the request caused an error.
", + "smithy.api#httpHeader": "Retry-After" + } + } + }, + "traits": { + "smithy.api#documentation": "The request was throttled because of quota limits.
", + "smithy.api#error": "client", + "smithy.api#httpError": 429, + "smithy.api#retryable": { + "throttling": true + } + } + }, + "com.amazonaws.rum#TimeRange": { + "type": "structure", + "members": { + "After": { + "target": "com.amazonaws.rum#QueryTimestamp", + "traits": { + "smithy.api#documentation": "The beginning of the time range to retrieve performance events from.
", + "smithy.api#required": {} + } + }, + "Before": { + "target": "com.amazonaws.rum#QueryTimestamp", + "traits": { + "smithy.api#documentation": "The end of the time range to retrieve performance events from. If you omit this, the time \n range extends to the time that this operation is performed.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A structure that defines the time range that you want to retrieve results from.
" + } + }, + "com.amazonaws.rum#Token": { + "type": "string" + }, + "com.amazonaws.rum#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.rum#UntagResourceRequest" + }, + "output": { + "target": "com.amazonaws.rum#UntagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rum#InternalServerException" + }, + { + "target": "com.amazonaws.rum#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.rum#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Removes one or more tags from the specified resource.
", + "smithy.api#http": { + "method": "DELETE", + "uri": "/tags/{ResourceArn}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.rum#UntagResourceRequest": { + "type": "structure", + "members": { + "ResourceArn": { + "target": "com.amazonaws.rum#Arn", + "traits": { + "smithy.api#documentation": "The ARN of the CloudWatch RUM resource that you're removing tags from.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "TagKeys": { + "target": "com.amazonaws.rum#TagKeyList", + "traits": { + "smithy.api#documentation": "The list of tag keys to remove from the resource.
", + "smithy.api#httpQuery": "tagKeys", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.rum#UntagResourceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.rum#UpdateAppMonitor": { + "type": "operation", + "input": { + "target": "com.amazonaws.rum#UpdateAppMonitorRequest" + }, + "output": { + "target": "com.amazonaws.rum#UpdateAppMonitorResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rum#AccessDeniedException" + }, + { + "target": "com.amazonaws.rum#ConflictException" + }, + { + "target": "com.amazonaws.rum#InternalServerException" + }, + { + "target": "com.amazonaws.rum#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.rum#ThrottlingException" + }, + { + "target": "com.amazonaws.rum#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Updates the configuration of an existing app monitor. When you use this operation, only the parts of the app monitor\n configuration that you specify in this operation are changed. For any parameters that you omit, the existing\n values are kept.
\nYou can't use this operation to change the tags of an existing app monitor. To change the tags of an existing app monitor, use\n TagResource.
\nTo create a new app monitor, use CreateAppMonitor.
\nAfter you update an app monitor, sign in to the CloudWatch RUM console to get \n the updated JavaScript code snippet to add to your web application. For more information, see\n How do I find a code snippet\n that I've already generated?\n
", + "smithy.api#http": { + "method": "PATCH", + "uri": "/appmonitor/{Name}", + "code": 200 + } + } + }, + "com.amazonaws.rum#UpdateAppMonitorRequest": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.rum#AppMonitorName", + "traits": { + "smithy.api#documentation": "The name of the app monitor to update.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Domain": { + "target": "com.amazonaws.rum#AppMonitorDomain", + "traits": { + "smithy.api#documentation": "The top-level internet domain name for which your application has administrative authority.
" + } + }, + "AppMonitorConfiguration": { + "target": "com.amazonaws.rum#AppMonitorConfiguration", + "traits": { + "smithy.api#documentation": "A structure that contains much of the configuration data for the app monitor. If you are using \n Amazon Cognito for authorization, you must include this structure in your request, and it must include the ID of the \n Amazon Cognito identity pool to use for authorization. If you don't include AppMonitorConfiguration
, you must set up your own \n authorization method. For more information, see \n Authorize your application\n to send data to Amazon Web Services.
Data collected by RUM is kept by RUM for 30 days and then deleted. This parameter specifies whether RUM \n sends a copy of this telemetry data to Amazon CloudWatch Logs\n in your account. This enables you to keep the telemetry data for more than 30 days, but it does incur\n Amazon CloudWatch Logs charges.
" + } + } + } + }, + "com.amazonaws.rum#UpdateAppMonitorResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.rum#Url": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1260 + }, + "smithy.api#pattern": "https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)" + } + }, + "com.amazonaws.rum#UserDetails": { + "type": "structure", + "members": { + "userId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ID of the user for this user session. This ID is generated by RUM and does not include any \n personally identifiable information about the user.
" + } + }, + "sessionId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The session ID that the performance events are from.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A structure that contains information about the user session that this batch of events was collected from.
" + } + }, + "com.amazonaws.rum#ValidationException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "One of the arguments for the request is not valid.
", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + } + } +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/s3.2006-03-01.json b/codegen/sdk-codegen/aws-models/s3.2006-03-01.json index 32ab20ff528..3847a299b42 100644 --- a/codegen/sdk-codegen/aws-models/s3.2006-03-01.json +++ b/codegen/sdk-codegen/aws-models/s3.2006-03-01.json @@ -215,6 +215,26 @@ }, "com.amazonaws.s3#AmazonS3": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "S3", + "arnNamespace": "s3", + "cloudFormationName": "S3", + "cloudTrailEventSource": "s3.amazonaws.com", + "endpointPrefix": "s3" + }, + "aws.auth#sigv4": { + "name": "s3" + }, + "aws.protocols#restXml": { + "noErrorWrapping": true + }, + "smithy.api#documentation": "", + "smithy.api#title": "Amazon Simple Storage Service", + "smithy.api#xmlNamespace": { + "uri": "http://s3.amazonaws.com/doc/2006-03-01/" + } + }, "version": "2006-03-01", "operations": [ { @@ -493,27 +513,7 @@ { "target": "com.amazonaws.s3#WriteGetObjectResponse" } - ], - "traits": { - "aws.api#service": { - "sdkId": "S3", - "arnNamespace": "s3", - "cloudFormationName": "S3", - "cloudTrailEventSource": "s3.amazonaws.com", - "endpointPrefix": "s3" - }, - "aws.auth#sigv4": { - "name": "s3" - }, - "aws.protocols#restXml": { - "noErrorWrapping": true - }, - "smithy.api#documentation": "", - "smithy.api#title": "Amazon Simple Storage Service", - "smithy.api#xmlNamespace": { - "uri": "http://s3.amazonaws.com/doc/2006-03-01/" - } - } + ] }, "com.amazonaws.s3#AnalyticsAndOperator": { "type": "structure", @@ -1151,7 +1151,7 @@ "target": "com.amazonaws.s3#CompleteMultipartUploadOutput" }, "traits": { - "smithy.api#documentation": "Completes a multipart upload by assembling previously uploaded parts.
\nYou first initiate the multipart upload and then upload all parts using the UploadPart\n operation. After successfully uploading all relevant parts of an upload, you call this\n action to complete the upload. Upon receiving this request, Amazon S3 concatenates all\n the parts in ascending order by part number to create a new object. In the Complete\n Multipart Upload request, you must provide the parts list. You must ensure that the parts\n list is complete. This action concatenates the parts that you provide in the list. For\n each part in the list, you must provide the part number and the ETag
value,\n returned after that part was uploaded.
Processing of a Complete Multipart Upload request could take several minutes to\n complete. After Amazon S3 begins processing the request, it sends an HTTP response header that\n specifies a 200 OK response. While processing is in progress, Amazon S3 periodically sends white\n space characters to keep the connection from timing out. Because a request could fail after\n the initial 200 OK response has been sent, it is important that you check the response body\n to determine whether the request succeeded.
\nNote that if CompleteMultipartUpload
fails, applications should be prepared\n to retry the failed requests. For more information, see Amazon S3 Error Best Practices.
For more information about multipart uploads, see Uploading Objects Using Multipart\n Upload.
\nFor information about permissions required to use the multipart upload API, see Multipart Upload and\n Permissions.
\n\n\n\n CompleteMultipartUpload
has the following special errors:
Error code: EntityTooSmall
\n
Description: Your proposed upload is smaller than the minimum allowed object\n size. Each part must be at least 5 MB in size, except the last part.
\n400 Bad Request
\nError code: InvalidPart
\n
Description: One or more of the specified parts could not be found. The part\n might not have been uploaded, or the specified entity tag might not have\n matched the part's entity tag.
\n400 Bad Request
\nError code: InvalidPartOrder
\n
Description: The list of parts was not in ascending order. The parts list\n must be specified in order by part number.
\n400 Bad Request
\nError code: NoSuchUpload
\n
Description: The specified multipart upload does not exist. The upload ID\n might be invalid, or the multipart upload might have been aborted or\n completed.
\n404 Not Found
\nThe following operations are related to CompleteMultipartUpload
:
\n UploadPart\n
\n\n AbortMultipartUpload\n
\n\n ListParts\n
\n\n ListMultipartUploads\n
\nCompletes a multipart upload by assembling previously uploaded parts.
\nYou first initiate the multipart upload and then upload all parts using the UploadPart\n operation. After successfully uploading all relevant parts of an upload, you call this\n action to complete the upload. Upon receiving this request, Amazon S3 concatenates all\n the parts in ascending order by part number to create a new object. In the Complete\n Multipart Upload request, you must provide the parts list. You must ensure that the parts\n list is complete. This action concatenates the parts that you provide in the list. For\n each part in the list, you must provide the part number and the ETag
value,\n returned after that part was uploaded.
Processing of a Complete Multipart Upload request could take several minutes to\n complete. After Amazon S3 begins processing the request, it sends an HTTP response header that\n specifies a 200 OK response. While processing is in progress, Amazon S3 periodically sends white\n space characters to keep the connection from timing out. Because a request could fail after\n the initial 200 OK response has been sent, it is important that you check the response body\n to determine whether the request succeeded.
\nNote that if CompleteMultipartUpload
fails, applications should be prepared\n to retry the failed requests. For more information, see Amazon S3 Error Best Practices.
You cannot use Content-Type: application/x-www-form-urlencoded
with Complete\n Multipart Upload requests. Also, if you do not provide a Content-Type
header, CompleteMultipartUpload
returns a 200 OK response.
For more information about multipart uploads, see Uploading Objects Using Multipart\n Upload.
\nFor information about permissions required to use the multipart upload API, see Multipart Upload and\n Permissions.
\n\n\n\n CompleteMultipartUpload
has the following special errors:
Error code: EntityTooSmall
\n
Description: Your proposed upload is smaller than the minimum allowed object\n size. Each part must be at least 5 MB in size, except the last part.
\n400 Bad Request
\nError code: InvalidPart
\n
Description: One or more of the specified parts could not be found. The part\n might not have been uploaded, or the specified entity tag might not have\n matched the part's entity tag.
\n400 Bad Request
\nError code: InvalidPartOrder
\n
Description: The list of parts was not in ascending order. The parts list\n must be specified in order by part number.
\n400 Bad Request
\nError code: NoSuchUpload
\n
Description: The specified multipart upload does not exist. The upload ID\n might be invalid, or the multipart upload might have been aborted or\n completed.
\n404 Not Found
\nThe following operations are related to CompleteMultipartUpload
:
\n UploadPart\n
\n\n AbortMultipartUpload\n
\n\n ListParts\n
\n\n ListMultipartUploads\n
\nArray of CompletedPart data types.
", + "smithy.api#documentation": "Array of CompletedPart data types.
\nIf you do not supply a valid Part
with your request, the service sends back an HTTP\n 400 response.
A container for specifying the configuration for Amazon EventBridge.
" + } + }, "com.amazonaws.s3#EventList": { "type": "list", "member": { @@ -4703,7 +4740,7 @@ } ], "traits": { - "smithy.api#documentation": "Retrieves objects from Amazon S3. To use GET
, you must have READ
\n access to the object. If you grant READ
access to the anonymous user, you can\n return the object without using an authorization header.
An Amazon S3 bucket has no directory hierarchy such as you would find in a typical computer\n file system. You can, however, create a logical hierarchy by using object key names that\n imply a folder structure. For example, instead of naming an object sample.jpg
,\n you can name it photos/2006/February/sample.jpg
.
To get an object from such a logical hierarchy, specify the full key name for the object\n in the GET
operation. For a virtual hosted-style request example, if you have\n the object photos/2006/February/sample.jpg
, specify the resource as\n /photos/2006/February/sample.jpg
. For a path-style request example, if you\n have the object photos/2006/February/sample.jpg
in the bucket named\n examplebucket
, specify the resource as\n /examplebucket/photos/2006/February/sample.jpg
. For more information about\n request types, see HTTP Host Header Bucket Specification.
To distribute large files to many people, you can save bandwidth costs by using\n BitTorrent. For more information, see Amazon S3\n Torrent. For more information about returning the ACL of an object, see GetObjectAcl.
\n\nIf the object you are retrieving is stored in the S3 Glacier or\n S3 Glacier Deep Archive storage class, or S3 Intelligent-Tiering Archive or\n S3 Intelligent-Tiering Deep Archive tiers, before you can retrieve the object you must first restore a\n copy using RestoreObject. Otherwise, this action returns an\n InvalidObjectStateError
error. For information about restoring archived\n objects, see Restoring Archived\n Objects.
Encryption request headers, like x-amz-server-side-encryption
, should not\n be sent for GET requests if your object uses server-side encryption with KMS keys (SSE-KMS) \n or server-side encryption with Amazon S3–managed encryption keys (SSE-S3). If your\n object does use these types of keys, you’ll get an HTTP 400 BadRequest error.
If you encrypt an object by using server-side encryption with customer-provided\n encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object,\n you must use the following headers:
\nx-amz-server-side-encryption-customer-algorithm
\nx-amz-server-side-encryption-customer-key
\nx-amz-server-side-encryption-customer-key-MD5
\nFor more information about SSE-C, see Server-Side Encryption (Using\n Customer-Provided Encryption Keys).
\n\nAssuming you have the relevant permission to read object tags, the response also returns the\n x-amz-tagging-count
header that provides the count of number of tags\n associated with the object. You can use GetObjectTagging to retrieve\n the tag set associated with an object.
\n Permissions\n
\nYou need the relevant read object (or version) permission for this operation. For more\n information, see Specifying Permissions\n in a Policy. If the object you request does not exist, the error Amazon S3 returns\n depends on whether you also have the s3:ListBucket
permission.
If you have the s3:ListBucket
permission on the bucket, Amazon S3 will\n return an HTTP status code 404 (\"no such key\") error.
If you don’t have the s3:ListBucket
permission, Amazon S3 will return an\n HTTP status code 403 (\"access denied\") error.
\n Versioning\n
\nBy default, the GET action returns the current version of an object. To return a\n different version, use the versionId
subresource.
You need the s3:GetObjectVersion
permission to access a specific version of an object.\n
If the current version of the object is a delete marker, Amazon S3 behaves as if the\n object was deleted and includes x-amz-delete-marker: true
in the\n response.
For more information about versioning, see PutBucketVersioning.
\n\n\n Overriding Response Header Values\n
\nThere are times when you want to override certain response header values in a GET\n response. For example, you might override the Content-Disposition response header value in\n your GET request.
\n\nYou can override values for a set of response headers using the following query\n parameters. These response header values are sent only on a successful request, that is,\n when status code 200 OK is returned. The set of headers you can override using these\n parameters is a subset of the headers that Amazon S3 accepts when you create an object. The\n response headers that you can override for the GET response are Content-Type
,\n Content-Language
, Expires
, Cache-Control
,\n Content-Disposition
, and Content-Encoding
. To override these\n header values in the GET response, you use the following request parameters.
You must sign the request, either using an Authorization header or a presigned URL,\n when using these parameters. They cannot be used with an unsigned (anonymous)\n request.
\n\n response-content-type
\n
\n response-content-language
\n
\n response-expires
\n
\n response-cache-control
\n
\n response-content-disposition
\n
\n response-content-encoding
\n
\n Additional Considerations about Request Headers\n
\n\nIf both of the If-Match
and If-Unmodified-Since
headers are\n present in the request as follows: If-Match
condition evaluates to\n true
, and; If-Unmodified-Since
condition evaluates to\n false
; then, S3 returns 200 OK and the data requested.
If both of the If-None-Match
and If-Modified-Since
headers are\n present in the request as follows: If-None-Match
condition evaluates to\n false
, and; If-Modified-Since
condition evaluates to\n true
; then, S3 returns 304 Not Modified response code.
For more information about conditional requests, see RFC 7232.
\n\nThe following operations are related to GetObject
:
\n ListBuckets\n
\n\n GetObjectAcl\n
\nRetrieves objects from Amazon S3. To use GET
, you must have READ
\n access to the object. If you grant READ
access to the anonymous user, you can\n return the object without using an authorization header.
An Amazon S3 bucket has no directory hierarchy such as you would find in a typical computer\n file system. You can, however, create a logical hierarchy by using object key names that\n imply a folder structure. For example, instead of naming an object sample.jpg
,\n you can name it photos/2006/February/sample.jpg
.
To get an object from such a logical hierarchy, specify the full key name for the object\n in the GET
operation. For a virtual hosted-style request example, if you have\n the object photos/2006/February/sample.jpg
, specify the resource as\n /photos/2006/February/sample.jpg
. For a path-style request example, if you\n have the object photos/2006/February/sample.jpg
in the bucket named\n examplebucket
, specify the resource as\n /examplebucket/photos/2006/February/sample.jpg
. For more information about\n request types, see HTTP Host Header Bucket Specification.
To distribute large files to many people, you can save bandwidth costs by using\n BitTorrent. For more information, see Amazon S3\n Torrent. For more information about returning the ACL of an object, see GetObjectAcl.
\n\nIf the object you are retrieving is stored in the S3 Glacier or\n S3 Glacier Deep Archive storage class, or S3 Intelligent-Tiering Archive or\n S3 Intelligent-Tiering Deep Archive tiers, before you can retrieve the object you must first restore a\n copy using RestoreObject. Otherwise, this action returns an\n InvalidObjectStateError
error. For information about restoring archived\n objects, see Restoring Archived\n Objects.
Encryption request headers, like x-amz-server-side-encryption
, should not\n be sent for GET requests if your object uses server-side encryption with KMS keys (SSE-KMS) \n or server-side encryption with Amazon S3–managed encryption keys (SSE-S3). If your\n object does use these types of keys, you’ll get an HTTP 400 BadRequest error.
If you encrypt an object by using server-side encryption with customer-provided\n encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object,\n you must use the following headers:
\nx-amz-server-side-encryption-customer-algorithm
\nx-amz-server-side-encryption-customer-key
\nx-amz-server-side-encryption-customer-key-MD5
\nFor more information about SSE-C, see Server-Side Encryption (Using\n Customer-Provided Encryption Keys).
\n\nAssuming you have the relevant permission to read object tags, the response also returns the\n x-amz-tagging-count
header that provides the count of number of tags\n associated with the object. You can use GetObjectTagging to retrieve\n the tag set associated with an object.
\n Permissions\n
\nYou need the relevant read object (or version) permission for this operation. For more\n information, see Specifying Permissions\n in a Policy. If the object you request does not exist, the error Amazon S3 returns\n depends on whether you also have the s3:ListBucket
permission.
If you have the s3:ListBucket
permission on the bucket, Amazon S3 will\n return an HTTP status code 404 (\"no such key\") error.
If you don’t have the s3:ListBucket
permission, Amazon S3 will return an\n HTTP status code 403 (\"access denied\") error.
\n Versioning\n
\nBy default, the GET action returns the current version of an object. To return a\n different version, use the versionId
subresource.
\n If you supply a versionId
, you need the s3:GetObjectVersion
permission to\n access a specific version of an object. If you request a specific version, you do not need to have\n the s3:GetObject
permission.\n
If the current version of the object is a delete marker, Amazon S3 behaves as if the\n object was deleted and includes x-amz-delete-marker: true
in the\n response.
For more information about versioning, see PutBucketVersioning.
\n\n\n Overriding Response Header Values\n
\nThere are times when you want to override certain response header values in a GET\n response. For example, you might override the Content-Disposition response header value in\n your GET request.
\n\nYou can override values for a set of response headers using the following query\n parameters. These response header values are sent only on a successful request, that is,\n when status code 200 OK is returned. The set of headers you can override using these\n parameters is a subset of the headers that Amazon S3 accepts when you create an object. The\n response headers that you can override for the GET response are Content-Type
,\n Content-Language
, Expires
, Cache-Control
,\n Content-Disposition
, and Content-Encoding
. To override these\n header values in the GET response, you use the following request parameters.
You must sign the request, either using an Authorization header or a presigned URL,\n when using these parameters. They cannot be used with an unsigned (anonymous)\n request.
\n\n response-content-type
\n
\n response-content-language
\n
\n response-expires
\n
\n response-cache-control
\n
\n response-content-disposition
\n
\n response-content-encoding
\n
\n Additional Considerations about Request Headers\n
\n\nIf both of the If-Match
and If-Unmodified-Since
headers are\n present in the request as follows: If-Match
condition evaluates to\n true
, and; If-Unmodified-Since
condition evaluates to\n false
; then, S3 returns 200 OK and the data requested.
If both of the If-None-Match
and If-Modified-Since
headers are\n present in the request as follows: If-None-Match
condition evaluates to\n false
, and; If-Modified-Since
condition evaluates to\n true
; then, S3 returns 304 Not Modified response code.
For more information about conditional requests, see RFC 7232.
\n\nThe following operations are related to GetObject
:
\n ListBuckets\n
\n\n GetObjectAcl\n
\nMinimum object size to which the rule applies.
" + } + }, + "ObjectSizeLessThan": { + "target": "com.amazonaws.s3#ObjectSizeLessThanBytes", + "traits": { + "smithy.api#documentation": "Maximum object size to which the rule applies.
" + } } }, "traits": { @@ -6860,6 +6909,18 @@ "smithy.api#documentation": "This tag must exist in the object's tag set in order for the rule to apply.
" } }, + "ObjectSizeGreaterThan": { + "target": "com.amazonaws.s3#ObjectSizeGreaterThanBytes", + "traits": { + "smithy.api#documentation": "Minimum object size to which the rule applies.
" + } + }, + "ObjectSizeLessThan": { + "target": "com.amazonaws.s3#ObjectSizeLessThanBytes", + "traits": { + "smithy.api#documentation": "Maximum object size to which the rule applies.
" + } + }, "And": { "target": "com.amazonaws.s3#LifecycleRuleAndOperator" } @@ -8423,6 +8484,12 @@ "traits": { "smithy.api#documentation": "Specifies the number of days an object is noncurrent before Amazon S3 can perform the\n associated action. For information about the noncurrent days calculations, see How\n Amazon S3 Calculates When an Object Became Noncurrent in the Amazon S3 User Guide.
" } + }, + "NewerNoncurrentVersions": { + "target": "com.amazonaws.s3#VersionCount", + "traits": { + "smithy.api#documentation": "Specifies how many noncurrent versions Amazon S3 will retain. If there are this many more recent\n noncurrent versions, Amazon S3 will take the associated action. For more information about noncurrent\n versions, see Lifecycle configuration elements\n in the Amazon S3 User Guide.
" + } } }, "traits": { @@ -8443,6 +8510,12 @@ "traits": { "smithy.api#documentation": "The class of storage used to store the object.
" } + }, + "NewerNoncurrentVersions": { + "target": "com.amazonaws.s3#VersionCount", + "traits": { + "smithy.api#documentation": "Specifies how many noncurrent versions Amazon S3 will retain. If there are this many more recent\n noncurrent versions, Amazon S3 will take the associated action. For more information about noncurrent\n versions, see Lifecycle configuration elements\n in the Amazon S3 User Guide.
" + } } }, "traits": { @@ -8489,6 +8562,12 @@ "smithy.api#xmlFlattened": {}, "smithy.api#xmlName": "CloudFunctionConfiguration" } + }, + "EventBridgeConfiguration": { + "target": "com.amazonaws.s3#EventBridgeConfiguration", + "traits": { + "smithy.api#documentation": "Enables delivery of events to Amazon EventBridge.
" + } } }, "traits": { @@ -8803,6 +8882,12 @@ ] } }, + "com.amazonaws.s3#ObjectSizeGreaterThanBytes": { + "type": "long" + }, + "com.amazonaws.s3#ObjectSizeLessThanBytes": { + "type": "long" + }, "com.amazonaws.s3#ObjectStorageClass": { "type": "string", "traits": { @@ -9798,6 +9883,13 @@ "smithy.api#documentation": "The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied)
error.
Skips validation of Amazon SQS, Amazon SNS, and Lambda destinations. True or false value.
", + "smithy.api#httpHeader": "x-amz-skip-destination-validation" + } } } }, @@ -12118,6 +12210,9 @@ "com.amazonaws.s3#Size": { "type": "long" }, + "com.amazonaws.s3#SkipValidation": { + "type": "boolean" + }, "com.amazonaws.s3#SourceSelectionCriteria": { "type": "structure", "members": { @@ -12983,6 +13078,9 @@ "com.amazonaws.s3#Value": { "type": "string" }, + "com.amazonaws.s3#VersionCount": { + "type": "integer" + }, "com.amazonaws.s3#VersionIdMarker": { "type": "string" }, diff --git a/codegen/sdk-codegen/aws-models/s3control.2018-08-20.json b/codegen/sdk-codegen/aws-models/s3control.2018-08-20.json index f432e9b31c2..bce826ade44 100644 --- a/codegen/sdk-codegen/aws-models/s3control.2018-08-20.json +++ b/codegen/sdk-codegen/aws-models/s3control.2018-08-20.json @@ -31,6 +31,24 @@ "shapes": { "com.amazonaws.s3control#AWSS3ControlServiceV20180820": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "S3 Control", + "arnNamespace": "s3", + "cloudFormationName": "S3Control", + "cloudTrailEventSource": "s3control.amazonaws.com", + "endpointPrefix": "s3-control" + }, + "aws.auth#sigv4": { + "name": "s3" + }, + "aws.protocols#restXml": {}, + "smithy.api#documentation": "\n Amazon Web Services S3 Control provides access to Amazon S3 control plane actions.\n \n
", + "smithy.api#title": "AWS S3 Control", + "smithy.api#xmlNamespace": { + "uri": "http://awss3control.amazonaws.com/doc/2018-08-20/" + } + }, "version": "2018-08-20", "operations": [ { @@ -204,25 +222,7 @@ { "target": "com.amazonaws.s3control#UpdateJobStatus" } - ], - "traits": { - "aws.api#service": { - "sdkId": "S3 Control", - "arnNamespace": "s3", - "cloudFormationName": "S3Control", - "cloudTrailEventSource": "s3control.amazonaws.com", - "endpointPrefix": "s3-control" - }, - "aws.auth#sigv4": { - "name": "s3" - }, - "aws.protocols#restXml": {}, - "smithy.api#documentation": "\n Amazon Web Services S3 Control provides access to Amazon S3 control plane actions.\n \n
", - "smithy.api#title": "AWS S3 Control", - "smithy.api#xmlNamespace": { - "uri": "http://awss3control.amazonaws.com/doc/2018-08-20/" - } - } + ] }, "com.amazonaws.s3control#AbortIncompleteMultipartUpload": { "type": "structure", @@ -692,6 +692,21 @@ } } }, + "com.amazonaws.s3control#CloudWatchMetrics": { + "type": "structure", + "members": { + "IsEnabled": { + "target": "com.amazonaws.s3control#IsEnabled", + "traits": { + "smithy.api#documentation": "A container that indicates whether CloudWatch publishing for S3 Storage Lens metrics is enabled. A value of true
indicates that CloudWatch publishing for S3 Storage Lens metrics is enabled.
A container for enabling Amazon CloudWatch publishing for S3 Storage Lens metrics.
\nFor more information about publishing S3 Storage Lens metrics to CloudWatch, see Monitor S3 Storage Lens metrics in CloudWatch in the Amazon S3 User Guide.
" + } + }, "com.amazonaws.s3control#ConfigId": { "type": "string", "traits": { @@ -907,6 +922,14 @@ "smithy.api#required": {} } }, + "CreateBucketConfiguration": { + "target": "com.amazonaws.s3control#CreateBucketConfiguration", + "traits": { + "smithy.api#documentation": "The configuration information for the bucket.
\nThis is not supported by Amazon S3 on Outposts buckets.
\nThe ID of the Outposts where the bucket is being created.
\nThis is required by Amazon S3 on Outposts buckets.
\nThe configuration information for the bucket.
\nThis is not supported by Amazon S3 on Outposts buckets.
\nThe account ID for the Amazon Web Services account whose PublicAccessBlock
configuration you want\n to set.
The account ID for the Amazon Web Services account whose PublicAccessBlock
configuration you want\n to set.
A container for the bucket where the S3 Storage Lens metrics export will be located.
\nThis bucket must be located in the same Region as the storage lens configuration.
\nA container for the bucket where the S3 Storage Lens metrics export will be located.
\nThis bucket must be located in the same Region as the storage lens configuration.
\nA container for enabling Amazon CloudWatch publishing for S3 Storage Lens metrics.
" } } }, diff --git a/codegen/sdk-codegen/aws-models/sqs.2012-11-05.json b/codegen/sdk-codegen/aws-models/sqs.2012-11-05.json index 6fd6d74e9b7..1c5848d6420 100644 --- a/codegen/sdk-codegen/aws-models/sqs.2012-11-05.json +++ b/codegen/sdk-codegen/aws-models/sqs.2012-11-05.json @@ -75,7 +75,7 @@ "AWSAccountIds": { "target": "com.amazonaws.sqs#AWSAccountIdList", "traits": { - "smithy.api#documentation": "The account numbers of the principals who are to receive\n permission. For information about locating the account identification, see Your Amazon Web Services Identifiers in the Amazon SQS Developer\n Guide.
", + "smithy.api#documentation": "The Amazon Web Services account numbers of the principals who are to receive\n permission. For information about locating the Amazon Web Services account identification, see Your Amazon Web Services Identifiers in the Amazon SQS Developer\n Guide.
", "smithy.api#required": {}, "smithy.api#xmlFlattened": {}, "smithy.api#xmlName": "AWSAccountId" @@ -97,6 +97,24 @@ }, "com.amazonaws.sqs#AmazonSQS": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "SQS", + "arnNamespace": "sqs", + "cloudFormationName": "SQS", + "cloudTrailEventSource": "sqs.amazonaws.com", + "endpointPrefix": "sqs" + }, + "aws.auth#sigv4": { + "name": "sqs" + }, + "aws.protocols#awsQuery": {}, + "smithy.api#documentation": "Welcome to the Amazon SQS API Reference.
\nAmazon SQS is a reliable, highly-scalable hosted queue for storing messages as they travel between applications or microservices. Amazon SQS moves data between distributed application components and helps you decouple these components.
\nFor information on the permissions you need to use this API, see\n Identity and\n access management in the Amazon SQS Developer Guide.\n
\nYou can use Amazon Web Services SDKs to access Amazon SQS using your favorite programming language. The SDKs perform tasks such as the following automatically:
\nCryptographically sign your service requests
\nRetry requests
\nHandle error responses
\n\n Additional information\n
\n\n Amazon SQS Developer Guide\n
\n\n Making API Requests\n
\n\n Amazon Web Services General Reference\n
\nWelcome to the Amazon SQS API Reference.
\nAmazon SQS is a reliable, highly-scalable hosted queue for storing messages as they travel between applications or microservices. Amazon SQS moves data between distributed application components and helps you decouple these components.
\nFor information on the permissions you need to use this API, see\n Identity and\n access management in the Amazon SQS Developer Guide.\n
\nYou can use Amazon Web Services SDKs to access Amazon SQS using your favorite programming language. The SDKs perform tasks such as the following automatically:
\nCryptographically sign your service requests
\nRetry requests
\nHandle error responses
\n\n Additional information\n
\n\n Amazon SQS Developer Guide\n
\n\n Making API Requests\n
\n\n Amazon Web Services General Reference\n
\nA map of attributes with their corresponding values.
\nThe following lists the names, descriptions, and values of the special request parameters that the CreateQueue
action uses:
\n DelaySeconds
– The length of time, in seconds, for which the delivery of all messages in the queue is delayed. Valid values: An integer from 0 to 900 seconds (15 minutes). Default: 0.\n
\n MaximumMessageSize
– The limit of how many bytes a message can contain before Amazon SQS rejects it. Valid values: An integer from 1,024 bytes (1 KiB) to 262,144 bytes (256 KiB). Default: 262,144 (256 KiB).\n
\n MessageRetentionPeriod
– The length of time, in seconds, for which Amazon SQS retains a message. Valid values: An integer from 60 seconds (1 minute) to 1,209,600 seconds (14 days). Default: 345,600 (4 days).\n
\n Policy
– The queue's policy. A valid Amazon Web Services policy. For more information about policy structure, see Overview of Amazon Web Services IAM Policies in the Amazon IAM User Guide.\n
\n ReceiveMessageWaitTimeSeconds
– The length of time, in seconds, for which a \n ReceiveMessage\n
action waits for a message to arrive. Valid values: An integer from 0 to 20 (seconds). Default: 0.\n
\n VisibilityTimeout
– The visibility timeout for the queue, in seconds. Valid values: An integer from 0 to 43,200 (12 hours). Default: 30. For more information about the visibility timeout, see \n Visibility Timeout in the Amazon SQS Developer Guide.
The following attributes apply only to dead-letter queues:\n
\n\n RedrivePolicy
– The string that includes the parameters for the dead-letter queue functionality \n of the source queue as a JSON object. The parameters are as follows:
\n deadLetterTargetArn
– The Amazon Resource Name (ARN) of the dead-letter queue to \n which Amazon SQS moves messages after the value of maxReceiveCount
is exceeded.
\n maxReceiveCount
– The number of times a message is delivered to the source queue before being \n moved to the dead-letter queue. When the ReceiveCount
for a message exceeds the maxReceiveCount
\n for a queue, Amazon SQS moves the message to the dead-letter-queue.
\n RedriveAllowPolicy
– The string that includes the parameters for the permissions for the dead-letter\n queue redrive permission and which source queues can specify dead-letter queues as a JSON object. The parameters are as follows:
\n redrivePermission
– The permission type that defines which source queues can \n specify the current queue as the dead-letter queue. Valid values are:
\n allowAll
– (Default) Any source queues in this Amazon Web Services account in the same Region can \n specify this queue as the dead-letter queue.
\n denyAll
– No source queues can specify this queue as the dead-letter\n queue.
\n byQueue
– Only queues specified by the sourceQueueArns
parameter can specify \n this queue as the dead-letter queue.
\n sourceQueueArns
– The Amazon Resource Names (ARN)s of the source queues that can specify \n this queue as the dead-letter queue and redrive messages. You can specify this parameter only when the \n redrivePermission
parameter is set to byQueue
. You can specify up to 10 source queue ARNs. \n To allow more than 10 source queues to specify dead-letter queues, set the redrivePermission
parameter\n to allowAll
.
The dead-letter queue of a \n FIFO queue must also be a FIFO queue. Similarly, the dead-letter \n queue of a standard queue must also be a standard queue.
\nThe following attributes apply only to server-side-encryption:
\n\n KmsMasterKeyId
– The ID of an Amazon Web Services managed customer master key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms.\n While the alias of the Amazon Web Services managed CMK for Amazon SQS is always alias/aws/sqs
, the alias of a custom CMK can, for example, be alias/MyAlias\n
.\n For more examples, see KeyId in the Key Management Service API Reference.\n
\n KmsDataKeyReusePeriodSeconds
– The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt \n or decrypt messages before calling KMS again. An integer representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). Default: 300 (5 minutes). A shorter time period provides better security \n but results in more calls to KMS which might incur charges after Free Tier. For more information, see \n How Does the Data Key Reuse Period Work?.\n
The following attributes apply only to FIFO (first-in-first-out) queues:
\n\n FifoQueue
– Designates a queue as FIFO. Valid values are true
and false
. If you don't specify the FifoQueue
attribute, Amazon SQS creates a standard queue. \n You can provide this attribute only during queue creation. You can't change it for an existing queue. \n When you set this attribute, you must also provide the MessageGroupId
for your messages explicitly.
For more information, see \n FIFO queue logic \n in the Amazon SQS Developer Guide.
\n\n ContentBasedDeduplication
– Enables content-based deduplication. Valid values are true
and false
. For more information, see Exactly-once processing in the \n Amazon SQS Developer Guide. Note the following:\n
Every message must have a unique MessageDeduplicationId
.
You may provide a MessageDeduplicationId
explicitly.
If you aren't able to provide a MessageDeduplicationId
and you enable ContentBasedDeduplication
for your queue, \n Amazon SQS uses a SHA-256 hash to generate the MessageDeduplicationId
using the body of the message (but not the attributes of the message).\n
If you don't provide a MessageDeduplicationId
and the queue doesn't have ContentBasedDeduplication
set,\n the action fails with an error.
If the queue has ContentBasedDeduplication
set, your MessageDeduplicationId
overrides the generated one.
When ContentBasedDeduplication
is in effect, messages with identical content sent within the deduplication interval are treated as duplicates \n and only one copy of the message is delivered.
If you send one message with ContentBasedDeduplication
enabled and then another message with a MessageDeduplicationId
that is the same \n as the one generated for the first MessageDeduplicationId
, the two messages are treated as duplicates and only one copy of the message is delivered.\n
The following attributes apply only to \nhigh throughput\nfor FIFO queues:
\n\n DeduplicationScope
– Specifies whether message deduplication occurs at the \n message group or queue level. Valid values are messageGroup
and queue
.
\n FifoThroughputLimit
– Specifies whether the FIFO queue throughput \n quota applies to the entire queue or per message group. Valid values are perQueue
and perMessageGroupId
. \n The perMessageGroupId
value is allowed only when the value for DeduplicationScope
is messageGroup
.
To enable high throughput for FIFO queues, do the following:
\nSet DeduplicationScope
to messageGroup
.
Set FifoThroughputLimit
to perMessageGroupId
.
If you set these attributes to anything other than the values shown for enabling high\n throughput, normal throughput is in effect and deduplication occurs as specified.
\nFor information on throughput quotas, \n see Quotas related to messages \n in the Amazon SQS Developer Guide.
", + "smithy.api#documentation": "A map of attributes with their corresponding values.
\nThe following lists the names, descriptions, and values of the special request parameters that the CreateQueue
action uses:
\n DelaySeconds
– The length of time, in seconds, for which the delivery of all messages in the queue is delayed. Valid values: An integer from 0 to 900 seconds (15 minutes). Default: 0.\n
\n MaximumMessageSize
– The limit of how many bytes a message can contain before Amazon SQS rejects it. Valid values: An integer from 1,024 bytes (1 KiB) to 262,144 bytes (256 KiB). Default: 262,144 (256 KiB).\n
\n MessageRetentionPeriod
– The length of time, in seconds, for which Amazon SQS retains a message. Valid values: An integer from 60 seconds (1 minute) to 1,209,600 seconds (14 days). Default: 345,600 (4 days).\n
\n Policy
– The queue's policy. A valid Amazon Web Services policy. For more information about policy structure, see Overview of Amazon Web Services IAM Policies in the Amazon IAM User Guide.\n
\n ReceiveMessageWaitTimeSeconds
– The length of time, in seconds, for which a \n ReceiveMessage\n
action waits for a message to arrive. Valid values: An integer from 0 to 20 (seconds). Default: 0.\n
\n RedrivePolicy
– The string that includes the parameters for the dead-letter queue functionality \n of the source queue as a JSON object. For more information about the redrive policy and dead-letter queues, see Using Amazon SQS Dead-Letter Queues \n in the Amazon SQS Developer Guide.
\n deadLetterTargetArn
– The Amazon Resource Name (ARN) of the dead-letter queue to which Amazon SQS moves messages after the value of maxReceiveCount
is exceeded.
\n maxReceiveCount
– The number of times a message is delivered to the source queue before being moved to the dead-letter queue.\n When the ReceiveCount
for a message exceeds the maxReceiveCount
for a queue, Amazon SQS moves the message to the dead-letter-queue.
The dead-letter queue of a FIFO queue must also be a FIFO queue. Similarly, the dead-letter queue of a standard queue must also be a standard queue.
\n\n VisibilityTimeout
– The visibility timeout for the queue, in seconds. Valid values: An integer from 0 to 43,200 (12 hours). Default: 30. For more information about the visibility timeout, see \n Visibility Timeout in the Amazon SQS Developer Guide.
The following attributes apply only to server-side-encryption:
\n\n KmsMasterKeyId
– The ID of an Amazon Web Services managed customer master key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms.\n While the alias of the Amazon Web Services managed CMK for Amazon SQS is always alias/aws/sqs
, the alias of a custom CMK can, for example, be alias/MyAlias\n
.\n For more examples, see KeyId in the Key Management Service API Reference.\n
\n KmsDataKeyReusePeriodSeconds
– The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt \n or decrypt messages before calling KMS again. An integer representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). Default: 300 (5 minutes). A shorter time period provides better security \n but results in more calls to KMS which might incur charges after Free Tier. For more information, see \n How Does the Data Key Reuse Period Work?.\n
\n SqsManagedSseEnabled
– Enables server-side queue encryption using SQS owned encryption keys. Only one server-side encryption option is supported per queue (e.g. SSE-KMS or SSE-SQS).
The following attributes apply only to FIFO (first-in-first-out) queues:
\n\n FifoQueue
– Designates a queue as FIFO. Valid values are true
and false
. If you don't specify the FifoQueue
attribute, Amazon SQS creates a standard queue. \n You can provide this attribute only during queue creation. You can't change it for an existing queue. \n When you set this attribute, you must also provide the MessageGroupId
for your messages explicitly.
For more information, see \n FIFO queue logic \n in the Amazon SQS Developer Guide.
\n\n ContentBasedDeduplication
– Enables content-based deduplication. Valid values are true
and false
. For more information, see Exactly-once processing in the \n Amazon SQS Developer Guide. Note the following:\n
Every message must have a unique MessageDeduplicationId
.
You may provide a MessageDeduplicationId
explicitly.
If you aren't able to provide a MessageDeduplicationId
and you enable ContentBasedDeduplication
for your queue, \n Amazon SQS uses a SHA-256 hash to generate the MessageDeduplicationId
using the body of the message (but not the attributes of the message).\n
If you don't provide a MessageDeduplicationId
and the queue doesn't have ContentBasedDeduplication
set,\n the action fails with an error.
If the queue has ContentBasedDeduplication
set, your MessageDeduplicationId
overrides the generated one.
When ContentBasedDeduplication
is in effect, messages with identical content sent within the deduplication interval are treated as duplicates \n and only one copy of the message is delivered.
If you send one message with ContentBasedDeduplication
enabled and then another message with a MessageDeduplicationId
that is the same \n as the one generated for the first MessageDeduplicationId
, the two messages are treated as duplicates and only one copy of the message is delivered.\n
The following attributes apply only to \nhigh throughput\nfor FIFO queues:
\n\n DeduplicationScope
– Specifies whether message deduplication occurs at the \n message group or queue level. Valid values are messageGroup
and queue
.
\n FifoThroughputLimit
– Specifies whether the FIFO queue throughput \n quota applies to the entire queue or per message group. Valid values are perQueue
and perMessageGroupId
. \n The perMessageGroupId
value is allowed only when the value for DeduplicationScope
is messageGroup
.
To enable high throughput for FIFO queues, do the following:
\nSet DeduplicationScope
to messageGroup
.
Set FifoThroughputLimit
to perMessageGroupId
.
If you set these attributes to anything other than the values shown for enabling high\n throughput, normal throughput is in effect and deduplication occurs as specified.
\nFor information on throughput quotas, \n see Quotas related to messages \n in the Amazon SQS Developer Guide.
", "smithy.api#xmlFlattened": {}, "smithy.api#xmlName": "Attribute" } @@ -743,7 +743,7 @@ "AttributeNames": { "target": "com.amazonaws.sqs#AttributeNameList", "traits": { - "smithy.api#documentation": "A list of attributes for which to retrieve information.
\nThe AttributeName.N
parameter is optional, but if you don't specify values for this parameter,\n the request returns empty results.
In the future, new attributes might be added. If you write code that calls this action, we recommend that you structure your code so that it can handle new attributes gracefully.
\nThe following attributes are supported:
\nThe ApproximateNumberOfMessagesDelayed
, ApproximateNumberOfMessagesNotVisible
, \n and ApproximateNumberOfMessagesVisible
metrics may not achieve consistency\n until at least 1 minute after the producers stop sending messages. This period is required for \n the queue metadata to reach eventual consistency.
\n All
– Returns all values.
\n ApproximateNumberOfMessages
– Returns the approximate number of\n messages available for retrieval from the queue.
\n ApproximateNumberOfMessagesDelayed
– Returns the approximate number\n of messages in the queue that are delayed and not available for reading\n immediately. This can happen when the queue is configured as a delay queue or\n when a message has been sent with a delay parameter.
\n ApproximateNumberOfMessagesNotVisible
– Returns the approximate\n number of messages that are in flight. Messages are considered to be\n in flight if they have been sent to a client but have\n not yet been deleted or have not yet reached the end of their visibility window.
\n CreatedTimestamp
– Returns the time when the queue was created in\n seconds (epoch\n time).
\n DelaySeconds
– Returns the default delay on the queue in\n seconds.
\n LastModifiedTimestamp
– Returns the time when the queue was last\n changed in seconds (epoch\n time).
\n MaximumMessageSize
– Returns the limit of how many bytes a message\n can contain before Amazon SQS rejects it.
\n MessageRetentionPeriod
– Returns the length of time, in seconds,\n for which Amazon SQS retains a message.
\n Policy
– Returns the policy of the queue.
\n QueueArn
– Returns the Amazon resource name (ARN) of the\n queue.
\n ReceiveMessageWaitTimeSeconds
– Returns the length of time, in\n seconds, for which the ReceiveMessage
action waits for a message to\n arrive.
\n VisibilityTimeout
– Returns the visibility timeout for the queue. For more information about the visibility timeout, see Visibility Timeout in the Amazon SQS Developer Guide.\n
The following attributes apply only to dead-letter queues:\n
\n\n RedrivePolicy
– The string that includes the parameters for the dead-letter queue functionality \n of the source queue as a JSON object. The parameters are as follows:
\n deadLetterTargetArn
– The Amazon Resource Name (ARN) of the dead-letter queue to \n which Amazon SQS moves messages after the value of maxReceiveCount
is exceeded.
\n maxReceiveCount
– The number of times a message is delivered to the source queue before being \n moved to the dead-letter queue. When the ReceiveCount
for a message exceeds the maxReceiveCount
\n for a queue, Amazon SQS moves the message to the dead-letter-queue.
\n RedriveAllowPolicy
– The string that includes the parameters for the permissions for the dead-letter\n queue redrive permission and which source queues can specify dead-letter queues as a JSON object. The parameters are as follows:
\n redrivePermission
– The permission type that defines which source queues can \n specify the current queue as the dead-letter queue. Valid values are:
\n allowAll
– (Default) Any source queues in this Amazon Web Services account in the same Region can \n specify this queue as the dead-letter queue.
\n denyAll
– No source queues can specify this queue as the dead-letter\n queue.
\n byQueue
– Only queues specified by the sourceQueueArns
parameter can specify \n this queue as the dead-letter queue.
\n sourceQueueArns
– The Amazon Resource Names (ARN)s of the source queues that can specify \n this queue as the dead-letter queue and redrive messages. You can specify this parameter only when the \n redrivePermission
parameter is set to byQueue
. You can specify up to 10 source queue ARNs. \n To allow more than 10 source queues to specify dead-letter queues, set the redrivePermission
parameter\n to allowAll
.
The dead-letter queue of a \n FIFO queue must also be a FIFO queue. Similarly, the dead-letter \n queue of a standard queue must also be a standard queue.
\nThe following attributes apply only to server-side-encryption:
\n\n KmsMasterKeyId
– Returns the ID of an Amazon Web Services managed customer master key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms.\n
\n KmsDataKeyReusePeriodSeconds
– Returns the length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling KMS again.\n For more information, see How Does the Data Key Reuse Period Work?.\n
The following attributes apply only to FIFO (first-in-first-out) queues:
\n\n FifoQueue
– Returns information about whether the queue is FIFO. For more information, see FIFO queue logic in the Amazon SQS Developer Guide.
To determine whether a queue is FIFO, you can check whether QueueName
ends with the .fifo
suffix.
\n ContentBasedDeduplication
– Returns whether content-based deduplication is enabled for the queue. For more information, see Exactly-once processing in the Amazon SQS Developer Guide.\n
The following attributes apply only to \nhigh throughput\nfor FIFO queues:
\n\n DeduplicationScope
– Specifies whether message deduplication occurs at the \n message group or queue level. Valid values are messageGroup
and queue
.
\n FifoThroughputLimit
– Specifies whether the FIFO queue throughput \n quota applies to the entire queue or per message group. Valid values are perQueue
and perMessageGroupId
. \n The perMessageGroupId
value is allowed only when the value for DeduplicationScope
is messageGroup
.
To enable high throughput for FIFO queues, do the following:
\nSet DeduplicationScope
to messageGroup
.
Set FifoThroughputLimit
to perMessageGroupId
.
If you set these attributes to anything other than the values shown for enabling high\n throughput, normal throughput is in effect and deduplication occurs as specified.
\nFor information on throughput quotas, \n see Quotas related to messages \n in the Amazon SQS Developer Guide.
", + "smithy.api#documentation": "A list of attributes for which to retrieve information.
\nThe AttributeName.N
parameter is optional, but if you don't specify values for this parameter,\n the request returns empty results.
In the future, new attributes might be added. If you write code that calls this action, we recommend that you structure your code so that it can handle new attributes gracefully.
\nThe following attributes are supported:
\nThe ApproximateNumberOfMessagesDelayed
, ApproximateNumberOfMessagesNotVisible
, \n and ApproximateNumberOfMessagesVisible
metrics may not achieve consistency\n until at least 1 minute after the producers stop sending messages. This period is required for \n the queue metadata to reach eventual consistency.
\n All
– Returns all values.
\n ApproximateNumberOfMessages
– Returns the approximate number of\n messages available for retrieval from the queue.
\n ApproximateNumberOfMessagesDelayed
– Returns the approximate number\n of messages in the queue that are delayed and not available for reading\n immediately. This can happen when the queue is configured as a delay queue or\n when a message has been sent with a delay parameter.
\n ApproximateNumberOfMessagesNotVisible
– Returns the approximate\n number of messages that are in flight. Messages are considered to be\n in flight if they have been sent to a client but have\n not yet been deleted or have not yet reached the end of their visibility window.
\n CreatedTimestamp
– Returns the time when the queue was created in\n seconds (epoch\n time).
\n DelaySeconds
– Returns the default delay on the queue in\n seconds.
\n LastModifiedTimestamp
– Returns the time when the queue was last\n changed in seconds (epoch\n time).
\n MaximumMessageSize
– Returns the limit of how many bytes a message\n can contain before Amazon SQS rejects it.
\n MessageRetentionPeriod
– Returns the length of time, in seconds,\n for which Amazon SQS retains a message.
\n Policy
– Returns the policy of the queue.
\n QueueArn
– Returns the Amazon resource name (ARN) of the\n queue.
\n ReceiveMessageWaitTimeSeconds
– Returns the length of time, in\n seconds, for which the ReceiveMessage
action waits for a message to\n arrive.
\n RedrivePolicy
– The string that includes the parameters for the dead-letter queue functionality \n of the source queue as a JSON object. For more information about the redrive policy and dead-letter queues, see Using Amazon SQS Dead-Letter Queues \n in the Amazon SQS Developer Guide.
\n deadLetterTargetArn
– The Amazon Resource Name (ARN) of the dead-letter queue to which Amazon SQS moves messages after the value of maxReceiveCount
is exceeded.
\n maxReceiveCount
– The number of times a message is delivered to the source queue before being moved to the dead-letter queue.\n When the ReceiveCount
for a message exceeds the maxReceiveCount
for a queue, Amazon SQS moves the message to the dead-letter-queue.
\n VisibilityTimeout
– Returns the visibility timeout for the queue. For more information about the visibility timeout, see Visibility Timeout in the Amazon SQS Developer Guide.\n
The following attributes apply only to server-side-encryption:
\n\n KmsMasterKeyId
– Returns the ID of an Amazon Web Services managed customer master key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms.\n
\n KmsDataKeyReusePeriodSeconds
– Returns the length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling KMS again.\n For more information, see How Does the Data Key Reuse Period Work?.\n
\n SqsManagedSseEnabled
– Returns information about whether the queue is using SSE-SQS encryption using SQS owned encryption keys. Only one server-side encryption option is supported per queue (e.g. SSE-KMS or SSE-SQS).
The following attributes apply only to FIFO (first-in-first-out) queues:
\n\n FifoQueue
– Returns information about whether the queue is FIFO. For more information, see FIFO queue logic in the Amazon SQS Developer Guide.
To determine whether a queue is FIFO, you can check whether QueueName
ends with the .fifo
suffix.
\n ContentBasedDeduplication
– Returns whether content-based deduplication is enabled for the queue. For more information, see Exactly-once processing in the Amazon SQS Developer Guide.\n
The following attributes apply only to \nhigh throughput\nfor FIFO queues:
\n\n DeduplicationScope
– Specifies whether message deduplication occurs at the \n message group or queue level. Valid values are messageGroup
and queue
.
\n FifoThroughputLimit
– Specifies whether the FIFO queue throughput \n quota applies to the entire queue or per message group. Valid values are perQueue
and perMessageGroupId
. \n The perMessageGroupId
value is allowed only when the value for DeduplicationScope
is messageGroup
.
To enable high throughput for FIFO queues, do the following:
\nSet DeduplicationScope
to messageGroup
.
Set FifoThroughputLimit
to perMessageGroupId
.
If you set these attributes to anything other than the values shown for enabling high\n throughput, normal throughput is in effect and deduplication occurs as specified.
\nFor information on throughput quotas, \n see Quotas related to messages \n in the Amazon SQS Developer Guide.
", "smithy.api#xmlFlattened": {}, "smithy.api#xmlName": "AttributeName" } @@ -799,7 +799,7 @@ "QueueOwnerAWSAccountId": { "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "The account ID of the account that created the queue.
" + "smithy.api#documentation": "The Amazon Web Services account ID of the account that created the queue.
" } } }, @@ -1043,7 +1043,7 @@ "MessageId": { "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "A unique identifier for the message. A MessageId
is considered unique across all accounts for an extended period of time.
A unique identifier for the message. A MessageId
is considered unique across all Amazon Web Services accounts for an extended period of time.
A list of attributes that need to be returned along with each message. These attributes\n include:
\n\n All
– Returns all values.
\n ApproximateFirstReceiveTimestamp
– Returns the time the message was first received from the queue (epoch time in milliseconds).
\n ApproximateReceiveCount
– Returns the number of times a message has been received across all queues but not deleted.
\n AWSTraceHeader
– Returns the X-Ray trace header string.\n
\n SenderId
\n
For an IAM user, returns the IAM user ID, for example ABCDEFGHI1JKLMNOPQ23R
.
For an IAM role, returns the IAM role ID, for example ABCDE1F2GH3I4JK5LMNOP:i-a123b456
.
\n SentTimestamp
– Returns the time the message was sent to the queue (epoch time in milliseconds).
\n MessageDeduplicationId
– Returns the value provided by the\n producer that calls the \n SendMessage\n
\n action.
\n MessageGroupId
– Returns the value provided by the producer that\n calls the \n SendMessage\n
action. Messages with the\n same MessageGroupId
are returned in sequence.
\n SequenceNumber
– Returns the value provided by Amazon SQS.
A list of attributes that need to be returned along with each message. These attributes\n include:
\n\n All
– Returns all values.
\n ApproximateFirstReceiveTimestamp
– Returns the time the message was first received from the queue (epoch time in milliseconds).
\n ApproximateReceiveCount
– Returns the number of times a message has been received across all queues but not deleted.
\n AWSTraceHeader
– Returns the X-Ray trace header string.\n
\n SenderId
\n
For an IAM user, returns the IAM user ID, for example ABCDEFGHI1JKLMNOPQ23R
.
For an IAM role, returns the IAM role ID, for example ABCDE1F2GH3I4JK5LMNOP:i-a123b456
.
\n SentTimestamp
– Returns the time the message was sent to the queue (epoch time in milliseconds).
\n SqsManagedSseEnabled
– Enables server-side queue encryption using SQS owned encryption keys. Only one server-side encryption option is supported per queue (e.g. SSE-KMS or SSE-SQS).
\n MessageDeduplicationId
– Returns the value provided by the\n producer that calls the \n SendMessage\n
\n action.
\n MessageGroupId
– Returns the value provided by the producer that\n calls the \n SendMessage\n
action. Messages with the\n same MessageGroupId
are returned in sequence.
\n SequenceNumber
– Returns the value provided by Amazon SQS.
A map of attributes to set.
\nThe following lists the names, descriptions, and values of the special request parameters that the SetQueueAttributes
action uses:
\n DelaySeconds
– The length of time, in seconds, for which the delivery of all messages in the queue is delayed. Valid values: An integer from 0 to 900 (15 minutes). Default: 0.\n
\n MaximumMessageSize
– The limit of how many bytes a message can contain before Amazon SQS rejects it. Valid values: An integer from 1,024 bytes (1 KiB) up to 262,144 bytes (256 KiB). Default: 262,144 (256 KiB).\n
\n MessageRetentionPeriod
– The length of time, in seconds, for which Amazon SQS retains a message. Valid values: An integer representing seconds, from 60 (1 minute) to 1,209,600 (14 days). Default: 345,600 (4 days).\n
\n Policy
– The queue's policy. A valid Amazon Web Services policy. For more information about policy structure, see Overview of Amazon Web Services IAM Policies \n in the Identity and Access Management User Guide.\n
\n ReceiveMessageWaitTimeSeconds
– The length of time, in seconds, for which a \n ReceiveMessage\n
action waits for a message to arrive. Valid values: An integer from 0 to 20 (seconds). Default: 0.\n
\n VisibilityTimeout
– The visibility timeout for the queue, in seconds. Valid values: An integer from 0 to 43,200 (12 hours). Default: 30. For more information about the visibility timeout,\n see Visibility Timeout in the Amazon SQS Developer Guide.
The following attributes apply only to dead-letter queues:\n
\n\n RedrivePolicy
– The string that includes the parameters for the dead-letter queue functionality \n of the source queue as a JSON object. The parameters are as follows:
\n deadLetterTargetArn
– The Amazon Resource Name (ARN) of the dead-letter queue to \n which Amazon SQS moves messages after the value of maxReceiveCount
is exceeded.
\n maxReceiveCount
– The number of times a message is delivered to the source queue before being \n moved to the dead-letter queue. When the ReceiveCount
for a message exceeds the maxReceiveCount
\n for a queue, Amazon SQS moves the message to the dead-letter-queue.
\n RedriveAllowPolicy
– The string that includes the parameters for the permissions for the dead-letter\n queue redrive permission and which source queues can specify dead-letter queues as a JSON object. The parameters are as follows:
\n redrivePermission
– The permission type that defines which source queues can \n specify the current queue as the dead-letter queue. Valid values are:
\n allowAll
– (Default) Any source queues in this Amazon Web Services account in the same Region can \n specify this queue as the dead-letter queue.
\n denyAll
– No source queues can specify this queue as the dead-letter\n queue.
\n byQueue
– Only queues specified by the sourceQueueArns
parameter can specify \n this queue as the dead-letter queue.
\n sourceQueueArns
– The Amazon Resource Names (ARN)s of the source queues that can specify \n this queue as the dead-letter queue and redrive messages. You can specify this parameter only when the \n redrivePermission
parameter is set to byQueue
. You can specify up to 10 source queue ARNs. \n To allow more than 10 source queues to specify dead-letter queues, set the redrivePermission
parameter\n to allowAll
.
The dead-letter queue of a \n FIFO queue must also be a FIFO queue. Similarly, the dead-letter \n queue of a standard queue must also be a standard queue.
\nThe following attributes apply only to server-side-encryption:
\n\n KmsMasterKeyId
– The ID of an Amazon Web Services managed customer master key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms.\n While the alias of the AWS-managed CMK for Amazon SQS is always alias/aws/sqs
, the alias of a custom CMK can, for example, be alias/MyAlias\n
.\n For more examples, see KeyId in the Key Management Service API Reference.\n
\n KmsDataKeyReusePeriodSeconds
– The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt \n or decrypt messages before calling KMS again. An integer representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). Default: 300 (5 minutes). A shorter time period provides better security \n but results in more calls to KMS which might incur charges after Free Tier. For more information, see \n How Does the Data Key Reuse Period Work?.\n
The following attribute applies only to FIFO (first-in-first-out) queues:
\n\n ContentBasedDeduplication
– Enables content-based deduplication. For more information, see Exactly-once processing in the \n Amazon SQS Developer Guide. Note the following:\n
Every message must have a unique MessageDeduplicationId
.
You may provide a MessageDeduplicationId
explicitly.
If you aren't able to provide a MessageDeduplicationId
and you enable ContentBasedDeduplication
for your queue, \n Amazon SQS uses a SHA-256 hash to generate the MessageDeduplicationId
using the body of the message (but not the attributes of the message).\n
If you don't provide a MessageDeduplicationId
and the queue doesn't have ContentBasedDeduplication
set,\n the action fails with an error.
If the queue has ContentBasedDeduplication
set, your MessageDeduplicationId
overrides the generated one.
When ContentBasedDeduplication
is in effect, messages with identical content sent within the deduplication interval are treated as duplicates \n and only one copy of the message is delivered.
If you send one message with ContentBasedDeduplication
enabled and then another message with a MessageDeduplicationId
that is the same \n as the one generated for the first MessageDeduplicationId
, the two messages are treated as duplicates and only one copy of the message is delivered.\n
The following attributes apply only to \nhigh throughput\nfor FIFO queues:
\n\n DeduplicationScope
– Specifies whether message deduplication occurs at the \n message group or queue level. Valid values are messageGroup
and queue
.
\n FifoThroughputLimit
– Specifies whether the FIFO queue throughput \n quota applies to the entire queue or per message group. Valid values are perQueue
and perMessageGroupId
. \n The perMessageGroupId
value is allowed only when the value for DeduplicationScope
is messageGroup
.
To enable high throughput for FIFO queues, do the following:
\nSet DeduplicationScope
to messageGroup
.
Set FifoThroughputLimit
to perMessageGroupId
.
If you set these attributes to anything other than the values shown for enabling high\n throughput, normal throughput is in effect and deduplication occurs as specified.
\nFor information on throughput quotas, \n see Quotas related to messages \n in the Amazon SQS Developer Guide.
", + "smithy.api#documentation": "A map of attributes to set.
\nThe following lists the names, descriptions, and values of the special request parameters that the SetQueueAttributes
action uses:
\n DelaySeconds
– The length of time, in seconds, for which the delivery of all messages in the queue is delayed. Valid values: An integer from 0 to 900 (15 minutes). Default: 0.\n
\n MaximumMessageSize
– The limit of how many bytes a message can contain before Amazon SQS rejects it. Valid values: An integer from 1,024 bytes (1 KiB) up to 262,144 bytes (256 KiB). Default: 262,144 (256 KiB).\n
\n MessageRetentionPeriod
– The length of time, in seconds, for which Amazon SQS retains a message. Valid values: An integer representing seconds, from 60 (1 minute) to 1,209,600 (14 days). Default: 345,600 (4 days).\n
\n Policy
– The queue's policy. A valid Amazon Web Services policy. For more information about policy structure, see Overview of Amazon Web Services IAM Policies \n in the Identity and Access Management User Guide.\n
\n ReceiveMessageWaitTimeSeconds
– The length of time, in seconds, for which a \n ReceiveMessage\n
action waits for a message to arrive. Valid values: An integer from 0 to 20 (seconds). Default: 0.\n
\n RedrivePolicy
– The string that includes the parameters for the dead-letter queue functionality \n of the source queue as a JSON object. For more information about the redrive policy and dead-letter queues, see Using Amazon SQS Dead-Letter Queues \n in the Amazon SQS Developer Guide.
\n deadLetterTargetArn
– The Amazon Resource Name (ARN) of the dead-letter queue to which Amazon SQS moves messages after the value of maxReceiveCount
is exceeded.
\n maxReceiveCount
– The number of times a message is delivered to the source queue before being moved to the dead-letter queue.\n When the ReceiveCount
for a message exceeds the maxReceiveCount
for a queue, Amazon SQS moves the message to the dead-letter-queue.
The dead-letter queue of a FIFO queue must also be a FIFO queue. Similarly, the dead-letter queue of a standard queue must also be a standard queue.
\n\n VisibilityTimeout
– The visibility timeout for the queue, in seconds. Valid values: An integer from 0 to 43,200 (12 hours). Default: 30. For more information about the visibility timeout,\n see Visibility Timeout in the Amazon SQS Developer Guide.
The following attributes apply only to server-side-encryption:
\n\n KmsMasterKeyId
– The ID of an Amazon Web Services managed customer master key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms.\n While the alias of the AWS-managed CMK for Amazon SQS is always alias/aws/sqs
, the alias of a custom CMK can, for example, be alias/MyAlias\n
.\n For more examples, see KeyId in the Key Management Service API Reference.\n
\n KmsDataKeyReusePeriodSeconds
– The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt \n or decrypt messages before calling KMS again. An integer representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). Default: 300 (5 minutes). A shorter time period provides better security \n but results in more calls to KMS which might incur charges after Free Tier. For more information, see \n How Does the Data Key Reuse Period Work?.\n
\n SqsManagedSseEnabled
– Enables server-side queue encryption using SQS owned encryption keys. Only one server-side encryption option is supported per queue (e.g. SSE-KMS or SSE-SQS).
The following attribute applies only to FIFO (first-in-first-out) queues:
\n\n ContentBasedDeduplication
– Enables content-based deduplication. For more information, see Exactly-once processing in the \n Amazon SQS Developer Guide. Note the following:\n
Every message must have a unique MessageDeduplicationId
.
You may provide a MessageDeduplicationId
explicitly.
If you aren't able to provide a MessageDeduplicationId
and you enable ContentBasedDeduplication
for your queue, \n Amazon SQS uses a SHA-256 hash to generate the MessageDeduplicationId
using the body of the message (but not the attributes of the message).\n
If you don't provide a MessageDeduplicationId
and the queue doesn't have ContentBasedDeduplication
set,\n the action fails with an error.
If the queue has ContentBasedDeduplication
set, your MessageDeduplicationId
overrides the generated one.
When ContentBasedDeduplication
is in effect, messages with identical content sent within the deduplication interval are treated as duplicates \n and only one copy of the message is delivered.
If you send one message with ContentBasedDeduplication
enabled and then another message with a MessageDeduplicationId
that is the same \n as the one generated for the first MessageDeduplicationId
, the two messages are treated as duplicates and only one copy of the message is delivered.\n
The following attributes apply only to \nhigh throughput\nfor FIFO queues:
\n\n DeduplicationScope
– Specifies whether message deduplication occurs at the \n message group or queue level. Valid values are messageGroup
and queue
.
\n FifoThroughputLimit
– Specifies whether the FIFO queue throughput \n quota applies to the entire queue or per message group. Valid values are perQueue
and perMessageGroupId
. \n The perMessageGroupId
value is allowed only when the value for DeduplicationScope
is messageGroup
.
To enable high throughput for FIFO queues, do the following:
\nSet DeduplicationScope
to messageGroup
.
Set FifoThroughputLimit
to perMessageGroupId
.
If you set these attributes to anything other than the values shown for enabling high\n throughput, normal throughput is in effect and deduplication occurs as specified.
\nFor information on throughput quotas, \n see Quotas related to messages \n in the Amazon SQS Developer Guide.
", "smithy.api#required": {}, "smithy.api#xmlFlattened": {}, "smithy.api#xmlName": "Attribute" diff --git a/codegen/sdk-codegen/aws-models/ssm.2014-11-06.json b/codegen/sdk-codegen/aws-models/ssm.2014-11-06.json index 44f7bcf1e44..8cca61e59e3 100644 --- a/codegen/sdk-codegen/aws-models/ssm.2014-11-06.json +++ b/codegen/sdk-codegen/aws-models/ssm.2014-11-06.json @@ -115,31 +115,31 @@ "DefaultInstanceName": { "target": "com.amazonaws.ssm#DefaultInstanceName", "traits": { - "smithy.api#documentation": "A name for the managed instance when it is created.
" + "smithy.api#documentation": "A name for the managed node when it is created.
" } }, "IamRole": { "target": "com.amazonaws.ssm#IamRole", "traits": { - "smithy.api#documentation": "The Identity and Access Management (IAM) role to assign to the managed\n instance.
" + "smithy.api#documentation": "The Identity and Access Management (IAM) role to assign to the managed\n node.
" } }, "RegistrationLimit": { "target": "com.amazonaws.ssm#RegistrationLimit", "traits": { - "smithy.api#documentation": "The maximum number of managed instances that can be registered using this activation.
" + "smithy.api#documentation": "The maximum number of managed nodes that can be registered using this activation.
" } }, "RegistrationsCount": { "target": "com.amazonaws.ssm#RegistrationsCount", "traits": { - "smithy.api#documentation": "The number of managed instances already registered with this activation.
" + "smithy.api#documentation": "The number of managed nodes already registered with this activation.
" } }, "ExpirationDate": { "target": "com.amazonaws.ssm#ExpirationDate", "traits": { - "smithy.api#documentation": "The date when this activation can no longer be used to register managed instances.
" + "smithy.api#documentation": "The date when this activation can no longer be used to register managed nodes.
" } }, "Expired": { @@ -162,7 +162,7 @@ } }, "traits": { - "smithy.api#documentation": "An activation registers one or more on-premises servers or virtual machines (VMs) with Amazon Web Services\n so that you can configure those servers or VMs using Run Command. A server or VM that has been\n registered with Amazon Web Services Systems Manager is called a managed instance.
" + "smithy.api#documentation": "An activation registers one or more on-premises servers or virtual machines (VMs) with Amazon Web Services\n so that you can configure those servers or VMs using Run Command. A server or VM that has been\n registered with Amazon Web Services Systems Manager is called a managed node.
" } }, "com.amazonaws.ssm#ActivationCode": { @@ -221,7 +221,7 @@ } ], "traits": { - "smithy.api#documentation": "Adds or overwrites one or more tags for the specified resource. Tags are metadata that you\n can assign to your documents, managed instances, maintenance windows, Parameter Store parameters,\n and patch baselines. Tags enable you to categorize your resources in different ways, for example,\n by purpose, owner, or environment. Each tag consists of a key and an optional value, both of\n which you define. For example, you could define a set of tags for your account's managed\n instances that helps you track each instance's owner and stack level. For example:
\n\n Key=Owner,Value=DbAdmin
\n
\n Key=Owner,Value=SysAdmin
\n
\n Key=Owner,Value=Dev
\n
\n Key=Stack,Value=Production
\n
\n Key=Stack,Value=Pre-Production
\n
\n Key=Stack,Value=Test
\n
Each resource can have a maximum of 50 tags.
\nWe recommend that you devise a set of tag keys that meets your needs for each resource type.\n Using a consistent set of tag keys makes it easier for you to manage your resources. You can\n search and filter the resources based on the tags you add. Tags don't have any semantic meaning\n to and are interpreted strictly as a string of characters.
\nFor more information about using tags with Amazon Elastic Compute Cloud (Amazon EC2) instances, see Tagging your Amazon EC2\n resources in the Amazon EC2 User Guide.
" + "smithy.api#documentation": "Adds or overwrites one or more tags for the specified resource. Tags are metadata that you\n can assign to your documents, managed nodes, maintenance windows, Parameter Store parameters, and\n patch baselines. Tags enable you to categorize your resources in different ways, for example, by\n purpose, owner, or environment. Each tag consists of a key and an optional value, both of which\n you define. For example, you could define a set of tags for your account's managed nodes that\n helps you track each node's owner and stack level. For example:
\n\n Key=Owner,Value=DbAdmin
\n
\n Key=Owner,Value=SysAdmin
\n
\n Key=Owner,Value=Dev
\n
\n Key=Stack,Value=Production
\n
\n Key=Stack,Value=Pre-Production
\n
\n Key=Stack,Value=Test
\n
Each resource can have a maximum of 50 tags.
\nWe recommend that you devise a set of tag keys that meets your needs for each resource type.\n Using a consistent set of tag keys makes it easier for you to manage your resources. You can\n search and filter the resources based on the tags you add. Tags don't have any semantic meaning\n to and are interpreted strictly as a string of characters.
\nFor more information about using tags with Amazon Elastic Compute Cloud (Amazon EC2) instances, see Tagging your Amazon EC2\n resources in the Amazon EC2 User Guide.
" } }, "com.amazonaws.ssm#AddTagsToResourceRequest": { @@ -230,14 +230,14 @@ "ResourceType": { "target": "com.amazonaws.ssm#ResourceTypeForTagging", "traits": { - "smithy.api#documentation": "Specifies the type of resource you are tagging.
\nThe ManagedInstance
type for this API operation is for on-premises managed\n instances. You must specify the name of the managed instance in the following format:\n mi-ID_number\n
. For example,\n mi-1a2b3c4d5e6f
.
Specifies the type of resource you are tagging.
\nThe ManagedInstance
type for this API operation is for on-premises managed\n nodes. You must specify the name of the managed node in the following format:\n mi-ID_number\n
. For example,\n mi-1a2b3c4d5e6f
.
The resource ID you want to tag.
\nUse the ID of the resource. Here are some examples:
\n\n MaintenanceWindow
: mw-012345abcde
\n
\n PatchBaseline
: pb-012345abcde
\n
\n OpsMetadata
object: ResourceID
for tagging is created from the\n Amazon Resource Name (ARN) for the object. Specifically, ResourceID
is created from\n the strings that come after the word opsmetadata
in the ARN. For example, an\n OpsMetadata object with an ARN of\n arn:aws:ssm:us-east-2:1234567890:opsmetadata/aws/ssm/MyGroup/appmanager
has a\n ResourceID
of either aws/ssm/MyGroup/appmanager
or\n /aws/ssm/MyGroup/appmanager
.
For the Document
and Parameter
values, use the name of the\n resource.
\n ManagedInstance
: mi-012345abcde
\n
The ManagedInstance
type for this API operation is only for on-premises\n managed instances. You must specify the name of the managed instance in the following format:\n mi-ID_number\n
. For example,\n mi-1a2b3c4d5e6f
.
The resource ID you want to tag.
\nUse the ID of the resource. Here are some examples:
\n\n MaintenanceWindow
: mw-012345abcde
\n
\n PatchBaseline
: pb-012345abcde
\n
\n OpsMetadata
object: ResourceID
for tagging is created from the\n Amazon Resource Name (ARN) for the object. Specifically, ResourceID
is created from\n the strings that come after the word opsmetadata
in the ARN. For example, an\n OpsMetadata object with an ARN of\n arn:aws:ssm:us-east-2:1234567890:opsmetadata/aws/ssm/MyGroup/appmanager
has a\n ResourceID
of either aws/ssm/MyGroup/appmanager
or\n /aws/ssm/MyGroup/appmanager
.
For the Document
and Parameter
values, use the name of the\n resource.
\n ManagedInstance
: mi-012345abcde
\n
The ManagedInstance
type for this API operation is only for on-premises\n managed nodes. You must specify the name of the managed node in the following format:\n mi-ID_number\n
. For example,\n mi-1a2b3c4d5e6f
.
Amazon Web Services Systems Manager is a collection of capabilities that helps you automate management tasks such as\n collecting system inventory, applying operating system (OS) patches, automating the creation of\n Amazon Machine Images (AMIs), and configuring operating systems (OSs) and applications at scale.\n Systems Manager lets you remotely and securely manage the configuration of your managed instances. A\n managed instance is any Amazon Elastic Compute Cloud instance (EC2 instance), or any\n on-premises server or virtual machine (VM) in your hybrid environment that has been configured\n for Systems Manager.
\nThis reference is intended to be used with the Amazon Web Services Systems Manager User Guide.
\nTo get started, verify prerequisites and configure managed instances. For more information,\n see Setting up\n Amazon Web Services Systems Manager in the Amazon Web Services Systems Manager User Guide.
\n\n Related resources\n
\nFor information about how to use a Query API, see Making API requests.
\nFor information about other API operations you can perform on EC2 instances, see the\n Amazon EC2 API Reference.
\nFor information about AppConfig, a capability of Systems Manager, see the AppConfig User Guide and the AppConfig API\n Reference.
\nFor information about Incident Manager, a capability of Systems Manager, see the Incident Manager User Guide\n and the Incident Manager API\n Reference.
\nAmazon Web Services Systems Manager is a collection of capabilities that helps you automate management tasks such as\n collecting system inventory, applying operating system (OS) patches, automating the creation of\n Amazon Machine Images (AMIs), and configuring operating systems (OSs) and applications at scale.\n Systems Manager lets you remotely and securely manage the configuration of your managed nodes. A\n managed node is any Amazon Elastic Compute Cloud (Amazon EC2) instance, edge\n device, or on-premises server or virtual machine (VM) that has been configured for\n Systems Manager.
\nWith support for IoT Greengrass Version 2 devices, the phrase managed\n instance has been changed to managed node in most of the Systems Manager\n documentation. The Systems Manager console, API\n calls, error messages, and SSM documents still use the term instance.
\nThis reference is intended to be used with the Amazon Web Services Systems Manager User Guide.
\nTo get started, verify prerequisites and configure managed nodes. For more information, see\n Setting up\n Amazon Web Services Systems Manager in the Amazon Web Services Systems Manager User Guide.
\n\n Related resources\n
\nFor information about how to use a Query API, see Making API requests.
\nFor information about other API operations you can perform on EC2 instances, see the\n Amazon EC2 API Reference.
\nFor information about AppConfig, a capability of Systems Manager, see the AppConfig User Guide and the AppConfig API\n Reference.
\nFor information about Incident Manager, a capability of Systems Manager, see the Incident Manager User Guide\n and the Incident Manager API\n Reference.
\nYou must disassociate a document from all instances before you can delete it.
", + "smithy.api#documentation": "You must disassociate a document from all managed nodes before you can delete it.
", "smithy.api#error": "client" } }, @@ -829,7 +829,7 @@ "InstanceId": { "target": "com.amazonaws.ssm#InstanceId", "traits": { - "smithy.api#documentation": "The instance ID.
" + "smithy.api#documentation": "The managed node ID.
" } }, "AssociationId": { @@ -853,7 +853,7 @@ "Targets": { "target": "com.amazonaws.ssm#Targets", "traits": { - "smithy.api#documentation": "The instances targeted by the request to create an association. You can target all instances\n in an Amazon Web Services account by specifying the InstanceIds
key with a value of\n *
.
The managed nodes targeted by the request to create an association. You can target all\n managed nodes in an Amazon Web Services account by specifying the InstanceIds
key with a value of\n *
.
Describes an association of a Amazon Web Services Systems Manager document (SSM document) and an instance.
" + "smithy.api#documentation": "Describes an association of a Amazon Web Services Systems Manager document (SSM document) and a managed node.
" } }, "com.amazonaws.ssm#AssociationAlreadyExists": { @@ -936,7 +936,7 @@ "InstanceId": { "target": "com.amazonaws.ssm#InstanceId", "traits": { - "smithy.api#documentation": "The instance ID.
" + "smithy.api#documentation": "The managed node ID.
" } }, "AssociationVersion": { @@ -996,7 +996,7 @@ "Targets": { "target": "com.amazonaws.ssm#Targets", "traits": { - "smithy.api#documentation": "The instances targeted by the request.
" + "smithy.api#documentation": "The managed nodes targeted by the request.
" } }, "ScheduleExpression": { @@ -1032,13 +1032,13 @@ "MaxErrors": { "target": "com.amazonaws.ssm#MaxErrors", "traits": { - "smithy.api#documentation": "The number of errors that are allowed before the system stops sending requests to run the\n association on additional targets. You can specify either an absolute number of errors, for\n example 10, or a percentage of the target set, for example 10%. If you specify 3, for example,\n the system stops sending requests when the fourth error is received. If you specify 0, then the\n system stops sending requests after the first error is returned. If you run an association on 50\n instances and set MaxError
to 10%, then the system stops sending the request when\n the sixth error is received.
Executions that are already running an association when MaxErrors
is reached\n are allowed to complete, but some of these executions may fail as well. If you need to ensure\n that there won't be more than max-errors failed executions, set MaxConcurrency
to 1\n so that executions proceed one at a time.
The number of errors that are allowed before the system stops sending requests to run the\n association on additional targets. You can specify either an absolute number of errors, for\n example 10, or a percentage of the target set, for example 10%. If you specify 3, for example,\n the system stops sending requests when the fourth error is received. If you specify 0, then the\n system stops sending requests after the first error is returned. If you run an association on 50\n managed nodes and set MaxError
to 10%, then the system stops sending the request\n when the sixth error is received.
Executions that are already running an association when MaxErrors
is reached\n are allowed to complete, but some of these executions may fail as well. If you need to ensure\n that there won't be more than max-errors failed executions, set MaxConcurrency
to 1\n so that executions proceed one at a time.
The maximum number of targets allowed to run the association at the same time. You can\n specify a number, for example 10, or a percentage of the target set, for example 10%. The default\n value is 100%, which means all targets run the association at the same time.
\nIf a new instance starts and attempts to run an association while Systems Manager is running\n MaxConcurrency
associations, the association is allowed to run. During the next\n association interval, the new instance will process its association within the limit specified\n for MaxConcurrency
.
The maximum number of targets allowed to run the association at the same time. You can\n specify a number, for example 10, or a percentage of the target set, for example 10%. The default\n value is 100%, which means all targets run the association at the same time.
\nIf a new managed node starts and attempts to run an association while Systems Manager is running\n MaxConcurrency
associations, the association is allowed to run. During the next\n association interval, the new managed node will process its association within the limit specified\n for MaxConcurrency
.
The resource ID, for example, the instance ID where the association ran.
" + "smithy.api#documentation": "The resource ID, for example, the managed node ID where the association ran.
" } }, "ResourceType": { "target": "com.amazonaws.ssm#AssociationResourceType", "traits": { - "smithy.api#documentation": "The resource type, for example, instance.
" + "smithy.api#documentation": "The resource type, for example, EC2.
" } }, "Status": { @@ -1557,7 +1557,7 @@ "AssociationStatusAggregatedCount": { "target": "com.amazonaws.ssm#AssociationStatusAggregatedCount", "traits": { - "smithy.api#documentation": "Returns the number of targets for the association status. For example, if you created an\n association with two instances, and one of them was successful, this would return the count of\n instances by status.
" + "smithy.api#documentation": "Returns the number of targets for the association status. For example, if you created an\n association with two managed nodes, and one of them was successful, this would return the count\n of managed nodes by status.
" } } }, @@ -1733,13 +1733,13 @@ "MaxErrors": { "target": "com.amazonaws.ssm#MaxErrors", "traits": { - "smithy.api#documentation": "The number of errors that are allowed before the system stops sending requests to run the\n association on additional targets. You can specify either an absolute number of errors, for\n example 10, or a percentage of the target set, for example 10%. If you specify 3, for example,\n the system stops sending requests when the fourth error is received. If you specify 0, then the\n system stops sending requests after the first error is returned. If you run an association on 50\n instances and set MaxError
to 10%, then the system stops sending the request when\n the sixth error is received.
Executions that are already running an association when MaxErrors
is reached\n are allowed to complete, but some of these executions may fail as well. If you need to ensure\n that there won't be more than max-errors failed executions, set MaxConcurrency
to 1\n so that executions proceed one at a time.
The number of errors that are allowed before the system stops sending requests to run the\n association on additional targets. You can specify either an absolute number of errors, for\n example 10, or a percentage of the target set, for example 10%. If you specify 3, for example,\n the system stops sending requests when the fourth error is received. If you specify 0, then the\n system stops sending requests after the first error is returned. If you run an association on 50\n managed nodes and set MaxError
to 10%, then the system stops sending the request\n when the sixth error is received.
Executions that are already running an association when MaxErrors
is reached\n are allowed to complete, but some of these executions may fail as well. If you need to ensure\n that there won't be more than max-errors failed executions, set MaxConcurrency
to 1\n so that executions proceed one at a time.
The maximum number of targets allowed to run the association at the same time. You can\n specify a number, for example 10, or a percentage of the target set, for example 10%. The default\n value is 100%, which means all targets run the association at the same time.
\nIf a new instance starts and attempts to run an association while Systems Manager is running\n MaxConcurrency
associations, the association is allowed to run. During the next\n association interval, the new instance will process its association within the limit specified\n for MaxConcurrency
.
The maximum number of targets allowed to run the association at the same time. You can\n specify a number, for example 10, or a percentage of the target set, for example 10%. The default\n value is 100%, which means all targets run the association at the same time.
\nIf a new managed node starts and attempts to run an association while Systems Manager is running\n MaxConcurrency
associations, the association is allowed to run. During the next\n association interval, the new managed node will process its association within the limit specified\n for MaxConcurrency
.
Indicates whether the list of approved patches includes non-security updates that should be\n applied to the instances. The default value is false
. Applies to Linux instances\n only.
Indicates whether the list of approved patches includes non-security updates that should be\n applied to the managed nodes. The default value is false
. Applies to Linux managed\n nodes only.
Information about the patches to use to update the instances, including target operating\n systems and source repositories. Applies to Linux instances only.
" + "smithy.api#documentation": "Information about the patches to use to update the managed nodes, including target operating\n systems and source repositories. Applies to Linux managed nodes only.
" } } }, @@ -2915,7 +2915,7 @@ "InstanceIds": { "target": "com.amazonaws.ssm#InstanceIdList", "traits": { - "smithy.api#documentation": "(Optional) A list of instance IDs on which you want to cancel the command. If not provided,\n the command is canceled on every instance on which it was requested.
" + "smithy.api#documentation": "(Optional) A list of managed node IDs on which you want to cancel the command. If not provided,\n the command is canceled on every node on which it was requested.
" } } }, @@ -3074,13 +3074,13 @@ "InstanceIds": { "target": "com.amazonaws.ssm#InstanceIdList", "traits": { - "smithy.api#documentation": "The instance IDs against which this command was requested.
" + "smithy.api#documentation": "The managed node IDs against which this command was requested.
" } }, "Targets": { "target": "com.amazonaws.ssm#Targets", "traits": { - "smithy.api#documentation": "An array of search criteria that targets instances using a Key,Value combination that you\n specify. Targets is required if you don't provide one or more instance IDs in the call.
" + "smithy.api#documentation": "An array of search criteria that targets managed nodes using a Key,Value combination that\n you specify. Targets is required if you don't provide one or more managed node IDs in the\n call.
" } }, "RequestedDateTime": { @@ -3098,7 +3098,7 @@ "StatusDetails": { "target": "com.amazonaws.ssm#StatusDetails", "traits": { - "smithy.api#documentation": "A detailed status of the command execution. StatusDetails
includes more\n information than Status
because it includes states resulting from error and\n concurrency control parameters. StatusDetails
can show different results than\n Status. For more information about these statuses, see Understanding command\n statuses in the Amazon Web Services Systems Manager User Guide. StatusDetails can be one of the\n following values:
Pending: The command hasn't been sent to any instances.
\nIn Progress: The command has been sent to at least one instance but hasn't reached a final\n state on all instances.
\nSuccess: The command successfully ran on all invocations. This is a terminal state.
\nDelivery Timed Out: The value of MaxErrors or more command invocations shows a status of\n Delivery Timed Out. This is a terminal state.
\nExecution Timed Out: The value of MaxErrors or more command invocations shows a status of\n Execution Timed Out. This is a terminal state.
\nFailed: The value of MaxErrors or more command invocations shows a status of Failed. This\n is a terminal state.
\nIncomplete: The command was attempted on all instances and one or more invocations doesn't\n have a value of Success but not enough invocations failed for the status to be Failed. This is\n a terminal state.
\nCanceled: The command was terminated before it was completed. This is a terminal\n state.
\nRate Exceeded: The number of instances targeted by the command exceeded the account limit\n for pending invocations. The system has canceled the command before running it on any instance.\n This is a terminal state.
\nA detailed status of the command execution. StatusDetails
includes more\n information than Status
because it includes states resulting from error and\n concurrency control parameters. StatusDetails
can show different results than\n Status. For more information about these statuses, see Understanding command\n statuses in the Amazon Web Services Systems Manager User Guide. StatusDetails can be one of the\n following values:
Pending: The command hasn't been sent to any managed nodes.
\nIn Progress: The command has been sent to at least one managed node but hasn't reached a final\n state on all managed nodes.
\nSuccess: The command successfully ran on all invocations. This is a terminal state.
\nDelivery Timed Out: The value of MaxErrors or more command invocations shows a status of\n Delivery Timed Out. This is a terminal state.
\nExecution Timed Out: The value of MaxErrors or more command invocations shows a status of\n Execution Timed Out. This is a terminal state.
\nFailed: The value of MaxErrors or more command invocations shows a status of Failed. This\n is a terminal state.
\nIncomplete: The command was attempted on all managed nodes and one or more invocations\n doesn't have a value of Success but not enough invocations failed for the status to be Failed.\n This is a terminal state.
\nCanceled: The command was terminated before it was completed. This is a terminal\n state.
\nRate Exceeded: The number of managed nodes targeted by the command exceeded the account\n limit for pending invocations. The system has canceled the command before running it on any\n managed node. This is a terminal state.
\nThe maximum number of instances that are allowed to run the command at the same time. You\n can specify a number of instances, such as 10, or a percentage of instances, such as 10%. The\n default value is 50. For more information about how to use MaxConcurrency
, see\n Running\n commands using Systems Manager Run Command in the Amazon Web Services Systems Manager User Guide.
The maximum number of managed nodes that are allowed to run the command at the same time.\n You can specify a number of managed nodes, such as 10, or a percentage of nodes, such as 10%. The\n default value is 50. For more information about how to use MaxConcurrency
, see\n Running\n commands using Systems Manager Run Command in the Amazon Web Services Systems Manager User Guide.
The name of the filter.
", + "smithy.api#documentation": "The name of the filter.
\nThe ExecutionStage
filter can't be used with the\n ListCommandInvocations
operation, only with ListCommands
.
The filter value. Valid values for each filter key are as follows:
\n\n InvokedAfter: Specify a timestamp to limit your results.\n For example, specify 2021-07-07T00:00:00Z
to see a list of command executions\n occurring July 7, 2021, and later.
\n InvokedBefore: Specify a timestamp to limit your results.\n For example, specify 2021-07-07T00:00:00Z
to see a list of command executions from\n before July 7, 2021.
\n Status: Specify a valid command status to see a list of\n all command executions with that status. The status choices depend on the API you call.
\nThe status values you can specify for ListCommands
are:
\n Pending
\n
\n InProgress
\n
\n Success
\n
\n Cancelled
\n
\n Failed
\n
\n TimedOut
(this includes both Delivery and Execution time outs)
\n AccessDenied
\n
\n DeliveryTimedOut
\n
\n ExecutionTimedOut
\n
\n Incomplete
\n
\n NoInstancesInTag
\n
\n LimitExceeded
\n
The status values you can specify for ListCommandInvocations
are:
\n Pending
\n
\n InProgress
\n
\n Delayed
\n
\n Success
\n
\n Cancelled
\n
\n Failed
\n
\n TimedOut
(this includes both Delivery and Execution time outs)
\n AccessDenied
\n
\n DeliveryTimedOut
\n
\n ExecutionTimedOut
\n
\n Undeliverable
\n
\n InvalidPlatform
\n
\n Terminated
\n
\n DocumentName: Specify name of the Amazon Web Services Systems Manager document (SSM\n document) for which you want to see command execution results. For example, specify\n AWS-RunPatchBaseline
to see command executions that used this SSM document to\n perform security patching operations on instances.
\n ExecutionStage: Specify one of the following\n values:
\n\n Executing
: Returns a list of command executions that are currently still\n running.
\n Complete
: Returns a list of command executions that have already completed.\n
The filter value. Valid values for each filter key are as follows:
\n\n InvokedAfter: Specify a timestamp to limit your results.\n For example, specify 2021-07-07T00:00:00Z
to see a list of command executions\n occurring July 7, 2021, and later.
\n InvokedBefore: Specify a timestamp to limit your results.\n For example, specify 2021-07-07T00:00:00Z
to see a list of command executions from\n before July 7, 2021.
\n Status: Specify a valid command status to see a list of\n all command executions with that status. The status choices depend on the API you call.
\nThe status values you can specify for ListCommands
are:
\n Pending
\n
\n InProgress
\n
\n Success
\n
\n Cancelled
\n
\n Failed
\n
\n TimedOut
(this includes both Delivery and Execution time outs)
\n AccessDenied
\n
\n DeliveryTimedOut
\n
\n ExecutionTimedOut
\n
\n Incomplete
\n
\n NoInstancesInTag
\n
\n LimitExceeded
\n
The status values you can specify for ListCommandInvocations
are:
\n Pending
\n
\n InProgress
\n
\n Delayed
\n
\n Success
\n
\n Cancelled
\n
\n Failed
\n
\n TimedOut
(this includes both Delivery and Execution time outs)
\n AccessDenied
\n
\n DeliveryTimedOut
\n
\n ExecutionTimedOut
\n
\n Undeliverable
\n
\n InvalidPlatform
\n
\n Terminated
\n
\n DocumentName: Specify name of the Amazon Web Services Systems Manager document (SSM\n document) for which you want to see command execution results. For example, specify\n AWS-RunPatchBaseline
to see command executions that used this SSM document to\n perform security patching operations on managed nodes.
\n ExecutionStage: Specify one of the following values\n (ListCommands
operations only):
\n Executing
: Returns a list of command executions that are currently still\n running.
\n Complete
: Returns a list of command executions that have already completed.\n
Describes a command filter.
\nAn instance ID can't be specified when a command status is Pending
because the\n command hasn't run on the instance yet.
Describes a command filter.
\nA managed node ID can't be specified when a command status is Pending
because the\n command hasn't run on the node yet.
The instance ID in which this invocation was requested.
" + "smithy.api#documentation": "The managed node ID in which this invocation was requested.
" } }, "InstanceName": { "target": "com.amazonaws.ssm#InstanceTagName", "traits": { - "smithy.api#documentation": "The fully qualified host name of the managed instance.
" + "smithy.api#documentation": "The fully qualified host name of the managed node.
" } }, "Comment": { @@ -3305,7 +3305,7 @@ "RequestedDateTime": { "target": "com.amazonaws.ssm#DateTime", "traits": { - "smithy.api#documentation": "The time and date the request was sent to this instance.
" + "smithy.api#documentation": "The time and date the request was sent to this managed node.
" } }, "Status": { @@ -3317,7 +3317,7 @@ "StatusDetails": { "target": "com.amazonaws.ssm#StatusDetails", "traits": { - "smithy.api#documentation": "A detailed status of the command execution for each invocation (each instance targeted by\n the command). StatusDetails includes more information than Status because it includes states\n resulting from error and concurrency control parameters. StatusDetails can show different results\n than Status. For more information about these statuses, see Understanding command\n statuses in the Amazon Web Services Systems Manager User Guide. StatusDetails can be one of the\n following values:
\nPending: The command hasn't been sent to the instance.
\nIn Progress: The command has been sent to the instance but hasn't reached a terminal\n state.
\nSuccess: The execution of the command or plugin was successfully completed. This is a\n terminal state.
\nDelivery Timed Out: The command wasn't delivered to the instance before the delivery\n timeout expired. Delivery timeouts don't count against the parent command's\n MaxErrors
limit, but they do contribute to whether the parent command status is\n Success or Incomplete. This is a terminal state.
Execution Timed Out: Command execution started on the instance, but the execution wasn't\n complete before the execution timeout expired. Execution timeouts count against the\n MaxErrors
limit of the parent command. This is a terminal state.
Failed: The command wasn't successful on the instance. For a plugin, this indicates that\n the result code wasn't zero. For a command invocation, this indicates that the result code for\n one or more plugins wasn't zero. Invocation failures count against the MaxErrors
\n limit of the parent command. This is a terminal state.
Canceled: The command was terminated before it was completed. This is a terminal\n state.
\nUndeliverable: The command can't be delivered to the instance. The instance might not\n exist or might not be responding. Undeliverable invocations don't count against the parent\n command's MaxErrors limit and don't contribute to whether the parent command status is Success\n or Incomplete. This is a terminal state.
\nTerminated: The parent command exceeded its MaxErrors limit and subsequent command\n invocations were canceled by the system. This is a terminal state.
\nA detailed status of the command execution for each invocation (each managed node targeted by\n the command). StatusDetails includes more information than Status because it includes states\n resulting from error and concurrency control parameters. StatusDetails can show different results\n than Status. For more information about these statuses, see Understanding command\n statuses in the Amazon Web Services Systems Manager User Guide. StatusDetails can be one of the\n following values:
\nPending: The command hasn't been sent to the managed node.
\nIn Progress: The command has been sent to the managed node but hasn't reached a terminal\n state.
\nSuccess: The execution of the command or plugin was successfully completed. This is a\n terminal state.
\nDelivery Timed Out: The command wasn't delivered to the managed node before the delivery\n timeout expired. Delivery timeouts don't count against the parent command's\n MaxErrors
limit, but they do contribute to whether the parent command status is\n Success or Incomplete. This is a terminal state.
Execution Timed Out: Command execution started on the managed node, but the execution wasn't\n complete before the execution timeout expired. Execution timeouts count against the\n MaxErrors
limit of the parent command. This is a terminal state.
Failed: The command wasn't successful on the managed node. For a plugin, this indicates that\n the result code wasn't zero. For a command invocation, this indicates that the result code for\n one or more plugins wasn't zero. Invocation failures count against the MaxErrors
\n limit of the parent command. This is a terminal state.
Canceled: The command was terminated before it was completed. This is a terminal\n state.
\nUndeliverable: The command can't be delivered to the managed node. The managed node might not\n exist or might not be responding. Undeliverable invocations don't count against the parent\n command's MaxErrors limit and don't contribute to whether the parent command status is Success\n or Incomplete. This is a terminal state.
\nTerminated: The parent command exceeded its MaxErrors limit and subsequent command\n invocations were canceled by the system. This is a terminal state.
\nThe Identity and Access Management (IAM) service role that Run Command, a capability\n of Amazon Web Services Systems Manager, uses to act on your behalf when sending notifications about command status changes\n on a per instance basis.
" + "smithy.api#documentation": "The Identity and Access Management (IAM) service role that Run Command, a capability\n of Amazon Web Services Systems Manager, uses to act on your behalf when sending notifications about command status changes\n on a per managed node basis.
" } }, "NotificationConfig": { "target": "com.amazonaws.ssm#NotificationConfig", "traits": { - "smithy.api#documentation": "Configurations for sending notifications about command status changes on a per instance\n basis.
" + "smithy.api#documentation": "Configurations for sending notifications about command status changes on a per managed node\n basis.
" } }, "CloudWatchOutputConfig": { @@ -3364,7 +3364,7 @@ } }, "traits": { - "smithy.api#documentation": "An invocation is copy of a command sent to a specific instance. A command can apply to one\n or more instances. A command invocation applies to one instance. For example, if a user runs\n SendCommand against three instances, then a command invocation is created for each requested\n instance ID. A command invocation returns status and detail information about a command you ran.\n
" + "smithy.api#documentation": "An invocation is a copy of a command sent to a specific managed node. A command can apply to one\n or more managed nodes. A command invocation applies to one managed node. For example, if a user runs\n SendCommand
against three managed nodes, then a command invocation is created for\n each requested managed node ID. A command invocation returns status and detail information about a\n command you ran.
A detailed status of the plugin execution. StatusDetails
includes more\n information than Status because it includes states resulting from error and concurrency control\n parameters. StatusDetails can show different results than Status. For more information about\n these statuses, see Understanding command\n statuses in the Amazon Web Services Systems Manager User Guide. StatusDetails can be one of the\n following values:
Pending: The command hasn't been sent to the instance.
\nIn Progress: The command has been sent to the instance but hasn't reached a terminal\n state.
\nSuccess: The execution of the command or plugin was successfully completed. This is a\n terminal state.
\nDelivery Timed Out: The command wasn't delivered to the instance before the delivery\n timeout expired. Delivery timeouts don't count against the parent command's\n MaxErrors
limit, but they do contribute to whether the parent command status is\n Success or Incomplete. This is a terminal state.
Execution Timed Out: Command execution started on the instance, but the execution wasn't\n complete before the execution timeout expired. Execution timeouts count against the\n MaxErrors
limit of the parent command. This is a terminal state.
Failed: The command wasn't successful on the instance. For a plugin, this indicates that\n the result code wasn't zero. For a command invocation, this indicates that the result code for\n one or more plugins wasn't zero. Invocation failures count against the MaxErrors limit of the\n parent command. This is a terminal state.
\nCanceled: The command was terminated before it was completed. This is a terminal\n state.
\nUndeliverable: The command can't be delivered to the instance. The instance might not\n exist, or it might not be responding. Undeliverable invocations don't count against the parent\n command's MaxErrors limit, and they don't contribute to whether the parent command status is\n Success or Incomplete. This is a terminal state.
\nTerminated: The parent command exceeded its MaxErrors limit and subsequent command\n invocations were canceled by the system. This is a terminal state.
\nA detailed status of the plugin execution. StatusDetails
includes more\n information than Status because it includes states resulting from error and concurrency control\n parameters. StatusDetails can show different results than Status. For more information about\n these statuses, see Understanding command\n statuses in the Amazon Web Services Systems Manager User Guide. StatusDetails can be one of the\n following values:
Pending: The command hasn't been sent to the managed node.
\nIn Progress: The command has been sent to the managed node but hasn't reached a terminal\n state.
\nSuccess: The execution of the command or plugin was successfully completed. This is a\n terminal state.
\nDelivery Timed Out: The command wasn't delivered to the managed node before the delivery\n timeout expired. Delivery timeouts don't count against the parent command's\n MaxErrors
limit, but they do contribute to whether the parent command status is\n Success or Incomplete. This is a terminal state.
Execution Timed Out: Command execution started on the managed node, but the execution wasn't\n complete before the execution timeout expired. Execution timeouts count against the\n MaxErrors
limit of the parent command. This is a terminal state.
Failed: The command wasn't successful on the managed node. For a plugin, this indicates that\n the result code wasn't zero. For a command invocation, this indicates that the result code for\n one or more plugins wasn't zero. Invocation failures count against the MaxErrors limit of the\n parent command. This is a terminal state.
\nCanceled: The command was terminated before it was completed. This is a terminal\n state.
\nUndeliverable: The command can't be delivered to the managed node. The managed node might not\n exist, or it might not be responding. Undeliverable invocations don't count against the parent\n command's MaxErrors limit, and they don't contribute to whether the parent command status is\n Success or Incomplete. This is a terminal state.
\nTerminated: The parent command exceeded its MaxErrors limit and subsequent command\n invocations were canceled by the system. This is a terminal state.
\nThe S3 bucket where the responses to the command executions should be stored. This was\n requested when issuing the command. For example, in the following response:
\n\n doc-example-bucket/ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix/i-02573cafcfEXAMPLE/awsrunShellScript
\n
\n doc-example-bucket
is the name of the S3 bucket;
\n ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix
is the name of the S3 prefix;
\n i-02573cafcfEXAMPLE
is the instance ID;
\n awsrunShellScript
is the name of the plugin.
The S3 bucket where the responses to the command executions should be stored. This was\n requested when issuing the command. For example, in the following response:
\n\n doc-example-bucket/ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix/i-02573cafcfEXAMPLE/awsrunShellScript
\n
\n doc-example-bucket
is the name of the S3 bucket;
\n ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix
is the name of the S3 prefix;
\n i-02573cafcfEXAMPLE
is the managed node ID;
\n awsrunShellScript
is the name of the plugin.
The S3 directory path inside the bucket where the responses to the command executions should\n be stored. This was requested when issuing the command. For example, in the following\n response:
\n\n doc-example-bucket/ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix/i-02573cafcfEXAMPLE/awsrunShellScript
\n
\n doc-example-bucket
is the name of the S3 bucket;
\n ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix
is the name of the S3 prefix;
\n i-02573cafcfEXAMPLE
is the instance ID;
\n awsrunShellScript
is the name of the plugin.
The S3 directory path inside the bucket where the responses to the command executions should\n be stored. This was requested when issuing the command. For example, in the following\n response:
\n\n doc-example-bucket/ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix/i-02573cafcfEXAMPLE/awsrunShellScript
\n
\n doc-example-bucket
is the name of the S3 bucket;
\n ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix
is the name of the S3 prefix;
\n i-02573cafcfEXAMPLE
is the managed node ID;
\n awsrunShellScript
is the name of the plugin.
An ID for the resource. For a managed instance, this is the instance ID.
" + "smithy.api#documentation": "An ID for the resource. For a managed node, this is the node ID.
" } }, "Id": { @@ -4118,10 +4118,13 @@ "errors": [ { "target": "com.amazonaws.ssm#InternalServerError" + }, + { + "target": "com.amazonaws.ssm#InvalidParameters" } ], "traits": { - "smithy.api#documentation": "Generates an activation code and activation ID you can use to register your on-premises\n server or virtual machine (VM) with Amazon Web Services Systems Manager. Registering these machines with Systems Manager makes it\n possible to manage them using Systems Manager capabilities. You use the activation code and ID when\n installing SSM Agent on machines in your hybrid environment. For more information about\n requirements for managing on-premises instances and VMs using Systems Manager, see Setting up\n Amazon Web Services Systems Manager for hybrid environments in the Amazon Web Services Systems Manager User Guide.
\nOn-premises servers or VMs that are registered with Systems Manager and Amazon Elastic Compute Cloud (Amazon EC2) instances\n that you manage with Systems Manager are all called managed instances.
\nGenerates an activation code and activation ID you can use to register your on-premises\n servers, edge devices, or virtual machine (VM) with Amazon Web Services Systems Manager. Registering these machines with\n Systems Manager makes it possible to manage them using Systems Manager capabilities. You use the activation code and\n ID when installing SSM Agent on machines in your hybrid environment. For more information about\n requirements for managing on-premises machines using Systems Manager, see Setting up\n Amazon Web Services Systems Manager for hybrid environments in the Amazon Web Services Systems Manager User Guide.
\nAmazon Elastic Compute Cloud (Amazon EC2) instances, edge devices, and on-premises servers and VMs that are configured for Systems Manager are all called managed\n nodes.
\nThe name of the registered, managed instance as it will appear in the Amazon Web Services Systems Manager console or\n when you use the Amazon Web Services command line tools to list Systems Manager resources.
\nDon't enter personally identifiable information in this field.
\nThe name of the registered, managed node as it will appear in the Amazon Web Services Systems Manager console or when\n you use the Amazon Web Services command line tools to list Systems Manager resources.
\nDon't enter personally identifiable information in this field.
\nThe name of the Identity and Access Management (IAM) role that you want to assign to\n the managed instance. This IAM role must provide AssumeRole permissions for the\n Amazon Web Services Systems Manager service principal ssm.amazonaws.com
. For more information, see Create an\n IAM service role for a hybrid environment in the\n Amazon Web Services Systems Manager User Guide.
The name of the Identity and Access Management (IAM) role that you want to assign to\n the managed node. This IAM role must provide AssumeRole permissions for the\n Amazon Web Services Systems Manager service principal ssm.amazonaws.com
. For more information, see Create an\n IAM service role for a hybrid environment in the\n Amazon Web Services Systems Manager User Guide.
Specify the maximum number of managed instances you want to register. The default value is\n 1
.
Specify the maximum number of managed nodes you want to register. The default value is\n 1
.
Optional metadata that you assign to a resource. Tags enable you to categorize a resource in\n different ways, such as by purpose, owner, or environment. For example, you might want to tag an\n activation to identify which servers or virtual machines (VMs) in your on-premises environment\n you intend to activate. In this case, you could specify the following key-value pairs:
\n\n Key=OS,Value=Windows
\n
\n Key=Environment,Value=Production
\n
When you install SSM Agent on your on-premises servers and VMs, you specify an activation ID\n and code. When you specify the activation ID and code, tags assigned to the activation are\n automatically applied to the on-premises servers or VMs.
\nYou can't add tags to or delete tags from an existing activation. You can tag your\n on-premises servers and VMs after they connect to Systems Manager for the first time and are assigned a\n managed instance ID. This means they are listed in the Amazon Web Services Systems Manager console with an ID that is\n prefixed with \"mi-\". For information about how to add tags to your managed instances, see AddTagsToResource. For information about how to remove tags from your managed\n instances, see RemoveTagsFromResource.
" + "smithy.api#documentation": "Optional metadata that you assign to a resource. Tags enable you to categorize a resource in\n different ways, such as by purpose, owner, or environment. For example, you might want to tag an\n activation to identify which servers or virtual machines (VMs) in your on-premises environment\n you intend to activate. In this case, you could specify the following key-value pairs:
\n\n Key=OS,Value=Windows
\n
\n Key=Environment,Value=Production
\n
When you install SSM Agent on your on-premises servers and VMs, you specify an activation ID\n and code. When you specify the activation ID and code, tags assigned to the activation are\n automatically applied to the on-premises servers or VMs.
\nYou can't add tags to or delete tags from an existing activation. You can tag your\n on-premises servers, edge devices, and VMs after they connect to Systems Manager for the first time and are assigned a\n managed node ID. This means they are listed in the Amazon Web Services Systems Manager console with an ID that is\n prefixed with \"mi-\". For information about how to add tags to your managed nodes, see AddTagsToResource. For information about how to remove tags from your managed nodes,\n see RemoveTagsFromResource.
" + } + }, + "RegistrationMetadata": { + "target": "com.amazonaws.ssm#RegistrationMetadataList", + "traits": { + "smithy.api#documentation": "Reserved for internal use.
" } } } @@ -4228,7 +4237,7 @@ } ], "traits": { - "smithy.api#documentation": "A State Manager association defines the state that you want to maintain on your instances.\n For example, an association can specify that anti-virus software must be installed and running on\n your instances, or that certain ports must be closed. For static targets, the association\n specifies a schedule for when the configuration is reapplied. For dynamic targets, such as an\n Amazon Web Services resource group or an Amazon Web Services autoscaling group, State Manager, a capability of Amazon Web Services Systems Manager\n applies the configuration when new instances are added to the group. The association also\n specifies actions to take when applying the configuration. For example, an association for\n anti-virus software might run once a day. If the software isn't installed, then State Manager\n installs it. If the software is installed, but the service isn't running, then the association\n might instruct State Manager to start the service.
" + "smithy.api#documentation": "A State Manager association defines the state that you want to maintain on your managed\n nodes. For example, an association can specify that anti-virus software must be installed and\n running on your managed nodes, or that certain ports must be closed. For static targets, the\n association specifies a schedule for when the configuration is reapplied. For dynamic targets,\n such as an Amazon Web Services resource group or an Amazon Web Services autoscaling group, State Manager, a capability of\n Amazon Web Services Systems Manager applies the configuration when new managed nodes are added to the group. The\n association also specifies actions to take when applying the configuration. For example, an\n association for anti-virus software might run once a day. If the software isn't installed, then\n State Manager installs it. If the software is installed, but the service isn't running, then the\n association might instruct State Manager to start the service.
" } }, "com.amazonaws.ssm#CreateAssociationBatch": { @@ -4275,7 +4284,7 @@ } ], "traits": { - "smithy.api#documentation": "Associates the specified Amazon Web Services Systems Manager document (SSM document) with the specified instances or\n targets.
\nWhen you associate a document with one or more instances using instance IDs or tags,\n Amazon Web Services Systems Manager Agent (SSM Agent) running on the instance processes the document and configures the\n instance as specified.
\nIf you associate a document with an instance that already has an associated document, the\n system returns the AssociationAlreadyExists exception.
" + "smithy.api#documentation": "Associates the specified Amazon Web Services Systems Manager document (SSM document) with the specified managed nodes\n or targets.
\nWhen you associate a document with one or more managed nodes using IDs or tags,\n Amazon Web Services Systems Manager Agent (SSM Agent) running on the managed node processes the document and configures the\n node as specified.
\nIf you associate a document with a managed node that already has an associated document, the\n system returns the AssociationAlreadyExists exception.
" } }, "com.amazonaws.ssm#CreateAssociationBatchRequest": { @@ -4310,14 +4319,14 @@ "Name": { "target": "com.amazonaws.ssm#DocumentARN", "traits": { - "smithy.api#documentation": "The name of the SSM document that contains the configuration information for the instance.\n You can specify Command or Automation runbooks.
\nYou can specify Amazon Web Services-predefined documents, documents you created, or a document that is\n shared with you from another account.
\nFor SSM documents that are shared with you from other Amazon Web Services accounts, you must specify the\n complete SSM document ARN, in the following format:
\n\n arn:aws:ssm:region:account-id:document/document-name\n
\n
For example:
\n\n arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document
\n
For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need\n to specify the document name. For example, AWS-ApplyPatchBaseline
or\n My-Document
.
The name of the SSM document that contains the configuration information for the managed node.\n You can specify Command or Automation runbooks.
\nYou can specify Amazon Web Services-predefined documents, documents you created, or a document that is\n shared with you from another account.
\nFor SSM documents that are shared with you from other Amazon Web Services accounts, you must specify the\n complete SSM document ARN, in the following format:
\n\n arn:aws:ssm:region:account-id:document/document-name\n
\n
For example:
\n\n arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document
\n
For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need\n to specify the document name. For example, AWS-ApplyPatchBaseline
or\n My-Document
.
The instance ID.
\n\n InstanceId
has been deprecated. To specify an instance ID for an association,\n use the Targets
parameter. Requests that include the\n parameter InstanceID
with Systems Manager documents (SSM documents) that use schema version\n 2.0 or later will fail. In addition, if you use the parameter\n InstanceId
, you can't use the parameters AssociationName
,\n DocumentVersion
, MaxErrors
, MaxConcurrency
,\n OutputLocation
, or ScheduleExpression
. To use these parameters, you\n must use the Targets
parameter.
The managed node ID.
\n\n InstanceId
has been deprecated. To specify a managed node ID for an association,\n use the Targets
parameter. Requests that include the\n parameter InstanceID
with Systems Manager documents (SSM documents) that use schema version\n 2.0 or later will fail. In addition, if you use the parameter\n InstanceId
, you can't use the parameters AssociationName
,\n DocumentVersion
, MaxErrors
, MaxConcurrency
,\n OutputLocation
, or ScheduleExpression
. To use these parameters, you\n must use the Targets
parameter.
The instances targeted by the request.
" + "smithy.api#documentation": "The managed nodes targeted by the request.
" } }, "ScheduleExpression": { @@ -4365,13 +4374,13 @@ "MaxErrors": { "target": "com.amazonaws.ssm#MaxErrors", "traits": { - "smithy.api#documentation": "The number of errors that are allowed before the system stops sending requests to run the\n association on additional targets. You can specify either an absolute number of errors, for\n example 10, or a percentage of the target set, for example 10%. If you specify 3, for example,\n the system stops sending requests when the fourth error is received. If you specify 0, then the\n system stops sending requests after the first error is returned. If you run an association on 50\n instances and set MaxError
to 10%, then the system stops sending the request when\n the sixth error is received.
Executions that are already running an association when MaxErrors
is reached\n are allowed to complete, but some of these executions may fail as well. If you need to ensure\n that there won't be more than max-errors failed executions, set MaxConcurrency
to 1\n so that executions proceed one at a time.
The number of errors that are allowed before the system stops sending requests to run the\n association on additional targets. You can specify either an absolute number of errors, for\n example 10, or a percentage of the target set, for example 10%. If you specify 3, for example,\n the system stops sending requests when the fourth error is received. If you specify 0, then the\n system stops sending requests after the first error is returned. If you run an association on 50\n managed nodes and set MaxError
to 10%, then the system stops sending the request\n when the sixth error is received.
Executions that are already running an association when MaxErrors
is reached\n are allowed to complete, but some of these executions may fail as well. If you need to ensure\n that there won't be more than max-errors failed executions, set MaxConcurrency
to 1\n so that executions proceed one at a time.
The maximum number of targets allowed to run the association at the same time. You can\n specify a number, for example 10, or a percentage of the target set, for example 10%. The default\n value is 100%, which means all targets run the association at the same time.
\nIf a new instance starts and attempts to run an association while Systems Manager is running\n MaxConcurrency
associations, the association is allowed to run. During the next\n association interval, the new instance will process its association within the limit specified\n for MaxConcurrency
.
The maximum number of targets allowed to run the association at the same time. You can\n specify a number, for example 10, or a percentage of the target set, for example 10%. The default\n value is 100%, which means all targets run the association at the same time.
\nIf a new managed node starts and attempts to run an association while Systems Manager is running\n MaxConcurrency
associations, the association is allowed to run. During the next\n association interval, the new managed node will process its association within the limit specified\n for MaxConcurrency
.
Describes the association of a Amazon Web Services Systems Manager document (SSM document) and an instance.
" + "smithy.api#documentation": "Describes the association of a Amazon Web Services Systems Manager document (SSM document) and a managed node.
" } }, "com.amazonaws.ssm#CreateAssociationBatchResult": { @@ -4432,7 +4441,7 @@ "Name": { "target": "com.amazonaws.ssm#DocumentARN", "traits": { - "smithy.api#documentation": "The name of the SSM Command document or Automation runbook that contains the configuration\n information for the instance.
\nYou can specify Amazon Web Services-predefined documents, documents you created, or a document that is\n shared with you from another account.
\nFor Systems Manager documents (SSM documents) that are shared with you from other Amazon Web Services accounts, you\n must specify the complete SSM document ARN, in the following format:
\n\n arn:partition:ssm:region:account-id:document/document-name\n
\n
For example:
\n\n arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document
\n
For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need\n to specify the document name. For example, AWS-ApplyPatchBaseline
or\n My-Document
.
The name of the SSM Command document or Automation runbook that contains the configuration\n information for the managed node.
\nYou can specify Amazon Web Services-predefined documents, documents you created, or a document that is\n shared with you from another account.
\nFor Systems Manager documents (SSM documents) that are shared with you from other Amazon Web Services accounts, you\n must specify the complete SSM document ARN, in the following format:
\n\n arn:partition:ssm:region:account-id:document/document-name\n
\n
For example:
\n\n arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document
\n
For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need\n to specify the document name. For example, AWS-ApplyPatchBaseline
or\n My-Document
.
The instance ID.
\n\n InstanceId
has been deprecated. To specify an instance ID for an association,\n use the Targets
parameter. Requests that include the\n parameter InstanceID
with Systems Manager documents (SSM documents) that use schema version\n 2.0 or later will fail. In addition, if you use the parameter\n InstanceId
, you can't use the parameters AssociationName
,\n DocumentVersion
, MaxErrors
, MaxConcurrency
,\n OutputLocation
, or ScheduleExpression
. To use these parameters, you\n must use the Targets
parameter.
The managed node ID.
\n\n InstanceId
has been deprecated. To specify a managed node ID for an association,\n use the Targets
parameter. Requests that include the\n parameter InstanceID
with Systems Manager documents (SSM documents) that use schema version\n 2.0 or later will fail. In addition, if you use the parameter\n InstanceId
, you can't use the parameters AssociationName
,\n DocumentVersion
, MaxErrors
, MaxConcurrency
,\n OutputLocation
, or ScheduleExpression
. To use these parameters, you\n must use the Targets
parameter.
The targets for the association. You can target instances by using tags, Amazon Web Services resource\n groups, all instances in an Amazon Web Services account, or individual instance IDs. You can target all\n instances in an Amazon Web Services account by specifying the InstanceIds
key with a value of\n *
. For more information about choosing targets for an association, see Using targets and rate controls with State Manager associations in the\n Amazon Web Services Systems Manager User Guide.
The targets for the association. You can target managed nodes by using tags, Amazon Web Services resource\n groups, all managed nodes in an Amazon Web Services account, or individual managed node IDs. You can target all\n managed nodes in an Amazon Web Services account by specifying the InstanceIds
key with a value of\n *
. For more information about choosing targets for an association, see Using targets and rate controls with State Manager associations in the\n Amazon Web Services Systems Manager User Guide.
The number of errors that are allowed before the system stops sending requests to run the\n association on additional targets. You can specify either an absolute number of errors, for\n example 10, or a percentage of the target set, for example 10%. If you specify 3, for example,\n the system stops sending requests when the fourth error is received. If you specify 0, then the\n system stops sending requests after the first error is returned. If you run an association on 50\n instances and set MaxError
to 10%, then the system stops sending the request when\n the sixth error is received.
Executions that are already running an association when MaxErrors
is reached\n are allowed to complete, but some of these executions may fail as well. If you need to ensure\n that there won't be more than max-errors failed executions, set MaxConcurrency
to 1\n so that executions proceed one at a time.
The number of errors that are allowed before the system stops sending requests to run the\n association on additional targets. You can specify either an absolute number of errors, for\n example 10, or a percentage of the target set, for example 10%. If you specify 3, for example,\n the system stops sending requests when the fourth error is received. If you specify 0, then the\n system stops sending requests after the first error is returned. If you run an association on 50\n managed nodes and set MaxError
to 10%, then the system stops sending the request\n when the sixth error is received.
Executions that are already running an association when MaxErrors
is reached\n are allowed to complete, but some of these executions may fail as well. If you need to ensure\n that there won't be more than max-errors failed executions, set MaxConcurrency
to 1\n so that executions proceed one at a time.
The maximum number of targets allowed to run the association at the same time. You can\n specify a number, for example 10, or a percentage of the target set, for example 10%. The default\n value is 100%, which means all targets run the association at the same time.
\nIf a new instance starts and attempts to run an association while Systems Manager is running\n MaxConcurrency
associations, the association is allowed to run. During the next\n association interval, the new instance will process its association within the limit specified\n for MaxConcurrency
.
The maximum number of targets allowed to run the association at the same time. You can\n specify a number, for example 10, or a percentage of the target set, for example 10%. The default\n value is 100%, which means all targets run the association at the same time.
\nIf a new managed node starts and attempts to run an association while Systems Manager is running\n MaxConcurrency
associations, the association is allowed to run. During the next\n association interval, the new managed node will process its association within the limit specified\n for MaxConcurrency
.
Creates a Amazon Web Services Systems Manager (SSM document). An SSM document defines the actions that Systems Manager performs\n on your managed instances. For more information about SSM documents, including information about\n supported schemas, features, and syntax, see Amazon Web Services Systems Manager Documents in the\n Amazon Web Services Systems Manager User Guide.
" + "smithy.api#documentation": "Creates a Amazon Web Services Systems Manager (SSM document). An SSM document defines the actions that Systems Manager performs\n on your managed nodes. For more information about SSM documents, including information about\n supported schemas, features, and syntax, see Amazon Web Services Systems Manager Documents in the\n Amazon Web Services Systems Manager User Guide.
" } }, "com.amazonaws.ssm#CreateDocumentRequest": { @@ -4737,7 +4746,7 @@ "AllowUnassociatedTargets": { "target": "com.amazonaws.ssm#MaintenanceWindowAllowUnassociatedTargets", "traits": { - "smithy.api#documentation": "Enables a maintenance window task to run on managed instances, even if you haven't\n registered those instances as targets. If enabled, then you must specify the unregistered\n instances (by instance ID) when you register a task with the maintenance window.
\nIf you don't enable this option, then you must specify previously-registered targets when\n you register a task with the maintenance window.
", + "smithy.api#documentation": "Enables a maintenance window task to run on managed nodes, even if you haven't registered\n those nodes as targets. If enabled, then you must specify the unregistered managed nodes (by\n node ID) when you register a task with the maintenance window.
\nIf you don't enable this option, then you must specify previously-registered targets when\n you register a task with the maintenance window.
", "smithy.api#required": {} } }, @@ -5033,7 +5042,7 @@ "target": "com.amazonaws.ssm#Boolean", "traits": { "smithy.api#box": {}, - "smithy.api#documentation": "Indicates whether the list of approved patches includes non-security updates that should be\n applied to the instances. The default value is false
. Applies to Linux instances\n only.
Indicates whether the list of approved patches includes non-security updates that should be\n applied to the managed nodes. The default value is false
. Applies to Linux managed\n nodes only.
Information about the patches to use to update the instances, including target operating\n systems and source repositories. Applies to Linux instances only.
" + "smithy.api#documentation": "Information about the patches to use to update the managed nodes, including target operating\n systems and source repositories. Applies to Linux managed nodes only.
" } }, "ClientToken": { @@ -5204,7 +5213,7 @@ } ], "traits": { - "smithy.api#documentation": "Deletes an activation. You aren't required to delete an activation. If you delete an\n activation, you can no longer use it to register additional managed instances. Deleting an\n activation doesn't de-register managed instances. You must manually de-register managed\n instances.
" + "smithy.api#documentation": "Deletes an activation. You aren't required to delete an activation. If you delete an\n activation, you can no longer use it to register additional managed nodes. Deleting an activation\n doesn't de-register managed nodes. You must manually de-register managed nodes.
" } }, "com.amazonaws.ssm#DeleteActivationRequest": { @@ -5249,7 +5258,7 @@ } ], "traits": { - "smithy.api#documentation": "Disassociates the specified Amazon Web Services Systems Manager document (SSM document) from the specified instance.\n If you created the association by using the Targets
parameter, then you must delete\n the association by using the association ID.
When you disassociate a document from an instance, it doesn't change the configuration of\n the instance. To change the configuration state of an instance after you disassociate a document,\n you must create a new document with the desired configuration and associate it with the\n instance.
" + "smithy.api#documentation": "Disassociates the specified Amazon Web Services Systems Manager document (SSM document) from the specified managed node.\n If you created the association by using the Targets
parameter, then you must delete\n the association by using the association ID.
When you disassociate a document from a managed node, it doesn't change the configuration of\n the node. To change the configuration state of a managed node after you disassociate a document,\n you must create a new document with the desired configuration and associate it with the\n node.
" } }, "com.amazonaws.ssm#DeleteAssociationRequest": { @@ -5264,7 +5273,7 @@ "InstanceId": { "target": "com.amazonaws.ssm#InstanceId", "traits": { - "smithy.api#documentation": "The instance ID.
\n\n InstanceId
has been deprecated. To specify an instance ID for an association,\n use the Targets
parameter. Requests that include the\n parameter InstanceID
with Systems Manager documents (SSM documents) that use schema version\n 2.0 or later will fail. In addition, if you use the parameter\n InstanceId
, you can't use the parameters AssociationName
,\n DocumentVersion
, MaxErrors
, MaxConcurrency
,\n OutputLocation
, or ScheduleExpression
. To use these parameters, you\n must use the Targets
parameter.
The managed node ID.
\n\n InstanceId
has been deprecated. To specify a managed node ID for an association,\n use the Targets
parameter. Requests that include the\n parameter InstanceID
with Systems Manager documents (SSM documents) that use schema version\n 2.0 or later will fail. In addition, if you use the parameter\n InstanceId
, you can't use the parameters AssociationName
,\n DocumentVersion
, MaxErrors
, MaxConcurrency
,\n OutputLocation
, or ScheduleExpression
. To use these parameters, you\n must use the Targets
parameter.
Deletes the Amazon Web Services Systems Manager document (SSM document) and all instance associations to the\n document.
\nBefore you delete the document, we recommend that you use DeleteAssociation to disassociate all instances that are associated with the document.
" + "smithy.api#documentation": "Deletes the Amazon Web Services Systems Manager document (SSM document) and all managed node associations to the\n document.
\nBefore you delete the document, we recommend that you use DeleteAssociation to disassociate all managed nodes that are associated with the document.
" } }, "com.amazonaws.ssm#DeleteDocumentRequest": { @@ -5646,7 +5655,7 @@ } ], "traits": { - "smithy.api#documentation": "Deletes a resource data sync configuration. After the configuration is deleted, changes to\n data on managed instances are no longer synced to or from the target. Deleting a sync\n configuration doesn't delete data.
" + "smithy.api#documentation": "Deletes a resource data sync configuration. After the configuration is deleted, changes to\n data on managed nodes are no longer synced to or from the target. Deleting a sync configuration\n doesn't delete data.
" } }, "com.amazonaws.ssm#DeleteResourceDataSyncRequest": { @@ -5691,7 +5700,7 @@ } ], "traits": { - "smithy.api#documentation": "Removes the server or virtual machine from the list of registered servers. You can\n reregister the instance again at any time. If you don't plan to use Run Command on the server, we\n suggest uninstalling SSM Agent first.
" + "smithy.api#documentation": "Removes the server or virtual machine from the list of registered servers. You can\n reregister the node again at any time. If you don't plan to use Run Command on the server, we\n suggest uninstalling SSM Agent first.
" } }, "com.amazonaws.ssm#DeregisterManagedInstanceRequest": { @@ -5700,7 +5709,7 @@ "InstanceId": { "target": "com.amazonaws.ssm#ManagedInstanceId", "traits": { - "smithy.api#documentation": "The ID assigned to the managed instance when you registered it using the activation process.\n
", + "smithy.api#documentation": "The ID assigned to the managed node when you registered it using the activation process.\n
", "smithy.api#required": {} } } @@ -5908,7 +5917,7 @@ } ], "traits": { - "smithy.api#documentation": "Describes details about the activation, such as the date and time the activation was\n created, its expiration date, the Identity and Access Management (IAM) role assigned to\n the instances in the activation, and the number of instances registered by using this\n activation.
", + "smithy.api#documentation": "Describes details about the activation, such as the date and time the activation was\n created, its expiration date, the Identity and Access Management (IAM) role assigned to\n the managed nodes in the activation, and the number of nodes registered by using this\n activation.
", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -6029,7 +6038,7 @@ } ], "traits": { - "smithy.api#documentation": "Describes the association for the specified target or instance. If you created the\n association by using the Targets
parameter, then you must retrieve the association\n by using the association ID.
Describes the association for the specified target or managed node. If you created the\n association by using the Targets
parameter, then you must retrieve the association\n by using the association ID.
The instance ID.
" + "smithy.api#documentation": "The managed node ID.
" } }, "AssociationId": { @@ -6220,7 +6229,7 @@ "AssociationVersion": { "target": "com.amazonaws.ssm#AssociationVersion", "traits": { - "smithy.api#documentation": "Specify the association version to retrieve. To view the latest version, either specify\n $LATEST
for this parameter, or omit this parameter. To view a list of all\n associations for an instance, use ListAssociations. To get a list of versions\n for a specific association, use ListAssociationVersions.
Specify the association version to retrieve. To view the latest version, either specify\n $LATEST
for this parameter, or omit this parameter. To view a list of all\n associations for a managed node, use ListAssociations. To get a list of versions\n for a specific association, use ListAssociationVersions.
Each element in the array is a structure containing a key-value pair.
\n\n Windows Server\n
\nSupported keys for Windows Server instance patches include the following:
\n\n \n PATCH_SET
\n \n
Sample values: OS
| APPLICATION
\n
\n \n PRODUCT
\n \n
Sample values: WindowsServer2012
| Office 2010
|\n MicrosoftDefenderAntivirus
\n
\n \n PRODUCT_FAMILY
\n \n
Sample values: Windows
| Office
\n
\n \n MSRC_SEVERITY
\n \n
Sample values: ServicePacks
| Important
| Moderate
\n
\n \n CLASSIFICATION
\n \n
Sample values: ServicePacks
| SecurityUpdates
|\n DefinitionUpdates
\n
\n \n PATCH_ID
\n \n
Sample values: KB123456
| KB4516046
\n
\n Linux\n
\nWhen specifying filters for Linux patches, you must specify a key-pair for\n PRODUCT
. For example, using the Command Line Interface (CLI), the\n following command fails:
\n aws ssm describe-available-patches --filters Key=CVE_ID,Values=CVE-2018-3615
\n
However, the following command succeeds:
\n\n aws ssm describe-available-patches --filters Key=PRODUCT,Values=AmazonLinux2018.03\n Key=CVE_ID,Values=CVE-2018-3615
\n
Supported keys for Linux instance patches include the following:
\n\n \n PRODUCT
\n \n
Sample values: AmazonLinux2018.03
| AmazonLinux2.0
\n
\n \n NAME
\n \n
Sample values: kernel-headers
| samba-python
| php
\n
\n \n SEVERITY
\n \n
Sample values: Critical
| Important
| Medium
|\n Low
\n
\n \n EPOCH
\n \n
Sample values: 0
| 1
\n
\n \n VERSION
\n \n
Sample values: 78.6.1
| 4.10.16
\n
\n \n RELEASE
\n \n
Sample values: 9.56.amzn1
| 1.amzn2
\n
\n \n ARCH
\n \n
Sample values: i686
| x86_64
\n
\n \n REPOSITORY
\n \n
Sample values: Core
| Updates
\n
\n \n ADVISORY_ID
\n \n
Sample values: ALAS-2018-1058
| ALAS2-2021-1594
\n
\n \n CVE_ID
\n \n
Sample values: CVE-2018-3615
| CVE-2020-1472
\n
\n \n BUGZILLA_ID
\n \n
Sample values: 1463241
\n
Each element in the array is a structure containing a key-value pair.
\n\n Windows Server\n
\nSupported keys for Windows Server managed node patches include the following:
\n\n \n PATCH_SET
\n \n
Sample values: OS
| APPLICATION
\n
\n \n PRODUCT
\n \n
Sample values: WindowsServer2012
| Office 2010
|\n MicrosoftDefenderAntivirus
\n
\n \n PRODUCT_FAMILY
\n \n
Sample values: Windows
| Office
\n
\n \n MSRC_SEVERITY
\n \n
Sample values: ServicePacks
| Important
| Moderate
\n
\n \n CLASSIFICATION
\n \n
Sample values: ServicePacks
| SecurityUpdates
|\n DefinitionUpdates
\n
\n \n PATCH_ID
\n \n
Sample values: KB123456
| KB4516046
\n
\n Linux\n
\nWhen specifying filters for Linux patches, you must specify a key-pair for\n PRODUCT
. For example, using the Command Line Interface (CLI), the\n following command fails:
\n aws ssm describe-available-patches --filters Key=CVE_ID,Values=CVE-2018-3615
\n
However, the following command succeeds:
\n\n aws ssm describe-available-patches --filters Key=PRODUCT,Values=AmazonLinux2018.03\n Key=CVE_ID,Values=CVE-2018-3615
\n
Supported keys for Linux managed node patches include the following:
\n\n \n PRODUCT
\n \n
Sample values: AmazonLinux2018.03
| AmazonLinux2.0
\n
\n \n NAME
\n \n
Sample values: kernel-headers
| samba-python
| php
\n
\n \n SEVERITY
\n \n
Sample values: Critical
| Important
| Medium
|\n Low
\n
\n \n EPOCH
\n \n
Sample values: 0
| 1
\n
\n \n VERSION
\n \n
Sample values: 78.6.1
| 4.10.16
\n
\n \n RELEASE
\n \n
Sample values: 9.56.amzn1
| 1.amzn2
\n
\n \n ARCH
\n \n
Sample values: i686
| x86_64
\n
\n \n REPOSITORY
\n \n
Sample values: Core
| Updates
\n
\n \n ADVISORY_ID
\n \n
Sample values: ALAS-2018-1058
| ALAS2-2021-1594
\n
\n \n CVE_ID
\n \n
Sample values: CVE-2018-3615
| CVE-2020-1472
\n
\n \n BUGZILLA_ID
\n \n
Sample values: 1463241
\n
All associations for the instance(s).
", + "smithy.api#documentation": "All associations for the managed node(s).
", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -6640,7 +6649,7 @@ "InstanceId": { "target": "com.amazonaws.ssm#InstanceId", "traits": { - "smithy.api#documentation": "The instance ID for which you want to view all associations.
", + "smithy.api#documentation": "The managed node ID for which you want to view all associations.
", "smithy.api#required": {} } }, @@ -6665,7 +6674,7 @@ "Associations": { "target": "com.amazonaws.ssm#InstanceAssociationList", "traits": { - "smithy.api#documentation": "The associations for the requested instance.
" + "smithy.api#documentation": "The associations for the requested managed node.
" } }, "NextToken": { @@ -6770,7 +6779,7 @@ } ], "traits": { - "smithy.api#documentation": "The status of the associations for the instance(s).
", + "smithy.api#documentation": "The status of the associations for the managed node(s).
", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -6785,7 +6794,7 @@ "InstanceId": { "target": "com.amazonaws.ssm#InstanceId", "traits": { - "smithy.api#documentation": "The instance IDs for which you want association status information.
", + "smithy.api#documentation": "The managed node IDs for which you want association status information.
", "smithy.api#required": {} } }, @@ -6847,7 +6856,7 @@ } ], "traits": { - "smithy.api#documentation": "Describes one or more of your instances, including information about the operating system\n platform, the version of SSM Agent installed on the instance, instance status, and so on.
\nIf you specify one or more instance IDs, it returns information for those instances. If you\n don't specify instance IDs, it returns information for all your instances. If you specify an\n instance ID that isn't valid or an instance that you don't own, you receive an error.
\nThe IamRole
field for this API operation is the Identity and Access Management\n (IAM) role assigned to on-premises instances. This call doesn't return the\n IAM role for EC2 instances.
Describes one or more of your managed nodes, including information about the operating\n system platform, the version of SSM Agent installed on the managed node, node status, and so\n on.
\nIf you specify one or more managed node IDs, it returns information for those managed nodes. If\n you don't specify node IDs, it returns information for all your managed nodes. If you specify\n a node ID that isn't valid or a node that you don't own, you receive an error.
\nThe IamRole
field for this API operation is the Identity and Access Management\n (IAM) role assigned to on-premises managed nodes. This call doesn't return the\n IAM role for EC2 instances.
This is a legacy method. We recommend that you don't use this method. Instead, use the\n Filters
data type. Filters
enables you to return instance information\n by filtering based on tags applied to managed instances.
Attempting to use InstanceInformationFilterList
and Filters
leads\n to an exception error.
This is a legacy method. We recommend that you don't use this method. Instead, use the\n Filters
data type. Filters
enables you to return node information\n by filtering based on tags applied to managed nodes.
Attempting to use InstanceInformationFilterList
and Filters
leads\n to an exception error.
One or more filters. Use a filter to return a more specific list of instances. You can\n filter based on tags applied to EC2 instances. Use this Filters
data type instead of\n InstanceInformationFilterList
, which is deprecated.
One or more filters. Use a filter to return a more specific list of managed nodes. You can\n filter based on tags applied to EC2 instances. Use this Filters
data type instead of\n InstanceInformationFilterList
, which is deprecated.
The instance information list.
" + "smithy.api#documentation": "The managed node information list.
" } }, "NextToken": { @@ -6920,7 +6929,7 @@ } ], "traits": { - "smithy.api#documentation": "Retrieves the high-level patch state of one or more instances.
", + "smithy.api#documentation": "Retrieves the high-level patch state of one or more managed nodes.
", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -6949,7 +6958,7 @@ } ], "traits": { - "smithy.api#documentation": "Retrieves the high-level patch state for the instances in the specified patch group.
", + "smithy.api#documentation": "Retrieves the high-level patch state for the managed nodes in the specified patch group.
", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -6995,7 +7004,7 @@ "InstancePatchStates": { "target": "com.amazonaws.ssm#InstancePatchStatesList", "traits": { - "smithy.api#documentation": "The high-level patch state for the requested instances.
" + "smithy.api#documentation": "The high-level patch state for the requested managed nodes.
" } }, "NextToken": { @@ -7012,7 +7021,7 @@ "InstanceIds": { "target": "com.amazonaws.ssm#InstanceIdList", "traits": { - "smithy.api#documentation": "The ID of the instance for which patch state information should be retrieved.
", + "smithy.api#documentation": "The ID of the managed node for which patch state information should be retrieved.
", "smithy.api#required": {} } }, @@ -7026,7 +7035,7 @@ "target": "com.amazonaws.ssm#PatchComplianceMaxResults", "traits": { "smithy.api#box": {}, - "smithy.api#documentation": "The maximum number of instances to return (per page).
" + "smithy.api#documentation": "The maximum number of managed nodes to return (per page).
" } } } @@ -7037,7 +7046,7 @@ "InstancePatchStates": { "target": "com.amazonaws.ssm#InstancePatchStateList", "traits": { - "smithy.api#documentation": "The high-level patch state for the requested instances.
" + "smithy.api#documentation": "The high-level patch state for the requested managed nodes.
" } }, "NextToken": { @@ -7071,7 +7080,7 @@ } ], "traits": { - "smithy.api#documentation": "Retrieves information about the patches on the specified instance and their state relative\n to the patch baseline being used for the instance.
", + "smithy.api#documentation": "Retrieves information about the patches on the specified managed node and their state relative\n to the patch baseline being used for the node.
", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -7086,7 +7095,7 @@ "InstanceId": { "target": "com.amazonaws.ssm#InstanceId", "traits": { - "smithy.api#documentation": "The ID of the instance whose patch state information should be retrieved.
", + "smithy.api#documentation": "The ID of the managed node whose patch state information should be retrieved.
", "smithy.api#required": {} } }, @@ -7462,7 +7471,7 @@ "Targets": { "target": "com.amazonaws.ssm#Targets", "traits": { - "smithy.api#documentation": "The instance ID or key-value pair to retrieve information about.
" + "smithy.api#documentation": "The managed node ID or key-value pair to retrieve information about.
" } }, "ResourceType": { @@ -7694,7 +7703,7 @@ } ], "traits": { - "smithy.api#documentation": "Retrieves information about the maintenance window targets or tasks that an instance is\n associated with.
", + "smithy.api#documentation": "Retrieves information about the maintenance window targets or tasks that a managed node is\n associated with.
", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -7709,7 +7718,7 @@ "Targets": { "target": "com.amazonaws.ssm#Targets", "traits": { - "smithy.api#documentation": "The instance ID or key-value pair to retrieve information about.
", + "smithy.api#documentation": "The managed node ID or key-value pair to retrieve information about.
", "smithy.api#required": {} } }, @@ -7741,7 +7750,7 @@ "WindowIdentities": { "target": "com.amazonaws.ssm#MaintenanceWindowsForTargetList", "traits": { - "smithy.api#documentation": "Information about the maintenance window targets and tasks an instance is associated\n with.
" + "smithy.api#documentation": "Information about the maintenance window targets and tasks a managed node is associated\n with.
" } }, "NextToken": { @@ -8039,79 +8048,79 @@ "Instances": { "target": "com.amazonaws.ssm#Integer", "traits": { - "smithy.api#documentation": "The number of instances in the patch group.
" + "smithy.api#documentation": "The number of managed nodes in the patch group.
" } }, "InstancesWithInstalledPatches": { "target": "com.amazonaws.ssm#Integer", "traits": { - "smithy.api#documentation": "The number of instances with installed patches.
" + "smithy.api#documentation": "The number of managed nodes with installed patches.
" } }, "InstancesWithInstalledOtherPatches": { "target": "com.amazonaws.ssm#Integer", "traits": { - "smithy.api#documentation": "The number of instances with patches installed that aren't defined in the patch\n baseline.
" + "smithy.api#documentation": "The number of managed nodes with patches installed that aren't defined in the patch\n baseline.
" } }, "InstancesWithInstalledPendingRebootPatches": { "target": "com.amazonaws.ssm#InstancesCount", "traits": { "smithy.api#box": {}, - "smithy.api#documentation": "The number of instances with patches installed by Patch Manager that haven't been rebooted\n after the patch installation. The status of these instances is NON_COMPLIANT
.
The number of managed nodes with patches installed by Patch Manager that haven't been\n rebooted after the patch installation. The status of these managed nodes is\n NON_COMPLIANT
.
The number of instances with patches installed that are specified in a\n RejectedPatches
list. Patches with a status of INSTALLED_REJECTED
were\n typically installed before they were added to a RejectedPatches
list.
If ALLOW_AS_DEPENDENCY
is the specified option for\n RejectedPatchesAction
, the value of\n InstancesWithInstalledRejectedPatches
will always be 0
(zero).
The number of managed nodes with patches installed that are specified in a\n RejectedPatches
list. Patches with a status of INSTALLED_REJECTED
were\n typically installed before they were added to a RejectedPatches
list.
If ALLOW_AS_DEPENDENCY
is the specified option for\n RejectedPatchesAction
, the value of\n InstancesWithInstalledRejectedPatches
will always be 0
(zero).
The number of instances with missing patches from the patch baseline.
" + "smithy.api#documentation": "The number of managed nodes with missing patches from the patch baseline.
" } }, "InstancesWithFailedPatches": { "target": "com.amazonaws.ssm#Integer", "traits": { - "smithy.api#documentation": "The number of instances with patches from the patch baseline that failed to install.
" + "smithy.api#documentation": "The number of managed nodes with patches from the patch baseline that failed to\n install.
" } }, "InstancesWithNotApplicablePatches": { "target": "com.amazonaws.ssm#Integer", "traits": { - "smithy.api#documentation": "The number of instances with patches that aren't applicable.
" + "smithy.api#documentation": "The number of managed nodes with patches that aren't applicable.
" } }, "InstancesWithUnreportedNotApplicablePatches": { "target": "com.amazonaws.ssm#Integer", "traits": { "smithy.api#box": {}, - "smithy.api#documentation": "The number of instances with NotApplicable
patches beyond the supported limit,\n which aren't reported by name to Inventory. Inventory is a capability of Amazon Web Services Systems Manager.
The number of managed nodes with NotApplicable
patches beyond the supported\n limit, which aren't reported by name to Inventory. Inventory is a capability of Amazon Web Services Systems Manager.
The number of instances where patches that are specified as Critical
for\n compliance reporting in the patch baseline aren't installed. These patches might be missing, have\n failed installation, were rejected, or were installed but awaiting a required instance reboot.\n The status of these instances is NON_COMPLIANT
.
The number of managed nodes where patches that are specified as Critical
for\n compliance reporting in the patch baseline aren't installed. These patches might be missing, have\n failed installation, were rejected, or were installed but awaiting a required managed node reboot.\n The status of these managed nodes is NON_COMPLIANT
.
The number of instances where patches that are specified as Security
in a patch\n advisory aren't installed. These patches might be missing, have failed installation, were\n rejected, or were installed but awaiting a required instance reboot. The status of these\n instances is NON_COMPLIANT
.
The number of managed nodes where patches that are specified as Security
in a\n patch advisory aren't installed. These patches might be missing, have failed installation, were\n rejected, or were installed but awaiting a required managed node reboot. The status of these managed\n nodes is NON_COMPLIANT
.
The number of instances with patches installed that are specified as other than\n Critical
or Security
but aren't compliant with the patch baseline. The\n status of these instances is NON_COMPLIANT
.
The number of managed nodes with patches installed that are specified as other than\n Critical
or Security
but aren't compliant with the patch baseline. The\n status of these managed nodes is NON_COMPLIANT
.
You can't specify an instance ID in more than one association.
", + "smithy.api#documentation": "You can't specify a managed node ID in more than one association.
", "smithy.api#error": "client" } }, @@ -9798,7 +9807,7 @@ } ], "traits": { - "smithy.api#documentation": "Returns detailed information about command execution for an invocation or plugin.
\n\n GetCommandInvocation
only gives the execution status of a plugin in a document.\n To get the command execution status on a specific instance, use ListCommandInvocations. To get the command execution status across instances, use\n ListCommands.
Returns detailed information about command execution for an invocation or plugin.
\n\n GetCommandInvocation
only gives the execution status of a plugin in a document.\n To get the command execution status on a specific managed node, use ListCommandInvocations. To get the command execution status across managed nodes,\n use ListCommands.
(Required) The ID of the managed instance targeted by the command. A managed instance can be\n an Amazon Elastic Compute Cloud (Amazon EC2) instance or an instance in your hybrid environment that is configured for\n Amazon Web Services Systems Manager.
", + "smithy.api#documentation": "(Required) The ID of the managed node targeted by the command. A managed node can be an\n Amazon Elastic Compute Cloud (Amazon EC2) instance, edge device, and on-premises server or VM in your hybrid environment that is configured for Amazon Web Services Systems Manager.
", "smithy.api#required": {} } }, @@ -9931,7 +9940,7 @@ "InstanceId": { "target": "com.amazonaws.ssm#InstanceId", "traits": { - "smithy.api#documentation": "The ID of the managed instance targeted by the command. A managed instance can be an EC2\n instance or an instance in your hybrid environment that is configured for Systems Manager.
" + "smithy.api#documentation": "The ID of the managed node targeted by the command. A managed node can be an\n Amazon Elastic Compute Cloud (Amazon EC2) instance, edge device, or on-premises server or VM in your hybrid environment that is configured for Amazon Web Services Systems Manager.
" } }, "Comment": { @@ -9961,7 +9970,7 @@ "ResponseCode": { "target": "com.amazonaws.ssm#ResponseCode", "traits": { - "smithy.api#documentation": "The error level response code for the plugin script. If the response code is\n -1
, then the command hasn't started running on the instance, or it wasn't received\n by the instance.
The error level response code for the plugin script. If the response code is\n -1
, then the command hasn't started running on the managed node, or it wasn't received\n by the node.
A detailed status of the command execution for an invocation. StatusDetails
\n includes more information than Status
because it includes states resulting from\n error and concurrency control parameters. StatusDetails
can show different results\n than Status
. For more information about these statuses, see Understanding\n command statuses in the Amazon Web Services Systems Manager User Guide.\n StatusDetails
can be one of the following values:
Pending: The command hasn't been sent to the instance.
\nIn Progress: The command has been sent to the instance but hasn't reached a terminal\n state.
\nDelayed: The system attempted to send the command to the target, but the target wasn't\n available. The instance might not be available because of network issues, because the instance\n was stopped, or for similar reasons. The system will try to send the command again.
\nSuccess: The command or plugin ran successfully. This is a terminal state.
\nDelivery Timed Out: The command wasn't delivered to the instance before the delivery\n timeout expired. Delivery timeouts don't count against the parent command's\n MaxErrors
limit, but they do contribute to whether the parent command status is\n Success or Incomplete. This is a terminal state.
Execution Timed Out: The command started to run on the instance, but the execution wasn't\n complete before the timeout expired. Execution timeouts count against the\n MaxErrors
limit of the parent command. This is a terminal state.
Failed: The command wasn't run successfully on the instance. For a plugin, this indicates\n that the result code wasn't zero. For a command invocation, this indicates that the result code\n for one or more plugins wasn't zero. Invocation failures count against the\n MaxErrors
limit of the parent command. This is a terminal state.
Canceled: The command was terminated before it was completed. This is a terminal\n state.
\nUndeliverable: The command can't be delivered to the instance. The instance might not\n exist or might not be responding. Undeliverable invocations don't count against the parent\n command's MaxErrors
limit and don't contribute to whether the parent command\n status is Success or Incomplete. This is a terminal state.
Terminated: The parent command exceeded its MaxErrors
limit and subsequent\n command invocations were canceled by the system. This is a terminal state.
A detailed status of the command execution for an invocation. StatusDetails
\n includes more information than Status
because it includes states resulting from\n error and concurrency control parameters. StatusDetails
can show different results\n than Status
. For more information about these statuses, see Understanding\n command statuses in the Amazon Web Services Systems Manager User Guide.\n StatusDetails
can be one of the following values:
Pending: The command hasn't been sent to the managed node.
\nIn Progress: The command has been sent to the managed node but hasn't reached a terminal\n state.
\nDelayed: The system attempted to send the command to the target, but the target wasn't\n available. The managed node might not be available because of network issues, because the node\n was stopped, or for similar reasons. The system will try to send the command again.
\nSuccess: The command or plugin ran successfully. This is a terminal state.
\nDelivery Timed Out: The command wasn't delivered to the managed node before the delivery\n timeout expired. Delivery timeouts don't count against the parent command's\n MaxErrors
limit, but they do contribute to whether the parent command status is\n Success or Incomplete. This is a terminal state.
Execution Timed Out: The command started to run on the managed node, but the execution wasn't\n complete before the timeout expired. Execution timeouts count against the\n MaxErrors
limit of the parent command. This is a terminal state.
Failed: The command wasn't run successfully on the managed node. For a plugin, this indicates\n that the result code wasn't zero. For a command invocation, this indicates that the result code\n for one or more plugins wasn't zero. Invocation failures count against the\n MaxErrors
limit of the parent command. This is a terminal state.
Canceled: The command was terminated before it was completed. This is a terminal\n state.
\nUndeliverable: The command can't be delivered to the managed node. The node might not\n exist or might not be responding. Undeliverable invocations don't count against the parent\n command's MaxErrors
limit and don't contribute to whether the parent command\n status is Success or Incomplete. This is a terminal state.
Terminated: The parent command exceeded its MaxErrors
limit and subsequent\n command invocations were canceled by the system. This is a terminal state.
Retrieves the Session Manager connection status for an instance to determine whether it is running and\n ready to receive Session Manager connections.
" + "smithy.api#documentation": "Retrieves the Session Manager connection status for a managed node to determine whether it is running and\n ready to receive Session Manager connections.
" } }, "com.amazonaws.ssm#GetConnectionStatusRequest": { @@ -10049,7 +10058,7 @@ "Target": { "target": "com.amazonaws.ssm#SessionTarget", "traits": { - "smithy.api#documentation": "The instance ID.
", + "smithy.api#documentation": "The managed node ID.
", "smithy.api#required": {} } } @@ -10061,13 +10070,13 @@ "Target": { "target": "com.amazonaws.ssm#SessionTarget", "traits": { - "smithy.api#documentation": "The ID of the instance to check connection status.
" + "smithy.api#documentation": "The ID of the managed node to check connection status.
" } }, "Status": { "target": "com.amazonaws.ssm#ConnectionStatus", "traits": { - "smithy.api#documentation": "The status of the connection to the instance. For example, 'Connected' or 'Not\n Connected'.
" + "smithy.api#documentation": "The status of the connection to the managed node. For example, 'Connected' or 'Not\n Connected'.
" } } } @@ -10137,7 +10146,7 @@ } ], "traits": { - "smithy.api#documentation": "Retrieves the current snapshot for the patch baseline the instance uses. This API is\n primarily used by the AWS-RunPatchBaseline
Systems Manager document (SSM document).
If you run the command locally, such as with the Command Line Interface (CLI), the system attempts to use your local Amazon Web Services credentials and the operation fails. To avoid\n this, you can run the command in the Amazon Web Services Systems Manager console. Use Run Command, a capability of\n Amazon Web Services Systems Manager, with an SSM document that enables you to target an instance with a script or command.\n For example, run the command using the AWS-RunShellScript
document or the\n AWS-RunPowerShellScript
document.
Retrieves the current snapshot for the patch baseline the managed node uses. This API is\n primarily used by the AWS-RunPatchBaseline
Systems Manager document (SSM document).
If you run the command locally, such as with the Command Line Interface (CLI), the system attempts to use your local Amazon Web Services credentials and the operation fails. To avoid\n this, you can run the command in the Amazon Web Services Systems Manager console. Use Run Command, a capability of\n Amazon Web Services Systems Manager, with an SSM document that enables you to target a managed node with a script or command.\n For example, run the command using the AWS-RunShellScript
document or the\n AWS-RunPowerShellScript
document.
The ID of the instance for which the appropriate patch snapshot should be retrieved.
", + "smithy.api#documentation": "The ID of the managed node for which the appropriate patch snapshot should be retrieved.
", "smithy.api#required": {} } }, @@ -10171,7 +10180,7 @@ "InstanceId": { "target": "com.amazonaws.ssm#InstanceId", "traits": { - "smithy.api#documentation": "The instance ID.
" + "smithy.api#documentation": "The managed node ID.
" } }, "SnapshotId": { @@ -10189,7 +10198,7 @@ "Product": { "target": "com.amazonaws.ssm#Product", "traits": { - "smithy.api#documentation": "Returns the specific operating system (for example Windows Server 2012 or Amazon Linux\n 2015.09) on the instance for the specified patch snapshot.
" + "smithy.api#documentation": "Returns the specific operating system (for example Windows Server 2012 or Amazon Linux\n 2015.09) on the managed node for the specified patch snapshot.
" } } } @@ -10362,7 +10371,7 @@ } ], "traits": { - "smithy.api#documentation": "Query inventory information. This includes instance status, such as Stopped
or\n Terminated
.
Query inventory information. This includes managed node status, such as Stopped
or\n Terminated
.
Returns counts of inventory types based on one or more expressions. For example, if you\n aggregate by using an expression that uses the AWS:InstanceInformation.PlatformType
\n type, you can see a count of how many Windows and Linux instances exist in your inventoried\n fleet.
Returns counts of inventory types based on one or more expressions. For example, if you\n aggregate by using an expression that uses the AWS:InstanceInformation.PlatformType
\n type, you can see a count of how many Windows and Linux managed nodes exist in your inventoried\n fleet.
Collection of inventory entities such as a collection of instance inventory.
" + "smithy.api#documentation": "Collection of inventory entities such as a collection of managed node inventory.
" } }, "NextToken": { @@ -11758,7 +11767,7 @@ "target": "com.amazonaws.ssm#Boolean", "traits": { "smithy.api#box": {}, - "smithy.api#documentation": "Indicates whether the list of approved patches includes non-security updates that should be\n applied to the instances. The default value is false
. Applies to Linux instances\n only.
Indicates whether the list of approved patches includes non-security updates that should be\n applied to the managed nodes. The default value is false
. Applies to Linux managed\n nodes only.
Information about the patches to use to update the instances, including target operating\n systems and source repositories. Applies to Linux instances only.
" + "smithy.api#documentation": "Information about the patches to use to update the managed nodes, including target operating\n systems and source repositories. Applies to Linux managed nodes only.
" } } } @@ -11977,7 +11986,7 @@ "InstanceAssociationStatusAggregatedCount": { "target": "com.amazonaws.ssm#InstanceAssociationStatusAggregatedCount", "traits": { - "smithy.api#documentation": "The number of associations for the instance(s).
" + "smithy.api#documentation": "The number of associations for the managed node(s).
" } } }, @@ -11997,24 +12006,24 @@ "InstanceId": { "target": "com.amazonaws.ssm#InstanceId", "traits": { - "smithy.api#documentation": "The instance ID.
" + "smithy.api#documentation": "The managed node ID.
" } }, "Content": { "target": "com.amazonaws.ssm#DocumentContent", "traits": { - "smithy.api#documentation": "The content of the association document for the instance(s).
" + "smithy.api#documentation": "The content of the association document for the managed node(s).
" } }, "AssociationVersion": { "target": "com.amazonaws.ssm#AssociationVersion", "traits": { - "smithy.api#documentation": "Version information for the association on the instance.
" + "smithy.api#documentation": "Version information for the association on the managed node.
" } } }, "traits": { - "smithy.api#documentation": "One or more association documents on the instance.
" + "smithy.api#documentation": "One or more association documents on the managed node.
" } }, "com.amazonaws.ssm#InstanceAssociationExecutionSummary": { @@ -12093,31 +12102,31 @@ "AssociationVersion": { "target": "com.amazonaws.ssm#AssociationVersion", "traits": { - "smithy.api#documentation": "The version of the association applied to the instance.
" + "smithy.api#documentation": "The version of the association applied to the managed node.
" } }, "InstanceId": { "target": "com.amazonaws.ssm#InstanceId", "traits": { - "smithy.api#documentation": "The instance ID where the association was created.
" + "smithy.api#documentation": "The managed node ID where the association was created.
" } }, "ExecutionDate": { "target": "com.amazonaws.ssm#DateTime", "traits": { - "smithy.api#documentation": "The date the instance association ran.
" + "smithy.api#documentation": "The date the association ran.
" } }, "Status": { "target": "com.amazonaws.ssm#StatusName", "traits": { - "smithy.api#documentation": "Status information about the instance association.
" + "smithy.api#documentation": "Status information about the association.
" } }, "DetailedStatus": { "target": "com.amazonaws.ssm#StatusName", "traits": { - "smithy.api#documentation": "Detailed status information about the instance association.
" + "smithy.api#documentation": "Detailed status information about the association.
" } }, "ExecutionSummary": { @@ -12141,12 +12150,12 @@ "AssociationName": { "target": "com.amazonaws.ssm#AssociationName", "traits": { - "smithy.api#documentation": "The name of the association applied to the instance.
" + "smithy.api#documentation": "The name of the association applied to the managed node.
" } } }, "traits": { - "smithy.api#documentation": "Status information about the instance association.
" + "smithy.api#documentation": "Status information about the association.
" } }, "com.amazonaws.ssm#InstanceAssociationStatusInfos": { @@ -12182,7 +12191,7 @@ "InstanceId": { "target": "com.amazonaws.ssm#InstanceId", "traits": { - "smithy.api#documentation": "The instance ID.
" + "smithy.api#documentation": "The managed node ID.
" } }, "PingStatus": { @@ -12200,14 +12209,14 @@ "AgentVersion": { "target": "com.amazonaws.ssm#Version", "traits": { - "smithy.api#documentation": "The version of SSM Agent running on your Linux instance.
" + "smithy.api#documentation": "The version of SSM Agent running on your Linux managed node.
" } }, "IsLatestVersion": { "target": "com.amazonaws.ssm#Boolean", "traits": { "smithy.api#box": {}, - "smithy.api#documentation": "Indicates whether the latest version of SSM Agent is running on your Linux Managed Instance.\n This field doesn't indicate whether or not the latest version is installed on Windows managed\n instances, because some older versions of Windows Server use the EC2Config service to process\n Systems Manager requests.
" + "smithy.api#documentation": "Indicates whether the latest version of SSM Agent is running on your Linux managed node. This\n field doesn't indicate whether or not the latest version is installed on Windows managed nodes,\n because some older versions of Windows Server use the EC2Config service to process Systems Manager\n requests.
" } }, "PlatformType": { @@ -12219,13 +12228,13 @@ "PlatformName": { "target": "com.amazonaws.ssm#String", "traits": { - "smithy.api#documentation": "The name of the operating system platform running on your instance.
" + "smithy.api#documentation": "The name of the operating system platform running on your managed node.
" } }, "PlatformVersion": { "target": "com.amazonaws.ssm#String", "traits": { - "smithy.api#documentation": "The version of the OS platform running on your instance.
" + "smithy.api#documentation": "The version of the OS platform running on your managed node.
" } }, "ActivationId": { @@ -12237,13 +12246,13 @@ "IamRole": { "target": "com.amazonaws.ssm#IamRole", "traits": { - "smithy.api#documentation": "The Identity and Access Management (IAM) role assigned to the on-premises Systems Manager\n managed instance. This call doesn't return the IAM role for Amazon Elastic Compute Cloud\n (Amazon EC2) instances. To retrieve the IAM role for an EC2 instance, use\n the Amazon EC2 DescribeInstances
operation. For information, see DescribeInstances in the Amazon EC2 API Reference or describe-instances in\n the Amazon Web Services CLI Command Reference.
The Identity and Access Management (IAM) role assigned to the on-premises Systems Manager\n managed node. This call doesn't return the IAM role for Amazon Elastic Compute Cloud\n (Amazon EC2) instances. To retrieve the IAM role for an EC2 instance, use\n the Amazon EC2 DescribeInstances
operation. For information, see DescribeInstances in the Amazon EC2 API Reference or describe-instances in\n the Amazon Web Services CLI Command Reference.
The date the server or VM was registered with Amazon Web Services as a managed instance.
" + "smithy.api#documentation": "The date the server or VM was registered with Amazon Web Services as a managed node.
" } }, "ResourceType": { @@ -12255,19 +12264,19 @@ "Name": { "target": "com.amazonaws.ssm#String", "traits": { - "smithy.api#documentation": "The name assigned to an on-premises server or virtual machine (VM) when it is activated as a\n Systems Manager managed instance. The name is specified as the DefaultInstanceName
property\n using the CreateActivation command. It is applied to the managed instance by\n specifying the Activation Code and Activation ID when you install SSM Agent on the instance, as\n explained in Install SSM Agent for a\n hybrid environment (Linux) and Install SSM Agent for a\n hybrid environment (Windows). To retrieve the Name tag of an EC2 instance, use the Amazon EC2\n DescribeInstances
operation. For information, see DescribeInstances in the\n Amazon EC2 API Reference or describe-instances in the\n Amazon Web Services CLI Command Reference.
The name assigned to an on-premises server, edge device, or virtual machine (VM) when it is\n activated as a Systems Manager managed node. The name is specified as the DefaultInstanceName
\n property using the CreateActivation command. It is applied to the managed node\n by specifying the Activation Code and Activation ID when you install SSM Agent on the node, as\n explained in Install SSM Agent for a\n hybrid environment (Linux) and Install SSM Agent for a\n hybrid environment (Windows). To retrieve the Name
tag of an EC2 instance,\n use the Amazon EC2 DescribeInstances
operation. For information, see DescribeInstances in the Amazon EC2 API Reference or describe-instances in\n the Amazon Web Services CLI Command Reference.
The IP address of the managed instance.
" + "smithy.api#documentation": "The IP address of the managed node.
" } }, "ComputerName": { "target": "com.amazonaws.ssm#ComputerName", "traits": { - "smithy.api#documentation": "The fully qualified host name of the managed instance.
" + "smithy.api#documentation": "The fully qualified host name of the managed node.
" } }, "AssociationStatus": { @@ -12293,10 +12302,22 @@ "traits": { "smithy.api#documentation": "Information about the association.
" } + }, + "SourceId": { + "target": "com.amazonaws.ssm#SourceId", + "traits": { + "smithy.api#documentation": "The ID of the source resource. For IoT Greengrass devices, SourceId
is\n the Thing name.
The type of the source resource. For IoT Greengrass devices, SourceType
\n is AWS::IoT::Thing
.
Describes a filter for a specific list of instances.
" + "smithy.api#documentation": "Describes a filter for a specific list of managed nodes.
" } }, "com.amazonaws.ssm#InstanceInformationFilter": { @@ -12318,7 +12339,7 @@ } }, "traits": { - "smithy.api#documentation": "Describes a filter for a specific list of instances. You can filter instances information by\n using tags. You specify tags by using a key-value mapping.
\nUse this operation instead of the DescribeInstanceInformationRequest$InstanceInformationFilterList method. The\n InstanceInformationFilterList
method is a legacy method and doesn't support tags.\n
Describes a filter for a specific list of managed nodes. You can filter node information by\n using tags. You specify tags by using a key-value mapping.
\nUse this operation instead of the DescribeInstanceInformationRequest$InstanceInformationFilterList method. The\n InstanceInformationFilterList
method is a legacy method and doesn't support tags.\n
The filter key name to describe your instances. For example:
\n\"InstanceIds\"|\"AgentVersion\"|\"PingStatus\"|\"PlatformTypes\"|\"ActivationIds\"|\"IamRole\"|\"ResourceType\"|\"AssociationStatus\"|\"Tag\n Key\"
\n\n Tag key
isn't a valid filter. You must specify either tag-key
or\n tag:keyname
and a string. Here are some valid examples: tag-key, tag:123, tag:al!,\n tag:Windows. Here are some invalid examples: tag-keys, Tag Key, tag:,\n tagKey, abc:keyname.
The filter key name to describe your managed nodes. For example:
\n\"InstanceIds\"|\"AgentVersion\"|\"PingStatus\"|\"PlatformTypes\"|\"ActivationIds\"|\"IamRole\"|\"ResourceType\"|\"AssociationStatus\"|\"Tag\n Key\"
\n\n Tag key
isn't a valid filter. You must specify either tag-key
or\n tag:keyname
and a string. Here are some valid examples: tag-key, tag:123, tag:al!,\n tag:Windows. Here are some invalid examples: tag-keys, Tag Key, tag:,\n tagKey, abc:keyname.
The filters to describe or get information about your managed instances.
" + "smithy.api#documentation": "The filters to describe or get information about your managed nodes.
" } }, "com.amazonaws.ssm#InstanceInformationStringFilterKey": { @@ -12456,21 +12477,21 @@ "InstanceId": { "target": "com.amazonaws.ssm#InstanceId", "traits": { - "smithy.api#documentation": "The ID of the managed instance the high-level patch compliance information was collected\n for.
", + "smithy.api#documentation": "The ID of the managed node the high-level patch compliance information was collected\n for.
", "smithy.api#required": {} } }, "PatchGroup": { "target": "com.amazonaws.ssm#PatchGroup", "traits": { - "smithy.api#documentation": "The name of the patch group the managed instance belongs to.
", + "smithy.api#documentation": "The name of the patch group the managed node belongs to.
", "smithy.api#required": {} } }, "BaselineId": { "target": "com.amazonaws.ssm#BaselineId", "traits": { - "smithy.api#documentation": "The ID of the patch baseline used to patch the instance.
", + "smithy.api#documentation": "The ID of the patch baseline used to patch the managed node.
", "smithy.api#required": {} } }, @@ -12495,33 +12516,33 @@ "InstalledCount": { "target": "com.amazonaws.ssm#PatchInstalledCount", "traits": { - "smithy.api#documentation": "The number of patches from the patch baseline that are installed on the instance.
" + "smithy.api#documentation": "The number of patches from the patch baseline that are installed on the managed node.
" } }, "InstalledOtherCount": { "target": "com.amazonaws.ssm#PatchInstalledOtherCount", "traits": { - "smithy.api#documentation": "The number of patches not specified in the patch baseline that are installed on the\n instance.
" + "smithy.api#documentation": "The number of patches not specified in the patch baseline that are installed on the\n managed node.
" } }, "InstalledPendingRebootCount": { "target": "com.amazonaws.ssm#PatchInstalledPendingRebootCount", "traits": { "smithy.api#box": {}, - "smithy.api#documentation": "The number of patches installed by Patch Manager since the last time the instance was\n rebooted.
" + "smithy.api#documentation": "The number of patches installed by Patch Manager since the last time the managed node was\n rebooted.
" } }, "InstalledRejectedCount": { "target": "com.amazonaws.ssm#PatchInstalledRejectedCount", "traits": { "smithy.api#box": {}, - "smithy.api#documentation": "The number of patches installed on an instance that are specified in a\n RejectedPatches
list. Patches with a status of InstalledRejected
were\n typically installed before they were added to a RejectedPatches
list.
If ALLOW_AS_DEPENDENCY
is the specified option for\n RejectedPatchesAction
, the value of InstalledRejectedCount
will\n always be 0
(zero).
The number of patches installed on a managed node that are specified in a\n RejectedPatches
list. Patches with a status of InstalledRejected
were\n typically installed before they were added to a RejectedPatches
list.
If ALLOW_AS_DEPENDENCY
is the specified option for\n RejectedPatchesAction
, the value of InstalledRejectedCount
will\n always be 0
(zero).
The number of patches from the patch baseline that are applicable for the instance but\n aren't currently installed.
" + "smithy.api#documentation": "The number of patches from the patch baseline that are applicable for the managed node but\n aren't currently installed.
" } }, "FailedCount": { @@ -12540,20 +12561,20 @@ "NotApplicableCount": { "target": "com.amazonaws.ssm#PatchNotApplicableCount", "traits": { - "smithy.api#documentation": "The number of patches from the patch baseline that aren't applicable for the instance and\n therefore aren't installed on the instance. This number may be truncated if the list of patch\n names is very large. The number of patches beyond this limit are reported in\n UnreportedNotApplicableCount
.
The number of patches from the patch baseline that aren't applicable for the managed node and\n therefore aren't installed on the node. This number may be truncated if the list of patch\n names is very large. The number of patches beyond this limit are reported in\n UnreportedNotApplicableCount
.
The time the most recent patching operation was started on the instance.
", + "smithy.api#documentation": "The time the most recent patching operation was started on the managed node.
", "smithy.api#required": {} } }, "OperationEndTime": { "target": "com.amazonaws.ssm#DateTime", "traits": { - "smithy.api#documentation": "The time the most recent patching operation completed on the instance.
", + "smithy.api#documentation": "The time the most recent patching operation completed on the managed node.
", "smithy.api#required": {} } }, @@ -12567,39 +12588,39 @@ "LastNoRebootInstallOperationTime": { "target": "com.amazonaws.ssm#DateTime", "traits": { - "smithy.api#documentation": "The time of the last attempt to patch the instance with NoReboot
specified as\n the reboot option.
The time of the last attempt to patch the managed node with NoReboot
specified as\n the reboot option.
Indicates the reboot option specified in the patch baseline.
\nReboot options apply to Install
operations only. Reboots aren't attempted for\n Patch Manager Scan
operations.
\n RebootIfNeeded
: Patch Manager tries to reboot the instance if it installed\n any patches, or if any patches are detected with a status of\n InstalledPendingReboot
.
\n NoReboot
: Patch Manager attempts to install missing packages without trying\n to reboot the system. Patches installed with this option are assigned a status of\n InstalledPendingReboot
. These patches might not be in effect until a reboot is\n performed.
Indicates the reboot option specified in the patch baseline.
\nReboot options apply to Install
operations only. Reboots aren't attempted for\n Patch Manager Scan
operations.
\n RebootIfNeeded
: Patch Manager tries to reboot the managed node if it installed\n any patches, or if any patches are detected with a status of\n InstalledPendingReboot
.
\n NoReboot
: Patch Manager attempts to install missing packages without trying\n to reboot the system. Patches installed with this option are assigned a status of\n InstalledPendingReboot
. These patches might not be in effect until a reboot is\n performed.
The number of instances where patches that are specified as Critical
for\n compliance reporting in the patch baseline aren't installed. These patches might be missing, have\n failed installation, were rejected, or were installed but awaiting a required instance reboot.\n The status of these instances is NON_COMPLIANT
.
The number of managed nodes where patches that are specified as Critical
for\n compliance reporting in the patch baseline aren't installed. These patches might be missing, have\n failed installation, were rejected, or were installed but awaiting a required managed node reboot.\n The status of these managed nodes is NON_COMPLIANT
.
The number of instances where patches that are specified as Security
in a patch\n advisory aren't installed. These patches might be missing, have failed installation, were\n rejected, or were installed but awaiting a required instance reboot. The status of these\n instances is NON_COMPLIANT
.
The number of managed nodes where patches that are specified as Security
in a\n patch advisory aren't installed. These patches might be missing, have failed installation, were\n rejected, or were installed but awaiting a required managed node reboot. The status of these managed\n nodes is NON_COMPLIANT
.
The number of instances with patches installed that are specified as other than\n Critical
or Security
but aren't compliant with the patch baseline. The\n status of these instances is NON_COMPLIANT
.
The number of managed nodes with patches installed that are specified as other than\n Critical
or Security
but aren't compliant with the patch baseline. The\n status of these managed nodes is NON_COMPLIANT
.
Defines the high-level patch compliance state for a managed instance, providing information\n about the number of installed, missing, not applicable, and failed patches along with metadata\n about the operation when this information was gathered for the instance.
" + "smithy.api#documentation": "Defines the high-level patch compliance state for a managed node, providing information\n about the number of installed, missing, not applicable, and failed patches along with metadata\n about the operation when this information was gathered for the managed node.
" } }, "com.amazonaws.ssm#InstancePatchStateFilter": { @@ -12628,7 +12649,7 @@ } }, "traits": { - "smithy.api#documentation": "Defines a filter used in DescribeInstancePatchStatesForPatchGroup to scope\n down the information returned by the API.
\n\n Example: To filter for all instances in a patch group\n having more than three patches with a FailedCount
status, use the following for the\n filter:
Value for Key
: FailedCount
\n
Value for Type
: GreaterThan
\n
Value for Values
: 3
\n
Defines a filter used in DescribeInstancePatchStatesForPatchGroup to scope\n down the information returned by the API.
\n\n Example: To filter for all managed nodes in a patch group\n having more than three patches with a FailedCount
status, use the following for the\n filter:
Value for Key
: FailedCount
\n
Value for Type
: GreaterThan
\n
Value for Values
: 3
\n
The following problems can cause this exception:
\nYou don't have permission to access the instance.
\nAmazon Web Services Systems Manager Agent(SSM Agent) isn't running. Verify that SSM Agent is\n running.
\nSSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM Agent.
\nThe instance isn't in valid state. Valid states are: Running
,\n Pending
, Stopped
, and Stopping
. Invalid states are:\n Shutting-down
and Terminated
.
The following problems can cause this exception:
\nYou don't have permission to access the managed node.
\nAmazon Web Services Systems Manager Agent(SSM Agent) isn't running. Verify that SSM Agent is\n running.
\nSSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM Agent.
\nThe managed node isn't in valid state. Valid states are: Running
,\n Pending
, Stopped
, and Stopping
. Invalid states are:\n Shutting-down
and Terminated
.
The resource type isn't valid. For example, if you are attempting to tag an instance, the\n instance must be a registered, managed instance.
", + "smithy.api#documentation": "The resource type isn't valid. For example, if you are attempting to tag an EC2 instance, the\n instance must be a registered managed node.
", "smithy.api#error": "client" } }, @@ -13694,7 +13715,7 @@ "Values": { "target": "com.amazonaws.ssm#InventoryFilterValueList", "traits": { - "smithy.api#documentation": "Inventory filter values. Example: inventory filter where instance IDs are specified as\n values Key=AWS:InstanceInformation.InstanceId,Values= i-a12b3c4d5e6g,\n i-1a2b3c4d5e6,Type=Equal
.
Inventory filter values. Example: inventory filter where managed node IDs are specified as\n values Key=AWS:InstanceInformation.InstanceId,Values= i-a12b3c4d5e6g,\n i-1a2b3c4d5e6,Type=Equal
.
Information collected from managed instances based on your inventory policy document
" + "smithy.api#documentation": "Information collected from managed nodes based on your inventory policy document
" } }, "com.amazonaws.ssm#InventoryItemAttribute": { @@ -14058,7 +14079,7 @@ "Id": { "target": "com.amazonaws.ssm#InventoryResultEntityId", "traits": { - "smithy.api#documentation": "ID of the inventory result entity. For example, for managed instance inventory the result\n will be the managed instance ID. For EC2 instance inventory, the result will be the instance ID.\n
" + "smithy.api#documentation": "ID of the inventory result entity. For example, for managed node inventory the result\n will be the managed node ID. For EC2 instance inventory, the result will be the instance ID.\n
" } }, "Data": { @@ -14163,7 +14184,7 @@ "code": "InvocationDoesNotExist", "httpResponseCode": 400 }, - "smithy.api#documentation": "The command ID and instance ID you specified didn't match any invocations. Verify the\n command ID and the instance ID and try again.
", + "smithy.api#documentation": "The command ID and managed node ID you specified didn't match any invocations. Verify the\n command ID and the managed node ID and try again.
", "smithy.api#error": "client" } }, @@ -14411,7 +14432,7 @@ } ], "traits": { - "smithy.api#documentation": "Returns all State Manager associations in the current Amazon Web Services account and Amazon Web Services Region. You\n can limit the results to a specific State Manager association document or instance by specifying\n a filter. State Manager is a capability of Amazon Web Services Systems Manager.
", + "smithy.api#documentation": "Returns all State Manager associations in the current Amazon Web Services account and Amazon Web Services Region. You\n can limit the results to a specific State Manager association document or managed node by specifying\n a filter. State Manager is a capability of Amazon Web Services Systems Manager.
", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -14426,7 +14447,7 @@ "AssociationFilterList": { "target": "com.amazonaws.ssm#AssociationFilterList", "traits": { - "smithy.api#documentation": "One or more filters. Use a filter to return a more specific list of results.
\nFiltering associations using the InstanceID
attribute only returns legacy\n associations created using the InstanceID
attribute. Associations targeting the\n instance that are part of the Target Attributes ResourceGroup
or Tags
\n aren't returned.
One or more filters. Use a filter to return a more specific list of results.
\nFiltering associations using the InstanceID
attribute only returns legacy\n associations created using the InstanceID
attribute. Associations targeting the\n managed node that are part of the Target Attributes ResourceGroup
or Tags
\n aren't returned.
An invocation is copy of a command sent to a specific instance. A command can apply to one\n or more instances. A command invocation applies to one instance. For example, if a user runs\n SendCommand
against three instances, then a command invocation is created for each\n requested instance ID. ListCommandInvocations
provide status about command\n execution.
An invocation is copy of a command sent to a specific managed node. A command can apply to one\n or more managed nodes. A command invocation applies to one managed node. For example, if a user runs\n SendCommand
against three managed nodes, then a command invocation is created for\n each requested managed node ID. ListCommandInvocations
provide status about command\n execution.
(Optional) The command execution details for a specific instance ID.
" + "smithy.api#documentation": "(Optional) The command execution details for a specific managed node ID.
" } }, "MaxResults": { @@ -14602,7 +14623,7 @@ "InstanceId": { "target": "com.amazonaws.ssm#InstanceId", "traits": { - "smithy.api#documentation": "(Optional) Lists commands issued against this instance ID.
\nYou can't specify an instance ID in the same command that you specify Status
=\n Pending
. This is because the command hasn't reached the instance yet.
(Optional) Lists commands issued against this managed node ID.
\nYou can't specify a managed node ID in the same command that you specify Status
=\n Pending
. This is because the command hasn't reached the managed node yet.
The instance ID for which you want inventory information.
", + "smithy.api#documentation": "The managed node ID for which you want inventory information.
", "smithy.api#required": {} } }, @@ -15126,25 +15147,25 @@ "InstanceId": { "target": "com.amazonaws.ssm#InstanceId", "traits": { - "smithy.api#documentation": "The instance ID targeted by the request to query inventory information.
" + "smithy.api#documentation": "The managed node ID targeted by the request to query inventory information.
" } }, "SchemaVersion": { "target": "com.amazonaws.ssm#InventoryItemSchemaVersion", "traits": { - "smithy.api#documentation": "The inventory schema version used by the instance(s).
" + "smithy.api#documentation": "The inventory schema version used by the managed node(s).
" } }, "CaptureTime": { "target": "com.amazonaws.ssm#InventoryItemCaptureTime", "traits": { - "smithy.api#documentation": "The time that inventory information was collected for the instance(s).
" + "smithy.api#documentation": "The time that inventory information was collected for the managed node(s).
" } }, "Entries": { "target": "com.amazonaws.ssm#InventoryItemEntryList", "traits": { - "smithy.api#documentation": "A list of inventory items on the instance(s).
" + "smithy.api#documentation": "A list of inventory items on the managed node(s).
" } }, "NextToken": { @@ -15434,7 +15455,7 @@ "ResourceComplianceSummaryItems": { "target": "com.amazonaws.ssm#ResourceComplianceSummaryItemList", "traits": { - "smithy.api#documentation": "A summary count for specified or targeted managed instances. Summary count includes\n information about compliant and non-compliant State Manager associations, patch status, or custom\n items according to the filter criteria that you specify.
" + "smithy.api#documentation": "A summary count for specified or targeted managed nodes. Summary count includes information\n about compliant and non-compliant State Manager associations, patch status, or custom items\n according to the filter criteria that you specify.
" } }, "NextToken": { @@ -15593,7 +15614,7 @@ } }, "traits": { - "smithy.api#documentation": "Information about an Amazon Simple Storage Service (Amazon S3) bucket to write\n instance-level logs to.
\n\n LoggingInfo
has been deprecated. To specify an Amazon Simple Storage Service (Amazon S3) bucket to contain logs, instead use the\n OutputS3BucketName
and OutputS3KeyPrefix
options in the TaskInvocationParameters
structure.\n For information about how Amazon Web Services Systems Manager handles these options for the supported maintenance\n window task types, see MaintenanceWindowTaskInvocationParameters.
Information about an Amazon Simple Storage Service (Amazon S3) bucket to write\n managed node-level logs to.
\n\n LoggingInfo
has been deprecated. To specify an Amazon Simple Storage Service (Amazon S3) bucket to contain logs, instead use the\n OutputS3BucketName
and OutputS3KeyPrefix
options in the TaskInvocationParameters
structure.\n For information about how Amazon Web Services Systems Manager handles these options for the supported maintenance\n window task types, see MaintenanceWindowTaskInvocationParameters.
Configurations for sending notifications about command status changes on a per-instance\n basis.
" + "smithy.api#documentation": "Configurations for sending notifications about command status changes on a per-managed node\n basis.
" } }, "OutputS3BucketName": { @@ -16369,7 +16390,7 @@ "Targets": { "target": "com.amazonaws.ssm#Targets", "traits": { - "smithy.api#documentation": "The targets, either instances or tags.
\nSpecify instances using the following format:
\n\n Key=instanceids,Values=
\n
Tags are specified using the following format:
\n\n Key=
.
The targets, either managed nodes or tags.
\nSpecify managed nodes using the following format:
\n\n Key=instanceids,Values=
\n
Tags are specified using the following format:
\n\n Key=
.
The targets (either instances or tags). Instances are specified using\n Key=instanceids,Values=
. Tags are specified\n using Key=
.
The targets (either managed nodes or tags). Managed nodes are specified using\n Key=instanceids,Values=
. Tags are specified\n using Key=
.
The type of notification.
\n\n Command
: Receive notification when the status of a command changes.
\n Invocation
: For commands sent to multiple instances, receive notification on\n a per-instance basis when the status of a command changes.
The type of notification.
\n\n Command
: Receive notification when the status of a command changes.
\n Invocation
: For commands sent to multiple managed nodes, receive notification\n on a per-node basis when the status of a command changes.
The Advisory ID of the patch. For example, RHSA-2020:3779
. Applies to\n Linux-based instances only.
The Advisory ID of the patch. For example, RHSA-2020:3779
. Applies to\n Linux-based managed nodes only.
The Bugzilla ID of the patch. For example, 1600646
. Applies to Linux-based\n instances only.
The Bugzilla ID of the patch. For example, 1600646
. Applies to Linux-based\n managed nodes only.
The Common Vulnerabilities and Exposures (CVE) ID of the patch. For example,\n CVE-2011-3192
. Applies to Linux-based instances only.
The Common Vulnerabilities and Exposures (CVE) ID of the patch. For example,\n CVE-2011-3192
. Applies to Linux-based managed nodes only.
The name of the patch. Applies to Linux-based instances only.
" + "smithy.api#documentation": "The name of the patch. Applies to Linux-based managed nodes only.
" } }, "Epoch": { "target": "com.amazonaws.ssm#PatchEpoch", "traits": { - "smithy.api#documentation": "The epoch of the patch. For example in\n pkg-example-EE-20180914-2.2.amzn1.noarch
, the epoch value is\n 20180914-2
. Applies to Linux-based instances only.
The epoch of the patch. For example in\n pkg-example-EE-20180914-2.2.amzn1.noarch
, the epoch value is\n 20180914-2
. Applies to Linux-based managed nodes only.
The version number of the patch. For example, in\n example-pkg-1.710.10-2.7.abcd.x86_64
, the version number is indicated by\n -1
. Applies to Linux-based instances only.
The version number of the patch. For example, in\n example-pkg-1.710.10-2.7.abcd.x86_64
, the version number is indicated by\n -1
. Applies to Linux-based managed nodes only.
The particular release of a patch. For example, in\n pkg-example-EE-20180914-2.2.amzn1.noarch
, the release is 2.amaz1
.\n Applies to Linux-based instances only.
The particular release of a patch. For example, in\n pkg-example-EE-20180914-2.2.amzn1.noarch
, the release is 2.amaz1
.\n Applies to Linux-based managed nodes only.
The architecture of the patch. For example, in\n example-pkg-0.710.10-2.7.abcd.x86_64
, the architecture is indicated by\n x86_64
. Applies to Linux-based instances only.
The architecture of the patch. For example, in\n example-pkg-0.710.10-2.7.abcd.x86_64
, the architecture is indicated by\n x86_64
. Applies to Linux-based managed nodes only.
The source patch repository for the operating system and version, such as\n trusty-security
for Ubuntu Server 14.04 LTE and focal-security
for\n Ubuntu Server 20.04 LTE. Applies to Linux-based instances only.
The source patch repository for the operating system and version, such as\n trusty-security
for Ubuntu Server 14.04 LTE and focal-security
for\n Ubuntu Server 20.04 LTE. Applies to Linux-based managed nodes only.
The state of the patch on the instance, such as INSTALLED or FAILED.
\nFor descriptions of each patch state, see About patch compliance in the Amazon Web Services Systems Manager User Guide.
", + "smithy.api#documentation": "The state of the patch on the managed node, such as INSTALLED or FAILED.
\nFor descriptions of each patch state, see About patch compliance in the Amazon Web Services Systems Manager User Guide.
", "smithy.api#required": {} } }, "InstalledTime": { "target": "com.amazonaws.ssm#DateTime", "traits": { - "smithy.api#documentation": "The date/time the patch was installed on the instance. Not all operating systems provide\n this level of information.
", + "smithy.api#documentation": "The date/time the patch was installed on the managed node. Not all operating systems provide\n this level of information.
", "smithy.api#required": {} } }, @@ -19780,7 +19808,7 @@ } }, "traits": { - "smithy.api#documentation": "Information about the state of a patch on a particular instance as it relates to the patch\n baseline used to patch the instance.
" + "smithy.api#documentation": "Information about the state of a patch on a particular managed node as it relates to the patch\n baseline used to patch the node.
" } }, "com.amazonaws.ssm#PatchComplianceDataList": { @@ -20322,7 +20350,7 @@ "target": "com.amazonaws.ssm#Boolean", "traits": { "smithy.api#box": {}, - "smithy.api#documentation": "For instances identified by the approval rule filters, enables a patch baseline to apply\n non-security updates available in the specified repository. The default value is\n false
. Applies to Linux instances only.
For managed nodes identified by the approval rule filters, enables a patch baseline to apply\n non-security updates available in the specified repository. The default value is\n false
. Applies to Linux managed nodes only.
Information about the patches to use to update the instances, including target operating\n systems and source repository. Applies to Linux instances only.
" + "smithy.api#documentation": "Information about the patches to use to update the managed nodes, including target operating\n systems and source repository. Applies to Linux managed nodes only.
" } }, "com.amazonaws.ssm#PatchSourceConfiguration": { @@ -20533,6 +20561,10 @@ { "value": "Linux", "name": "LINUX" + }, + { + "value": "MacOS", + "name": "MACOS" } ] } @@ -20635,7 +20667,7 @@ } ], "traits": { - "smithy.api#documentation": "Registers a compliance type and other compliance details on a designated resource. This\n operation lets you register custom compliance details with a resource. This call overwrites\n existing compliance information on the resource, so you must provide a full list of compliance\n items each time that you send the request.
\nComplianceType can be one of the following:
\nExecutionId: The execution ID when the patch, association, or custom compliance item was\n applied.
\nExecutionType: Specify patch, association, or Custom:string
.
ExecutionTime. The time the patch, association, or custom compliance item was applied to\n the instance.
\nId: The patch, association, or custom compliance ID.
\nTitle: A title.
\nStatus: The status of the compliance item. For example, approved
for patches,\n or Failed
for associations.
Severity: A patch severity. For example, critical
.
DocumentName: An SSM document name. For example, AWS-RunPatchBaseline
.
DocumentVersion: An SSM document version number. For example, 4.
\nClassification: A patch classification. For example, security updates
.
PatchBaselineId: A patch baseline ID.
\nPatchSeverity: A patch severity. For example, Critical
.
PatchState: A patch state. For example, InstancesWithFailedPatches
.
PatchGroup: The name of a patch group.
\nInstalledTime: The time the association, patch, or custom compliance item was applied to\n the resource. Specify the time by using the following format: yyyy-MM-dd'T'HH:mm:ss'Z'
\nRegisters a compliance type and other compliance details on a designated resource. This\n operation lets you register custom compliance details with a resource. This call overwrites\n existing compliance information on the resource, so you must provide a full list of compliance\n items each time that you send the request.
\nComplianceType can be one of the following:
\nExecutionId: The execution ID when the patch, association, or custom compliance item was\n applied.
\nExecutionType: Specify patch, association, or Custom:string
.
ExecutionTime. The time the patch, association, or custom compliance item was applied to\n the managed node.
\nId: The patch, association, or custom compliance ID.
\nTitle: A title.
\nStatus: The status of the compliance item. For example, approved
for patches,\n or Failed
for associations.
Severity: A patch severity. For example, critical
.
DocumentName: An SSM document name. For example, AWS-RunPatchBaseline
.
DocumentVersion: An SSM document version number. For example, 4.
\nClassification: A patch classification. For example, security updates
.
PatchBaselineId: A patch baseline ID.
\nPatchSeverity: A patch severity. For example, Critical
.
PatchState: A patch state. For example, InstancesWithFailedPatches
.
PatchGroup: The name of a patch group.
\nInstalledTime: The time the association, patch, or custom compliance item was applied to\n the resource. Specify the time by using the following format: yyyy-MM-dd'T'HH:mm:ss'Z'
\nSpecify an ID for this resource. For a managed instance, this is the instance ID.
", + "smithy.api#documentation": "Specify an ID for this resource. For a managed node, this is the node ID.
", "smithy.api#required": {} } }, @@ -20741,7 +20773,7 @@ } ], "traits": { - "smithy.api#documentation": "Bulk update custom inventory items on one more instance. The request adds an inventory item,\n if it doesn't already exist, or updates an inventory item, if it does exist.
" + "smithy.api#documentation": "Bulk update custom inventory items on one or more managed nodes. The request adds an inventory item,\n if it doesn't already exist, or updates an inventory item, if it does exist.
" } }, "com.amazonaws.ssm#PutInventoryMessage": { @@ -20753,14 +20785,14 @@ "InstanceId": { "target": "com.amazonaws.ssm#InstanceId", "traits": { - "smithy.api#documentation": "An instance ID where you want to add or update inventory items.
", + "smithy.api#documentation": "An managed node ID where you want to add or update inventory items.
", "smithy.api#required": {} } }, "Items": { "target": "com.amazonaws.ssm#InventoryItemList", "traits": { - "smithy.api#documentation": "The inventory items that you want to add or update on instances.
", + "smithy.api#documentation": "The inventory items that you want to add or update on managed nodes.
", "smithy.api#required": {} } } @@ -20899,7 +20931,7 @@ "Policies": { "target": "com.amazonaws.ssm#ParameterPolicies", "traits": { - "smithy.api#documentation": "One or more policies to apply to a parameter. This operation takes a JSON array. Parameter\n Store, a capability of Amazon Web Services Systems Manager supports the following policy types:
\nExpiration: This policy deletes the parameter after it expires. When you create the policy,\n you specify the expiration date. You can update the expiration date and time by updating the\n policy. Updating the parameter doesn't affect the expiration date and time.\n When the expiration time is reached, Parameter Store deletes the parameter.
\nExpirationNotification: This policy triggers an event in Amazon CloudWatch Events that\n notifies you about the expiration. By using this policy, you can receive notification before or\n after the expiration time is reached, in units of days or hours.
\nNoChangeNotification: This policy triggers a CloudWatch Events event if a parameter hasn't\n been modified for a specified period of time. This policy type is useful when, for example, a\n secret needs to be changed within a period of time, but it hasn't been changed.
\nAll existing policies are preserved until you send new policies or an empty policy. For more\n information about parameter policies, see Assigning parameter\n policies.
" + "smithy.api#documentation": "One or more policies to apply to a parameter. This operation takes a JSON array. Parameter\n Store, a capability of Amazon Web Services Systems Manager supports the following policy types:
\nExpiration: This policy deletes the parameter after it expires. When you create the policy,\n you specify the expiration date. You can update the expiration date and time by updating the\n policy. Updating the parameter doesn't affect the expiration date and time.\n When the expiration time is reached, Parameter Store deletes the parameter.
\nExpirationNotification: This policy initiates an event in Amazon CloudWatch Events that\n notifies you about the expiration. By using this policy, you can receive notification before or\n after the expiration time is reached, in units of days or hours.
\nNoChangeNotification: This policy initiates a CloudWatch Events event if a parameter hasn't\n been modified for a specified period of time. This policy type is useful when, for example, a\n secret needs to be changed within a period of time, but it hasn't been changed.
\nAll existing policies are preserved until you send new policies or an empty policy. For more\n information about parameter policies, see Assigning parameter\n policies.
" } }, "DataType": { @@ -21114,7 +21146,7 @@ "Targets": { "target": "com.amazonaws.ssm#Targets", "traits": { - "smithy.api#documentation": "The targets to register with the maintenance window. In other words, the instances to run\n commands on when the maintenance window runs.
\nIf a single maintenance window task is registered with multiple targets, its task\n invocations occur sequentially and not in parallel. If your task must run on multiple targets at\n the same time, register a task for each target individually and assign each task the same\n priority level.
\nYou can specify targets using instance IDs, resource group names, or tags that have been\n applied to instances.
\n\n Example 1: Specify instance IDs
\n\n Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3\n
\n
\n Example 2: Use tag key-pairs applied to instances
\n\n Key=tag:my-tag-key,Values=my-tag-value-1,my-tag-value-2\n
\n
\n Example 3: Use tag-keys applied to instances
\n\n Key=tag-key,Values=my-tag-key-1,my-tag-key-2\n
\n
\n Example 4: Use resource group names
\n\n Key=resource-groups:Name,Values=resource-group-name\n
\n
\n Example 5: Use filters for resource group types
\n\n Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2\n
\n
For Key=resource-groups:ResourceTypeFilters
, specify resource types in the\n following format
\n Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC\n
\n
For more information about these examples formats, including the best use case for each one,\n see Examples: Register\n targets with a maintenance window in the Amazon Web Services Systems Manager User Guide.
", + "smithy.api#documentation": "The targets to register with the maintenance window. In other words, the managed nodes to\n run commands on when the maintenance window runs.
\nIf a single maintenance window task is registered with multiple targets, its task\n invocations occur sequentially and not in parallel. If your task must run on multiple targets at\n the same time, register a task for each target individually and assign each task the same\n priority level.
\nYou can specify targets using managed node IDs, resource group names, or tags that have been\n applied to managed nodes.
\n\n Example 1: Specify managed node IDs
\n\n Key=InstanceIds,Values=
\n
\n Example 2: Use tag key-pairs applied to managed\n nodes
\n\n Key=tag:
\n
\n Example 3: Use tag-keys applied to managed nodes
\n\n Key=tag-key,Values=
\n
\n Example 4: Use resource group names
\n\n Key=resource-groups:Name,Values=
\n
\n Example 5: Use filters for resource group types
\n\n Key=resource-groups:ResourceTypeFilters,Values=
\n
For Key=resource-groups:ResourceTypeFilters
, specify resource types in the\n following format
\n Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC
\n
For more information about these examples formats, including the best use case for each one,\n see Examples: Register\n targets with a maintenance window in the Amazon Web Services Systems Manager User Guide.
", "smithy.api#required": {} } }, @@ -21198,7 +21230,7 @@ "Targets": { "target": "com.amazonaws.ssm#Targets", "traits": { - "smithy.api#documentation": "The targets (either instances or maintenance window targets).
\nOne or more targets must be specified for maintenance window Run Command-type tasks.\n Depending on the task, targets are optional for other maintenance window task types (Automation,\n Lambda, and Step Functions). For more information about running tasks\n that don't specify targets, see Registering\n maintenance window tasks without targets in the\n Amazon Web Services Systems Manager User Guide.
\nSpecify instances using the following format:
\n\n Key=InstanceIds,Values=
\n
Specify maintenance window targets using the following format:
\n\n Key=WindowTargetIds,Values=
\n
The targets (either managed nodes or maintenance window targets).
\nOne or more targets must be specified for maintenance window Run Command-type tasks.\n Depending on the task, targets are optional for other maintenance window task types (Automation,\n Lambda, and Step Functions). For more information about running tasks\n that don't specify targets, see Registering\n maintenance window tasks without targets in the\n Amazon Web Services Systems Manager User Guide.
\nSpecify managed nodes using the following format:
\n\n Key=InstanceIds,Values=
\n
Specify maintenance window targets using the following format:
\n\n Key=WindowTargetIds,Values=
\n
A structure containing information about an Amazon Simple Storage Service (Amazon S3) bucket\n to write instance-level logs to.
\n\n LoggingInfo
has been deprecated. To specify an Amazon Simple Storage Service (Amazon S3) bucket to contain logs, instead use the\n OutputS3BucketName
and OutputS3KeyPrefix
options in the TaskInvocationParameters
structure.\n For information about how Amazon Web Services Systems Manager handles these options for the supported maintenance\n window task types, see MaintenanceWindowTaskInvocationParameters.
A structure containing information about an Amazon Simple Storage Service (Amazon S3) bucket\n to write managed node-level logs to.
\n\n LoggingInfo
has been deprecated. To specify an Amazon Simple Storage Service (Amazon S3) bucket to contain logs, instead use the\n OutputS3BucketName
and OutputS3KeyPrefix
options in the TaskInvocationParameters
structure.\n For information about how Amazon Web Services Systems Manager handles these options for the supported maintenance\n window task types, see MaintenanceWindowTaskInvocationParameters.
Reserved for internal use.
", + "smithy.api#required": {} + } + }, + "Value": { + "target": "com.amazonaws.ssm#RegistrationMetadataValue", + "traits": { + "smithy.api#documentation": "Reserved for internal use.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Reserved for internal use.
" + } + }, + "com.amazonaws.ssm#RegistrationMetadataKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^(?!\\s*$).+$" + } + }, + "com.amazonaws.ssm#RegistrationMetadataList": { + "type": "list", + "member": { + "target": "com.amazonaws.ssm#RegistrationMetadataItem" + } + }, + "com.amazonaws.ssm#RegistrationMetadataValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^(?!\\s*$).+$" + } + }, "com.amazonaws.ssm#RegistrationsCount": { "type": "integer", "traits": { @@ -21370,14 +21450,14 @@ "ResourceType": { "target": "com.amazonaws.ssm#ResourceTypeForTagging", "traits": { - "smithy.api#documentation": "The type of resource from which you want to remove a tag.
\nThe ManagedInstance
type for this API operation is only for on-premises\n managed instances. Specify the name of the managed instance in the following format:\n mi-ID_number\n
. For example,\n mi-1a2b3c4d5e6f
.
The type of resource from which you want to remove a tag.
\nThe ManagedInstance
type for this API operation is only for on-premises\n managed nodes. Specify the name of the managed node in the following format:\n mi-ID_number\n
. For example,\n mi-1a2b3c4d5e6f
.
The ID of the resource from which you want to remove tags. For example:
\nManagedInstance: mi-012345abcde
\nMaintenanceWindow: mw-012345abcde
\nPatchBaseline: pb-012345abcde
\nOpsMetadata object: ResourceID
for tagging is created from the Amazon Resource\n Name (ARN) for the object. Specifically, ResourceID
is created from the strings that\n come after the word opsmetadata
in the ARN. For example, an OpsMetadata object with\n an ARN of arn:aws:ssm:us-east-2:1234567890:opsmetadata/aws/ssm/MyGroup/appmanager
\n has a ResourceID
of either aws/ssm/MyGroup/appmanager
or\n /aws/ssm/MyGroup/appmanager
.
For the Document and Parameter values, use the name of the resource.
\nThe ManagedInstance type for this API operation is only for on-premises managed instances.\n Specify the name of the managed instance in the following format: mi-ID_number. For example,\n mi-1a2b3c4d5e6f.
\nThe ID of the resource from which you want to remove tags. For example:
\nManagedInstance: mi-012345abcde
\nMaintenanceWindow: mw-012345abcde
\nPatchBaseline: pb-012345abcde
\nOpsMetadata object: ResourceID
for tagging is created from the Amazon Resource\n Name (ARN) for the object. Specifically, ResourceID
is created from the strings that\n come after the word opsmetadata
in the ARN. For example, an OpsMetadata object with\n an ARN of arn:aws:ssm:us-east-2:1234567890:opsmetadata/aws/ssm/MyGroup/appmanager
\n has a ResourceID
of either aws/ssm/MyGroup/appmanager
or\n /aws/ssm/MyGroup/appmanager
.
For the Document and Parameter values, use the name of the resource.
\nThe ManagedInstance
type for this API operation is only for on-premises\n managed nodes. Specify the name of the managed node in the following format: mi-ID_number. For\n example, mi-1a2b3c4d5e6f.
Reconnects a session to an instance after it has been disconnected. Connections can be\n resumed for disconnected sessions, but not terminated sessions.
\nThis command is primarily for use by client machines to automatically reconnect during\n intermittent network issues. It isn't intended for any other use.
\nReconnects a session to a managed node after it has been disconnected. Connections can be\n resumed for disconnected sessions, but not terminated sessions.
\nThis command is primarily for use by client machines to automatically reconnect during\n intermittent network issues. It isn't intended for any other use.
\nAn encrypted token value containing session and caller information. Used to authenticate the\n connection to the instance.
" + "smithy.api#documentation": "An encrypted token value containing session and caller information. Used to authenticate the\n connection to the managed node.
" } }, "StreamUrl": { "target": "com.amazonaws.ssm#StreamUrl", "traits": { - "smithy.api#documentation": "A URL back to SSM Agent on the instance that the Session Manager client uses to send commands and\n receive output from the instance. Format: wss://ssmmessages.region.amazonaws.com/v1/data-channel/session-id?stream=(input|output)
.
\n region represents the Region identifier for an\n\t\t\t\t\t\tAmazon Web Services Region supported by Amazon Web Services Systems Manager, such as us-east-2
for the US East (Ohio) Region.\n\t\t\t\t\t\tFor a list of supported region values, see the Region column in Systems Manager service endpoints in the\n Amazon Web Services General Reference.
\n session-id represents the ID of a Session Manager session, such as\n 1a2b3c4dEXAMPLE
.
A URL back to SSM Agent on the managed node that the Session Manager client uses to send commands and\n receive output from the managed node. Format: wss://ssmmessages.region.amazonaws.com/v1/data-channel/session-id?stream=(input|output)
.
\n region represents the Region identifier for an\n\t\t\t\t\t\tAmazon Web Services Region supported by Amazon Web Services Systems Manager, such as us-east-2
for the US East (Ohio) Region.\n\t\t\t\t\t\tFor a list of supported region values, see the Region column in Systems Manager service endpoints in the\n Amazon Web Services General Reference.
\n session-id represents the ID of a Session Manager session, such as\n 1a2b3c4dEXAMPLE
.
Runs commands on one or more managed instances.
" + "smithy.api#documentation": "Runs commands on one or more managed nodes.
" } }, "com.amazonaws.ssm#SendCommandRequest": { @@ -22563,13 +22643,13 @@ "InstanceIds": { "target": "com.amazonaws.ssm#InstanceIdList", "traits": { - "smithy.api#documentation": "The IDs of the instances where the command should run. Specifying instance IDs is most\n useful when you are targeting a limited number of instances, though you can specify up to 50\n IDs.
\nTo target a larger number of instances, or if you prefer not to list individual instance\n IDs, we recommend using the Targets
option instead. Using Targets
,\n which accepts tag key-value pairs to identify the instances to send commands to, you can a send\n command to tens, hundreds, or thousands of instances at once.
For more information about how to use targets, see Using targets and rate\n controls to send commands to a fleet in the\n Amazon Web Services Systems Manager User Guide.
" + "smithy.api#documentation": "The IDs of the managed nodes where the command should run. Specifying managed node IDs is most\n useful when you are targeting a limited number of managed nodes, though you can specify up to 50\n IDs.
\nTo target a larger number of managed nodes, or if you prefer not to list individual node\n IDs, we recommend using the Targets
option instead. Using Targets
,\n which accepts tag key-value pairs to identify the managed nodes to send commands to, you can a\n send command to tens, hundreds, or thousands of nodes at once.
For more information about how to use targets, see Using targets and rate\n controls to send commands to a fleet in the\n Amazon Web Services Systems Manager User Guide.
" } }, "Targets": { "target": "com.amazonaws.ssm#Targets", "traits": { - "smithy.api#documentation": "An array of search criteria that targets instances using a Key,Value
\n combination that you specify. Specifying targets is most useful when you want to send a command\n to a large number of instances at once. Using Targets
, which accepts tag key-value\n pairs to identify instances, you can send a command to tens, hundreds, or thousands of instances\n at once.
To send a command to a smaller number of instances, you can use the InstanceIds
\n option instead.
For more information about how to use targets, see Sending commands to a\n fleet in the Amazon Web Services Systems Manager User Guide.
" + "smithy.api#documentation": "An array of search criteria that targets managed nodes using a Key,Value
\n combination that you specify. Specifying targets is most useful when you want to send a command\n to a large number of managed nodes at once. Using Targets
, which accepts tag\n key-value pairs to identify managed nodes, you can send a command to tens, hundreds, or thousands\n of nodes at once.
To send a command to a smaller number of managed nodes, you can use the\n InstanceIds
option instead.
For more information about how to use targets, see Sending commands to a\n fleet in the Amazon Web Services Systems Manager User Guide.
" } }, "DocumentName": { @@ -22637,7 +22717,7 @@ "MaxConcurrency": { "target": "com.amazonaws.ssm#MaxConcurrency", "traits": { - "smithy.api#documentation": "(Optional) The maximum number of instances that are allowed to run the command at the same\n time. You can specify a number such as 10 or a percentage such as 10%. The default value is\n 50
. For more information about how to use MaxConcurrency
, see Using\n concurrency controls in the Amazon Web Services Systems Manager User Guide.
(Optional) The maximum number of managed nodes that are allowed to run the command at the\n same time. You can specify a number such as 10 or a percentage such as 10%. The default value is\n 50
. For more information about how to use MaxConcurrency
, see Using\n concurrency controls in the Amazon Web Services Systems Manager User Guide.
The instance that the Session Manager session connected to.
" + "smithy.api#documentation": "The managed node that the Session Manager session connected to.
" } }, "Status": { @@ -22829,7 +22909,7 @@ } }, "traits": { - "smithy.api#documentation": "Information about a Session Manager connection to an instance.
" + "smithy.api#documentation": "Information about a Session Manager connection to a managed node.
" } }, "com.amazonaws.ssm#SessionDetails": { @@ -22854,7 +22934,7 @@ "value": { "target": "com.amazonaws.ssm#SessionFilterValue", "traits": { - "smithy.api#documentation": "The filter value. Valid values for each filter key are as follows:
\nInvokedAfter: Specify a timestamp to limit your results. For example, specify\n 2018-08-29T00:00:00Z to see sessions that started August 29, 2018, and later.
\nInvokedBefore: Specify a timestamp to limit your results. For example, specify\n 2018-08-29T00:00:00Z to see sessions that started before August 29, 2018.
\nTarget: Specify an instance to which session connections have been made.
\nOwner: Specify an Amazon Web Services user account to see a list of sessions started by that\n user.
\nStatus: Specify a valid session status to see a list of all sessions with that status.\n Status values you can specify include:
\nConnected
\nConnecting
\nDisconnected
\nTerminated
\nTerminating
\nFailed
\nSessionId: Specify a session ID to return details about the session.
\nThe filter value. Valid values for each filter key are as follows:
\nInvokedAfter: Specify a timestamp to limit your results. For example, specify\n 2018-08-29T00:00:00Z to see sessions that started August 29, 2018, and later.
\nInvokedBefore: Specify a timestamp to limit your results. For example, specify\n 2018-08-29T00:00:00Z to see sessions that started before August 29, 2018.
\nTarget: Specify a managed node to which session connections have been made.
\nOwner: Specify an Amazon Web Services user account to see a list of sessions started by that\n user.
\nStatus: Specify a valid session status to see a list of all sessions with that status.\n Status values you can specify include:
\nConnected
\nConnecting
\nDisconnected
\nTerminated
\nTerminating
\nFailed
\nSessionId: Specify a session ID to return details about the session.
\nThe number of managed instances found for each patch severity level defined in the request\n filter.
" + "smithy.api#documentation": "The number of managed nodes found for each patch severity level defined in the request\n filter.
" } }, "com.amazonaws.ssm#SharedDocumentVersion": { @@ -23179,6 +23259,35 @@ "smithy.api#pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" } }, + "com.amazonaws.ssm#SourceId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 128 + }, + "smithy.api#pattern": "^[a-zA-Z0-9:_-]*$" + } + }, + "com.amazonaws.ssm#SourceType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "AWS::EC2::Instance", + "name": "AWS_EC2_INSTANCE" + }, + { + "value": "AWS::IoT::Thing", + "name": "AWS_IOT_THING" + }, + { + "value": "AWS::SSM::ManagedInstance", + "name": "AWS_SSM_MANAGEDINSTANCE" + } + ] + } + }, "com.amazonaws.ssm#StandardErrorContent": { "type": "string", "traits": { @@ -23496,7 +23605,7 @@ } ], "traits": { - "smithy.api#documentation": "Initiates a connection to a target (for example, an instance) for a Session Manager session. Returns a\n URL and token that can be used to open a WebSocket connection for sending input and receiving\n outputs.
\nAmazon Web Services CLI usage: start-session
is an interactive command that requires the Session Manager\n plugin to be installed on the client machine making the call. For information, see Install\n the Session Manager plugin for the Amazon Web Services CLI in the Amazon Web Services Systems Manager User Guide.
Amazon Web Services Tools for PowerShell usage: Start-SSMSession isn't currently supported by Amazon Web Services Tools\n for PowerShell on Windows local machines.
\nInitiates a connection to a target (for example, a managed node) for a Session Manager session. Returns a\n URL and token that can be used to open a WebSocket connection for sending input and receiving\n outputs.
\nAmazon Web Services CLI usage: start-session
is an interactive command that requires the Session Manager\n plugin to be installed on the client machine making the call. For information, see Install\n the Session Manager plugin for the Amazon Web Services CLI in the Amazon Web Services Systems Manager User Guide.
Amazon Web Services Tools for PowerShell usage: Start-SSMSession isn't currently supported by Amazon Web Services Tools\n for PowerShell on Windows local machines.
\nThe instance to connect to for the session.
", + "smithy.api#documentation": "The managed node to connect to for the session.
", "smithy.api#required": {} } }, "DocumentName": { "target": "com.amazonaws.ssm#DocumentARN", "traits": { - "smithy.api#documentation": "The name of the SSM document to define the parameters and plugin settings for the session.\n For example, SSM-SessionManagerRunShell
. You can call the GetDocument API to verify the document exists before attempting to start a session.\n If no document name is provided, a shell to the instance is launched by default.
The name of the SSM document to define the parameters and plugin settings for the session.\n For example, SSM-SessionManagerRunShell
. You can call the GetDocument API to verify the document exists before attempting to start a session.\n If no document name is provided, a shell to the managed node is launched by default.
The reason for connecting to the instance. This value is included in the details for the Amazon CloudWatch Events event created when you start the session.
" + "smithy.api#documentation": "The reason for connecting to the instance. This value is included in the details for the\n Amazon CloudWatch Events event created when you start the session.
" } }, "Parameters": { @@ -23541,13 +23650,13 @@ "TokenValue": { "target": "com.amazonaws.ssm#TokenValue", "traits": { - "smithy.api#documentation": "An encrypted token value containing session and caller information. Used to authenticate the\n connection to the instance.
" + "smithy.api#documentation": "An encrypted token value containing session and caller information. Used to authenticate the\n connection to the managed node.
" } }, "StreamUrl": { "target": "com.amazonaws.ssm#StreamUrl", "traits": { - "smithy.api#documentation": "A URL back to SSM Agent on the instance that the Session Manager client uses to send commands and\n receive output from the instance. Format: wss://ssmmessages.region.amazonaws.com/v1/data-channel/session-id?stream=(input|output)
\n
\n region represents the Region identifier for an\n\t\t\t\t\t\tAmazon Web Services Region supported by Amazon Web Services Systems Manager, such as us-east-2
for the US East (Ohio) Region.\n\t\t\t\t\t\tFor a list of supported region values, see the Region column in Systems Manager service endpoints in the\n Amazon Web Services General Reference.
\n session-id represents the ID of a Session Manager session, such as\n 1a2b3c4dEXAMPLE
.
A URL back to SSM Agent on the managed node that the Session Manager client uses to send commands and\n receive output from the node. Format: wss://ssmmessages.region.amazonaws.com/v1/data-channel/session-id?stream=(input|output)
\n
\n region represents the Region identifier for an\n\t\t\t\t\t\tAmazon Web Services Region supported by Amazon Web Services Systems Manager, such as us-east-2
for the US East (Ohio) Region.\n\t\t\t\t\t\tFor a list of supported region values, see the Region column in Systems Manager service endpoints in the\n Amazon Web Services General Reference.
\n session-id represents the ID of a Session Manager session, such as\n 1a2b3c4dEXAMPLE
.
Metadata that you assign to your Amazon Web Services resources. Tags enable you to categorize your\n resources in different ways, for example, by purpose, owner, or environment. In Amazon Web Services Systems Manager, you\n can apply tags to Systems Manager documents (SSM documents), managed instances, maintenance windows,\n parameters, patch baselines, OpsItems, and OpsMetadata.
" + "smithy.api#documentation": "Metadata that you assign to your Amazon Web Services resources. Tags enable you to categorize your\n resources in different ways, for example, by purpose, owner, or environment. In Amazon Web Services Systems Manager, you\n can apply tags to Systems Manager documents (SSM documents), managed nodes, maintenance windows,\n parameters, patch baselines, OpsItems, and OpsMetadata.
" } }, "com.amazonaws.ssm#TagKey": { @@ -23984,7 +24093,7 @@ "Key": { "target": "com.amazonaws.ssm#TargetKey", "traits": { - "smithy.api#documentation": "User-defined criteria for sending commands that target instances that meet the\n criteria.
" + "smithy.api#documentation": "User-defined criteria for sending commands that target managed nodes that meet the\n criteria.
" } }, "Values": { @@ -23995,7 +24104,7 @@ } }, "traits": { - "smithy.api#documentation": "An array of search criteria that targets instances using a key-value pair that you\n specify.
\nOne or more targets must be specified for maintenance window Run Command-type tasks.\n Depending on the task, targets are optional for other maintenance window task types (Automation,\n Lambda, and Step Functions). For more information about running tasks\n that don't specify targets, see Registering\n maintenance window tasks without targets in the\n Amazon Web Services Systems Manager User Guide.
\nSupported formats include the following.
\n\n Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3\n
\n
\n Key=tag:my-tag-key,Values=my-tag-value-1,my-tag-value-2\n
\n
\n Key=tag-key,Values=my-tag-key-1,my-tag-key-2\n
\n
\n Run Command and Maintenance window targets only:\n Key=resource-groups:Name,Values=resource-group-name\n
\n
\n Maintenance window targets only:\n Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2\n
\n
\n Automation targets only:\n Key=ResourceGroup;Values=resource-group-name\n
\n
For example:
\n\n Key=InstanceIds,Values=i-02573cafcfEXAMPLE,i-0471e04240EXAMPLE,i-07782c72faEXAMPLE
\n
\n Key=tag:CostCenter,Values=CostCenter1,CostCenter2,CostCenter3
\n
\n Key=tag-key,Values=Name,Instance-Type,CostCenter
\n
\n Run Command and Maintenance window targets only:\n Key=resource-groups:Name,Values=ProductionResourceGroup
\n
This example demonstrates how to target all resources in the resource group ProductionResourceGroup in your maintenance window.
\n\n Maintenance window targets only:\n Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC\n
\n
This example demonstrates how to target only Amazon Elastic Compute Cloud (Amazon EC2)\n instances and VPCs in your maintenance window.
\n\n Automation targets only:\n Key=ResourceGroup,Values=MyResourceGroup
\n
\n State Manager association targets only:\n Key=InstanceIds,Values=*\n
\n
This example demonstrates how to target all managed instances in the Amazon Web Services Region where\n the association was created.
\nFor more information about how to send commands that target instances using\n Key,Value
parameters, see Targeting multiple instances in the Amazon Web Services Systems Manager User Guide.
An array of search criteria that targets managed nodes using a key-value pair that you\n specify.
\nOne or more targets must be specified for maintenance window Run Command-type tasks.\n Depending on the task, targets are optional for other maintenance window task types (Automation,\n Lambda, and Step Functions). For more information about running tasks\n that don't specify targets, see Registering\n maintenance window tasks without targets in the\n Amazon Web Services Systems Manager User Guide.
\nSupported formats include the following.
\n\n Key=InstanceIds,Values=
\n
\n Key=tag:
\n
\n Key=tag-key,Values=
\n
\n Run Command and Maintenance window targets only:\n Key=resource-groups:Name,Values=
\n
\n Maintenance window targets only:\n Key=resource-groups:ResourceTypeFilters,Values=
\n
\n Automation targets only:\n Key=ResourceGroup;Values=
\n
For example:
\n\n Key=InstanceIds,Values=i-02573cafcfEXAMPLE,i-0471e04240EXAMPLE,i-07782c72faEXAMPLE
\n
\n Key=tag:CostCenter,Values=CostCenter1,CostCenter2,CostCenter3
\n
\n Key=tag-key,Values=Name,Instance-Type,CostCenter
\n
\n Run Command and Maintenance window targets only:\n Key=resource-groups:Name,Values=ProductionResourceGroup
\n
This example demonstrates how to target all resources in the resource group ProductionResourceGroup in your maintenance window.
\n\n Maintenance window targets only:\n Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC
\n
This example demonstrates how to target only Amazon Elastic Compute Cloud (Amazon EC2)\n instances and VPCs in your maintenance window.
\n\n Automation targets only:\n Key=ResourceGroup,Values=MyResourceGroup
\n
\n State Manager association targets only:\n Key=InstanceIds,Values=*
\n
This example demonstrates how to target all managed instances in the Amazon Web Services Region where\n the association was created.
\nFor more information about how to send commands that target managed nodes using\n Key,Value
parameters, see Targeting multiple instances in the Amazon Web Services Systems Manager User Guide.
The specified target instance for the session isn't fully configured for use with Session Manager. For\n more information, see Getting started with\n Session Manager in the Amazon Web Services Systems Manager User Guide. This error is also returned if you\n attempt to start a session on an instance that is located in a different account or Region
", + "smithy.api#documentation": "The specified target managed node for the session isn't fully configured for use with Session Manager. For\n more information, see Getting started with\n Session Manager in the Amazon Web Services Systems Manager User Guide. This error is also returned if you\n attempt to start a session on a managed node that is located in a different account or Region
", "smithy.api#error": "client" } }, @@ -24210,7 +24319,7 @@ } ], "traits": { - "smithy.api#documentation": "Permanently ends a session and closes the data connection between the Session Manager client and\n SSM Agent on the instance. A terminated session isn't be resumed.
" + "smithy.api#documentation": "Permanently ends a session and closes the data connection between the Session Manager client and\n SSM Agent on the managed node. A terminated session isn't be resumed.
" } }, "com.amazonaws.ssm#TerminateSessionRequest": { @@ -24488,7 +24597,7 @@ "code": "UnsupportedPlatformType", "httpResponseCode": 400 }, - "smithy.api#documentation": "The document doesn't support the platform type of the given instance ID(s). For example, you\n sent an document for a Windows instance to a Linux instance.
", + "smithy.api#documentation": "The document doesn't support the platform type of the given managed node ID(s). For example, you\n sent an document for a Windows managed node to a Linux node.
", "smithy.api#error": "client" } }, @@ -24579,7 +24688,7 @@ "Name": { "target": "com.amazonaws.ssm#DocumentARN", "traits": { - "smithy.api#documentation": "The name of the SSM Command document or Automation runbook that contains the configuration\n information for the instance.
\nYou can specify Amazon Web Services-predefined documents, documents you created, or a document that is\n shared with you from another account.
\nFor Systems Manager document (SSM document) that are shared with you from other Amazon Web Services accounts, you\n must specify the complete SSM document ARN, in the following format:
\n\n arn:aws:ssm:region:account-id:document/document-name\n
\n
For example:
\n\n arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document
\n
For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need\n to specify the document name. For example, AWS-ApplyPatchBaseline
or\n My-Document
.
The name of the SSM Command document or Automation runbook that contains the configuration\n information for the managed node.
\nYou can specify Amazon Web Services-predefined documents, documents you created, or a document that is\n shared with you from another account.
\nFor Systems Manager document (SSM document) that are shared with you from other Amazon Web Services accounts, you\n must specify the complete SSM document ARN, in the following format:
\n\n arn:aws:ssm:region:account-id:document/document-name\n
\n
For example:
\n\n arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document
\n
For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need\n to specify the document name. For example, AWS-ApplyPatchBaseline
or\n My-Document
.
The number of errors that are allowed before the system stops sending requests to run the\n association on additional targets. You can specify either an absolute number of errors, for\n example 10, or a percentage of the target set, for example 10%. If you specify 3, for example,\n the system stops sending requests when the fourth error is received. If you specify 0, then the\n system stops sending requests after the first error is returned. If you run an association on 50\n instances and set MaxError
to 10%, then the system stops sending the request when\n the sixth error is received.
Executions that are already running an association when MaxErrors
is reached\n are allowed to complete, but some of these executions may fail as well. If you need to ensure\n that there won't be more than max-errors failed executions, set MaxConcurrency
to 1\n so that executions proceed one at a time.
The number of errors that are allowed before the system stops sending requests to run the\n association on additional targets. You can specify either an absolute number of errors, for\n example 10, or a percentage of the target set, for example 10%. If you specify 3, for example,\n the system stops sending requests when the fourth error is received. If you specify 0, then the\n system stops sending requests after the first error is returned. If you run an association on 50\n managed nodes and set MaxError
to 10%, then the system stops sending the request\n when the sixth error is received.
Executions that are already running an association when MaxErrors
is reached\n are allowed to complete, but some of these executions may fail as well. If you need to ensure\n that there won't be more than max-errors failed executions, set MaxConcurrency
to 1\n so that executions proceed one at a time.
The maximum number of targets allowed to run the association at the same time. You can\n specify a number, for example 10, or a percentage of the target set, for example 10%. The default\n value is 100%, which means all targets run the association at the same time.
\nIf a new instance starts and attempts to run an association while Systems Manager is running\n MaxConcurrency
associations, the association is allowed to run. During the next\n association interval, the new instance will process its association within the limit specified\n for MaxConcurrency
.
The maximum number of targets allowed to run the association at the same time. You can\n specify a number, for example 10, or a percentage of the target set, for example 10%. The default\n value is 100%, which means all targets run the association at the same time.
\nIf a new managed node starts and attempts to run an association while Systems Manager is running\n MaxConcurrency
associations, the association is allowed to run. During the next\n association interval, the new managed node will process its association within the limit specified\n for MaxConcurrency
.
Updates the status of the Amazon Web Services Systems Manager document (SSM document) associated with the specified\n instance.
\n\n UpdateAssociationStatus
is primarily used by the Amazon Web Services Systems Manager Agent (SSM Agent) to\n report status updates about your associations and is only used for associations created with the\n InstanceId
legacy parameter.
Updates the status of the Amazon Web Services Systems Manager document (SSM document) associated with the specified\n managed node.
\n\n UpdateAssociationStatus
is primarily used by the Amazon Web Services Systems Manager Agent (SSM Agent) to\n report status updates about your associations and is only used for associations created with the\n InstanceId
legacy parameter.
The instance ID.
", + "smithy.api#documentation": "The managed node ID.
", "smithy.api#required": {} } }, @@ -25290,7 +25399,7 @@ "Targets": { "target": "com.amazonaws.ssm#Targets", "traits": { - "smithy.api#documentation": "The targets (either instances or tags) to modify. Instances are specified using the format\n Key=instanceids,Values=instanceID_1,instanceID_2
. Tags are specified using the\n format Key=tag_name,Values=tag_value
.
One or more targets must be specified for maintenance window Run Command-type tasks.\n Depending on the task, targets are optional for other maintenance window task types (Automation,\n Lambda, and Step Functions). For more information about running tasks\n that don't specify targets, see Registering\n maintenance window tasks without targets in the\n Amazon Web Services Systems Manager User Guide.
\nThe targets (either managed nodes or tags) to modify. Managed nodes are specified using the\n format Key=instanceids,Values=instanceID_1,instanceID_2
. Tags are specified using\n the format Key=tag_name,Values=tag_value
.
One or more targets must be specified for maintenance window Run Command-type tasks.\n Depending on the task, targets are optional for other maintenance window task types (Automation,\n Lambda, and Step Functions). For more information about running tasks\n that don't specify targets, see Registering\n maintenance window tasks without targets in the\n Amazon Web Services Systems Manager User Guide.
\nChanges the Identity and Access Management (IAM) role that is assigned to the\n on-premises instance or virtual machines (VM). IAM roles are first assigned to\n these hybrid instances during the activation process. For more information, see CreateActivation.
" + "smithy.api#documentation": "Changes the Identity and Access Management (IAM) role that is assigned to the\n on-premises server, edge device, or virtual machines (VM). IAM roles are first\n assigned to these hybrid nodes during the activation process. For more information, see CreateActivation.
" } }, "com.amazonaws.ssm#UpdateManagedInstanceRoleRequest": { @@ -25484,7 +25593,7 @@ "InstanceId": { "target": "com.amazonaws.ssm#ManagedInstanceId", "traits": { - "smithy.api#documentation": "The ID of the managed instance where you want to update the role.
", + "smithy.api#documentation": "The ID of the managed node where you want to update the role.
", "smithy.api#required": {} } }, @@ -25758,7 +25867,7 @@ "target": "com.amazonaws.ssm#Boolean", "traits": { "smithy.api#box": {}, - "smithy.api#documentation": "Indicates whether the list of approved patches includes non-security updates that should be\n applied to the instances. The default value is false
. Applies to Linux instances\n only.
Indicates whether the list of approved patches includes non-security updates that should be\n applied to the managed nodes. The default value is false
. Applies to Linux managed\n nodes only.
Information about the patches to use to update the instances, including target operating\n systems and source repositories. Applies to Linux instances only.
" + "smithy.api#documentation": "Information about the patches to use to update the managed nodes, including target operating\n systems and source repositories. Applies to Linux managed nodes only.
" } }, "Replace": { @@ -25843,7 +25952,7 @@ "target": "com.amazonaws.ssm#Boolean", "traits": { "smithy.api#box": {}, - "smithy.api#documentation": "Indicates whether the list of approved patches includes non-security updates that should be\n applied to the instances. The default value is false
. Applies to Linux instances\n only.
Indicates whether the list of approved patches includes non-security updates that should be\n applied to the managed nodes. The default value is false
. Applies to Linux managed\n nodes only.
Information about the patches to use to update the instances, including target operating\n systems and source repositories. Applies to Linux instances only.
" + "smithy.api#documentation": "Information about the patches to use to update the managed nodes, including target operating\n systems and source repositories. Applies to Linux managed nodes only.
" } } } diff --git a/codegen/sdk-codegen/aws-models/sts.2011-06-15.json b/codegen/sdk-codegen/aws-models/sts.2011-06-15.json index a542a7fa412..85099f3845d 100644 --- a/codegen/sdk-codegen/aws-models/sts.2011-06-15.json +++ b/codegen/sdk-codegen/aws-models/sts.2011-06-15.json @@ -31,6 +31,24 @@ "shapes": { "com.amazonaws.sts#AWSSecurityTokenServiceV20110615": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "STS", + "arnNamespace": "sts", + "cloudFormationName": "STS", + "cloudTrailEventSource": "sts.amazonaws.com", + "endpointPrefix": "sts" + }, + "aws.auth#sigv4": { + "name": "sts" + }, + "aws.protocols#awsQuery": {}, + "smithy.api#documentation": "Security Token Service (STS) enables you to request temporary, limited-privilege \n credentials for Identity and Access Management (IAM) users or for users that you \n authenticate (federated users). This guide provides descriptions of the STS API. For \n more information about using this service, see Temporary Security Credentials.
", + "smithy.api#title": "AWS Security Token Service", + "smithy.api#xmlNamespace": { + "uri": "https://sts.amazonaws.com/doc/2011-06-15/" + } + }, "version": "2011-06-15", "operations": [ { @@ -57,25 +75,7 @@ { "target": "com.amazonaws.sts#GetSessionToken" } - ], - "traits": { - "aws.api#service": { - "sdkId": "STS", - "arnNamespace": "sts", - "cloudFormationName": "STS", - "cloudTrailEventSource": "sts.amazonaws.com", - "endpointPrefix": "sts" - }, - "aws.auth#sigv4": { - "name": "sts" - }, - "aws.protocols#awsQuery": {}, - "smithy.api#documentation": "Security Token Service (STS) enables you to request temporary, limited-privilege \n credentials for Identity and Access Management (IAM) users or for users that you \n authenticate (federated users). This guide provides descriptions of the STS API. For \n more information about using this service, see Temporary Security Credentials.
", - "smithy.api#title": "AWS Security Token Service", - "smithy.api#xmlNamespace": { - "uri": "https://sts.amazonaws.com/doc/2011-06-15/" - } - } + ] }, "com.amazonaws.sts#AssumeRole": { "type": "operation", @@ -100,7 +100,7 @@ } ], "traits": { - "smithy.api#documentation": "Returns a set of temporary security credentials that you can use to access Amazon Web Services\n resources that you might not normally have access to. These temporary credentials\n consist of an access key ID, a secret access key, and a security token. Typically, you\n use AssumeRole
within your account or for cross-account access. For a\n comparison of AssumeRole
with other API operations that produce temporary\n credentials, see Requesting Temporary Security\n Credentials and Comparing\n the STS API operations in the\n IAM User Guide.
\n Permissions\n
\nThe temporary security credentials created by AssumeRole
can be used to\n make API calls to any Amazon Web Services service with the following exception: You cannot call the\n STS GetFederationToken
or GetSessionToken
API\n operations.
(Optional) You can pass inline or managed session policies to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policies to use as managed session policies.\n The plaintext that you use for both inline and managed session policies can't exceed 2,048\n characters. Passing policies to this operation returns new \n temporary credentials. The resulting session's permissions are the intersection of the \n role's identity-based policy and the session policies. You can use the role's temporary \n credentials in subsequent Amazon Web Services API calls to access resources in the account that owns \n the role. You cannot use session policies to grant more permissions than those allowed \n by the identity-based policy of the role that is being assumed. For more information, see\n Session\n Policies in the IAM User Guide.
\nTo assume a role from a different account, your account must be trusted by the\n role. The trust relationship is defined in the role's trust policy when the role is\n created. That trust policy states which accounts are allowed to delegate that access to\n users in the account.
\nA user who wants to access a role in a different account must also have permissions that\n are delegated from the user account administrator. The administrator must attach a policy\n that allows the user to call AssumeRole
for the ARN of the role in the other\n account. If the user is in the same account as the role, then you can do either of the\n following:
Attach a policy to the user (identical to the previous user in a different\n account).
\nAdd the user as a principal directly in the role's trust policy.
\nIn this case, the trust policy acts as an IAM resource-based policy. Users in the same\n account as the role do not need explicit permission to assume the role. For more\n information about trust policies and resource-based policies, see IAM Policies in\n the IAM User Guide.
\n\n Tags\n
\n(Optional) You can pass tag key-value pairs to your session. These tags are called\n session tags. For more information about session tags, see Passing Session Tags in STS in the\n IAM User Guide.
\nAn administrator must grant you the permissions necessary to pass session tags. The\n administrator can also create granular permissions to allow you to pass only specific\n session tags. For more information, see Tutorial: Using Tags\n for Attribute-Based Access Control in the\n IAM User Guide.
\nYou can set the session tags as transitive. Transitive tags persist during role\n chaining. For more information, see Chaining Roles\n with Session Tags in the IAM User Guide.
\n\n Using MFA with AssumeRole\n
\n(Optional) You can include multi-factor authentication (MFA) information when you call\n AssumeRole
. This is useful for cross-account scenarios to ensure that the\n user that assumes the role has been authenticated with an Amazon Web Services MFA device. In that\n scenario, the trust policy of the role being assumed includes a condition that tests for\n MFA authentication. If the caller does not include valid MFA information, the request to\n assume the role is denied. The condition in a trust policy that tests for MFA\n authentication might look like the following example.
\n \"Condition\": {\"Bool\": {\"aws:MultiFactorAuthPresent\": true}}
\n
For more information, see Configuring MFA-Protected API Access\n in the IAM User Guide guide.
\nTo use MFA with AssumeRole
, you pass values for the\n SerialNumber
and TokenCode
parameters. The\n SerialNumber
value identifies the user's hardware or virtual MFA device.\n The TokenCode
is the time-based one-time password (TOTP) that the MFA device\n produces.
Returns a set of temporary security credentials that you can use to access Amazon Web Services\n resources that you might not normally have access to. These temporary credentials consist\n of an access key ID, a secret access key, and a security token. Typically, you use\n AssumeRole
within your account or for cross-account access. For a\n comparison of AssumeRole
with other API operations that produce temporary\n credentials, see Requesting Temporary Security\n Credentials and Comparing the\n Amazon Web Services STS API operations in the IAM User Guide.
\n Permissions\n
\nThe temporary security credentials created by AssumeRole
can be used to\n make API calls to any Amazon Web Services service with the following exception: You cannot call the\n Amazon Web Services STS GetFederationToken
or GetSessionToken
API\n operations.
(Optional) You can pass inline or managed session policies to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policies to use as managed session policies.\n The plaintext that you use for both inline and managed session policies can't exceed 2,048\n characters. Passing policies to this operation returns new \n temporary credentials. The resulting session's permissions are the intersection of the \n role's identity-based policy and the session policies. You can use the role's temporary \n credentials in subsequent Amazon Web Services API calls to access resources in the account that owns \n the role. You cannot use session policies to grant more permissions than those allowed \n by the identity-based policy of the role that is being assumed. For more information, see\n Session\n Policies in the IAM User Guide.
\nWhen you create a role, you create two policies: A role trust policy that specifies\n who can assume the role and a permissions policy that specifies\n what can be done with the role. You specify the trusted principal\n who is allowed to assume the role in the role trust policy.
\nTo assume a role from a different account, your Amazon Web Services account must be trusted by the\n role. The trust relationship is defined in the role's trust policy when the role is\n created. That trust policy states which accounts are allowed to delegate that access to\n users in the account.
\nA user who wants to access a role in a different account must also have permissions that\n are delegated from the user account administrator. The administrator must attach a policy\n that allows the user to call AssumeRole
for the ARN of the role in the other\n account.
To allow a user to assume a role in the same account, you can do either of the\n following:
\nAttach a policy to the user that allows the user to call\n AssumeRole
(as long as the role's trust policy trusts the account).
Add the user as a principal directly in the role's trust policy.
\nYou can do either because the role’s trust policy acts as an IAM resource-based\n policy. When a resource-based policy grants access to a principal in the same account, no\n additional identity-based policy is required. For more information about trust policies and\n resource-based policies, see IAM Policies in the\n IAM User Guide.
\n\n\n Tags\n
\n(Optional) You can pass tag key-value pairs to your session. These tags are called\n session tags. For more information about session tags, see Passing Session Tags in STS in the\n IAM User Guide.
\nAn administrator must grant you the permissions necessary to pass session tags. The\n administrator can also create granular permissions to allow you to pass only specific\n session tags. For more information, see Tutorial: Using Tags\n for Attribute-Based Access Control in the\n IAM User Guide.
\nYou can set the session tags as transitive. Transitive tags persist during role\n chaining. For more information, see Chaining Roles\n with Session Tags in the IAM User Guide.
\n\n Using MFA with AssumeRole\n
\n(Optional) You can include multi-factor authentication (MFA) information when you call\n AssumeRole
. This is useful for cross-account scenarios to ensure that the\n user that assumes the role has been authenticated with an Amazon Web Services MFA device. In that\n scenario, the trust policy of the role being assumed includes a condition that tests for\n MFA authentication. If the caller does not include valid MFA information, the request to\n assume the role is denied. The condition in a trust policy that tests for MFA\n authentication might look like the following example.
\n \"Condition\": {\"Bool\": {\"aws:MultiFactorAuthPresent\": true}}
\n
For more information, see Configuring MFA-Protected API Access\n in the IAM User Guide guide.
\nTo use MFA with AssumeRole
, you pass values for the\n SerialNumber
and TokenCode
parameters. The\n SerialNumber
value identifies the user's hardware or virtual MFA device.\n The TokenCode
is the time-based one-time password (TOTP) that the MFA device\n produces.
The Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as\n managed session policies. The policies must exist in the same account as the role.
\nThis parameter is optional. You can provide up to 10 managed policy ARNs. However, the\n plaintext that you use for both inline and managed session policies can't exceed 2,048\n characters. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services\n Service Namespaces in the Amazon Web Services General Reference.
\nAn Amazon Web Services conversion compresses the passed session policies and session tags into a\n packed binary format that has a separate limit. Your request can fail for this limit\n even if your plaintext meets the other requirements. The PackedPolicySize
\n response element indicates by percentage how close the policies and tags for your\n request are to the upper size limit.\n
Passing policies to this operation returns new \n temporary credentials. The resulting session's permissions are the intersection of the \n role's identity-based policy and the session policies. You can use the role's temporary \n credentials in subsequent Amazon Web Services API calls to access resources in the account that owns \n the role. You cannot use session policies to grant more permissions than those allowed \n by the identity-based policy of the role that is being assumed. For more information, see\n Session\n Policies in the IAM User Guide.
" + "smithy.api#documentation": "The Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as\n managed session policies. The policies must exist in the same account as the role.
\nThis parameter is optional. You can provide up to 10 managed policy ARNs. However, the\n plaintext that you use for both inline and managed session policies can't exceed 2,048\n characters. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services\n Service Namespaces in the Amazon Web Services General Reference.
\n \nAn Amazon Web Services conversion compresses the passed session policies and session tags into a\n packed binary format that has a separate limit. Your request can fail for this limit\n even if your plaintext meets the other requirements. The PackedPolicySize
\n response element indicates by percentage how close the policies and tags for your\n request are to the upper size limit.\n
Passing policies to this operation returns new \n temporary credentials. The resulting session's permissions are the intersection of the \n role's identity-based policy and the session policies. You can use the role's temporary \n credentials in subsequent Amazon Web Services API calls to access resources in the account that owns \n the role. You cannot use session policies to grant more permissions than those allowed \n by the identity-based policy of the role that is being assumed. For more information, see\n Session\n Policies in the IAM User Guide.
" } }, "Policy": { "target": "com.amazonaws.sts#sessionPolicyDocumentType", "traits": { - "smithy.api#documentation": "An IAM policy in JSON format that you want to use as an inline session policy.
\nThis parameter is optional. Passing policies to this operation returns new \n temporary credentials. The resulting session's permissions are the intersection of the \n role's identity-based policy and the session policies. You can use the role's temporary \n credentials in subsequent Amazon Web Services API calls to access resources in the account that owns \n the role. You cannot use session policies to grant more permissions than those allowed \n by the identity-based policy of the role that is being assumed. For more information, see\n Session\n Policies in the IAM User Guide.
\nThe plaintext that you use for both inline and managed session policies can't exceed\n 2,048 characters. The JSON policy characters can be any ASCII character from the space\n character to the end of the valid character list (\\u0020 through \\u00FF). It can also\n include the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)\n characters.
\nAn Amazon Web Services conversion compresses the passed session policies and session tags into a\n packed binary format that has a separate limit. Your request can fail for this limit\n even if your plaintext meets the other requirements. The PackedPolicySize
\n response element indicates by percentage how close the policies and tags for your\n request are to the upper size limit.\n
An IAM policy in JSON format that you want to use as an inline session policy.
\nThis parameter is optional. Passing policies to this operation returns new \n temporary credentials. The resulting session's permissions are the intersection of the \n role's identity-based policy and the session policies. You can use the role's temporary \n credentials in subsequent Amazon Web Services API calls to access resources in the account that owns \n the role. You cannot use session policies to grant more permissions than those allowed \n by the identity-based policy of the role that is being assumed. For more information, see\n Session\n Policies in the IAM User Guide.
\nThe plaintext that you use for both inline and managed session policies can't exceed\n 2,048 characters. The JSON policy characters can be any ASCII character from the space\n character to the end of the valid character list (\\u0020 through \\u00FF). It can also\n include the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)\n characters.
\n \nAn Amazon Web Services conversion compresses the passed session policies and session tags into a\n packed binary format that has a separate limit. Your request can fail for this limit\n even if your plaintext meets the other requirements. The PackedPolicySize
\n response element indicates by percentage how close the policies and tags for your\n request are to the upper size limit.\n
The duration, in seconds, of the role session. The value specified can can range from\n 900 seconds (15 minutes) up to the maximum session duration that is set for the role. The\n maximum session duration setting can have a value from 1 hour to 12 hours. If you specify a\n value higher than this setting or the administrator setting (whichever is lower), the\n operation fails. For example, if you specify a session duration of 12 hours, but your\n administrator set the maximum session duration to 6 hours, your operation fails. To learn\n how to view the maximum value for your role, see View the\n Maximum Session Duration Setting for a Role in the\n IAM User Guide.
\nBy default, the value is set to 3600
seconds.
The DurationSeconds
parameter is separate from the duration of a console\n session that you might request using the returned credentials. The request to the\n federation endpoint for a console sign-in token takes a SessionDuration
\n parameter that specifies the maximum length of the console session. For more\n information, see Creating a URL\n that Enables Federated Users to Access the Management Console in the\n IAM User Guide.
The duration, in seconds, of the role session. The value specified can range from 900\n seconds (15 minutes) up to the maximum session duration set for the role. The maximum\n session duration setting can have a value from 1 hour to 12 hours. If you specify a value\n higher than this setting or the administrator setting (whichever is lower), the operation\n fails. For example, if you specify a session duration of 12 hours, but your administrator\n set the maximum session duration to 6 hours, your operation fails.
\nRole chaining limits your Amazon Web Services CLI or Amazon Web Services API role session to a maximum of one hour.\n When you use the AssumeRole
API operation to assume a role, you can specify\n the duration of your role session with the DurationSeconds
parameter. You can\n specify a parameter value of up to 43200 seconds (12 hours), depending on the maximum\n session duration setting for your role. However, if you assume a role using role chaining\n and provide a DurationSeconds
parameter value greater than one hour, the\n operation fails. To learn how to view the maximum value for your role, see View the\n Maximum Session Duration Setting for a Role in the\n IAM User Guide.
By default, the value is set to 3600
seconds.
The DurationSeconds
parameter is separate from the duration of a console\n session that you might request using the returned credentials. The request to the\n federation endpoint for a console sign-in token takes a SessionDuration
\n parameter that specifies the maximum length of the console session. For more\n information, see Creating a URL\n that Enables Federated Users to Access the Amazon Web Services Management Console in the\n IAM User Guide.
A list of session tags that you want to pass. Each session tag consists of a key name\n and an associated value. For more information about session tags, see Tagging STS\n Sessions in the IAM User Guide.
\nThis parameter is optional. You can pass up to 50 session tags. The plaintext session\n tag keys can’t exceed 128 characters, and the values can’t exceed 256 characters. For these\n and additional limits, see IAM\n and STS Character Limits in the IAM User Guide.
\n \nAn Amazon Web Services conversion compresses the passed session policies and session tags into a\n packed binary format that has a separate limit. Your request can fail for this limit\n even if your plaintext meets the other requirements. The PackedPolicySize
\n response element indicates by percentage how close the policies and tags for your\n request are to the upper size limit.\n
You can pass a session tag with the same key as a tag that is already\n attached to the role. When you do, session tags override a role tag with the same key.
\nTag key–value pairs are not case sensitive, but case is preserved. This means that you\n cannot have separate Department
and department
tag keys. Assume\n that the role has the Department
=Marketing
tag and you pass the\n department
=engineering
session tag. Department
\n and department
are not saved as separate tags, and the session tag passed in\n the request takes precedence over the role tag.
Additionally, if you used temporary credentials to perform this operation, the new\n session inherits any transitive session tags from the calling session. If you pass a\n session tag with the same key as an inherited tag, the operation fails. To view the\n inherited tags for a session, see the CloudTrail logs. For more information, see Viewing Session Tags in CloudTrail in the\n IAM User Guide.
" + "smithy.api#documentation": "A list of session tags that you want to pass. Each session tag consists of a key name\n and an associated value. For more information about session tags, see Tagging Amazon Web Services STS\n Sessions in the IAM User Guide.
\nThis parameter is optional. You can pass up to 50 session tags. The plaintext session\n tag keys can’t exceed 128 characters, and the values can’t exceed 256 characters. For these\n and additional limits, see IAM\n and STS Character Limits in the IAM User Guide.
\n \nAn Amazon Web Services conversion compresses the passed session policies and session tags into a\n packed binary format that has a separate limit. Your request can fail for this limit\n even if your plaintext meets the other requirements. The PackedPolicySize
\n response element indicates by percentage how close the policies and tags for your\n request are to the upper size limit.\n
You can pass a session tag with the same key as a tag that is already attached to the\n role. When you do, session tags override a role tag with the same key.
\nTag key–value pairs are not case sensitive, but case is preserved. This means that you\n cannot have separate Department
and department
tag keys. Assume\n that the role has the Department
=Marketing
tag and you pass the\n department
=engineering
session tag. Department
\n and department
are not saved as separate tags, and the session tag passed in\n the request takes precedence over the role tag.
Additionally, if you used temporary credentials to perform this operation, the new\n session inherits any transitive session tags from the calling session. If you pass a\n session tag with the same key as an inherited tag, the operation fails. To view the\n inherited tags for a session, see the CloudTrail logs. For more information, see Viewing Session Tags in CloudTrail in the\n IAM User Guide.
" } }, "TransitiveTagKeys": { @@ -171,7 +171,7 @@ "SourceIdentity": { "target": "com.amazonaws.sts#sourceIdentityType", "traits": { - "smithy.api#documentation": "The source identity specified by the principal that is calling the\n AssumeRole
operation.
You can require users to specify a source identity when they assume a role. You do this\n by using the sts:SourceIdentity
condition key in a role trust policy. You can\n use source identity information in CloudTrail logs to determine who took actions with a role.\n You can use the aws:SourceIdentity
condition key to further control access to\n Amazon Web Services resources based on the value of source identity. For more information about using\n source identity, see Monitor and control\n actions taken with assumed roles in the\n IAM User Guide.
The regex used to validate this parameter is a string of characters consisting of upper-\n and lower-case alphanumeric characters with no spaces. You can also include underscores or\n any of the following characters: =,.@-. You cannot use a value that begins with the text\n aws:
. This prefix is reserved for Amazon Web Services internal\n use.
The source identity specified by the principal that is calling the\n AssumeRole
operation.
You can require users to specify a source identity when they assume a role. You do this\n by using the sts:SourceIdentity
condition key in a role trust policy. You can\n use source identity information in CloudTrail logs to determine who took actions with a role.\n You can use the aws:SourceIdentity
condition key to further control access to\n Amazon Web Services resources based on the value of source identity. For more information about using\n source identity, see Monitor and control\n actions taken with assumed roles in the\n IAM User Guide.
The regex used to validate this parameter is a string of characters consisting of upper-\n and lower-case alphanumeric characters with no spaces. You can also include underscores or\n any of the following characters: =,.@-. You cannot use a value that begins with the text\n aws:
. This prefix is reserved for Amazon Web Services internal use.
The temporary security credentials, which include an access key ID, a secret access key,\n and a security (or session) token.
\nThe size of the security token that STS API operations return is not fixed. We\n strongly recommend that you make no assumptions about the maximum size.
\nThe temporary security credentials, which include an access key ID, a secret access key,\n and a security (or session) token.
\n \nThe size of the security token that STS API operations return is not fixed. We\n strongly recommend that you make no assumptions about the maximum size.
\nReturns a set of temporary security credentials for users who have been authenticated\n via a SAML authentication response. This operation provides a mechanism for tying an\n enterprise identity store or directory to role-based Amazon Web Services access without user-specific\n credentials or configuration. For a comparison of AssumeRoleWithSAML
with the\n other API operations that produce temporary credentials, see Requesting Temporary Security\n Credentials and Comparing the\n STS API operations in the IAM User Guide.
The temporary security credentials returned by this operation consist of an access key\n ID, a secret access key, and a security token. Applications can use these temporary\n security credentials to sign calls to Amazon Web Services services.
\n\n Session Duration\n
\nBy default, the temporary security credentials created by\n AssumeRoleWithSAML
last for one hour. However, you can use the optional\n DurationSeconds
parameter to specify the duration of your session. Your\n role session lasts for the duration that you specify, or until the time specified in the\n SAML authentication response's SessionNotOnOrAfter
value, whichever is\n shorter. You can provide a DurationSeconds
value from 900 seconds (15 minutes)\n up to the maximum session duration setting for the role. This setting can have a value from\n 1 hour to 12 hours. To learn how to view the maximum value for your role, see View the\n Maximum Session Duration Setting for a Role in the\n IAM User Guide. The maximum session duration limit applies when\n you use the AssumeRole*
API operations or the assume-role*
CLI\n commands. However the limit does not apply when you use those operations to create a\n console URL. For more information, see Using IAM Roles in the\n IAM User Guide.
\n Role chaining limits your CLI or Amazon Web Services API\n role session to a maximum of one hour. When you use the AssumeRole
API\n operation to assume a role, you can specify the duration of your role session with\n the DurationSeconds
parameter. You can specify a parameter value of up\n to 43200 seconds (12 hours), depending on the maximum session duration setting for\n your role. However, if you assume a role using role chaining and provide a\n DurationSeconds
parameter value greater than one hour, the\n operation fails.
\n Permissions\n
\nThe temporary security credentials created by AssumeRoleWithSAML
can be\n used to make API calls to any Amazon Web Services service with the following exception: you cannot call\n the STS GetFederationToken
or GetSessionToken
API\n operations.
(Optional) You can pass inline or managed session policies to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policies to use as managed session policies.\n The plaintext that you use for both inline and managed session policies can't exceed 2,048\n characters. Passing policies to this operation returns new \n temporary credentials. The resulting session's permissions are the intersection of the \n role's identity-based policy and the session policies. You can use the role's temporary \n credentials in subsequent Amazon Web Services API calls to access resources in the account that owns \n the role. You cannot use session policies to grant more permissions than those allowed \n by the identity-based policy of the role that is being assumed. For more information, see\n Session\n Policies in the IAM User Guide.
\nCalling AssumeRoleWithSAML
does not require the use of Amazon Web Services security\n credentials. The identity of the caller is validated by using keys in the metadata document\n that is uploaded for the SAML provider entity for your identity provider.
Calling AssumeRoleWithSAML
can result in an entry in your CloudTrail logs.\n The entry includes the value in the NameID
element of the SAML assertion.\n We recommend that you use a NameIDType
that is not associated with any\n personally identifiable information (PII). For example, you could instead use the\n persistent identifier\n (urn:oasis:names:tc:SAML:2.0:nameid-format:persistent
).
\n Tags\n
\n(Optional) You can configure your IdP to pass attributes into your SAML assertion as\n session tags. Each session tag consists of a key name and an associated value. For more\n information about session tags, see Passing Session Tags in STS in the\n IAM User Guide.
\nYou can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128\n characters and the values can’t exceed 256 characters. For these and additional limits, see\n IAM\n and STS Character Limits in the IAM User Guide.
\n \nAn Amazon Web Services conversion compresses the passed session policies and session tags into a\n packed binary format that has a separate limit. Your request can fail for this limit\n even if your plaintext meets the other requirements. The PackedPolicySize
\n response element indicates by percentage how close the policies and tags for your\n request are to the upper size limit.\n
You can pass a session tag with the same key as a tag that is\n attached to the role. When you do, session tags override the role's tags with the same\n key.
\nAn administrator must grant you the permissions necessary to pass session tags. The\n administrator can also create granular permissions to allow you to pass only specific\n session tags. For more information, see Tutorial: Using Tags\n for Attribute-Based Access Control in the\n IAM User Guide.
\nYou can set the session tags as transitive. Transitive tags persist during role\n chaining. For more information, see Chaining Roles\n with Session Tags in the IAM User Guide.
\n\n SAML Configuration\n
\nBefore your application can call AssumeRoleWithSAML
, you must configure\n your SAML identity provider (IdP) to issue the claims required by Amazon Web Services. Additionally, you\n must use Identity and Access Management (IAM) to create a SAML provider entity in your Amazon Web Services account that\n represents your identity provider. You must also create an IAM role that specifies this\n SAML provider in its trust policy.
For more information, see the following resources:
\n\n About\n SAML 2.0-based Federation in the IAM User Guide.\n
\n\n Creating SAML Identity Providers in the\n IAM User Guide.
\n\n Configuring\n a Relying Party and Claims in the IAM User Guide.\n
\n\n Creating a Role for SAML 2.0 Federation in the\n IAM User Guide.
\nReturns a set of temporary security credentials for users who have been authenticated\n via a SAML authentication response. This operation provides a mechanism for tying an\n enterprise identity store or directory to role-based Amazon Web Services access without user-specific\n credentials or configuration. For a comparison of AssumeRoleWithSAML
with the\n other API operations that produce temporary credentials, see Requesting Temporary Security\n Credentials and Comparing the\n Amazon Web Services STS API operations in the IAM User Guide.
The temporary security credentials returned by this operation consist of an access key\n ID, a secret access key, and a security token. Applications can use these temporary\n security credentials to sign calls to Amazon Web Services services.
\n\n Session Duration\n
\nBy default, the temporary security credentials created by\n AssumeRoleWithSAML
last for one hour. However, you can use the optional\n DurationSeconds
parameter to specify the duration of your session. Your\n role session lasts for the duration that you specify, or until the time specified in the\n SAML authentication response's SessionNotOnOrAfter
value, whichever is\n shorter. You can provide a DurationSeconds
value from 900 seconds (15 minutes)\n up to the maximum session duration setting for the role. This setting can have a value from\n 1 hour to 12 hours. To learn how to view the maximum value for your role, see View the\n Maximum Session Duration Setting for a Role in the\n IAM User Guide. The maximum session duration limit applies when\n you use the AssumeRole*
API operations or the assume-role*
CLI\n commands. However the limit does not apply when you use those operations to create a\n console URL. For more information, see Using IAM Roles in the\n IAM User Guide.
\n Role chaining limits your CLI or Amazon Web Services API role\n session to a maximum of one hour. When you use the AssumeRole
API operation\n to assume a role, you can specify the duration of your role session with the\n DurationSeconds
parameter. You can specify a parameter value of up to\n 43200 seconds (12 hours), depending on the maximum session duration setting for your\n role. However, if you assume a role using role chaining and provide a\n DurationSeconds
parameter value greater than one hour, the operation\n fails.
\n Permissions\n
\nThe temporary security credentials created by AssumeRoleWithSAML
can be\n used to make API calls to any Amazon Web Services service with the following exception: you cannot call\n the STS GetFederationToken
or GetSessionToken
API\n operations.
(Optional) You can pass inline or managed session policies to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policies to use as managed session policies.\n The plaintext that you use for both inline and managed session policies can't exceed 2,048\n characters. Passing policies to this operation returns new \n temporary credentials. The resulting session's permissions are the intersection of the \n role's identity-based policy and the session policies. You can use the role's temporary \n credentials in subsequent Amazon Web Services API calls to access resources in the account that owns \n the role. You cannot use session policies to grant more permissions than those allowed \n by the identity-based policy of the role that is being assumed. For more information, see\n Session\n Policies in the IAM User Guide.
\nCalling AssumeRoleWithSAML
does not require the use of Amazon Web Services security\n credentials. The identity of the caller is validated by using keys in the metadata document\n that is uploaded for the SAML provider entity for your identity provider.
Calling AssumeRoleWithSAML
can result in an entry in your CloudTrail logs.\n The entry includes the value in the NameID
element of the SAML assertion.\n We recommend that you use a NameIDType
that is not associated with any\n personally identifiable information (PII). For example, you could instead use the\n persistent identifier\n (urn:oasis:names:tc:SAML:2.0:nameid-format:persistent
).
\n Tags\n
\n(Optional) You can configure your IdP to pass attributes into your SAML assertion as\n session tags. Each session tag consists of a key name and an associated value. For more\n information about session tags, see Passing Session Tags in STS in the\n IAM User Guide.
\nYou can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128\n characters and the values can’t exceed 256 characters. For these and additional limits, see\n IAM\n and STS Character Limits in the IAM User Guide.
\n \nAn Amazon Web Services conversion compresses the passed session policies and session tags into a\n packed binary format that has a separate limit. Your request can fail for this limit\n even if your plaintext meets the other requirements. The PackedPolicySize
\n response element indicates by percentage how close the policies and tags for your\n request are to the upper size limit.\n
You can pass a session tag with the same key as a tag that is attached to the role. When\n you do, session tags override the role's tags with the same key.
\nAn administrator must grant you the permissions necessary to pass session tags. The\n administrator can also create granular permissions to allow you to pass only specific\n session tags. For more information, see Tutorial: Using Tags\n for Attribute-Based Access Control in the\n IAM User Guide.
\nYou can set the session tags as transitive. Transitive tags persist during role\n chaining. For more information, see Chaining Roles\n with Session Tags in the IAM User Guide.
\n\n SAML Configuration\n
\nBefore your application can call AssumeRoleWithSAML
, you must configure\n your SAML identity provider (IdP) to issue the claims required by Amazon Web Services. Additionally, you\n must use Identity and Access Management (IAM) to create a SAML provider entity in your Amazon Web Services account that\n represents your identity provider. You must also create an IAM role that specifies this\n SAML provider in its trust policy.
For more information, see the following resources:
\n\n About\n SAML 2.0-based Federation in the IAM User Guide.\n
\n\n Creating SAML Identity Providers in the\n IAM User Guide.
\n\n Configuring\n a Relying Party and Claims in the IAM User Guide.\n
\n\n Creating a Role for SAML 2.0 Federation in the\n IAM User Guide.
\nThe Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as\n managed session policies. The policies must exist in the same account as the role.
\nThis parameter is optional. You can provide up to 10 managed policy ARNs. However, the\n plaintext that you use for both inline and managed session policies can't exceed 2,048\n characters. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services\n Service Namespaces in the Amazon Web Services General Reference.
\nAn Amazon Web Services conversion compresses the passed session policies and session tags into a\n packed binary format that has a separate limit. Your request can fail for this limit\n even if your plaintext meets the other requirements. The PackedPolicySize
\n response element indicates by percentage how close the policies and tags for your\n request are to the upper size limit.\n
Passing policies to this operation returns new \n temporary credentials. The resulting session's permissions are the intersection of the \n role's identity-based policy and the session policies. You can use the role's temporary \n credentials in subsequent Amazon Web Services API calls to access resources in the account that owns \n the role. You cannot use session policies to grant more permissions than those allowed \n by the identity-based policy of the role that is being assumed. For more information, see\n Session\n Policies in the IAM User Guide.
" + "smithy.api#documentation": "The Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as\n managed session policies. The policies must exist in the same account as the role.
\nThis parameter is optional. You can provide up to 10 managed policy ARNs. However, the\n plaintext that you use for both inline and managed session policies can't exceed 2,048\n characters. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services\n Service Namespaces in the Amazon Web Services General Reference.
\n \nAn Amazon Web Services conversion compresses the passed session policies and session tags into a\n packed binary format that has a separate limit. Your request can fail for this limit\n even if your plaintext meets the other requirements. The PackedPolicySize
\n response element indicates by percentage how close the policies and tags for your\n request are to the upper size limit.\n
Passing policies to this operation returns new \n temporary credentials. The resulting session's permissions are the intersection of the \n role's identity-based policy and the session policies. You can use the role's temporary \n credentials in subsequent Amazon Web Services API calls to access resources in the account that owns \n the role. You cannot use session policies to grant more permissions than those allowed \n by the identity-based policy of the role that is being assumed. For more information, see\n Session\n Policies in the IAM User Guide.
" } }, "Policy": { "target": "com.amazonaws.sts#sessionPolicyDocumentType", "traits": { - "smithy.api#documentation": "An IAM policy in JSON format that you want to use as an inline session policy.
\nThis parameter is optional. Passing policies to this operation returns new \n temporary credentials. The resulting session's permissions are the intersection of the \n role's identity-based policy and the session policies. You can use the role's temporary \n credentials in subsequent Amazon Web Services API calls to access resources in the account that owns \n the role. You cannot use session policies to grant more permissions than those allowed \n by the identity-based policy of the role that is being assumed. For more information, see\n Session\n Policies in the IAM User Guide.
\nThe plaintext that you use for both inline and managed session policies can't exceed\n 2,048 characters. The JSON policy characters can be any ASCII character from the space\n character to the end of the valid character list (\\u0020 through \\u00FF). It can also\n include the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)\n characters.
\nAn Amazon Web Services conversion compresses the passed session policies and session tags into a\n packed binary format that has a separate limit. Your request can fail for this limit\n even if your plaintext meets the other requirements. The PackedPolicySize
\n response element indicates by percentage how close the policies and tags for your\n request are to the upper size limit.\n
An IAM policy in JSON format that you want to use as an inline session policy.
\nThis parameter is optional. Passing policies to this operation returns new \n temporary credentials. The resulting session's permissions are the intersection of the \n role's identity-based policy and the session policies. You can use the role's temporary \n credentials in subsequent Amazon Web Services API calls to access resources in the account that owns \n the role. You cannot use session policies to grant more permissions than those allowed \n by the identity-based policy of the role that is being assumed. For more information, see\n Session\n Policies in the IAM User Guide.
\nThe plaintext that you use for both inline and managed session policies can't exceed\n 2,048 characters. The JSON policy characters can be any ASCII character from the space\n character to the end of the valid character list (\\u0020 through \\u00FF). It can also\n include the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)\n characters.
\n \nAn Amazon Web Services conversion compresses the passed session policies and session tags into a\n packed binary format that has a separate limit. Your request can fail for this limit\n even if your plaintext meets the other requirements. The PackedPolicySize
\n response element indicates by percentage how close the policies and tags for your\n request are to the upper size limit.\n
The duration, in seconds, of the role session. Your role session lasts for the duration\n that you specify for the DurationSeconds
parameter, or until the time\n specified in the SAML authentication response's SessionNotOnOrAfter
value,\n whichever is shorter. You can provide a DurationSeconds
value from 900 seconds\n (15 minutes) up to the maximum session duration setting for the role. This setting can have\n a value from 1 hour to 12 hours. If you specify a value higher than this setting, the\n operation fails. For example, if you specify a session duration of 12 hours, but your\n administrator set the maximum session duration to 6 hours, your operation fails. To learn\n how to view the maximum value for your role, see View the\n Maximum Session Duration Setting for a Role in the\n IAM User Guide.
By default, the value is set to 3600
seconds.
The DurationSeconds
parameter is separate from the duration of a console\n session that you might request using the returned credentials. The request to the\n federation endpoint for a console sign-in token takes a SessionDuration
\n parameter that specifies the maximum length of the console session. For more\n information, see Creating a URL\n that Enables Federated Users to Access the Management Console in the\n IAM User Guide.
The duration, in seconds, of the role session. Your role session lasts for the duration\n that you specify for the DurationSeconds
parameter, or until the time\n specified in the SAML authentication response's SessionNotOnOrAfter
value,\n whichever is shorter. You can provide a DurationSeconds
value from 900 seconds\n (15 minutes) up to the maximum session duration setting for the role. This setting can have\n a value from 1 hour to 12 hours. If you specify a value higher than this setting, the\n operation fails. For example, if you specify a session duration of 12 hours, but your\n administrator set the maximum session duration to 6 hours, your operation fails. To learn\n how to view the maximum value for your role, see View the\n Maximum Session Duration Setting for a Role in the\n IAM User Guide.
By default, the value is set to 3600
seconds.
The DurationSeconds
parameter is separate from the duration of a console\n session that you might request using the returned credentials. The request to the\n federation endpoint for a console sign-in token takes a SessionDuration
\n parameter that specifies the maximum length of the console session. For more\n information, see Creating a URL\n that Enables Federated Users to Access the Amazon Web Services Management Console in the\n IAM User Guide.
The temporary security credentials, which include an access key ID, a secret access key,\n and a security (or session) token.
\nThe size of the security token that STS API operations return is not fixed. We\n strongly recommend that you make no assumptions about the maximum size.
\nThe temporary security credentials, which include an access key ID, a secret access key,\n and a security (or session) token.
\n \nThe size of the security token that STS API operations return is not fixed. We\n strongly recommend that you make no assumptions about the maximum size.
\nReturns a set of temporary security credentials for users who have been authenticated in\n a mobile or web application with a web identity provider. Example providers include Amazon Cognito,\n Login with Amazon, Facebook, Google, or any OpenID Connect-compatible identity\n provider.
\nFor mobile applications, we recommend that you use Amazon Cognito. You can use Amazon Cognito with the\n Amazon Web Services SDK for iOS Developer Guide and the Amazon Web Services SDK for Android Developer Guide to uniquely\n identify a user. You can also supply the user with a consistent identity throughout the\n lifetime of an application.
\nTo learn more about Amazon Cognito, see Amazon Cognito Overview in\n Amazon Web Services SDK for Android Developer Guide and Amazon Cognito Overview in the\n Amazon Web Services SDK for iOS Developer Guide.
\nCalling AssumeRoleWithWebIdentity
does not require the use of Amazon Web Services\n security credentials. Therefore, you can distribute an application (for example, on mobile\n devices) that requests temporary security credentials without including long-term Amazon Web Services\n credentials in the application. You also don't need to deploy server-based proxy services\n that use long-term Amazon Web Services credentials. Instead, the identity of the caller is validated by\n using a token from the web identity provider. For a comparison of\n AssumeRoleWithWebIdentity
with the other API operations that produce\n temporary credentials, see Requesting Temporary Security\n Credentials and Comparing the\n STS API operations in the IAM User Guide.
The temporary security credentials returned by this API consist of an access key ID, a\n secret access key, and a security token. Applications can use these temporary security\n credentials to sign calls to Amazon Web Services service API operations.
\n\n Session Duration\n
\nBy default, the temporary security credentials created by\n AssumeRoleWithWebIdentity
last for one hour. However, you can use the\n optional DurationSeconds
parameter to specify the duration of your session.\n You can provide a value from 900 seconds (15 minutes) up to the maximum session duration\n setting for the role. This setting can have a value from 1 hour to 12 hours. To learn how\n to view the maximum value for your role, see View the\n Maximum Session Duration Setting for a Role in the\n IAM User Guide. The maximum session duration limit applies when\n you use the AssumeRole*
API operations or the assume-role*
CLI\n commands. However the limit does not apply when you use those operations to create a\n console URL. For more information, see Using IAM Roles in the\n IAM User Guide.
\n Permissions\n
\nThe temporary security credentials created by AssumeRoleWithWebIdentity
can\n be used to make API calls to any Amazon Web Services service with the following exception: you cannot\n call the STS GetFederationToken
or GetSessionToken
API\n operations.
(Optional) You can pass inline or managed session policies to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policies to use as managed session policies.\n The plaintext that you use for both inline and managed session policies can't exceed 2,048\n characters. Passing policies to this operation returns new \n temporary credentials. The resulting session's permissions are the intersection of the \n role's identity-based policy and the session policies. You can use the role's temporary \n credentials in subsequent Amazon Web Services API calls to access resources in the account that owns \n the role. You cannot use session policies to grant more permissions than those allowed \n by the identity-based policy of the role that is being assumed. For more information, see\n Session\n Policies in the IAM User Guide.
\n\n Tags\n
\n(Optional) You can configure your IdP to pass attributes into your web identity token as\n session tags. Each session tag consists of a key name and an associated value. For more\n information about session tags, see Passing Session Tags in STS in the\n IAM User Guide.
\nYou can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128\n characters and the values can’t exceed 256 characters. For these and additional limits, see\n IAM\n and STS Character Limits in the IAM User Guide.
\n \nAn Amazon Web Services conversion compresses the passed session policies and session tags into a\n packed binary format that has a separate limit. Your request can fail for this limit\n even if your plaintext meets the other requirements. The PackedPolicySize
\n response element indicates by percentage how close the policies and tags for your\n request are to the upper size limit.\n
You can pass a session tag with the same key as a tag that is\n attached to the role. When you do, the session tag overrides the role tag with the same\n key.
\nAn administrator must grant you the permissions necessary to pass session tags. The\n administrator can also create granular permissions to allow you to pass only specific\n session tags. For more information, see Tutorial: Using Tags\n for Attribute-Based Access Control in the\n IAM User Guide.
\nYou can set the session tags as transitive. Transitive tags persist during role\n chaining. For more information, see Chaining Roles\n with Session Tags in the IAM User Guide.
\n\n Identities\n
\nBefore your application can call AssumeRoleWithWebIdentity
, you must have\n an identity token from a supported identity provider and create a role that the application\n can assume. The role that your application assumes must trust the identity provider that is\n associated with the identity token. In other words, the identity provider must be specified\n in the role's trust policy.
Calling AssumeRoleWithWebIdentity
can result in an entry in your\n CloudTrail logs. The entry includes the Subject of\n the provided web identity token. We recommend that you avoid using any personally\n identifiable information (PII) in this field. For example, you could instead use a GUID\n or a pairwise identifier, as suggested\n in the OIDC specification.
For more information about how to use web identity federation and the\n AssumeRoleWithWebIdentity
API, see the following resources:
\n Using Web Identity Federation API Operations for Mobile Apps and Federation Through a Web-based Identity Provider.
\n\n Web Identity Federation Playground. Walk through the process of\n authenticating through Login with Amazon, Facebook, or Google, getting temporary\n security credentials, and then using those credentials to make a request to Amazon Web Services.\n
\n\n Amazon Web Services SDK for iOS Developer Guide and Amazon Web Services SDK for Android Developer Guide. These toolkits\n contain sample apps that show how to invoke the identity providers. The toolkits then\n show how to use the information from these providers to get and use temporary\n security credentials.
\n\n Web Identity\n Federation with Mobile Applications. This article discusses web identity\n federation and shows an example of how to use web identity federation to get access\n to content in Amazon S3.
\nReturns a set of temporary security credentials for users who have been authenticated in\n a mobile or web application with a web identity provider. Example providers include Amazon Cognito,\n Login with Amazon, Facebook, Google, or any OpenID Connect-compatible identity\n provider.
\nFor mobile applications, we recommend that you use Amazon Cognito. You can use Amazon Cognito with the\n Amazon Web Services SDK for iOS Developer Guide and the Amazon Web Services SDK for Android Developer Guide to uniquely\n identify a user. You can also supply the user with a consistent identity throughout the\n lifetime of an application.
\nTo learn more about Amazon Cognito, see Amazon Cognito Overview in\n Amazon Web Services SDK for Android Developer Guide and Amazon Cognito Overview in the\n Amazon Web Services SDK for iOS Developer Guide.
\nCalling AssumeRoleWithWebIdentity
does not require the use of Amazon Web Services\n security credentials. Therefore, you can distribute an application (for example, on mobile\n devices) that requests temporary security credentials without including long-term Amazon Web Services\n credentials in the application. You also don't need to deploy server-based proxy services\n that use long-term Amazon Web Services credentials. Instead, the identity of the caller is validated by\n using a token from the web identity provider. For a comparison of\n AssumeRoleWithWebIdentity
with the other API operations that produce\n temporary credentials, see Requesting Temporary Security\n Credentials and Comparing the\n Amazon Web Services STS API operations in the IAM User Guide.
The temporary security credentials returned by this API consist of an access key ID, a\n secret access key, and a security token. Applications can use these temporary security\n credentials to sign calls to Amazon Web Services service API operations.
\n\n Session Duration\n
\nBy default, the temporary security credentials created by\n AssumeRoleWithWebIdentity
last for one hour. However, you can use the\n optional DurationSeconds
parameter to specify the duration of your session.\n You can provide a value from 900 seconds (15 minutes) up to the maximum session duration\n setting for the role. This setting can have a value from 1 hour to 12 hours. To learn how\n to view the maximum value for your role, see View the\n Maximum Session Duration Setting for a Role in the\n IAM User Guide. The maximum session duration limit applies when\n you use the AssumeRole*
API operations or the assume-role*
CLI\n commands. However the limit does not apply when you use those operations to create a\n console URL. For more information, see Using IAM Roles in the\n IAM User Guide.
\n Permissions\n
\nThe temporary security credentials created by AssumeRoleWithWebIdentity
can\n be used to make API calls to any Amazon Web Services service with the following exception: you cannot\n call the STS GetFederationToken
or GetSessionToken
API\n operations.
(Optional) You can pass inline or managed session policies to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policies to use as managed session policies.\n The plaintext that you use for both inline and managed session policies can't exceed 2,048\n characters. Passing policies to this operation returns new \n temporary credentials. The resulting session's permissions are the intersection of the \n role's identity-based policy and the session policies. You can use the role's temporary \n credentials in subsequent Amazon Web Services API calls to access resources in the account that owns \n the role. You cannot use session policies to grant more permissions than those allowed \n by the identity-based policy of the role that is being assumed. For more information, see\n Session\n Policies in the IAM User Guide.
\n\n Tags\n
\n(Optional) You can configure your IdP to pass attributes into your web identity token as\n session tags. Each session tag consists of a key name and an associated value. For more\n information about session tags, see Passing Session Tags in STS in the\n IAM User Guide.
\nYou can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128\n characters and the values can’t exceed 256 characters. For these and additional limits, see\n IAM\n and STS Character Limits in the IAM User Guide.
\n \nAn Amazon Web Services conversion compresses the passed session policies and session tags into a\n packed binary format that has a separate limit. Your request can fail for this limit\n even if your plaintext meets the other requirements. The PackedPolicySize
\n response element indicates by percentage how close the policies and tags for your\n request are to the upper size limit.\n
You can pass a session tag with the same key as a tag that is attached to the role. When\n you do, the session tag overrides the role tag with the same key.
\nAn administrator must grant you the permissions necessary to pass session tags. The\n administrator can also create granular permissions to allow you to pass only specific\n session tags. For more information, see Tutorial: Using Tags\n for Attribute-Based Access Control in the\n IAM User Guide.
\nYou can set the session tags as transitive. Transitive tags persist during role\n chaining. For more information, see Chaining Roles\n with Session Tags in the IAM User Guide.
\n\n Identities\n
\nBefore your application can call AssumeRoleWithWebIdentity
, you must have\n an identity token from a supported identity provider and create a role that the application\n can assume. The role that your application assumes must trust the identity provider that is\n associated with the identity token. In other words, the identity provider must be specified\n in the role's trust policy.
Calling AssumeRoleWithWebIdentity
can result in an entry in your\n CloudTrail logs. The entry includes the Subject of\n the provided web identity token. We recommend that you avoid using any personally\n identifiable information (PII) in this field. For example, you could instead use a GUID\n or a pairwise identifier, as suggested\n in the OIDC specification.
For more information about how to use web identity federation and the\n AssumeRoleWithWebIdentity
API, see the following resources:
\n Using Web Identity Federation API Operations for Mobile Apps and Federation Through a Web-based Identity Provider.
\n\n Web Identity Federation Playground. Walk through the process of\n authenticating through Login with Amazon, Facebook, or Google, getting temporary\n security credentials, and then using those credentials to make a request to Amazon Web Services.\n
\n\n Amazon Web Services SDK for iOS Developer Guide and Amazon Web Services SDK for Android Developer Guide. These toolkits\n contain sample apps that show how to invoke the identity providers. The toolkits then\n show how to use the information from these providers to get and use temporary\n security credentials.
\n\n Web Identity\n Federation with Mobile Applications. This article discusses web identity\n federation and shows an example of how to use web identity federation to get access\n to content in Amazon S3.
\nThe Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as\n managed session policies. The policies must exist in the same account as the role.
\nThis parameter is optional. You can provide up to 10 managed policy ARNs. However, the\n plaintext that you use for both inline and managed session policies can't exceed 2,048\n characters. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services\n Service Namespaces in the Amazon Web Services General Reference.
\nAn Amazon Web Services conversion compresses the passed session policies and session tags into a\n packed binary format that has a separate limit. Your request can fail for this limit\n even if your plaintext meets the other requirements. The PackedPolicySize
\n response element indicates by percentage how close the policies and tags for your\n request are to the upper size limit.\n
Passing policies to this operation returns new \n temporary credentials. The resulting session's permissions are the intersection of the \n role's identity-based policy and the session policies. You can use the role's temporary \n credentials in subsequent Amazon Web Services API calls to access resources in the account that owns \n the role. You cannot use session policies to grant more permissions than those allowed \n by the identity-based policy of the role that is being assumed. For more information, see\n Session\n Policies in the IAM User Guide.
" + "smithy.api#documentation": "The Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as\n managed session policies. The policies must exist in the same account as the role.
\nThis parameter is optional. You can provide up to 10 managed policy ARNs. However, the\n plaintext that you use for both inline and managed session policies can't exceed 2,048\n characters. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services\n Service Namespaces in the Amazon Web Services General Reference.
\n \nAn Amazon Web Services conversion compresses the passed session policies and session tags into a\n packed binary format that has a separate limit. Your request can fail for this limit\n even if your plaintext meets the other requirements. The PackedPolicySize
\n response element indicates by percentage how close the policies and tags for your\n request are to the upper size limit.\n
Passing policies to this operation returns new \n temporary credentials. The resulting session's permissions are the intersection of the \n role's identity-based policy and the session policies. You can use the role's temporary \n credentials in subsequent Amazon Web Services API calls to access resources in the account that owns \n the role. You cannot use session policies to grant more permissions than those allowed \n by the identity-based policy of the role that is being assumed. For more information, see\n Session\n Policies in the IAM User Guide.
" } }, "Policy": { "target": "com.amazonaws.sts#sessionPolicyDocumentType", "traits": { - "smithy.api#documentation": "An IAM policy in JSON format that you want to use as an inline session policy.
\nThis parameter is optional. Passing policies to this operation returns new \n temporary credentials. The resulting session's permissions are the intersection of the \n role's identity-based policy and the session policies. You can use the role's temporary \n credentials in subsequent Amazon Web Services API calls to access resources in the account that owns \n the role. You cannot use session policies to grant more permissions than those allowed \n by the identity-based policy of the role that is being assumed. For more information, see\n Session\n Policies in the IAM User Guide.
\nThe plaintext that you use for both inline and managed session policies can't exceed\n 2,048 characters. The JSON policy characters can be any ASCII character from the space\n character to the end of the valid character list (\\u0020 through \\u00FF). It can also\n include the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)\n characters.
\nAn Amazon Web Services conversion compresses the passed session policies and session tags into a\n packed binary format that has a separate limit. Your request can fail for this limit\n even if your plaintext meets the other requirements. The PackedPolicySize
\n response element indicates by percentage how close the policies and tags for your\n request are to the upper size limit.\n
An IAM policy in JSON format that you want to use as an inline session policy.
\nThis parameter is optional. Passing policies to this operation returns new \n temporary credentials. The resulting session's permissions are the intersection of the \n role's identity-based policy and the session policies. You can use the role's temporary \n credentials in subsequent Amazon Web Services API calls to access resources in the account that owns \n the role. You cannot use session policies to grant more permissions than those allowed \n by the identity-based policy of the role that is being assumed. For more information, see\n Session\n Policies in the IAM User Guide.
\nThe plaintext that you use for both inline and managed session policies can't exceed\n 2,048 characters. The JSON policy characters can be any ASCII character from the space\n character to the end of the valid character list (\\u0020 through \\u00FF). It can also\n include the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)\n characters.
\n \nAn Amazon Web Services conversion compresses the passed session policies and session tags into a\n packed binary format that has a separate limit. Your request can fail for this limit\n even if your plaintext meets the other requirements. The PackedPolicySize
\n response element indicates by percentage how close the policies and tags for your\n request are to the upper size limit.\n
The duration, in seconds, of the role session. The value can range from 900 seconds (15\n minutes) up to the maximum session duration setting for the role. This setting can have a\n value from 1 hour to 12 hours. If you specify a value higher than this setting, the\n operation fails. For example, if you specify a session duration of 12 hours, but your\n administrator set the maximum session duration to 6 hours, your operation fails. To learn\n how to view the maximum value for your role, see View the\n Maximum Session Duration Setting for a Role in the\n IAM User Guide.
\nBy default, the value is set to 3600
seconds.
The DurationSeconds
parameter is separate from the duration of a console\n session that you might request using the returned credentials. The request to the\n federation endpoint for a console sign-in token takes a SessionDuration
\n parameter that specifies the maximum length of the console session. For more\n information, see Creating a URL\n that Enables Federated Users to Access the Management Console in the\n IAM User Guide.
The duration, in seconds, of the role session. The value can range from 900 seconds (15\n minutes) up to the maximum session duration setting for the role. This setting can have a\n value from 1 hour to 12 hours. If you specify a value higher than this setting, the\n operation fails. For example, if you specify a session duration of 12 hours, but your\n administrator set the maximum session duration to 6 hours, your operation fails. To learn\n how to view the maximum value for your role, see View the\n Maximum Session Duration Setting for a Role in the\n IAM User Guide.
\nBy default, the value is set to 3600
seconds.
The DurationSeconds
parameter is separate from the duration of a console\n session that you might request using the returned credentials. The request to the\n federation endpoint for a console sign-in token takes a SessionDuration
\n parameter that specifies the maximum length of the console session. For more\n information, see Creating a URL\n that Enables Federated Users to Access the Amazon Web Services Management Console in the\n IAM User Guide.
The temporary security credentials, which include an access key ID, a secret access key,\n and a security token.
\nThe size of the security token that STS API operations return is not fixed. We\n strongly recommend that you make no assumptions about the maximum size.
\nThe temporary security credentials, which include an access key ID, a secret access key,\n and a security token.
\n \nThe size of the security token that STS API operations return is not fixed. We\n strongly recommend that you make no assumptions about the maximum size.
\nDecodes additional information about the authorization status of a request from an\n encoded message returned in response to an Amazon Web Services request.
\nFor example, if a user is not authorized to perform an operation that he or she has\n requested, the request returns a Client.UnauthorizedOperation
response (an\n HTTP 403 response). Some Amazon Web Services operations additionally return an encoded message that can\n provide details about this authorization failure.
Only certain Amazon Web Services operations return an encoded authorization message. The\n documentation for an individual operation indicates whether that operation returns an\n encoded message in addition to returning an HTTP code.
\nThe message is encoded because the details of the authorization status can constitute\n privileged information that the user who requested the operation should not see. To decode\n an authorization status message, a user must be granted permissions via an IAM policy to\n request the DecodeAuthorizationMessage
\n (sts:DecodeAuthorizationMessage
) action.
The decoded message includes the following type of information:
\nWhether the request was denied due to an explicit deny or due to the absence of an\n explicit allow. For more information, see Determining Whether a Request is Allowed or Denied in the\n IAM User Guide.
\nThe principal who made the request.
\nThe requested action.
\nThe requested resource.
\nThe values of condition keys in the context of the user's request.
\nDecodes additional information about the authorization status of a request from an\n encoded message returned in response to an Amazon Web Services request.
\nFor example, if a user is not authorized to perform an operation that he or she has\n requested, the request returns a Client.UnauthorizedOperation
response (an\n HTTP 403 response). Some Amazon Web Services operations additionally return an encoded message that can\n provide details about this authorization failure.
Only certain Amazon Web Services operations return an encoded authorization message. The\n documentation for an individual operation indicates whether that operation returns an\n encoded message in addition to returning an HTTP code.
\nThe message is encoded because the details of the authorization status can contain\n privileged information that the user who requested the operation should not see. To decode\n an authorization status message, a user must be granted permissions through an IAM policy to\n request the DecodeAuthorizationMessage
\n (sts:DecodeAuthorizationMessage
) action.
The decoded message includes the following type of information:
\nWhether the request was denied due to an explicit deny or due to the absence of an\n explicit allow. For more information, see Determining Whether a Request is Allowed or Denied in the\n IAM User Guide.
\nThe principal who made the request.
\nThe requested action.
\nThe requested resource.
\nThe values of condition keys in the context of the user's request.
\nAn XML document that contains the decoded message.
" + "smithy.api#documentation": "The API returns a response with the decoded message.
" } } }, @@ -633,7 +633,7 @@ "target": "com.amazonaws.sts#GetAccessKeyInfoResponse" }, "traits": { - "smithy.api#documentation": "Returns the account identifier for the specified access key ID.
\nAccess keys consist of two parts: an access key ID (for example,\n AKIAIOSFODNN7EXAMPLE
) and a secret access key (for example,\n wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
). For more information about\n access keys, see Managing Access Keys for IAM\n Users in the IAM User Guide.
When you pass an access key ID to this operation, it returns the ID of the Amazon Web Services\n account to which the keys belong. Access key IDs beginning with AKIA
are\n long-term credentials for an IAM user or the Amazon Web Services account root user. Access key IDs\n beginning with ASIA
are temporary credentials that are created using STS\n operations. If the account in the response belongs to you, you can sign in as the root\n user and review your root user access keys. Then, you can pull a credentials report to learn which IAM user owns the keys. To learn who\n requested the temporary credentials for an ASIA
access key, view the STS\n events in your CloudTrail logs in the\n IAM User Guide.
This operation does not indicate the state of the access key. The key might be active,\n inactive, or deleted. Active keys might not have permissions to perform an operation.\n Providing a deleted access key might return an error that the key doesn't exist.
" + "smithy.api#documentation": "Returns the account identifier for the specified access key ID.
\nAccess keys consist of two parts: an access key ID (for example,\n AKIAIOSFODNN7EXAMPLE
) and a secret access key (for example,\n wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
). For more information about\n access keys, see Managing Access Keys for IAM\n Users in the IAM User Guide.
When you pass an access key ID to this operation, it returns the ID of the Amazon Web Services account\n to which the keys belong. Access key IDs beginning with AKIA
are long-term\n credentials for an IAM user or the Amazon Web Services account root user. Access key IDs beginning with\n ASIA
are temporary credentials that are created using STS operations. If\n the account in the response belongs to you, you can sign in as the root user and review\n your root user access keys. Then, you can pull a credentials report to\n learn which IAM user owns the keys. To learn who requested the temporary credentials for\n an ASIA
access key, view the STS events in your CloudTrail logs in the\n IAM User Guide.
This operation does not indicate the state of the access key. The key might be active,\n inactive, or deleted. Active keys might not have permissions to perform an operation.\n Providing a deleted access key might return an error that the key doesn't exist.
" } }, "com.amazonaws.sts#GetAccessKeyInfoRequest": { @@ -642,7 +642,7 @@ "AccessKeyId": { "target": "com.amazonaws.sts#accessKeyIdType", "traits": { - "smithy.api#documentation": "The identifier of an access key.
\nThis parameter allows (through its regex pattern) a string of characters that can\n consist of any upper- or lowercase letter or digit.
", + "smithy.api#documentation": "The identifier of an access key.
\nThis parameter allows (through its regex pattern) a string of characters that can\n consist of any upper- or lowercase letter or digit.
", "smithy.api#required": {} } } @@ -668,7 +668,7 @@ "target": "com.amazonaws.sts#GetCallerIdentityResponse" }, "traits": { - "smithy.api#documentation": "Returns details about the IAM user or role whose credentials are used to call the\n operation.
\nNo permissions are required to perform this operation. If an administrator adds a\n policy to your IAM user or role that explicitly denies access to the\n sts:GetCallerIdentity
action, you can still perform this operation.\n Permissions are not required because the same information is returned when an IAM\n user or role is denied access. To view an example response, see I Am Not Authorized to Perform: iam:DeleteVirtualMFADevice in the\n IAM User Guide.
Returns details about the IAM user or role whose credentials are used to call the\n operation.
\nNo permissions are required to perform this operation. If an administrator adds a\n policy to your IAM user or role that explicitly denies access to the\n sts:GetCallerIdentity
action, you can still perform this operation.\n Permissions are not required because the same information is returned when an IAM user\n or role is denied access. To view an example response, see I Am Not Authorized to Perform: iam:DeleteVirtualMFADevice in the\n IAM User Guide.
Returns a set of temporary security credentials (consisting of an access key ID, a\n secret access key, and a security token) for a federated user. A typical use is in a proxy\n application that gets temporary security credentials on behalf of distributed applications\n inside a corporate network. You must call the GetFederationToken
operation\n using the long-term security credentials of an IAM user. As a result, this call is\n appropriate in contexts where those credentials can be safely stored, usually in a\n server-based application. For a comparison of GetFederationToken
with the\n other API operations that produce temporary credentials, see Requesting Temporary Security\n Credentials and Comparing the\n STS API operations in the IAM User Guide.
You can create a mobile-based or browser-based app that can authenticate users using\n a web identity provider like Login with Amazon, Facebook, Google, or an OpenID\n Connect-compatible identity provider. In this case, we recommend that you use Amazon Cognito or\n AssumeRoleWithWebIdentity
. For more information, see Federation Through a Web-based Identity Provider in the\n IAM User Guide.
You can also call GetFederationToken
using the security credentials of an\n Amazon Web Services account root user, but we do not recommend it. Instead, we recommend that you create\n an IAM user for the purpose of the proxy application. Then attach a policy to the IAM\n user that limits federated users to only the actions and resources that they need to\n access. For more information, see IAM Best Practices in the\n IAM User Guide.
\n Session duration\n
\nThe temporary credentials are valid for the specified duration, from 900 seconds (15\n minutes) up to a maximum of 129,600 seconds (36 hours). The default session duration is\n 43,200 seconds (12 hours). Temporary credentials that are obtained by using Amazon Web Services account\n root user credentials have a maximum duration of 3,600 seconds (1 hour).
\n\n Permissions\n
\nYou can use the temporary credentials created by GetFederationToken
in any\n Amazon Web Services service except the following:
You cannot call any IAM operations using the CLI or the Amazon Web Services API.
\nYou cannot call any STS operations except GetCallerIdentity
.
You must pass an inline or managed session policy to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policies to use as managed session policies.\n The plaintext that you use for both inline and managed session policies can't exceed 2,048\n characters.
\nThough the session policy parameters are optional, if you do not pass a policy, then the\n resulting federated user session has no permissions. When you pass session policies, the\n session permissions are the intersection of the IAM user policies and the session\n policies that you pass. This gives you a way to further restrict the permissions for a\n federated user. You cannot use session policies to grant more permissions than those that\n are defined in the permissions policy of the IAM user. For more information, see Session\n Policies in the IAM User Guide. For information about\n using GetFederationToken
to create temporary security credentials, see GetFederationToken—Federation Through a Custom Identity Broker.
You can use the credentials to access a resource that has a resource-based policy. If\n that policy specifically references the federated user session in the\n Principal
element of the policy, the session has the permissions allowed by\n the policy. These permissions are granted in addition to the permissions granted by the\n session policies.
\n Tags\n
\n(Optional) You can pass tag key-value pairs to your session. These are called session\n tags. For more information about session tags, see Passing Session Tags in STS in the\n IAM User Guide.
\nYou can create a mobile-based or browser-based app that can authenticate users\n using a web identity provider like Login with Amazon, Facebook, Google, or an OpenID\n Connect-compatible identity provider. In this case, we recommend that you use Amazon Cognito or\n AssumeRoleWithWebIdentity
. For more information, see Federation Through a Web-based Identity Provider in the\n IAM User Guide.
You can also call GetFederationToken
using the security credentials of an\n Amazon Web Services account root user, but we do not recommend it. Instead, we recommend that you\n create an IAM user for the purpose of the proxy application. Then attach a policy to\n the IAM user that limits federated users to only the actions and resources that they\n need to access. For more information, see IAM Best Practices in the\n IAM User Guide.
\n Session duration\n
\nThe temporary credentials are valid for the specified duration, from 900 seconds (15\n minutes) up to a maximum of 129,600 seconds (36 hours). The default session duration is\n 43,200 seconds (12 hours). Temporary credentials that are obtained by using Amazon Web Services\n account root user credentials have a maximum duration of 3,600 seconds (1 hour).
\n\n Permissions\n
\nYou can use the temporary credentials created by GetFederationToken
in\n any Amazon Web Services service except the following:
You cannot call any IAM operations using the CLI or the Amazon Web Services API.\n
\nYou cannot call any STS operations except\n GetCallerIdentity
.
You must pass an inline or managed session policy to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policies to use as managed session\n policies. The plain text that you use for both inline and managed session policies can't\n exceed 2,048 characters.
\nThough the session policy parameters are optional, if you do not pass a policy, then\n the resulting federated user session has no permissions. When you pass session policies,\n the session permissions are the intersection of the IAM user policies and the session\n policies that you pass. This gives you a way to further restrict the permissions for a\n federated user. You cannot use session policies to grant more permissions than those\n that are defined in the permissions policy of the IAM user. For more information, see\n Session Policies\n in the IAM User Guide. For information about using\n GetFederationToken
to create temporary security credentials, see GetFederationToken—Federation Through a Custom Identity Broker.
You can use the credentials to access a resource that has a resource-based policy. If\n that policy specifically references the federated user session in the\n Principal
element of the policy, the session has the permissions\n allowed by the policy. These permissions are granted in addition to the permissions\n granted by the session policies.
\n Tags\n
\n(Optional) You can pass tag key-value pairs to your session. These are called session\n tags. For more information about session tags, see Passing Session Tags in STS in\n the IAM User Guide.
\nAn administrator must grant you the permissions necessary to pass session tags. The\n administrator can also create granular permissions to allow you to pass only specific\n session tags. For more information, see Tutorial: Using\n Tags for Attribute-Based Access Control in the\n IAM User Guide.
\nTag key–value pairs are not case sensitive, but case is preserved. This means that you\n cannot have separate Department
and department
tag keys.\n Assume that the user that you are federating has the\n Department
=Marketing
tag and you pass the\n department
=engineering
session tag.\n Department
and department
are not saved as separate tags,\n and the session tag passed in the request takes precedence over the user tag.
Returns a set of temporary security credentials (consisting of an access key ID, a\n secret access key, and a security token) for a federated user. A typical use is in a proxy\n application that gets temporary security credentials on behalf of distributed applications\n inside a corporate network. You must call the GetFederationToken
operation\n using the long-term security credentials of an IAM user. As a result, this call is\n appropriate in contexts where those credentials can be safely stored, usually in a\n server-based application. For a comparison of GetFederationToken
with the\n other API operations that produce temporary credentials, see Requesting Temporary Security\n Credentials and Comparing the\n Amazon Web Services STS API operations in the IAM User Guide.
You can create a mobile-based or browser-based app that can authenticate users using\n a web identity provider like Login with Amazon, Facebook, Google, or an OpenID\n Connect-compatible identity provider. In this case, we recommend that you use Amazon Cognito or\n AssumeRoleWithWebIdentity
. For more information, see Federation Through a Web-based Identity Provider in the\n IAM User Guide.
You can also call GetFederationToken
using the security credentials of an\n Amazon Web Services account root user, but we do not recommend it. Instead, we recommend that you create\n an IAM user for the purpose of the proxy application. Then attach a policy to the IAM\n user that limits federated users to only the actions and resources that they need to\n access. For more information, see IAM Best Practices in the\n IAM User Guide.
\n Session duration\n
\nThe temporary credentials are valid for the specified duration, from 900 seconds (15\n minutes) up to a maximum of 129,600 seconds (36 hours). The default session duration is\n 43,200 seconds (12 hours). Temporary credentials obtained by using the Amazon Web Services account root\n user credentials have a maximum duration of 3,600 seconds (1 hour).
\n\n Permissions\n
\nYou can use the temporary credentials created by GetFederationToken
in any\n Amazon Web Services service except the following:
You cannot call any IAM operations using the CLI or the Amazon Web Services API.
\nYou cannot call any STS operations except GetCallerIdentity
.
You must pass an inline or managed session policy to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policies to use as managed session policies.\n The plaintext that you use for both inline and managed session policies can't exceed 2,048\n characters.
\nThough the session policy parameters are optional, if you do not pass a policy, then the\n resulting federated user session has no permissions. When you pass session policies, the\n session permissions are the intersection of the IAM user policies and the session\n policies that you pass. This gives you a way to further restrict the permissions for a\n federated user. You cannot use session policies to grant more permissions than those that\n are defined in the permissions policy of the IAM user. For more information, see Session\n Policies in the IAM User Guide. For information about\n using GetFederationToken
to create temporary security credentials, see GetFederationToken—Federation Through a Custom Identity Broker.
You can use the credentials to access a resource that has a resource-based policy. If\n that policy specifically references the federated user session in the\n Principal
element of the policy, the session has the permissions allowed by\n the policy. These permissions are granted in addition to the permissions granted by the\n session policies.
\n Tags\n
\n(Optional) You can pass tag key-value pairs to your session. These are called session\n tags. For more information about session tags, see Passing Session Tags in STS in the\n IAM User Guide.
\nYou can create a mobile-based or browser-based app that can authenticate users using\n a web identity provider like Login with Amazon, Facebook, Google, or an OpenID\n Connect-compatible identity provider. In this case, we recommend that you use Amazon Cognito or\n AssumeRoleWithWebIdentity
. For more information, see Federation Through a Web-based Identity Provider in the\n IAM User Guide.
An administrator must grant you the permissions necessary to pass session tags. The\n administrator can also create granular permissions to allow you to pass only specific\n session tags. For more information, see Tutorial: Using Tags\n for Attribute-Based Access Control in the\n IAM User Guide.
\nTag key–value pairs are not case sensitive, but case is preserved. This means that you\n cannot have separate Department
and department
tag keys. Assume\n that the user that you are federating has the\n Department
=Marketing
tag and you pass the\n department
=engineering
session tag. Department
\n and department
are not saved as separate tags, and the session tag passed in\n the request takes precedence over the user tag.
An IAM policy in JSON format that you want to use as an inline session policy.
\nYou must pass an inline or managed session policy to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policies to use as managed session\n policies.
\nThis parameter is optional. However, if you do not pass any session policies, then the\n resulting federated user session has no permissions.
\nWhen you pass session policies, the session permissions are the intersection of the\n IAM user policies and the session policies that you pass. This gives you a way to further\n restrict the permissions for a federated user. You cannot use session policies to grant\n more permissions than those that are defined in the permissions policy of the IAM user.\n For more information, see Session Policies in\n the IAM User Guide.
\nThe resulting credentials can be used to access a resource that has a resource-based\n policy. If that policy specifically references the federated user session in the\n Principal
element of the policy, the session has the permissions allowed by\n the policy. These permissions are granted in addition to the permissions that are granted\n by the session policies.
The plaintext that you use for both inline and managed session policies can't exceed\n 2,048 characters. The JSON policy characters can be any ASCII character from the space\n character to the end of the valid character list (\\u0020 through \\u00FF). It can also\n include the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)\n characters.
\nAn Amazon Web Services conversion compresses the passed session policies and session tags into a\n packed binary format that has a separate limit. Your request can fail for this limit\n even if your plaintext meets the other requirements. The PackedPolicySize
\n response element indicates by percentage how close the policies and tags for your\n request are to the upper size limit.\n
An IAM policy in JSON format that you want to use as an inline session policy.
\nYou must pass an inline or managed session policy to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policies to use as managed session\n policies.
\nThis parameter is optional. However, if you do not pass any session policies, then the\n resulting federated user session has no permissions.
\nWhen you pass session policies, the session permissions are the intersection of the\n IAM user policies and the session policies that you pass. This gives you a way to further\n restrict the permissions for a federated user. You cannot use session policies to grant\n more permissions than those that are defined in the permissions policy of the IAM user.\n For more information, see Session Policies in\n the IAM User Guide.
\nThe resulting credentials can be used to access a resource that has a resource-based\n policy. If that policy specifically references the federated user session in the\n Principal
element of the policy, the session has the permissions allowed by\n the policy. These permissions are granted in addition to the permissions that are granted\n by the session policies.
The plaintext that you use for both inline and managed session policies can't exceed\n 2,048 characters. The JSON policy characters can be any ASCII character from the space\n character to the end of the valid character list (\\u0020 through \\u00FF). It can also\n include the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)\n characters.
\n \nAn Amazon Web Services conversion compresses the passed session policies and session tags into a\n packed binary format that has a separate limit. Your request can fail for this limit\n even if your plaintext meets the other requirements. The PackedPolicySize
\n response element indicates by percentage how close the policies and tags for your\n request are to the upper size limit.\n
The Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as a\n managed session policy. The policies must exist in the same account as the IAM user that\n is requesting federated access.
\nYou must pass an inline or managed session policy to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policies to use as managed session policies.\n The plaintext that you use for both inline and managed session policies can't exceed 2,048\n characters. You can provide up to 10 managed policy ARNs. For more information about ARNs,\n see Amazon\n Resource Names (ARNs) and Amazon Web Services Service Namespaces in the Amazon Web Services General Reference.
\nThis parameter is optional. However, if you do not pass any session policies, then the\n resulting federated user session has no permissions.
\nWhen you pass session policies, the session permissions are the intersection of the\n IAM user policies and the session policies that you pass. This gives you a way to further\n restrict the permissions for a federated user. You cannot use session policies to grant\n more permissions than those that are defined in the permissions policy of the IAM user.\n For more information, see Session Policies in\n the IAM User Guide.
\nThe resulting credentials can be used to access a resource that has a resource-based\n policy. If that policy specifically references the federated user session in the\n Principal
element of the policy, the session has the permissions allowed by\n the policy. These permissions are granted in addition to the permissions that are granted\n by the session policies.
An Amazon Web Services conversion compresses the passed session policies and session tags into a\n packed binary format that has a separate limit. Your request can fail for this limit\n even if your plaintext meets the other requirements. The PackedPolicySize
\n response element indicates by percentage how close the policies and tags for your\n request are to the upper size limit.\n
The Amazon Resource Names (ARNs) of the IAM managed policies that you want to use as a\n managed session policy. The policies must exist in the same account as the IAM user that\n is requesting federated access.
\nYou must pass an inline or managed session policy to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policies to use as managed session policies.\n The plaintext that you use for both inline and managed session policies can't exceed 2,048\n characters. You can provide up to 10 managed policy ARNs. For more information about ARNs,\n see Amazon\n Resource Names (ARNs) and Amazon Web Services Service Namespaces in the\n Amazon Web Services General Reference.
\nThis parameter is optional. However, if you do not pass any session policies, then the\n resulting federated user session has no permissions.
\nWhen you pass session policies, the session permissions are the intersection of the\n IAM user policies and the session policies that you pass. This gives you a way to further\n restrict the permissions for a federated user. You cannot use session policies to grant\n more permissions than those that are defined in the permissions policy of the IAM user.\n For more information, see Session Policies in\n the IAM User Guide.
\nThe resulting credentials can be used to access a resource that has a resource-based\n policy. If that policy specifically references the federated user session in the\n Principal
element of the policy, the session has the permissions allowed by\n the policy. These permissions are granted in addition to the permissions that are granted\n by the session policies.
An Amazon Web Services conversion compresses the passed session policies and session tags into a\n packed binary format that has a separate limit. Your request can fail for this limit\n even if your plaintext meets the other requirements. The PackedPolicySize
\n response element indicates by percentage how close the policies and tags for your\n request are to the upper size limit.\n
A list of session tags. Each session tag consists of a key name and an associated value.\n For more information about session tags, see Passing Session Tags in STS in the\n IAM User Guide.
\nThis parameter is optional. You can pass up to 50 session tags. The plaintext session\n tag keys can’t exceed 128 characters and the values can’t exceed 256 characters. For these\n and additional limits, see IAM\n and STS Character Limits in the IAM User Guide.
\n \nAn Amazon Web Services conversion compresses the passed session policies and session tags into a\n packed binary format that has a separate limit. Your request can fail for this limit\n even if your plaintext meets the other requirements. The PackedPolicySize
\n response element indicates by percentage how close the policies and tags for your\n request are to the upper size limit.\n
You can pass a session tag with the same key as a tag that is already\n attached to the user you are federating. When you do, session tags override a user tag with\n the same key.
\nTag key–value pairs are not case sensitive, but case is preserved. This means that you\n cannot have separate Department
and department
tag keys. Assume\n that the role has the Department
=Marketing
tag and you pass the\n department
=engineering
session tag. Department
\n and department
are not saved as separate tags, and the session tag passed in\n the request takes precedence over the role tag.
A list of session tags. Each session tag consists of a key name and an associated value.\n For more information about session tags, see Passing Session Tags in STS in the\n IAM User Guide.
\nThis parameter is optional. You can pass up to 50 session tags. The plaintext session\n tag keys can’t exceed 128 characters and the values can’t exceed 256 characters. For these\n and additional limits, see IAM\n and STS Character Limits in the IAM User Guide.
\n \nAn Amazon Web Services conversion compresses the passed session policies and session tags into a\n packed binary format that has a separate limit. Your request can fail for this limit\n even if your plaintext meets the other requirements. The PackedPolicySize
\n response element indicates by percentage how close the policies and tags for your\n request are to the upper size limit.\n
You can pass a session tag with the same key as a tag that is already attached to the\n user you are federating. When you do, session tags override a user tag with the same key.
\nTag key–value pairs are not case sensitive, but case is preserved. This means that you\n cannot have separate Department
and department
tag keys. Assume\n that the role has the Department
=Marketing
tag and you pass the\n department
=engineering
session tag. Department
\n and department
are not saved as separate tags, and the session tag passed in\n the request takes precedence over the role tag.
The temporary security credentials, which include an access key ID, a secret access key,\n and a security (or session) token.
\nThe size of the security token that STS API operations return is not fixed. We\n strongly recommend that you make no assumptions about the maximum size.
\nThe temporary security credentials, which include an access key ID, a secret access key,\n and a security (or session) token.
\n \nThe size of the security token that STS API operations return is not fixed. We\n strongly recommend that you make no assumptions about the maximum size.
\nReturns a set of temporary credentials for an Amazon Web Services account or IAM user. The\n credentials consist of an access key ID, a secret access key, and a security token.\n Typically, you use GetSessionToken
if you want to use MFA to protect\n programmatic calls to specific Amazon Web Services API operations like Amazon EC2 StopInstances
.\n MFA-enabled IAM users would need to call GetSessionToken
and submit an MFA\n code that is associated with their MFA device. Using the temporary security credentials\n that are returned from the call, IAM users can then make programmatic calls to API\n operations that require MFA authentication. If you do not supply a correct MFA code, then\n the API returns an access denied error. For a comparison of GetSessionToken
\n with the other API operations that produce temporary credentials, see Requesting\n Temporary Security Credentials and Comparing the\n STS API operations in the IAM User Guide.
\n Session Duration\n
\nThe GetSessionToken
operation must be called by using the long-term Amazon Web Services\n security credentials of the Amazon Web Services account root user or an IAM user. Credentials that are\n created by IAM users are valid for the duration that you specify. This duration can range\n from 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours), with a default\n of 43,200 seconds (12 hours). Credentials based on account credentials can range from 900\n seconds (15 minutes) up to 3,600 seconds (1 hour), with a default of 1 hour.
\n Permissions\n
\nThe temporary security credentials created by GetSessionToken
can be used\n to make API calls to any Amazon Web Services service with the following exceptions:
You cannot call any IAM API operations unless MFA authentication information is\n included in the request.
\nYou cannot call any STS API except\n AssumeRole
or GetCallerIdentity
.
We recommend that you do not call GetSessionToken
with Amazon Web Services account\n root user credentials. Instead, follow our best practices by\n creating one or more IAM users, giving them the necessary permissions, and using IAM\n users for everyday interaction with Amazon Web Services.
The credentials that are returned by GetSessionToken
are based on\n permissions associated with the user whose credentials were used to call the operation. If\n GetSessionToken
is called using Amazon Web Services account root user credentials, the\n temporary credentials have root user permissions. Similarly, if\n GetSessionToken
is called using the credentials of an IAM user, the\n temporary credentials have the same permissions as the IAM user.
For more information about using GetSessionToken
to create temporary\n credentials, go to Temporary\n Credentials for Users in Untrusted Environments in the\n IAM User Guide.
Returns a set of temporary credentials for an Amazon Web Services account or IAM user. The\n credentials consist of an access key ID, a secret access key, and a security token.\n Typically, you use GetSessionToken
if you want to use MFA to protect\n programmatic calls to specific Amazon Web Services API operations like Amazon EC2 StopInstances
.\n MFA-enabled IAM users would need to call GetSessionToken
and submit an MFA\n code that is associated with their MFA device. Using the temporary security credentials\n that are returned from the call, IAM users can then make programmatic calls to API\n operations that require MFA authentication. If you do not supply a correct MFA code, then\n the API returns an access denied error. For a comparison of GetSessionToken
\n with the other API operations that produce temporary credentials, see Requesting\n Temporary Security Credentials and Comparing the\n Amazon Web Services STS API operations in the IAM User Guide.
\n Session Duration\n
\nThe GetSessionToken
operation must be called by using the long-term Amazon Web Services\n security credentials of the Amazon Web Services account root user or an IAM user. Credentials that are\n created by IAM users are valid for the duration that you specify. This duration can range\n from 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours), with a default\n of 43,200 seconds (12 hours). Credentials based on account credentials can range from 900\n seconds (15 minutes) up to 3,600 seconds (1 hour), with a default of 1 hour.
\n Permissions\n
\nThe temporary security credentials created by GetSessionToken
can be used\n to make API calls to any Amazon Web Services service with the following exceptions:
You cannot call any IAM API operations unless MFA authentication information is\n included in the request.
\nYou cannot call any STS API except\n AssumeRole
or GetCallerIdentity
.
We recommend that you do not call GetSessionToken
with Amazon Web Services account\n root user credentials. Instead, follow our best practices by\n creating one or more IAM users, giving them the necessary permissions, and using IAM\n users for everyday interaction with Amazon Web Services.
The credentials that are returned by GetSessionToken
are based on\n permissions associated with the user whose credentials were used to call the operation. If\n GetSessionToken
is called using Amazon Web Services account root user credentials, the\n temporary credentials have root user permissions. Similarly, if\n GetSessionToken
is called using the credentials of an IAM user, the\n temporary credentials have the same permissions as the IAM user.
For more information about using GetSessionToken
to create temporary\n credentials, go to Temporary\n Credentials for Users in Untrusted Environments in the\n IAM User Guide.
The duration, in seconds, that the credentials should remain valid. Acceptable\n durations for IAM user sessions range from 900 seconds (15 minutes) to 129,600 seconds\n (36 hours), with 43,200 seconds (12 hours) as the default. Sessions for Amazon Web Services account\n owners are restricted to a maximum of 3,600 seconds (one hour). If the duration is\n longer than one hour, the session for Amazon Web Services account owners defaults to one hour.
" + "smithy.api#documentation": "The duration, in seconds, that the credentials should remain valid. Acceptable durations\n for IAM user sessions range from 900 seconds (15 minutes) to 129,600 seconds (36 hours),\n with 43,200 seconds (12 hours) as the default. Sessions for Amazon Web Services account owners are\n restricted to a maximum of 3,600 seconds (one hour). If the duration is longer than one\n hour, the session for Amazon Web Services account owners defaults to one hour.
" } }, "SerialNumber": { "target": "com.amazonaws.sts#serialNumberType", "traits": { - "smithy.api#documentation": "The identification number of the MFA device that is associated with the IAM user who\n is making the GetSessionToken
call. Specify this value if the IAM user\n has a policy that requires MFA authentication. The value is either the serial number for\n a hardware device (such as GAHT12345678
) or an Amazon Resource Name (ARN)\n for a virtual device (such as arn:aws:iam::123456789012:mfa/user
). You can\n find the device for an IAM user by going to the Management Console and viewing the user's\n security credentials.
The regex used to validate this parameter is a string of \n characters consisting of upper- and lower-case alphanumeric characters with no spaces. \n You can also include underscores or any of the following characters: =,.@:/-
" + "smithy.api#documentation": "The identification number of the MFA device that is associated with the IAM user who\n is making the GetSessionToken
call. Specify this value if the IAM user has a\n policy that requires MFA authentication. The value is either the serial number for a\n hardware device (such as GAHT12345678
) or an Amazon Resource Name (ARN) for a\n virtual device (such as arn:aws:iam::123456789012:mfa/user
). You can find the\n device for an IAM user by going to the Amazon Web Services Management Console and viewing the user's security\n credentials.
The regex used to validate this parameter is a string of \n characters consisting of upper- and lower-case alphanumeric characters with no spaces. \n You can also include underscores or any of the following characters: =,.@:/-
" } }, "TokenCode": { "target": "com.amazonaws.sts#tokenCodeType", "traits": { - "smithy.api#documentation": "The value provided by the MFA device, if MFA is required. If any policy requires the\n IAM user to submit an MFA code, specify this value. If MFA authentication is required,\n the user must provide a code when requesting a set of temporary security credentials. A\n user who fails to provide the code receives an \"access denied\" response when requesting\n resources that require MFA authentication.
\nThe format for this parameter, as described by its regex pattern, is a sequence of six\n numeric digits.
" + "smithy.api#documentation": "The value provided by the MFA device, if MFA is required. If any policy requires the\n IAM user to submit an MFA code, specify this value. If MFA authentication is required,\n the user must provide a code when requesting a set of temporary security credentials. A\n user who fails to provide the code receives an \"access denied\" response when requesting\n resources that require MFA authentication.
\nThe format for this parameter, as described by its regex pattern, is a sequence of six\n numeric digits.
" } } } @@ -832,7 +832,7 @@ "Credentials": { "target": "com.amazonaws.sts#Credentials", "traits": { - "smithy.api#documentation": "The temporary security credentials, which include an access key ID, a secret access\n key, and a security (or session) token.
\n \nThe size of the security token that STS API operations return is not fixed. We\n strongly recommend that you make no assumptions about the maximum size.
\nThe temporary security credentials, which include an access key ID, a secret access key,\n and a security (or session) token.
\n \nThe size of the security token that STS API operations return is not fixed. We\n strongly recommend that you make no assumptions about the maximum size.
\nThe request was rejected because the total packed size of the session policies and\n session tags combined was too large. An Amazon Web Services conversion compresses the session policy\n document, session policy ARNs, and session tags into a packed binary format that has a\n separate limit. The error message indicates by percentage how close the policies and\n tags are to the upper size limit. For more information, see Passing Session Tags in STS in\n the IAM User Guide.
\nYou could receive this error even though you meet other defined session policy and\n session tag limits. For more information, see IAM and STS Entity\n Character Limits in the IAM User Guide.
", + "smithy.api#documentation": "The request was rejected because the total packed size of the session policies and\n session tags combined was too large. An Amazon Web Services conversion compresses the session policy\n document, session policy ARNs, and session tags into a packed binary format that has a\n separate limit. The error message indicates by percentage how close the policies and\n tags are to the upper size limit. For more information, see Passing Session Tags in STS in\n the IAM User Guide.
\nYou could receive this error even though you meet other defined session policy and\n session tag limits. For more information, see IAM and STS Entity\n Character Limits in the IAM User Guide.
", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -1013,7 +1013,7 @@ } }, "traits": { - "smithy.api#documentation": "You can pass custom key-value pair attributes when you assume a role or federate a user.\n These are called session tags. You can then use the session tags to control access to\n resources. For more information, see Tagging STS Sessions in the\n IAM User Guide.
" + "smithy.api#documentation": "You can pass custom key-value pair attributes when you assume a role or federate a user.\n These are called session tags. You can then use the session tags to control access to\n resources. For more information, see Tagging Amazon Web Services STS Sessions in the\n IAM User Guide.
" } }, "com.amazonaws.sts#accessKeyIdType": { diff --git a/codegen/sdk-codegen/aws-models/textract.2018-06-27.json b/codegen/sdk-codegen/aws-models/textract.2018-06-27.json index bf00e011431..52657983e39 100644 --- a/codegen/sdk-codegen/aws-models/textract.2018-06-27.json +++ b/codegen/sdk-codegen/aws-models/textract.2018-06-27.json @@ -180,7 +180,7 @@ } ], "traits": { - "smithy.api#documentation": "Analyzes an input document for financially related relationships between text.
\nInformation is returned as ExpenseDocuments
and seperated as follows.
\n LineItemGroups
- A data set containing LineItems
which\n store information about the lines of text, such as an item purchased and its price on a receipt.
\n SummaryFields
- Contains all other information a receipt, such as header information\n or the vendors name.
\n AnalyzeExpense
synchronously analyzes an input document for financially related relationships between text.
Information is returned as ExpenseDocuments
and seperated as follows.
\n LineItemGroups
- A data set containing LineItems
which\n store information about the lines of text, such as an item purchased and its price on a receipt.
\n SummaryFields
- Contains all other information a receipt, such as header information\n or the vendors name.
Analyzes identity documents for relevant information. This information is extracted\n and returned as IdentityDocumentFields
, which records both the normalized\n field and value of the extracted text.
Text of either the normalized field or value associated with it.
", + "smithy.api#required": {} + } + }, + "NormalizedValue": { + "target": "com.amazonaws.textract#NormalizedValue", + "traits": { + "smithy.api#documentation": "Only returned for dates, returns the type of value detected and the date\n written in a more machine readable way.
" + } + }, + "Confidence": { + "target": "com.amazonaws.textract#Percent", + "traits": { + "smithy.api#documentation": "The confidence score of the detected text.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Used to contain the information detected by an AnalyzeID operation.
" + } + }, + "com.amazonaws.textract#AnalyzeIDRequest": { + "type": "structure", + "members": { + "DocumentPages": { + "target": "com.amazonaws.textract#DocumentPages", + "traits": { + "smithy.api#documentation": "The document being passed to AnalyzeID.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.textract#AnalyzeIDResponse": { + "type": "structure", + "members": { + "IdentityDocuments": { + "target": "com.amazonaws.textract#IdentityDocumentList", + "traits": { + "smithy.api#documentation": "The list of documents processed by AnalyzeID. Includes a number denoting their\n place in the list and the response structure for the document.
" + } + }, + "DocumentMetadata": { + "target": "com.amazonaws.textract#DocumentMetadata" + }, + "AnalyzeIDModelVersion": { + "target": "com.amazonaws.textract#String", + "traits": { + "smithy.api#documentation": "The version of the AnalyzeIdentity API being used to process documents.
" + } + } + } + }, "com.amazonaws.textract#BadDocumentException": { "type": "structure", "members": { @@ -549,6 +649,18 @@ "smithy.api#documentation": "Information about the input document.
" } }, + "com.amazonaws.textract#DocumentPages": { + "type": "list", + "member": { + "target": "com.amazonaws.textract#Document" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2 + } + } + }, "com.amazonaws.textract#DocumentTooLargeException": { "type": "structure", "members": { @@ -672,7 +784,7 @@ } }, "traits": { - "smithy.api#documentation": "Breakdown of detected information, seperated into \n the catagories Type, LableDetection, and ValueDetection
" + "smithy.api#documentation": "Breakdown of detected information, seperated into \n the catagories Type, LabelDetection, and ValueDetection
" } }, "com.amazonaws.textract#ExpenseFieldList": { @@ -1237,6 +1349,52 @@ "smithy.api#error": "client" } }, + "com.amazonaws.textract#IdentityDocument": { + "type": "structure", + "members": { + "DocumentIndex": { + "target": "com.amazonaws.textract#UInteger", + "traits": { + "smithy.api#documentation": "Denotes the placement of a document in the IdentityDocument list. The first document\n is marked 1, the second 2 and so on.
" + } + }, + "IdentityDocumentFields": { + "target": "com.amazonaws.textract#IdentityDocumentFieldList", + "traits": { + "smithy.api#documentation": "The structure used to record information extracted from identity documents.\n Contains both normalized field and value of the extracted text.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The structure that lists each document processed in an AnalyzeID operation.
" + } + }, + "com.amazonaws.textract#IdentityDocumentField": { + "type": "structure", + "members": { + "Type": { + "target": "com.amazonaws.textract#AnalyzeIDDetections" + }, + "ValueDetection": { + "target": "com.amazonaws.textract#AnalyzeIDDetections" + } + }, + "traits": { + "smithy.api#documentation": "Structure containing both the normalized type of the extracted information\n and the text associated with it. These are extracted as Type and Value respectively.
" + } + }, + "com.amazonaws.textract#IdentityDocumentFieldList": { + "type": "list", + "member": { + "target": "com.amazonaws.textract#IdentityDocumentField" + } + }, + "com.amazonaws.textract#IdentityDocumentList": { + "type": "list", + "member": { + "target": "com.amazonaws.textract#IdentityDocument" + } + }, "com.amazonaws.textract#ImageBlob": { "type": "blob", "traits": { @@ -1450,6 +1608,26 @@ "smithy.api#pattern": "\\S" } }, + "com.amazonaws.textract#NormalizedValue": { + "type": "structure", + "members": { + "Value": { + "target": "com.amazonaws.textract#String", + "traits": { + "smithy.api#documentation": "The value of the date, written as Year-Month-DayTHour:Minute:Second.
" + } + }, + "ValueType": { + "target": "com.amazonaws.textract#ValueType", + "traits": { + "smithy.api#documentation": "The normalized type of the value detected. In this case, DATE.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Contains information relating to dates in a document, including the type\n of value, and the value.
" + } + }, "com.amazonaws.textract#NotificationChannel": { "type": "structure", "members": { @@ -2068,6 +2246,9 @@ { "target": "com.amazonaws.textract#AnalyzeExpense" }, + { + "target": "com.amazonaws.textract#AnalyzeID" + }, { "target": "com.amazonaws.textract#DetectDocumentText" }, @@ -2126,10 +2307,21 @@ } }, "traits": { - "smithy.api#documentation": "The format of the input document isn't supported. Documents for synchronous operations can be in\n PNG or JPEG format. Documents for asynchronous operations can also be in PDF format.
", + "smithy.api#documentation": "The format of the input document isn't supported. Documents for synchronous operations can be in\n PNG or JPEG format only. Documents for asynchronous operations can be in PDF format.
", "smithy.api#error": "client" } }, + "com.amazonaws.textract#ValueType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "DATE", + "name": "DATE" + } + ] + } + }, "com.amazonaws.textract#Warning": { "type": "structure", "members": { diff --git a/codegen/sdk-codegen/aws-models/timestreamquery.2018-11-01.json b/codegen/sdk-codegen/aws-models/timestreamquery.2018-11-01.json index 88bd7e8ac2a..d63d85b1393 100644 --- a/codegen/sdk-codegen/aws-models/timestreamquery.2018-11-01.json +++ b/codegen/sdk-codegen/aws-models/timestreamquery.2018-11-01.json @@ -37,11 +37,24 @@ } }, "traits": { - "smithy.api#documentation": "\n You are not authorized to perform this action.\n
", + "aws.protocols#awsQueryError": { + "code": "AccessDenied", + "httpResponseCode": 403 + }, + "smithy.api#documentation": "You are not authorized to perform this action.
", "smithy.api#error": "client", "smithy.api#httpError": 403 } }, + "com.amazonaws.timestreamquery#AmazonResourceName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + } + } + }, "com.amazonaws.timestreamquery#CancelQuery": { "type": "operation", "input": { @@ -71,7 +84,7 @@ "aws.api#clientDiscoveredEndpoint": { "required": true }, - "smithy.api#documentation": "\n Cancels a query that has been issued. Cancellation is guaranteed only if the query has not \n completed execution before the cancellation request was issued. Because cancellation is an idempotent operation, \n subsequent cancellation requests will return a CancellationMessage
, indicating that the query has already been canceled.\n
Cancels a query that has been issued. Cancellation is provided only if the query has\n not completed running before the cancellation request was issued. Because cancellation\n is an idempotent operation, subsequent cancellation requests will return a\n CancellationMessage
, indicating that the query has already been\n canceled. See code\n sample for details.
\n The id of the query that needs to be cancelled. QueryID
is returned as part of QueryResult.\n
The ID of the query that needs to be cancelled. QueryID
is returned as\n part of the query result.
\n A CancellationMessage
is returned when a CancelQuery
request for the query specified by QueryId
has already been issued. \n
A CancellationMessage
is returned when a CancelQuery
\n request for the query specified by QueryId
has already been issued.
\n The name of the result set column. The name of the result set is available for columns of all data types except for arrays.\n
" + "smithy.api#documentation": "The name of the result set column. The name of the result set is available for\n columns of all data types except for arrays.
" } }, "Type": { "target": "com.amazonaws.timestreamquery#Type", "traits": { - "smithy.api#documentation": "\n The data type of the result set column. The data type can be a scalar or complex. Scalar data types are integers, strings, doubles, booleans, and others. Complex data types are types such as arrays, rows, and others.\n
", + "smithy.api#documentation": "The data type of the result set column. The data type can be a scalar or complex.\n Scalar data types are integers, strings, doubles, Booleans, and others. Complex data\n types are types such as arrays, rows, and others.
", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "\n Contains the meta data for query results such as the column names, data types, and other attributes.\n
" + "smithy.api#documentation": "Contains the metadata for query results such as the column names, data types, and\n other attributes.
" } }, "com.amazonaws.timestreamquery#ColumnInfoList": { @@ -143,47 +166,170 @@ } }, "traits": { - "smithy.api#documentation": "\n Unable to poll results for a cancelled query.\n
", + "smithy.api#documentation": "Unable to poll results for a cancelled query.
", "smithy.api#error": "client", "smithy.api#httpError": 409 } }, + "com.amazonaws.timestreamquery#CreateScheduledQuery": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamquery#CreateScheduledQueryRequest" + }, + "output": { + "target": "com.amazonaws.timestreamquery#CreateScheduledQueryResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamquery#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamquery#ConflictException" + }, + { + "target": "com.amazonaws.timestreamquery#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamquery#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamquery#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.timestreamquery#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamquery#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": " Create a scheduled query that will be run on your behalf at the configured schedule.\n Timestream assumes the execution role provided as part of the\n ScheduledQueryExecutionRoleArn
parameter to run the query. You can use\n the NotificationConfiguration
parameter to configure notification for your\n scheduled query operations.
Name of the scheduled query.
", + "smithy.api#required": {} + } + }, + "QueryString": { + "target": "com.amazonaws.timestreamquery#QueryString", + "traits": { + "smithy.api#documentation": "The query string to run. Parameter\n names can be specified in the query string @
character followed by an\n identifier. The named Parameter @scheduled_runtime
is reserved and can be used in the query to get the time at which the query is scheduled to run.
The timestamp calculated according to the ScheduleConfiguration parameter, will be the value of @scheduled_runtime
paramater for each query run. \n For example, consider an instance of a scheduled query executing on 2021-12-01 00:00:00. For this instance, the @scheduled_runtime
parameter is \n initialized to the timestamp 2021-12-01 00:00:00 when invoking the query.
The schedule configuration for the query.
", + "smithy.api#required": {} + } + }, + "NotificationConfiguration": { + "target": "com.amazonaws.timestreamquery#NotificationConfiguration", + "traits": { + "smithy.api#documentation": "Notification configuration for the scheduled query. A notification is sent by\n Timestream when a query run finishes, when the state is updated or when you delete it.
", + "smithy.api#required": {} + } + }, + "TargetConfiguration": { + "target": "com.amazonaws.timestreamquery#TargetConfiguration", + "traits": { + "smithy.api#documentation": "Configuration used for writing the result of a query.
" + } + }, + "ClientToken": { + "target": "com.amazonaws.timestreamquery#ClientToken", + "traits": { + "smithy.api#documentation": "Using a ClientToken makes the call to CreateScheduledQuery idempotent, in other words, making the same request repeatedly will produce the same result. Making \n multiple identical CreateScheduledQuery requests has the same effect as making a single request.\n\n
\n If CreateScheduledQuery is called without a ClientToken
, the\n Query SDK generates a ClientToken
on your behalf.
After 8 hours, any request with the same ClientToken
is treated\n as a new request.
The ARN for the IAM role that Timestream will assume when running the scheduled query.
", + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.timestreamquery#TagList", + "traits": { + "smithy.api#documentation": "A list of key-value pairs to label the scheduled query.
" + } + }, + "KmsKeyId": { + "target": "com.amazonaws.timestreamquery#StringValue2048", + "traits": { + "smithy.api#documentation": "The Amazon KMS key used to encrypt the scheduled query resource, at-rest. If the Amazon KMS\n key is not specified, the scheduled query resource will be encrypted with a Timestream\n owned Amazon KMS key. To specify a KMS key, use the key ID, key ARN, alias name, or alias\n ARN. When using an alias name, prefix the name with alias/\n
\nIf ErrorReportConfiguration uses SSE_KMS
as encryption type, the same KmsKeyId is used to encrypt the error report at rest.
Configuration for error reporting. Error reports will be generated when a problem is encountered when writing the query results.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.timestreamquery#CreateScheduledQueryResponse": { + "type": "structure", + "members": { + "Arn": { + "target": "com.amazonaws.timestreamquery#AmazonResourceName", + "traits": { + "smithy.api#documentation": "ARN for the created scheduled query.
", + "smithy.api#required": {} + } + } + } + }, "com.amazonaws.timestreamquery#Datum": { "type": "structure", "members": { "ScalarValue": { "target": "com.amazonaws.timestreamquery#ScalarValue", "traits": { - "smithy.api#documentation": "\n Indicates if the data point is a scalar value such as integer, string, double, or boolean.\n
" + "smithy.api#documentation": "Indicates if the data point is a scalar value such as integer, string, double, or\n Boolean.
" } }, "TimeSeriesValue": { "target": "com.amazonaws.timestreamquery#TimeSeriesDataPointList", "traits": { - "smithy.api#documentation": "\n Indicates if the data point is of timeseries data type.\n
" + "smithy.api#documentation": "Indicates if the data point is a timeseries data type.
" } }, "ArrayValue": { "target": "com.amazonaws.timestreamquery#DatumList", "traits": { - "smithy.api#documentation": "\n Indicates if the data point is an array.\n
" + "smithy.api#documentation": "Indicates if the data point is an array.
" } }, "RowValue": { "target": "com.amazonaws.timestreamquery#Row", "traits": { - "smithy.api#documentation": "\n Indicates if the data point is a row.\n
" + "smithy.api#documentation": "Indicates if the data point is a row.
" } }, "NullValue": { "target": "com.amazonaws.timestreamquery#NullableBoolean", "traits": { - "smithy.api#documentation": "\n Indicates if the data point is null.\n
" + "smithy.api#documentation": "Indicates if the data point is null.
" } } }, "traits": { - "smithy.api#documentation": "\n Datum represents a single data point in a query result.\n
" + "smithy.api#documentation": "Datum represents a single data point in a query result.
" } }, "com.amazonaws.timestreamquery#DatumList": { @@ -192,6 +338,51 @@ "target": "com.amazonaws.timestreamquery#Datum" } }, + "com.amazonaws.timestreamquery#DeleteScheduledQuery": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamquery#DeleteScheduledQueryRequest" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamquery#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamquery#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamquery#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamquery#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.timestreamquery#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamquery#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "Deletes a given scheduled query. This is an irreversible operation.
", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.timestreamquery#DeleteScheduledQueryRequest": { + "type": "structure", + "members": { + "ScheduledQueryArn": { + "target": "com.amazonaws.timestreamquery#AmazonResourceName", + "traits": { + "smithy.api#documentation": "The ARN of the scheduled query.
", + "smithy.api#required": {} + } + } + } + }, "com.amazonaws.timestreamquery#DescribeEndpoints": { "type": "operation", "input": { @@ -212,7 +403,7 @@ } ], "traits": { - "smithy.api#documentation": "DescribeEndpoints returns a list of available endpoints to make Timestream API calls against.\n This API is available through both Write and Query.
\nBecause Timestream’s SDKs are designed to transparently work with the service’s architecture, \n including the management and mapping of the service endpoints,\n it is not recommended that you use this API unless:
\nYour application uses a programming language that does not yet have SDK support
\nYou require better control over the client-side implementation
\nFor detailed information on how to use DescribeEndpoints, \n see The Endpoint Discovery Pattern and REST APIs.
" + "smithy.api#documentation": "DescribeEndpoints returns a list of available endpoints to make Timestream\n API calls against. This API is available through both Write and Query.
\nBecause the Timestream SDKs are designed to transparently work with the\n service’s architecture, including the management and mapping of the service endpoints,\n it is not recommended that you use this API unless:
\nYou are using VPC endpoints (Amazon Web Services PrivateLink) with Timestream\n \n
\nYour application uses a programming language that does not yet have SDK\n support
\nYou require better control over the client-side implementation
\nFor detailed information on how and when to use and implement DescribeEndpoints, see\n The Endpoint Discovery Pattern.
" } }, "com.amazonaws.timestreamquery#DescribeEndpointsRequest": { @@ -225,10 +416,108 @@ "Endpoints": { "target": "com.amazonaws.timestreamquery#Endpoints", "traits": { - "smithy.api#documentation": "An Endpoints
object is returned when a DescribeEndpoints
request is made.
An Endpoints
object is returned when a DescribeEndpoints
\n request is made.
Provides detailed information about a scheduled query.
" + } + }, + "com.amazonaws.timestreamquery#DescribeScheduledQueryRequest": { + "type": "structure", + "members": { + "ScheduledQueryArn": { + "target": "com.amazonaws.timestreamquery#AmazonResourceName", + "traits": { + "smithy.api#documentation": "The ARN of the scheduled query.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.timestreamquery#DescribeScheduledQueryResponse": { + "type": "structure", + "members": { + "ScheduledQuery": { + "target": "com.amazonaws.timestreamquery#ScheduledQueryDescription", + "traits": { + "smithy.api#documentation": "The scheduled query.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.timestreamquery#DimensionMapping": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.timestreamquery#SchemaName", + "traits": { + "smithy.api#documentation": "Column name from query result.
", + "smithy.api#required": {} + } + }, + "DimensionValueType": { + "target": "com.amazonaws.timestreamquery#DimensionValueType", + "traits": { + "smithy.api#documentation": "Type for the dimension.
", "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#documentation": "This type is used to map column(s) from the query result to a dimension in the\n destination table.
" + } + }, + "com.amazonaws.timestreamquery#DimensionMappingList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamquery#DimensionMapping" + } + }, + "com.amazonaws.timestreamquery#DimensionValueType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "VARCHAR", + "name": "VARCHAR" + } + ] } }, "com.amazonaws.timestreamquery#Double": { @@ -253,7 +542,7 @@ } }, "traits": { - "smithy.api#documentation": "Represents an available endpoint against which to make API calls agaisnt, as well as the TTL for that endpoint.
" + "smithy.api#documentation": "Represents an available endpoint against which to make API calls against, as well as\n the TTL for that endpoint.
" } }, "com.amazonaws.timestreamquery#Endpoints": { @@ -265,66 +554,44 @@ "com.amazonaws.timestreamquery#ErrorMessage": { "type": "string" }, - "com.amazonaws.timestreamquery#InternalServerException": { + "com.amazonaws.timestreamquery#ErrorReportConfiguration": { "type": "structure", "members": { - "Message": { - "target": "com.amazonaws.timestreamquery#ErrorMessage" + "S3Configuration": { + "target": "com.amazonaws.timestreamquery#S3Configuration", + "traits": { + "smithy.api#documentation": "The S3 configuration for the error reports.
", + "smithy.api#required": {} + } } }, "traits": { - "smithy.api#documentation": "\n Timestream was unable to fully process this request because of an internal server error.\n
", - "smithy.api#error": "server", - "smithy.api#httpError": 500 + "smithy.api#documentation": "Configuration required for error reporting.
" } }, - "com.amazonaws.timestreamquery#InvalidEndpointException": { + "com.amazonaws.timestreamquery#ErrorReportLocation": { "type": "structure", "members": { - "Message": { - "target": "com.amazonaws.timestreamquery#ErrorMessage" + "S3ReportLocation": { + "target": "com.amazonaws.timestreamquery#S3ReportLocation", + "traits": { + "smithy.api#documentation": "The S3 location where error reports are written.
" + } } }, "traits": { - "smithy.api#documentation": "The requested endpoint was invalid.
", - "smithy.api#error": "client", - "smithy.api#httpError": 421 - } - }, - "com.amazonaws.timestreamquery#Long": { - "type": "long" - }, - "com.amazonaws.timestreamquery#MaxQueryResults": { - "type": "integer", - "traits": { - "smithy.api#box": {}, - "smithy.api#range": { - "min": 1, - "max": 1000 - } - } - }, - "com.amazonaws.timestreamquery#NullableBoolean": { - "type": "boolean", - "traits": { - "smithy.api#box": {} + "smithy.api#documentation": "This contains the location of the error report for a single scheduled query call.\n
" } }, - "com.amazonaws.timestreamquery#Query": { + "com.amazonaws.timestreamquery#ExecuteScheduledQuery": { "type": "operation", "input": { - "target": "com.amazonaws.timestreamquery#QueryRequest" - }, - "output": { - "target": "com.amazonaws.timestreamquery#QueryResponse" + "target": "com.amazonaws.timestreamquery#ExecuteScheduledQueryRequest" }, "errors": [ { "target": "com.amazonaws.timestreamquery#AccessDeniedException" }, - { - "target": "com.amazonaws.timestreamquery#ConflictException" - }, { "target": "com.amazonaws.timestreamquery#InternalServerException" }, @@ -332,7 +599,7 @@ "target": "com.amazonaws.timestreamquery#InvalidEndpointException" }, { - "target": "com.amazonaws.timestreamquery#QueryExecutionException" + "target": "com.amazonaws.timestreamquery#ResourceNotFoundException" }, { "target": "com.amazonaws.timestreamquery#ThrottlingException" @@ -345,17 +612,88 @@ "aws.api#clientDiscoveredEndpoint": { "required": true }, - "smithy.api#documentation": "\n Query is a synchronous operation that enables you to execute a query. Query will timeout after 60 seconds. You must update the default timeout in the SDK to support a timeout of 60 seconds. The result set will be truncated to 1MB. Service quotas apply. For more information, see Quotas in the Timestream Developer Guide.\n
", - "smithy.api#idempotent": {}, - "smithy.api#paginated": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "items": "Rows", - "pageSize": "MaxRows" + "smithy.api#documentation": "You can use this API to run a scheduled query manually.
", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.timestreamquery#ExecuteScheduledQueryRequest": { + "type": "structure", + "members": { + "ScheduledQueryArn": { + "target": "com.amazonaws.timestreamquery#AmazonResourceName", + "traits": { + "smithy.api#documentation": "ARN of the scheduled query.
", + "smithy.api#required": {} + } + }, + "InvocationTime": { + "target": "com.amazonaws.timestreamquery#Time", + "traits": { + "smithy.api#documentation": "The timestamp in UTC. Query will be run as if it was invoked at this timestamp.
", + "smithy.api#required": {} + } + }, + "ClientToken": { + "target": "com.amazonaws.timestreamquery#ClientToken", + "traits": { + "smithy.api#documentation": "Not used.
", + "smithy.api#idempotencyToken": {} + } } } }, - "com.amazonaws.timestreamquery#QueryExecutionException": { + "com.amazonaws.timestreamquery#ExecutionStats": { + "type": "structure", + "members": { + "ExecutionTimeInMillis": { + "target": "com.amazonaws.timestreamquery#Long", + "traits": { + "smithy.api#documentation": "Total time, measured in milliseconds, that was needed for the scheduled query run to complete.
" + } + }, + "DataWrites": { + "target": "com.amazonaws.timestreamquery#Long", + "traits": { + "smithy.api#documentation": "Data writes metered for records ingested in a single scheduled query run.
" + } + }, + "BytesMetered": { + "target": "com.amazonaws.timestreamquery#Long", + "traits": { + "smithy.api#documentation": "Bytes metered for a single scheduled query run.
" + } + }, + "RecordsIngested": { + "target": "com.amazonaws.timestreamquery#Long", + "traits": { + "smithy.api#documentation": "The number of records ingested for a single scheduled query run.
" + } + }, + "QueryResultRows": { + "target": "com.amazonaws.timestreamquery#Long", + "traits": { + "smithy.api#documentation": "Number of rows present in the output from running a query before ingestion to\n destination data source.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Statistics for a single scheduled query run.
" + } + }, + "com.amazonaws.timestreamquery#InternalServerException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.timestreamquery#ErrorMessage" + } + }, + "traits": { + "smithy.api#documentation": "\n Timestream was unable to fully process this request because of an internal\n server error.
", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.timestreamquery#InvalidEndpointException": { "type": "structure", "members": { "Message": { @@ -363,203 +701,1379 @@ } }, "traits": { - "smithy.api#documentation": "\n Timestream was unable to run the query successfully.\n
", + "smithy.api#documentation": "The requested endpoint was not valid.
", "smithy.api#error": "client", - "smithy.api#httpError": 400 + "smithy.api#httpError": 421 } }, - "com.amazonaws.timestreamquery#QueryId": { - "type": "string", + "com.amazonaws.timestreamquery#ListScheduledQueries": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamquery#ListScheduledQueriesRequest" + }, + "output": { + "target": "com.amazonaws.timestreamquery#ListScheduledQueriesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamquery#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamquery#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamquery#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamquery#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamquery#ValidationException" + } + ], "traits": { - "smithy.api#length": { - "min": 1, - "max": 64 + "aws.api#clientDiscoveredEndpoint": { + "required": true }, - "smithy.api#pattern": "[a-zA-Z0-9]+" + "smithy.api#documentation": "Gets a list of all scheduled queries in the caller's Amazon account and Region. ListScheduledQueries
is eventually consistent.
\n The query to be executed by Timestream.\n
", - "smithy.api#required": {} + "smithy.api#documentation": "The maximum number of items to return in the output. If the total number of items\n available is more than the value specified, a NextToken
is provided in the\n output. To resume pagination, provide the NextToken
value as the argument\n to the subsequent call to ListScheduledQueriesRequest
.
\n Unique, case-sensitive string of up to 64 ASCII characters that you specify when you make a Query request.\n Providing a ClientToken
makes the call to Query
idempotent, meaning that multiple identical calls \n have the same effect as one single call.\n
Your query request will fail in the following cases:
\n\n If you submit a request with the same client token outside the 5-minute idepotency window.\n
\n\n If you submit a request with the same client token but a change in other parameters within the 5-minute idempotency window. \n
\n\n After 4 hours, any request with the same client token is treated as a new request.\n
", - "smithy.api#idempotencyToken": {} + "smithy.api#documentation": "A pagination token to resume pagination.
" + } + } + } + }, + "com.amazonaws.timestreamquery#ListScheduledQueriesResponse": { + "type": "structure", + "members": { + "ScheduledQueries": { + "target": "com.amazonaws.timestreamquery#ScheduledQueryList", + "traits": { + "smithy.api#documentation": "A list of scheduled queries.
", + "smithy.api#required": {} } }, "NextToken": { - "target": "com.amazonaws.timestreamquery#String", + "target": "com.amazonaws.timestreamquery#NextScheduledQueriesResultsToken", + "traits": { + "smithy.api#documentation": "A token to specify where to start paginating. This is the NextToken from a previously\n truncated response.
" + } + } + } + }, + "com.amazonaws.timestreamquery#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamquery#ListTagsForResourceRequest" + }, + "output": { + "target": "com.amazonaws.timestreamquery#ListTagsForResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamquery#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamquery#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.timestreamquery#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamquery#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "List all tags on a Timestream query resource.
", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.timestreamquery#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "ResourceARN": { + "target": "com.amazonaws.timestreamquery#AmazonResourceName", "traits": { - "smithy.api#documentation": "\n A pagination token passed to get a set of results.\n
" + "smithy.api#documentation": "The Timestream resource with tags to be listed. This value is an Amazon Resource Name\n (ARN).
", + "smithy.api#required": {} } }, - "MaxRows": { - "target": "com.amazonaws.timestreamquery#MaxQueryResults", + "MaxResults": { + "target": "com.amazonaws.timestreamquery#MaxTagsForResourceResult", + "traits": { + "smithy.api#documentation": "The maximum number of tags to return.
" + } + }, + "NextToken": { + "target": "com.amazonaws.timestreamquery#NextTagsForResourceResultsToken", "traits": { - "smithy.api#documentation": "\n The total number of rows to return in the output. If the total number of rows available\n is more than the value specified, a NextToken is provided in the command's output.\n To resume pagination, provide the NextToken value in the starting-token argument of a \n subsequent command.\n
" + "smithy.api#documentation": "A pagination token to resume pagination.
" } } } }, - "com.amazonaws.timestreamquery#QueryResponse": { + "com.amazonaws.timestreamquery#ListTagsForResourceResponse": { "type": "structure", "members": { - "QueryId": { - "target": "com.amazonaws.timestreamquery#QueryId", + "Tags": { + "target": "com.amazonaws.timestreamquery#TagList", "traits": { - "smithy.api#documentation": "\n A unique ID for the given query.\n
", + "smithy.api#documentation": "The tags currently associated with the Timestream resource.
", "smithy.api#required": {} } }, "NextToken": { - "target": "com.amazonaws.timestreamquery#String", + "target": "com.amazonaws.timestreamquery#NextTagsForResourceResultsToken", + "traits": { + "smithy.api#documentation": "A pagination token to resume pagination with a subsequent call to\n ListTagsForResourceResponse
.
\n A pagination token that can be used again on a Query
call to get the next set of results. \n
Refers to the value of measure_name in a result row. This field is required if\n MeasureNameColumn is provided.
" } }, - "Rows": { - "target": "com.amazonaws.timestreamquery#RowList", + "SourceColumn": { + "target": "com.amazonaws.timestreamquery#SchemaName", "traits": { - "smithy.api#documentation": "\n The result set rows returned by the query.\n
", - "smithy.api#required": {} + "smithy.api#documentation": "This field refers to the source column from which measure-value is to be read for\n result materialization.
" } }, - "ColumnInfo": { - "target": "com.amazonaws.timestreamquery#ColumnInfoList", + "TargetMeasureName": { + "target": "com.amazonaws.timestreamquery#SchemaName", + "traits": { + "smithy.api#documentation": "Target measure name to be used. If not provided, the target measure name by default\n would be measure-name if provided, or sourceColumn otherwise.
" + } + }, + "MeasureValueType": { + "target": "com.amazonaws.timestreamquery#MeasureValueType", "traits": { - "smithy.api#documentation": "\n The column data types of the returned result set.\n
", + "smithy.api#documentation": "Type of the value that is to be read from sourceColumn. If the mapping is for MULTI,\n use MeasureValueType.MULTI.
", "smithy.api#required": {} } }, - "QueryStatus": { - "target": "com.amazonaws.timestreamquery#QueryStatus", + "MultiMeasureAttributeMappings": { + "target": "com.amazonaws.timestreamquery#MultiMeasureAttributeMappingList", "traits": { - "smithy.api#documentation": "Information about the status of the query, including progress and bytes scannned.
" + "smithy.api#documentation": "Required when measureValueType is MULTI. Attribute mappings for MULTI value\n measures.
" } } + }, + "traits": { + "smithy.api#documentation": "MixedMeasureMappings are mappings that can be used to ingest data into a mixture of\n narrow and multi measures in the derived table.
" } }, - "com.amazonaws.timestreamquery#QueryStatus": { + "com.amazonaws.timestreamquery#MixedMeasureMappingList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamquery#MixedMeasureMapping" + }, + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, + "com.amazonaws.timestreamquery#MultiMeasureAttributeMapping": { "type": "structure", "members": { - "ProgressPercentage": { - "target": "com.amazonaws.timestreamquery#Double", + "SourceColumn": { + "target": "com.amazonaws.timestreamquery#SchemaName", "traits": { - "smithy.api#documentation": "The progress of the query, expressed as a percentage.
" + "smithy.api#documentation": "Source column from where the attribute value is to be read.
", + "smithy.api#required": {} } }, - "CumulativeBytesScanned": { - "target": "com.amazonaws.timestreamquery#Long", + "TargetMultiMeasureAttributeName": { + "target": "com.amazonaws.timestreamquery#SchemaName", + "traits": { + "smithy.api#documentation": "Custom name to be used for attribute name in derived table. If not provided, source\n column name would be used.
" + } + }, + "MeasureValueType": { + "target": "com.amazonaws.timestreamquery#ScalarMeasureValueType", + "traits": { + "smithy.api#documentation": "Type of the attribute to be read from the source column.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Attribute mapping for MULTI value measures.
" + } + }, + "com.amazonaws.timestreamquery#MultiMeasureAttributeMappingList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamquery#MultiMeasureAttributeMapping" + }, + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, + "com.amazonaws.timestreamquery#MultiMeasureMappings": { + "type": "structure", + "members": { + "TargetMultiMeasureName": { + "target": "com.amazonaws.timestreamquery#SchemaName", + "traits": { + "smithy.api#documentation": "The name of the target multi-measure name in the derived table. This input is required\n when measureNameColumn is not provided. If MeasureNameColumn is provided, then value\n from that column will be used as multi-measure name.
" + } + }, + "MultiMeasureAttributeMappings": { + "target": "com.amazonaws.timestreamquery#MultiMeasureAttributeMappingList", + "traits": { + "smithy.api#documentation": "Required. Attribute mappings to be used for mapping query results to ingest data for\n multi-measure attributes.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Only one of MixedMeasureMappings or MultiMeasureMappings is to be provided.\n MultiMeasureMappings can be used to ingest data as multi measures in the derived\n table.
" + } + }, + "com.amazonaws.timestreamquery#NextScheduledQueriesResultsToken": { + "type": "string" + }, + "com.amazonaws.timestreamquery#NextTagsForResourceResultsToken": { + "type": "string" + }, + "com.amazonaws.timestreamquery#NotificationConfiguration": { + "type": "structure", + "members": { + "SnsConfiguration": { + "target": "com.amazonaws.timestreamquery#SnsConfiguration", + "traits": { + "smithy.api#documentation": "Details on SNS configuration.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Notification configuration for a scheduled query. A notification is sent by\n Timestream when a scheduled query is created, its state is updated or when it is deleted.
" + } + }, + "com.amazonaws.timestreamquery#NullableBoolean": { + "type": "boolean", + "traits": { + "smithy.api#box": {} + } + }, + "com.amazonaws.timestreamquery#PaginationToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + } + } + }, + "com.amazonaws.timestreamquery#ParameterMapping": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.timestreamquery#String", + "traits": { + "smithy.api#documentation": "Parameter name.
", + "smithy.api#required": {} + } + }, + "Type": { + "target": "com.amazonaws.timestreamquery#Type", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Mapping for named parameters.
" + } + }, + "com.amazonaws.timestreamquery#ParameterMappingList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamquery#ParameterMapping" + } + }, + "com.amazonaws.timestreamquery#PrepareQuery": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamquery#PrepareQueryRequest" + }, + "output": { + "target": "com.amazonaws.timestreamquery#PrepareQueryResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamquery#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamquery#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamquery#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamquery#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamquery#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "A synchronous operation that allows you to submit a query with parameters to be stored\n by Timestream for later running. Timestream only supports using this operation with the\n PrepareQueryRequest$ValidateOnly
set to true
.
The Timestream query string that you want to use as a prepared statement. Parameter\n names can be specified in the query string @
character followed by an\n identifier.
By setting this value to true
, Timestream will only validate that the\n query string is a valid Timestream query, and not store the prepared query for later\n use.
The query string that you want prepare.
", + "smithy.api#required": {} + } + }, + "Columns": { + "target": "com.amazonaws.timestreamquery#SelectColumnList", + "traits": { + "smithy.api#documentation": "A list of SELECT clause columns of the submitted query string.
", + "smithy.api#required": {} + } + }, + "Parameters": { + "target": "com.amazonaws.timestreamquery#ParameterMappingList", + "traits": { + "smithy.api#documentation": "A list of parameters used in the submitted query string.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.timestreamquery#Query": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamquery#QueryRequest" + }, + "output": { + "target": "com.amazonaws.timestreamquery#QueryResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamquery#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamquery#ConflictException" + }, + { + "target": "com.amazonaws.timestreamquery#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamquery#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamquery#QueryExecutionException" + }, + { + "target": "com.amazonaws.timestreamquery#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamquery#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "\n Query
is a synchronous operation that enables you to run a query against\n your Amazon Timestream data. Query
will time out after 60 seconds.\n You must update the default timeout in the SDK to support a timeout of 60 seconds. See\n the code\n sample for details.
Your query request will fail in the following cases:
\n If you submit a Query
request with the same client token outside\n of the 5-minute idempotency window.
If you submit a Query
request with the same client token, but\n change other parameters, within the 5-minute idempotency window.
If the size of the row (including the query metadata) exceeds 1 MB, then the\n query will fail with the following error message:
\n\n Query aborted as max page response size has been exceeded by the output\n result row
\n
If the IAM principal of the query initiator and the result reader are not the\n same and/or the query initiator and the result reader do not have the same query\n string in the query requests, the query will fail with an Invalid\n pagination token
error.
\n Timestream was unable to run the query successfully.
", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.timestreamquery#QueryId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "^[a-zA-Z0-9]+$" + } + }, + "com.amazonaws.timestreamquery#QueryRequest": { + "type": "structure", + "members": { + "QueryString": { + "target": "com.amazonaws.timestreamquery#QueryString", + "traits": { + "smithy.api#documentation": "The query to be run by Timestream.
", + "smithy.api#required": {} + } + }, + "ClientToken": { + "target": "com.amazonaws.timestreamquery#ClientRequestToken", + "traits": { + "smithy.api#documentation": " Unique, case-sensitive string of up to 64 ASCII characters specified when a\n Query
request is made. Providing a ClientToken
makes the\n call to Query
\n idempotent. This means that running the same query repeatedly will\n produce the same result. In other words, making multiple identical Query
\n requests has the same effect as making a single request. When using\n ClientToken
in a query, note the following:
If the Query API is instantiated without a ClientToken
, the\n Query SDK generates a ClientToken
on your behalf.
If the Query
invocation only contains the\n ClientToken
but does not include a NextToken
, that\n invocation of Query
is assumed to be a new query run.
If the invocation contains NextToken
, that particular invocation\n is assumed to be a subsequent invocation of a prior call to the Query API, and a\n result set is returned.
After 4 hours, any request with the same ClientToken
is treated\n as a new request.
A pagination token used to return a set of results. When the Query
API\n is invoked using NextToken
, that particular invocation is assumed to be a\n subsequent invocation of a prior call to Query
, and a result set is\n returned. However, if the Query
invocation only contains the\n ClientToken
, that invocation of Query
is assumed to be a\n new query run.
Note the following when using NextToken in a query:
\nA pagination token can be used for up to five Query
invocations,\n OR for a duration of up to 1 hour – whichever comes first.
Using the same NextToken
will return the same set of records. To\n keep paginating through the result set, you must to use the most recent\n nextToken
.
Suppose a Query
invocation returns two NextToken
\n values, TokenA
and TokenB
. If TokenB
is\n used in a subsequent Query
invocation, then TokenA
is\n invalidated and cannot be reused.
To request a previous result set from a query after pagination has begun, you\n must re-invoke the Query API.
\nThe latest NextToken
should be used to paginate until\n null
is returned, at which point a new NextToken
\n should be used.
If the IAM principal of the query initiator and the result reader are not the\n same and/or the query initiator and the result reader do not have the same query\n string in the query requests, the query will fail with an Invalid\n pagination token
error.
The total number of rows to be returned in the Query
output. The initial\n run of Query
with a MaxRows
value specified will return the\n result set of the query in two cases:
The size of the result is less than 1MB
.
The number of rows in the result set is less than the value of\n maxRows
.
Otherwise, the initial invocation of Query
only returns a\n NextToken
, which can then be used in subsequent calls to fetch the\n result set. To resume pagination, provide the NextToken
value in the\n subsequent command.
If the row size is large (e.g. a row has many columns), Timestream may return\n fewer rows to keep the response size from exceeding the 1 MB limit. If\n MaxRows
is not provided, Timestream will send the necessary\n number of rows to meet the 1 MB limit.
A unique ID for the given query.
", + "smithy.api#required": {} + } + }, + "NextToken": { + "target": "com.amazonaws.timestreamquery#PaginationToken", + "traits": { + "smithy.api#documentation": " A pagination token that can be used again on a Query
call to get the\n next set of results.
The result set rows returned by the query.
", + "smithy.api#required": {} + } + }, + "ColumnInfo": { + "target": "com.amazonaws.timestreamquery#ColumnInfoList", + "traits": { + "smithy.api#documentation": "The column data types of the returned result set.
", + "smithy.api#required": {} + } + }, + "QueryStatus": { + "target": "com.amazonaws.timestreamquery#QueryStatus", + "traits": { + "smithy.api#documentation": "Information about the status of the query, including progress and bytes\n scanned.
" + } + } + } + }, + "com.amazonaws.timestreamquery#QueryStatus": { + "type": "structure", + "members": { + "ProgressPercentage": { + "target": "com.amazonaws.timestreamquery#Double", + "traits": { + "smithy.api#documentation": "The progress of the query, expressed as a percentage.
" + } + }, + "CumulativeBytesScanned": { + "target": "com.amazonaws.timestreamquery#Long", + "traits": { + "smithy.api#documentation": "The amount of data scanned by the query in bytes. This is a cumulative sum and\n represents the total amount of bytes scanned since the query was started.
" + } + }, + "CumulativeBytesMetered": { + "target": "com.amazonaws.timestreamquery#Long", + "traits": { + "smithy.api#documentation": "The amount of data scanned by the query in bytes that you will be charged for. This is\n a cumulative sum and represents the total amount of data that you will be charged for\n since the query was started. The charge is applied only once and is either applied when\n the query completes running or when the query is cancelled.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Information about the status of the query, including progress and bytes\n scanned.
" + } + }, + "com.amazonaws.timestreamquery#QueryString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 262144 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.timestreamquery#ResourceName": { + "type": "string" + }, + "com.amazonaws.timestreamquery#ResourceNotFoundException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.timestreamquery#ErrorMessage" + }, + "ScheduledQueryArn": { + "target": "com.amazonaws.timestreamquery#AmazonResourceName", + "traits": { + "smithy.api#documentation": "The ARN of the scheduled query.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The requested resource could not be found.
", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.timestreamquery#Row": { + "type": "structure", + "members": { + "Data": { + "target": "com.amazonaws.timestreamquery#DatumList", + "traits": { + "smithy.api#documentation": "List of data points in a single row of the result set.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Represents a single row in the query results.
" + } + }, + "com.amazonaws.timestreamquery#RowList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamquery#Row" + } + }, + "com.amazonaws.timestreamquery#S3BucketName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 3, + "max": 63 + }, + "smithy.api#pattern": "^[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9]$" + } + }, + "com.amazonaws.timestreamquery#S3Configuration": { + "type": "structure", + "members": { + "BucketName": { + "target": "com.amazonaws.timestreamquery#S3BucketName", + "traits": { + "smithy.api#documentation": "Name of the S3 bucket under which error reports will be created.
", + "smithy.api#required": {} + } + }, + "ObjectKeyPrefix": { + "target": "com.amazonaws.timestreamquery#S3ObjectKeyPrefix", + "traits": { + "smithy.api#documentation": "Prefix for the error report key. Timestream by default adds the following prefix to\n the error report path.
" + } + }, + "EncryptionOption": { + "target": "com.amazonaws.timestreamquery#S3EncryptionOption", + "traits": { + "smithy.api#documentation": "Encryption at rest options for the error reports. If no encryption option is\n specified, Timestream will choose SSE_S3 as default.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Details on S3 location for error reports that result from running a query.
" + } + }, + "com.amazonaws.timestreamquery#S3EncryptionOption": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "SSE_S3", + "name": "SSE_S3" + }, + { + "value": "SSE_KMS", + "name": "SSE_KMS" + } + ] + } + }, + "com.amazonaws.timestreamquery#S3ObjectKey": { + "type": "string" + }, + "com.amazonaws.timestreamquery#S3ObjectKeyPrefix": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 896 + }, + "smithy.api#pattern": "^[a-zA-Z0-9|!\\-_*'\\(\\)]([a-zA-Z0-9]|[!\\-_*'\\(\\)\\/.])+$" + } + }, + "com.amazonaws.timestreamquery#S3ReportLocation": { + "type": "structure", + "members": { + "BucketName": { + "target": "com.amazonaws.timestreamquery#S3BucketName", + "traits": { + "smithy.api#documentation": "S3 bucket name.
" + } + }, + "ObjectKey": { + "target": "com.amazonaws.timestreamquery#S3ObjectKey", + "traits": { + "smithy.api#documentation": "S3 key.
" + } + } + }, + "traits": { + "smithy.api#documentation": "S3 report location for the scheduled query run.
" + } + }, + "com.amazonaws.timestreamquery#ScalarMeasureValueType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "BIGINT", + "name": "BIGINT" + }, + { + "value": "BOOLEAN", + "name": "BOOLEAN" + }, + { + "value": "DOUBLE", + "name": "DOUBLE" + }, + { + "value": "VARCHAR", + "name": "VARCHAR" + } + ] + } + }, + "com.amazonaws.timestreamquery#ScalarType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "VARCHAR", + "name": "VARCHAR" + }, + { + "value": "BOOLEAN", + "name": "BOOLEAN" + }, + { + "value": "BIGINT", + "name": "BIGINT" + }, + { + "value": "DOUBLE", + "name": "DOUBLE" + }, + { + "value": "TIMESTAMP", + "name": "TIMESTAMP" + }, + { + "value": "DATE", + "name": "DATE" + }, + { + "value": "TIME", + "name": "TIME" + }, + { + "value": "INTERVAL_DAY_TO_SECOND", + "name": "INTERVAL_DAY_TO_SECOND" + }, + { + "value": "INTERVAL_YEAR_TO_MONTH", + "name": "INTERVAL_YEAR_TO_MONTH" + }, + { + "value": "UNKNOWN", + "name": "UNKNOWN" + }, + { + "value": "INTEGER", + "name": "INTEGER" + } + ] + } + }, + "com.amazonaws.timestreamquery#ScalarValue": { + "type": "string" + }, + "com.amazonaws.timestreamquery#ScheduleConfiguration": { + "type": "structure", + "members": { + "ScheduleExpression": { + "target": "com.amazonaws.timestreamquery#ScheduleExpression", + "traits": { + "smithy.api#documentation": "An expression that denotes when to trigger the scheduled query run. This can be a cron\n expression or a rate expression.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Configuration of the schedule of the query.
" + } + }, + "com.amazonaws.timestreamquery#ScheduleExpression": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + } + } + }, + "com.amazonaws.timestreamquery#ScheduledQuery": { + "type": "structure", + "members": { + "Arn": { + "target": "com.amazonaws.timestreamquery#AmazonResourceName", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name.
", + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.timestreamquery#ScheduledQueryName", + "traits": { + "smithy.api#documentation": "The name of the scheduled query.
", + "smithy.api#required": {} + } + }, + "CreationTime": { + "target": "com.amazonaws.timestreamquery#Time", + "traits": { + "smithy.api#documentation": "The creation time of the scheduled query.
" + } + }, + "State": { + "target": "com.amazonaws.timestreamquery#ScheduledQueryState", + "traits": { + "smithy.api#documentation": "State of scheduled query.
", + "smithy.api#required": {} + } + }, + "PreviousInvocationTime": { + "target": "com.amazonaws.timestreamquery#Time", + "traits": { + "smithy.api#documentation": "The last time the scheduled query was run.
" + } + }, + "NextInvocationTime": { + "target": "com.amazonaws.timestreamquery#Time", + "traits": { + "smithy.api#documentation": "The next time the scheduled query is to be run.
" + } + }, + "ErrorReportConfiguration": { + "target": "com.amazonaws.timestreamquery#ErrorReportConfiguration", + "traits": { + "smithy.api#documentation": "Configuration for scheduled query error reporting.
" + } + }, + "TargetDestination": { + "target": "com.amazonaws.timestreamquery#TargetDestination", + "traits": { + "smithy.api#documentation": "Target data source where final scheduled query result will be written.
" + } + }, + "LastRunStatus": { + "target": "com.amazonaws.timestreamquery#ScheduledQueryRunStatus", + "traits": { + "smithy.api#documentation": "Status of the last scheduled query run.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Scheduled Query
" + } + }, + "com.amazonaws.timestreamquery#ScheduledQueryDescription": { + "type": "structure", + "members": { + "Arn": { + "target": "com.amazonaws.timestreamquery#AmazonResourceName", + "traits": { + "smithy.api#documentation": "Scheduled query ARN.
", + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.timestreamquery#ScheduledQueryName", + "traits": { + "smithy.api#documentation": "Name of the scheduled query.
", + "smithy.api#required": {} + } + }, + "QueryString": { + "target": "com.amazonaws.timestreamquery#QueryString", + "traits": { + "smithy.api#documentation": "The query to be run.
", + "smithy.api#required": {} + } + }, + "CreationTime": { + "target": "com.amazonaws.timestreamquery#Time", + "traits": { + "smithy.api#documentation": "Creation time of the scheduled query.
" + } + }, + "State": { + "target": "com.amazonaws.timestreamquery#ScheduledQueryState", + "traits": { + "smithy.api#documentation": "State of the scheduled query.
", + "smithy.api#required": {} + } + }, + "PreviousInvocationTime": { + "target": "com.amazonaws.timestreamquery#Time", + "traits": { + "smithy.api#documentation": "Last time the query was run.
" + } + }, + "NextInvocationTime": { + "target": "com.amazonaws.timestreamquery#Time", + "traits": { + "smithy.api#documentation": "The next time the scheduled query is scheduled to run.
" + } + }, + "ScheduleConfiguration": { + "target": "com.amazonaws.timestreamquery#ScheduleConfiguration", + "traits": { + "smithy.api#documentation": "Schedule configuration.
", + "smithy.api#required": {} + } + }, + "NotificationConfiguration": { + "target": "com.amazonaws.timestreamquery#NotificationConfiguration", + "traits": { + "smithy.api#documentation": "Notification configuration.
", + "smithy.api#required": {} + } + }, + "TargetConfiguration": { + "target": "com.amazonaws.timestreamquery#TargetConfiguration", + "traits": { + "smithy.api#documentation": "Scheduled query target store configuration.
" + } + }, + "ScheduledQueryExecutionRoleArn": { + "target": "com.amazonaws.timestreamquery#AmazonResourceName", + "traits": { + "smithy.api#documentation": "IAM role that Timestream uses to run the schedule query.
" + } + }, + "KmsKeyId": { + "target": "com.amazonaws.timestreamquery#StringValue2048", + "traits": { + "smithy.api#documentation": "A customer provided KMS key used to encrypt the scheduled query resource.
" + } + }, + "ErrorReportConfiguration": { + "target": "com.amazonaws.timestreamquery#ErrorReportConfiguration", + "traits": { + "smithy.api#documentation": "Error-reporting configuration for the scheduled query.
" + } + }, + "LastRunSummary": { + "target": "com.amazonaws.timestreamquery#ScheduledQueryRunSummary", + "traits": { + "smithy.api#documentation": "Runtime summary for the last scheduled query run.
" + } + }, + "RecentlyFailedRuns": { + "target": "com.amazonaws.timestreamquery#ScheduledQueryRunSummaryList", + "traits": { + "smithy.api#documentation": "Runtime summary for the last five failed scheduled query runs.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Structure that describes scheduled query.
" + } + }, + "com.amazonaws.timestreamquery#ScheduledQueryList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamquery#ScheduledQuery" + } + }, + "com.amazonaws.timestreamquery#ScheduledQueryName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "^[a-zA-Z0-9_.-]+$" + } + }, + "com.amazonaws.timestreamquery#ScheduledQueryRunStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "AUTO_TRIGGER_SUCCESS", + "name": "AUTO_TRIGGER_SUCCESS" + }, + { + "value": "AUTO_TRIGGER_FAILURE", + "name": "AUTO_TRIGGER_FAILURE" + }, + { + "value": "MANUAL_TRIGGER_SUCCESS", + "name": "MANUAL_TRIGGER_SUCCESS" + }, + { + "value": "MANUAL_TRIGGER_FAILURE", + "name": "MANUAL_TRIGGER_FAILURE" + } + ] + } + }, + "com.amazonaws.timestreamquery#ScheduledQueryRunSummary": { + "type": "structure", + "members": { + "InvocationTime": { + "target": "com.amazonaws.timestreamquery#Time", + "traits": { + "smithy.api#documentation": "InvocationTime for this run. This is the time at which the query is scheduled to run.\n Parameter @scheduled_runtime
can be used in the query to get the value.
The actual time when the query was run.
" + } + }, + "RunStatus": { + "target": "com.amazonaws.timestreamquery#ScheduledQueryRunStatus", + "traits": { + "smithy.api#documentation": "The status of a scheduled query run.
" + } + }, + "ExecutionStats": { + "target": "com.amazonaws.timestreamquery#ExecutionStats", + "traits": { + "smithy.api#documentation": "Runtime statistics for a scheduled run.
" + } + }, + "ErrorReportLocation": { + "target": "com.amazonaws.timestreamquery#ErrorReportLocation", + "traits": { + "smithy.api#documentation": "S3 location for error report.
" + } + }, + "FailureReason": { + "target": "com.amazonaws.timestreamquery#ErrorMessage", + "traits": { + "smithy.api#documentation": "Error message for the scheduled query in case of failure. You might have to look at\n the error report to get more detailed error reasons.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Run summary for the scheduled query
" + } + }, + "com.amazonaws.timestreamquery#ScheduledQueryRunSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamquery#ScheduledQueryRunSummary" + } + }, + "com.amazonaws.timestreamquery#ScheduledQueryState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ENABLED", + "name": "ENABLED" + }, + { + "value": "DISABLED", + "name": "DISABLED" + } + ] + } + }, + "com.amazonaws.timestreamquery#SchemaName": { + "type": "string" + }, + "com.amazonaws.timestreamquery#SelectColumn": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.timestreamquery#String", + "traits": { + "smithy.api#documentation": "Name of the column.
" + } + }, + "Type": { + "target": "com.amazonaws.timestreamquery#Type" + }, + "DatabaseName": { + "target": "com.amazonaws.timestreamquery#ResourceName", + "traits": { + "smithy.api#documentation": "Database that has this column.
" + } + }, + "TableName": { + "target": "com.amazonaws.timestreamquery#ResourceName", + "traits": { + "smithy.api#documentation": "Table within the database that has this column.
" + } + }, + "Aliased": { + "target": "com.amazonaws.timestreamquery#NullableBoolean", + "traits": { + "smithy.api#documentation": "True, if the column name was aliased by the query. False otherwise.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Details of the column that is returned by the query.
" + } + }, + "com.amazonaws.timestreamquery#SelectColumnList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamquery#SelectColumn" + } + }, + "com.amazonaws.timestreamquery#ServiceErrorMessage": { + "type": "string" + }, + "com.amazonaws.timestreamquery#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.timestreamquery#ErrorMessage" + } + }, + "traits": { + "smithy.api#documentation": "You have exceeded the service quota.
", + "smithy.api#error": "client", + "smithy.api#httpError": 402 + } + }, + "com.amazonaws.timestreamquery#SnsConfiguration": { + "type": "structure", + "members": { + "TopicArn": { + "target": "com.amazonaws.timestreamquery#AmazonResourceName", + "traits": { + "smithy.api#documentation": "SNS topic ARN that the scheduled query status notifications will be sent to.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Details on SNS that are required to send the notification.
" + } + }, + "com.amazonaws.timestreamquery#String": { + "type": "string" + }, + "com.amazonaws.timestreamquery#StringValue2048": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + } + } + }, + "com.amazonaws.timestreamquery#Tag": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.timestreamquery#TagKey", + "traits": { + "smithy.api#documentation": "The key of the tag. Tag keys are case sensitive.
", + "smithy.api#required": {} + } + }, + "Value": { + "target": "com.amazonaws.timestreamquery#TagValue", + "traits": { + "smithy.api#documentation": "The value of the tag. Tag values are case sensitive and can be null.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A tag is a label that you assign to a Timestream database and/or table. Each tag\n consists of a key and an optional value, both of which you define. Tags enable you to\n categorize databases and/or tables, for example, by purpose, owner, or environment.\n
" + } + }, + "com.amazonaws.timestreamquery#TagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + } + } + }, + "com.amazonaws.timestreamquery#TagKeyList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamquery#TagKey" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.timestreamquery#TagList": { + "type": "list", + "member": { + "target": "com.amazonaws.timestreamquery#Tag" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.timestreamquery#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamquery#TagResourceRequest" + }, + "output": { + "target": "com.amazonaws.timestreamquery#TagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamquery#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamquery#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.timestreamquery#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.timestreamquery#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamquery#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "Associate a set of tags with a Timestream resource. You can then activate these\n user-defined tags so that they appear on the Billing and Cost Management console for\n cost allocation tracking.
" + } + }, + "com.amazonaws.timestreamquery#TagResourceRequest": { + "type": "structure", + "members": { + "ResourceARN": { + "target": "com.amazonaws.timestreamquery#AmazonResourceName", "traits": { - "smithy.api#documentation": "The amount of data scanned by the query in bytes. \n This is a cumulative sum and represents the total amount of bytes scanned since the query was started.\n
" + "smithy.api#documentation": "Identifies the Timestream resource to which tags should be added. This value is an\n Amazon Resource Name (ARN).
", + "smithy.api#required": {} } }, - "CumulativeBytesMetered": { - "target": "com.amazonaws.timestreamquery#Long", + "Tags": { + "target": "com.amazonaws.timestreamquery#TagList", "traits": { - "smithy.api#documentation": "The amount of data scanned by the query in bytes that you will be charged for. \n This is a cumulative sum and represents the total amount of data that you will be charged \n for since the query was started. \n The charge is applied only once and is either applied when \n the query completes execution or when the query is cancelled.\n
" + "smithy.api#documentation": "The tags to be assigned to the Timestream resource.
", + "smithy.api#required": {} } } - }, - "traits": { - "smithy.api#documentation": "Information about the status of the query, including progress and bytes scannned.
" } }, - "com.amazonaws.timestreamquery#QueryString": { + "com.amazonaws.timestreamquery#TagResourceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.timestreamquery#TagValue": { "type": "string", "traits": { - "smithy.api#sensitive": {} + "smithy.api#length": { + "min": 0, + "max": 256 + } } }, - "com.amazonaws.timestreamquery#Row": { + "com.amazonaws.timestreamquery#TargetConfiguration": { "type": "structure", "members": { - "Data": { - "target": "com.amazonaws.timestreamquery#DatumList", + "TimestreamConfiguration": { + "target": "com.amazonaws.timestreamquery#TimestreamConfiguration", "traits": { - "smithy.api#documentation": "List of data points in a single row of the result set.
", + "smithy.api#documentation": "Configuration needed to write data into the Timestream database and table.
", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "Represents a single row in the query results.
" - } - }, - "com.amazonaws.timestreamquery#RowList": { - "type": "list", - "member": { - "target": "com.amazonaws.timestreamquery#Row" + "smithy.api#documentation": "Configuration used for writing the output of a query.
" } }, - "com.amazonaws.timestreamquery#ScalarType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "VARCHAR", - "name": "VARCHAR" - }, - { - "value": "BOOLEAN", - "name": "BOOLEAN" - }, - { - "value": "BIGINT", - "name": "BIGINT" - }, - { - "value": "DOUBLE", - "name": "DOUBLE" - }, - { - "value": "TIMESTAMP", - "name": "TIMESTAMP" - }, - { - "value": "DATE", - "name": "DATE" - }, - { - "value": "TIME", - "name": "TIME" - }, - { - "value": "INTERVAL_DAY_TO_SECOND", - "name": "INTERVAL_DAY_TO_SECOND" - }, - { - "value": "INTERVAL_YEAR_TO_MONTH", - "name": "INTERVAL_YEAR_TO_MONTH" - }, - { - "value": "UNKNOWN", - "name": "UNKNOWN" - }, - { - "value": "INTEGER", - "name": "INTEGER" + "com.amazonaws.timestreamquery#TargetDestination": { + "type": "structure", + "members": { + "TimestreamDestination": { + "target": "com.amazonaws.timestreamquery#TimestreamDestination", + "traits": { + "smithy.api#documentation": "Query result destination details for Timestream data source.
" } - ] + } + }, + "traits": { + "smithy.api#documentation": "Destination details to write data for a target data source. Current supported data\n source is Timestream.
" } }, - "com.amazonaws.timestreamquery#ScalarValue": { - "type": "string" - }, - "com.amazonaws.timestreamquery#ServiceErrorMessage": { - "type": "string" - }, - "com.amazonaws.timestreamquery#String": { - "type": "string" - }, "com.amazonaws.timestreamquery#ThrottlingException": { "type": "structure", "members": { @@ -573,6 +2087,9 @@ "smithy.api#httpError": 429 } }, + "com.amazonaws.timestreamquery#Time": { + "type": "timestamp" + }, "com.amazonaws.timestreamquery#TimeSeriesDataPoint": { "type": "structure", "members": { @@ -586,13 +2103,13 @@ "Value": { "target": "com.amazonaws.timestreamquery#Datum", "traits": { - "smithy.api#documentation": "The measure value for the data point.
", + "smithy.api#documentation": "The measure value for the data point.
", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "The timeseries datatype represents the values of a measure over time. A time series is an array of rows of timestamps and measure values, with rows sorted in ascending order of time. A TimeSeriesDataPoint is a single data point in the timeseries. It represents a tuple of (time, measure value) in a timeseries.
" + "smithy.api#documentation": "The timeseries data type represents the values of a measure over time. A time series\n is an array of rows of timestamps and measure values, with rows sorted in ascending\n order of time. A TimeSeriesDataPoint is a single data point in the time series. It\n represents a tuple of (time, measure value) in a time series.
" } }, "com.amazonaws.timestreamquery#TimeSeriesDataPointList": { @@ -604,20 +2121,82 @@ "com.amazonaws.timestreamquery#Timestamp": { "type": "string" }, - "com.amazonaws.timestreamquery#Timestream_20181101": { - "type": "service", - "version": "2018-11-01", - "operations": [ - { - "target": "com.amazonaws.timestreamquery#CancelQuery" + "com.amazonaws.timestreamquery#TimestreamConfiguration": { + "type": "structure", + "members": { + "DatabaseName": { + "target": "com.amazonaws.timestreamquery#ResourceName", + "traits": { + "smithy.api#documentation": "Name of Timestream database to which the query result will be written.
", + "smithy.api#required": {} + } }, - { - "target": "com.amazonaws.timestreamquery#DescribeEndpoints" + "TableName": { + "target": "com.amazonaws.timestreamquery#ResourceName", + "traits": { + "smithy.api#documentation": "Name of Timestream table that the query result will be written to. The table should\n be within the same database that is provided in Timestream configuration.
", + "smithy.api#required": {} + } }, - { - "target": "com.amazonaws.timestreamquery#Query" + "TimeColumn": { + "target": "com.amazonaws.timestreamquery#SchemaName", + "traits": { + "smithy.api#documentation": "Column from query result that should be used as the time column in destination table.\n Column type for this should be TIMESTAMP.
", + "smithy.api#required": {} + } + }, + "DimensionMappings": { + "target": "com.amazonaws.timestreamquery#DimensionMappingList", + "traits": { + "smithy.api#documentation": "This is to allow mapping column(s) from the query result to the dimension in the\n destination table.
", + "smithy.api#required": {} + } + }, + "MultiMeasureMappings": { + "target": "com.amazonaws.timestreamquery#MultiMeasureMappings", + "traits": { + "smithy.api#documentation": "Multi-measure mappings.
" + } + }, + "MixedMeasureMappings": { + "target": "com.amazonaws.timestreamquery#MixedMeasureMappingList", + "traits": { + "smithy.api#documentation": "Specifies how to map measures to multi-measure records.
" + } + }, + "MeasureNameColumn": { + "target": "com.amazonaws.timestreamquery#SchemaName", + "traits": { + "smithy.api#documentation": "Name of the measure column.
" + } } - ], + }, + "traits": { + "smithy.api#documentation": "Configuration to write data into Timestream database and table. This configuration\n allows the user to map the query result select columns into the destination table\n columns.
" + } + }, + "com.amazonaws.timestreamquery#TimestreamDestination": { + "type": "structure", + "members": { + "DatabaseName": { + "target": "com.amazonaws.timestreamquery#ResourceName", + "traits": { + "smithy.api#documentation": "Timestream database name.
" + } + }, + "TableName": { + "target": "com.amazonaws.timestreamquery#ResourceName", + "traits": { + "smithy.api#documentation": "Timestream table name.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Destination for scheduled query.
" + } + }, + "com.amazonaws.timestreamquery#Timestream_20181101": { + "type": "service", "traits": { "aws.api#clientEndpointDiscovery": { "operation": "com.amazonaws.timestreamquery#DescribeEndpoints", @@ -634,9 +2213,51 @@ "name": "timestream" }, "aws.protocols#awsJson1_0": {}, - "smithy.api#documentation": "\n \n
", + "smithy.api#documentation": "Indicates if the column is of type string, integer, boolean, double, timestamp, date, time.
" + "smithy.api#documentation": "Indicates if the column is of type string, integer, Boolean, double, timestamp, date,\n time.
" } }, "ArrayColumnInfo": { @@ -667,7 +2288,110 @@ } }, "traits": { - "smithy.api#documentation": "Contains the data type of a column in a query result set. The data type can be scalar or complex. The supported scalar data types are integers, boolean, string, double, timestamp, date, time, and intervals. The supported complex data types are arrays, rows, and timeseries.
" + "smithy.api#documentation": "Contains the data type of a column in a query result set. The data type can be scalar\n or complex. The supported scalar data types are integers, Boolean, string, double,\n timestamp, date, time, and intervals. The supported complex data types are arrays, rows,\n and timeseries.
" + } + }, + "com.amazonaws.timestreamquery#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamquery#UntagResourceRequest" + }, + "output": { + "target": "com.amazonaws.timestreamquery#UntagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamquery#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamquery#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.timestreamquery#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamquery#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "Removes the association of tags from a Timestream query resource.
" + } + }, + "com.amazonaws.timestreamquery#UntagResourceRequest": { + "type": "structure", + "members": { + "ResourceARN": { + "target": "com.amazonaws.timestreamquery#AmazonResourceName", + "traits": { + "smithy.api#documentation": "The Timestream resource that the tags will be removed from. This value is an Amazon\n Resource Name (ARN).
", + "smithy.api#required": {} + } + }, + "TagKeys": { + "target": "com.amazonaws.timestreamquery#TagKeyList", + "traits": { + "smithy.api#documentation": "A list of tags keys. Existing tags of the resource whose keys are members of this list\n will be removed from the Timestream resource.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.timestreamquery#UntagResourceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.timestreamquery#UpdateScheduledQuery": { + "type": "operation", + "input": { + "target": "com.amazonaws.timestreamquery#UpdateScheduledQueryRequest" + }, + "errors": [ + { + "target": "com.amazonaws.timestreamquery#AccessDeniedException" + }, + { + "target": "com.amazonaws.timestreamquery#InternalServerException" + }, + { + "target": "com.amazonaws.timestreamquery#InvalidEndpointException" + }, + { + "target": "com.amazonaws.timestreamquery#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.timestreamquery#ThrottlingException" + }, + { + "target": "com.amazonaws.timestreamquery#ValidationException" + } + ], + "traits": { + "aws.api#clientDiscoveredEndpoint": { + "required": true + }, + "smithy.api#documentation": "Update a scheduled query.
" + } + }, + "com.amazonaws.timestreamquery#UpdateScheduledQueryRequest": { + "type": "structure", + "members": { + "ScheduledQueryArn": { + "target": "com.amazonaws.timestreamquery#AmazonResourceName", + "traits": { + "smithy.api#documentation": "ARN of the scheuled query.
", + "smithy.api#required": {} + } + }, + "State": { + "target": "com.amazonaws.timestreamquery#ScheduledQueryState", + "traits": { + "smithy.api#documentation": "State of the scheduled query.
", + "smithy.api#required": {} + } + } } }, "com.amazonaws.timestreamquery#ValidationException": { @@ -678,7 +2402,7 @@ } }, "traits": { - "smithy.api#documentation": "\n Invalid or malformed request.\n
", + "smithy.api#documentation": "Invalid or malformed request.
", "smithy.api#error": "client", "smithy.api#httpError": 400 } diff --git a/codegen/sdk-codegen/aws-models/timestreamwrite.2018-11-01.json b/codegen/sdk-codegen/aws-models/timestreamwrite.2018-11-01.json index c5b894e7173..6495a50d738 100644 --- a/codegen/sdk-codegen/aws-models/timestreamwrite.2018-11-01.json +++ b/codegen/sdk-codegen/aws-models/timestreamwrite.2018-11-01.json @@ -54,6 +54,12 @@ } } }, + "com.amazonaws.timestreamwrite#Boolean": { + "type": "boolean", + "traits": { + "smithy.api#box": {} + } + }, "com.amazonaws.timestreamwrite#ConflictException": { "type": "structure", "members": { @@ -105,14 +111,14 @@ "aws.api#clientDiscoveredEndpoint": { "required": true }, - "smithy.api#documentation": "Creates a new Timestream database. If the KMS key is not specified, the database will be encrypted with a Timestream managed KMS key located in your account.\n Refer to AWS managed KMS keys for more info. \n Service quotas apply. For more information, see Access Management in the Timestream Developer Guide.\n
" + "smithy.api#documentation": "Creates a new Timestream database. If the KMS key is not specified, the database will be encrypted with a Timestream managed KMS \n key located in your account.\n Refer to Amazon Web Services managed KMS keys for more info. \n Service quotas apply.\n See \n code sample for details.\n
" } }, "com.amazonaws.timestreamwrite#CreateDatabaseRequest": { "type": "structure", "members": { "DatabaseName": { - "target": "com.amazonaws.timestreamwrite#ResourceName", + "target": "com.amazonaws.timestreamwrite#ResourceCreateAPIName", "traits": { "smithy.api#documentation": "The name of the Timestream database.
", "smithy.api#required": {} @@ -121,7 +127,7 @@ "KmsKeyId": { "target": "com.amazonaws.timestreamwrite#StringValue2048", "traits": { - "smithy.api#documentation": "The KMS key for the database. If the KMS key is not specified, the database will be encrypted with a Timestream\n managed KMS key located in your account. Refer to AWS managed KMS keys for more info.
" + "smithy.api#documentation": "The KMS key for the database. \n If the KMS key is not specified, the database will be encrypted with a Timestream\n managed KMS key located in your account. \n Refer to Amazon Web Services managed KMS keys for more info.
" } }, "Tags": { @@ -181,21 +187,21 @@ "aws.api#clientDiscoveredEndpoint": { "required": true }, - "smithy.api#documentation": "The CreateTable operation adds a new table to an existing database in your account. In an AWS account,\n table names must be at least unique within each Region if they are in the same database. \n You may have identical table names in the same Region if the tables are in seperate databases.\n While creating the table, you must specify the table name, database name,\n and the retention properties.\n Service quotas apply. For more information, see Access Management\n in the Timestream Developer Guide.\n
" + "smithy.api#documentation": "The CreateTable operation adds a new table to an existing database in your account. In an Amazon Web Services account,\n table names must be at least unique within each Region if they are in the same database. \n You may have identical table names in the same Region if the tables are in separate databases.\n While creating the table, you must specify the table name, database name,\n and the retention properties.\n Service quotas apply.\n See \n code sample for details.\n
" } }, "com.amazonaws.timestreamwrite#CreateTableRequest": { "type": "structure", "members": { "DatabaseName": { - "target": "com.amazonaws.timestreamwrite#ResourceName", + "target": "com.amazonaws.timestreamwrite#ResourceCreateAPIName", "traits": { "smithy.api#documentation": "The name of the Timestream database.
", "smithy.api#required": {} } }, "TableName": { - "target": "com.amazonaws.timestreamwrite#ResourceName", + "target": "com.amazonaws.timestreamwrite#ResourceCreateAPIName", "traits": { "smithy.api#documentation": "The name of the Timestream table.
", "smithy.api#required": {} @@ -212,6 +218,12 @@ "traits": { "smithy.api#documentation": "\n A list of key-value pairs to label the table. \n
" } + }, + "MagneticStoreWriteProperties": { + "target": "com.amazonaws.timestreamwrite#MagneticStoreWriteProperties", + "traits": { + "smithy.api#documentation": "Contains properties to set on the table when enabling magnetic store writes.
" + } } } }, @@ -308,7 +320,7 @@ "aws.api#clientDiscoveredEndpoint": { "required": true }, - "smithy.api#documentation": "Deletes a given Timestream database. This is an irreversible operation.\n After a database is deleted, the time series data from its tables cannot be recovered.\n
\n \nAll tables in the database must be deleted first, or a ValidationException error will be thrown.\n
\n \nDue to the nature of distributed retries, \n the operation can return either success or a ResourceNotFoundException. Clients should consider them equivalent.
" + "smithy.api#documentation": "Deletes a given Timestream database. This is an irreversible operation.\n After a database is deleted, the time series data from its tables cannot be recovered.\n
\n \nAll tables in the database must be deleted first, or a ValidationException error will be thrown.\n
\n \nDue to the nature of distributed retries, \n the operation can return either success or a ResourceNotFoundException. Clients should consider them equivalent.
\nSee \n code sample for details.
" } }, "com.amazonaws.timestreamwrite#DeleteDatabaseRequest": { @@ -352,7 +364,7 @@ "aws.api#clientDiscoveredEndpoint": { "required": true }, - "smithy.api#documentation": "Deletes a given Timestream table. This is an irreversible operation.\n After a Timestream database table is deleted, the time series data stored in \n the table cannot be recovered.\n
\nDue to the nature of distributed retries, \n the operation can return either success or a ResourceNotFoundException. Clients should consider them equivalent.
" + "smithy.api#documentation": "Deletes a given Timestream table. This is an irreversible operation.\n After a Timestream database table is deleted, the time series data stored in \n the table cannot be recovered.\n
\nDue to the nature of distributed retries, \n the operation can return either success or a ResourceNotFoundException. Clients should consider them equivalent.
\nSee \n code sample for details.
" } }, "com.amazonaws.timestreamwrite#DeleteTableRequest": { @@ -406,7 +418,7 @@ "aws.api#clientDiscoveredEndpoint": { "required": true }, - "smithy.api#documentation": "Returns information about the database, including the database name, time that the database was created, \n and the total number of tables found within the database.\n Service quotas apply. For more information, see Access Management in the Timestream Developer Guide.
" + "smithy.api#documentation": "Returns information about the database, including the database name, time that the database was created, \n and the total number of tables found within the database.\n Service quotas apply. See \n code sample for details.
" } }, "com.amazonaws.timestreamwrite#DescribeDatabaseRequest": { @@ -452,7 +464,7 @@ } ], "traits": { - "smithy.api#documentation": "DescribeEndpoints returns a list of available endpoints to make Timestream API calls against. This API is available through both Write and Query.
\nBecause Timestream’s SDKs are designed to transparently work with the service’s architecture, \n including the management and mapping of the service endpoints,\n it is not recommended that you use this API unless:
\nYour application uses a programming language that does not yet have SDK support
\nYou require better control over the client-side implementation
\nFor detailed information on how to use DescribeEndpoints, \n see The Endpoint Discovery Pattern and REST APIs.
" + "smithy.api#documentation": "DescribeEndpoints returns a list of available endpoints to make Timestream API calls against.\n This API is available through both Write and Query.
\nBecause the Timestream SDKs are designed to transparently work with the service’s architecture, \n including the management and mapping of the service endpoints,\n it is not recommended that you use this API unless:
\nYou are using VPC endpoints (Amazon Web Services PrivateLink) with Timestream\n
\nYour application uses a programming language that does not yet have SDK support
\nYou require better control over the client-side implementation
\nFor detailed information on how and when to use and implement DescribeEndpoints, \n see The Endpoint Discovery Pattern.
" } }, "com.amazonaws.timestreamwrite#DescribeEndpointsRequest": { @@ -503,7 +515,7 @@ "aws.api#clientDiscoveredEndpoint": { "required": true }, - "smithy.api#documentation": "Returns information about the table, including the table name, database name, \n retention duration of the memory store and the magnetic store.\n Service quotas apply. For more information, see Access Management in the Timestream Developer Guide.\n
" + "smithy.api#documentation": "Returns information about the table, including the table name, database name, \n retention duration of the memory store and the magnetic store.\n Service quotas apply. See \n code sample for details.\n
" } }, "com.amazonaws.timestreamwrite#DescribeTableRequest": { @@ -540,14 +552,14 @@ "type": "structure", "members": { "Name": { - "target": "com.amazonaws.timestreamwrite#StringValue256", + "target": "com.amazonaws.timestreamwrite#SchemaName", "traits": { "smithy.api#documentation": "\n Dimension represents the meta data attributes of the time series. \n For example, the name and availability zone of an EC2 instance or \n the name of the manufacturer of a wind turbine are dimensions.\n \n
\nFor constraints on Dimension names, \n see Naming Constraints.
", "smithy.api#required": {} } }, "Value": { - "target": "com.amazonaws.timestreamwrite#StringValue2048", + "target": "com.amazonaws.timestreamwrite#SchemaValue", "traits": { "smithy.api#documentation": "The value of the dimension.
", "smithy.api#required": {} @@ -618,6 +630,9 @@ "com.amazonaws.timestreamwrite#ErrorMessage": { "type": "string" }, + "com.amazonaws.timestreamwrite#Integer": { + "type": "integer" + }, "com.amazonaws.timestreamwrite#InternalServerException": { "type": "structure", "members": { @@ -676,7 +691,7 @@ "aws.api#clientDiscoveredEndpoint": { "required": true }, - "smithy.api#documentation": "Returns a list of your Timestream databases. \n Service quotas apply. For more information, see Access Management in the Timestream Developer Guide.\n
", + "smithy.api#documentation": "Returns a list of your Timestream databases. \n Service quotas apply. See \n code sample for details.\n
", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -750,7 +765,7 @@ "aws.api#clientDiscoveredEndpoint": { "required": true }, - "smithy.api#documentation": "A list of tables, along with the name, status and retention properties of each table.\n
", + "smithy.api#documentation": "A list of tables, along with the name, status and retention properties of each table.\n See \n code sample for details.\n
", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -853,6 +868,20 @@ "com.amazonaws.timestreamwrite#Long": { "type": "long" }, + "com.amazonaws.timestreamwrite#MagneticStoreRejectedDataLocation": { + "type": "structure", + "members": { + "S3Configuration": { + "target": "com.amazonaws.timestreamwrite#S3Configuration", + "traits": { + "smithy.api#documentation": "Configuration of an S3 location to write error reports for records rejected, asynchronously, during magnetic store writes.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The location to write error reports for records rejected, asynchronously, during magnetic store writes.
" + } + }, "com.amazonaws.timestreamwrite#MagneticStoreRetentionPeriodInDays": { "type": "long", "traits": { @@ -862,6 +891,56 @@ } } }, + "com.amazonaws.timestreamwrite#MagneticStoreWriteProperties": { + "type": "structure", + "members": { + "EnableMagneticStoreWrites": { + "target": "com.amazonaws.timestreamwrite#Boolean", + "traits": { + "smithy.api#documentation": "A flag to enable magnetic store writes.
", + "smithy.api#required": {} + } + }, + "MagneticStoreRejectedDataLocation": { + "target": "com.amazonaws.timestreamwrite#MagneticStoreRejectedDataLocation", + "traits": { + "smithy.api#documentation": "The location to write error reports for records rejected asynchronously during magnetic store writes.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The set of properties on a table for configuring magnetic store writes.
" + } + }, + "com.amazonaws.timestreamwrite#MeasureValue": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.timestreamwrite#SchemaName", + "traits": { + "smithy.api#documentation": "Name of the MeasureValue.
\nFor constraints on MeasureValue names, refer to \n Naming Constraints in the Timestream developer guide.
", + "smithy.api#required": {} + } + }, + "Value": { + "target": "com.amazonaws.timestreamwrite#StringValue2048", + "traits": { + "smithy.api#documentation": "Value for the MeasureValue.
", + "smithy.api#required": {} + } + }, + "Type": { + "target": "com.amazonaws.timestreamwrite#MeasureValueType", + "traits": { + "smithy.api#documentation": "Contains the data type of the MeasureValue for the time series data point.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "MeasureValue represents the data attribute of the time series. For example, the CPU utilization of an EC2 instance or the RPM of a wind turbine are measures. MeasureValue has both name and value.
\n MeasureValue is only allowed for type MULTI
. Using MULTI
type, you can pass multiple data attributes associated with the same time series in a single record
Measure represents the data attribute of the time series. For example, the CPU utilization of an EC2 instance or the RPM of a wind turbine are measures.
" } @@ -928,7 +1021,7 @@ "MeasureValueType": { "target": "com.amazonaws.timestreamwrite#MeasureValueType", "traits": { - "smithy.api#documentation": "\nContains the data type of the measure value for the time series data point.\n
" + "smithy.api#documentation": "\nContains the data type of the measure value for the time series data point. Default type is DOUBLE
.\n
\nThe granularity of the timestamp unit. It indicates if the time value is in seconds, milliseconds, nanoseconds or other supported values.\n
" + "smithy.api#documentation": "\nThe granularity of the timestamp unit. It indicates if the time value is in seconds, milliseconds, nanoseconds or other supported values. \nDefault is MILLISECONDS
.\n
64-bit attribute used for record updates. \n Write requests for duplicate data with a higher version number will update the existing measure value and version. \n In cases where the measure value is the same, Version
will still be updated . Default value is to 1.
64-bit attribute used for record updates. \n Write requests for duplicate data with a higher version number will update the existing measure value and version. \n In cases where the measure value is the same, Version
will still be updated . Default value is 1
.
\n Version
must be 1
or greater, or you will receive a ValidationException
error.
Contains the list of MeasureValue for time series data points.
\n This is only allowed for type MULTI
. For scalar values, use MeasureValue
attribute of the Record directly.
Record represents a time series data point being written into \n Timestream. Each record contains an array of dimensions. Dimensions \n represent the meta data attributes of a time series data point such as\n the instance name or availability zone of an EC2 instance. A record also \n contains the measure name which is the name of the measure being collected \n for example the CPU utilization of an EC2 instance. A record also contains \n the measure value and the value type which is the data type of the measure value.\n In addition, the record contains the timestamp when the measure was collected that \n the timestamp unit which represents the granularity of the timestamp.\n
" + "smithy.api#documentation": "Record represents a time series data point being written into \n Timestream. Each record contains an array of dimensions. Dimensions \n represent the meta data attributes of a time series data point such as\n the instance name or availability zone of an EC2 instance. A record also \n contains the measure name which is the name of the measure being collected \n for example the CPU utilization of an EC2 instance. A record also contains \n the measure value and the value type which is the data type of the measure value.\n In addition, the record contains the timestamp when the measure was collected that \n the timestamp unit which represents the granularity of the timestamp.\n
\n\n Records have a Version
field, which is a 64-bit long
that you can use for updating data points. \n Writes of a duplicate record with the same dimension, \n timestamp, and measure name \n but different measure value will only succeed if the Version
attribute of the record in the write request \n is higher than that of the existing record. \n Timestream defaults to a Version
of 1
for records without the Version
field.\n
Total count of successfully ingested records.
" + } + }, + "MemoryStore": { + "target": "com.amazonaws.timestreamwrite#Integer", + "traits": { + "smithy.api#documentation": "Count of records ingested into the memory store.
" + } + }, + "MagneticStore": { + "target": "com.amazonaws.timestreamwrite#Integer", + "traits": { + "smithy.api#documentation": "Count of records ingested into the magnetic store.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Information on the records ingested by this request.
" + } + }, "com.amazonaws.timestreamwrite#RejectedRecord": { "type": "structure", "members": { @@ -985,7 +1110,7 @@ "Reason": { "target": "com.amazonaws.timestreamwrite#ErrorMessage", "traits": { - "smithy.api#documentation": "\n The reason why a record was not successfully inserted into Timestream. Possible causes of failure include:\n
\n\n Records with duplicate data where there are multiple records with the same dimensions,\n timestamps, and measure names but different measure values.\n
\n\n Records with timestamps that lie outside the retention duration of the memory store\n
\nWhen the retention window is updated, you will receive a RejectedRecords
exception \n if you immediately try to ingest data within the new window. \n To avoid a RejectedRecords
exception, \n wait until the duration of the new window to ingest new data.\n For further information, \n see \n \n Best Practices for Configuring Timestream\n and \n the explanation of how storage works in Timestream.
\n Records with dimensions or measures that exceed the Timestream defined limits.\n
\n\n For more information, see Access Management in the Timestream Developer Guide.\n
" + "smithy.api#documentation": "\n The reason why a record was not successfully inserted into Timestream. Possible causes of failure include:\n
\nRecords with duplicate data where there are multiple records with the same dimensions,\n timestamps, and measure names but:\n
\nMeasure values are different
\nVersion is not present in the request or\n the value of version in the new record is equal to or lower than the existing value
\n\n If Timestream rejects data for this case, the ExistingVersion
field in the RejectedRecords
\n response will indicate the current record’s version. \n To force an update, you can resend the request with a version for the record set to a value greater than the ExistingVersion
.
\n Records with timestamps that lie outside the retention duration of the memory store\n
\nWhen the retention window is updated, you will receive a RejectedRecords
exception \n if you immediately try to ingest data within the new window. \n To avoid a RejectedRecords
exception, \n wait until the duration of the new window to ingest new data.\n For further information, \n see \n \n Best Practices for Configuring Timestream\n and \n the explanation of how storage works in Timestream.
\n Records with dimensions or measures that exceed the Timestream defined limits.\n
\n\n For more information, see Access Management in the Timestream Developer Guide.\n
" } }, "ExistingVersion": { @@ -1017,21 +1142,20 @@ } }, "traits": { - "smithy.api#documentation": "\n WriteRecords would throw this exception in the following cases:\n
\n\n Records with duplicate data where there are multiple records with the same dimensions,\n timestamps, and measure names but different measure values.\n
\n\n Records with timestamps that lie outside the retention duration of the memory store\n
\n\n Records with dimensions or measures that exceed the Timestream defined limits.\n
\n\n For more information, see Access Management in the Timestream Developer Guide.\n
", + "smithy.api#documentation": "\n WriteRecords would throw this exception in the following cases:\n
\nRecords with duplicate data where there are multiple records with the same dimensions,\n timestamps, and measure names but:\n
\nMeasure values are different
\nVersion is not present in the request or\n the value of version in the new record is equal to or lower than the existing value
\n\n In this case, if Timestream rejects data, the ExistingVersion
field in the RejectedRecords
\n response will indicate the current record’s version. \n To force an update, you can resend the request with a version for the record set to a value greater than the ExistingVersion
.
\n Records with timestamps that lie outside the retention duration of the memory store\n
\n\n Records with dimensions or measures that exceed the Timestream defined limits.\n
\n\n For more information, see Quotas in the Timestream Developer Guide.\n
", "smithy.api#error": "client", "smithy.api#httpError": 419 } }, - "com.amazonaws.timestreamwrite#ResourceName": { + "com.amazonaws.timestreamwrite#ResourceCreateAPIName": { "type": "string", "traits": { - "smithy.api#length": { - "min": 3, - "max": 64 - }, - "smithy.api#pattern": "[a-zA-Z0-9_.-]+" + "smithy.api#pattern": "^[a-zA-Z0-9_.-]+$" } }, + "com.amazonaws.timestreamwrite#ResourceName": { + "type": "string" + }, "com.amazonaws.timestreamwrite#ResourceNotFoundException": { "type": "structure", "members": { @@ -1067,6 +1191,84 @@ "smithy.api#documentation": "Retention properties contain the duration for which your time series data must be stored in the magnetic store and the memory store.\n
" } }, + "com.amazonaws.timestreamwrite#S3BucketName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 3, + "max": 63 + }, + "smithy.api#pattern": "^[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9]$" + } + }, + "com.amazonaws.timestreamwrite#S3Configuration": { + "type": "structure", + "members": { + "BucketName": { + "target": "com.amazonaws.timestreamwrite#S3BucketName", + "traits": { + "smithy.api#documentation": ">Bucket name of the customer S3 bucket.
" + } + }, + "ObjectKeyPrefix": { + "target": "com.amazonaws.timestreamwrite#S3ObjectKeyPrefix", + "traits": { + "smithy.api#documentation": "Object key preview for the customer S3 location.
" + } + }, + "EncryptionOption": { + "target": "com.amazonaws.timestreamwrite#S3EncryptionOption", + "traits": { + "smithy.api#documentation": "Encryption option for the customer s3 location. Options are S3 server side encryption with an S3-managed key or KMS managed key.
" + } + }, + "KmsKeyId": { + "target": "com.amazonaws.timestreamwrite#StringValue2048", + "traits": { + "smithy.api#documentation": "KMS key id for the customer s3 location when encrypting with a KMS managed key.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Configuration specifing an S3 location.
" + } + }, + "com.amazonaws.timestreamwrite#S3EncryptionOption": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "SSE_S3", + "name": "SSE_S3" + }, + { + "value": "SSE_KMS", + "name": "SSE_KMS" + } + ] + } + }, + "com.amazonaws.timestreamwrite#S3ObjectKeyPrefix": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 928 + }, + "smithy.api#pattern": "^[a-zA-Z0-9|!\\-_*'\\(\\)]([a-zA-Z0-9]|[!\\-_*'\\(\\)\\/.])+$" + } + }, + "com.amazonaws.timestreamwrite#SchemaName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, + "com.amazonaws.timestreamwrite#SchemaValue": { + "type": "string" + }, "com.amazonaws.timestreamwrite#ServiceQuotaExceededException": { "type": "structure", "members": { @@ -1145,6 +1347,12 @@ "traits": { "smithy.api#documentation": "The time when the Timestream table was last updated.
" } + }, + "MagneticStoreWriteProperties": { + "target": "com.amazonaws.timestreamwrite#MagneticStoreWriteProperties", + "traits": { + "smithy.api#documentation": "Contains properties to set on the table when enabling magnetic store writes.
" + } } }, "traits": { @@ -1332,6 +1540,25 @@ }, "com.amazonaws.timestreamwrite#Timestream_20181101": { "type": "service", + "traits": { + "aws.api#clientEndpointDiscovery": { + "operation": "com.amazonaws.timestreamwrite#DescribeEndpoints", + "error": "com.amazonaws.timestreamwrite#InvalidEndpointException" + }, + "aws.api#service": { + "sdkId": "Timestream Write", + "arnNamespace": "timestream", + "cloudFormationName": "TimestreamWrite", + "cloudTrailEventSource": "timestreamwrite.amazonaws.com", + "endpointPrefix": "ingest.timestream" + }, + "aws.auth#sigv4": { + "name": "timestream" + }, + "aws.protocols#awsJson1_0": {}, + "smithy.api#documentation": "Amazon Timestream is a fast, scalable, fully managed time series database service that makes it easy to store and analyze trillions of time series data points per day. \n With Timestream, you can easily store and analyze IoT sensor data to derive insights from your IoT applications. \n You can analyze industrial telemetry to streamline equipment management and maintenance. \n You can also store and analyze log data and metrics to improve the performance and availability of your applications. \n Timestream is built from the ground up to effectively ingest, process, \n and store time series data. It organizes data to optimize query processing. It automatically scales based on the volume of data ingested and on the query volume to ensure you receive optimal performance while inserting and querying data. As your data grows over time, Timestream’s adaptive query processing engine spans across storage tiers to provide fast analysis while reducing costs.
", + "smithy.api#title": "Amazon Timestream Write" + }, "version": "2018-11-01", "operations": [ { @@ -1379,26 +1606,7 @@ { "target": "com.amazonaws.timestreamwrite#WriteRecords" } - ], - "traits": { - "aws.api#clientEndpointDiscovery": { - "operation": "com.amazonaws.timestreamwrite#DescribeEndpoints", - "error": "com.amazonaws.timestreamwrite#InvalidEndpointException" - }, - "aws.api#service": { - "sdkId": "Timestream Write", - "arnNamespace": "timestream", - "cloudFormationName": "TimestreamWrite", - "cloudTrailEventSource": "timestreamwrite.amazonaws.com", - "endpointPrefix": "ingest.timestream" - }, - "aws.auth#sigv4": { - "name": "timestream" - }, - "aws.protocols#awsJson1_0": {}, - "smithy.api#documentation": "Amazon Timestream is a fast, scalable, fully managed time series database service that makes it easy to store and analyze trillions of time series data points per day. With Timestream, you can easily store and analyze IoT sensor data to derive insights from your IoT applications. You can analyze industrial telemetry to streamline equipment management and maintenance. You can also store and analyze log data and metrics to improve the performance and availability of your applications. Timestream is built from the ground up to effectively ingest, process, and store time series data. It organizes data to optimize query processing. It automatically scales based on the volume of data ingested and on the query volume to ensure you receive optimal performance while inserting and querying data. As your data grows over time, Timestream’s adaptive query processing engine spans across storage tiers to provide fast analysis while reducing costs.
", - "smithy.api#title": "Amazon Timestream Write" - } + ] }, "com.amazonaws.timestreamwrite#UntagResource": { "type": "operation", @@ -1490,7 +1698,7 @@ "aws.api#clientDiscoveredEndpoint": { "required": true }, - "smithy.api#documentation": "\n Modifies the KMS key for an existing database. While updating the database, \n you must specify the database name and the identifier of the new KMS key to be used (KmsKeyId
).\n If there are any concurrent UpdateDatabase
requests, first writer wins.\n
\n Modifies the KMS key for an existing database. While updating the database, \n you must specify the database name and the identifier of the new KMS key to be used (KmsKeyId
).\n If there are any concurrent UpdateDatabase
requests, first writer wins.\n
See \n code sample for details.
" } }, "com.amazonaws.timestreamwrite#UpdateDatabaseRequest": { @@ -1552,7 +1760,7 @@ "aws.api#clientDiscoveredEndpoint": { "required": true }, - "smithy.api#documentation": "Modifies the retention duration of the memory store and magnetic store for your Timestream table. \n Note that the change in retention duration takes effect immediately. \n For example, if the retention period of the memory store was initially set to 2 hours and then changed to 24 hours, \n the memory store will be capable of holding 24 hours of data, but will\n be populated with 24 hours of data 22 hours after this change was made.\n Timestream does not retrieve data from the magnetic store to populate the memory store.
\nService quotas apply. For more information, see Access Management in the Timestream Developer Guide.
" + "smithy.api#documentation": "Modifies the retention duration of the memory store and magnetic store for your Timestream table. \n Note that the change in retention duration takes effect immediately. \n For example, if the retention period of the memory store was initially set to 2 hours and then changed to 24 hours, \n the memory store will be capable of holding 24 hours of data, but will\n be populated with 24 hours of data 22 hours after this change was made.\n Timestream does not retrieve data from the magnetic store to populate the memory store.
\nSee \n code sample for details.
" } }, "com.amazonaws.timestreamwrite#UpdateTableRequest": { @@ -1568,15 +1776,20 @@ "TableName": { "target": "com.amazonaws.timestreamwrite#ResourceName", "traits": { - "smithy.api#documentation": "The name of the Timesream table.
", + "smithy.api#documentation": "The name of the Timestream table.
", "smithy.api#required": {} } }, "RetentionProperties": { "target": "com.amazonaws.timestreamwrite#RetentionProperties", "traits": { - "smithy.api#documentation": "The retention duration of the memory store and the magnetic store.
", - "smithy.api#required": {} + "smithy.api#documentation": "The retention duration of the memory store and the magnetic store.
" + } + }, + "MagneticStoreWriteProperties": { + "target": "com.amazonaws.timestreamwrite#MagneticStoreWriteProperties", + "traits": { + "smithy.api#documentation": "Contains properties to set on the table when enabling magnetic store writes.
" } } } @@ -1613,6 +1826,9 @@ "input": { "target": "com.amazonaws.timestreamwrite#WriteRecordsRequest" }, + "output": { + "target": "com.amazonaws.timestreamwrite#WriteRecordsResponse" + }, "errors": [ { "target": "com.amazonaws.timestreamwrite#AccessDeniedException" @@ -1640,7 +1856,7 @@ "aws.api#clientDiscoveredEndpoint": { "required": true }, - "smithy.api#documentation": "The WriteRecords operation enables you to write your time series \n data into Timestream. You can specify a single data point or a batch \n of data points to be inserted into the system. Timestream offers you \n with a flexible schema that auto detects the column names and data types \n for your Timestream tables based on the dimension names and data types of\n the data points you specify when invoking writes into the database. \n Timestream support eventual consistency read semantics. This means that \n when you query data immediately after writing a batch of data into Timestream, \n the query results might not reflect the results of a recently completed write \n operation. The results may also include some stale data. If you repeat the \n query request after a short time, the results should return the latest data.\n Service quotas apply. For more information, \n see Access Management in the Timestream Developer Guide.\n
" + "smithy.api#documentation": "The WriteRecords operation enables you to write your time series \n data into Timestream. You can specify a single data point or a batch \n of data points to be inserted into the system. Timestream offers you \n with a flexible schema that auto detects the column names and data types \n for your Timestream tables based on the dimension names and data types of\n the data points you specify when invoking writes into the database. \n Timestream support eventual consistency read semantics. This means that \n when you query data immediately after writing a batch of data into Timestream, \n the query results might not reflect the results of a recently completed write \n operation. The results may also include some stale data. If you repeat the \n query request after a short time, the results should return the latest data.\n Service quotas apply.\n
\n \nSee \n code sample for details.
\n \n\n Upserts\n
\n \nYou can use the Version
parameter in a WriteRecords
request to update data points. \n Timestream tracks a version number with each record. Version
defaults to 1
when not specified for the record in the request. \n Timestream will update an existing record’s measure value along with its Version
upon receiving a write request with a higher \n Version
number for that record. \n Upon receiving an update request where the measure value is the same as that of the existing record, \n Timestream still updates Version
, if it is greater than the existing value of Version
. \n You can update a data point as many times as desired, as long as the value of Version
continuously increases. \n
\n For example, suppose you write a new record without indicating Version
in the request. \n Timestream will store this record, and set Version
to 1
. \n Now, suppose you try to update this record with a WriteRecords
request of the same record with a different measure value but, \n like before, do not provide Version
. \n In this case, Timestream will reject this update with a RejectedRecordsException
since the updated record’s version is not greater than the existing value of Version. \n However, if you were to resend the update request with Version
set to 2
, \n Timestream would then succeed in updating the record’s value, \n and the Version
would be set to 2
. \n Next, suppose you sent a WriteRecords
request with this same record and an identical measure value, \n but with Version
set to 3
. \n In this case, Timestream would only update Version
to 3
. \n Any further updates would need to send a version number greater than 3
, \n or the update requests would receive a RejectedRecordsException
.\n
The name of the Timesream table.
", + "smithy.api#documentation": "The name of the Timestream table.
", "smithy.api#required": {} } }, "CommonAttributes": { "target": "com.amazonaws.timestreamwrite#Record", "traits": { - "smithy.api#documentation": "A record containing the common measure and dimension attributes \n shared across all the records in the request. The measure and dimension \n attributes specified in here will be merged with the measure and dimension\n attributes in the records object when the data is written into Timestream.\n
" + "smithy.api#documentation": "A record containing the common measure, dimension, time, \n and version attributes \n shared across all the records in the request. The measure and dimension \n attributes specified will be merged with the measure and dimension\n attributes in the records object when the data is written into Timestream.\n Dimensions may not overlap,\n or a ValidationException
will be thrown.\n In other words, a record must contain dimensions with unique names.\n
An array of records containing the unique dimension and measure \n attributes for each time series data point.\n
", + "smithy.api#documentation": "An array of records containing the unique measure, dimension, time, and version \n attributes for each time series data point.\n
", "smithy.api#required": {} } } } + }, + "com.amazonaws.timestreamwrite#WriteRecordsResponse": { + "type": "structure", + "members": { + "RecordsIngested": { + "target": "com.amazonaws.timestreamwrite#RecordsIngested", + "traits": { + "smithy.api#documentation": "Information on the records ingested by this request.
" + } + } + } } } } diff --git a/codegen/sdk-codegen/aws-models/transcribestreaming.2017-10-26.json b/codegen/sdk-codegen/aws-models/transcribestreaming.2017-10-26.json index 15e13dbc6f6..c3bc9f9eed2 100644 --- a/codegen/sdk-codegen/aws-models/transcribestreaming.2017-10-26.json +++ b/codegen/sdk-codegen/aws-models/transcribestreaming.2017-10-26.json @@ -172,7 +172,7 @@ "Category": { "target": "com.amazonaws.transcribestreaming#String", "traits": { - "smithy.api#documentation": "The category of of information identified in this entity; for example, PII.
" + "smithy.api#documentation": "The category of information identified in this entity; for example, PII.
" } }, "Type": { @@ -235,7 +235,7 @@ "Type": { "target": "com.amazonaws.transcribestreaming#ItemType", "traits": { - "smithy.api#documentation": "The type of the item. PRONUNCIATION
indicates that the item is a word that\n was recognized in the input audio. PUNCTUATION
indicates that the item was\n interpreted as a pause in the input audio.
The type of the item. PRONUNCIATION
indicates that the item is a word\n that was recognized in the input audio. PUNCTUATION
indicates that the item\n was interpreted as a pause in the input audio.
Indicates whether a word in the item matches a word in the vocabulary filter you've chosen\n for your real-time stream. If true
then a word in the item matches your\n vocabulary filter.
Indicates whether a word in the item matches a word in the vocabulary filter you've chosen\n for your media stream. If true
then a word in the item matches your\n vocabulary filter.
If speaker identification is enabled, shows the speakers identified in the real-time\n stream.
" + "smithy.api#documentation": "If speaker identification is enabled, shows the speakers identified in the media\n stream.
" } }, "Confidence": { "target": "com.amazonaws.transcribestreaming#Confidence", "traits": { - "smithy.api#documentation": "A value between 0 and 1 for an item that is a confidence score that Amazon Transcribe assigns to each\n word or phrase that it transcribes.
" + "smithy.api#documentation": "A value between zero and one for an item that is a confidence score that Amazon Transcribe assigns to each\n word or phrase that it transcribes.
" } }, "Stable": { @@ -349,6 +349,42 @@ ] } }, + "com.amazonaws.transcribestreaming#LanguageIdentification": { + "type": "list", + "member": { + "target": "com.amazonaws.transcribestreaming#LanguageWithScore" + } + }, + "com.amazonaws.transcribestreaming#LanguageOptions": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 200 + }, + "smithy.api#pattern": "^[a-zA-Z-,]+$" + } + }, + "com.amazonaws.transcribestreaming#LanguageWithScore": { + "type": "structure", + "members": { + "LanguageCode": { + "target": "com.amazonaws.transcribestreaming#LanguageCode", + "traits": { + "smithy.api#documentation": "The language code of the language identified by Amazon Transcribe.
" + } + }, + "Score": { + "target": "com.amazonaws.transcribestreaming#Double", + "traits": { + "smithy.api#documentation": "The confidence score for the associated language code. Confidence scores are values\n between zero and one; larger values indicate a higher confidence in the identified language.\n
" + } + } + }, + "traits": { + "smithy.api#documentation": "The language codes of the identified languages and their associated confidence scores. \n The confidence score is a value between zero and one; a larger value indicates a higher \n confidence in the identified language.
" + } + }, "com.amazonaws.transcribestreaming#LimitExceededException": { "type": "structure", "members": { @@ -717,7 +753,7 @@ "Alternatives": { "target": "com.amazonaws.transcribestreaming#AlternativeList", "traits": { - "smithy.api#documentation": "A list of possible transcriptions for the audio. Each alternative typically contains one\n item
that contains the result of the transcription.
A list of possible transcriptions for the audio. Each alternative typically contains one\n item
that contains the result of the transcription.
When channel identification is enabled, Amazon Transcribe transcribes the speech from each audio\n channel separately.
\nYou can use ChannelId
to retrieve the transcription results for a single\n channel in your audio stream.
The language code of the identified language in your media stream.
" + } + }, + "LanguageIdentification": { + "target": "com.amazonaws.transcribestreaming#LanguageIdentification", + "traits": { + "smithy.api#documentation": "The language code of the dominant language identified in your media.
" + } } }, "traits": { @@ -1061,15 +1109,14 @@ "LanguageCode": { "target": "com.amazonaws.transcribestreaming#LanguageCode", "traits": { - "smithy.api#documentation": "Indicates the source language used in the input audio stream.
", - "smithy.api#httpHeader": "x-amzn-transcribe-language-code", - "smithy.api#required": {} + "smithy.api#documentation": "The language code of the input audio stream.
", + "smithy.api#httpHeader": "x-amzn-transcribe-language-code" } }, "MediaSampleRateHertz": { "target": "com.amazonaws.transcribestreaming#MediaSampleRateHertz", "traits": { - "smithy.api#documentation": "The sample rate, in Hertz, of the input audio. We suggest that you use 8,000 Hz for low\n quality audio and 16,000 Hz for high quality audio.
", + "smithy.api#documentation": "The sample rate, in Hertz (Hz), of the input audio. We suggest that you use 8,000 Hz \n for low quality audio and 16,000 Hz or higher for high quality audio.
", "smithy.api#httpHeader": "x-amzn-transcribe-sample-rate", "smithy.api#required": {} } @@ -1114,21 +1161,21 @@ "VocabularyFilterMethod": { "target": "com.amazonaws.transcribestreaming#VocabularyFilterMethod", "traits": { - "smithy.api#documentation": "The manner in which you use your vocabulary filter to filter words in your transcript.\n Remove
removes filtered words from your transcription results.\n Mask
masks filtered words with a ***
in your transcription results.\n Tag
keeps the filtered words in your transcription results and tags them. The\n tag appears as VocabularyFilterMatch
equal to True
\n
The manner in which you use your vocabulary filter to filter words in your transcript.\n Remove
removes filtered words from your transcription results.\n Mask
masks filtered words with a ***
in your transcription\n results. Tag
keeps the filtered words in your transcription results and tags \n them. The tag appears as VocabularyFilterMatch
equal to \n True
.
When true
, enables speaker identification in your real-time stream.
When true
, enables speaker identification in your media stream.
When true
, instructs Amazon Transcribe to process each audio channel separately and then\n merge the transcription output of each channel into a single transcription.
Amazon Transcribe also produces a transcription of each item. An item includes the start time, end\n time, and any alternative transcriptions.
\nYou can't set both ShowSpeakerLabel
and\n EnableChannelIdentification
in the same request. If you set both, your request\n returns a BadRequestException
.
When true
, instructs Amazon Transcribe to process each audio channel separately,\n then merges the transcription output of each channel into a single transcription.
Amazon Transcribe also produces a transcription of each item. An item includes the start time, end\n time, and any alternative transcriptions.
\nYou can't set both ShowSpeakerLabel
and\n EnableChannelIdentification
in the same request. If you set both, your request\n returns a BadRequestException
.
Set this field to PII to identify personally identifiable information (PII) in the transcription output. Content identification is performed only upon complete transcription of the audio segments.
\nYou can’t set both ContentIdentificationType
and ContentRedactionType
in the same request. If you set both, your request returns a BadRequestException
.
Set this field to PII to identify personally identifiable information (PII) in the transcription\n output. Content identification is performed only upon complete transcription of the audio\n segments.
\nYou can’t set both ContentIdentificationType
and\n ContentRedactionType
in the same request. If you set both, your request \n returns a BadRequestException
.
Set this field to PII to redact personally identifiable information (PII) in the transcription output. Content redaction is performed only upon complete transcription of the audio segments.
\nYou can’t set both ContentRedactionType
and ContentIdentificationType
in the same request. If you set both, your request returns a BadRequestException
.
Set this field to PII to redact personally identifiable information (PII) in the transcription\n output. Content redaction is performed only upon complete transcription of the audio\n segments.
\nYou can’t set both ContentRedactionType
and\n ContentIdentificationType
in the same request. If you set both, your request\n returns a BadRequestException
.
List the PII entity types you want to identify or redact. In order to specify entity types, you must have \n either ContentIdentificationType
or ContentRedactionType
enabled.
\n PiiEntityTypes
is an optional parameter with a default value of ALL
.
List the PII entity types you want to identify or redact. In order to specify entity types,\n you must have either ContentIdentificationType
or\n ContentRedactionType
enabled.
\n PIIEntityTypes
must be comma-separated; the available values are:\n BANK_ACCOUNT_NUMBER
, BANK_ROUTING
,\n CREDIT_DEBIT_NUMBER
, CREDIT_DEBIT_CVV
, \n CREDIT_DEBIT_EXPIRY
, PIN
, EMAIL
, \n ADDRESS
, NAME
, PHONE
, \n SSN
, and ALL
.
\n PiiEntityTypes
is an optional parameter with a default value of\n ALL
.
The name of the language model you want to use.
", "smithy.api#httpHeader": "x-amzn-transcribe-language-model-name" } + }, + "IdentifyLanguage": { + "target": "com.amazonaws.transcribestreaming#Boolean", + "traits": { + "smithy.api#documentation": "Optional. Set this value to true
to enable language identification for \n your media stream.
An object containing a list of languages that might be present in your audio.
\nYou must provide two or more language codes to help Amazon Transcribe identify the correct \n language of your media stream with the highest possible accuracy. You can only select one\n variant per language; for example, you can't include both en-US
and\n en-UK
in the same request.
You can only use this parameter if you've set IdentifyLanguage
to\n true
in your request.
Optional. From the subset of languages codes you provided for \n LanguageOptions
, you can select one preferred language for your \n transcription.
You can only use this parameter if you've set IdentifyLanguage
to\n true
in your request.
The language code for the input audio stream.
", + "smithy.api#documentation": "The language code of the input audio stream.
", "smithy.api#httpHeader": "x-amzn-transcribe-language-code" } }, "MediaSampleRateHertz": { "target": "com.amazonaws.transcribestreaming#MediaSampleRateHertz", "traits": { - "smithy.api#documentation": "The sample rate for the input audio stream. Use 8,000 Hz for low quality audio and 16,000 Hz\n for high quality audio.
", + "smithy.api#documentation": "The sample rate, in Hertz (Hz), for the input audio stream. Use 8,000 Hz for low quality \n audio and 16,000 Hz or higher for high quality audio.
", "smithy.api#httpHeader": "x-amzn-transcribe-sample-rate" } }, @@ -1238,14 +1306,14 @@ "VocabularyFilterName": { "target": "com.amazonaws.transcribestreaming#VocabularyFilterName", "traits": { - "smithy.api#documentation": "The name of the vocabulary filter used in your real-time stream.
", + "smithy.api#documentation": "The name of the vocabulary filter used in your media stream.
", "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-filter-name" } }, "VocabularyFilterMethod": { "target": "com.amazonaws.transcribestreaming#VocabularyFilterMethod", "traits": { - "smithy.api#documentation": "The vocabulary filtering method used in the real-time stream.
", + "smithy.api#documentation": "The vocabulary filtering method used in the media stream.
", "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-filter-method" } }, @@ -1308,8 +1376,30 @@ "LanguageModelName": { "target": "com.amazonaws.transcribestreaming#ModelName", "traits": { + "smithy.api#documentation": "The name of the language model used in your media stream.
", "smithy.api#httpHeader": "x-amzn-transcribe-language-model-name" } + }, + "IdentifyLanguage": { + "target": "com.amazonaws.transcribestreaming#Boolean", + "traits": { + "smithy.api#documentation": "The language code of the language identified in your media stream.
", + "smithy.api#httpHeader": "x-amzn-transcribe-identify-language" + } + }, + "LanguageOptions": { + "target": "com.amazonaws.transcribestreaming#LanguageOptions", + "traits": { + "smithy.api#documentation": "The language codes used in the identification of your media stream's predominant \n language.
", + "smithy.api#httpHeader": "x-amzn-transcribe-language-options" + } + }, + "PreferredLanguage": { + "target": "com.amazonaws.transcribestreaming#LanguageCode", + "traits": { + "smithy.api#documentation": "The preferred language you specified in your request.
", + "smithy.api#httpHeader": "x-amzn-transcribe-preferred-language" + } } } }, @@ -1318,15 +1408,6 @@ }, "com.amazonaws.transcribestreaming#Transcribe": { "type": "service", - "version": "2017-10-26", - "operations": [ - { - "target": "com.amazonaws.transcribestreaming#StartMedicalStreamTranscription" - }, - { - "target": "com.amazonaws.transcribestreaming#StartStreamTranscription" - } - ], "traits": { "aws.api#service": { "sdkId": "Transcribe Streaming", @@ -1341,7 +1422,16 @@ "aws.protocols#restJson1": {}, "smithy.api#documentation": "Operations and objects for transcribing streaming speech to text.
", "smithy.api#title": "Amazon Transcribe Streaming Service" - } + }, + "version": "2017-10-26", + "operations": [ + { + "target": "com.amazonaws.transcribestreaming#StartMedicalStreamTranscription" + }, + { + "target": "com.amazonaws.transcribestreaming#StartStreamTranscription" + } + ] }, "com.amazonaws.transcribestreaming#Transcript": { "type": "structure", @@ -1377,7 +1467,7 @@ "TranscriptEvent": { "target": "com.amazonaws.transcribestreaming#TranscriptEvent", "traits": { - "smithy.api#documentation": "A portion of the transcription of the audio stream. Events are sent periodically from\n Amazon Transcribe to your application. The event can be a partial transcription of a section of the audio\n stream, or it can be the entire transcription of that portion of the audio stream.\n
" + "smithy.api#documentation": "A portion of the transcription of the audio stream. Events are sent periodically from\n Amazon Transcribe to your application. The event can be a partial transcription of a section of the audio\n stream, or it can be the entire transcription of that portion of the audio stream.
" } }, "BadRequestException": { diff --git a/codegen/sdk-codegen/aws-models/translate.2017-07-01.json b/codegen/sdk-codegen/aws-models/translate.2017-07-01.json index 157a7697d03..8ed011407a4 100644 --- a/codegen/sdk-codegen/aws-models/translate.2017-07-01.json +++ b/codegen/sdk-codegen/aws-models/translate.2017-07-01.json @@ -445,14 +445,14 @@ "Type": { "target": "com.amazonaws.translate#EncryptionKeyType", "traits": { - "smithy.api#documentation": "The type of encryption key used by Amazon Translate to encrypt custom terminologies.
", + "smithy.api#documentation": "The type of encryption key used by Amazon Translate to encrypt this object.
", "smithy.api#required": {} } }, "Id": { "target": "com.amazonaws.translate#EncryptionKeyID", "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) of the encryption key being used to encrypt the custom\n terminology.
", + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the encryption key being used to encrypt this object.
", "smithy.api#required": {} } } @@ -532,7 +532,7 @@ "DataLocation": { "target": "com.amazonaws.translate#ParallelDataDataLocation", "traits": { - "smithy.api#documentation": "The Amazon S3 location of the most recent parallel data input file that was successfully\n imported into Amazon Translate. The location is returned as a presigned URL that has a 30\n minute expiration.
\n \nAmazon Translate doesn't scan parallel data input files for the risk of CSV injection\n attacks.
\nCSV injection occurs when a .csv or .tsv file is altered so that a record contains\n malicious code. The record begins with a special character, such as =, +, -, or @. When the\n file is opened in a spreadsheet program, the program might interpret the record as a formula\n and run the code within it.
\nBefore you download a parallel data input file from Amazon S3, ensure that you recognize the file and trust its creator.
\nThe Amazon S3 location of the most recent parallel data input file that was successfully\n imported into Amazon Translate. The location is returned as a presigned URL that has a 30\n minute expiration.
\n \nAmazon Translate doesn't scan all input files for the risk of CSV injection\n attacks.
\nCSV injection occurs when a .csv or .tsv file is altered so that a record contains\n malicious code. The record begins with a special character, such as =, +, -, or @. When the\n file is opened in a spreadsheet program, the program might interpret the record as a formula\n and run the code within it.
\nBefore you download an input file from Amazon S3, ensure that you recognize the file and trust its creator.
\nThe data location of the custom terminology being retrieved. The custom terminology file\n is returned in a presigned url that has a 30 minute expiration.
" + "smithy.api#documentation": "The Amazon S3 location of the most recent custom terminology input file that was\n successfully imported into Amazon Translate. The location is returned as a presigned URL that\n has a 30 minute expiration.
\n \nAmazon Translate doesn't scan all input files for the risk of CSV injection\n attacks.
\nCSV injection occurs when a .csv or .tsv file is altered so that a record contains\n malicious code. The record begins with a special character, such as =, +, -, or @. When the\n file is opened in a spreadsheet program, the program might interpret the record as a formula\n and run the code within it.
\nBefore you download an input file from Amazon S3, ensure that you recognize the file and trust its creator.
\nThe Amazon S3 location of the parallel data input file. The location is returned as a\n presigned URL to that has a 30 minute expiration.
\n \nAmazon Translate doesn't scan parallel data input files for the risk of CSV injection\n attacks.
\nCSV injection occurs when a .csv or .tsv file is altered so that a record contains\n malicious code. The record begins with a special character, such as =, +, -, or @. When the\n file is opened in a spreadsheet program, the program might interpret the record as a formula\n and run the code within it.
\nBefore you download a parallel data input file from Amazon S3, ensure that you recognize the file and trust its creator.
\nThe Amazon S3 location of the parallel data input file. The location is returned as a\n presigned URL to that has a 30 minute expiration.
\n \nAmazon Translate doesn't scan all input files for the risk of CSV injection\n attacks.
\nCSV injection occurs when a .csv or .tsv file is altered so that a record contains\n malicious code. The record begins with a special character, such as =, +, -, or @. When the\n file is opened in a spreadsheet program, the program might interpret the record as a formula\n and run the code within it.
\nBefore you download an input file from Amazon S3, ensure that you recognize the file and trust its creator.
\nSettings to configure your translation output, including the option to mask profane words\n and phrases.
" + } } } }, @@ -1694,7 +1711,7 @@ "Location": { "target": "com.amazonaws.translate#String", "traits": { - "smithy.api#documentation": "The location of the custom terminology data.
", + "smithy.api#documentation": "The Amazon S3 location of the most recent custom terminology input file that was\n successfully imported into Amazon Translate. The location is returned as a presigned URL that\n has a 30 minute expiration.
\n \nAmazon Translate doesn't scan all input files for the risk of CSV injection\n attacks.
\nCSV injection occurs when a .csv or .tsv file is altered so that a record contains\n malicious code. The record begins with a special character, such as =, +, -, or @. When the\n file is opened in a spreadsheet program, the program might interpret the record as a formula\n and run the code within it.
\nBefore you download an input file from Amazon S3, ensure that you recognize the file and trust its creator.
\nThe Amazon Resource Name (ARN) of an AWS Identity Access and Management (IAM) role\n that granted Amazon Translate read access to the job's input data.
" } + }, + "Settings": { + "target": "com.amazonaws.translate#TranslationSettings", + "traits": { + "smithy.api#documentation": "Settings that configure the translation output.
" + } } }, "traits": { @@ -2037,6 +2060,12 @@ "smithy.api#documentation": "The language code requested for the language of the target text. The language must be a\n language supported by Amazon Translate.
", "smithy.api#required": {} } + }, + "Settings": { + "target": "com.amazonaws.translate#TranslationSettings", + "traits": { + "smithy.api#documentation": "Settings to configure your translation output, including the option to mask profane words\n and phrases.
" + } } } }, @@ -2069,7 +2098,27 @@ "traits": { "smithy.api#documentation": "The names of the custom terminologies applied to the input text by Amazon Translate for the\n translated text response.
" } + }, + "AppliedSettings": { + "target": "com.amazonaws.translate#TranslationSettings", + "traits": { + "smithy.api#documentation": "Settings that configure the translation output.
" + } + } + } + }, + "com.amazonaws.translate#TranslationSettings": { + "type": "structure", + "members": { + "Profanity": { + "target": "com.amazonaws.translate#Profanity", + "traits": { + "smithy.api#documentation": "Enable the profanity setting if you want Amazon Translate to mask profane words and\n phrases in your translation output.
\nTo mask profane words and phrases, Amazon Translate replaces them with the grawlix string\n “?$#@$“. This 5-character sequence is used for each profane word or phrase, regardless of the\n length or number of words.
\nAmazon Translate does not detect profanity in all of its supported languages. For\n languages that support profanity detection, see Supported\n Languages and Language Codes in the Amazon Translate Developer Guide.
" + } } + }, + "traits": { + "smithy.api#documentation": "Settings that configure the translation output.
" } }, "com.amazonaws.translate#UnboundedLengthString": { diff --git a/codegen/sdk-codegen/aws-models/wellarchitected.2020-03-31.json b/codegen/sdk-codegen/aws-models/wellarchitected.2020-03-31.json index 785733f6165..588e29f5f71 100644 --- a/codegen/sdk-codegen/aws-models/wellarchitected.2020-03-31.json +++ b/codegen/sdk-codegen/aws-models/wellarchitected.2020-03-31.json @@ -66,6 +66,12 @@ "HelpfulResourceUrl": { "target": "com.amazonaws.wellarchitected#HelpfulResourceUrl" }, + "HelpfulResourceDisplayText": { + "target": "com.amazonaws.wellarchitected#DisplayText", + "traits": { + "smithy.api#documentation": "The helpful resource text to be displayed.
" + } + }, "Choices": { "target": "com.amazonaws.wellarchitected#Choices" }, @@ -201,7 +207,7 @@ } ], "traits": { - "smithy.api#documentation": "Associate a lens to a workload.
", + "smithy.api#documentation": "Associate a lens to a workload.
\nUp to 10 lenses can be associated with a workload in a single API operation. A \n maximum of 20 lenses can be associated with a workload.
\n\n Disclaimer\n
\nBy accessing and/or applying custom lenses created by another Amazon Web Services user or account, \n you acknowledge that custom lenses created by other users and shared with you are \n Third Party Content as defined in the Amazon Web Services Customer Agreement.
\nAn AWS account ID.
", + "smithy.api#documentation": "An Amazon Web Services account ID.
", "smithy.api#pattern": "^[0-9]{12}$" } }, "com.amazonaws.wellarchitected#AwsRegion": { "type": "string", "traits": { - "smithy.api#documentation": "An AWS Region, for example, us-west-2
or\n ap-northeast-1
.
An Amazon Web Services Region, for example, us-west-2
or\n ap-northeast-1
.
The choice level helpful resource.
" + } + }, + "ImprovementPlan": { + "target": "com.amazonaws.wellarchitected#ChoiceContent", + "traits": { + "smithy.api#documentation": "The choice level improvement plan.
" + } } }, "traits": { @@ -334,6 +352,44 @@ "target": "com.amazonaws.wellarchitected#ChoiceAnswer" } }, + "com.amazonaws.wellarchitected#ChoiceContent": { + "type": "structure", + "members": { + "DisplayText": { + "target": "com.amazonaws.wellarchitected#ChoiceContentDisplayText", + "traits": { + "smithy.api#documentation": "The display text for the choice content.
" + } + }, + "Url": { + "target": "com.amazonaws.wellarchitected#ChoiceContentUrl", + "traits": { + "smithy.api#documentation": "The URL for the choice content.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The choice content.
" + } + }, + "com.amazonaws.wellarchitected#ChoiceContentDisplayText": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + } + } + }, + "com.amazonaws.wellarchitected#ChoiceContentUrl": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + } + } + }, "com.amazonaws.wellarchitected#ChoiceDescription": { "type": "string", "traits": { @@ -354,6 +410,32 @@ } } }, + "com.amazonaws.wellarchitected#ChoiceImprovementPlan": { + "type": "structure", + "members": { + "ChoiceId": { + "target": "com.amazonaws.wellarchitected#ChoiceId" + }, + "DisplayText": { + "target": "com.amazonaws.wellarchitected#DisplayText", + "traits": { + "smithy.api#documentation": "The display text for the improvement plan.
" + } + }, + "ImprovementPlanUrl": { + "target": "com.amazonaws.wellarchitected#ImprovementPlanUrl" + } + }, + "traits": { + "smithy.api#documentation": "The choice level improvement plan.
" + } + }, + "com.amazonaws.wellarchitected#ChoiceImprovementPlans": { + "type": "list", + "member": { + "target": "com.amazonaws.wellarchitected#ChoiceImprovementPlan" + } + }, "com.amazonaws.wellarchitected#ChoiceNotes": { "type": "string", "traits": { @@ -467,7 +549,7 @@ "com.amazonaws.wellarchitected#ClientRequestToken": { "type": "string", "traits": { - "smithy.api#documentation": "A unique case-sensitive string used to ensure that this request is idempotent\n (executes only once).
\nYou should not reuse the same token for other requests. If you retry a request with\n the same client request token and the same parameters after it has completed\n successfully, the result of the original request is returned.
\nThis token is listed as required, however, if you do not specify it, the AWS SDKs\n automatically generate one for you. If you are not using the AWS SDK or the AWS CLI,\n you must provide this token or the request will fail.
\nA unique case-sensitive string used to ensure that this request is idempotent\n (executes only once).
\nYou should not reuse the same token for other requests. If you retry a request with\n the same client request token and the same parameters after it has completed\n successfully, the result of the original request is returned.
\nThis token is listed as required, however, if you do not specify it, the Amazon Web Services SDKs\n automatically generate one for you. If you are not using the Amazon Web Services SDK or the CLI,\n you must provide this token or the request will fail.
\nCreate a lens share.
\nThe owner of a lens can share it with other Amazon Web Services accounts and IAM users in the same Amazon Web Services Region. \n Shared access to a lens is not removed until the lens invitation is deleted.
\n\n Disclaimer\n
\nBy sharing your custom lenses with other Amazon Web Services accounts, \n you acknowledge that Amazon Web Services will make your custom lenses available to those \n other accounts. Those other accounts may continue to access and use your \n shared custom lenses even if you delete the custom lenses \n from your own Amazon Web Services account or terminate \n your Amazon Web Services account.
\nCreate a new lens version.
\nA lens can have up to 100 versions.
\nAfter a lens has been imported, create a new lens version to publish it. The owner of a lens can share the lens with other \n Amazon Web Services accounts and IAM users in the same Amazon Web Services Region. Only the owner of a lens can delete it.\n
", + "smithy.api#http": { + "method": "POST", + "uri": "/lenses/{LensAlias}/versions", + "code": 200 + } + } + }, + "com.amazonaws.wellarchitected#CreateLensVersionInput": { + "type": "structure", + "members": { + "LensAlias": { + "target": "com.amazonaws.wellarchitected#LensAlias", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "LensVersion": { + "target": "com.amazonaws.wellarchitected#LensVersion", + "traits": { + "smithy.api#documentation": "The version of the lens being created.
", + "smithy.api#required": {} + } + }, + "IsMajorVersion": { + "target": "com.amazonaws.wellarchitected#IsMajorVersion", + "traits": { + "smithy.api#documentation": "Set to true if this new major lens version.
" + } + }, + "ClientRequestToken": { + "target": "com.amazonaws.wellarchitected#ClientRequestToken", + "traits": { + "smithy.api#idempotencyToken": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.wellarchitected#CreateLensVersionOutput": { + "type": "structure", + "members": { + "LensArn": { + "target": "com.amazonaws.wellarchitected#LensArn", + "traits": { + "smithy.api#documentation": "The ARN for the lens.
" + } + }, + "LensVersion": { + "target": "com.amazonaws.wellarchitected#LensVersion", + "traits": { + "smithy.api#documentation": "The version of the lens.
" + } + } + } + }, "com.amazonaws.wellarchitected#CreateMilestone": { "type": "operation", "input": { @@ -618,7 +862,7 @@ } ], "traits": { - "smithy.api#documentation": "Create a new workload.
\nThe owner of a workload can share the workload with other AWS accounts and IAM users\n in the same AWS Region. Only the owner of a workload can delete it.
\nFor more information, see Defining a Workload in the\n AWS Well-Architected Tool User Guide.
", + "smithy.api#documentation": "Create a new workload.
\nThe owner of a workload can share the workload with other Amazon Web Services accounts and IAM users\n in the same Amazon Web Services Region. Only the owner of a workload can delete it.
\nFor more information, see Defining a Workload in the\n Well-Architected Tool User Guide.
", "smithy.api#http": { "method": "POST", "uri": "/workloads", @@ -747,7 +991,7 @@ } ], "traits": { - "smithy.api#documentation": "Create a workload share.
\nThe owner of a workload can share it with other AWS accounts and IAM users in the same\n AWS Region. Shared access to a workload is not removed until the workload invitation is\n deleted.
\nFor more information, see Sharing a Workload in the\n AWS Well-Architected Tool User Guide.
", + "smithy.api#documentation": "Create a workload share.
\nThe owner of a workload can share it with other Amazon Web Services accounts and IAM users in the same\n Amazon Web Services Region. Shared access to a workload is not removed until the workload invitation is\n deleted.
\nFor more information, see Sharing a Workload in the\n Well-Architected Tool User Guide.
", "smithy.api#http": { "method": "POST", "uri": "/workloads/{WorkloadId}/shares", @@ -803,10 +1047,10 @@ "smithy.api#documentation": "Input for Create Workload Share
" } }, - "com.amazonaws.wellarchitected#DeleteWorkload": { + "com.amazonaws.wellarchitected#DeleteLens": { "type": "operation", "input": { - "target": "com.amazonaws.wellarchitected#DeleteWorkloadInput" + "target": "com.amazonaws.wellarchitected#DeleteLensInput" }, "errors": [ { @@ -829,19 +1073,19 @@ } ], "traits": { - "smithy.api#documentation": "Delete an existing workload.
", + "smithy.api#documentation": "Delete an existing lens.
\nOnly the owner of a lens can delete it. After the lens is deleted, Amazon Web Services accounts and IAM users \n that you shared the lens with can continue to use it, but they will no longer be able to apply it to new workloads.\n
\n\n Disclaimer\n
\nBy sharing your custom lenses with other Amazon Web Services accounts, \n you acknowledge that Amazon Web Services will make your custom lenses available to those \n other accounts. Those other accounts may continue to access and use your \n shared custom lenses even if you delete the custom lenses \n from your own Amazon Web Services account or terminate \n your Amazon Web Services account.
\nThe status of the lens to be deleted.
", + "smithy.api#httpQuery": "LensStatus", + "smithy.api#required": {} + } } - }, - "traits": { - "smithy.api#documentation": "Input for workload deletion.
" } }, - "com.amazonaws.wellarchitected#DeleteWorkloadShare": { + "com.amazonaws.wellarchitected#DeleteLensShare": { "type": "operation", "input": { - "target": "com.amazonaws.wellarchitected#DeleteWorkloadShareInput" + "target": "com.amazonaws.wellarchitected#DeleteLensShareInput" }, "errors": [ { @@ -886,15 +1135,15 @@ } ], "traits": { - "smithy.api#documentation": "Delete a workload share.
", + "smithy.api#documentation": "Delete a lens share.
\nAfter the lens share is deleted, Amazon Web Services accounts and IAM users \n that you shared the lens with can continue to use it, but they will no longer be able to apply it to new workloads.
\n\n Disclaimer\n
\nBy sharing your custom lenses with other Amazon Web Services accounts, \n you acknowledge that Amazon Web Services will make your custom lenses available to those \n other accounts. Those other accounts may continue to access and use your \n shared custom lenses even if you delete the custom lenses \n from your own Amazon Web Services account or terminate \n your Amazon Web Services account.
\nInput for Delete Workload Share
" - } - }, - "com.amazonaws.wellarchitected#DifferenceStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "UPDATED", - "name": "UPDATED" - }, - { - "value": "NEW", - "name": "NEW" - }, - { - "value": "DELETED", - "name": "DELETED" - } - ] } }, - "com.amazonaws.wellarchitected#DisassociateLenses": { + "com.amazonaws.wellarchitected#DeleteWorkload": { "type": "operation", "input": { - "target": "com.amazonaws.wellarchitected#DisassociateLensesInput" + "target": "com.amazonaws.wellarchitected#DeleteWorkloadInput" }, "errors": [ { @@ -969,15 +1196,155 @@ } ], "traits": { - "smithy.api#documentation": "Disassociate a lens from a workload.
\nThe AWS Well-Architected Framework lens (wellarchitected
) cannot be\n removed from a workload.
Delete an existing workload.
", "smithy.api#http": { - "method": "PATCH", - "uri": "/workloads/{WorkloadId}/disassociateLenses", + "method": "DELETE", + "uri": "/workloads/{WorkloadId}", "code": 200 } } }, - "com.amazonaws.wellarchitected#DisassociateLensesInput": { + "com.amazonaws.wellarchitected#DeleteWorkloadInput": { + "type": "structure", + "members": { + "WorkloadId": { + "target": "com.amazonaws.wellarchitected#WorkloadId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ClientRequestToken": { + "target": "com.amazonaws.wellarchitected#ClientRequestToken", + "traits": { + "smithy.api#httpQuery": "ClientRequestToken", + "smithy.api#idempotencyToken": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Input for workload deletion.
" + } + }, + "com.amazonaws.wellarchitected#DeleteWorkloadShare": { + "type": "operation", + "input": { + "target": "com.amazonaws.wellarchitected#DeleteWorkloadShareInput" + }, + "errors": [ + { + "target": "com.amazonaws.wellarchitected#AccessDeniedException" + }, + { + "target": "com.amazonaws.wellarchitected#ConflictException" + }, + { + "target": "com.amazonaws.wellarchitected#InternalServerException" + }, + { + "target": "com.amazonaws.wellarchitected#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wellarchitected#ThrottlingException" + }, + { + "target": "com.amazonaws.wellarchitected#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Delete a workload share.
", + "smithy.api#http": { + "method": "DELETE", + "uri": "/workloads/{WorkloadId}/shares/{ShareId}", + "code": 200 + } + } + }, + "com.amazonaws.wellarchitected#DeleteWorkloadShareInput": { + "type": "structure", + "members": { + "ShareId": { + "target": "com.amazonaws.wellarchitected#ShareId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "WorkloadId": { + "target": "com.amazonaws.wellarchitected#WorkloadId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ClientRequestToken": { + "target": "com.amazonaws.wellarchitected#ClientRequestToken", + "traits": { + "smithy.api#httpQuery": "ClientRequestToken", + "smithy.api#idempotencyToken": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Input for Delete Workload Share
" + } + }, + "com.amazonaws.wellarchitected#DifferenceStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "UPDATED", + "name": "UPDATED" + }, + { + "value": "NEW", + "name": "NEW" + }, + { + "value": "DELETED", + "name": "DELETED" + } + ] + } + }, + "com.amazonaws.wellarchitected#DisassociateLenses": { + "type": "operation", + "input": { + "target": "com.amazonaws.wellarchitected#DisassociateLensesInput" + }, + "errors": [ + { + "target": "com.amazonaws.wellarchitected#AccessDeniedException" + }, + { + "target": "com.amazonaws.wellarchitected#ConflictException" + }, + { + "target": "com.amazonaws.wellarchitected#InternalServerException" + }, + { + "target": "com.amazonaws.wellarchitected#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wellarchitected#ThrottlingException" + }, + { + "target": "com.amazonaws.wellarchitected#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Disassociate a lens from a workload.
\nUp to 10 lenses can be disassociated from a workload in a single API operation.
\nThe Amazon Web Services Well-Architected Framework lens (wellarchitected
) cannot be\n removed from a workload.
Input to disassociate lens reviews.
" } }, + "com.amazonaws.wellarchitected#DisplayText": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + } + } + }, "com.amazonaws.wellarchitected#ExceptionMessage": { "type": "string", "traits": { @@ -1016,6 +1392,70 @@ "smithy.api#documentation": "Type of the resource affected.
" } }, + "com.amazonaws.wellarchitected#ExportLens": { + "type": "operation", + "input": { + "target": "com.amazonaws.wellarchitected#ExportLensInput" + }, + "output": { + "target": "com.amazonaws.wellarchitected#ExportLensOutput" + }, + "errors": [ + { + "target": "com.amazonaws.wellarchitected#AccessDeniedException" + }, + { + "target": "com.amazonaws.wellarchitected#InternalServerException" + }, + { + "target": "com.amazonaws.wellarchitected#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wellarchitected#ThrottlingException" + }, + { + "target": "com.amazonaws.wellarchitected#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Export an existing lens.
\nLenses are defined in JSON. For more information, see JSON format specification \n in the Well-Architected Tool User Guide. Only the owner of a lens can export it. \n
\n\n Disclaimer\n
\nDo not include or gather personal identifiable information (PII) of end users or \n other identifiable individuals in or via your custom lenses. If your custom \n lens or those shared with you and used in your account do include or collect \n PII you are responsible for: ensuring that the included PII is processed in accordance \n with applicable law, providing adequate privacy notices, and obtaining necessary \n consents for processing such data.
\nThe lens version to be exported.
", + "smithy.api#httpQuery": "LensVersion" + } + } + } + }, + "com.amazonaws.wellarchitected#ExportLensOutput": { + "type": "structure", + "members": { + "LensJSON": { + "target": "com.amazonaws.wellarchitected#LensJSON", + "traits": { + "smithy.api#documentation": "The JSON for the lens.
" + } + } + } + }, "com.amazonaws.wellarchitected#GetAnswer": { "type": "operation", "input": { @@ -1097,6 +1537,12 @@ "LensAlias": { "target": "com.amazonaws.wellarchitected#LensAlias" }, + "LensArn": { + "target": "com.amazonaws.wellarchitected#LensArn", + "traits": { + "smithy.api#documentation": "The ARN for the lens.
" + } + }, "Answer": { "target": "com.amazonaws.wellarchitected#Answer" } @@ -1105,6 +1551,70 @@ "smithy.api#documentation": "Output of a get answer call.
" } }, + "com.amazonaws.wellarchitected#GetLens": { + "type": "operation", + "input": { + "target": "com.amazonaws.wellarchitected#GetLensInput" + }, + "output": { + "target": "com.amazonaws.wellarchitected#GetLensOutput" + }, + "errors": [ + { + "target": "com.amazonaws.wellarchitected#AccessDeniedException" + }, + { + "target": "com.amazonaws.wellarchitected#InternalServerException" + }, + { + "target": "com.amazonaws.wellarchitected#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wellarchitected#ThrottlingException" + }, + { + "target": "com.amazonaws.wellarchitected#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Get an existing lens.
", + "smithy.api#http": { + "method": "GET", + "uri": "/lenses/{LensAlias}", + "code": 200 + } + } + }, + "com.amazonaws.wellarchitected#GetLensInput": { + "type": "structure", + "members": { + "LensAlias": { + "target": "com.amazonaws.wellarchitected#LensAlias", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "LensVersion": { + "target": "com.amazonaws.wellarchitected#LensVersion", + "traits": { + "smithy.api#documentation": "The lens version to be retrieved.
", + "smithy.api#httpQuery": "LensVersion" + } + } + } + }, + "com.amazonaws.wellarchitected#GetLensOutput": { + "type": "structure", + "members": { + "Lens": { + "target": "com.amazonaws.wellarchitected#Lens", + "traits": { + "smithy.api#documentation": "A lens return object.
" + } + } + } + }, "com.amazonaws.wellarchitected#GetLensReview": { "type": "operation", "input": { @@ -1311,8 +1821,14 @@ "target": "com.amazonaws.wellarchitected#LensVersion", "traits": { "smithy.api#documentation": "The base version of the lens.
", - "smithy.api#httpQuery": "BaseLensVersion", - "smithy.api#required": {} + "smithy.api#httpQuery": "BaseLensVersion" + } + }, + "TargetLensVersion": { + "target": "com.amazonaws.wellarchitected#LensVersion", + "traits": { + "smithy.api#documentation": "The lens version to target a difference for.
", + "smithy.api#httpQuery": "TargetLensVersion" } } } @@ -1323,12 +1839,24 @@ "LensAlias": { "target": "com.amazonaws.wellarchitected#LensAlias" }, + "LensArn": { + "target": "com.amazonaws.wellarchitected#LensArn", + "traits": { + "smithy.api#documentation": "The ARN for the lens.
" + } + }, "BaseLensVersion": { "target": "com.amazonaws.wellarchitected#LensVersion", "traits": { "smithy.api#documentation": "The base version of the lens.
" } }, + "TargetLensVersion": { + "target": "com.amazonaws.wellarchitected#LensVersion", + "traits": { + "smithy.api#documentation": "The target lens version for the lens.
" + } + }, "LatestLensVersion": { "target": "com.amazonaws.wellarchitected#LensVersion", "traits": { @@ -1480,6 +2008,110 @@ } } }, + "com.amazonaws.wellarchitected#ImportLens": { + "type": "operation", + "input": { + "target": "com.amazonaws.wellarchitected#ImportLensInput" + }, + "output": { + "target": "com.amazonaws.wellarchitected#ImportLensOutput" + }, + "errors": [ + { + "target": "com.amazonaws.wellarchitected#AccessDeniedException" + }, + { + "target": "com.amazonaws.wellarchitected#ConflictException" + }, + { + "target": "com.amazonaws.wellarchitected#InternalServerException" + }, + { + "target": "com.amazonaws.wellarchitected#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wellarchitected#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.wellarchitected#ThrottlingException" + }, + { + "target": "com.amazonaws.wellarchitected#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Import a new lens.
\nThe lens cannot be applied to workloads or shared with other Amazon Web Services accounts\n until it's published with CreateLensVersion\n
\nLenses are defined in JSON. For more information, see JSON format specification \n in the Well-Architected Tool User Guide.
\nA custom lens cannot exceed 500 KB in size.
\n \n\n Disclaimer\n
\nDo not include or gather personal identifiable information (PII) of end users or \n other identifiable individuals in or via your custom lenses. If your custom \n lens or those shared with you and used in your account do include or collect \n PII you are responsible for: ensuring that the included PII is processed in accordance \n with applicable law, providing adequate privacy notices, and obtaining necessary \n consents for processing such data.
\nThe JSON representation of a lens.
", + "smithy.api#required": {} + } + }, + "ClientRequestToken": { + "target": "com.amazonaws.wellarchitected#ClientRequestToken", + "traits": { + "smithy.api#idempotencyToken": {}, + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.wellarchitected#TagMap", + "traits": { + "smithy.api#documentation": "Tags to associate to a lens.
" + } + } + } + }, + "com.amazonaws.wellarchitected#ImportLensOutput": { + "type": "structure", + "members": { + "LensArn": { + "target": "com.amazonaws.wellarchitected#LensArn", + "traits": { + "smithy.api#documentation": "The ARN for the lens.
" + } + }, + "Status": { + "target": "com.amazonaws.wellarchitected#ImportLensStatus", + "traits": { + "smithy.api#documentation": "The status of the imported lens.
" + } + } + } + }, + "com.amazonaws.wellarchitected#ImportLensStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "IN_PROGRESS", + "name": "IN_PROGRESS" + }, + { + "value": "COMPLETE", + "name": "COMPLETE" + }, + { + "value": "ERROR", + "name": "ERROR" + } + ] + } + }, "com.amazonaws.wellarchitected#ImprovementPlanUrl": { "type": "string", "traits": { @@ -1516,6 +2148,12 @@ }, "ImprovementPlanUrl": { "target": "com.amazonaws.wellarchitected#ImprovementPlanUrl" + }, + "ImprovementPlans": { + "target": "com.amazonaws.wellarchitected#ChoiceImprovementPlans", + "traits": { + "smithy.api#documentation": "The improvement plan details.
" + } } }, "traits": { @@ -1533,7 +2171,7 @@ } }, "traits": { - "smithy.api#documentation": "There is a problem with the AWS Well-Architected Tool API service.
", + "smithy.api#documentation": "There is a problem with the Well-Architected Tool API service.
", "smithy.api#error": "server", "smithy.api#httpError": 500 } @@ -1544,16 +2182,57 @@ "smithy.api#documentation": "Defines whether this question is applicable to a lens review.
" } }, + "com.amazonaws.wellarchitected#IsMajorVersion": { + "type": "boolean" + }, "com.amazonaws.wellarchitected#IsReviewOwnerUpdateAcknowledged": { "type": "boolean" }, + "com.amazonaws.wellarchitected#Lens": { + "type": "structure", + "members": { + "LensArn": { + "target": "com.amazonaws.wellarchitected#LensArn", + "traits": { + "smithy.api#documentation": "The ARN of a lens.
" + } + }, + "LensVersion": { + "target": "com.amazonaws.wellarchitected#LensVersion", + "traits": { + "smithy.api#documentation": "The version of a lens.
" + } + }, + "Name": { + "target": "com.amazonaws.wellarchitected#LensName" + }, + "Description": { + "target": "com.amazonaws.wellarchitected#LensDescription" + }, + "Owner": { + "target": "com.amazonaws.wellarchitected#LensOwner", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID that owns the lens.
" + } + }, + "ShareInvitationId": { + "target": "com.amazonaws.wellarchitected#ShareInvitationId", + "traits": { + "smithy.api#documentation": "The ID assigned to the share invitation.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A lens return object.
" + } + }, "com.amazonaws.wellarchitected#LensAlias": { "type": "string", "traits": { "smithy.api#documentation": "The alias of the lens, for example, serverless
.
Each lens is identified by its LensSummary$LensAlias.
", "smithy.api#length": { "min": 1, - "max": 64 + "max": 128 } } }, @@ -1563,12 +2242,15 @@ "target": "com.amazonaws.wellarchitected#LensAlias" }, "traits": { - "smithy.api#documentation": "List of lens aliases to associate or disassociate with a workload.
\nIdentify a lens using its LensSummary$LensAlias.
", + "smithy.api#documentation": "List of lens aliases to associate or disassociate with a workload. Up to 10 lenses can be specified.
\nIdentify a lens using its LensSummary$LensAlias.
", "smithy.api#length": { "min": 1 } } }, + "com.amazonaws.wellarchitected#LensArn": { + "type": "string" + }, "com.amazonaws.wellarchitected#LensDescription": { "type": "string", "traits": { @@ -1579,6 +2261,15 @@ } } }, + "com.amazonaws.wellarchitected#LensJSON": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 2, + "max": 500000 + } + } + }, "com.amazonaws.wellarchitected#LensName": { "type": "string", "traits": { @@ -1589,12 +2280,30 @@ } } }, + "com.amazonaws.wellarchitected#LensNamePrefix": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, + "com.amazonaws.wellarchitected#LensOwner": { + "type": "string" + }, "com.amazonaws.wellarchitected#LensReview": { "type": "structure", "members": { "LensAlias": { "target": "com.amazonaws.wellarchitected#LensAlias" }, + "LensArn": { + "target": "com.amazonaws.wellarchitected#LensArn", + "traits": { + "smithy.api#documentation": "The ARN for the lens.
" + } + }, "LensVersion": { "target": "com.amazonaws.wellarchitected#LensVersion", "traits": { @@ -1636,6 +2345,12 @@ "LensAlias": { "target": "com.amazonaws.wellarchitected#LensAlias" }, + "LensArn": { + "target": "com.amazonaws.wellarchitected#LensArn", + "traits": { + "smithy.api#documentation": "The ARN for the lens.
" + } + }, "Base64String": { "target": "com.amazonaws.wellarchitected#Base64String" } @@ -1659,6 +2374,12 @@ "LensAlias": { "target": "com.amazonaws.wellarchitected#LensAlias" }, + "LensArn": { + "target": "com.amazonaws.wellarchitected#LensArn", + "traits": { + "smithy.api#documentation": "The ARN for the lens.
" + } + }, "LensVersion": { "target": "com.amazonaws.wellarchitected#LensVersion", "traits": { @@ -1674,15 +2395,38 @@ "smithy.api#documentation": "The status of the lens.
" } }, - "UpdatedAt": { - "target": "com.amazonaws.wellarchitected#Timestamp" + "UpdatedAt": { + "target": "com.amazonaws.wellarchitected#Timestamp" + }, + "RiskCounts": { + "target": "com.amazonaws.wellarchitected#RiskCounts" + } + }, + "traits": { + "smithy.api#documentation": "A lens review summary of a workload.
" + } + }, + "com.amazonaws.wellarchitected#LensShareSummaries": { + "type": "list", + "member": { + "target": "com.amazonaws.wellarchitected#LensShareSummary" + } + }, + "com.amazonaws.wellarchitected#LensShareSummary": { + "type": "structure", + "members": { + "ShareId": { + "target": "com.amazonaws.wellarchitected#ShareId" + }, + "SharedWith": { + "target": "com.amazonaws.wellarchitected#SharedWith" }, - "RiskCounts": { - "target": "com.amazonaws.wellarchitected#RiskCounts" + "Status": { + "target": "com.amazonaws.wellarchitected#ShareStatus" } }, "traits": { - "smithy.api#documentation": "A lens review summary of a workload.
" + "smithy.api#documentation": "A lens share summary return object.
" } }, "com.amazonaws.wellarchitected#LensStatus": { @@ -1700,6 +2444,33 @@ { "value": "DEPRECATED", "name": "DEPRECATED" + }, + { + "value": "DELETED", + "name": "DELETED" + }, + { + "value": "UNSHARED", + "name": "UNSHARED" + } + ] + } + }, + "com.amazonaws.wellarchitected#LensStatusType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ALL", + "name": "ALL" + }, + { + "value": "DRAFT", + "name": "DRAFT" + }, + { + "value": "PUBLISHED", + "name": "PUBLISHED" } ] } @@ -1716,26 +2487,72 @@ "com.amazonaws.wellarchitected#LensSummary": { "type": "structure", "members": { + "LensArn": { + "target": "com.amazonaws.wellarchitected#LensArn", + "traits": { + "smithy.api#documentation": "The ARN of the lens.
" + } + }, "LensAlias": { "target": "com.amazonaws.wellarchitected#LensAlias" }, + "LensName": { + "target": "com.amazonaws.wellarchitected#LensName" + }, + "LensType": { + "target": "com.amazonaws.wellarchitected#LensType", + "traits": { + "smithy.api#documentation": "The type of the lens.
" + } + }, + "Description": { + "target": "com.amazonaws.wellarchitected#LensDescription" + }, + "CreatedAt": { + "target": "com.amazonaws.wellarchitected#Timestamp" + }, + "UpdatedAt": { + "target": "com.amazonaws.wellarchitected#Timestamp" + }, "LensVersion": { "target": "com.amazonaws.wellarchitected#LensVersion", "traits": { "smithy.api#documentation": "The version of the lens.
" } }, - "LensName": { - "target": "com.amazonaws.wellarchitected#LensName" + "Owner": { + "target": "com.amazonaws.wellarchitected#AwsAccountId" }, - "Description": { - "target": "com.amazonaws.wellarchitected#LensDescription" + "LensStatus": { + "target": "com.amazonaws.wellarchitected#LensStatus", + "traits": { + "smithy.api#documentation": "The status of the lens.
" + } } }, "traits": { "smithy.api#documentation": "A lens summary of a lens.
" } }, + "com.amazonaws.wellarchitected#LensType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "AWS_OFFICIAL", + "name": "AWS_OFFICIAL" + }, + { + "value": "CUSTOM_SHARED", + "name": "CUSTOM_SHARED" + }, + { + "value": "CUSTOM_SELF", + "name": "CUSTOM_SELF" + } + ] + } + }, "com.amazonaws.wellarchitected#LensUpgradeSummary": { "type": "structure", "members": { @@ -1748,6 +2565,12 @@ "LensAlias": { "target": "com.amazonaws.wellarchitected#LensAlias" }, + "LensArn": { + "target": "com.amazonaws.wellarchitected#LensArn", + "traits": { + "smithy.api#documentation": "The ARN for the lens.
" + } + }, "CurrentLensVersion": { "target": "com.amazonaws.wellarchitected#LensVersion", "traits": { @@ -1770,7 +2593,7 @@ "traits": { "smithy.api#length": { "min": 1, - "max": 128 + "max": 32 } } }, @@ -1881,6 +2704,12 @@ "LensAlias": { "target": "com.amazonaws.wellarchitected#LensAlias" }, + "LensArn": { + "target": "com.amazonaws.wellarchitected#LensArn", + "traits": { + "smithy.api#documentation": "The ARN for the lens.
" + } + }, "AnswerSummaries": { "target": "com.amazonaws.wellarchitected#AnswerSummaries" }, @@ -1999,6 +2828,12 @@ "LensAlias": { "target": "com.amazonaws.wellarchitected#LensAlias" }, + "LensArn": { + "target": "com.amazonaws.wellarchitected#LensArn", + "traits": { + "smithy.api#documentation": "The ARN for the lens.
" + } + }, "ImprovementSummaries": { "target": "com.amazonaws.wellarchitected#ImprovementSummaries" }, @@ -2102,6 +2937,91 @@ "smithy.api#documentation": "Output of a list lens reviews call.
" } }, + "com.amazonaws.wellarchitected#ListLensShares": { + "type": "operation", + "input": { + "target": "com.amazonaws.wellarchitected#ListLensSharesInput" + }, + "output": { + "target": "com.amazonaws.wellarchitected#ListLensSharesOutput" + }, + "errors": [ + { + "target": "com.amazonaws.wellarchitected#AccessDeniedException" + }, + { + "target": "com.amazonaws.wellarchitected#InternalServerException" + }, + { + "target": "com.amazonaws.wellarchitected#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.wellarchitected#ThrottlingException" + }, + { + "target": "com.amazonaws.wellarchitected#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "List the lens shares associated with the lens.
", + "smithy.api#http": { + "method": "GET", + "uri": "/lenses/{LensAlias}/shares", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.wellarchitected#ListLensSharesInput": { + "type": "structure", + "members": { + "LensAlias": { + "target": "com.amazonaws.wellarchitected#LensAlias", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "SharedWithPrefix": { + "target": "com.amazonaws.wellarchitected#SharedWithPrefix", + "traits": { + "smithy.api#documentation": "The Amazon Web Services account ID or IAM role with which the lens is shared.
", + "smithy.api#httpQuery": "SharedWithPrefix" + } + }, + "NextToken": { + "target": "com.amazonaws.wellarchitected#NextToken", + "traits": { + "smithy.api#httpQuery": "NextToken" + } + }, + "MaxResults": { + "target": "com.amazonaws.wellarchitected#ListWorkloadSharesMaxResults", + "traits": { + "smithy.api#documentation": "The maximum number of results to return for this request.
", + "smithy.api#httpQuery": "MaxResults" + } + } + } + }, + "com.amazonaws.wellarchitected#ListLensSharesOutput": { + "type": "structure", + "members": { + "LensShareSummaries": { + "target": "com.amazonaws.wellarchitected#LensShareSummaries", + "traits": { + "smithy.api#documentation": "A list of lens share summaries.
" + } + }, + "NextToken": { + "target": "com.amazonaws.wellarchitected#NextToken" + } + } + }, "com.amazonaws.wellarchitected#ListLenses": { "type": "operation", "input": { @@ -2152,6 +3072,26 @@ "traits": { "smithy.api#httpQuery": "MaxResults" } + }, + "LensType": { + "target": "com.amazonaws.wellarchitected#LensType", + "traits": { + "smithy.api#documentation": "The type of lenses to be returned.
", + "smithy.api#httpQuery": "LensType" + } + }, + "LensStatus": { + "target": "com.amazonaws.wellarchitected#LensStatusType", + "traits": { + "smithy.api#documentation": "The status of lenses to be returned.
", + "smithy.api#httpQuery": "LensStatus" + } + }, + "LensName": { + "target": "com.amazonaws.wellarchitected#LensName", + "traits": { + "smithy.api#httpQuery": "LensName" + } } }, "traits": { @@ -2370,6 +3310,20 @@ "smithy.api#httpQuery": "WorkloadNamePrefix" } }, + "LensNamePrefix": { + "target": "com.amazonaws.wellarchitected#LensNamePrefix", + "traits": { + "smithy.api#documentation": "An optional string added to the beginning of each lens name returned in the results.
", + "smithy.api#httpQuery": "LensNamePrefix" + } + }, + "ShareResourceType": { + "target": "com.amazonaws.wellarchitected#ShareResourceType", + "traits": { + "smithy.api#documentation": "The type of share invitations to be returned.
", + "smithy.api#httpQuery": "ShareResourceType" + } + }, "NextToken": { "target": "com.amazonaws.wellarchitected#NextToken", "traits": { @@ -2514,7 +3468,7 @@ "SharedWithPrefix": { "target": "com.amazonaws.wellarchitected#SharedWithPrefix", "traits": { - "smithy.api#documentation": "The AWS account ID or IAM role with which the workload is shared.
", + "smithy.api#documentation": "The Amazon Web Services account ID or IAM role with which the workload is shared.
", "smithy.api#httpQuery": "SharedWithPrefix" } }, @@ -2799,6 +3753,9 @@ "PillarId": { "target": "com.amazonaws.wellarchitected#PillarId" }, + "PillarName": { + "target": "com.amazonaws.wellarchitected#PillarName" + }, "DifferenceStatus": { "target": "com.amazonaws.wellarchitected#DifferenceStatus", "traits": { @@ -3078,8 +4035,23 @@ "smithy.api#documentation": "The ID assigned to the share invitation.
" } }, + "ShareResourceType": { + "target": "com.amazonaws.wellarchitected#ShareResourceType", + "traits": { + "smithy.api#documentation": "The resource type of the share invitation.
" + } + }, "WorkloadId": { "target": "com.amazonaws.wellarchitected#WorkloadId" + }, + "LensAlias": { + "target": "com.amazonaws.wellarchitected#LensAlias" + }, + "LensArn": { + "target": "com.amazonaws.wellarchitected#LensArn", + "traits": { + "smithy.api#documentation": "The ARN for the lens.
" + } } }, "traits": { @@ -3132,17 +4104,47 @@ "PermissionType": { "target": "com.amazonaws.wellarchitected#PermissionType" }, + "ShareResourceType": { + "target": "com.amazonaws.wellarchitected#ShareResourceType", + "traits": { + "smithy.api#documentation": "The resource type of the share invitation.
" + } + }, "WorkloadName": { "target": "com.amazonaws.wellarchitected#WorkloadName" }, "WorkloadId": { "target": "com.amazonaws.wellarchitected#WorkloadId" + }, + "LensName": { + "target": "com.amazonaws.wellarchitected#LensName" + }, + "LensArn": { + "target": "com.amazonaws.wellarchitected#LensArn", + "traits": { + "smithy.api#documentation": "The ARN for the lens.
" + } } }, "traits": { "smithy.api#documentation": "A share invitation summary return object.
" } }, + "com.amazonaws.wellarchitected#ShareResourceType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "WORKLOAD", + "name": "WORKLOAD" + }, + { + "value": "LENS", + "name": "LENS" + } + ] + } + }, "com.amazonaws.wellarchitected#ShareStatus": { "type": "string", "traits": { @@ -3174,7 +4176,7 @@ "com.amazonaws.wellarchitected#SharedWith": { "type": "string", "traits": { - "smithy.api#documentation": "The AWS account ID or IAM role with which the workload is shared.
", + "smithy.api#documentation": "The Amazon Web Services account ID or IAM role with which the workload is shared.
", "smithy.api#length": { "min": 12, "max": 2048 @@ -3456,6 +4458,12 @@ "LensAlias": { "target": "com.amazonaws.wellarchitected#LensAlias" }, + "LensArn": { + "target": "com.amazonaws.wellarchitected#LensArn", + "traits": { + "smithy.api#documentation": "The ARN for the lens.
" + } + }, "Answer": { "target": "com.amazonaws.wellarchitected#Answer" } @@ -3959,11 +4967,32 @@ }, "com.amazonaws.wellarchitected#WellArchitectedApiServiceLambda": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "WellArchitected", + "arnNamespace": "wellarchitected", + "cloudFormationName": "WellArchitected", + "cloudTrailEventSource": "wellarchitected.amazonaws.com", + "endpointPrefix": "wellarchitected" + }, + "aws.auth#sigv4": { + "name": "wellarchitected" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "This is the Well-Architected Tool API Reference. The WA Tool API provides programmatic access to the \n Well-Architected Tool in the \n Amazon Web Services Management Console. For information \n about the Well-Architected Tool, see the \n Well-Architected Tool User Guide.
", + "smithy.api#title": "AWS Well-Architected Tool" + }, "version": "2020-03-31", "operations": [ { "target": "com.amazonaws.wellarchitected#AssociateLenses" }, + { + "target": "com.amazonaws.wellarchitected#CreateLensShare" + }, + { + "target": "com.amazonaws.wellarchitected#CreateLensVersion" + }, { "target": "com.amazonaws.wellarchitected#CreateMilestone" }, @@ -3973,6 +5002,12 @@ { "target": "com.amazonaws.wellarchitected#CreateWorkloadShare" }, + { + "target": "com.amazonaws.wellarchitected#DeleteLens" + }, + { + "target": "com.amazonaws.wellarchitected#DeleteLensShare" + }, { "target": "com.amazonaws.wellarchitected#DeleteWorkload" }, @@ -3982,9 +5017,15 @@ { "target": "com.amazonaws.wellarchitected#DisassociateLenses" }, + { + "target": "com.amazonaws.wellarchitected#ExportLens" + }, { "target": "com.amazonaws.wellarchitected#GetAnswer" }, + { + "target": "com.amazonaws.wellarchitected#GetLens" + }, { "target": "com.amazonaws.wellarchitected#GetLensReview" }, @@ -4000,6 +5041,9 @@ { "target": "com.amazonaws.wellarchitected#GetWorkload" }, + { + "target": "com.amazonaws.wellarchitected#ImportLens" + }, { "target": "com.amazonaws.wellarchitected#ListAnswers" }, @@ -4012,6 +5056,9 @@ { "target": "com.amazonaws.wellarchitected#ListLensReviews" }, + { + "target": "com.amazonaws.wellarchitected#ListLensShares" + }, { "target": "com.amazonaws.wellarchitected#ListMilestones" }, @@ -4054,22 +5101,7 @@ { "target": "com.amazonaws.wellarchitected#UpgradeLensReview" } - ], - "traits": { - "aws.api#service": { - "sdkId": "WellArchitected", - "arnNamespace": "wellarchitected", - "cloudFormationName": "WellArchitected", - "cloudTrailEventSource": "wellarchitected.amazonaws.com", - "endpointPrefix": "wellarchitected" - }, - "aws.auth#sigv4": { - "name": "wellarchitected" - }, - "aws.protocols#restJson1": {}, - "smithy.api#documentation": "This is the AWS Well-Architected Tool API Reference. The AWS Well-Architected Tool API provides programmatic access to the \n AWS Well-Architected Tool in the \n AWS Management Console. For information \n about the AWS Well-Architected Tool, see the \n AWS Well-Architected Tool User Guide.
", - "smithy.api#title": "AWS Well-Architected Tool" - } + ] }, "com.amazonaws.wellarchitected#Workload": { "type": "structure", @@ -4163,7 +5195,7 @@ "target": "com.amazonaws.wellarchitected#AwsAccountId" }, "traits": { - "smithy.api#documentation": "The list of AWS account IDs associated with the workload.
", + "smithy.api#documentation": "The list of Amazon Web Services account IDs associated with the workload.
", "smithy.api#length": { "min": 0, "max": 100 @@ -4192,7 +5224,7 @@ "target": "com.amazonaws.wellarchitected#AwsRegion" }, "traits": { - "smithy.api#documentation": "The list of AWS Regions associated with the workload, for example,\n us-east-2
, or ca-central-1
.
The list of Amazon Web Services Regions associated with the workload, for example,\n us-east-2
, or ca-central-1
.
The ID assigned to the workload. This ID is unique within an AWS Region.
", + "smithy.api#documentation": "The ID assigned to the workload. This ID is unique within an Amazon Web Services Region.
", "smithy.api#pattern": "^[0-9a-f]{32}$" } }, @@ -4292,7 +5324,7 @@ "com.amazonaws.wellarchitected#WorkloadName": { "type": "string", "traits": { - "smithy.api#documentation": "The name of the workload.
\nThe name must be unique within an account within a Region. Spaces and capitalization\n are ignored when checking for uniqueness.
", + "smithy.api#documentation": "The name of the workload.
\nThe name must be unique within an account within an Amazon Web Services Region. Spaces and capitalization\n are ignored when checking for uniqueness.
", "smithy.api#length": { "min": 3, "max": 100 @@ -4324,7 +5356,7 @@ "target": "com.amazonaws.wellarchitected#WorkloadNonAwsRegion" }, "traits": { - "smithy.api#documentation": "The list of non-AWS Regions associated with the workload.
", + "smithy.api#documentation": "The list of non-Amazon Web Services Regions associated with the workload.
", "smithy.api#length": { "min": 0, "max": 5 diff --git a/codegen/sdk-codegen/aws-models/workspaces.2015-04-08.json b/codegen/sdk-codegen/aws-models/workspaces.2015-04-08.json index 849aacd66ee..a2a2e8e7ec9 100644 --- a/codegen/sdk-codegen/aws-models/workspaces.2015-04-08.json +++ b/codegen/sdk-codegen/aws-models/workspaces.2015-04-08.json @@ -970,7 +970,7 @@ } ], "traits": { - "smithy.api#documentation": "Creates a new updated WorkSpace image based on the specified source image. The \n new updated WorkSpace image has the latest drivers and other updates required by \n the Amazon WorkSpaces components.
\n \nTo determine which WorkSpace images need to be updated with the latest Amazon \n WorkSpaces requirements, use \n \n DescribeWorkspaceImages.
\n \nOnly Windows 10 WorkSpace images can be programmatically updated at this time.
\nMicrosoft Windows updates and other application updates are not included \n in the update process.
\nThe source WorkSpace image is not deleted. You can delete the source image after you've \n verified your new updated image and created a new bundle.
\nCreates a new updated WorkSpace image based on the specified source image. The \n new updated WorkSpace image has the latest drivers and other updates required by \n the Amazon WorkSpaces components.
\n \nTo determine which WorkSpace images need to be updated with the latest Amazon \n WorkSpaces requirements, use \n \n DescribeWorkspaceImages.
\n \nOnly Windows 10, Windows Sever 2016, and Windows Server 2019 WorkSpace images can be programmatically updated at this time.
\nMicrosoft Windows updates and other application updates are not included \n in the update process.
\nThe source WorkSpace image is not deleted. You can delete the source image after you've \n verified your new updated image and created a new bundle.
\nAmazon WorkSpaces enables you to provision virtual, cloud-based Microsoft Windows and\n Amazon Linux desktops for your users.
", + "smithy.api#title": "Amazon WorkSpaces", + "smithy.api#xmlNamespace": { + "uri": "http://workspaces.amazonaws.com/api/v1" + } + }, "version": "2015-04-08", "operations": [ { @@ -5607,25 +5625,7 @@ { "target": "com.amazonaws.workspaces#UpdateWorkspaceImagePermission" } - ], - "traits": { - "aws.api#service": { - "sdkId": "WorkSpaces", - "arnNamespace": "workspaces", - "cloudFormationName": "WorkSpaces", - "cloudTrailEventSource": "workspaces.amazonaws.com", - "endpointPrefix": "workspaces" - }, - "aws.auth#sigv4": { - "name": "workspaces" - }, - "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "Amazon WorkSpaces enables you to provision virtual, cloud-based Microsoft Windows and\n Amazon Linux desktops for your users.
", - "smithy.api#title": "Amazon WorkSpaces", - "smithy.api#xmlNamespace": { - "uri": "http://workspaces.amazonaws.com/api/v1" - } - } + ] } } } diff --git a/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoint-prefix.json b/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoint-prefix.json index 0574302adb9..7c0ebc4c98c 100644 --- a/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoint-prefix.json +++ b/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoint-prefix.json @@ -104,6 +104,7 @@ "Elastic Transcoder": "elastictranscoder", "Elasticsearch Service": "es", "EventBridge": "events", + "Evidently": "evidently", "FMS": "fms", "FSx": "fsx", "Finspace": "finspace", @@ -129,6 +130,7 @@ "Identitystore": "identitystore", "Imagebuilder": "imagebuilder", "Inspector": "inspector", + "Inspector2": "inspector2", "IoT": "iot", "IoT 1Click Devices Service": "devices.iot1click", "IoT 1Click Projects": "projects.iot1click", @@ -188,6 +190,7 @@ "MemoryDB": "memory-db", "Mgn": "mgn", "Migration Hub": "mgh", + "Migration Hub Refactor Spaces": "refactor-spaces", "MigrationHub Config": "migrationhub-config", "MigrationHubStrategy": "migrationhub-strategy", "Mobile": "mobile", @@ -219,6 +222,8 @@ "RAM": "ram", "RDS": "rds", "RDS Data": "rds-data", + "RUM": "rum", + "Rbin": "rbin", "Redshift": "redshift", "Redshift Data": "redshift-data", "Rekognition": "rekognition", diff --git a/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoints.json b/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoints.json index 927dc3f66c3..d4e4deaff20 100644 --- a/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoints.json +++ b/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoints.json @@ -831,6 +831,40 @@ } } }, + "api.iotwireless" : { + "endpoints" : { + "ap-northeast-1" : { + "credentialScope" : { + "region" : "ap-northeast-1" + }, + "hostname" : "api.iotwireless.ap-northeast-1.amazonaws.com" + }, + "ap-southeast-2" : { + "credentialScope" : { + "region" : "ap-southeast-2" + }, + "hostname" : "api.iotwireless.ap-southeast-2.amazonaws.com" + }, + "eu-west-1" : { + "credentialScope" : { + "region" : "eu-west-1" + }, + "hostname" : "api.iotwireless.eu-west-1.amazonaws.com" + }, + "us-east-1" : { + "credentialScope" : { + "region" : "us-east-1" + }, + "hostname" : "api.iotwireless.us-east-1.amazonaws.com" + }, + "us-west-2" : { + "credentialScope" : { + "region" : "us-west-2" + }, + "hostname" : "api.iotwireless.us-west-2.amazonaws.com" + } + } + }, "api.mediatailor" : { "endpoints" : { "ap-northeast-1" : { }, diff --git a/service/autoscaling/api_op_AttachLoadBalancerTargetGroups.go b/service/autoscaling/api_op_AttachLoadBalancerTargetGroups.go index afd7fa4ad74..a5d0080e117 100644 --- a/service/autoscaling/api_op_AttachLoadBalancerTargetGroups.go +++ b/service/autoscaling/api_op_AttachLoadBalancerTargetGroups.go @@ -25,8 +25,10 @@ import ( // // To describe the target groups for an Auto Scaling group, call // the DescribeLoadBalancerTargetGroups API. To detach the target group from the -// Auto Scaling group, call the DetachLoadBalancerTargetGroups API. For more -// information, see Elastic Load Balancing and Amazon EC2 Auto Scaling +// Auto Scaling group, call the DetachLoadBalancerTargetGroups API. This operation +// is additive and does not detach existing target groups or Classic Load Balancers +// from the Auto Scaling group. For more information, see Elastic Load Balancing +// and Amazon EC2 Auto Scaling // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-load-balancer.html) // in the Amazon EC2 Auto Scaling User Guide. func (c *Client) AttachLoadBalancerTargetGroups(ctx context.Context, params *AttachLoadBalancerTargetGroupsInput, optFns ...func(*Options)) (*AttachLoadBalancerTargetGroupsOutput, error) { diff --git a/service/autoscaling/api_op_AttachLoadBalancers.go b/service/autoscaling/api_op_AttachLoadBalancers.go index 10fad05248f..7c80ca89817 100644 --- a/service/autoscaling/api_op_AttachLoadBalancers.go +++ b/service/autoscaling/api_op_AttachLoadBalancers.go @@ -16,8 +16,10 @@ import ( // EC2 Auto Scaling registers the running instances with these Classic Load // Balancers. To describe the load balancers for an Auto Scaling group, call the // DescribeLoadBalancers API. To detach the load balancer from the Auto Scaling -// group, call the DetachLoadBalancers API. For more information, see Elastic Load -// Balancing and Amazon EC2 Auto Scaling +// group, call the DetachLoadBalancers API. This operation is additive and does not +// detach existing Classic Load Balancers or target groups from the Auto Scaling +// group. For more information, see Elastic Load Balancing and Amazon EC2 Auto +// Scaling // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-load-balancer.html) // in the Amazon EC2 Auto Scaling User Guide. func (c *Client) AttachLoadBalancers(ctx context.Context, params *AttachLoadBalancersInput, optFns ...func(*Options)) (*AttachLoadBalancersOutput, error) { diff --git a/service/autoscaling/api_op_CompleteLifecycleAction.go b/service/autoscaling/api_op_CompleteLifecycleAction.go index e487eefe1e7..798d6ff100f 100644 --- a/service/autoscaling/api_op_CompleteLifecycleAction.go +++ b/service/autoscaling/api_op_CompleteLifecycleAction.go @@ -15,7 +15,7 @@ import ( // hook to an Auto Scaling group: // // * (Optional) Create a Lambda function and a rule -// that allows CloudWatch Events to invoke your Lambda function when Amazon EC2 +// that allows Amazon EventBridge to invoke your Lambda function when Amazon EC2 // Auto Scaling launches or terminates instances. // // * (Optional) Create a @@ -30,11 +30,11 @@ import ( // more time, record the lifecycle action heartbeat to keep the instance in a // pending state. // -// * If you finish before the timeout period ends, complete the -// lifecycle action. +// * If you finish before the timeout period ends, send a callback +// by using the CompleteLifecycleAction API call. // -// For more information, see Amazon EC2 Auto Scaling lifecycle -// hooks +// For more information, see Amazon +// EC2 Auto Scaling lifecycle hooks // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html) in // the Amazon EC2 Auto Scaling User Guide. func (c *Client) CompleteLifecycleAction(ctx context.Context, params *CompleteLifecycleActionInput, optFns ...func(*Options)) (*CompleteLifecycleActionOutput, error) { diff --git a/service/autoscaling/api_op_CreateAutoScalingGroup.go b/service/autoscaling/api_op_CreateAutoScalingGroup.go index 4875aed9955..4c86d3e861e 100644 --- a/service/autoscaling/api_op_CreateAutoScalingGroup.go +++ b/service/autoscaling/api_op_CreateAutoScalingGroup.go @@ -80,7 +80,7 @@ type CreateAutoScalingGroupInput struct { // Spot Instance is at an elevated risk of interruption. After launching a new // instance, it then terminates an old instance. For more information, see Amazon // EC2 Auto Scaling Capacity Rebalancing - // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/capacity-rebalance.html) + // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-capacity-rebalancing.html) // in the Amazon EC2 Auto Scaling User Guide. CapacityRebalance *bool @@ -115,9 +115,9 @@ type CreateAutoScalingGroupInput struct { DesiredCapacityType *string // The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before - // checking the health status of an EC2 instance that has come into service. During - // this time, any health check failures for the instance are ignored. The default - // value is 0. For more information, see Health check grace period + // checking the health status of an EC2 instance that has come into service and + // marking it unhealthy due to a failed health check. The default value is 0. For + // more information, see Health check grace period // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html#health-check-grace-period) // in the Amazon EC2 Auto Scaling User Guide. Conditional: Required if you are // adding an ELB health check. @@ -179,14 +179,14 @@ type CreateAutoScalingGroupInput struct { // An embedded object that specifies a mixed instances policy. For more // information, see Auto Scaling groups with multiple instance types and purchase // options - // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-purchase-options.html) + // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-mixed-instances-groups.html) // in the Amazon EC2 Auto Scaling User Guide. MixedInstancesPolicy *types.MixedInstancesPolicy // Indicates whether newly launched instances are protected from termination by // Amazon EC2 Auto Scaling when scaling in. For more information about preventing - // instances from terminating on scale in, see Instance scale-in protection - // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection) + // instances from terminating on scale in, see Using instance scale-in protection + // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-instance-protection.html) // in the Amazon EC2 Auto Scaling User Guide. NewInstancesProtectedFromScaleIn *bool diff --git a/service/autoscaling/api_op_DeleteNotificationConfiguration.go b/service/autoscaling/api_op_DeleteNotificationConfiguration.go index b4d782db266..adab9202685 100644 --- a/service/autoscaling/api_op_DeleteNotificationConfiguration.go +++ b/service/autoscaling/api_op_DeleteNotificationConfiguration.go @@ -33,8 +33,7 @@ type DeleteNotificationConfigurationInput struct { // This member is required. AutoScalingGroupName *string - // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (Amazon - // SNS) topic. + // The Amazon Resource Name (ARN) of the Amazon SNS topic. // // This member is required. TopicARN *string diff --git a/service/autoscaling/api_op_PutLifecycleHook.go b/service/autoscaling/api_op_PutLifecycleHook.go index 5fc6f776d47..296825e166a 100644 --- a/service/autoscaling/api_op_PutLifecycleHook.go +++ b/service/autoscaling/api_op_PutLifecycleHook.go @@ -11,13 +11,13 @@ import ( ) // Creates or updates a lifecycle hook for the specified Auto Scaling group. A -// lifecycle hook tells Amazon EC2 Auto Scaling to perform an action on an instance -// when the instance launches (before it is put into service) or as the instance -// terminates (before it is fully terminated). This step is a part of the procedure -// for adding a lifecycle hook to an Auto Scaling group: +// lifecycle hook enables an Auto Scaling group to be aware of events in the Auto +// Scaling instance lifecycle, and then perform a custom action when the +// corresponding lifecycle event occurs. This step is a part of the procedure for +// adding a lifecycle hook to an Auto Scaling group: // -// * (Optional) Create a -// Lambda function and a rule that allows CloudWatch Events to invoke your Lambda +// * (Optional) Create a Lambda +// function and a rule that allows Amazon EventBridge to invoke your Lambda // function when Amazon EC2 Auto Scaling launches or terminates instances. // // * @@ -33,11 +33,11 @@ import ( // keep the instance in a pending state using the RecordLifecycleActionHeartbeat // API call. // -// * If you finish before the timeout period ends, complete the -// lifecycle action using the CompleteLifecycleAction API call. +// * If you finish before the timeout period ends, send a callback by +// using the CompleteLifecycleAction API call. // -// For more -// information, see Amazon EC2 Auto Scaling lifecycle hooks +// For more information, see Amazon +// EC2 Auto Scaling lifecycle hooks // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html) in // the Amazon EC2 Auto Scaling User Guide. If you exceed your maximum limit of // lifecycle hooks, which by default is 50 per Auto Scaling group, the call fails. diff --git a/service/autoscaling/api_op_PutNotificationConfiguration.go b/service/autoscaling/api_op_PutNotificationConfiguration.go index 7b3bc0326a8..32f6efa3240 100644 --- a/service/autoscaling/api_op_PutNotificationConfiguration.go +++ b/service/autoscaling/api_op_PutNotificationConfiguration.go @@ -47,8 +47,7 @@ type PutNotificationConfigurationInput struct { // This member is required. NotificationTypes []string - // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (Amazon - // SNS) topic. + // The Amazon Resource Name (ARN) of the Amazon SNS topic. // // This member is required. TopicARN *string diff --git a/service/autoscaling/api_op_PutScalingPolicy.go b/service/autoscaling/api_op_PutScalingPolicy.go index e6c61e9332a..9dfc800d098 100644 --- a/service/autoscaling/api_op_PutScalingPolicy.go +++ b/service/autoscaling/api_op_PutScalingPolicy.go @@ -117,9 +117,9 @@ type PutScalingPolicyInput struct { // * PredictiveScaling PolicyType *string - // A predictive scaling policy. Provides support for only predefined metrics. - // Predictive scaling works with CPU utilization, network in/out, and the - // Application Load Balancer request count. For more information, see + // A predictive scaling policy. Provides support for predefined and custom metrics. + // Predefined metrics include CPU utilization, network in/out, and the Application + // Load Balancer request count. For more information, see // PredictiveScalingConfiguration // (https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_PredictiveScalingConfiguration.html) // in the Amazon EC2 Auto Scaling API Reference. Required if the policy type is @@ -138,7 +138,7 @@ type PutScalingPolicyInput struct { // policy type.) StepAdjustments []types.StepAdjustment - // A target tracking scaling policy. Provides support for predefined or customized + // A target tracking scaling policy. Provides support for predefined or custom // metrics. The following predefined metrics are available: // // * diff --git a/service/autoscaling/api_op_RecordLifecycleActionHeartbeat.go b/service/autoscaling/api_op_RecordLifecycleActionHeartbeat.go index 326d940a6d9..44d47dbf03b 100644 --- a/service/autoscaling/api_op_RecordLifecycleActionHeartbeat.go +++ b/service/autoscaling/api_op_RecordLifecycleActionHeartbeat.go @@ -16,7 +16,7 @@ import ( // lifecycle hook to an Auto Scaling group: // // * (Optional) Create a Lambda function -// and a rule that allows CloudWatch Events to invoke your Lambda function when +// and a rule that allows Amazon EventBridge to invoke your Lambda function when // Amazon EC2 Auto Scaling launches or terminates instances. // // * (Optional) Create a @@ -31,11 +31,11 @@ import ( // more time, record the lifecycle action heartbeat to keep the instance in a // pending state. // -// * If you finish before the timeout period ends, complete the -// lifecycle action. +// * If you finish before the timeout period ends, send a callback +// by using the CompleteLifecycleAction API call. // -// For more information, see Amazon EC2 Auto Scaling lifecycle -// hooks +// For more information, see Amazon +// EC2 Auto Scaling lifecycle hooks // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html) in // the Amazon EC2 Auto Scaling User Guide. func (c *Client) RecordLifecycleActionHeartbeat(ctx context.Context, params *RecordLifecycleActionHeartbeatInput, optFns ...func(*Options)) (*RecordLifecycleActionHeartbeatOutput, error) { diff --git a/service/autoscaling/api_op_SetInstanceProtection.go b/service/autoscaling/api_op_SetInstanceProtection.go index 4eb2f3ba3c3..156a51d5a09 100644 --- a/service/autoscaling/api_op_SetInstanceProtection.go +++ b/service/autoscaling/api_op_SetInstanceProtection.go @@ -13,8 +13,8 @@ import ( // Updates the instance protection settings of the specified instances. This // operation cannot be called on instances in a warm pool. For more information // about preventing instances that are part of an Auto Scaling group from -// terminating on scale in, see Instance scale-in protection -// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection) +// terminating on scale in, see Using instance scale-in protection +// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-instance-protection.html) // in the Amazon EC2 Auto Scaling User Guide. If you exceed your maximum limit of // instance IDs, which is 50 per Auto Scaling group, the call fails. func (c *Client) SetInstanceProtection(ctx context.Context, params *SetInstanceProtectionInput, optFns ...func(*Options)) (*SetInstanceProtectionOutput, error) { diff --git a/service/autoscaling/api_op_UpdateAutoScalingGroup.go b/service/autoscaling/api_op_UpdateAutoScalingGroup.go index d9e44add359..c880f1f8d74 100644 --- a/service/autoscaling/api_op_UpdateAutoScalingGroup.go +++ b/service/autoscaling/api_op_UpdateAutoScalingGroup.go @@ -76,7 +76,7 @@ type UpdateAutoScalingGroupInput struct { // Enables or disables Capacity Rebalancing. For more information, see Amazon EC2 // Auto Scaling Capacity Rebalancing - // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/capacity-rebalance.html) + // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-capacity-rebalancing.html) // in the Amazon EC2 Auto Scaling User Guide. CapacityRebalance *bool @@ -109,8 +109,9 @@ type UpdateAutoScalingGroupInput struct { DesiredCapacityType *string // The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before - // checking the health status of an EC2 instance that has come into service. The - // default value is 0. For more information, see Health check grace period + // checking the health status of an EC2 instance that has come into service and + // marking it unhealthy due to a failed health check. The default value is 0. For + // more information, see Health check grace period // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html#health-check-grace-period) // in the Amazon EC2 Auto Scaling User Guide. Conditional: Required if you are // adding an ELB health check. @@ -154,14 +155,14 @@ type UpdateAutoScalingGroupInput struct { // An embedded object that specifies a mixed instances policy. For more // information, see Auto Scaling groups with multiple instance types and purchase // options - // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-purchase-options.html) + // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-mixed-instances-groups.html) // in the Amazon EC2 Auto Scaling User Guide. MixedInstancesPolicy *types.MixedInstancesPolicy // Indicates whether newly launched instances are protected from termination by // Amazon EC2 Auto Scaling when scaling in. For more information about preventing - // instances from terminating on scale in, see Instance scale-in protection - // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection) + // instances from terminating on scale in, see Using instance scale-in protection + // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-instance-protection.html) // in the Amazon EC2 Auto Scaling User Guide. NewInstancesProtectedFromScaleIn *bool diff --git a/service/autoscaling/deserializers.go b/service/autoscaling/deserializers.go index 216c16fbaa5..adfd6447b91 100644 --- a/service/autoscaling/deserializers.go +++ b/service/autoscaling/deserializers.go @@ -12296,6 +12296,74 @@ func awsAwsquery_deserializeDocumentMemoryMiBRequest(v **types.MemoryMiBRequest, return nil } +func awsAwsquery_deserializeDocumentMetric(v **types.Metric, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.Metric + if *v == nil { + sv = &types.Metric{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Dimensions", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentMetricDimensions(&sv.Dimensions, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("MetricName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.MetricName = ptr.String(xtv) + } + + case strings.EqualFold("Namespace", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Namespace = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeDocumentMetricCollectionType(v **types.MetricCollectionType, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12413,6 +12481,171 @@ func awsAwsquery_deserializeDocumentMetricCollectionTypesUnwrapped(v *[]types.Me *v = sv return nil } +func awsAwsquery_deserializeDocumentMetricDataQueries(v *[]types.MetricDataQuery, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.MetricDataQuery + if *v == nil { + sv = make([]types.MetricDataQuery, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.MetricDataQuery + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentMetricDataQuery(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentMetricDataQueriesUnwrapped(v *[]types.MetricDataQuery, decoder smithyxml.NodeDecoder) error { + var sv []types.MetricDataQuery + if *v == nil { + sv = make([]types.MetricDataQuery, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.MetricDataQuery + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentMetricDataQuery(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentMetricDataQuery(v **types.MetricDataQuery, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.MetricDataQuery + if *v == nil { + sv = &types.MetricDataQuery{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Expression", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Expression = ptr.String(xtv) + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("Label", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Label = ptr.String(xtv) + } + + case strings.EqualFold("MetricStat", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentMetricStat(&sv.MetricStat, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("ReturnData", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected ReturnData to be of type *bool, got %T instead", val) + } + sv.ReturnData = ptr.Bool(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeDocumentMetricDimension(v **types.MetricDimension, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12660,6 +12893,74 @@ func awsAwsquery_deserializeDocumentMetricGranularityTypesUnwrapped(v *[]types.M *v = sv return nil } +func awsAwsquery_deserializeDocumentMetricStat(v **types.MetricStat, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.MetricStat + if *v == nil { + sv = &types.MetricStat{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Metric", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentMetric(&sv.Metric, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Stat", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Stat = ptr.String(xtv) + } + + case strings.EqualFold("Unit", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Unit = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeDocumentMixedInstancesPolicy(v **types.MixedInstancesPolicy, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -13153,6 +13454,132 @@ func awsAwsquery_deserializeDocumentPredictiveScalingConfiguration(v **types.Pre return nil } +func awsAwsquery_deserializeDocumentPredictiveScalingCustomizedCapacityMetric(v **types.PredictiveScalingCustomizedCapacityMetric, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PredictiveScalingCustomizedCapacityMetric + if *v == nil { + sv = &types.PredictiveScalingCustomizedCapacityMetric{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("MetricDataQueries", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentMetricDataQueries(&sv.MetricDataQueries, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentPredictiveScalingCustomizedLoadMetric(v **types.PredictiveScalingCustomizedLoadMetric, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PredictiveScalingCustomizedLoadMetric + if *v == nil { + sv = &types.PredictiveScalingCustomizedLoadMetric{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("MetricDataQueries", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentMetricDataQueries(&sv.MetricDataQueries, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentPredictiveScalingCustomizedScalingMetric(v **types.PredictiveScalingCustomizedScalingMetric, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PredictiveScalingCustomizedScalingMetric + if *v == nil { + sv = &types.PredictiveScalingCustomizedScalingMetric{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("MetricDataQueries", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentMetricDataQueries(&sv.MetricDataQueries, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeDocumentPredictiveScalingForecastTimestamps(v *[]time.Time, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -13351,6 +13778,24 @@ func awsAwsquery_deserializeDocumentPredictiveScalingMetricSpecification(v **typ originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { + case strings.EqualFold("CustomizedCapacityMetricSpecification", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentPredictiveScalingCustomizedCapacityMetric(&sv.CustomizedCapacityMetricSpecification, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("CustomizedLoadMetricSpecification", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentPredictiveScalingCustomizedLoadMetric(&sv.CustomizedLoadMetricSpecification, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("CustomizedScalingMetricSpecification", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentPredictiveScalingCustomizedScalingMetric(&sv.CustomizedScalingMetricSpecification, nodeDecoder); err != nil { + return err + } + case strings.EqualFold("PredefinedLoadMetricSpecification", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsAwsquery_deserializeDocumentPredictiveScalingPredefinedLoadMetric(&sv.PredefinedLoadMetricSpecification, nodeDecoder); err != nil { diff --git a/service/autoscaling/serializers.go b/service/autoscaling/serializers.go index 000104a98a2..5a65e131513 100644 --- a/service/autoscaling/serializers.go +++ b/service/autoscaling/serializers.go @@ -4756,6 +4756,79 @@ func awsAwsquery_serializeDocumentMemoryMiBRequest(v *types.MemoryMiBRequest, va return nil } +func awsAwsquery_serializeDocumentMetric(v *types.Metric, value query.Value) error { + object := value.Object() + _ = object + + if v.Dimensions != nil { + objectKey := object.Key("Dimensions") + if err := awsAwsquery_serializeDocumentMetricDimensions(v.Dimensions, objectKey); err != nil { + return err + } + } + + if v.MetricName != nil { + objectKey := object.Key("MetricName") + objectKey.String(*v.MetricName) + } + + if v.Namespace != nil { + objectKey := object.Key("Namespace") + objectKey.String(*v.Namespace) + } + + return nil +} + +func awsAwsquery_serializeDocumentMetricDataQueries(v []types.MetricDataQuery, value query.Value) error { + if len(v) == 0 { + return nil + } + array := value.Array("member") + + for i := range v { + av := array.Value() + if err := awsAwsquery_serializeDocumentMetricDataQuery(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsquery_serializeDocumentMetricDataQuery(v *types.MetricDataQuery, value query.Value) error { + object := value.Object() + _ = object + + if v.Expression != nil { + objectKey := object.Key("Expression") + objectKey.String(*v.Expression) + } + + if v.Id != nil { + objectKey := object.Key("Id") + objectKey.String(*v.Id) + } + + if v.Label != nil { + objectKey := object.Key("Label") + objectKey.String(*v.Label) + } + + if v.MetricStat != nil { + objectKey := object.Key("MetricStat") + if err := awsAwsquery_serializeDocumentMetricStat(v.MetricStat, objectKey); err != nil { + return err + } + } + + if v.ReturnData != nil { + objectKey := object.Key("ReturnData") + objectKey.Boolean(*v.ReturnData) + } + + return nil +} + func awsAwsquery_serializeDocumentMetricDimension(v *types.MetricDimension, value query.Value) error { object := value.Object() _ = object @@ -4801,6 +4874,30 @@ func awsAwsquery_serializeDocumentMetrics(v []string, value query.Value) error { return nil } +func awsAwsquery_serializeDocumentMetricStat(v *types.MetricStat, value query.Value) error { + object := value.Object() + _ = object + + if v.Metric != nil { + objectKey := object.Key("Metric") + if err := awsAwsquery_serializeDocumentMetric(v.Metric, objectKey); err != nil { + return err + } + } + + if v.Stat != nil { + objectKey := object.Key("Stat") + objectKey.String(*v.Stat) + } + + if v.Unit != nil { + objectKey := object.Key("Unit") + objectKey.String(*v.Unit) + } + + return nil +} + func awsAwsquery_serializeDocumentMixedInstancesPolicy(v *types.MixedInstancesPolicy, value query.Value) error { object := value.Object() _ = object @@ -4931,10 +5028,73 @@ func awsAwsquery_serializeDocumentPredictiveScalingConfiguration(v *types.Predic return nil } +func awsAwsquery_serializeDocumentPredictiveScalingCustomizedCapacityMetric(v *types.PredictiveScalingCustomizedCapacityMetric, value query.Value) error { + object := value.Object() + _ = object + + if v.MetricDataQueries != nil { + objectKey := object.Key("MetricDataQueries") + if err := awsAwsquery_serializeDocumentMetricDataQueries(v.MetricDataQueries, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsAwsquery_serializeDocumentPredictiveScalingCustomizedLoadMetric(v *types.PredictiveScalingCustomizedLoadMetric, value query.Value) error { + object := value.Object() + _ = object + + if v.MetricDataQueries != nil { + objectKey := object.Key("MetricDataQueries") + if err := awsAwsquery_serializeDocumentMetricDataQueries(v.MetricDataQueries, objectKey); err != nil { + return err + } + } + + return nil +} + +func awsAwsquery_serializeDocumentPredictiveScalingCustomizedScalingMetric(v *types.PredictiveScalingCustomizedScalingMetric, value query.Value) error { + object := value.Object() + _ = object + + if v.MetricDataQueries != nil { + objectKey := object.Key("MetricDataQueries") + if err := awsAwsquery_serializeDocumentMetricDataQueries(v.MetricDataQueries, objectKey); err != nil { + return err + } + } + + return nil +} + func awsAwsquery_serializeDocumentPredictiveScalingMetricSpecification(v *types.PredictiveScalingMetricSpecification, value query.Value) error { object := value.Object() _ = object + if v.CustomizedCapacityMetricSpecification != nil { + objectKey := object.Key("CustomizedCapacityMetricSpecification") + if err := awsAwsquery_serializeDocumentPredictiveScalingCustomizedCapacityMetric(v.CustomizedCapacityMetricSpecification, objectKey); err != nil { + return err + } + } + + if v.CustomizedLoadMetricSpecification != nil { + objectKey := object.Key("CustomizedLoadMetricSpecification") + if err := awsAwsquery_serializeDocumentPredictiveScalingCustomizedLoadMetric(v.CustomizedLoadMetricSpecification, objectKey); err != nil { + return err + } + } + + if v.CustomizedScalingMetricSpecification != nil { + objectKey := object.Key("CustomizedScalingMetricSpecification") + if err := awsAwsquery_serializeDocumentPredictiveScalingCustomizedScalingMetric(v.CustomizedScalingMetricSpecification, objectKey); err != nil { + return err + } + } + if v.PredefinedLoadMetricSpecification != nil { objectKey := object.Key("PredefinedLoadMetricSpecification") if err := awsAwsquery_serializeDocumentPredictiveScalingPredefinedLoadMetric(v.PredefinedLoadMetricSpecification, objectKey); err != nil { diff --git a/service/autoscaling/types/types.go b/service/autoscaling/types/types.go index 99c5c86030f..9eea486b360 100644 --- a/service/autoscaling/types/types.go +++ b/service/autoscaling/types/types.go @@ -178,7 +178,8 @@ type AutoScalingGroup struct { EnabledMetrics []EnabledMetric // The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before - // checking the health status of an EC2 instance that has come into service. + // checking the health status of an EC2 instance that has come into service and + // marking it unhealthy due to a failed health check. HealthCheckGracePeriod *int32 // The EC2 instances associated with the group. @@ -350,7 +351,7 @@ type BlockDeviceMapping struct { // capacity forecast, along with the timestamps of those data points. type CapacityForecast struct { - // The time stamps for the data points, in UTC format. + // The timestamps for the data points, in UTC format. // // This member is required. Timestamps []time.Time @@ -370,7 +371,7 @@ type CapacityForecast struct { // * Add values for each required parameter from CloudWatch. You // can use an existing metric, or a new metric that you create. To use your own // metric, you must first publish the metric to CloudWatch. For more information, -// see Publish Custom Metrics +// see Publish custom metrics // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html) // in the Amazon CloudWatch User Guide. // @@ -380,11 +381,21 @@ type CapacityForecast struct { // value of the metric should decrease when capacity increases. // // For more -// information about CloudWatch, see Amazon CloudWatch Concepts +// information about the CloudWatch terminology below, see Amazon CloudWatch +// concepts // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html). +// Each individual service provides information about the metrics, namespace, and +// dimensions they use. For more information, see Amazon Web Services services that +// publish CloudWatch metrics +// (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html) +// in the Amazon CloudWatch User Guide. type CustomizedMetricSpecification struct { - // The name of the metric. + // The name of the metric. To get the exact metric name, namespace, and dimensions, + // inspect the Metric + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_Metric.html) + // object that is returned by a call to ListMetrics + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListMetrics.html). // // This member is required. MetricName *string @@ -403,7 +414,10 @@ type CustomizedMetricSpecification struct { // dimensions, you must specify the same dimensions in your scaling policy. Dimensions []MetricDimension - // The unit of the metric. + // The unit of the metric. For a complete list of the units that CloudWatch + // supports, see the MetricDatum + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDatum.html) + // data type in the Amazon CloudWatch API Reference. Unit *string noSmithyDocumentSerde @@ -426,7 +440,7 @@ type DesiredConfiguration struct { // that Amazon EC2 Auto Scaling can use to launch instances and help optimize your // costs. For more information, see Auto Scaling groups with multiple instance // types and purchase options - // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-purchase-options.html) + // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-mixed-instances-groups.html) // in the Amazon EC2 Auto Scaling User Guide. MixedInstancesPolicy *MixedInstancesPolicy @@ -1254,7 +1268,7 @@ type LaunchTemplate struct { // Describes an override for a launch template. For more information, see // Configuring overrides -// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-override-options.html) +// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-configuring-overrides.html) // in the Amazon EC2 Auto Scaling User Guide. type LaunchTemplateOverrides struct { @@ -1278,7 +1292,7 @@ type LaunchTemplateOverrides struct { // uses the launch template that's defined for your mixed instances policy. For // more information, see Specifying a different launch template for an instance // type - // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-launch-template-overrides.html) + // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-mixed-instances-groups-launch-template-overrides.html) // in the Amazon EC2 Auto Scaling User Guide. LaunchTemplateSpecification *LaunchTemplateSpecification @@ -1292,7 +1306,7 @@ type LaunchTemplateOverrides struct { // WeightedCapacity of five units, the instance is launched, and the desired // capacity is exceeded by three units. For more information, see Instance // weighting for Amazon EC2 Auto Scaling - // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-weighting.html) + // (https://docs.aws.amazon.com/ec2-auto-scaling-mixed-instances-groups-instance-weighting.html) // in the Amazon EC2 Auto Scaling User Guide. Value must be in the range of 1–999. WeightedCapacity *string @@ -1341,8 +1355,9 @@ type LaunchTemplateSpecification struct { noSmithyDocumentSerde } -// Describes a lifecycle hook, which tells Amazon EC2 Auto Scaling that you want to -// perform an action whenever it launches instances or terminates instances. +// Describes a lifecycle hook, which enables an Auto Scaling group to be aware of +// events in the Auto Scaling instance lifecycle, and then perform a custom action +// when the corresponding lifecycle event occurs. type LifecycleHook struct { // The name of the Auto Scaling group for the lifecycle hook. @@ -1392,32 +1407,7 @@ type LifecycleHook struct { } // Describes information used to specify a lifecycle hook for an Auto Scaling -// group. A lifecycle hook tells Amazon EC2 Auto Scaling to perform an action on an -// instance when the instance launches (before it is put into service) or as the -// instance terminates (before it is fully terminated). This step is a part of the -// procedure for creating a lifecycle hook for an Auto Scaling group: -// -// * (Optional) -// Create a Lambda function and a rule that allows CloudWatch Events to invoke your -// Lambda function when Amazon EC2 Auto Scaling launches or terminates -// instances. -// -// * (Optional) Create a notification target and an IAM role. The -// target can be either an Amazon SQS queue or an Amazon SNS topic. The role allows -// Amazon EC2 Auto Scaling to publish lifecycle notifications to the target. -// -// * -// Create the lifecycle hook. Specify whether the hook is used when the instances -// launch or terminate. -// -// * If you need more time, record the lifecycle action -// heartbeat to keep the instance in a pending state. -// -// * If you finish before the -// timeout period ends, complete the lifecycle action. -// -// For more information, see -// Amazon EC2 Auto Scaling lifecycle hooks +// group. For more information, see Amazon EC2 Auto Scaling lifecycle hooks // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html) in // the Amazon EC2 Auto Scaling User Guide. type LifecycleHookSpecification struct { @@ -1534,7 +1524,7 @@ type LoadForecast struct { // This member is required. MetricSpecification *PredictiveScalingMetricSpecification - // The time stamps for the data points, in UTC format. + // The timestamps for the data points, in UTC format. // // This member is required. Timestamps []time.Time @@ -1575,6 +1565,33 @@ type MemoryMiBRequest struct { noSmithyDocumentSerde } +// Represents a specific metric. +type Metric struct { + + // The name of the metric. + // + // This member is required. + MetricName *string + + // The namespace of the metric. For more information, see the table in Amazon Web + // Services services that publish CloudWatch metrics + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html) + // in the Amazon CloudWatch User Guide. + // + // This member is required. + Namespace *string + + // The dimensions for the metric. For the list of available dimensions, see the + // Amazon Web Services documentation available from the table in Amazon Web + // Services services that publish CloudWatch metrics + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html) + // in the Amazon CloudWatch User Guide. Conditional: If you published your metric + // with dimensions, you must specify the same dimensions in your scaling policy. + Dimensions []MetricDimension + + noSmithyDocumentSerde +} + // Describes a metric. type MetricCollectionType struct { @@ -1631,6 +1648,54 @@ type MetricCollectionType struct { noSmithyDocumentSerde } +// The metric data to return. Also defines whether this call is returning data for +// one metric only, or whether it is performing a math expression on the values of +// returned metric statistics to create a new time series. A time series is a +// series of data points, each of which is associated with a timestamp. For more +// information and examples, see Advanced predictive scaling policy configurations +// using custom metrics +// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/predictive-scaling-customized-metric-specification.html) +// in the Amazon EC2 Auto Scaling User Guide. +type MetricDataQuery struct { + + // A short name that identifies the object's results in the response. This name + // must be unique among all MetricDataQuery objects specified for a single scaling + // policy. If you are performing math expressions on this set of data, this name + // represents that data and can serve as a variable in the mathematical expression. + // The valid characters are letters, numbers, and underscores. The first character + // must be a lowercase letter. + // + // This member is required. + Id *string + + // The math expression to perform on the returned data, if this object is + // performing a math expression. This expression can use the Id of the other + // metrics to refer to those metrics, and can also use the Id of other expressions + // to use the result of those expressions. Conditional: Within each MetricDataQuery + // object, you must specify either Expression or MetricStat, but not both. + Expression *string + + // A human-readable label for this metric or expression. This is especially useful + // if this is a math expression, so that you know what the value represents. + Label *string + + // Information about the metric data to return. Conditional: Within each + // MetricDataQuery object, you must specify either Expression or MetricStat, but + // not both. + MetricStat *MetricStat + + // Indicates whether to return the timestamps and raw data values of this metric. + // If you use any math expressions, specify true for this value for only the final + // math expression that the metric specification is based on. You must specify + // false for ReturnData for all the other metrics and expressions used in the + // metric specification. If you are only retrieving metrics and not performing any + // math expressions, do not specify anything for ReturnData. This sets it to its + // default (true). + ReturnData *bool + + noSmithyDocumentSerde +} + // Describes the dimension of a metric. type MetricDimension struct { @@ -1656,12 +1721,47 @@ type MetricGranularityType struct { noSmithyDocumentSerde } +// This structure defines the CloudWatch metric to return, along with the +// statistic, period, and unit. For more information about the CloudWatch +// terminology below, see Amazon CloudWatch concepts +// (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html) +// in the Amazon CloudWatch User Guide. +type MetricStat struct { + + // The CloudWatch metric to return, including the metric name, namespace, and + // dimensions. To get the exact metric name, namespace, and dimensions, inspect the + // Metric + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_Metric.html) + // object that is returned by a call to ListMetrics + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListMetrics.html). + // + // This member is required. + Metric *Metric + + // The statistic to return. It can include any CloudWatch statistic or extended + // statistic. For a list of valid values, see the table in Statistics + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Statistic) + // in the Amazon CloudWatch User Guide. The most commonly used metrics for + // predictive scaling are Average and Sum. + // + // This member is required. + Stat *string + + // The unit to use for the returned data points. For a complete list of the units + // that CloudWatch supports, see the MetricDatum + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDatum.html) + // data type in the Amazon CloudWatch API Reference. + Unit *string + + noSmithyDocumentSerde +} + // Describes a mixed instances policy. A mixed instances policy contains the // instance types that Amazon EC2 Auto Scaling can launch and other information // that Amazon EC2 Auto Scaling can use to launch instances and help optimize your // costs. For more information, see Auto Scaling groups with multiple instance // types and purchase options -// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-purchase-options.html) +// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-mixed-instances-groups.html) // in the Amazon EC2 Auto Scaling User Guide. type MixedInstancesPolicy struct { @@ -1711,8 +1811,7 @@ type NotificationConfiguration struct { // * autoscaling:TEST_NOTIFICATION NotificationType *string - // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (Amazon - // SNS) topic. + // The Amazon Resource Name (ARN) of the Amazon SNS topic. TopicARN *string noSmithyDocumentSerde @@ -1822,6 +1921,45 @@ type PredictiveScalingConfiguration struct { noSmithyDocumentSerde } +// Describes a customized capacity metric for a predictive scaling policy. +type PredictiveScalingCustomizedCapacityMetric struct { + + // One or more metric data queries to provide the data points for a capacity + // metric. Use multiple metric data queries only if you are performing a math + // expression on returned data. + // + // This member is required. + MetricDataQueries []MetricDataQuery + + noSmithyDocumentSerde +} + +// Describes a custom load metric for a predictive scaling policy. +type PredictiveScalingCustomizedLoadMetric struct { + + // One or more metric data queries to provide the data points for a load metric. + // Use multiple metric data queries only if you are performing a math expression on + // returned data. + // + // This member is required. + MetricDataQueries []MetricDataQuery + + noSmithyDocumentSerde +} + +// Describes a custom scaling metric for a predictive scaling policy. +type PredictiveScalingCustomizedScalingMetric struct { + + // One or more metric data queries to provide the data points for a scaling metric. + // Use multiple metric data queries only if you are performing a math expression on + // returned data. + // + // This member is required. + MetricDataQueries []MetricDataQuery + + noSmithyDocumentSerde +} + // This structure specifies the metrics and target utilization settings for a // predictive scaling policy. You must specify either a metric pair, or a load // metric and a scaling metric individually. Specifying a metric pair instead of @@ -1857,21 +1995,39 @@ type PredictiveScalingConfiguration struct { // group in each hour of the forecast period so that the average number of requests // received by each instance is as close to 1000 requests per minute as possible at // all times. +// +// For information about using custom metrics with predictive scaling, +// see Advanced predictive scaling policy configurations using custom metrics +// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/predictive-scaling-customized-metric-specification.html) +// in the Amazon EC2 Auto Scaling User Guide. type PredictiveScalingMetricSpecification struct { - // Specifies the target utilization. + // Specifies the target utilization. Some metrics are based on a count instead of a + // percentage, such as the request count for an Application Load Balancer or the + // number of messages in an SQS queue. If the scaling policy specifies one of these + // metrics, specify the target utilization as the optimal average request or + // message count per instance during any one-minute interval. // // This member is required. TargetValue *float64 - // The load metric specification. + // The customized capacity metric specification. + CustomizedCapacityMetricSpecification *PredictiveScalingCustomizedCapacityMetric + + // The customized load metric specification. + CustomizedLoadMetricSpecification *PredictiveScalingCustomizedLoadMetric + + // The customized scaling metric specification. + CustomizedScalingMetricSpecification *PredictiveScalingCustomizedScalingMetric + + // The predefined load metric specification. PredefinedLoadMetricSpecification *PredictiveScalingPredefinedLoadMetric - // The metric pair specification from which Amazon EC2 Auto Scaling determines the - // appropriate scaling metric and load metric to use. + // The predefined metric pair specification from which Amazon EC2 Auto Scaling + // determines the appropriate scaling metric and load metric to use. PredefinedMetricPairSpecification *PredictiveScalingPredefinedMetricPair - // The scaling metric specification. + // The predefined scaling metric specification. PredefinedScalingMetricSpecification *PredictiveScalingPredefinedScalingMetric noSmithyDocumentSerde diff --git a/service/autoscaling/validators.go b/service/autoscaling/validators.go index d67bf645cce..01936362d50 100644 --- a/service/autoscaling/validators.go +++ b/service/autoscaling/validators.go @@ -1299,6 +1299,66 @@ func validateMemoryMiBRequest(v *types.MemoryMiBRequest) error { } } +func validateMetric(v *types.Metric) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Metric"} + if v.Namespace == nil { + invalidParams.Add(smithy.NewErrParamRequired("Namespace")) + } + if v.MetricName == nil { + invalidParams.Add(smithy.NewErrParamRequired("MetricName")) + } + if v.Dimensions != nil { + if err := validateMetricDimensions(v.Dimensions); err != nil { + invalidParams.AddNested("Dimensions", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMetricDataQueries(v []types.MetricDataQuery) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MetricDataQueries"} + for i := range v { + if err := validateMetricDataQuery(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMetricDataQuery(v *types.MetricDataQuery) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MetricDataQuery"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if v.MetricStat != nil { + if err := validateMetricStat(v.MetricStat); err != nil { + invalidParams.AddNested("MetricStat", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateMetricDimension(v *types.MetricDimension) error { if v == nil { return nil @@ -1334,6 +1394,28 @@ func validateMetricDimensions(v []types.MetricDimension) error { } } +func validateMetricStat(v *types.MetricStat) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MetricStat"} + if v.Metric == nil { + invalidParams.Add(smithy.NewErrParamRequired("Metric")) + } else if v.Metric != nil { + if err := validateMetric(v.Metric); err != nil { + invalidParams.AddNested("Metric", err.(smithy.InvalidParamsError)) + } + } + if v.Stat == nil { + invalidParams.Add(smithy.NewErrParamRequired("Stat")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateMixedInstancesPolicy(v *types.MixedInstancesPolicy) error { if v == nil { return nil @@ -1402,6 +1484,63 @@ func validatePredictiveScalingConfiguration(v *types.PredictiveScalingConfigurat } } +func validatePredictiveScalingCustomizedCapacityMetric(v *types.PredictiveScalingCustomizedCapacityMetric) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PredictiveScalingCustomizedCapacityMetric"} + if v.MetricDataQueries == nil { + invalidParams.Add(smithy.NewErrParamRequired("MetricDataQueries")) + } else if v.MetricDataQueries != nil { + if err := validateMetricDataQueries(v.MetricDataQueries); err != nil { + invalidParams.AddNested("MetricDataQueries", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePredictiveScalingCustomizedLoadMetric(v *types.PredictiveScalingCustomizedLoadMetric) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PredictiveScalingCustomizedLoadMetric"} + if v.MetricDataQueries == nil { + invalidParams.Add(smithy.NewErrParamRequired("MetricDataQueries")) + } else if v.MetricDataQueries != nil { + if err := validateMetricDataQueries(v.MetricDataQueries); err != nil { + invalidParams.AddNested("MetricDataQueries", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePredictiveScalingCustomizedScalingMetric(v *types.PredictiveScalingCustomizedScalingMetric) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PredictiveScalingCustomizedScalingMetric"} + if v.MetricDataQueries == nil { + invalidParams.Add(smithy.NewErrParamRequired("MetricDataQueries")) + } else if v.MetricDataQueries != nil { + if err := validateMetricDataQueries(v.MetricDataQueries); err != nil { + invalidParams.AddNested("MetricDataQueries", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validatePredictiveScalingMetricSpecification(v *types.PredictiveScalingMetricSpecification) error { if v == nil { return nil @@ -1425,6 +1564,21 @@ func validatePredictiveScalingMetricSpecification(v *types.PredictiveScalingMetr invalidParams.AddNested("PredefinedLoadMetricSpecification", err.(smithy.InvalidParamsError)) } } + if v.CustomizedScalingMetricSpecification != nil { + if err := validatePredictiveScalingCustomizedScalingMetric(v.CustomizedScalingMetricSpecification); err != nil { + invalidParams.AddNested("CustomizedScalingMetricSpecification", err.(smithy.InvalidParamsError)) + } + } + if v.CustomizedLoadMetricSpecification != nil { + if err := validatePredictiveScalingCustomizedLoadMetric(v.CustomizedLoadMetricSpecification); err != nil { + invalidParams.AddNested("CustomizedLoadMetricSpecification", err.(smithy.InvalidParamsError)) + } + } + if v.CustomizedCapacityMetricSpecification != nil { + if err := validatePredictiveScalingCustomizedCapacityMetric(v.CustomizedCapacityMetricSpecification); err != nil { + invalidParams.AddNested("CustomizedCapacityMetricSpecification", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/backup/api_op_CreateBackupPlan.go b/service/backup/api_op_CreateBackupPlan.go index 77c6cd580ea..a2537c166cc 100644 --- a/service/backup/api_op_CreateBackupPlan.go +++ b/service/backup/api_op_CreateBackupPlan.go @@ -47,7 +47,8 @@ type CreateBackupPlanInput struct { // Identifies the request and allows failed requests to be retried without the risk // of running the operation twice. If the request includes a CreatorRequestId that // matches an existing backup plan, that plan is returned. This parameter is - // optional. + // optional. If used, this parameter must contain 1 to 50 alphanumeric or '-_.' + // characters. CreatorRequestId *string noSmithyDocumentSerde diff --git a/service/backup/api_op_CreateBackupSelection.go b/service/backup/api_op_CreateBackupSelection.go index 3a7edfa9350..33f65c6cae6 100644 --- a/service/backup/api_op_CreateBackupSelection.go +++ b/service/backup/api_op_CreateBackupSelection.go @@ -13,26 +13,8 @@ import ( ) // Creates a JSON document that specifies a set of resources to assign to a backup -// plan. Resources can be included by specifying patterns for a ListOfTags and -// selected Resources. For example, consider the following patterns: -// -// * Resources: -// "arn:aws:ec2:region:account-id:volume/volume-id" -// -// * -// ConditionKey:"department"ConditionValue:"finance"ConditionType:"StringEquals" -// -// * -// ConditionKey:"importance"ConditionValue:"critical"ConditionType:"StringEquals" -// -// Using -// these patterns would back up all Amazon Elastic Block Store (Amazon EBS) volumes -// that are tagged as "department=finance", "importance=critical", in addition to -// an EBS volume with the specified volume ID. Resources and conditions are -// additive in that all resources that match the pattern are selected. This -// shouldn't be confused with a logical AND, where all conditions must match. The -// matching patterns are logically put together using the OR operator. In other -// words, all patterns that match are selected for backup. +// plan. For examples, see Assigning resources programmatically +// (https://docs.aws.amazon.com/assigning-resources.html#assigning-resources-json). func (c *Client) CreateBackupSelection(ctx context.Context, params *CreateBackupSelectionInput, optFns ...func(*Options)) (*CreateBackupSelectionOutput, error) { if params == nil { params = &CreateBackupSelectionInput{} @@ -62,7 +44,9 @@ type CreateBackupSelectionInput struct { BackupSelection *types.BackupSelection // A unique string that identifies the request and allows failed requests to be - // retried without the risk of running the operation twice. + // retried without the risk of running the operation twice. This parameter is + // optional. If used, this parameter must contain 1 to 50 alphanumeric or '-_.' + // characters. CreatorRequestId *string noSmithyDocumentSerde diff --git a/service/backup/api_op_CreateBackupVault.go b/service/backup/api_op_CreateBackupVault.go index b40a78a6825..8368674b292 100644 --- a/service/backup/api_op_CreateBackupVault.go +++ b/service/backup/api_op_CreateBackupVault.go @@ -45,7 +45,9 @@ type CreateBackupVaultInput struct { BackupVaultTags map[string]string // A unique string that identifies the request and allows failed requests to be - // retried without the risk of running the operation twice. + // retried without the risk of running the operation twice. This parameter is + // optional. If used, this parameter must contain 1 to 50 alphanumeric or '-_.' + // characters. CreatorRequestId *string // The server-side encryption key that is used to protect your backups; for diff --git a/service/backup/api_op_DescribeRegionSettings.go b/service/backup/api_op_DescribeRegionSettings.go index e2e46cb5cb1..f095413438a 100644 --- a/service/backup/api_op_DescribeRegionSettings.go +++ b/service/backup/api_op_DescribeRegionSettings.go @@ -36,6 +36,11 @@ type DescribeRegionSettingsInput struct { type DescribeRegionSettingsOutput struct { + // Returns whether a DynamoDB recovery point was taken using Backup's advanced + // DynamoDB backup features + // (https://docs.aws.amazon.com/aws-backup/latest/devguide/advanced-ddb-backup.html). + ResourceTypeManagementPreference map[string]bool + // Returns a list of all services along with the opt-in preferences in the Region. ResourceTypeOptInPreference map[string]bool diff --git a/service/backup/api_op_PutBackupVaultLockConfiguration.go b/service/backup/api_op_PutBackupVaultLockConfiguration.go index b19fb21d459..1fcf88de601 100644 --- a/service/backup/api_op_PutBackupVaultLockConfiguration.go +++ b/service/backup/api_op_PutBackupVaultLockConfiguration.go @@ -15,7 +15,8 @@ import ( // attempts to update the lifecycle policy that controls the retention period of // any recovery point currently stored in a backup vault. If specified, Vault Lock // enforces a minimum and maximum retention period for future backup and copy jobs -// that target a backup vault. +// that target a backup vault. Backup Vault Lock has yet to receive a third-party +// assessment for SEC 17a-4(f) and CFTC. func (c *Client) PutBackupVaultLockConfiguration(ctx context.Context, params *PutBackupVaultLockConfigurationInput, optFns ...func(*Options)) (*PutBackupVaultLockConfigurationOutput, error) { if params == nil { params = &PutBackupVaultLockConfigurationInput{} diff --git a/service/backup/api_op_PutBackupVaultNotifications.go b/service/backup/api_op_PutBackupVaultNotifications.go index 769b970e88e..329f67da773 100644 --- a/service/backup/api_op_PutBackupVaultNotifications.go +++ b/service/backup/api_op_PutBackupVaultNotifications.go @@ -30,11 +30,22 @@ func (c *Client) PutBackupVaultNotifications(ctx context.Context, params *PutBac type PutBackupVaultNotificationsInput struct { // An array of events that indicate the status of jobs to back up resources to the - // backup vault. The following events are supported: BACKUP_JOB_STARTED, - // BACKUP_JOB_COMPLETED, COPY_JOB_STARTED, COPY_JOB_SUCCESSFUL, COPY_JOB_FAILED, - // RESTORE_JOB_STARTED, RESTORE_JOB_COMPLETED, and RECOVERY_POINT_MODIFIED. To find - // failed backup jobs, use BACKUP_JOB_COMPLETED and filter using event metadata. - // Other events in the following list are deprecated. + // backup vault. For common use cases and code samples, see Using Amazon SNS to + // track Backup events + // (https://docs.aws.amazon.com/aws-backup/latest/devguide/sns-notifications.html). + // The following events are supported: + // + // * BACKUP_JOB_STARTED | + // BACKUP_JOB_COMPLETED + // + // * COPY_JOB_STARTED | COPY_JOB_SUCCESSFUL | + // COPY_JOB_FAILED + // + // * RESTORE_JOB_STARTED | RESTORE_JOB_COMPLETED | + // RECOVERY_POINT_MODIFIED + // + // Ignore the list below because it includes deprecated + // events. Refer to the list above. // // This member is required. BackupVaultEvents []types.BackupVaultEvent diff --git a/service/backup/api_op_TagResource.go b/service/backup/api_op_TagResource.go index 96adcb3aced..bfe4e702139 100644 --- a/service/backup/api_op_TagResource.go +++ b/service/backup/api_op_TagResource.go @@ -36,7 +36,8 @@ type TagResourceInput struct { ResourceArn *string // Key-value pairs that are used to help organize your resources. You can assign - // your own metadata to the resources you create. + // your own metadata to the resources you create. For clarity, this is the + // structure to assign tags: [{"Key":"string","Value":"string"}]. // // This member is required. Tags map[string]string diff --git a/service/backup/api_op_UpdateRegionSettings.go b/service/backup/api_op_UpdateRegionSettings.go index 263d7782c95..d1ab1d92af2 100644 --- a/service/backup/api_op_UpdateRegionSettings.go +++ b/service/backup/api_op_UpdateRegionSettings.go @@ -33,6 +33,11 @@ func (c *Client) UpdateRegionSettings(ctx context.Context, params *UpdateRegionS type UpdateRegionSettingsInput struct { + // Enables or disables Backup's advanced DynamoDB backup features + // (https://docs.aws.amazon.com/aws-backup/latest/devguide/advanced-ddb-backup.html) + // for the Region. + ResourceTypeManagementPreference map[string]bool + // Updates the list of services along with the opt-in preferences for the Region. ResourceTypeOptInPreference map[string]bool diff --git a/service/backup/deserializers.go b/service/backup/deserializers.go index 9bf3a054a95..7bf77145b1c 100644 --- a/service/backup/deserializers.go +++ b/service/backup/deserializers.go @@ -3787,6 +3787,11 @@ func awsRestjson1_deserializeOpDocumentDescribeRegionSettingsOutput(v **Describe for key, value := range shape { switch key { + case "ResourceTypeManagementPreference": + if err := awsRestjson1_deserializeDocumentResourceTypeManagementPreference(&sv.ResourceTypeManagementPreference, value); err != nil { + return err + } + case "ResourceTypeOptInPreference": if err := awsRestjson1_deserializeDocumentResourceTypeOptInPreference(&sv.ResourceTypeOptInPreference, value); err != nil { return err @@ -10429,6 +10434,9 @@ func awsRestjson1_deserializeOpErrorUpdateRecoveryPointLifecycle(response *smith case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("MissingParameterValueException", errorCode): return awsRestjson1_deserializeErrorMissingParameterValueException(response, errorBody) @@ -15258,6 +15266,42 @@ func awsRestjson1_deserializeDocumentResourceTypeList(v *[]string, value interfa return nil } +func awsRestjson1_deserializeDocumentResourceTypeManagementPreference(v *map[string]bool, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]bool + if *v == nil { + mv = map[string]bool{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal bool + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected IsEnabled to be of type *bool, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + func awsRestjson1_deserializeDocumentResourceTypeOptInPreference(v *map[string]bool, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/backup/serializers.go b/service/backup/serializers.go index 455c5b444b6..b11dfdbc17c 100644 --- a/service/backup/serializers.go +++ b/service/backup/serializers.go @@ -4512,6 +4512,13 @@ func awsRestjson1_serializeOpDocumentUpdateRegionSettingsInput(v *UpdateRegionSe object := value.Object() defer object.Close() + if v.ResourceTypeManagementPreference != nil { + ok := object.Key("ResourceTypeManagementPreference") + if err := awsRestjson1_serializeDocumentResourceTypeManagementPreference(v.ResourceTypeManagementPreference, ok); err != nil { + return err + } + } + if v.ResourceTypeOptInPreference != nil { ok := object.Key("ResourceTypeOptInPreference") if err := awsRestjson1_serializeDocumentResourceTypeOptInPreference(v.ResourceTypeOptInPreference, ok); err != nil { @@ -5178,6 +5185,17 @@ func awsRestjson1_serializeDocumentResourceTypeList(v []string, value smithyjson return nil } +func awsRestjson1_serializeDocumentResourceTypeManagementPreference(v map[string]bool, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.Boolean(v[key]) + } + return nil +} + func awsRestjson1_serializeDocumentResourceTypeOptInPreference(v map[string]bool, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/backup/types/types.go b/service/backup/types/types.go index ee6023c557c..90048a6e8c0 100644 --- a/service/backup/types/types.go +++ b/service/backup/types/types.go @@ -139,7 +139,8 @@ type BackupJob struct { // Services resources. type BackupPlan struct { - // The display name of a backup plan. + // The display name of a backup plan. Must contain 1 to 50 alphanumeric or '-_.' + // characters. // // This member is required. BackupPlanName *string @@ -161,7 +162,8 @@ type BackupPlan struct { // separate scheduled task. type BackupPlanInput struct { - // The optional display name of a backup plan. + // The display name of a backup plan. Must contain 1 to 50 alphanumeric or '-_.' + // characters. // // This member is required. BackupPlanName *string @@ -203,7 +205,9 @@ type BackupPlansListMember struct { CreationDate *time.Time // A unique string that identifies the request and allows failed requests to be - // retried without the risk of running the operation twice. + // retried without the risk of running the operation twice. This parameter is + // optional. If used, this parameter must contain 1 to 50 alphanumeric or '-_.' + // characters. CreatorRequestId *string // The date and time a backup plan is deleted, in Unix format and Coordinated @@ -240,7 +244,8 @@ type BackupPlanTemplatesListMember struct { // Specifies a scheduled task used to back up a selection of resources. type BackupRule struct { - // An optional display name for a backup rule. + // A display name for a backup rule. Must contain 1 to 50 alphanumeric or '-_.' + // characters. // // This member is required. RuleName *string @@ -285,11 +290,13 @@ type BackupRule struct { RuleId *string // A cron expression in UTC specifying when Backup initiates a backup job. For more - // information about cron expressions, see Schedule Expressions for Rules + // information about Amazon Web Services cron expressions, see Schedule Expressions + // for Rules // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html) - // in the Amazon CloudWatch Events User Guide.. Prior to specifying a value for - // this parameter, we recommend testing your cron expression using one of the many - // available cron generator and testing tools. + // in the Amazon CloudWatch Events User Guide.. Two examples of Amazon Web Services + // cron expressions are 15 * ? * * * (take a backup every hour at 15 minutes past + // the hour) and 0 12 * * ? * (take a backup every day at 12 noon UTC). For a table + // of examples, click the preceding link and scroll down the page. ScheduleExpression *string // A value in minutes after a backup is scheduled before a job will be canceled if @@ -302,7 +309,8 @@ type BackupRule struct { // Specifies a scheduled task used to back up a selection of resources. type BackupRuleInput struct { - // An optional display name for a backup rule. + // A display name for a backup rule. Must contain 1 to 50 alphanumeric or '-_.' + // characters. // // This member is required. RuleName *string @@ -361,22 +369,50 @@ type BackupSelection struct { // This member is required. IamRoleArn *string - // The display name of a resource selection document. + // The display name of a resource selection document. Must contain 1 to 50 + // alphanumeric or '-_.' characters. // // This member is required. SelectionName *string + // A list of conditions that you define to assign resources to your backup plans + // using tags. For example, "StringEquals": {"Department": "accounting". Condition + // operators are case sensitive. Conditions differs from ListOfTags as follows: + // + // * + // When you specify more than one condition, you only assign the resources that + // match ALL conditions (using AND logic). + // + // * Conditions supports StringEquals, + // StringLike, StringNotEquals, and StringNotLike. ListOfTags only supports + // StringEquals. Conditions *Conditions - // An array of conditions used to specify a set of resources to assign to a backup - // plan; for example, "StringEquals": {"ec2:ResourceTag/Department": "accounting". - // Assigns the backup plan to every resource with at least one matching tag. + // A list of conditions that you define to assign resources to your backup plans + // using tags. For example, "StringEquals": {"Department": "accounting". Condition + // operators are case sensitive. ListOfTags differs from Conditions as follows: + // + // * + // When you specify more than one condition, you assign all resources that match AT + // LEAST ONE condition (using OR logic). + // + // * ListOfTags only supports StringEquals. + // Conditions supports StringEquals, StringLike, StringNotEquals, and + // StringNotLike. ListOfTags []Condition + // A list of Amazon Resource Names (ARNs) to exclude from a backup plan. The + // maximum number of ARNs is 500 without wildcards, or 30 ARNs with wildcards. If + // you need to exclude many resources from a backup plan, consider a different + // resource selection strategy, such as assigning only one or a few resource types + // or refining your resource selection using tags. NotResources []string - // An array of strings that contain Amazon Resource Names (ARNs) of resources to - // assign to a backup plan. + // A list of Amazon Resource Names (ARNs) to assign to a backup plan. The maximum + // number of ARNs is 500 without wildcards, or 30 ARNs with wildcards. If you need + // to assign many resources to a backup plan, consider a different resource + // selection strategy, such as assigning all resources of a resource type or + // refining your resource selection using tags. Resources []string noSmithyDocumentSerde @@ -395,7 +431,9 @@ type BackupSelectionsListMember struct { CreationDate *time.Time // A unique string that identifies the request and allows failed requests to be - // retried without the risk of running the operation twice. + // retried without the risk of running the operation twice. This parameter is + // optional. If used, this parameter must contain 1 to 50 alphanumeric or '-_.' + // characters. CreatorRequestId *string // Specifies the IAM role Amazon Resource Name (ARN) to create the target recovery @@ -431,7 +469,9 @@ type BackupVaultListMember struct { CreationDate *time.Time // A unique string that identifies the request and allows failed requests to be - // retried without the risk of running the operation twice. + // retried without the risk of running the operation twice. This parameter is + // optional. If used, this parameter must contain 1 to 50 alphanumeric or '-_.' + // characters. CreatorRequestId *string // The server-side encryption key that is used to protect your backups; for @@ -504,24 +544,27 @@ type CalculatedLifecycle struct { } // Contains an array of triplets made up of a condition type (such as -// StringEquals), a key, and a value. Conditions are used to filter resources in a -// selection that is assigned to a backup plan. +// StringEquals), a key, and a value. Used to filter resources using their tags and +// assign them to a backup plan. Case sensitive. type Condition struct { - // The key in a key-value pair. For example, in "ec2:ResourceTag/Department": - // "accounting", "ec2:ResourceTag/Department" is the key. + // The key in a key-value pair. For example, in the tag Department: Accounting, + // Department is the key. // // This member is required. ConditionKey *string - // An operation, such as StringEquals, that is applied to a key-value pair used to - // filter resources in a selection. + // An operation applied to a key-value pair used to assign resources to your backup + // plan. Condition only supports StringEquals. For more flexible assignment + // options, incluidng StringLike and the ability to exclude resources from your + // backup plan, use Conditions (with an "s" on the end) for your BackupSelection + // (https://docs.aws.amazon.com/aws-backup/latest/devguide/API_BackupSelection.html). // // This member is required. ConditionType ConditionType - // The value in a key-value pair. For example, in "ec2:ResourceTag/Department": - // "accounting", "accounting" is the value. + // The value in a key-value pair. For example, in the tag Department: Accounting, + // Accounting is the value. // // This member is required. ConditionValue *string @@ -529,21 +572,40 @@ type Condition struct { noSmithyDocumentSerde } +// Includes information about tags you define to assign tagged resources to a +// backup plan. type ConditionParameter struct { + + // The key in a key-value pair. For example, in the tag Department: Accounting, + // Department is the key. ConditionKey *string + // The value in a key-value pair. For example, in the tag Department: Accounting, + // Accounting is the value. ConditionValue *string noSmithyDocumentSerde } +// Contains information about which resources to include or exclude from a backup +// plan using their tags. Conditions are case sensitive. type Conditions struct { + + // Filters the values of your tagged resources for only those resources that you + // tagged with the same value. Also called "exact matching." StringEquals []ConditionParameter + // Filters the values of your tagged resources for matching tag values with the use + // of a wildcard character (*) anywhere in the string. For example, "prod*" or + // "*rod*" matches the tag value "production". StringLike []ConditionParameter + // Filters the values of your tagged resources for only those resources that you + // tagged that do not have the same value. Also called "negated matching." StringNotEquals []ConditionParameter + // Filters the values of your tagged resources for non-matching tag values with the + // use of a wildcard character (*) anywhere in the string. StringNotLike []ConditionParameter noSmithyDocumentSerde @@ -565,11 +627,12 @@ type ControlInputParameter struct { } // A framework consists of one or more controls. Each control has its own control -// scope. The control scope defines what the control will evaluate. Three examples -// of control scopes are: a specific backup plan, all backup plans with a specific -// tag, or all backup plans. To set a control scope that includes all of a -// particular resource, leave the ControlScope empty or do not pass it when calling -// CreateFramework. +// scope. The control scope can include one or more resource types, a combination +// of a tag key and value, or a combination of one resource type and one resource +// ID. If no scope is specified, evaluations for the rule are triggered when any +// resource in your recording group changes in configuration. To set a control +// scope that includes all of a particular resource, leave the ControlScope empty +// or do not pass it when calling CreateFramework. type ControlScope struct { // The ID of the only Amazon Web Services resource that you want your control scope @@ -580,8 +643,10 @@ type ControlScope struct { // such as EFS or RDS. ComplianceResourceTypes []string - // Describes whether the control scope includes resources with one or more tags. - // Each tag is a key-value pair. + // The tag key-value pair applied to those Amazon Web Services resources that you + // want to trigger an evaluation for a rule. A maximum of one key-value pair can be + // provided. The tag value is optional, but it cannot be an empty string. The + // structure to assign a tag is: [{"Key":"string","Value":"string"}]. Tags map[string]string noSmithyDocumentSerde diff --git a/service/braket/api_op_CancelJob.go b/service/braket/api_op_CancelJob.go new file mode 100644 index 00000000000..69c7f008081 --- /dev/null +++ b/service/braket/api_op_CancelJob.go @@ -0,0 +1,128 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package braket + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/braket/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Cancels an Amazon Braket job. +func (c *Client) CancelJob(ctx context.Context, params *CancelJobInput, optFns ...func(*Options)) (*CancelJobOutput, error) { + if params == nil { + params = &CancelJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CancelJob", params, optFns, c.addOperationCancelJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CancelJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CancelJobInput struct { + + // The ARN of the Amazon Braket job to cancel. + // + // This member is required. + JobArn *string + + noSmithyDocumentSerde +} + +type CancelJobOutput struct { + + // The status of the job cancellation request. + // + // This member is required. + CancellationStatus types.CancellationStatus + + // The ARN of the Amazon Braket job. + // + // This member is required. + JobArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCancelJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCancelJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCancelJob{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCancelJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelJob(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCancelJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "braket", + OperationName: "CancelJob", + } +} diff --git a/service/braket/api_op_CreateJob.go b/service/braket/api_op_CreateJob.go new file mode 100644 index 00000000000..77fa932e3e5 --- /dev/null +++ b/service/braket/api_op_CreateJob.go @@ -0,0 +1,181 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package braket + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/braket/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an Amazon Braket job. +func (c *Client) CreateJob(ctx context.Context, params *CreateJobInput, optFns ...func(*Options)) (*CreateJobOutput, error) { + if params == nil { + params = &CreateJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateJob", params, optFns, c.addOperationCreateJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateJobInput struct { + + // Definition of the Amazon Braket job to be created. Specifies the container image + // the job uses and information about the Python scripts used for entry and + // training. + // + // This member is required. + AlgorithmSpecification *types.AlgorithmSpecification + + // A unique token that guarantees that the call to this API is idempotent. + // + // This member is required. + ClientToken *string + + // The quantum processing unit (QPU) or simulator used to create an Amazon Braket + // job. + // + // This member is required. + DeviceConfig *types.DeviceConfig + + // Configuration of the resource instances to use while running the hybrid job on + // Amazon Braket. + // + // This member is required. + InstanceConfig *types.InstanceConfig + + // The name of the Amazon Braket job. + // + // This member is required. + JobName *string + + // The path to the S3 location where you want to store job artifacts and the + // encryption key used to store them. + // + // This member is required. + OutputDataConfig *types.JobOutputDataConfig + + // The Amazon Resource Name (ARN) of an IAM role that Amazon Braket can assume to + // perform tasks on behalf of a user. It can access user resources, run an Amazon + // Braket job container on behalf of user, and output resources to the users' s3 + // buckets. + // + // This member is required. + RoleArn *string + + // Information about the output locations for job checkpoint data. + CheckpointConfig *types.JobCheckpointConfig + + // Algorithm-specific parameters used by an Amazon Braket job that influence the + // quality of the training job. The values are set with a string of JSON key:value + // pairs, where the key is the name of the hyperparameter and the value is the + // value of th hyperparameter. + HyperParameters map[string]string + + // A list of parameters that specify the name and type of input data and where it + // is located. + InputDataConfig []types.InputFileConfig + + // The user-defined criteria that specifies when a job stops running. + StoppingCondition *types.JobStoppingCondition + + // A tag object that consists of a key and an optional value, used to manage + // metadata for Amazon Braket resources. + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateJobOutput struct { + + // The ARN of the Amazon Braket job created. + // + // This member is required. + JobArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateJob{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateJob(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "braket", + OperationName: "CreateJob", + } +} diff --git a/service/braket/api_op_CreateQuantumTask.go b/service/braket/api_op_CreateQuantumTask.go index c5850fefbc3..aadab502e2f 100644 --- a/service/braket/api_op_CreateQuantumTask.go +++ b/service/braket/api_op_CreateQuantumTask.go @@ -65,6 +65,9 @@ type CreateQuantumTaskInput struct { // This value conforms to the media type: application/json DeviceParameters *string + // The token for an Amazon Braket job that associates it with the quantum task. + JobToken *string + // Tags to be added to the quantum task you're creating. Tags map[string]string diff --git a/service/braket/api_op_GetJob.go b/service/braket/api_op_GetJob.go new file mode 100644 index 00000000000..80d7c84ffd9 --- /dev/null +++ b/service/braket/api_op_GetJob.go @@ -0,0 +1,205 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package braket + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/braket/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Retrieves the specified Amazon Braket job. +func (c *Client) GetJob(ctx context.Context, params *GetJobInput, optFns ...func(*Options)) (*GetJobOutput, error) { + if params == nil { + params = &GetJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetJob", params, optFns, c.addOperationGetJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetJobInput struct { + + // The ARN of the job to retrieve. + // + // This member is required. + JobArn *string + + noSmithyDocumentSerde +} + +type GetJobOutput struct { + + // Definition of the Amazon Braket job created. Specifies the container image the + // job uses, information about the Python scripts used for entry and training, and + // the user-defined metrics used to evaluation the job. + // + // This member is required. + AlgorithmSpecification *types.AlgorithmSpecification + + // The date and time that the Amazon Braket job was created. + // + // This member is required. + CreatedAt *time.Time + + // The resource instances to use while running the hybrid job on Amazon Braket. + // + // This member is required. + InstanceConfig *types.InstanceConfig + + // The ARN of the Amazon Braket job. + // + // This member is required. + JobArn *string + + // The name of the Amazon Braket job. + // + // This member is required. + JobName *string + + // The path to the S3 location where job artifacts are stored and the encryption + // key used to store them there. + // + // This member is required. + OutputDataConfig *types.JobOutputDataConfig + + // The Amazon Resource Name (ARN) of an IAM role that Amazon Braket can assume to + // perform tasks on behalf of a user. It can access user resources, run an Amazon + // Braket job container on behalf of user, and output resources to the s3 buckets + // of a user. + // + // This member is required. + RoleArn *string + + // The status of the Amazon Braket job. + // + // This member is required. + Status types.JobPrimaryStatus + + // The billable time the Amazon Braket job used to complete. + BillableDuration *int32 + + // Information about the output locations for job checkpoint data. + CheckpointConfig *types.JobCheckpointConfig + + // The quantum processing unit (QPU) or simulator used to run the Amazon Braket + // job. + DeviceConfig *types.DeviceConfig + + // The date and time that the Amazon Braket job ended. + EndedAt *time.Time + + // Details about the type and time events occurred related to the Amazon Braket + // job. + Events []types.JobEventDetails + + // A description of the reason why an Amazon Braket job failed, if it failed. + FailureReason *string + + // Algorithm-specific parameters used by an Amazon Braket job that influence the + // quality of the traiing job. The values are set with a string of JSON key:value + // pairs, where the key is the name of the hyperparameter and the value is the + // value of th hyperparameter. + HyperParameters map[string]string + + // A list of parameters that specify the name and type of input data and where it + // is located. + InputDataConfig []types.InputFileConfig + + // The date and time that the Amazon Braket job was started. + StartedAt *time.Time + + // The user-defined criteria that specifies when to stop a job running. + StoppingCondition *types.JobStoppingCondition + + // A tag object that consists of a key and an optional value, used to manage + // metadata for Amazon Braket resources. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetJob{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetJob(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "braket", + OperationName: "GetJob", + } +} diff --git a/service/braket/api_op_GetQuantumTask.go b/service/braket/api_op_GetQuantumTask.go index 4ad881efffb..cd7daab3e07 100644 --- a/service/braket/api_op_GetQuantumTask.go +++ b/service/braket/api_op_GetQuantumTask.go @@ -88,6 +88,9 @@ type GetQuantumTaskOutput struct { // The reason that a task failed. FailureReason *string + // The ARN of the Amazon Braket job associated with the quantum task. + JobArn *string + // The tags that belong to this task. Tags map[string]string diff --git a/service/braket/api_op_SearchJobs.go b/service/braket/api_op_SearchJobs.go new file mode 100644 index 00000000000..ad6abbfcb32 --- /dev/null +++ b/service/braket/api_op_SearchJobs.go @@ -0,0 +1,223 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package braket + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/braket/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Searches for Amazon Braket jobs that match the specified filter values. +func (c *Client) SearchJobs(ctx context.Context, params *SearchJobsInput, optFns ...func(*Options)) (*SearchJobsOutput, error) { + if params == nil { + params = &SearchJobsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SearchJobs", params, optFns, c.addOperationSearchJobsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SearchJobsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SearchJobsInput struct { + + // The filter values to use when searching for a job. + // + // This member is required. + Filters []types.SearchJobsFilter + + // The maximum number of results to return in the response. + MaxResults *int32 + + // A token used for pagination of results returned in the response. Use the token + // returned from the previous request to continue results where the previous + // request ended. + NextToken *string + + noSmithyDocumentSerde +} + +type SearchJobsOutput struct { + + // An array of JobSummary objects for devices that match the specified filter + // values. + // + // This member is required. + Jobs []types.JobSummary + + // A token used for pagination of results, or null if there are no additional + // results. Use the token value in a subsequent request to continue results where + // the previous request ended. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSearchJobsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpSearchJobs{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpSearchJobs{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpSearchJobsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchJobs(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// SearchJobsAPIClient is a client that implements the SearchJobs operation. +type SearchJobsAPIClient interface { + SearchJobs(context.Context, *SearchJobsInput, ...func(*Options)) (*SearchJobsOutput, error) +} + +var _ SearchJobsAPIClient = (*Client)(nil) + +// SearchJobsPaginatorOptions is the paginator options for SearchJobs +type SearchJobsPaginatorOptions struct { + // The maximum number of results to return in the response. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// SearchJobsPaginator is a paginator for SearchJobs +type SearchJobsPaginator struct { + options SearchJobsPaginatorOptions + client SearchJobsAPIClient + params *SearchJobsInput + nextToken *string + firstPage bool +} + +// NewSearchJobsPaginator returns a new SearchJobsPaginator +func NewSearchJobsPaginator(client SearchJobsAPIClient, params *SearchJobsInput, optFns ...func(*SearchJobsPaginatorOptions)) *SearchJobsPaginator { + if params == nil { + params = &SearchJobsInput{} + } + + options := SearchJobsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &SearchJobsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *SearchJobsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next SearchJobs page. +func (p *SearchJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*SearchJobsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.SearchJobs(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opSearchJobs(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "braket", + OperationName: "SearchJobs", + } +} diff --git a/service/braket/deserializers.go b/service/braket/deserializers.go index b96599c5539..9bb9a8515dc 100644 --- a/service/braket/deserializers.go +++ b/service/braket/deserializers.go @@ -19,14 +19,14 @@ import ( "strings" ) -type awsRestjson1_deserializeOpCancelQuantumTask struct { +type awsRestjson1_deserializeOpCancelJob struct { } -func (*awsRestjson1_deserializeOpCancelQuantumTask) ID() string { +func (*awsRestjson1_deserializeOpCancelJob) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCancelQuantumTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCancelJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -40,9 +40,9 @@ func (m *awsRestjson1_deserializeOpCancelQuantumTask) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCancelQuantumTask(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCancelJob(response, &metadata) } - output := &CancelQuantumTaskOutput{} + output := &CancelJobOutput{} out.Result = output var buff [1024]byte @@ -63,7 +63,7 @@ func (m *awsRestjson1_deserializeOpCancelQuantumTask) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCancelQuantumTaskOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCancelJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -76,7 +76,7 @@ func (m *awsRestjson1_deserializeOpCancelQuantumTask) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorCancelQuantumTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCancelJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -145,7 +145,7 @@ func awsRestjson1_deserializeOpErrorCancelQuantumTask(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpDocumentCancelQuantumTaskOutput(v **CancelQuantumTaskOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCancelJobOutput(v **CancelJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -158,9 +158,9 @@ func awsRestjson1_deserializeOpDocumentCancelQuantumTaskOutput(v **CancelQuantum return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CancelQuantumTaskOutput + var sv *CancelJobOutput if *v == nil { - sv = &CancelQuantumTaskOutput{} + sv = &CancelJobOutput{} } else { sv = *v } @@ -176,13 +176,13 @@ func awsRestjson1_deserializeOpDocumentCancelQuantumTaskOutput(v **CancelQuantum sv.CancellationStatus = types.CancellationStatus(jtv) } - case "quantumTaskArn": + case "jobArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected QuantumTaskArn to be of type string, got %T instead", value) + return fmt.Errorf("expected JobArn to be of type string, got %T instead", value) } - sv.QuantumTaskArn = ptr.String(jtv) + sv.JobArn = ptr.String(jtv) } default: @@ -194,14 +194,14 @@ func awsRestjson1_deserializeOpDocumentCancelQuantumTaskOutput(v **CancelQuantum return nil } -type awsRestjson1_deserializeOpCreateQuantumTask struct { +type awsRestjson1_deserializeOpCancelQuantumTask struct { } -func (*awsRestjson1_deserializeOpCreateQuantumTask) ID() string { +func (*awsRestjson1_deserializeOpCancelQuantumTask) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateQuantumTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCancelQuantumTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -215,9 +215,9 @@ func (m *awsRestjson1_deserializeOpCreateQuantumTask) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateQuantumTask(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCancelQuantumTask(response, &metadata) } - output := &CreateQuantumTaskOutput{} + output := &CancelQuantumTaskOutput{} out.Result = output var buff [1024]byte @@ -238,7 +238,7 @@ func (m *awsRestjson1_deserializeOpCreateQuantumTask) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateQuantumTaskOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCancelQuantumTaskOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -251,7 +251,7 @@ func (m *awsRestjson1_deserializeOpCreateQuantumTask) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateQuantumTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCancelQuantumTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -295,14 +295,14 @@ func awsRestjson1_deserializeOpErrorCreateQuantumTask(response *smithyhttp.Respo case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("DeviceOfflineException", errorCode): - return awsRestjson1_deserializeErrorDeviceOfflineException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -320,7 +320,7 @@ func awsRestjson1_deserializeOpErrorCreateQuantumTask(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpDocumentCreateQuantumTaskOutput(v **CreateQuantumTaskOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCancelQuantumTaskOutput(v **CancelQuantumTaskOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -333,15 +333,24 @@ func awsRestjson1_deserializeOpDocumentCreateQuantumTaskOutput(v **CreateQuantum return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateQuantumTaskOutput + var sv *CancelQuantumTaskOutput if *v == nil { - sv = &CreateQuantumTaskOutput{} + sv = &CancelQuantumTaskOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "cancellationStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CancellationStatus to be of type string, got %T instead", value) + } + sv.CancellationStatus = types.CancellationStatus(jtv) + } + case "quantumTaskArn": if value != nil { jtv, ok := value.(string) @@ -360,14 +369,14 @@ func awsRestjson1_deserializeOpDocumentCreateQuantumTaskOutput(v **CreateQuantum return nil } -type awsRestjson1_deserializeOpGetDevice struct { +type awsRestjson1_deserializeOpCreateJob struct { } -func (*awsRestjson1_deserializeOpGetDevice) ID() string { +func (*awsRestjson1_deserializeOpCreateJob) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetDevice) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -381,9 +390,9 @@ func (m *awsRestjson1_deserializeOpGetDevice) HandleDeserialize(ctx context.Cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetDevice(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateJob(response, &metadata) } - output := &GetDeviceOutput{} + output := &CreateJobOutput{} out.Result = output var buff [1024]byte @@ -404,7 +413,7 @@ func (m *awsRestjson1_deserializeOpGetDevice) HandleDeserialize(ctx context.Cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetDeviceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -417,7 +426,7 @@ func (m *awsRestjson1_deserializeOpGetDevice) HandleDeserialize(ctx context.Cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetDevice(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -461,8 +470,8 @@ func awsRestjson1_deserializeOpErrorGetDevice(response *smithyhttp.Response, met case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("DeviceOfflineException", errorCode): - return awsRestjson1_deserializeErrorDeviceOfflineException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("DeviceRetiredException", errorCode): return awsRestjson1_deserializeErrorDeviceRetiredException(response, errorBody) @@ -470,8 +479,8 @@ func awsRestjson1_deserializeOpErrorGetDevice(response *smithyhttp.Response, met case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -489,7 +498,7 @@ func awsRestjson1_deserializeOpErrorGetDevice(response *smithyhttp.Response, met } } -func awsRestjson1_deserializeOpDocumentGetDeviceOutput(v **GetDeviceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateJobOutput(v **CreateJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -502,67 +511,22 @@ func awsRestjson1_deserializeOpDocumentGetDeviceOutput(v **GetDeviceOutput, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetDeviceOutput + var sv *CreateJobOutput if *v == nil { - sv = &GetDeviceOutput{} + sv = &CreateJobOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "deviceArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DeviceArn to be of type string, got %T instead", value) - } - sv.DeviceArn = ptr.String(jtv) - } - - case "deviceCapabilities": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected JsonValue to be of type string, got %T instead", value) - } - sv.DeviceCapabilities = ptr.String(jtv) - } - - case "deviceName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.DeviceName = ptr.String(jtv) - } - - case "deviceStatus": + case "jobArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DeviceStatus to be of type string, got %T instead", value) - } - sv.DeviceStatus = types.DeviceStatus(jtv) - } - - case "deviceType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DeviceType to be of type string, got %T instead", value) - } - sv.DeviceType = types.DeviceType(jtv) - } - - case "providerName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected JobArn to be of type string, got %T instead", value) } - sv.ProviderName = ptr.String(jtv) + sv.JobArn = ptr.String(jtv) } default: @@ -574,14 +538,14 @@ func awsRestjson1_deserializeOpDocumentGetDeviceOutput(v **GetDeviceOutput, valu return nil } -type awsRestjson1_deserializeOpGetQuantumTask struct { +type awsRestjson1_deserializeOpCreateQuantumTask struct { } -func (*awsRestjson1_deserializeOpGetQuantumTask) ID() string { +func (*awsRestjson1_deserializeOpCreateQuantumTask) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetQuantumTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateQuantumTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -595,9 +559,9 @@ func (m *awsRestjson1_deserializeOpGetQuantumTask) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetQuantumTask(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateQuantumTask(response, &metadata) } - output := &GetQuantumTaskOutput{} + output := &CreateQuantumTaskOutput{} out.Result = output var buff [1024]byte @@ -618,7 +582,7 @@ func (m *awsRestjson1_deserializeOpGetQuantumTask) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetQuantumTaskOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateQuantumTaskOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -631,7 +595,7 @@ func (m *awsRestjson1_deserializeOpGetQuantumTask) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetQuantumTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateQuantumTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -675,11 +639,17 @@ func awsRestjson1_deserializeOpErrorGetQuantumTask(response *smithyhttp.Response case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("DeviceOfflineException", errorCode): + return awsRestjson1_deserializeErrorDeviceOfflineException(response, errorBody) + + case strings.EqualFold("DeviceRetiredException", errorCode): + return awsRestjson1_deserializeErrorDeviceRetiredException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -697,7 +667,7 @@ func awsRestjson1_deserializeOpErrorGetQuantumTask(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentGetQuantumTaskOutput(v **GetQuantumTaskOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateQuantumTaskOutput(v **CreateQuantumTaskOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -710,86 +680,15 @@ func awsRestjson1_deserializeOpDocumentGetQuantumTaskOutput(v **GetQuantumTaskOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetQuantumTaskOutput + var sv *CreateQuantumTaskOutput if *v == nil { - sv = &GetQuantumTaskOutput{} + sv = &CreateQuantumTaskOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "createdAt": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(t) - } - - case "deviceArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DeviceArn to be of type string, got %T instead", value) - } - sv.DeviceArn = ptr.String(jtv) - } - - case "deviceParameters": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected JsonValue to be of type string, got %T instead", value) - } - sv.DeviceParameters = ptr.String(jtv) - } - - case "endedAt": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.EndedAt = ptr.Time(t) - } - - case "failureReason": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.FailureReason = ptr.String(jtv) - } - - case "outputS3Bucket": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.OutputS3Bucket = ptr.String(jtv) - } - - case "outputS3Directory": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.OutputS3Directory = ptr.String(jtv) - } - case "quantumTaskArn": if value != nil { jtv, ok := value.(string) @@ -799,33 +698,6 @@ func awsRestjson1_deserializeOpDocumentGetQuantumTaskOutput(v **GetQuantumTaskOu sv.QuantumTaskArn = ptr.String(jtv) } - case "shots": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected Long to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.Shots = ptr.Int64(i64) - } - - case "status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected QuantumTaskStatus to be of type string, got %T instead", value) - } - sv.Status = types.QuantumTaskStatus(jtv) - } - - case "tags": - if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { - return err - } - default: _, _ = key, value @@ -835,14 +707,14 @@ func awsRestjson1_deserializeOpDocumentGetQuantumTaskOutput(v **GetQuantumTaskOu return nil } -type awsRestjson1_deserializeOpListTagsForResource struct { +type awsRestjson1_deserializeOpGetDevice struct { } -func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { +func (*awsRestjson1_deserializeOpGetDevice) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetDevice) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -856,9 +728,9 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetDevice(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &GetDeviceOutput{} out.Result = output var buff [1024]byte @@ -879,7 +751,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetDeviceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -892,7 +764,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetDevice(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -933,12 +805,18 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) @@ -952,7 +830,7 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetDeviceOutput(v **GetDeviceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -965,18 +843,67 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTagsForResourceOutput + var sv *GetDeviceOutput if *v == nil { - sv = &ListTagsForResourceOutput{} + sv = &GetDeviceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "tags": - if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { - return err + case "deviceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeviceArn to be of type string, got %T instead", value) + } + sv.DeviceArn = ptr.String(jtv) + } + + case "deviceCapabilities": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JsonValue to be of type string, got %T instead", value) + } + sv.DeviceCapabilities = ptr.String(jtv) + } + + case "deviceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.DeviceName = ptr.String(jtv) + } + + case "deviceStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeviceStatus to be of type string, got %T instead", value) + } + sv.DeviceStatus = types.DeviceStatus(jtv) + } + + case "deviceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeviceType to be of type string, got %T instead", value) + } + sv.DeviceType = types.DeviceType(jtv) + } + + case "providerName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ProviderName = ptr.String(jtv) } default: @@ -988,14 +915,14 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return nil } -type awsRestjson1_deserializeOpSearchDevices struct { +type awsRestjson1_deserializeOpGetJob struct { } -func (*awsRestjson1_deserializeOpSearchDevices) ID() string { +func (*awsRestjson1_deserializeOpGetJob) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpSearchDevices) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1009,9 +936,9 @@ func (m *awsRestjson1_deserializeOpSearchDevices) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorSearchDevices(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetJob(response, &metadata) } - output := &SearchDevicesOutput{} + output := &GetJobOutput{} out.Result = output var buff [1024]byte @@ -1032,7 +959,7 @@ func (m *awsRestjson1_deserializeOpSearchDevices) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentSearchDevicesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1045,7 +972,7 @@ func (m *awsRestjson1_deserializeOpSearchDevices) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorSearchDevices(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1092,6 +1019,9 @@ func awsRestjson1_deserializeOpErrorSearchDevices(response *smithyhttp.Response, case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -1108,7 +1038,7 @@ func awsRestjson1_deserializeOpErrorSearchDevices(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentSearchDevicesOutput(v **SearchDevicesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetJobOutput(v **GetJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1121,27 +1051,160 @@ func awsRestjson1_deserializeOpDocumentSearchDevicesOutput(v **SearchDevicesOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *SearchDevicesOutput + var sv *GetJobOutput if *v == nil { - sv = &SearchDevicesOutput{} + sv = &GetJobOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "devices": - if err := awsRestjson1_deserializeDocumentDeviceSummaryList(&sv.Devices, value); err != nil { + case "algorithmSpecification": + if err := awsRestjson1_deserializeDocumentAlgorithmSpecification(&sv.AlgorithmSpecification, value); err != nil { return err } - case "nextToken": + case "billableDuration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BillableDuration = ptr.Int32(int32(i64)) + } + + case "checkpointConfig": + if err := awsRestjson1_deserializeDocumentJobCheckpointConfig(&sv.CheckpointConfig, value); err != nil { + return err + } + + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "deviceConfig": + if err := awsRestjson1_deserializeDocumentDeviceConfig(&sv.DeviceConfig, value); err != nil { + return err + } + + case "endedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.EndedAt = ptr.Time(t) + } + + case "events": + if err := awsRestjson1_deserializeDocumentJobEvents(&sv.Events, value); err != nil { + return err + } + + case "failureReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String1024 to be of type string, got %T instead", value) + } + sv.FailureReason = ptr.String(jtv) + } + + case "hyperParameters": + if err := awsRestjson1_deserializeDocumentHyperParameters(&sv.HyperParameters, value); err != nil { + return err + } + + case "inputDataConfig": + if err := awsRestjson1_deserializeDocumentInputConfigList(&sv.InputDataConfig, value); err != nil { + return err + } + + case "instanceConfig": + if err := awsRestjson1_deserializeDocumentInstanceConfig(&sv.InstanceConfig, value); err != nil { + return err + } + + case "jobArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobArn to be of type string, got %T instead", value) + } + sv.JobArn = ptr.String(jtv) + } + + case "jobName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.JobName = ptr.String(jtv) + } + + case "outputDataConfig": + if err := awsRestjson1_deserializeDocumentJobOutputDataConfig(&sv.OutputDataConfig, value); err != nil { + return err + } + + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + case "startedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.StartedAt = ptr.Time(t) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobPrimaryStatus to be of type string, got %T instead", value) + } + sv.Status = types.JobPrimaryStatus(jtv) + } + + case "stoppingCondition": + if err := awsRestjson1_deserializeDocumentJobStoppingCondition(&sv.StoppingCondition, value); err != nil { + return err + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { + return err } default: @@ -1153,14 +1216,14 @@ func awsRestjson1_deserializeOpDocumentSearchDevicesOutput(v **SearchDevicesOutp return nil } -type awsRestjson1_deserializeOpSearchQuantumTasks struct { +type awsRestjson1_deserializeOpGetQuantumTask struct { } -func (*awsRestjson1_deserializeOpSearchQuantumTasks) ID() string { +func (*awsRestjson1_deserializeOpGetQuantumTask) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpSearchQuantumTasks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetQuantumTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1174,9 +1237,9 @@ func (m *awsRestjson1_deserializeOpSearchQuantumTasks) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorSearchQuantumTasks(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetQuantumTask(response, &metadata) } - output := &SearchQuantumTasksOutput{} + output := &GetQuantumTaskOutput{} out.Result = output var buff [1024]byte @@ -1197,7 +1260,7 @@ func (m *awsRestjson1_deserializeOpSearchQuantumTasks) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentSearchQuantumTasksOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetQuantumTaskOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1210,7 +1273,7 @@ func (m *awsRestjson1_deserializeOpSearchQuantumTasks) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorSearchQuantumTasks(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetQuantumTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1257,6 +1320,9 @@ func awsRestjson1_deserializeOpErrorSearchQuantumTasks(response *smithyhttp.Resp case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -1273,7 +1339,7 @@ func awsRestjson1_deserializeOpErrorSearchQuantumTasks(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpDocumentSearchQuantumTasksOutput(v **SearchQuantumTasksOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetQuantumTaskOutput(v **GetQuantumTaskOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1286,46 +1352,148 @@ func awsRestjson1_deserializeOpDocumentSearchQuantumTasksOutput(v **SearchQuantu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *SearchQuantumTasksOutput + var sv *GetQuantumTaskOutput if *v == nil { - sv = &SearchQuantumTasksOutput{} + sv = &GetQuantumTaskOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "nextToken": + case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) } - case "quantumTasks": - if err := awsRestjson1_deserializeDocumentQuantumTaskSummaryList(&sv.QuantumTasks, value); err != nil { - return err + case "deviceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeviceArn to be of type string, got %T instead", value) + } + sv.DeviceArn = ptr.String(jtv) } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpTagResource struct { -} - -func (*awsRestjson1_deserializeOpTagResource) ID() string { - return "OperationDeserializer" -} + case "deviceParameters": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JsonValue to be of type string, got %T instead", value) + } + sv.DeviceParameters = ptr.String(jtv) + } -func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + case "endedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.EndedAt = ptr.Time(t) + } + + case "failureReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FailureReason = ptr.String(jtv) + } + + case "jobArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobArn to be of type string, got %T instead", value) + } + sv.JobArn = ptr.String(jtv) + } + + case "outputS3Bucket": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.OutputS3Bucket = ptr.String(jtv) + } + + case "outputS3Directory": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.OutputS3Directory = ptr.String(jtv) + } + + case "quantumTaskArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QuantumTaskArn to be of type string, got %T instead", value) + } + sv.QuantumTaskArn = ptr.String(jtv) + } + + case "shots": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Shots = ptr.Int64(i64) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QuantumTaskStatus to be of type string, got %T instead", value) + } + sv.Status = types.QuantumTaskStatus(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListTagsForResource struct { +} + +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1339,15 +1507,43 @@ func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) } - output := &TagResourceOutput{} + output := &ListTagsForResourceOutput{} out.Result = output + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + return out, metadata, err } -func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1407,14 +1603,50 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -type awsRestjson1_deserializeOpUntagResource struct { +func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListTagsForResourceOutput + if *v == nil { + sv = &ListTagsForResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "tags": + if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpUntagResource) ID() string { +type awsRestjson1_deserializeOpSearchDevices struct { +} + +func (*awsRestjson1_deserializeOpSearchDevices) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpSearchDevices) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1428,15 +1660,43 @@ func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorSearchDevices(response, &metadata) } - output := &UntagResourceOutput{} + output := &SearchDevicesOutput{} out.Result = output + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentSearchDevicesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + return out, metadata, err } -func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorSearchDevices(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1477,11 +1737,14 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) @@ -1496,84 +1759,82 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } -func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.AccessDeniedException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err +func awsRestjson1_deserializeOpDocumentSearchDevicesOutput(v **SearchDevicesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) } - - err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + if value == nil { + return nil } - errorBody.Seek(0, io.SeekStart) + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - return output -} + var sv *SearchDevicesOutput + if *v == nil { + sv = &SearchDevicesOutput{} + } else { + sv = *v + } -func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ConflictException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + for key, value := range shape { + switch key { + case "devices": + if err := awsRestjson1_deserializeDocumentDeviceSummaryList(&sv.Devices, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), } - return err } + *v = sv + return nil +} - err := awsRestjson1_deserializeDocumentConflictException(&output, shape) +type awsRestjson1_deserializeOpSearchJobs struct { +} +func (*awsRestjson1_deserializeOpSearchJobs) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpSearchJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } - return output -} + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorSearchJobs(response, &metadata) + } + output := &SearchJobsOutput{} + out.Result = output -func awsRestjson1_deserializeErrorDeviceOfflineException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.DeviceOfflineException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -1584,36 +1845,45 @@ func awsRestjson1_deserializeErrorDeviceOfflineException(response *smithyhttp.Re Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - err := awsRestjson1_deserializeDocumentDeviceOfflineException(&output, shape) - + err = awsRestjson1_deserializeOpDocumentSearchJobsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } - return err } - errorBody.Seek(0, io.SeekStart) - - return output + return out, metadata, err } -func awsRestjson1_deserializeErrorDeviceRetiredException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.DeviceRetiredException{} +func awsRestjson1_deserializeOpErrorSearchJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -1623,29 +1893,113 @@ func awsRestjson1_deserializeErrorDeviceRetiredException(response *smithyhttp.Re return err } - err := awsRestjson1_deserializeDocumentDeviceRetiredException(&output, shape) + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - errorBody.Seek(0, io.SeekStart) +func awsRestjson1_deserializeOpDocumentSearchJobsOutput(v **SearchJobsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - return output + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *SearchJobsOutput + if *v == nil { + sv = &SearchJobsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "jobs": + if err := awsRestjson1_deserializeDocumentJobSummaryList(&sv.Jobs, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func awsRestjson1_deserializeErrorInternalServiceException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InternalServiceException{} +type awsRestjson1_deserializeOpSearchQuantumTasks struct { +} + +func (*awsRestjson1_deserializeOpSearchQuantumTasks) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpSearchQuantumTasks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorSearchQuantumTasks(response, &metadata) + } + output := &SearchQuantumTasksOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -1656,47 +2010,44 @@ func awsRestjson1_deserializeErrorInternalServiceException(response *smithyhttp. Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - err := awsRestjson1_deserializeDocumentInternalServiceException(&output, shape) - + err = awsRestjson1_deserializeOpDocumentSearchQuantumTasksOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } - return err } - errorBody.Seek(0, io.SeekStart) - - return output + return out, metadata, err } -func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ResourceNotFoundException{} +func awsRestjson1_deserializeOpErrorSearchQuantumTasks(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) - + code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1708,20 +2059,133 @@ func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp } errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } - return output + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } } -func awsRestjson1_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ServiceQuotaExceededException{} +func awsRestjson1_deserializeOpDocumentSearchQuantumTasksOutput(v **SearchQuantumTasksOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *SearchQuantumTasksOutput + if *v == nil { + sv = &SearchQuantumTasksOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "quantumTasks": + if err := awsRestjson1_deserializeDocumentQuantumTaskSummaryList(&sv.QuantumTasks, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpTagResource struct { +} + +func (*awsRestjson1_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) + } + output := &TagResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -1731,8 +2195,85 @@ func awsRestjson1_deserializeErrorServiceQuotaExceededException(response *smithy return err } - err := awsRestjson1_deserializeDocumentServiceQuotaExceededException(&output, shape) + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUntagResource struct { +} + +func (*awsRestjson1_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) + } + output := &UntagResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1744,12 +2285,35 @@ func awsRestjson1_deserializeErrorServiceQuotaExceededException(response *smithy } errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } - return output + switch { + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } } -func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ThrottlingException{} +func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDeniedException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1767,7 +2331,7 @@ func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Respo return err } - err := awsRestjson1_deserializeDocumentThrottlingException(&output, shape) + err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -1784,8 +2348,8 @@ func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Respo return output } -func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ValidationException{} +func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ConflictException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -1803,7 +2367,7 @@ func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Respo return err } - err := awsRestjson1_deserializeDocumentValidationException(&output, shape) + err := awsRestjson1_deserializeDocumentConflictException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -1820,7 +2384,952 @@ func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Respo return output } -func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { +func awsRestjson1_deserializeErrorDeviceOfflineException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DeviceOfflineException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentDeviceOfflineException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorDeviceRetiredException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DeviceRetiredException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentDeviceRetiredException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorInternalServiceException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalServiceException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentInternalServiceException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceNotFoundException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServiceQuotaExceededException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentServiceQuotaExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ThrottlingException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentThrottlingException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ValidationException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentValidationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAlgorithmSpecification(v **types.AlgorithmSpecification, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AlgorithmSpecification + if *v == nil { + sv = &types.AlgorithmSpecification{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "containerImage": + if err := awsRestjson1_deserializeDocumentContainerImage(&sv.ContainerImage, value); err != nil { + return err + } + + case "scriptModeConfig": + if err := awsRestjson1_deserializeDocumentScriptModeConfig(&sv.ScriptModeConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConflictException + if *v == nil { + sv = &types.ConflictException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentContainerImage(v **types.ContainerImage, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ContainerImage + if *v == nil { + sv = &types.ContainerImage{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "uri": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uri to be of type string, got %T instead", value) + } + sv.Uri = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDataSource(v **types.DataSource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DataSource + if *v == nil { + sv = &types.DataSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "s3DataSource": + if err := awsRestjson1_deserializeDocumentS3DataSource(&sv.S3DataSource, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDeviceConfig(v **types.DeviceConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DeviceConfig + if *v == nil { + sv = &types.DeviceConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "device": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String256 to be of type string, got %T instead", value) + } + sv.Device = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDeviceOfflineException(v **types.DeviceOfflineException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DeviceOfflineException + if *v == nil { + sv = &types.DeviceOfflineException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDeviceRetiredException(v **types.DeviceRetiredException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DeviceRetiredException + if *v == nil { + sv = &types.DeviceRetiredException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDeviceSummary(v **types.DeviceSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DeviceSummary + if *v == nil { + sv = &types.DeviceSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "deviceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeviceArn to be of type string, got %T instead", value) + } + sv.DeviceArn = ptr.String(jtv) + } + + case "deviceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.DeviceName = ptr.String(jtv) + } + + case "deviceStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeviceStatus to be of type string, got %T instead", value) + } + sv.DeviceStatus = types.DeviceStatus(jtv) + } + + case "deviceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeviceType to be of type string, got %T instead", value) + } + sv.DeviceType = types.DeviceType(jtv) + } + + case "providerName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ProviderName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDeviceSummaryList(v *[]types.DeviceSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.DeviceSummary + if *v == nil { + cv = []types.DeviceSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DeviceSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentDeviceSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentHyperParameters(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentInputConfigList(v *[]types.InputFileConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.InputFileConfig + if *v == nil { + cv = []types.InputFileConfig{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.InputFileConfig + destAddr := &col + if err := awsRestjson1_deserializeDocumentInputFileConfig(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentInputFileConfig(v **types.InputFileConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InputFileConfig + if *v == nil { + sv = &types.InputFileConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "channelName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String64 to be of type string, got %T instead", value) + } + sv.ChannelName = ptr.String(jtv) + } + + case "contentType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String256 to be of type string, got %T instead", value) + } + sv.ContentType = ptr.String(jtv) + } + + case "dataSource": + if err := awsRestjson1_deserializeDocumentDataSource(&sv.DataSource, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInstanceConfig(v **types.InstanceConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InstanceConfig + if *v == nil { + sv = &types.InstanceConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "instanceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceType to be of type string, got %T instead", value) + } + sv.InstanceType = types.InstanceType(jtv) + } + + case "volumeSizeInGb": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.VolumeSizeInGb = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInternalServiceException(v **types.InternalServiceException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InternalServiceException + if *v == nil { + sv = &types.InternalServiceException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentJobCheckpointConfig(v **types.JobCheckpointConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.JobCheckpointConfig + if *v == nil { + sv = &types.JobCheckpointConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "localPath": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String4096 to be of type string, got %T instead", value) + } + sv.LocalPath = ptr.String(jtv) + } + + case "s3Uri": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Path to be of type string, got %T instead", value) + } + sv.S3Uri = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentJobEventDetails(v **types.JobEventDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1833,15 +3342,24 @@ func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDenie return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AccessDeniedException + var sv *types.JobEventDetails if *v == nil { - sv = &types.AccessDeniedException{} + sv = &types.JobEventDetails{} } else { sv = *v } for key, value := range shape { switch key { + case "eventType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobEventType to be of type string, got %T instead", value) + } + sv.EventType = types.JobEventType(jtv) + } + case "message": if value != nil { jtv, ok := value.(string) @@ -1851,6 +3369,19 @@ func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDenie sv.Message = ptr.String(jtv) } + case "timeOfEvent": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.TimeOfEvent = ptr.Time(t) + } + default: _, _ = key, value @@ -1860,7 +3391,7 @@ func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDenie return nil } -func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { +func awsRestjson1_deserializeDocumentJobEvents(v *[]types.JobEventDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1868,39 +3399,33 @@ func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictExcepti return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ConflictException + var cv []types.JobEventDetails if *v == nil { - sv = &types.ConflictException{} + cv = []types.JobEventDetails{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - + for _, value := range shape { + var col types.JobEventDetails + destAddr := &col + if err := awsRestjson1_deserializeDocumentJobEventDetails(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsRestjson1_deserializeDocumentDeviceOfflineException(v **types.DeviceOfflineException, value interface{}) error { +func awsRestjson1_deserializeDocumentJobOutputDataConfig(v **types.JobOutputDataConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1913,22 +3438,31 @@ func awsRestjson1_deserializeDocumentDeviceOfflineException(v **types.DeviceOffl return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.DeviceOfflineException + var sv *types.JobOutputDataConfig if *v == nil { - sv = &types.DeviceOfflineException{} + sv = &types.JobOutputDataConfig{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "kmsKeyId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected String2048 to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.KmsKeyId = ptr.String(jtv) + } + + case "s3Path": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Path to be of type string, got %T instead", value) + } + sv.S3Path = ptr.String(jtv) } default: @@ -1940,7 +3474,7 @@ func awsRestjson1_deserializeDocumentDeviceOfflineException(v **types.DeviceOffl return nil } -func awsRestjson1_deserializeDocumentDeviceRetiredException(v **types.DeviceRetiredException, value interface{}) error { +func awsRestjson1_deserializeDocumentJobStoppingCondition(v **types.JobStoppingCondition, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1953,22 +3487,26 @@ func awsRestjson1_deserializeDocumentDeviceRetiredException(v **types.DeviceReti return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.DeviceRetiredException + var sv *types.JobStoppingCondition if *v == nil { - sv = &types.DeviceRetiredException{} + sv = &types.JobStoppingCondition{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "maxRuntimeInSeconds": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) } - sv.Message = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaxRuntimeInSeconds = ptr.Int32(int32(i64)) } default: @@ -1980,7 +3518,7 @@ func awsRestjson1_deserializeDocumentDeviceRetiredException(v **types.DeviceReti return nil } -func awsRestjson1_deserializeDocumentDeviceSummary(v **types.DeviceSummary, value interface{}) error { +func awsRestjson1_deserializeDocumentJobSummary(v **types.JobSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1993,58 +3531,93 @@ func awsRestjson1_deserializeDocumentDeviceSummary(v **types.DeviceSummary, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.DeviceSummary + var sv *types.JobSummary if *v == nil { - sv = &types.DeviceSummary{} + sv = &types.JobSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "deviceArn": + case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DeviceArn to be of type string, got %T instead", value) + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) } - sv.DeviceArn = ptr.String(jtv) + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) } - case "deviceName": + case "device": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected String256 to be of type string, got %T instead", value) } - sv.DeviceName = ptr.String(jtv) + sv.Device = ptr.String(jtv) } - case "deviceStatus": + case "endedAt": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DeviceStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) } - sv.DeviceStatus = types.DeviceStatus(jtv) + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.EndedAt = ptr.Time(t) } - case "deviceType": + case "jobArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DeviceType to be of type string, got %T instead", value) + return fmt.Errorf("expected JobArn to be of type string, got %T instead", value) } - sv.DeviceType = types.DeviceType(jtv) + sv.JobArn = ptr.String(jtv) } - case "providerName": + case "jobName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.ProviderName = ptr.String(jtv) + sv.JobName = ptr.String(jtv) + } + + case "startedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.StartedAt = ptr.Time(t) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobPrimaryStatus to be of type string, got %T instead", value) + } + sv.Status = types.JobPrimaryStatus(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { + return err } default: @@ -2056,7 +3629,7 @@ func awsRestjson1_deserializeDocumentDeviceSummary(v **types.DeviceSummary, valu return nil } -func awsRestjson1_deserializeDocumentDeviceSummaryList(v *[]types.DeviceSummary, value interface{}) error { +func awsRestjson1_deserializeDocumentJobSummaryList(v *[]types.JobSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2069,17 +3642,17 @@ func awsRestjson1_deserializeDocumentDeviceSummaryList(v *[]types.DeviceSummary, return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.DeviceSummary + var cv []types.JobSummary if *v == nil { - cv = []types.DeviceSummary{} + cv = []types.JobSummary{} } else { cv = *v } for _, value := range shape { - var col types.DeviceSummary + var col types.JobSummary destAddr := &col - if err := awsRestjson1_deserializeDocumentDeviceSummary(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentJobSummary(&destAddr, value); err != nil { return err } col = *destAddr @@ -2090,46 +3663,6 @@ func awsRestjson1_deserializeDocumentDeviceSummaryList(v *[]types.DeviceSummary, return nil } -func awsRestjson1_deserializeDocumentInternalServiceException(v **types.InternalServiceException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.InternalServiceException - if *v == nil { - sv = &types.InternalServiceException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - func awsRestjson1_deserializeDocumentQuantumTaskSummary(v **types.QuantumTaskSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -2324,6 +3857,104 @@ func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.Resourc return nil } +func awsRestjson1_deserializeDocumentS3DataSource(v **types.S3DataSource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.S3DataSource + if *v == nil { + sv = &types.S3DataSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "s3Uri": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Path to be of type string, got %T instead", value) + } + sv.S3Uri = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentScriptModeConfig(v **types.ScriptModeConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ScriptModeConfig + if *v == nil { + sv = &types.ScriptModeConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "compressionType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CompressionType to be of type string, got %T instead", value) + } + sv.CompressionType = types.CompressionType(jtv) + } + + case "entryPoint": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.EntryPoint = ptr.String(jtv) + } + + case "s3Uri": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Path to be of type string, got %T instead", value) + } + sv.S3Uri = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/braket/generated.json b/service/braket/generated.json index e25f47531aa..572f4726eaa 100644 --- a/service/braket/generated.json +++ b/service/braket/generated.json @@ -7,12 +7,16 @@ }, "files": [ "api_client.go", + "api_op_CancelJob.go", "api_op_CancelQuantumTask.go", + "api_op_CreateJob.go", "api_op_CreateQuantumTask.go", "api_op_GetDevice.go", + "api_op_GetJob.go", "api_op_GetQuantumTask.go", "api_op_ListTagsForResource.go", "api_op_SearchDevices.go", + "api_op_SearchJobs.go", "api_op_SearchQuantumTasks.go", "api_op_TagResource.go", "api_op_UntagResource.go", diff --git a/service/braket/serializers.go b/service/braket/serializers.go index c00f83e5a56..6ce98b1d6bf 100644 --- a/service/braket/serializers.go +++ b/service/braket/serializers.go @@ -14,6 +14,64 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) +type awsRestjson1_serializeOpCancelJob struct { +} + +func (*awsRestjson1_serializeOpCancelJob) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCancelJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CancelJobInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/job/{jobArn}/cancel") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCancelJobInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCancelJobInput(v *CancelJobInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.JobArn == nil || len(*v.JobArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member jobArn must not be empty")} + } + if v.JobArn != nil { + if err := encoder.SetURI("jobArn").String(*v.JobArn); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCancelQuantumTask struct { } @@ -95,6 +153,147 @@ func awsRestjson1_serializeOpDocumentCancelQuantumTaskInput(v *CancelQuantumTask return nil } +type awsRestjson1_serializeOpCreateJob struct { +} + +func (*awsRestjson1_serializeOpCreateJob) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateJobInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/job") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateJobInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateJobInput(v *CreateJobInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateJobInput(v *CreateJobInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AlgorithmSpecification != nil { + ok := object.Key("algorithmSpecification") + if err := awsRestjson1_serializeDocumentAlgorithmSpecification(v.AlgorithmSpecification, ok); err != nil { + return err + } + } + + if v.CheckpointConfig != nil { + ok := object.Key("checkpointConfig") + if err := awsRestjson1_serializeDocumentJobCheckpointConfig(v.CheckpointConfig, ok); err != nil { + return err + } + } + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.DeviceConfig != nil { + ok := object.Key("deviceConfig") + if err := awsRestjson1_serializeDocumentDeviceConfig(v.DeviceConfig, ok); err != nil { + return err + } + } + + if v.HyperParameters != nil { + ok := object.Key("hyperParameters") + if err := awsRestjson1_serializeDocumentHyperParameters(v.HyperParameters, ok); err != nil { + return err + } + } + + if v.InputDataConfig != nil { + ok := object.Key("inputDataConfig") + if err := awsRestjson1_serializeDocumentInputConfigList(v.InputDataConfig, ok); err != nil { + return err + } + } + + if v.InstanceConfig != nil { + ok := object.Key("instanceConfig") + if err := awsRestjson1_serializeDocumentInstanceConfig(v.InstanceConfig, ok); err != nil { + return err + } + } + + if v.JobName != nil { + ok := object.Key("jobName") + ok.String(*v.JobName) + } + + if v.OutputDataConfig != nil { + ok := object.Key("outputDataConfig") + if err := awsRestjson1_serializeDocumentJobOutputDataConfig(v.OutputDataConfig, ok); err != nil { + return err + } + } + + if v.RoleArn != nil { + ok := object.Key("roleArn") + ok.String(*v.RoleArn) + } + + if v.StoppingCondition != nil { + ok := object.Key("stoppingCondition") + if err := awsRestjson1_serializeDocumentJobStoppingCondition(v.StoppingCondition, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagsMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCreateQuantumTask struct { } @@ -175,6 +374,11 @@ func awsRestjson1_serializeOpDocumentCreateQuantumTaskInput(v *CreateQuantumTask ok.String(*v.DeviceParameters) } + if v.JobToken != nil { + ok := object.Key("jobToken") + ok.String(*v.JobToken) + } + if v.OutputS3Bucket != nil { ok := object.Key("outputS3Bucket") ok.String(*v.OutputS3Bucket) @@ -258,6 +462,64 @@ func awsRestjson1_serializeOpHttpBindingsGetDeviceInput(v *GetDeviceInput, encod return nil } +type awsRestjson1_serializeOpGetJob struct { +} + +func (*awsRestjson1_serializeOpGetJob) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetJobInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/job/{jobArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetJobInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetJobInput(v *GetJobInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.JobArn == nil || len(*v.JobArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member jobArn must not be empty")} + } + if v.JobArn != nil { + if err := encoder.SetURI("jobArn").String(*v.JobArn); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpGetQuantumTask struct { } @@ -454,6 +716,86 @@ func awsRestjson1_serializeOpDocumentSearchDevicesInput(v *SearchDevicesInput, v return nil } +type awsRestjson1_serializeOpSearchJobs struct { +} + +func (*awsRestjson1_serializeOpSearchJobs) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpSearchJobs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*SearchJobsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/jobs") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentSearchJobsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsSearchJobsInput(v *SearchJobsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentSearchJobsInput(v *SearchJobsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("filters") + if err := awsRestjson1_serializeDocumentSearchJobsFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + type awsRestjson1_serializeOpSearchQuantumTasks struct { } @@ -681,6 +1023,210 @@ func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInpu return nil } +func awsRestjson1_serializeDocumentAlgorithmSpecification(v *types.AlgorithmSpecification, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ContainerImage != nil { + ok := object.Key("containerImage") + if err := awsRestjson1_serializeDocumentContainerImage(v.ContainerImage, ok); err != nil { + return err + } + } + + if v.ScriptModeConfig != nil { + ok := object.Key("scriptModeConfig") + if err := awsRestjson1_serializeDocumentScriptModeConfig(v.ScriptModeConfig, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentContainerImage(v *types.ContainerImage, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Uri != nil { + ok := object.Key("uri") + ok.String(*v.Uri) + } + + return nil +} + +func awsRestjson1_serializeDocumentDataSource(v *types.DataSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.S3DataSource != nil { + ok := object.Key("s3DataSource") + if err := awsRestjson1_serializeDocumentS3DataSource(v.S3DataSource, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentDeviceConfig(v *types.DeviceConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Device != nil { + ok := object.Key("device") + ok.String(*v.Device) + } + + return nil +} + +func awsRestjson1_serializeDocumentHyperParameters(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + +func awsRestjson1_serializeDocumentInputConfigList(v []types.InputFileConfig, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentInputFileConfig(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentInputFileConfig(v *types.InputFileConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ChannelName != nil { + ok := object.Key("channelName") + ok.String(*v.ChannelName) + } + + if v.ContentType != nil { + ok := object.Key("contentType") + ok.String(*v.ContentType) + } + + if v.DataSource != nil { + ok := object.Key("dataSource") + if err := awsRestjson1_serializeDocumentDataSource(v.DataSource, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentInstanceConfig(v *types.InstanceConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.InstanceType) > 0 { + ok := object.Key("instanceType") + ok.String(string(v.InstanceType)) + } + + if v.VolumeSizeInGb != nil { + ok := object.Key("volumeSizeInGb") + ok.Integer(*v.VolumeSizeInGb) + } + + return nil +} + +func awsRestjson1_serializeDocumentJobCheckpointConfig(v *types.JobCheckpointConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LocalPath != nil { + ok := object.Key("localPath") + ok.String(*v.LocalPath) + } + + if v.S3Uri != nil { + ok := object.Key("s3Uri") + ok.String(*v.S3Uri) + } + + return nil +} + +func awsRestjson1_serializeDocumentJobOutputDataConfig(v *types.JobOutputDataConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.KmsKeyId != nil { + ok := object.Key("kmsKeyId") + ok.String(*v.KmsKeyId) + } + + if v.S3Path != nil { + ok := object.Key("s3Path") + ok.String(*v.S3Path) + } + + return nil +} + +func awsRestjson1_serializeDocumentJobStoppingCondition(v *types.JobStoppingCondition, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxRuntimeInSeconds != nil { + ok := object.Key("maxRuntimeInSeconds") + ok.Integer(*v.MaxRuntimeInSeconds) + } + + return nil +} + +func awsRestjson1_serializeDocumentS3DataSource(v *types.S3DataSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.S3Uri != nil { + ok := object.Key("s3Uri") + ok.String(*v.S3Uri) + } + + return nil +} + +func awsRestjson1_serializeDocumentScriptModeConfig(v *types.ScriptModeConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.CompressionType) > 0 { + ok := object.Key("compressionType") + ok.String(string(v.CompressionType)) + } + + if v.EntryPoint != nil { + ok := object.Key("entryPoint") + ok.String(*v.EntryPoint) + } + + if v.S3Uri != nil { + ok := object.Key("s3Uri") + ok.String(*v.S3Uri) + } + + return nil +} + func awsRestjson1_serializeDocumentSearchDevicesFilter(v *types.SearchDevicesFilter, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -713,6 +1259,43 @@ func awsRestjson1_serializeDocumentSearchDevicesFilterList(v []types.SearchDevic return nil } +func awsRestjson1_serializeDocumentSearchJobsFilter(v *types.SearchJobsFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if len(v.Operator) > 0 { + ok := object.Key("operator") + ok.String(string(v.Operator)) + } + + if v.Values != nil { + ok := object.Key("values") + if err := awsRestjson1_serializeDocumentString256List(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentSearchJobsFilterList(v []types.SearchJobsFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentSearchJobsFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentSearchQuantumTasksFilter(v *types.SearchQuantumTasksFilter, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/braket/types/enums.go b/service/braket/types/enums.go index cadc91e58ef..76eb03b3cb6 100644 --- a/service/braket/types/enums.go +++ b/service/braket/types/enums.go @@ -20,6 +20,24 @@ func (CancellationStatus) Values() []CancellationStatus { } } +type CompressionType string + +// Enum values for CompressionType +const ( + CompressionTypeNone CompressionType = "NONE" + CompressionTypeGzip CompressionType = "GZIP" +) + +// Values returns all known values for CompressionType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (CompressionType) Values() []CompressionType { + return []CompressionType{ + "NONE", + "GZIP", + } +} + type DeviceStatus string // Enum values for DeviceStatus @@ -58,6 +76,160 @@ func (DeviceType) Values() []DeviceType { } } +type InstanceType string + +// Enum values for InstanceType +const ( + InstanceTypeMlM4Xlarge InstanceType = "ml.m4.xlarge" + InstanceTypeMlM42xlarge InstanceType = "ml.m4.2xlarge" + InstanceTypeMlM44xlarge InstanceType = "ml.m4.4xlarge" + InstanceTypeMlM410xlarge InstanceType = "ml.m4.10xlarge" + InstanceTypeMlM416xlarge InstanceType = "ml.m4.16xlarge" + InstanceTypeMlG4dnXlarge InstanceType = "ml.g4dn.xlarge" + InstanceTypeMlG4dn2xlarge InstanceType = "ml.g4dn.2xlarge" + InstanceTypeMlG4dn4xlarge InstanceType = "ml.g4dn.4xlarge" + InstanceTypeMlG4dn8xlarge InstanceType = "ml.g4dn.8xlarge" + InstanceTypeMlG4dn12xlarge InstanceType = "ml.g4dn.12xlarge" + InstanceTypeMlG4dn16xlarge InstanceType = "ml.g4dn.16xlarge" + InstanceTypeMlM5Large InstanceType = "ml.m5.large" + InstanceTypeMlM5Xlarge InstanceType = "ml.m5.xlarge" + InstanceTypeMlM52xlarge InstanceType = "ml.m5.2xlarge" + InstanceTypeMlM54xlarge InstanceType = "ml.m5.4xlarge" + InstanceTypeMlM512xlarge InstanceType = "ml.m5.12xlarge" + InstanceTypeMlM524xlarge InstanceType = "ml.m5.24xlarge" + InstanceTypeMlC4Xlarge InstanceType = "ml.c4.xlarge" + InstanceTypeMlC42xlarge InstanceType = "ml.c4.2xlarge" + InstanceTypeMlC44xlarge InstanceType = "ml.c4.4xlarge" + InstanceTypeMlC48xlarge InstanceType = "ml.c4.8xlarge" + InstanceTypeMlP2Xlarge InstanceType = "ml.p2.xlarge" + InstanceTypeMlP28xlarge InstanceType = "ml.p2.8xlarge" + InstanceTypeMlP216xlarge InstanceType = "ml.p2.16xlarge" + InstanceTypeMlP32xlarge InstanceType = "ml.p3.2xlarge" + InstanceTypeMlP38xlarge InstanceType = "ml.p3.8xlarge" + InstanceTypeMlP316xlarge InstanceType = "ml.p3.16xlarge" + InstanceTypeMlP3dn24xlarge InstanceType = "ml.p3dn.24xlarge" + InstanceTypeMlP4d24xlarge InstanceType = "ml.p4d.24xlarge" + InstanceTypeMlC5Xlarge InstanceType = "ml.c5.xlarge" + InstanceTypeMlC52xlarge InstanceType = "ml.c5.2xlarge" + InstanceTypeMlC54xlarge InstanceType = "ml.c5.4xlarge" + InstanceTypeMlC59xlarge InstanceType = "ml.c5.9xlarge" + InstanceTypeMlC518xlarge InstanceType = "ml.c5.18xlarge" + InstanceTypeMlC5nXlarge InstanceType = "ml.c5n.xlarge" + InstanceTypeMlC5n2xlarge InstanceType = "ml.c5n.2xlarge" + InstanceTypeMlC5n4xlarge InstanceType = "ml.c5n.4xlarge" + InstanceTypeMlC5n9xlarge InstanceType = "ml.c5n.9xlarge" + InstanceTypeMlC5n18xlarge InstanceType = "ml.c5n.18xlarge" +) + +// Values returns all known values for InstanceType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (InstanceType) Values() []InstanceType { + return []InstanceType{ + "ml.m4.xlarge", + "ml.m4.2xlarge", + "ml.m4.4xlarge", + "ml.m4.10xlarge", + "ml.m4.16xlarge", + "ml.g4dn.xlarge", + "ml.g4dn.2xlarge", + "ml.g4dn.4xlarge", + "ml.g4dn.8xlarge", + "ml.g4dn.12xlarge", + "ml.g4dn.16xlarge", + "ml.m5.large", + "ml.m5.xlarge", + "ml.m5.2xlarge", + "ml.m5.4xlarge", + "ml.m5.12xlarge", + "ml.m5.24xlarge", + "ml.c4.xlarge", + "ml.c4.2xlarge", + "ml.c4.4xlarge", + "ml.c4.8xlarge", + "ml.p2.xlarge", + "ml.p2.8xlarge", + "ml.p2.16xlarge", + "ml.p3.2xlarge", + "ml.p3.8xlarge", + "ml.p3.16xlarge", + "ml.p3dn.24xlarge", + "ml.p4d.24xlarge", + "ml.c5.xlarge", + "ml.c5.2xlarge", + "ml.c5.4xlarge", + "ml.c5.9xlarge", + "ml.c5.18xlarge", + "ml.c5n.xlarge", + "ml.c5n.2xlarge", + "ml.c5n.4xlarge", + "ml.c5n.9xlarge", + "ml.c5n.18xlarge", + } +} + +type JobEventType string + +// Enum values for JobEventType +const ( + JobEventTypeWaitingForPriority JobEventType = "WAITING_FOR_PRIORITY" + JobEventTypeQueuedForExecution JobEventType = "QUEUED_FOR_EXECUTION" + JobEventTypeStartingInstance JobEventType = "STARTING_INSTANCE" + JobEventTypeDownloadingData JobEventType = "DOWNLOADING_DATA" + JobEventTypeRunning JobEventType = "RUNNING" + JobEventTypeDeprioritizedDueToInactivity JobEventType = "DEPRIORITIZED_DUE_TO_INACTIVITY" + JobEventTypeUploadingResults JobEventType = "UPLOADING_RESULTS" + JobEventTypeCompleted JobEventType = "COMPLETED" + JobEventTypeFailed JobEventType = "FAILED" + JobEventTypeMaxRuntimeExceeded JobEventType = "MAX_RUNTIME_EXCEEDED" + JobEventTypeCancelled JobEventType = "CANCELLED" +) + +// Values returns all known values for JobEventType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (JobEventType) Values() []JobEventType { + return []JobEventType{ + "WAITING_FOR_PRIORITY", + "QUEUED_FOR_EXECUTION", + "STARTING_INSTANCE", + "DOWNLOADING_DATA", + "RUNNING", + "DEPRIORITIZED_DUE_TO_INACTIVITY", + "UPLOADING_RESULTS", + "COMPLETED", + "FAILED", + "MAX_RUNTIME_EXCEEDED", + "CANCELLED", + } +} + +type JobPrimaryStatus string + +// Enum values for JobPrimaryStatus +const ( + JobPrimaryStatusQueued JobPrimaryStatus = "QUEUED" + JobPrimaryStatusRunning JobPrimaryStatus = "RUNNING" + JobPrimaryStatusCompleted JobPrimaryStatus = "COMPLETED" + JobPrimaryStatusFailed JobPrimaryStatus = "FAILED" + JobPrimaryStatusCancelling JobPrimaryStatus = "CANCELLING" + JobPrimaryStatusCancelled JobPrimaryStatus = "CANCELLED" +) + +// Values returns all known values for JobPrimaryStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (JobPrimaryStatus) Values() []JobPrimaryStatus { + return []JobPrimaryStatus{ + "QUEUED", + "RUNNING", + "COMPLETED", + "FAILED", + "CANCELLING", + "CANCELLED", + } +} + type QuantumTaskStatus string // Enum values for QuantumTaskStatus @@ -86,6 +258,34 @@ func (QuantumTaskStatus) Values() []QuantumTaskStatus { } } +type SearchJobsFilterOperator string + +// Enum values for SearchJobsFilterOperator +const ( + SearchJobsFilterOperatorLt SearchJobsFilterOperator = "LT" + SearchJobsFilterOperatorLte SearchJobsFilterOperator = "LTE" + SearchJobsFilterOperatorEqual SearchJobsFilterOperator = "EQUAL" + SearchJobsFilterOperatorGt SearchJobsFilterOperator = "GT" + SearchJobsFilterOperatorGte SearchJobsFilterOperator = "GTE" + SearchJobsFilterOperatorBetween SearchJobsFilterOperator = "BETWEEN" + SearchJobsFilterOperatorContains SearchJobsFilterOperator = "CONTAINS" +) + +// Values returns all known values for SearchJobsFilterOperator. Note that this can +// be expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (SearchJobsFilterOperator) Values() []SearchJobsFilterOperator { + return []SearchJobsFilterOperator{ + "LT", + "LTE", + "EQUAL", + "GT", + "GTE", + "BETWEEN", + "CONTAINS", + } +} + type SearchQuantumTasksFilterOperator string // Enum values for SearchQuantumTasksFilterOperator diff --git a/service/braket/types/types.go b/service/braket/types/types.go index e3e8857dec4..ef8f5f529fc 100644 --- a/service/braket/types/types.go +++ b/service/braket/types/types.go @@ -7,6 +7,54 @@ import ( "time" ) +// Defines the Amazon Braket job to be created. Specifies the container image the +// job uses and the paths to the Python scripts used for entry and training. +type AlgorithmSpecification struct { + + // The container image used to create an Amazon Braket job. + ContainerImage *ContainerImage + + // Configures the paths to the Python scripts used for entry and training. + ScriptModeConfig *ScriptModeConfig + + noSmithyDocumentSerde +} + +// The container image used to create an Amazon Braket job. +type ContainerImage struct { + + // The URI locating the container image. + // + // This member is required. + Uri *string + + noSmithyDocumentSerde +} + +// Information about the source of the data used by the Amazon Braket job. +type DataSource struct { + + // Information about the data stored in Amazon S3 used by the Amazon Braket job. + // + // This member is required. + S3DataSource *S3DataSource + + noSmithyDocumentSerde +} + +// Configures the quantum processing units (QPUs) or simulator used to create and +// run an Amazon Braket job. +type DeviceConfig struct { + + // The primary quantum processing unit (QPU) or simulator used to create and run an + // Amazon Braket job. + // + // This member is required. + Device *string + + noSmithyDocumentSerde +} + // Includes information about the device. type DeviceSummary struct { @@ -38,6 +86,144 @@ type DeviceSummary struct { noSmithyDocumentSerde } +// A list of parameters that specify the input channels, type of input data, and +// where it is located. +type InputFileConfig struct { + + // A named input source that an Amazon Braket job can consume. + // + // This member is required. + ChannelName *string + + // The location of the channel data. + // + // This member is required. + DataSource *DataSource + + // The MIME type of the data. + ContentType *string + + noSmithyDocumentSerde +} + +// Configures the resource instances to use while running the Amazon Braket hybrid +// job on Amazon Braket. +type InstanceConfig struct { + + // Configures the type resource instances to use while running an Amazon Braket + // hybrid job. + // + // This member is required. + InstanceType InstanceType + + // The size of the storage volume, in GB, that user wants to provision. + // + // This member is required. + VolumeSizeInGb *int32 + + noSmithyDocumentSerde +} + +// Contains information about the output locations for job checkpoint data. +type JobCheckpointConfig struct { + + // Identifies the S3 path where you want Amazon Braket to store checkpoints. For + // example, s3://bucket-name/key-name-prefix. + // + // This member is required. + S3Uri *string + + // (Optional) The local directory where checkpoints are written. The default + // directory is /opt/braket/checkpoints/. + LocalPath *string + + noSmithyDocumentSerde +} + +// Details about the type and time events occurred related to the Amazon Braket +// job. +type JobEventDetails struct { + + // The type of event that occurred related to the Amazon Braket job. + EventType JobEventType + + // A message describing the event that occurred related to the Amazon Braket job. + Message *string + + // TThe type of event that occurred related to the Amazon Braket job. + TimeOfEvent *time.Time + + noSmithyDocumentSerde +} + +// Specifies the path to the S3 location where you want to store job artifacts and +// the encryption key used to store them. +type JobOutputDataConfig struct { + + // Identifies the S3 path where you want Amazon Braket to store the job training + // artifacts. For example, s3://bucket-name/key-name-prefix. + // + // This member is required. + S3Path *string + + // The AWS Key Management Service (AWS KMS) key that Amazon Braket uses to encrypt + // the job training artifacts at rest using Amazon S3 server-side encryption. + KmsKeyId *string + + noSmithyDocumentSerde +} + +// Specifies limits for how long an Amazon Braket job can run. +type JobStoppingCondition struct { + + // The maximum length of time, in seconds, that an Amazon Braket job can run. + MaxRuntimeInSeconds *int32 + + noSmithyDocumentSerde +} + +// Provides summary information about an Amazon Braket job. +type JobSummary struct { + + // The date and time that the Amazon Braket job was created. + // + // This member is required. + CreatedAt *time.Time + + // Provides summary information about the primary device used by an Amazon Braket + // job. + // + // This member is required. + Device *string + + // The ARN of the Amazon Braket job. + // + // This member is required. + JobArn *string + + // The name of the Amazon Braket job. + // + // This member is required. + JobName *string + + // The status of the Amazon Braket job. + // + // This member is required. + Status JobPrimaryStatus + + // The date and time that the Amazon Braket job ended. + EndedAt *time.Time + + // The date and time that the Amazon Braket job was started. + StartedAt *time.Time + + // A tag object that consists of a key and an optional value, used to manage + // metadata for Amazon Braket resources. + Tags map[string]string + + noSmithyDocumentSerde +} + // Includes information about a quantum task. type QuantumTaskSummary struct { @@ -85,6 +271,40 @@ type QuantumTaskSummary struct { noSmithyDocumentSerde } +// Information about the data stored in Amazon S3 used by the Amazon Braket job. +type S3DataSource struct { + + // Depending on the value specified for the S3DataType, identifies either a key + // name prefix or a manifest that locates the S3 data source. + // + // This member is required. + S3Uri *string + + noSmithyDocumentSerde +} + +// Contains information about the Python scripts used for entry and by an Amazon +// Braket job. +type ScriptModeConfig struct { + + // The path to the Python script that serves as the entry point for an Amazon + // Braket job. + // + // This member is required. + EntryPoint *string + + // The URI that specifies the S3 path to the Python script module that contains the + // training script used by an Amazon Braket job. + // + // This member is required. + S3Uri *string + + // The type of compression used by the Python scripts for an Amazon Braket job. + CompressionType CompressionType + + noSmithyDocumentSerde +} + // The filter to use for searching devices. type SearchDevicesFilter struct { @@ -101,6 +321,27 @@ type SearchDevicesFilter struct { noSmithyDocumentSerde } +// A filter used to search for Amazon Braket jobs. +type SearchJobsFilter struct { + + // The name to use for the jobs filter. + // + // This member is required. + Name *string + + // An operator to use for the jobs filter. + // + // This member is required. + Operator SearchJobsFilterOperator + + // The values to use for the jobs filter. + // + // This member is required. + Values []string + + noSmithyDocumentSerde +} + // A filter to use to search for tasks. type SearchQuantumTasksFilter struct { diff --git a/service/braket/validators.go b/service/braket/validators.go index 2d94e7c9345..70949fc0137 100644 --- a/service/braket/validators.go +++ b/service/braket/validators.go @@ -10,6 +10,26 @@ import ( "github.com/aws/smithy-go/middleware" ) +type validateOpCancelJob struct { +} + +func (*validateOpCancelJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCancelJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CancelJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCancelJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCancelQuantumTask struct { } @@ -30,6 +50,26 @@ func (m *validateOpCancelQuantumTask) HandleInitialize(ctx context.Context, in m return next.HandleInitialize(ctx, in) } +type validateOpCreateJob struct { +} + +func (*validateOpCreateJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateQuantumTask struct { } @@ -70,6 +110,26 @@ func (m *validateOpGetDevice) HandleInitialize(ctx context.Context, in middlewar return next.HandleInitialize(ctx, in) } +type validateOpGetJob struct { +} + +func (*validateOpGetJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetQuantumTask struct { } @@ -130,6 +190,26 @@ func (m *validateOpSearchDevices) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpSearchJobs struct { +} + +func (*validateOpSearchJobs) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSearchJobs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SearchJobsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSearchJobsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpSearchQuantumTasks struct { } @@ -190,10 +270,18 @@ func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +func addOpCancelJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCancelJob{}, middleware.After) +} + func addOpCancelQuantumTaskValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCancelQuantumTask{}, middleware.After) } +func addOpCreateJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateJob{}, middleware.After) +} + func addOpCreateQuantumTaskValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateQuantumTask{}, middleware.After) } @@ -202,6 +290,10 @@ func addOpGetDeviceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetDevice{}, middleware.After) } +func addOpGetJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetJob{}, middleware.After) +} + func addOpGetQuantumTaskValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetQuantumTask{}, middleware.After) } @@ -214,6 +306,10 @@ func addOpSearchDevicesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpSearchDevices{}, middleware.After) } +func addOpSearchJobsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSearchJobs{}, middleware.After) +} + func addOpSearchQuantumTasksValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpSearchQuantumTasks{}, middleware.After) } @@ -226,6 +322,197 @@ func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) } +func validateAlgorithmSpecification(v *types.AlgorithmSpecification) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AlgorithmSpecification"} + if v.ScriptModeConfig != nil { + if err := validateScriptModeConfig(v.ScriptModeConfig); err != nil { + invalidParams.AddNested("ScriptModeConfig", err.(smithy.InvalidParamsError)) + } + } + if v.ContainerImage != nil { + if err := validateContainerImage(v.ContainerImage); err != nil { + invalidParams.AddNested("ContainerImage", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateContainerImage(v *types.ContainerImage) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ContainerImage"} + if v.Uri == nil { + invalidParams.Add(smithy.NewErrParamRequired("Uri")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDataSource(v *types.DataSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DataSource"} + if v.S3DataSource == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3DataSource")) + } else if v.S3DataSource != nil { + if err := validateS3DataSource(v.S3DataSource); err != nil { + invalidParams.AddNested("S3DataSource", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDeviceConfig(v *types.DeviceConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeviceConfig"} + if v.Device == nil { + invalidParams.Add(smithy.NewErrParamRequired("Device")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInputConfigList(v []types.InputFileConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InputConfigList"} + for i := range v { + if err := validateInputFileConfig(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInputFileConfig(v *types.InputFileConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InputFileConfig"} + if v.ChannelName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelName")) + } + if v.DataSource == nil { + invalidParams.Add(smithy.NewErrParamRequired("DataSource")) + } else if v.DataSource != nil { + if err := validateDataSource(v.DataSource); err != nil { + invalidParams.AddNested("DataSource", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInstanceConfig(v *types.InstanceConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InstanceConfig"} + if len(v.InstanceType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("InstanceType")) + } + if v.VolumeSizeInGb == nil { + invalidParams.Add(smithy.NewErrParamRequired("VolumeSizeInGb")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateJobCheckpointConfig(v *types.JobCheckpointConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "JobCheckpointConfig"} + if v.S3Uri == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3Uri")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateJobOutputDataConfig(v *types.JobOutputDataConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "JobOutputDataConfig"} + if v.S3Path == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3Path")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateS3DataSource(v *types.S3DataSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "S3DataSource"} + if v.S3Uri == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3Uri")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateScriptModeConfig(v *types.ScriptModeConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ScriptModeConfig"} + if v.EntryPoint == nil { + invalidParams.Add(smithy.NewErrParamRequired("EntryPoint")) + } + if v.S3Uri == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3Uri")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateSearchDevicesFilter(v *types.SearchDevicesFilter) error { if v == nil { return nil @@ -261,6 +548,44 @@ func validateSearchDevicesFilterList(v []types.SearchDevicesFilter) error { } } +func validateSearchJobsFilter(v *types.SearchJobsFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SearchJobsFilter"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if len(v.Operator) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Operator")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSearchJobsFilterList(v []types.SearchJobsFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SearchJobsFilterList"} + for i := range v { + if err := validateSearchJobsFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateSearchQuantumTasksFilter(v *types.SearchQuantumTasksFilter) error { if v == nil { return nil @@ -299,6 +624,21 @@ func validateSearchQuantumTasksFilterList(v []types.SearchQuantumTasksFilter) er } } +func validateOpCancelJobInput(v *CancelJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CancelJobInput"} + if v.JobArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("JobArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCancelQuantumTaskInput(v *CancelQuantumTaskInput) error { if v == nil { return nil @@ -317,6 +657,65 @@ func validateOpCancelQuantumTaskInput(v *CancelQuantumTaskInput) error { } } +func validateOpCreateJobInput(v *CreateJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateJobInput"} + if v.ClientToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientToken")) + } + if v.AlgorithmSpecification == nil { + invalidParams.Add(smithy.NewErrParamRequired("AlgorithmSpecification")) + } else if v.AlgorithmSpecification != nil { + if err := validateAlgorithmSpecification(v.AlgorithmSpecification); err != nil { + invalidParams.AddNested("AlgorithmSpecification", err.(smithy.InvalidParamsError)) + } + } + if v.InputDataConfig != nil { + if err := validateInputConfigList(v.InputDataConfig); err != nil { + invalidParams.AddNested("InputDataConfig", err.(smithy.InvalidParamsError)) + } + } + if v.OutputDataConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("OutputDataConfig")) + } else if v.OutputDataConfig != nil { + if err := validateJobOutputDataConfig(v.OutputDataConfig); err != nil { + invalidParams.AddNested("OutputDataConfig", err.(smithy.InvalidParamsError)) + } + } + if v.CheckpointConfig != nil { + if err := validateJobCheckpointConfig(v.CheckpointConfig); err != nil { + invalidParams.AddNested("CheckpointConfig", err.(smithy.InvalidParamsError)) + } + } + if v.JobName == nil { + invalidParams.Add(smithy.NewErrParamRequired("JobName")) + } + if v.RoleArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) + } + if v.InstanceConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceConfig")) + } else if v.InstanceConfig != nil { + if err := validateInstanceConfig(v.InstanceConfig); err != nil { + invalidParams.AddNested("InstanceConfig", err.(smithy.InvalidParamsError)) + } + } + if v.DeviceConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("DeviceConfig")) + } else if v.DeviceConfig != nil { + if err := validateDeviceConfig(v.DeviceConfig); err != nil { + invalidParams.AddNested("DeviceConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateQuantumTaskInput(v *CreateQuantumTaskInput) error { if v == nil { return nil @@ -362,6 +761,21 @@ func validateOpGetDeviceInput(v *GetDeviceInput) error { } } +func validateOpGetJobInput(v *GetJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetJobInput"} + if v.JobArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("JobArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetQuantumTaskInput(v *GetQuantumTaskInput) error { if v == nil { return nil @@ -411,6 +825,25 @@ func validateOpSearchDevicesInput(v *SearchDevicesInput) error { } } +func validateOpSearchJobsInput(v *SearchJobsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SearchJobsInput"} + if v.Filters == nil { + invalidParams.Add(smithy.NewErrParamRequired("Filters")) + } else if v.Filters != nil { + if err := validateSearchJobsFilterList(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpSearchQuantumTasksInput(v *SearchQuantumTasksInput) error { if v == nil { return nil diff --git a/service/chimesdkmeetings/api_op_CreateMeeting.go b/service/chimesdkmeetings/api_op_CreateMeeting.go index 24acbbc07b3..7c0c992a37c 100644 --- a/service/chimesdkmeetings/api_op_CreateMeeting.go +++ b/service/chimesdkmeetings/api_op_CreateMeeting.go @@ -56,6 +56,10 @@ type CreateMeetingInput struct { // This member is required. MediaRegion *string + // Lists the audio and video features enabled for a meeting, such as echo + // reduction. + MeetingFeatures *types.MeetingFeaturesConfiguration + // Reserved. MeetingHostId *string diff --git a/service/chimesdkmeetings/api_op_CreateMeetingWithAttendees.go b/service/chimesdkmeetings/api_op_CreateMeetingWithAttendees.go index 256aee068ba..0ab9c53e9c8 100644 --- a/service/chimesdkmeetings/api_op_CreateMeetingWithAttendees.go +++ b/service/chimesdkmeetings/api_op_CreateMeetingWithAttendees.go @@ -58,6 +58,10 @@ type CreateMeetingWithAttendeesInput struct { // This member is required. MediaRegion *string + // Lists the audio and video features enabled for a meeting, such as echo + // reduction. + MeetingFeatures *types.MeetingFeaturesConfiguration + // Reserved. MeetingHostId *string diff --git a/service/chimesdkmeetings/deserializers.go b/service/chimesdkmeetings/deserializers.go index 7d7f1efad3f..ae9273a0787 100644 --- a/service/chimesdkmeetings/deserializers.go +++ b/service/chimesdkmeetings/deserializers.go @@ -1896,6 +1896,46 @@ func awsRestjson1_deserializeDocumentAttendeeList(v *[]types.Attendee, value int return nil } +func awsRestjson1_deserializeDocumentAudioFeatures(v **types.AudioFeatures, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AudioFeatures + if *v == nil { + sv = &types.AudioFeatures{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EchoReduction": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MeetingFeatureStatus to be of type string, got %T instead", value) + } + sv.EchoReduction = types.MeetingFeatureStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentBadRequestException(v **types.BadRequestException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -2310,6 +2350,11 @@ func awsRestjson1_deserializeDocumentMeeting(v **types.Meeting, value interface{ sv.MediaRegion = ptr.String(jtv) } + case "MeetingFeatures": + if err := awsRestjson1_deserializeDocumentMeetingFeaturesConfiguration(&sv.MeetingFeatures, value); err != nil { + return err + } + case "MeetingHostId": if value != nil { jtv, ok := value.(string) @@ -2337,6 +2382,42 @@ func awsRestjson1_deserializeDocumentMeeting(v **types.Meeting, value interface{ return nil } +func awsRestjson1_deserializeDocumentMeetingFeaturesConfiguration(v **types.MeetingFeaturesConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MeetingFeaturesConfiguration + if *v == nil { + sv = &types.MeetingFeaturesConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Audio": + if err := awsRestjson1_deserializeDocumentAudioFeatures(&sv.Audio, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentNotFoundException(v **types.NotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/chimesdkmeetings/doc.go b/service/chimesdkmeetings/doc.go index f757f6244c6..c9291da45a7 100644 --- a/service/chimesdkmeetings/doc.go +++ b/service/chimesdkmeetings/doc.go @@ -5,5 +5,7 @@ // // The Amazon Chime SDK meetings APIs in this section allow software developers to // create Amazon Chime SDK meetings, set the AWS Regions for meetings, create and -// manage users, and send and receive meeting notifications. +// manage users, and send and receive meeting notifications. For more information +// about the meeting APIs, see Amazon Chime SDK meetings +// (http://amazonaws.com/chime/latest/APIReference/API_Operations_Amazon_Chime_SDK_meetings). package chimesdkmeetings diff --git a/service/chimesdkmeetings/serializers.go b/service/chimesdkmeetings/serializers.go index c2856871754..daa53cc1e9e 100644 --- a/service/chimesdkmeetings/serializers.go +++ b/service/chimesdkmeetings/serializers.go @@ -253,6 +253,13 @@ func awsRestjson1_serializeOpDocumentCreateMeetingInput(v *CreateMeetingInput, v ok.String(*v.MediaRegion) } + if v.MeetingFeatures != nil { + ok := object.Key("MeetingFeatures") + if err := awsRestjson1_serializeDocumentMeetingFeaturesConfiguration(v.MeetingFeatures, ok); err != nil { + return err + } + } + if v.MeetingHostId != nil { ok := object.Key("MeetingHostId") ok.String(*v.MeetingHostId) @@ -350,6 +357,13 @@ func awsRestjson1_serializeOpDocumentCreateMeetingWithAttendeesInput(v *CreateMe ok.String(*v.MediaRegion) } + if v.MeetingFeatures != nil { + ok := object.Key("MeetingFeatures") + if err := awsRestjson1_serializeDocumentMeetingFeaturesConfiguration(v.MeetingFeatures, ok); err != nil { + return err + } + } + if v.MeetingHostId != nil { ok := object.Key("MeetingHostId") ok.String(*v.MeetingHostId) @@ -822,6 +836,18 @@ func awsRestjson1_serializeOpHttpBindingsStopMeetingTranscriptionInput(v *StopMe return nil } +func awsRestjson1_serializeDocumentAudioFeatures(v *types.AudioFeatures, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.EchoReduction) > 0 { + ok := object.Key("EchoReduction") + ok.String(string(v.EchoReduction)) + } + + return nil +} + func awsRestjson1_serializeDocumentCreateAttendeeRequestItem(v *types.CreateAttendeeRequestItem, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -959,6 +985,20 @@ func awsRestjson1_serializeDocumentEngineTranscribeSettings(v *types.EngineTrans return nil } +func awsRestjson1_serializeDocumentMeetingFeaturesConfiguration(v *types.MeetingFeaturesConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Audio != nil { + ok := object.Key("Audio") + if err := awsRestjson1_serializeDocumentAudioFeatures(v.Audio, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentNotificationsConfiguration(v *types.NotificationsConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/chimesdkmeetings/types/enums.go b/service/chimesdkmeetings/types/enums.go index 89ff6f32e31..15b393fbf7b 100644 --- a/service/chimesdkmeetings/types/enums.go +++ b/service/chimesdkmeetings/types/enums.go @@ -2,6 +2,24 @@ package types +type MeetingFeatureStatus string + +// Enum values for MeetingFeatureStatus +const ( + MeetingFeatureStatusAvailable MeetingFeatureStatus = "AVAILABLE" + MeetingFeatureStatusUnavailable MeetingFeatureStatus = "UNAVAILABLE" +) + +// Values returns all known values for MeetingFeatureStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (MeetingFeatureStatus) Values() []MeetingFeatureStatus { + return []MeetingFeatureStatus{ + "AVAILABLE", + "UNAVAILABLE", + } +} + type TranscribeContentIdentificationType string // Enum values for TranscribeContentIdentificationType diff --git a/service/chimesdkmeetings/types/types.go b/service/chimesdkmeetings/types/types.go index bab433d798d..8b3246e86f8 100644 --- a/service/chimesdkmeetings/types/types.go +++ b/service/chimesdkmeetings/types/types.go @@ -28,6 +28,16 @@ type Attendee struct { noSmithyDocumentSerde } +// An optional category of meeting features that contains audio-specific +// configurations, such as operating parameters for Amazon Voice Focus. +type AudioFeatures struct { + + // Makes echo reduction available to clients who connect to the meeting. + EchoReduction MeetingFeatureStatus + + noSmithyDocumentSerde +} + // The list of errors returned when errors are encountered during the // BatchCreateAttendee and CreateAttendee actions. This includes external user IDs, // error codes, and error messages. @@ -99,13 +109,13 @@ type EngineTranscribeSettings struct { // This member is required. LanguageCode TranscribeLanguageCode - // Set this field to PII to identify personal health information in the + // Set this field to PII to identify personally identifiable information in the // transcription output. ContentIdentificationType TranscribeContentIdentificationType // Set this field to PII to redact personally identifiable information in the // transcription output. Content redaction is performed only upon complete - // transcription of the audio segments. You can’t set both ContentRedactionType and + // transcription of the audio segments. You can’t set ContentRedactionType and // ContentIdentificationType in the same request. If you set both, your request // returns a BadRequestException. ContentRedactionType TranscribeContentRedactionType @@ -193,6 +203,9 @@ type Meeting struct { // eu-west-3, sa-east-1, us-east-1, us-east-2, us-west-1, us-west-2. MediaRegion *string + // The features available to a meeting, such as Amazon Voice Focus. + MeetingFeatures *MeetingFeaturesConfiguration + // Reserved. MeetingHostId *string @@ -202,6 +215,15 @@ type Meeting struct { noSmithyDocumentSerde } +// The configuration settings of the features available to a meeting. +type MeetingFeaturesConfiguration struct { + + // The configuration settings for the audio features available to a meeting. + Audio *AudioFeatures + + noSmithyDocumentSerde +} + // The configuration for resource targets to receive notifications when meeting and // attendee events occur. type NotificationsConfiguration struct { diff --git a/service/cloudformation/api_op_ImportStacksToStackSet.go b/service/cloudformation/api_op_ImportStacksToStackSet.go index a52b3bec2cc..37d53d30db3 100644 --- a/service/cloudformation/api_op_ImportStacksToStackSet.go +++ b/service/cloudformation/api_op_ImportStacksToStackSet.go @@ -12,11 +12,13 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Import existing stacks into a new stack sets. Use the stack import operation to -// import up to 10 stacks into a new stack set in the same account as the source -// stack or in a different administrator account and Region, by specifying the -// stack ID of the stack you intend to import. ImportStacksToStackSet is only -// supported by self-managed permissions. +// Use the stack import operations for self-managed or service-managed StackSets. +// For self-managed StackSets, the import operation can import stacks in the +// administrator account or in different target accounts and Amazon Web Services +// Regions. For service-managed StackSets, the import operation can import any +// stack in the same AWS Organizations as the management account. The import +// operation can import up to 10 stacks using inline stack IDs or up to 10,000 +// stacks using an Amazon S3 object. func (c *Client) ImportStacksToStackSet(ctx context.Context, params *ImportStacksToStackSetInput, optFns ...func(*Options)) (*ImportStacksToStackSetOutput, error) { if params == nil { params = &ImportStacksToStackSetInput{} @@ -34,12 +36,6 @@ func (c *Client) ImportStacksToStackSet(ctx context.Context, params *ImportStack type ImportStacksToStackSetInput struct { - // The IDs of the stacks you are importing into a stack set. You import up to 10 - // stacks per stack set at a time. - // - // This member is required. - StackIds []string - // The name of the stack set. The name must be unique in the Region where you // create your stack set. // @@ -64,6 +60,18 @@ type ImportStacksToStackSetInput struct { // (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-concepts.html#stackset-ops-options). OperationPreferences *types.StackSetOperationPreferences + // The list of OU ID’s to which the stacks being imported has to be mapped as + // deployment target. + OrganizationalUnitIds []string + + // The IDs of the stacks you are importing into a stack set. You import up to 10 + // stacks per stack set at a time. Specify either StackIds or StackIdsUrl. + StackIds []string + + // The Amazon S3 URL which contains list of stack ids to be inputted. Specify + // either StackIds or StackIdsUrl. + StackIdsUrl *string + noSmithyDocumentSerde } diff --git a/service/cloudformation/serializers.go b/service/cloudformation/serializers.go index 4bcfe624e36..bc3db4efdbc 100644 --- a/service/cloudformation/serializers.go +++ b/service/cloudformation/serializers.go @@ -5849,6 +5849,13 @@ func awsAwsquery_serializeOpDocumentImportStacksToStackSetInput(v *ImportStacksT } } + if v.OrganizationalUnitIds != nil { + objectKey := object.Key("OrganizationalUnitIds") + if err := awsAwsquery_serializeDocumentOrganizationalUnitIdList(v.OrganizationalUnitIds, objectKey); err != nil { + return err + } + } + if v.StackIds != nil { objectKey := object.Key("StackIds") if err := awsAwsquery_serializeDocumentStackIdList(v.StackIds, objectKey); err != nil { @@ -5856,6 +5863,11 @@ func awsAwsquery_serializeOpDocumentImportStacksToStackSetInput(v *ImportStacksT } } + if v.StackIdsUrl != nil { + objectKey := object.Key("StackIdsUrl") + objectKey.String(*v.StackIdsUrl) + } + if v.StackSetName != nil { objectKey := object.Key("StackSetName") objectKey.String(*v.StackSetName) diff --git a/service/cloudformation/types/types.go b/service/cloudformation/types/types.go index 1be884469c4..e343e81de27 100644 --- a/service/cloudformation/types/types.go +++ b/service/cloudformation/types/types.go @@ -310,10 +310,10 @@ type Parameter struct { // The input value associated with the parameter. ParameterValue *string - // Read-only. The value that corresponds to a Systems Manager parameter key. This - // field is returned only for SSM parameter types + // Read-only. Read-only. The value that corresponds to a SSM parameter key. This + // field is returned only for SSM // (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html#aws-ssm-parameter-types) - // in the template. + // parameter types in the template. ResolvedValue *string // During a stack update, use the existing parameter value that the stack is using @@ -695,9 +695,11 @@ type RollbackTrigger struct { // This member is required. Arn *string - // The resource type of the rollback trigger. Currently, AWS::CloudWatch::Alarm + // The resource type of the rollback trigger. Specify either AWS::CloudWatch::Alarm // (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html) - // is the only supported resource type. + // or AWS::CloudWatch::CompositeAlarm + // (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-compositealarm.html) + // resource types. // // This member is required. Type *string @@ -2155,7 +2157,7 @@ type TypeFilters struct { // * ACTIVATED: Public // extensions that have been activated for this account and region. // - // * THIRD-PARTY: + // * THIRD_PARTY: // Extensions available for use from publishers other than Amazon. This // includes: // @@ -2164,12 +2166,12 @@ type TypeFilters struct { // * Public extensions // from publishers other than Amazon, whether activated or not. // - // * AWS-TYPES: + // * AWS_TYPES: // Extensions available for use from Amazon. Category Category // The id of the publisher of the extension. Extensions published by Amazon are not - // assigned a publisher ID. Use the AWS-TYPES category to specify a list of types + // assigned a publisher ID. Use the AWS_TYPE category to specify a list of types // published by Amazon. PublisherId *string diff --git a/service/cloudformation/validators.go b/service/cloudformation/validators.go index 59d16ae31b4..618b1b123f2 100644 --- a/service/cloudformation/validators.go +++ b/service/cloudformation/validators.go @@ -1624,9 +1624,6 @@ func validateOpImportStacksToStackSetInput(v *ImportStacksToStackSetInput) error if v.StackSetName == nil { invalidParams.Add(smithy.NewErrParamRequired("StackSetName")) } - if v.StackIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("StackIds")) - } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/computeoptimizer/api_op_DeleteRecommendationPreferences.go b/service/computeoptimizer/api_op_DeleteRecommendationPreferences.go new file mode 100644 index 00000000000..e76ce60b4f4 --- /dev/null +++ b/service/computeoptimizer/api_op_DeleteRecommendationPreferences.go @@ -0,0 +1,140 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package computeoptimizer + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/computeoptimizer/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a recommendation preference, such as enhanced infrastructure metrics. +// For more information, see Activating enhanced infrastructure metrics +// (https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html) +// in the Compute Optimizer User Guide. +func (c *Client) DeleteRecommendationPreferences(ctx context.Context, params *DeleteRecommendationPreferencesInput, optFns ...func(*Options)) (*DeleteRecommendationPreferencesOutput, error) { + if params == nil { + params = &DeleteRecommendationPreferencesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteRecommendationPreferences", params, optFns, c.addOperationDeleteRecommendationPreferencesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteRecommendationPreferencesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteRecommendationPreferencesInput struct { + + // The name of the recommendation preference to delete. Enhanced infrastructure + // metrics (EnhancedInfrastructureMetrics) is the only feature that can be + // activated through preferences. Therefore, it is also the only recommendation + // preference that can be deleted. + // + // This member is required. + RecommendationPreferenceNames []types.RecommendationPreferenceName + + // The target resource type of the recommendation preference to delete. The + // Ec2Instance option encompasses standalone instances and instances that are part + // of Auto Scaling groups. The AutoScalingGroup option encompasses only instances + // that are part of an Auto Scaling group. + // + // This member is required. + ResourceType types.ResourceType + + // An object that describes the scope of the recommendation preference to delete. + // You can delete recommendation preferences that are created at the organization + // level (for management accounts of an organization only), account level, and + // resource level. For more information, see Activating enhanced infrastructure + // metrics + // (https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html) + // in the Compute Optimizer User Guide. + Scope *types.Scope + + noSmithyDocumentSerde +} + +type DeleteRecommendationPreferencesOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteRecommendationPreferencesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpDeleteRecommendationPreferences{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDeleteRecommendationPreferences{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteRecommendationPreferencesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRecommendationPreferences(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteRecommendationPreferences(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "compute-optimizer", + OperationName: "DeleteRecommendationPreferences", + } +} diff --git a/service/computeoptimizer/api_op_ExportEC2InstanceRecommendations.go b/service/computeoptimizer/api_op_ExportEC2InstanceRecommendations.go index 9ce296e124f..5a0d16ea5a5 100644 --- a/service/computeoptimizer/api_op_ExportEC2InstanceRecommendations.go +++ b/service/computeoptimizer/api_op_ExportEC2InstanceRecommendations.go @@ -40,10 +40,10 @@ type ExportEC2InstanceRecommendationsInput struct { // bucket name and key prefix for the export job. You must create the destination // Amazon S3 bucket for your recommendations export before you create the export // job. Compute Optimizer does not create the S3 bucket for you. After you create - // the S3 bucket, ensure that it has the required permissions policy policy to - // allow Compute Optimizer to write the export file to it. If you plan to specify - // an object prefix when you create the export job, you must include the object - // prefix in the that you add to the S3 bucket. For more information, see Amazon S3 + // the S3 bucket, ensure that it has the required permissions policy to allow + // Compute Optimizer to write the export file to it. If you plan to specify an + // object prefix when you create the export job, you must include the object prefix + // in the policy that you add to the S3 bucket. For more information, see Amazon S3 // Bucket Policy for Compute Optimizer // (https://docs.aws.amazon.com/compute-optimizer/latest/ug/create-s3-bucket-policy-for-compute-optimizer.html) // in the Compute Optimizer User Guide. diff --git a/service/computeoptimizer/api_op_GetEffectiveRecommendationPreferences.go b/service/computeoptimizer/api_op_GetEffectiveRecommendationPreferences.go new file mode 100644 index 00000000000..05c2426d2ca --- /dev/null +++ b/service/computeoptimizer/api_op_GetEffectiveRecommendationPreferences.go @@ -0,0 +1,135 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package computeoptimizer + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/computeoptimizer/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the recommendation preferences that are in effect for a given resource, +// such as enhanced infrastructure metrics. Considers all applicable preferences +// that you might have set at the resource, account, and organization level. When +// you create a recommendation preference, you can set its status to Active or +// Inactive. Use this action to view the recommendation preferences that are in +// effect, or Active. +func (c *Client) GetEffectiveRecommendationPreferences(ctx context.Context, params *GetEffectiveRecommendationPreferencesInput, optFns ...func(*Options)) (*GetEffectiveRecommendationPreferencesOutput, error) { + if params == nil { + params = &GetEffectiveRecommendationPreferencesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetEffectiveRecommendationPreferences", params, optFns, c.addOperationGetEffectiveRecommendationPreferencesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetEffectiveRecommendationPreferencesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetEffectiveRecommendationPreferencesInput struct { + + // The Amazon Resource Name (ARN) of the resource for which to confirm effective + // recommendation preferences. Only EC2 instance and Auto Scaling group ARNs are + // currently supported. + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + +type GetEffectiveRecommendationPreferencesOutput struct { + + // The status of the enhanced infrastructure metrics recommendation preference. + // Considers all applicable preferences that you might have set at the resource, + // account, and organization level. A status of Active confirms that the preference + // is applied in the latest recommendation refresh, and a status of Inactive + // confirms that it's not yet applied. To validate whether the preference is + // applied to your last generated set of recommendations, review the + // effectiveRecommendationPreferences value in the response of the + // GetAutoScalingGroupRecommendations and GetEC2InstanceRecommendations actions. + EnhancedInfrastructureMetrics types.EnhancedInfrastructureMetrics + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetEffectiveRecommendationPreferencesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpGetEffectiveRecommendationPreferences{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpGetEffectiveRecommendationPreferences{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetEffectiveRecommendationPreferencesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEffectiveRecommendationPreferences(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetEffectiveRecommendationPreferences(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "compute-optimizer", + OperationName: "GetEffectiveRecommendationPreferences", + } +} diff --git a/service/computeoptimizer/api_op_GetRecommendationPreferences.go b/service/computeoptimizer/api_op_GetRecommendationPreferences.go new file mode 100644 index 00000000000..e42fec67203 --- /dev/null +++ b/service/computeoptimizer/api_op_GetRecommendationPreferences.go @@ -0,0 +1,152 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package computeoptimizer + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/computeoptimizer/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns existing recommendation preferences, such as enhanced infrastructure +// metrics. Use the scope parameter to specify which preferences to return. You can +// specify to return preferences for an organization, a specific account ID, or a +// specific EC2 instance or Auto Scaling group Amazon Resource Name (ARN). For more +// information, see Activating enhanced infrastructure metrics +// (https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html) +// in the Compute Optimizer User Guide. +func (c *Client) GetRecommendationPreferences(ctx context.Context, params *GetRecommendationPreferencesInput, optFns ...func(*Options)) (*GetRecommendationPreferencesOutput, error) { + if params == nil { + params = &GetRecommendationPreferencesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetRecommendationPreferences", params, optFns, c.addOperationGetRecommendationPreferencesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetRecommendationPreferencesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetRecommendationPreferencesInput struct { + + // The target resource type of the recommendation preference for which to return + // preferences. The Ec2Instance option encompasses standalone instances and + // instances that are part of Auto Scaling groups. The AutoScalingGroup option + // encompasses only instances that are part of an Auto Scaling group. + // + // This member is required. + ResourceType types.ResourceType + + // The maximum number of recommendation preferences to return with a single + // request. To retrieve the remaining results, make another request with the + // returned nextToken value. + MaxResults *int32 + + // The token to advance to the next page of recommendation preferences. + NextToken *string + + // An object that describes the scope of the recommendation preference to return. + // You can return recommendation preferences that are created at the organization + // level (for management accounts of an organization only), account level, and + // resource level. For more information, see Activating enhanced infrastructure + // metrics + // (https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html) + // in the Compute Optimizer User Guide. + Scope *types.Scope + + noSmithyDocumentSerde +} + +type GetRecommendationPreferencesOutput struct { + + // The token to use to advance to the next page of recommendation preferences. This + // value is null when there are no more pages of recommendation preferences to + // return. + NextToken *string + + // An array of objects that describe recommendation preferences. + RecommendationPreferencesDetails []types.RecommendationPreferencesDetail + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetRecommendationPreferencesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpGetRecommendationPreferences{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpGetRecommendationPreferences{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetRecommendationPreferencesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRecommendationPreferences(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetRecommendationPreferences(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "compute-optimizer", + OperationName: "GetRecommendationPreferences", + } +} diff --git a/service/computeoptimizer/api_op_PutRecommendationPreferences.go b/service/computeoptimizer/api_op_PutRecommendationPreferences.go new file mode 100644 index 00000000000..26fa5e544e5 --- /dev/null +++ b/service/computeoptimizer/api_op_PutRecommendationPreferences.go @@ -0,0 +1,144 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package computeoptimizer + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/computeoptimizer/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new recommendation preference or updates an existing recommendation +// preference, such as enhanced infrastructure metrics. For more information, see +// Activating enhanced infrastructure metrics +// (https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html) +// in the Compute Optimizer User Guide. +func (c *Client) PutRecommendationPreferences(ctx context.Context, params *PutRecommendationPreferencesInput, optFns ...func(*Options)) (*PutRecommendationPreferencesOutput, error) { + if params == nil { + params = &PutRecommendationPreferencesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutRecommendationPreferences", params, optFns, c.addOperationPutRecommendationPreferencesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutRecommendationPreferencesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutRecommendationPreferencesInput struct { + + // The target resource type of the recommendation preference to create. The + // Ec2Instance option encompasses standalone instances and instances that are part + // of Auto Scaling groups. The AutoScalingGroup option encompasses only instances + // that are part of an Auto Scaling group. + // + // This member is required. + ResourceType types.ResourceType + + // The status of the enhanced infrastructure metrics recommendation preference to + // create or update. A status of Active confirms that the preference is applied in + // the latest recommendation refresh, and a status of Inactive confirms that it's + // not yet applied. + EnhancedInfrastructureMetrics types.EnhancedInfrastructureMetrics + + // An object that describes the scope of the recommendation preference to create. + // You can create recommendation preferences at the organization level (for + // management accounts of an organization only), account level, and resource level. + // For more information, see Activating enhanced infrastructure metrics + // (https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html) + // in the Compute Optimizer User Guide. You cannot create recommendation + // preferences for Auto Scaling groups at the organization and account levels. You + // can create recommendation preferences for Auto Scaling groups only at the + // resource level by specifying a scope name of ResourceArn and a scope value of + // the Auto Scaling group Amazon Resource Name (ARN). This will configure the + // preference for all instances that are part of the specified the Auto Scaling + // group. + Scope *types.Scope + + noSmithyDocumentSerde +} + +type PutRecommendationPreferencesOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutRecommendationPreferencesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpPutRecommendationPreferences{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpPutRecommendationPreferences{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpPutRecommendationPreferencesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutRecommendationPreferences(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutRecommendationPreferences(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "compute-optimizer", + OperationName: "PutRecommendationPreferences", + } +} diff --git a/service/computeoptimizer/deserializers.go b/service/computeoptimizer/deserializers.go index 689b78b5e5f..e531b536af2 100644 --- a/service/computeoptimizer/deserializers.go +++ b/service/computeoptimizer/deserializers.go @@ -21,6 +21,138 @@ import ( "time" ) +type awsAwsjson10_deserializeOpDeleteRecommendationPreferences struct { +} + +func (*awsAwsjson10_deserializeOpDeleteRecommendationPreferences) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpDeleteRecommendationPreferences) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteRecommendationPreferences(response, &metadata) + } + output := &DeleteRecommendationPreferencesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentDeleteRecommendationPreferencesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorDeleteRecommendationPreferences(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsAwsjson10_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("MissingAuthenticationToken", errorCode): + return awsAwsjson10_deserializeErrorMissingAuthenticationToken(response, errorBody) + + case strings.EqualFold("OptInRequiredException", errorCode): + return awsAwsjson10_deserializeErrorOptInRequiredException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson10_deserializeOpDescribeRecommendationExportJobs struct { } @@ -1209,14 +1341,14 @@ func awsAwsjson10_deserializeOpErrorGetEC2RecommendationProjectedMetrics(respons } } -type awsAwsjson10_deserializeOpGetEnrollmentStatus struct { +type awsAwsjson10_deserializeOpGetEffectiveRecommendationPreferences struct { } -func (*awsAwsjson10_deserializeOpGetEnrollmentStatus) ID() string { +func (*awsAwsjson10_deserializeOpGetEffectiveRecommendationPreferences) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetEnrollmentStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetEffectiveRecommendationPreferences) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1230,9 +1362,9 @@ func (m *awsAwsjson10_deserializeOpGetEnrollmentStatus) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetEnrollmentStatus(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetEffectiveRecommendationPreferences(response, &metadata) } - output := &GetEnrollmentStatusOutput{} + output := &GetEffectiveRecommendationPreferencesOutput{} out.Result = output var buff [1024]byte @@ -1252,7 +1384,7 @@ func (m *awsAwsjson10_deserializeOpGetEnrollmentStatus) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetEnrollmentStatusOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetEffectiveRecommendationPreferencesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1266,7 +1398,7 @@ func (m *awsAwsjson10_deserializeOpGetEnrollmentStatus) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetEnrollmentStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetEffectiveRecommendationPreferences(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1319,6 +1451,12 @@ func awsAwsjson10_deserializeOpErrorGetEnrollmentStatus(response *smithyhttp.Res case strings.EqualFold("MissingAuthenticationToken", errorCode): return awsAwsjson10_deserializeErrorMissingAuthenticationToken(response, errorBody) + case strings.EqualFold("OptInRequiredException", errorCode): + return awsAwsjson10_deserializeErrorOptInRequiredException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceUnavailableException", errorCode): return awsAwsjson10_deserializeErrorServiceUnavailableException(response, errorBody) @@ -1335,14 +1473,14 @@ func awsAwsjson10_deserializeOpErrorGetEnrollmentStatus(response *smithyhttp.Res } } -type awsAwsjson10_deserializeOpGetEnrollmentStatusesForOrganization struct { +type awsAwsjson10_deserializeOpGetEnrollmentStatus struct { } -func (*awsAwsjson10_deserializeOpGetEnrollmentStatusesForOrganization) ID() string { +func (*awsAwsjson10_deserializeOpGetEnrollmentStatus) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetEnrollmentStatusesForOrganization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetEnrollmentStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1356,9 +1494,9 @@ func (m *awsAwsjson10_deserializeOpGetEnrollmentStatusesForOrganization) HandleD } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetEnrollmentStatusesForOrganization(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetEnrollmentStatus(response, &metadata) } - output := &GetEnrollmentStatusesForOrganizationOutput{} + output := &GetEnrollmentStatusOutput{} out.Result = output var buff [1024]byte @@ -1378,7 +1516,7 @@ func (m *awsAwsjson10_deserializeOpGetEnrollmentStatusesForOrganization) HandleD return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetEnrollmentStatusesForOrganizationOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetEnrollmentStatusOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1392,7 +1530,7 @@ func (m *awsAwsjson10_deserializeOpGetEnrollmentStatusesForOrganization) HandleD return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetEnrollmentStatusesForOrganization(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetEnrollmentStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1461,14 +1599,14 @@ func awsAwsjson10_deserializeOpErrorGetEnrollmentStatusesForOrganization(respons } } -type awsAwsjson10_deserializeOpGetLambdaFunctionRecommendations struct { +type awsAwsjson10_deserializeOpGetEnrollmentStatusesForOrganization struct { } -func (*awsAwsjson10_deserializeOpGetLambdaFunctionRecommendations) ID() string { +func (*awsAwsjson10_deserializeOpGetEnrollmentStatusesForOrganization) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetLambdaFunctionRecommendations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetEnrollmentStatusesForOrganization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1482,9 +1620,9 @@ func (m *awsAwsjson10_deserializeOpGetLambdaFunctionRecommendations) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetLambdaFunctionRecommendations(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetEnrollmentStatusesForOrganization(response, &metadata) } - output := &GetLambdaFunctionRecommendationsOutput{} + output := &GetEnrollmentStatusesForOrganizationOutput{} out.Result = output var buff [1024]byte @@ -1504,7 +1642,7 @@ func (m *awsAwsjson10_deserializeOpGetLambdaFunctionRecommendations) HandleDeser return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetLambdaFunctionRecommendationsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetEnrollmentStatusesForOrganizationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1518,7 +1656,7 @@ func (m *awsAwsjson10_deserializeOpGetLambdaFunctionRecommendations) HandleDeser return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetLambdaFunctionRecommendations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetEnrollmentStatusesForOrganization(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1568,15 +1706,9 @@ func awsAwsjson10_deserializeOpErrorGetLambdaFunctionRecommendations(response *s case strings.EqualFold("InvalidParameterValueException", errorCode): return awsAwsjson10_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsAwsjson10_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("MissingAuthenticationToken", errorCode): return awsAwsjson10_deserializeErrorMissingAuthenticationToken(response, errorBody) - case strings.EqualFold("OptInRequiredException", errorCode): - return awsAwsjson10_deserializeErrorOptInRequiredException(response, errorBody) - case strings.EqualFold("ServiceUnavailableException", errorCode): return awsAwsjson10_deserializeErrorServiceUnavailableException(response, errorBody) @@ -1593,14 +1725,14 @@ func awsAwsjson10_deserializeOpErrorGetLambdaFunctionRecommendations(response *s } } -type awsAwsjson10_deserializeOpGetRecommendationSummaries struct { +type awsAwsjson10_deserializeOpGetLambdaFunctionRecommendations struct { } -func (*awsAwsjson10_deserializeOpGetRecommendationSummaries) ID() string { +func (*awsAwsjson10_deserializeOpGetLambdaFunctionRecommendations) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetRecommendationSummaries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetLambdaFunctionRecommendations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1614,9 +1746,9 @@ func (m *awsAwsjson10_deserializeOpGetRecommendationSummaries) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetRecommendationSummaries(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetLambdaFunctionRecommendations(response, &metadata) } - output := &GetRecommendationSummariesOutput{} + output := &GetLambdaFunctionRecommendationsOutput{} out.Result = output var buff [1024]byte @@ -1636,7 +1768,7 @@ func (m *awsAwsjson10_deserializeOpGetRecommendationSummaries) HandleDeserialize return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetRecommendationSummariesOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetLambdaFunctionRecommendationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1650,7 +1782,7 @@ func (m *awsAwsjson10_deserializeOpGetRecommendationSummaries) HandleDeserialize return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetRecommendationSummaries(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetLambdaFunctionRecommendations(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1700,6 +1832,9 @@ func awsAwsjson10_deserializeOpErrorGetRecommendationSummaries(response *smithyh case strings.EqualFold("InvalidParameterValueException", errorCode): return awsAwsjson10_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson10_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("MissingAuthenticationToken", errorCode): return awsAwsjson10_deserializeErrorMissingAuthenticationToken(response, errorBody) @@ -1722,14 +1857,14 @@ func awsAwsjson10_deserializeOpErrorGetRecommendationSummaries(response *smithyh } } -type awsAwsjson10_deserializeOpUpdateEnrollmentStatus struct { +type awsAwsjson10_deserializeOpGetRecommendationPreferences struct { } -func (*awsAwsjson10_deserializeOpUpdateEnrollmentStatus) ID() string { +func (*awsAwsjson10_deserializeOpGetRecommendationPreferences) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUpdateEnrollmentStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetRecommendationPreferences) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1743,9 +1878,9 @@ func (m *awsAwsjson10_deserializeOpUpdateEnrollmentStatus) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUpdateEnrollmentStatus(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetRecommendationPreferences(response, &metadata) } - output := &UpdateEnrollmentStatusOutput{} + output := &GetRecommendationPreferencesOutput{} out.Result = output var buff [1024]byte @@ -1765,7 +1900,7 @@ func (m *awsAwsjson10_deserializeOpUpdateEnrollmentStatus) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUpdateEnrollmentStatusOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetRecommendationPreferencesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1779,7 +1914,7 @@ func (m *awsAwsjson10_deserializeOpUpdateEnrollmentStatus) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUpdateEnrollmentStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetRecommendationPreferences(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1832,6 +1967,12 @@ func awsAwsjson10_deserializeOpErrorUpdateEnrollmentStatus(response *smithyhttp. case strings.EqualFold("MissingAuthenticationToken", errorCode): return awsAwsjson10_deserializeErrorMissingAuthenticationToken(response, errorBody) + case strings.EqualFold("OptInRequiredException", errorCode): + return awsAwsjson10_deserializeErrorOptInRequiredException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceUnavailableException", errorCode): return awsAwsjson10_deserializeErrorServiceUnavailableException(response, errorBody) @@ -1848,11 +1989,36 @@ func awsAwsjson10_deserializeOpErrorUpdateEnrollmentStatus(response *smithyhttp. } } -func awsAwsjson10_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +type awsAwsjson10_deserializeOpGetRecommendationSummaries struct { +} + +func (*awsAwsjson10_deserializeOpGetRecommendationSummaries) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpGetRecommendationSummaries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorGetRecommendationSummaries(response, &metadata) + } + output := &GetRecommendationSummariesOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -1863,12 +2029,10 @@ func awsAwsjson10_deserializeErrorAccessDeniedException(response *smithyhttp.Res Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.AccessDeniedException{} - err := awsAwsjson10_deserializeDocumentAccessDeniedException(&output, shape) - + err = awsAwsjson10_deserializeOpDocumentGetRecommendationSummariesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1876,57 +2040,35 @@ func awsAwsjson10_deserializeErrorAccessDeniedException(response *smithyhttp.Res Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson10_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) +func awsAwsjson10_deserializeOpErrorGetRecommendationSummaries(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - output := &types.InternalServerException{} - err := awsAwsjson10_deserializeDocumentInternalServerException(&output, shape) + errorCode := "UnknownError" + errorMessage := errorCode - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) } - errorBody.Seek(0, io.SeekStart) - return output -} - -func awsAwsjson10_deserializeErrorInvalidParameterValueException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -1936,28 +2078,76 @@ func awsAwsjson10_deserializeErrorInvalidParameterValueException(response *smith return err } - output := &types.InvalidParameterValueException{} - err := awsAwsjson10_deserializeDocumentInvalidParameterValueException(&output, shape) + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsAwsjson10_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("MissingAuthenticationToken", errorCode): + return awsAwsjson10_deserializeErrorMissingAuthenticationToken(response, errorBody) + + case strings.EqualFold("OptInRequiredException", errorCode): + return awsAwsjson10_deserializeErrorOptInRequiredException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - errorBody.Seek(0, io.SeekStart) - return output +type awsAwsjson10_deserializeOpPutRecommendationPreferences struct { } -func awsAwsjson10_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func (*awsAwsjson10_deserializeOpPutRecommendationPreferences) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpPutRecommendationPreferences) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorPutRecommendationPreferences(response, &metadata) + } + output := &PutRecommendationPreferencesOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -1968,12 +2158,10 @@ func awsAwsjson10_deserializeErrorLimitExceededException(response *smithyhttp.Re Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.LimitExceededException{} - err := awsAwsjson10_deserializeDocumentLimitExceededException(&output, shape) - + err = awsAwsjson10_deserializeOpDocumentPutRecommendationPreferencesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1981,22 +2169,35 @@ func awsAwsjson10_deserializeErrorLimitExceededException(response *smithyhttp.Re Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson10_deserializeErrorMissingAuthenticationToken(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson10_deserializeOpErrorPutRecommendationPreferences(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -2006,28 +2207,79 @@ func awsAwsjson10_deserializeErrorMissingAuthenticationToken(response *smithyhtt return err } - output := &types.MissingAuthenticationToken{} - err := awsAwsjson10_deserializeDocumentMissingAuthenticationToken(&output, shape) + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsAwsjson10_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("MissingAuthenticationToken", errorCode): + return awsAwsjson10_deserializeErrorMissingAuthenticationToken(response, errorBody) + + case strings.EqualFold("OptInRequiredException", errorCode): + return awsAwsjson10_deserializeErrorOptInRequiredException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - errorBody.Seek(0, io.SeekStart) - return output +type awsAwsjson10_deserializeOpUpdateEnrollmentStatus struct { } -func awsAwsjson10_deserializeErrorOptInRequiredException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func (*awsAwsjson10_deserializeOpUpdateEnrollmentStatus) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdateEnrollmentStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorUpdateEnrollmentStatus(response, &metadata) + } + output := &UpdateEnrollmentStatusOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -2038,12 +2290,10 @@ func awsAwsjson10_deserializeErrorOptInRequiredException(response *smithyhttp.Re Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.OptInRequiredException{} - err := awsAwsjson10_deserializeDocumentOptInRequiredException(&output, shape) - + err = awsAwsjson10_deserializeOpDocumentUpdateEnrollmentStatusOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2051,34 +2301,34 @@ func awsAwsjson10_deserializeErrorOptInRequiredException(response *smithyhttp.Re Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson10_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson10_deserializeOpErrorUpdateEnrollmentStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - output := &types.ResourceNotFoundException{} - err := awsAwsjson10_deserializeDocumentResourceNotFoundException(&output, shape) - + code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2090,12 +2340,45 @@ func awsAwsjson10_deserializeErrorResourceNotFoundException(response *smithyhttp } errorBody.Seek(0, io.SeekStart) - return output -} - -func awsAwsjson10_deserializeErrorServiceUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsAwsjson10_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("MissingAuthenticationToken", errorCode): + return awsAwsjson10_deserializeErrorMissingAuthenticationToken(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson10_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsAwsjson10_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) @@ -2111,8 +2394,8 @@ func awsAwsjson10_deserializeErrorServiceUnavailableException(response *smithyht return err } - output := &types.ServiceUnavailableException{} - err := awsAwsjson10_deserializeDocumentServiceUnavailableException(&output, shape) + output := &types.AccessDeniedException{} + err := awsAwsjson10_deserializeDocumentAccessDeniedException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -2128,7 +2411,7 @@ func awsAwsjson10_deserializeErrorServiceUnavailableException(response *smithyht return output } -func awsAwsjson10_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson10_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -2146,8 +2429,8 @@ func awsAwsjson10_deserializeErrorThrottlingException(response *smithyhttp.Respo return err } - output := &types.ThrottlingException{} - err := awsAwsjson10_deserializeDocumentThrottlingException(&output, shape) + output := &types.InternalServerException{} + err := awsAwsjson10_deserializeDocumentInternalServerException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -2163,78 +2446,652 @@ func awsAwsjson10_deserializeErrorThrottlingException(response *smithyhttp.Respo return output } -func awsAwsjson10_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) +func awsAwsjson10_deserializeErrorInvalidParameterValueException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err } - if value == nil { - return nil + + output := &types.InvalidParameterValueException{} + err := awsAwsjson10_deserializeDocumentInvalidParameterValueException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err } - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err } - var sv *types.AccessDeniedException - if *v == nil { - sv = &types.AccessDeniedException{} - } else { - sv = *v + output := &types.LimitExceededException{} + err := awsAwsjson10_deserializeDocumentLimitExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err } - for key, value := range shape { - switch key { - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } + errorBody.Seek(0, io.SeekStart) + return output +} - default: - _, _ = key, value +func awsAwsjson10_deserializeErrorMissingAuthenticationToken(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } + return err } - *v = sv - return nil + + output := &types.MissingAuthenticationToken{} + err := awsAwsjson10_deserializeDocumentMissingAuthenticationToken(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output } -func awsAwsjson10_deserializeDocumentAccountEnrollmentStatus(v **types.AccountEnrollmentStatus, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) +func awsAwsjson10_deserializeErrorOptInRequiredException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err } - if value == nil { - return nil + + output := &types.OptInRequiredException{} + err := awsAwsjson10_deserializeDocumentOptInRequiredException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err } - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err } - var sv *types.AccountEnrollmentStatus - if *v == nil { - sv = &types.AccountEnrollmentStatus{} + output := &types.ResourceNotFoundException{} + err := awsAwsjson10_deserializeDocumentResourceNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorServiceUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ServiceUnavailableException{} + err := awsAwsjson10_deserializeDocumentServiceUnavailableException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ThrottlingException{} + err := awsAwsjson10_deserializeDocumentThrottlingException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAccountEnrollmentStatus(v **types.AccountEnrollmentStatus, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccountEnrollmentStatus + if *v == nil { + sv = &types.AccountEnrollmentStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "lastUpdatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected LastUpdatedTimestamp to be a JSON Number, got %T instead", value) + + } + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Status to be of type string, got %T instead", value) + } + sv.Status = types.Status(jtv) + } + + case "statusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusReason to be of type string, got %T instead", value) + } + sv.StatusReason = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAccountEnrollmentStatuses(v *[]types.AccountEnrollmentStatus, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.AccountEnrollmentStatus + if *v == nil { + cv = []types.AccountEnrollmentStatus{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AccountEnrollmentStatus + destAddr := &col + if err := awsAwsjson10_deserializeDocumentAccountEnrollmentStatus(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentAutoScalingGroupConfiguration(v **types.AutoScalingGroupConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AutoScalingGroupConfiguration + if *v == nil { + sv = &types.AutoScalingGroupConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "desiredCapacity": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DesiredCapacity to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DesiredCapacity = int32(i64) + } + + case "instanceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceType to be of type string, got %T instead", value) + } + sv.InstanceType = ptr.String(jtv) + } + + case "maxSize": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaxSize to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaxSize = int32(i64) + } + + case "minSize": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MinSize to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MinSize = int32(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAutoScalingGroupRecommendation(v **types.AutoScalingGroupRecommendation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AutoScalingGroupRecommendation + if *v == nil { + sv = &types.AutoScalingGroupRecommendation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "autoScalingGroupArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutoScalingGroupArn to be of type string, got %T instead", value) + } + sv.AutoScalingGroupArn = ptr.String(jtv) + } + + case "autoScalingGroupName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutoScalingGroupName to be of type string, got %T instead", value) + } + sv.AutoScalingGroupName = ptr.String(jtv) + } + + case "currentConfiguration": + if err := awsAwsjson10_deserializeDocumentAutoScalingGroupConfiguration(&sv.CurrentConfiguration, value); err != nil { + return err + } + + case "currentPerformanceRisk": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CurrentPerformanceRisk to be of type string, got %T instead", value) + } + sv.CurrentPerformanceRisk = types.CurrentPerformanceRisk(jtv) + } + + case "effectiveRecommendationPreferences": + if err := awsAwsjson10_deserializeDocumentEffectiveRecommendationPreferences(&sv.EffectiveRecommendationPreferences, value); err != nil { + return err + } + + case "finding": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Finding to be of type string, got %T instead", value) + } + sv.Finding = types.Finding(jtv) + } + + case "lastRefreshTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastRefreshTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected LastRefreshTimestamp to be a JSON Number, got %T instead", value) + + } + } + + case "lookBackPeriodInDays": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LookBackPeriodInDays = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.LookBackPeriodInDays = f64 + + default: + return fmt.Errorf("expected LookBackPeriodInDays to be a JSON Number, got %T instead", value) + + } + } + + case "recommendationOptions": + if err := awsAwsjson10_deserializeDocumentAutoScalingGroupRecommendationOptions(&sv.RecommendationOptions, value); err != nil { + return err + } + + case "utilizationMetrics": + if err := awsAwsjson10_deserializeDocumentUtilizationMetrics(&sv.UtilizationMetrics, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAutoScalingGroupRecommendationOption(v **types.AutoScalingGroupRecommendationOption, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AutoScalingGroupRecommendationOption + if *v == nil { + sv = &types.AutoScalingGroupRecommendationOption{} } else { sv = *v } for key, value := range shape { switch key { - case "accountId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) - } - sv.AccountId = ptr.String(jtv) + case "configuration": + if err := awsAwsjson10_deserializeDocumentAutoScalingGroupConfiguration(&sv.Configuration, value); err != nil { + return err } - case "lastUpdatedTimestamp": + case "performanceRisk": if value != nil { switch jtv := value.(type) { case json.Number: @@ -2242,30 +3099,53 @@ func awsAwsjson10_deserializeDocumentAccountEnrollmentStatus(v **types.AccountEn if err != nil { return err } - sv.LastUpdatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + sv.PerformanceRisk = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.PerformanceRisk = f64 default: - return fmt.Errorf("expected LastUpdatedTimestamp to be a JSON Number, got %T instead", value) + return fmt.Errorf("expected PerformanceRisk to be a JSON Number, got %T instead", value) } } - case "status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Status to be of type string, got %T instead", value) - } - sv.Status = types.Status(jtv) + case "projectedUtilizationMetrics": + if err := awsAwsjson10_deserializeDocumentProjectedUtilizationMetrics(&sv.ProjectedUtilizationMetrics, value); err != nil { + return err } - case "statusReason": + case "rank": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected StatusReason to be of type string, got %T instead", value) + return fmt.Errorf("expected Rank to be json.Number, got %T instead", value) } - sv.StatusReason = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Rank = int32(i64) + } + + case "savingsOpportunity": + if err := awsAwsjson10_deserializeDocumentSavingsOpportunity(&sv.SavingsOpportunity, value); err != nil { + return err } default: @@ -2277,7 +3157,7 @@ func awsAwsjson10_deserializeDocumentAccountEnrollmentStatus(v **types.AccountEn return nil } -func awsAwsjson10_deserializeDocumentAccountEnrollmentStatuses(v *[]types.AccountEnrollmentStatus, value interface{}) error { +func awsAwsjson10_deserializeDocumentAutoScalingGroupRecommendationOptions(v *[]types.AutoScalingGroupRecommendationOption, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2290,17 +3170,17 @@ func awsAwsjson10_deserializeDocumentAccountEnrollmentStatuses(v *[]types.Accoun return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.AccountEnrollmentStatus + var cv []types.AutoScalingGroupRecommendationOption if *v == nil { - cv = []types.AccountEnrollmentStatus{} + cv = []types.AutoScalingGroupRecommendationOption{} } else { cv = *v } for _, value := range shape { - var col types.AccountEnrollmentStatus + var col types.AutoScalingGroupRecommendationOption destAddr := &col - if err := awsAwsjson10_deserializeDocumentAccountEnrollmentStatus(&destAddr, value); err != nil { + if err := awsAwsjson10_deserializeDocumentAutoScalingGroupRecommendationOption(&destAddr, value); err != nil { return err } col = *destAddr @@ -2311,7 +3191,7 @@ func awsAwsjson10_deserializeDocumentAccountEnrollmentStatuses(v *[]types.Accoun return nil } -func awsAwsjson10_deserializeDocumentAutoScalingGroupConfiguration(v **types.AutoScalingGroupConfiguration, value interface{}) error { +func awsAwsjson10_deserializeDocumentAutoScalingGroupRecommendations(v *[]types.AutoScalingGroupRecommendation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2319,78 +3199,69 @@ func awsAwsjson10_deserializeDocumentAutoScalingGroupConfiguration(v **types.Aut return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AutoScalingGroupConfiguration + var cv []types.AutoScalingGroupRecommendation if *v == nil { - sv = &types.AutoScalingGroupConfiguration{} + cv = []types.AutoScalingGroupRecommendation{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "desiredCapacity": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected DesiredCapacity to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.DesiredCapacity = int32(i64) - } + for _, value := range shape { + var col types.AutoScalingGroupRecommendation + destAddr := &col + if err := awsAwsjson10_deserializeDocumentAutoScalingGroupRecommendation(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) - case "instanceType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected InstanceType to be of type string, got %T instead", value) - } - sv.InstanceType = ptr.String(jtv) - } + } + *v = cv + return nil +} - case "maxSize": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected MaxSize to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.MaxSize = int32(i64) - } +func awsAwsjson10_deserializeDocumentCpuVendorArchitectures(v *[]types.CpuVendorArchitecture, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - case "minSize": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected MinSize to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.MinSize = int32(i64) - } + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - default: - _, _ = key, value + var cv []types.CpuVendorArchitecture + if *v == nil { + cv = []types.CpuVendorArchitecture{} + } else { + cv = *v + } + for _, value := range shape { + var col types.CpuVendorArchitecture + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CpuVendorArchitecture to be of type string, got %T instead", value) + } + col = types.CpuVendorArchitecture(jtv) } + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson10_deserializeDocumentAutoScalingGroupRecommendation(v **types.AutoScalingGroupRecommendation, value interface{}) error { +func awsAwsjson10_deserializeDocumentCurrentPerformanceRiskRatings(v **types.CurrentPerformanceRiskRatings, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2403,114 +3274,65 @@ func awsAwsjson10_deserializeDocumentAutoScalingGroupRecommendation(v **types.Au return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AutoScalingGroupRecommendation + var sv *types.CurrentPerformanceRiskRatings if *v == nil { - sv = &types.AutoScalingGroupRecommendation{} + sv = &types.CurrentPerformanceRiskRatings{} } else { sv = *v } for key, value := range shape { switch key { - case "accountId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) - } - sv.AccountId = ptr.String(jtv) - } - - case "autoScalingGroupArn": + case "high": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected AutoScalingGroupArn to be of type string, got %T instead", value) + return fmt.Errorf("expected High to be json.Number, got %T instead", value) } - sv.AutoScalingGroupArn = ptr.String(jtv) - } - - case "autoScalingGroupName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AutoScalingGroupName to be of type string, got %T instead", value) + i64, err := jtv.Int64() + if err != nil { + return err } - sv.AutoScalingGroupName = ptr.String(jtv) - } - - case "currentConfiguration": - if err := awsAwsjson10_deserializeDocumentAutoScalingGroupConfiguration(&sv.CurrentConfiguration, value); err != nil { - return err + sv.High = i64 } - case "finding": + case "low": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected Finding to be of type string, got %T instead", value) + return fmt.Errorf("expected Low to be json.Number, got %T instead", value) } - sv.Finding = types.Finding(jtv) - } - - case "lastRefreshTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastRefreshTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected LastRefreshTimestamp to be a JSON Number, got %T instead", value) - + i64, err := jtv.Int64() + if err != nil { + return err } + sv.Low = i64 } - case "lookBackPeriodInDays": + case "medium": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LookBackPeriodInDays = f64 - - case string: - var f64 float64 - switch { - case strings.EqualFold(jtv, "NaN"): - f64 = math.NaN() - - case strings.EqualFold(jtv, "Infinity"): - f64 = math.Inf(1) - - case strings.EqualFold(jtv, "-Infinity"): - f64 = math.Inf(-1) - - default: - return fmt.Errorf("unknown JSON number value: %s", jtv) - - } - sv.LookBackPeriodInDays = f64 - - default: - return fmt.Errorf("expected LookBackPeriodInDays to be a JSON Number, got %T instead", value) - + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Medium to be json.Number, got %T instead", value) } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Medium = i64 } - case "recommendationOptions": - if err := awsAwsjson10_deserializeDocumentAutoScalingGroupRecommendationOptions(&sv.RecommendationOptions, value); err != nil { - return err - } - - case "utilizationMetrics": - if err := awsAwsjson10_deserializeDocumentUtilizationMetrics(&sv.UtilizationMetrics, value); err != nil { - return err + case "veryLow": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected VeryLow to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.VeryLow = i64 } default: @@ -2522,7 +3344,7 @@ func awsAwsjson10_deserializeDocumentAutoScalingGroupRecommendation(v **types.Au return nil } -func awsAwsjson10_deserializeDocumentAutoScalingGroupRecommendationOption(v **types.AutoScalingGroupRecommendationOption, value interface{}) error { +func awsAwsjson10_deserializeDocumentEBSUtilizationMetric(v **types.EBSUtilizationMetric, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2535,21 +3357,34 @@ func awsAwsjson10_deserializeDocumentAutoScalingGroupRecommendationOption(v **ty return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AutoScalingGroupRecommendationOption + var sv *types.EBSUtilizationMetric if *v == nil { - sv = &types.AutoScalingGroupRecommendationOption{} + sv = &types.EBSUtilizationMetric{} } else { sv = *v } for key, value := range shape { switch key { - case "configuration": - if err := awsAwsjson10_deserializeDocumentAutoScalingGroupConfiguration(&sv.Configuration, value); err != nil { - return err + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EBSMetricName to be of type string, got %T instead", value) + } + sv.Name = types.EBSMetricName(jtv) } - case "performanceRisk": + case "statistic": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MetricStatistic to be of type string, got %T instead", value) + } + sv.Statistic = types.MetricStatistic(jtv) + } + + case "value": if value != nil { switch jtv := value.(type) { case json.Number: @@ -2557,7 +3392,7 @@ func awsAwsjson10_deserializeDocumentAutoScalingGroupRecommendationOption(v **ty if err != nil { return err } - sv.PerformanceRisk = f64 + sv.Value = f64 case string: var f64 float64 @@ -2575,30 +3410,12 @@ func awsAwsjson10_deserializeDocumentAutoScalingGroupRecommendationOption(v **ty return fmt.Errorf("unknown JSON number value: %s", jtv) } - sv.PerformanceRisk = f64 + sv.Value = f64 default: - return fmt.Errorf("expected PerformanceRisk to be a JSON Number, got %T instead", value) - - } - } - - case "projectedUtilizationMetrics": - if err := awsAwsjson10_deserializeDocumentProjectedUtilizationMetrics(&sv.ProjectedUtilizationMetrics, value); err != nil { - return err - } + return fmt.Errorf("expected MetricValue to be a JSON Number, got %T instead", value) - case "rank": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected Rank to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err } - sv.Rank = int32(i64) } default: @@ -2610,7 +3427,7 @@ func awsAwsjson10_deserializeDocumentAutoScalingGroupRecommendationOption(v **ty return nil } -func awsAwsjson10_deserializeDocumentAutoScalingGroupRecommendationOptions(v *[]types.AutoScalingGroupRecommendationOption, value interface{}) error { +func awsAwsjson10_deserializeDocumentEBSUtilizationMetrics(v *[]types.EBSUtilizationMetric, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2623,17 +3440,17 @@ func awsAwsjson10_deserializeDocumentAutoScalingGroupRecommendationOptions(v *[] return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.AutoScalingGroupRecommendationOption + var cv []types.EBSUtilizationMetric if *v == nil { - cv = []types.AutoScalingGroupRecommendationOption{} + cv = []types.EBSUtilizationMetric{} } else { cv = *v } for _, value := range shape { - var col types.AutoScalingGroupRecommendationOption + var col types.EBSUtilizationMetric destAddr := &col - if err := awsAwsjson10_deserializeDocumentAutoScalingGroupRecommendationOption(&destAddr, value); err != nil { + if err := awsAwsjson10_deserializeDocumentEBSUtilizationMetric(&destAddr, value); err != nil { return err } col = *destAddr @@ -2644,7 +3461,7 @@ func awsAwsjson10_deserializeDocumentAutoScalingGroupRecommendationOptions(v *[] return nil } -func awsAwsjson10_deserializeDocumentAutoScalingGroupRecommendations(v *[]types.AutoScalingGroupRecommendation, value interface{}) error { +func awsAwsjson10_deserializeDocumentEffectiveRecommendationPreferences(v **types.EffectiveRecommendationPreferences, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2652,33 +3469,44 @@ func awsAwsjson10_deserializeDocumentAutoScalingGroupRecommendations(v *[]types. return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.AutoScalingGroupRecommendation + var sv *types.EffectiveRecommendationPreferences if *v == nil { - cv = []types.AutoScalingGroupRecommendation{} + sv = &types.EffectiveRecommendationPreferences{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.AutoScalingGroupRecommendation - destAddr := &col - if err := awsAwsjson10_deserializeDocumentAutoScalingGroupRecommendation(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "cpuVendorArchitectures": + if err := awsAwsjson10_deserializeDocumentCpuVendorArchitectures(&sv.CpuVendorArchitectures, value); err != nil { + return err + } + + case "enhancedInfrastructureMetrics": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnhancedInfrastructureMetrics to be of type string, got %T instead", value) + } + sv.EnhancedInfrastructureMetrics = types.EnhancedInfrastructureMetrics(jtv) + } + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } -func awsAwsjson10_deserializeDocumentEBSUtilizationMetric(v **types.EBSUtilizationMetric, value interface{}) error { +func awsAwsjson10_deserializeDocumentEstimatedMonthlySavings(v **types.EstimatedMonthlySavings, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2691,31 +3519,22 @@ func awsAwsjson10_deserializeDocumentEBSUtilizationMetric(v **types.EBSUtilizati return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EBSUtilizationMetric + var sv *types.EstimatedMonthlySavings if *v == nil { - sv = &types.EBSUtilizationMetric{} + sv = &types.EstimatedMonthlySavings{} } else { sv = *v } for key, value := range shape { switch key { - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EBSMetricName to be of type string, got %T instead", value) - } - sv.Name = types.EBSMetricName(jtv) - } - - case "statistic": + case "currency": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected MetricStatistic to be of type string, got %T instead", value) + return fmt.Errorf("expected Currency to be of type string, got %T instead", value) } - sv.Statistic = types.MetricStatistic(jtv) + sv.Currency = types.Currency(jtv) } case "value": @@ -2747,7 +3566,7 @@ func awsAwsjson10_deserializeDocumentEBSUtilizationMetric(v **types.EBSUtilizati sv.Value = f64 default: - return fmt.Errorf("expected MetricValue to be a JSON Number, got %T instead", value) + return fmt.Errorf("expected Value to be a JSON Number, got %T instead", value) } } @@ -2761,40 +3580,6 @@ func awsAwsjson10_deserializeDocumentEBSUtilizationMetric(v **types.EBSUtilizati return nil } -func awsAwsjson10_deserializeDocumentEBSUtilizationMetrics(v *[]types.EBSUtilizationMetric, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.EBSUtilizationMetric - if *v == nil { - cv = []types.EBSUtilizationMetric{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.EBSUtilizationMetric - destAddr := &col - if err := awsAwsjson10_deserializeDocumentEBSUtilizationMetric(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - func awsAwsjson10_deserializeDocumentExportDestination(v **types.ExportDestination, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -2963,6 +3748,20 @@ func awsAwsjson10_deserializeDocumentInstanceRecommendation(v **types.InstanceRe sv.CurrentInstanceType = ptr.String(jtv) } + case "currentPerformanceRisk": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CurrentPerformanceRisk to be of type string, got %T instead", value) + } + sv.CurrentPerformanceRisk = types.CurrentPerformanceRisk(jtv) + } + + case "effectiveRecommendationPreferences": + if err := awsAwsjson10_deserializeDocumentEffectiveRecommendationPreferences(&sv.EffectiveRecommendationPreferences, value); err != nil { + return err + } + case "finding": if value != nil { jtv, ok := value.(string) @@ -3193,6 +3992,11 @@ func awsAwsjson10_deserializeDocumentInstanceRecommendationOption(v **types.Inst sv.Rank = int32(i64) } + case "savingsOpportunity": + if err := awsAwsjson10_deserializeDocumentSavingsOpportunity(&sv.SavingsOpportunity, value); err != nil { + return err + } + default: _, _ = key, value @@ -3486,6 +4290,11 @@ func awsAwsjson10_deserializeDocumentLambdaFunctionMemoryRecommendationOption(v sv.Rank = int32(i64) } + case "savingsOpportunity": + if err := awsAwsjson10_deserializeDocumentSavingsOpportunity(&sv.SavingsOpportunity, value); err != nil { + return err + } + default: _, _ = key, value @@ -3573,6 +4382,15 @@ func awsAwsjson10_deserializeDocumentLambdaFunctionRecommendation(v **types.Lamb sv.CurrentMemorySize = int32(i64) } + case "currentPerformanceRisk": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CurrentPerformanceRisk to be of type string, got %T instead", value) + } + sv.CurrentPerformanceRisk = types.CurrentPerformanceRisk(jtv) + } + case "finding": if value != nil { jtv, ok := value.(string) @@ -4451,11 +5269,99 @@ func awsAwsjson10_deserializeDocumentRecommendationExportJobs(v *[]types.Recomme cv = append(cv, col) } - *v = cv + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentRecommendationOptions(v *[]types.InstanceRecommendationOption, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.InstanceRecommendationOption + if *v == nil { + cv = []types.InstanceRecommendationOption{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.InstanceRecommendationOption + destAddr := &col + if err := awsAwsjson10_deserializeDocumentInstanceRecommendationOption(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentRecommendationPreferencesDetail(v **types.RecommendationPreferencesDetail, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RecommendationPreferencesDetail + if *v == nil { + sv = &types.RecommendationPreferencesDetail{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "enhancedInfrastructureMetrics": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnhancedInfrastructureMetrics to be of type string, got %T instead", value) + } + sv.EnhancedInfrastructureMetrics = types.EnhancedInfrastructureMetrics(jtv) + } + + case "resourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value) + } + sv.ResourceType = types.ResourceType(jtv) + } + + case "scope": + if err := awsAwsjson10_deserializeDocumentScope(&sv.Scope, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv return nil } -func awsAwsjson10_deserializeDocumentRecommendationOptions(v *[]types.InstanceRecommendationOption, value interface{}) error { +func awsAwsjson10_deserializeDocumentRecommendationPreferencesDetails(v *[]types.RecommendationPreferencesDetail, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4468,17 +5374,17 @@ func awsAwsjson10_deserializeDocumentRecommendationOptions(v *[]types.InstanceRe return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.InstanceRecommendationOption + var cv []types.RecommendationPreferencesDetail if *v == nil { - cv = []types.InstanceRecommendationOption{} + cv = []types.RecommendationPreferencesDetail{} } else { cv = *v } for _, value := range shape { - var col types.InstanceRecommendationOption + var col types.RecommendationPreferencesDetail destAddr := &col - if err := awsAwsjson10_deserializeDocumentInstanceRecommendationOption(&destAddr, value); err != nil { + if err := awsAwsjson10_deserializeDocumentRecommendationPreferencesDetail(&destAddr, value); err != nil { return err } col = *destAddr @@ -4637,6 +5543,11 @@ func awsAwsjson10_deserializeDocumentRecommendationSummary(v **types.Recommendat sv.AccountId = ptr.String(jtv) } + case "currentPerformanceRiskRatings": + if err := awsAwsjson10_deserializeDocumentCurrentPerformanceRiskRatings(&sv.CurrentPerformanceRiskRatings, value); err != nil { + return err + } + case "recommendationResourceType": if value != nil { jtv, ok := value.(string) @@ -4646,6 +5557,11 @@ func awsAwsjson10_deserializeDocumentRecommendationSummary(v **types.Recommendat sv.RecommendationResourceType = types.RecommendationSourceType(jtv) } + case "savingsOpportunity": + if err := awsAwsjson10_deserializeDocumentSavingsOpportunity(&sv.SavingsOpportunity, value); err != nil { + return err + } + case "summaries": if err := awsAwsjson10_deserializeDocumentSummaries(&sv.Summaries, value); err != nil { return err @@ -4850,6 +5766,125 @@ func awsAwsjson10_deserializeDocumentS3Destination(v **types.S3Destination, valu return nil } +func awsAwsjson10_deserializeDocumentSavingsOpportunity(v **types.SavingsOpportunity, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SavingsOpportunity + if *v == nil { + sv = &types.SavingsOpportunity{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "estimatedMonthlySavings": + if err := awsAwsjson10_deserializeDocumentEstimatedMonthlySavings(&sv.EstimatedMonthlySavings, value); err != nil { + return err + } + + case "savingsOpportunityPercentage": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.SavingsOpportunityPercentage = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.SavingsOpportunityPercentage = f64 + + default: + return fmt.Errorf("expected SavingsOpportunityPercentage to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentScope(v **types.Scope, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Scope + if *v == nil { + sv = &types.Scope{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScopeName to be of type string, got %T instead", value) + } + sv.Name = types.ScopeName(jtv) + } + + case "value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScopeValue to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeDocumentServiceUnavailableException(v **types.ServiceUnavailableException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -5344,6 +6379,15 @@ func awsAwsjson10_deserializeDocumentVolumeRecommendation(v **types.VolumeRecomm return err } + case "currentPerformanceRisk": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CurrentPerformanceRisk to be of type string, got %T instead", value) + } + sv.CurrentPerformanceRisk = types.CurrentPerformanceRisk(jtv) + } + case "finding": if value != nil { jtv, ok := value.(string) @@ -5505,6 +6549,11 @@ func awsAwsjson10_deserializeDocumentVolumeRecommendationOption(v **types.Volume sv.Rank = int32(i64) } + case "savingsOpportunity": + if err := awsAwsjson10_deserializeDocumentSavingsOpportunity(&sv.SavingsOpportunity, value); err != nil { + return err + } + default: _, _ = key, value @@ -5582,6 +6631,37 @@ func awsAwsjson10_deserializeDocumentVolumeRecommendations(v *[]types.VolumeReco return nil } +func awsAwsjson10_deserializeOpDocumentDeleteRecommendationPreferencesOutput(v **DeleteRecommendationPreferencesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteRecommendationPreferencesOutput + if *v == nil { + sv = &DeleteRecommendationPreferencesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentDescribeRecommendationExportJobsOutput(v **DescribeRecommendationExportJobsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -5993,6 +7073,46 @@ func awsAwsjson10_deserializeOpDocumentGetEC2RecommendationProjectedMetricsOutpu return nil } +func awsAwsjson10_deserializeOpDocumentGetEffectiveRecommendationPreferencesOutput(v **GetEffectiveRecommendationPreferencesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetEffectiveRecommendationPreferencesOutput + if *v == nil { + sv = &GetEffectiveRecommendationPreferencesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "enhancedInfrastructureMetrics": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnhancedInfrastructureMetrics to be of type string, got %T instead", value) + } + sv.EnhancedInfrastructureMetrics = types.EnhancedInfrastructureMetrics(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentGetEnrollmentStatusesForOrganizationOutput(v **GetEnrollmentStatusesForOrganizationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6170,6 +7290,51 @@ func awsAwsjson10_deserializeOpDocumentGetLambdaFunctionRecommendationsOutput(v return nil } +func awsAwsjson10_deserializeOpDocumentGetRecommendationPreferencesOutput(v **GetRecommendationPreferencesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetRecommendationPreferencesOutput + if *v == nil { + sv = &GetRecommendationPreferencesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "recommendationPreferencesDetails": + if err := awsAwsjson10_deserializeDocumentRecommendationPreferencesDetails(&sv.RecommendationPreferencesDetails, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentGetRecommendationSummariesOutput(v **GetRecommendationSummariesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6215,6 +7380,37 @@ func awsAwsjson10_deserializeOpDocumentGetRecommendationSummariesOutput(v **GetR return nil } +func awsAwsjson10_deserializeOpDocumentPutRecommendationPreferencesOutput(v **PutRecommendationPreferencesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutRecommendationPreferencesOutput + if *v == nil { + sv = &PutRecommendationPreferencesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentUpdateEnrollmentStatusOutput(v **UpdateEnrollmentStatusOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/computeoptimizer/generated.json b/service/computeoptimizer/generated.json index 4d1941a4c09..8a22058e42b 100644 --- a/service/computeoptimizer/generated.json +++ b/service/computeoptimizer/generated.json @@ -7,6 +7,7 @@ }, "files": [ "api_client.go", + "api_op_DeleteRecommendationPreferences.go", "api_op_DescribeRecommendationExportJobs.go", "api_op_ExportAutoScalingGroupRecommendations.go", "api_op_ExportEBSVolumeRecommendations.go", @@ -16,10 +17,13 @@ "api_op_GetEBSVolumeRecommendations.go", "api_op_GetEC2InstanceRecommendations.go", "api_op_GetEC2RecommendationProjectedMetrics.go", + "api_op_GetEffectiveRecommendationPreferences.go", "api_op_GetEnrollmentStatus.go", "api_op_GetEnrollmentStatusesForOrganization.go", "api_op_GetLambdaFunctionRecommendations.go", + "api_op_GetRecommendationPreferences.go", "api_op_GetRecommendationSummaries.go", + "api_op_PutRecommendationPreferences.go", "api_op_UpdateEnrollmentStatus.go", "deserializers.go", "doc.go", diff --git a/service/computeoptimizer/serializers.go b/service/computeoptimizer/serializers.go index 66906372354..dbd147ebeb9 100644 --- a/service/computeoptimizer/serializers.go +++ b/service/computeoptimizer/serializers.go @@ -16,6 +16,61 @@ import ( "path" ) +type awsAwsjson10_serializeOpDeleteRecommendationPreferences struct { +} + +func (*awsAwsjson10_serializeOpDeleteRecommendationPreferences) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpDeleteRecommendationPreferences) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteRecommendationPreferencesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("ComputeOptimizerService.DeleteRecommendationPreferences") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentDeleteRecommendationPreferencesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpDescribeRecommendationExportJobs struct { } @@ -511,6 +566,61 @@ func (m *awsAwsjson10_serializeOpGetEC2RecommendationProjectedMetrics) HandleSer return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpGetEffectiveRecommendationPreferences struct { +} + +func (*awsAwsjson10_serializeOpGetEffectiveRecommendationPreferences) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpGetEffectiveRecommendationPreferences) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetEffectiveRecommendationPreferencesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("ComputeOptimizerService.GetEffectiveRecommendationPreferences") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentGetEffectiveRecommendationPreferencesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpGetEnrollmentStatus struct { } @@ -676,6 +786,61 @@ func (m *awsAwsjson10_serializeOpGetLambdaFunctionRecommendations) HandleSeriali return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpGetRecommendationPreferences struct { +} + +func (*awsAwsjson10_serializeOpGetRecommendationPreferences) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpGetRecommendationPreferences) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetRecommendationPreferencesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("ComputeOptimizerService.GetRecommendationPreferences") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentGetRecommendationPreferencesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpGetRecommendationSummaries struct { } @@ -731,6 +896,61 @@ func (m *awsAwsjson10_serializeOpGetRecommendationSummaries) HandleSerialize(ctx return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpPutRecommendationPreferences struct { +} + +func (*awsAwsjson10_serializeOpPutRecommendationPreferences) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpPutRecommendationPreferences) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutRecommendationPreferencesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("ComputeOptimizerService.PutRecommendationPreferences") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentPutRecommendationPreferencesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpUpdateEnrollmentStatus struct { } @@ -1066,6 +1286,17 @@ func awsAwsjson10_serializeDocumentLambdaFunctionRecommendationFilters(v []types return nil } +func awsAwsjson10_serializeDocumentRecommendationPreferenceNames(v []types.RecommendationPreferenceName, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + func awsAwsjson10_serializeDocumentRecommendationPreferences(v *types.RecommendationPreferences, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1097,6 +1328,23 @@ func awsAwsjson10_serializeDocumentS3DestinationConfig(v *types.S3DestinationCon return nil } +func awsAwsjson10_serializeDocumentScope(v *types.Scope, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Name) > 0 { + ok := object.Key("name") + ok.String(string(v.Name)) + } + + if v.Value != nil { + ok := object.Key("value") + ok.String(*v.Value) + } + + return nil +} + func awsAwsjson10_serializeDocumentVolumeArns(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -1108,6 +1356,32 @@ func awsAwsjson10_serializeDocumentVolumeArns(v []string, value smithyjson.Value return nil } +func awsAwsjson10_serializeOpDocumentDeleteRecommendationPreferencesInput(v *DeleteRecommendationPreferencesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RecommendationPreferenceNames != nil { + ok := object.Key("recommendationPreferenceNames") + if err := awsAwsjson10_serializeDocumentRecommendationPreferenceNames(v.RecommendationPreferenceNames, ok); err != nil { + return err + } + } + + if len(v.ResourceType) > 0 { + ok := object.Key("resourceType") + ok.String(string(v.ResourceType)) + } + + if v.Scope != nil { + ok := object.Key("scope") + if err := awsAwsjson10_serializeDocumentScope(v.Scope, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson10_serializeOpDocumentDescribeRecommendationExportJobsInput(v *DescribeRecommendationExportJobsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1500,6 +1774,18 @@ func awsAwsjson10_serializeOpDocumentGetEC2RecommendationProjectedMetricsInput(v return nil } +func awsAwsjson10_serializeOpDocumentGetEffectiveRecommendationPreferencesInput(v *GetEffectiveRecommendationPreferencesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ResourceArn != nil { + ok := object.Key("resourceArn") + ok.String(*v.ResourceArn) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentGetEnrollmentStatusesForOrganizationInput(v *GetEnrollmentStatusesForOrganizationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1569,6 +1855,35 @@ func awsAwsjson10_serializeOpDocumentGetLambdaFunctionRecommendationsInput(v *Ge return nil } +func awsAwsjson10_serializeOpDocumentGetRecommendationPreferencesInput(v *GetRecommendationPreferencesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if len(v.ResourceType) > 0 { + ok := object.Key("resourceType") + ok.String(string(v.ResourceType)) + } + + if v.Scope != nil { + ok := object.Key("scope") + if err := awsAwsjson10_serializeDocumentScope(v.Scope, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson10_serializeOpDocumentGetRecommendationSummariesInput(v *GetRecommendationSummariesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1593,6 +1908,30 @@ func awsAwsjson10_serializeOpDocumentGetRecommendationSummariesInput(v *GetRecom return nil } +func awsAwsjson10_serializeOpDocumentPutRecommendationPreferencesInput(v *PutRecommendationPreferencesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.EnhancedInfrastructureMetrics) > 0 { + ok := object.Key("enhancedInfrastructureMetrics") + ok.String(string(v.EnhancedInfrastructureMetrics)) + } + + if len(v.ResourceType) > 0 { + ok := object.Key("resourceType") + ok.String(string(v.ResourceType)) + } + + if v.Scope != nil { + ok := object.Key("scope") + if err := awsAwsjson10_serializeDocumentScope(v.Scope, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson10_serializeOpDocumentUpdateEnrollmentStatusInput(v *UpdateEnrollmentStatusInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/computeoptimizer/types/enums.go b/service/computeoptimizer/types/enums.go index 5e5370fcfd6..f59d894c761 100644 --- a/service/computeoptimizer/types/enums.go +++ b/service/computeoptimizer/types/enums.go @@ -20,6 +20,46 @@ func (CpuVendorArchitecture) Values() []CpuVendorArchitecture { } } +type Currency string + +// Enum values for Currency +const ( + CurrencyUsd Currency = "USD" + CurrencyCny Currency = "CNY" +) + +// Values returns all known values for Currency. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (Currency) Values() []Currency { + return []Currency{ + "USD", + "CNY", + } +} + +type CurrentPerformanceRisk string + +// Enum values for CurrentPerformanceRisk +const ( + CurrentPerformanceRiskVeryLow CurrentPerformanceRisk = "VeryLow" + CurrentPerformanceRiskLow CurrentPerformanceRisk = "Low" + CurrentPerformanceRiskMedium CurrentPerformanceRisk = "Medium" + CurrentPerformanceRiskHigh CurrentPerformanceRisk = "High" +) + +// Values returns all known values for CurrentPerformanceRisk. Note that this can +// be expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (CurrentPerformanceRisk) Values() []CurrentPerformanceRisk { + return []CurrentPerformanceRisk{ + "VeryLow", + "Low", + "Medium", + "High", + } +} + type EBSFilterName string // Enum values for EBSFilterName @@ -76,6 +116,25 @@ func (EBSMetricName) Values() []EBSMetricName { } } +type EnhancedInfrastructureMetrics string + +// Enum values for EnhancedInfrastructureMetrics +const ( + EnhancedInfrastructureMetricsActive EnhancedInfrastructureMetrics = "Active" + EnhancedInfrastructureMetricsInactive EnhancedInfrastructureMetrics = "Inactive" +) + +// Values returns all known values for EnhancedInfrastructureMetrics. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. The ordering of this slice is not guaranteed to be stable across +// updates. +func (EnhancedInfrastructureMetrics) Values() []EnhancedInfrastructureMetrics { + return []EnhancedInfrastructureMetrics{ + "Active", + "Inactive", + } +} + type EnrollmentFilterName string // Enum values for EnrollmentFilterName @@ -96,51 +155,57 @@ type ExportableAutoScalingGroupField string // Enum values for ExportableAutoScalingGroupField const ( - ExportableAutoScalingGroupFieldAccountId ExportableAutoScalingGroupField = "AccountId" - ExportableAutoScalingGroupFieldAutoScalingGroupArn ExportableAutoScalingGroupField = "AutoScalingGroupArn" - ExportableAutoScalingGroupFieldAutoScalingGroupName ExportableAutoScalingGroupField = "AutoScalingGroupName" - ExportableAutoScalingGroupFieldFinding ExportableAutoScalingGroupField = "Finding" - ExportableAutoScalingGroupFieldUtilizationMetricsCpuMaximum ExportableAutoScalingGroupField = "UtilizationMetricsCpuMaximum" - ExportableAutoScalingGroupFieldUtilizationMetricsMemoryMaximum ExportableAutoScalingGroupField = "UtilizationMetricsMemoryMaximum" - ExportableAutoScalingGroupFieldUtilizationMetricsEbsReadOpsPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsEbsReadOpsPerSecondMaximum" - ExportableAutoScalingGroupFieldUtilizationMetricsEbsWriteOpsPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsEbsWriteOpsPerSecondMaximum" - ExportableAutoScalingGroupFieldUtilizationMetricsEbsReadBytesPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsEbsReadBytesPerSecondMaximum" - ExportableAutoScalingGroupFieldUtilizationMetricsEbsWriteBytesPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsEbsWriteBytesPerSecondMaximum" - ExportableAutoScalingGroupFieldUtilizationMetricsDiskReadOpsPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsDiskReadOpsPerSecondMaximum" - ExportableAutoScalingGroupFieldUtilizationMetricsDiskWriteOpsPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsDiskWriteOpsPerSecondMaximum" - ExportableAutoScalingGroupFieldUtilizationMetricsDiskReadBytesPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsDiskReadBytesPerSecondMaximum" - ExportableAutoScalingGroupFieldUtilizationMetricsDiskWriteBytesPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsDiskWriteBytesPerSecondMaximum" - ExportableAutoScalingGroupFieldUtilizationMetricsNetworkInBytesPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsNetworkInBytesPerSecondMaximum" - ExportableAutoScalingGroupFieldUtilizationMetricsNetworkOutBytesPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsNetworkOutBytesPerSecondMaximum" - ExportableAutoScalingGroupFieldUtilizationMetricsNetworkPacketsInPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsNetworkPacketsInPerSecondMaximum" - ExportableAutoScalingGroupFieldUtilizationMetricsNetworkPacketsOutPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsNetworkPacketsOutPerSecondMaximum" - ExportableAutoScalingGroupFieldLookbackPeriodInDays ExportableAutoScalingGroupField = "LookbackPeriodInDays" - ExportableAutoScalingGroupFieldCurrentConfigurationInstanceType ExportableAutoScalingGroupField = "CurrentConfigurationInstanceType" - ExportableAutoScalingGroupFieldCurrentConfigurationDesiredCapacity ExportableAutoScalingGroupField = "CurrentConfigurationDesiredCapacity" - ExportableAutoScalingGroupFieldCurrentConfigurationMinSize ExportableAutoScalingGroupField = "CurrentConfigurationMinSize" - ExportableAutoScalingGroupFieldCurrentConfigurationMaxSize ExportableAutoScalingGroupField = "CurrentConfigurationMaxSize" - ExportableAutoScalingGroupFieldCurrentOnDemandPrice ExportableAutoScalingGroupField = "CurrentOnDemandPrice" - ExportableAutoScalingGroupFieldCurrentStandardOneYearNoUpfrontReservedPrice ExportableAutoScalingGroupField = "CurrentStandardOneYearNoUpfrontReservedPrice" - ExportableAutoScalingGroupFieldCurrentStandardThreeYearNoUpfrontReservedPrice ExportableAutoScalingGroupField = "CurrentStandardThreeYearNoUpfrontReservedPrice" - ExportableAutoScalingGroupFieldCurrentVcpus ExportableAutoScalingGroupField = "CurrentVCpus" - ExportableAutoScalingGroupFieldCurrentMemory ExportableAutoScalingGroupField = "CurrentMemory" - ExportableAutoScalingGroupFieldCurrentStorage ExportableAutoScalingGroupField = "CurrentStorage" - ExportableAutoScalingGroupFieldCurrentNetwork ExportableAutoScalingGroupField = "CurrentNetwork" - ExportableAutoScalingGroupFieldRecommendationOptionsConfigurationInstanceType ExportableAutoScalingGroupField = "RecommendationOptionsConfigurationInstanceType" - ExportableAutoScalingGroupFieldRecommendationOptionsConfigurationDesiredCapacity ExportableAutoScalingGroupField = "RecommendationOptionsConfigurationDesiredCapacity" - ExportableAutoScalingGroupFieldRecommendationOptionsConfigurationMinSize ExportableAutoScalingGroupField = "RecommendationOptionsConfigurationMinSize" - ExportableAutoScalingGroupFieldRecommendationOptionsConfigurationMaxSize ExportableAutoScalingGroupField = "RecommendationOptionsConfigurationMaxSize" - ExportableAutoScalingGroupFieldRecommendationOptionsProjectedUtilizationMetricsCpuMaximum ExportableAutoScalingGroupField = "RecommendationOptionsProjectedUtilizationMetricsCpuMaximum" - ExportableAutoScalingGroupFieldRecommendationOptionsProjectedUtilizationMetricsMemoryMaximum ExportableAutoScalingGroupField = "RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum" - ExportableAutoScalingGroupFieldRecommendationOptionsPerformanceRisk ExportableAutoScalingGroupField = "RecommendationOptionsPerformanceRisk" - ExportableAutoScalingGroupFieldRecommendationOptionsOnDemandPrice ExportableAutoScalingGroupField = "RecommendationOptionsOnDemandPrice" - ExportableAutoScalingGroupFieldRecommendationOptionsStandardOneYearNoUpfrontReservedPrice ExportableAutoScalingGroupField = "RecommendationOptionsStandardOneYearNoUpfrontReservedPrice" - ExportableAutoScalingGroupFieldRecommendationOptionsStandardThreeYearNoUpfrontReservedPrice ExportableAutoScalingGroupField = "RecommendationOptionsStandardThreeYearNoUpfrontReservedPrice" - ExportableAutoScalingGroupFieldRecommendationOptionsVcpus ExportableAutoScalingGroupField = "RecommendationOptionsVcpus" - ExportableAutoScalingGroupFieldRecommendationOptionsMemory ExportableAutoScalingGroupField = "RecommendationOptionsMemory" - ExportableAutoScalingGroupFieldRecommendationOptionsStorage ExportableAutoScalingGroupField = "RecommendationOptionsStorage" - ExportableAutoScalingGroupFieldRecommendationOptionsNetwork ExportableAutoScalingGroupField = "RecommendationOptionsNetwork" - ExportableAutoScalingGroupFieldLastRefreshTimestamp ExportableAutoScalingGroupField = "LastRefreshTimestamp" + ExportableAutoScalingGroupFieldAccountId ExportableAutoScalingGroupField = "AccountId" + ExportableAutoScalingGroupFieldAutoScalingGroupArn ExportableAutoScalingGroupField = "AutoScalingGroupArn" + ExportableAutoScalingGroupFieldAutoScalingGroupName ExportableAutoScalingGroupField = "AutoScalingGroupName" + ExportableAutoScalingGroupFieldFinding ExportableAutoScalingGroupField = "Finding" + ExportableAutoScalingGroupFieldUtilizationMetricsCpuMaximum ExportableAutoScalingGroupField = "UtilizationMetricsCpuMaximum" + ExportableAutoScalingGroupFieldUtilizationMetricsMemoryMaximum ExportableAutoScalingGroupField = "UtilizationMetricsMemoryMaximum" + ExportableAutoScalingGroupFieldUtilizationMetricsEbsReadOpsPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsEbsReadOpsPerSecondMaximum" + ExportableAutoScalingGroupFieldUtilizationMetricsEbsWriteOpsPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsEbsWriteOpsPerSecondMaximum" + ExportableAutoScalingGroupFieldUtilizationMetricsEbsReadBytesPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsEbsReadBytesPerSecondMaximum" + ExportableAutoScalingGroupFieldUtilizationMetricsEbsWriteBytesPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsEbsWriteBytesPerSecondMaximum" + ExportableAutoScalingGroupFieldUtilizationMetricsDiskReadOpsPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsDiskReadOpsPerSecondMaximum" + ExportableAutoScalingGroupFieldUtilizationMetricsDiskWriteOpsPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsDiskWriteOpsPerSecondMaximum" + ExportableAutoScalingGroupFieldUtilizationMetricsDiskReadBytesPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsDiskReadBytesPerSecondMaximum" + ExportableAutoScalingGroupFieldUtilizationMetricsDiskWriteBytesPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsDiskWriteBytesPerSecondMaximum" + ExportableAutoScalingGroupFieldUtilizationMetricsNetworkInBytesPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsNetworkInBytesPerSecondMaximum" + ExportableAutoScalingGroupFieldUtilizationMetricsNetworkOutBytesPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsNetworkOutBytesPerSecondMaximum" + ExportableAutoScalingGroupFieldUtilizationMetricsNetworkPacketsInPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsNetworkPacketsInPerSecondMaximum" + ExportableAutoScalingGroupFieldUtilizationMetricsNetworkPacketsOutPerSecondMaximum ExportableAutoScalingGroupField = "UtilizationMetricsNetworkPacketsOutPerSecondMaximum" + ExportableAutoScalingGroupFieldLookbackPeriodInDays ExportableAutoScalingGroupField = "LookbackPeriodInDays" + ExportableAutoScalingGroupFieldCurrentConfigurationInstanceType ExportableAutoScalingGroupField = "CurrentConfigurationInstanceType" + ExportableAutoScalingGroupFieldCurrentConfigurationDesiredCapacity ExportableAutoScalingGroupField = "CurrentConfigurationDesiredCapacity" + ExportableAutoScalingGroupFieldCurrentConfigurationMinSize ExportableAutoScalingGroupField = "CurrentConfigurationMinSize" + ExportableAutoScalingGroupFieldCurrentConfigurationMaxSize ExportableAutoScalingGroupField = "CurrentConfigurationMaxSize" + ExportableAutoScalingGroupFieldCurrentOnDemandPrice ExportableAutoScalingGroupField = "CurrentOnDemandPrice" + ExportableAutoScalingGroupFieldCurrentStandardOneYearNoUpfrontReservedPrice ExportableAutoScalingGroupField = "CurrentStandardOneYearNoUpfrontReservedPrice" + ExportableAutoScalingGroupFieldCurrentStandardThreeYearNoUpfrontReservedPrice ExportableAutoScalingGroupField = "CurrentStandardThreeYearNoUpfrontReservedPrice" + ExportableAutoScalingGroupFieldCurrentVcpus ExportableAutoScalingGroupField = "CurrentVCpus" + ExportableAutoScalingGroupFieldCurrentMemory ExportableAutoScalingGroupField = "CurrentMemory" + ExportableAutoScalingGroupFieldCurrentStorage ExportableAutoScalingGroupField = "CurrentStorage" + ExportableAutoScalingGroupFieldCurrentNetwork ExportableAutoScalingGroupField = "CurrentNetwork" + ExportableAutoScalingGroupFieldRecommendationOptionsConfigurationInstanceType ExportableAutoScalingGroupField = "RecommendationOptionsConfigurationInstanceType" + ExportableAutoScalingGroupFieldRecommendationOptionsConfigurationDesiredCapacity ExportableAutoScalingGroupField = "RecommendationOptionsConfigurationDesiredCapacity" + ExportableAutoScalingGroupFieldRecommendationOptionsConfigurationMinSize ExportableAutoScalingGroupField = "RecommendationOptionsConfigurationMinSize" + ExportableAutoScalingGroupFieldRecommendationOptionsConfigurationMaxSize ExportableAutoScalingGroupField = "RecommendationOptionsConfigurationMaxSize" + ExportableAutoScalingGroupFieldRecommendationOptionsProjectedUtilizationMetricsCpuMaximum ExportableAutoScalingGroupField = "RecommendationOptionsProjectedUtilizationMetricsCpuMaximum" + ExportableAutoScalingGroupFieldRecommendationOptionsProjectedUtilizationMetricsMemoryMaximum ExportableAutoScalingGroupField = "RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum" + ExportableAutoScalingGroupFieldRecommendationOptionsPerformanceRisk ExportableAutoScalingGroupField = "RecommendationOptionsPerformanceRisk" + ExportableAutoScalingGroupFieldRecommendationOptionsOnDemandPrice ExportableAutoScalingGroupField = "RecommendationOptionsOnDemandPrice" + ExportableAutoScalingGroupFieldRecommendationOptionsStandardOneYearNoUpfrontReservedPrice ExportableAutoScalingGroupField = "RecommendationOptionsStandardOneYearNoUpfrontReservedPrice" + ExportableAutoScalingGroupFieldRecommendationOptionsStandardThreeYearNoUpfrontReservedPrice ExportableAutoScalingGroupField = "RecommendationOptionsStandardThreeYearNoUpfrontReservedPrice" + ExportableAutoScalingGroupFieldRecommendationOptionsVcpus ExportableAutoScalingGroupField = "RecommendationOptionsVcpus" + ExportableAutoScalingGroupFieldRecommendationOptionsMemory ExportableAutoScalingGroupField = "RecommendationOptionsMemory" + ExportableAutoScalingGroupFieldRecommendationOptionsStorage ExportableAutoScalingGroupField = "RecommendationOptionsStorage" + ExportableAutoScalingGroupFieldRecommendationOptionsNetwork ExportableAutoScalingGroupField = "RecommendationOptionsNetwork" + ExportableAutoScalingGroupFieldLastRefreshTimestamp ExportableAutoScalingGroupField = "LastRefreshTimestamp" + ExportableAutoScalingGroupFieldCurrentPerformanceRisk ExportableAutoScalingGroupField = "CurrentPerformanceRisk" + ExportableAutoScalingGroupFieldRecommendationOptionsSavingsOpportunityPercentage ExportableAutoScalingGroupField = "RecommendationOptionsSavingsOpportunityPercentage" + ExportableAutoScalingGroupFieldRecommendationOptionsEstimatedMonthlySavingsCurrency ExportableAutoScalingGroupField = "RecommendationOptionsEstimatedMonthlySavingsCurrency" + ExportableAutoScalingGroupFieldRecommendationOptionsEstimatedMonthlySavingsValue ExportableAutoScalingGroupField = "RecommendationOptionsEstimatedMonthlySavingsValue" + ExportableAutoScalingGroupFieldEffectiveRecommendationPreferencesCpuVendorArchitectures ExportableAutoScalingGroupField = "EffectiveRecommendationPreferencesCpuVendorArchitectures" + ExportableAutoScalingGroupFieldEffectiveRecommendationPreferencesEnhancedInfrastructureMetrics ExportableAutoScalingGroupField = "EffectiveRecommendationPreferencesEnhancedInfrastructureMetrics" ) // Values returns all known values for ExportableAutoScalingGroupField. Note that @@ -194,6 +259,12 @@ func (ExportableAutoScalingGroupField) Values() []ExportableAutoScalingGroupFiel "RecommendationOptionsStorage", "RecommendationOptionsNetwork", "LastRefreshTimestamp", + "CurrentPerformanceRisk", + "RecommendationOptionsSavingsOpportunityPercentage", + "RecommendationOptionsEstimatedMonthlySavingsCurrency", + "RecommendationOptionsEstimatedMonthlySavingsValue", + "EffectiveRecommendationPreferencesCpuVendorArchitectures", + "EffectiveRecommendationPreferencesEnhancedInfrastructureMetrics", } } @@ -201,49 +272,55 @@ type ExportableInstanceField string // Enum values for ExportableInstanceField const ( - ExportableInstanceFieldAccountId ExportableInstanceField = "AccountId" - ExportableInstanceFieldInstanceArn ExportableInstanceField = "InstanceArn" - ExportableInstanceFieldInstanceName ExportableInstanceField = "InstanceName" - ExportableInstanceFieldFinding ExportableInstanceField = "Finding" - ExportableInstanceFieldFindingReasonCodes ExportableInstanceField = "FindingReasonCodes" - ExportableInstanceFieldLookbackPeriodInDays ExportableInstanceField = "LookbackPeriodInDays" - ExportableInstanceFieldCurrentInstanceType ExportableInstanceField = "CurrentInstanceType" - ExportableInstanceFieldUtilizationMetricsCpuMaximum ExportableInstanceField = "UtilizationMetricsCpuMaximum" - ExportableInstanceFieldUtilizationMetricsMemoryMaximum ExportableInstanceField = "UtilizationMetricsMemoryMaximum" - ExportableInstanceFieldUtilizationMetricsEbsReadOpsPerSecondMaximum ExportableInstanceField = "UtilizationMetricsEbsReadOpsPerSecondMaximum" - ExportableInstanceFieldUtilizationMetricsEbsWriteOpsPerSecondMaximum ExportableInstanceField = "UtilizationMetricsEbsWriteOpsPerSecondMaximum" - ExportableInstanceFieldUtilizationMetricsEbsReadBytesPerSecondMaximum ExportableInstanceField = "UtilizationMetricsEbsReadBytesPerSecondMaximum" - ExportableInstanceFieldUtilizationMetricsEbsWriteBytesPerSecondMaximum ExportableInstanceField = "UtilizationMetricsEbsWriteBytesPerSecondMaximum" - ExportableInstanceFieldUtilizationMetricsDiskReadOpsPerSecondMaximum ExportableInstanceField = "UtilizationMetricsDiskReadOpsPerSecondMaximum" - ExportableInstanceFieldUtilizationMetricsDiskWriteOpsPerSecondMaximum ExportableInstanceField = "UtilizationMetricsDiskWriteOpsPerSecondMaximum" - ExportableInstanceFieldUtilizationMetricsDiskReadBytesPerSecondMaximum ExportableInstanceField = "UtilizationMetricsDiskReadBytesPerSecondMaximum" - ExportableInstanceFieldUtilizationMetricsDiskWriteBytesPerSecondMaximum ExportableInstanceField = "UtilizationMetricsDiskWriteBytesPerSecondMaximum" - ExportableInstanceFieldUtilizationMetricsNetworkInBytesPerSecondMaximum ExportableInstanceField = "UtilizationMetricsNetworkInBytesPerSecondMaximum" - ExportableInstanceFieldUtilizationMetricsNetworkOutBytesPerSecondMaximum ExportableInstanceField = "UtilizationMetricsNetworkOutBytesPerSecondMaximum" - ExportableInstanceFieldUtilizationMetricsNetworkPacketsInPerSecondMaximum ExportableInstanceField = "UtilizationMetricsNetworkPacketsInPerSecondMaximum" - ExportableInstanceFieldUtilizationMetricsNetworkPacketsOutPerSecondMaximum ExportableInstanceField = "UtilizationMetricsNetworkPacketsOutPerSecondMaximum" - ExportableInstanceFieldCurrentOnDemandPrice ExportableInstanceField = "CurrentOnDemandPrice" - ExportableInstanceFieldCurrentStandardOneYearNoUpfrontReservedPrice ExportableInstanceField = "CurrentStandardOneYearNoUpfrontReservedPrice" - ExportableInstanceFieldCurrentStandardThreeYearNoUpfrontReservedPrice ExportableInstanceField = "CurrentStandardThreeYearNoUpfrontReservedPrice" - ExportableInstanceFieldCurrentVcpus ExportableInstanceField = "CurrentVCpus" - ExportableInstanceFieldCurrentMemory ExportableInstanceField = "CurrentMemory" - ExportableInstanceFieldCurrentStorage ExportableInstanceField = "CurrentStorage" - ExportableInstanceFieldCurrentNetwork ExportableInstanceField = "CurrentNetwork" - ExportableInstanceFieldRecommendationOptionsInstanceType ExportableInstanceField = "RecommendationOptionsInstanceType" - ExportableInstanceFieldRecommendationOptionsProjectedUtilizationMetricsCpuMaximum ExportableInstanceField = "RecommendationOptionsProjectedUtilizationMetricsCpuMaximum" - ExportableInstanceFieldRecommendationOptionsProjectedUtilizationMetricsMemoryMaximum ExportableInstanceField = "RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum" - ExportableInstanceFieldRecommendationOptionsPlatformDifferences ExportableInstanceField = "RecommendationOptionsPlatformDifferences" - ExportableInstanceFieldRecommendationOptionsPerformanceRisk ExportableInstanceField = "RecommendationOptionsPerformanceRisk" - ExportableInstanceFieldRecommendationOptionsVcpus ExportableInstanceField = "RecommendationOptionsVcpus" - ExportableInstanceFieldRecommendationOptionsMemory ExportableInstanceField = "RecommendationOptionsMemory" - ExportableInstanceFieldRecommendationOptionsStorage ExportableInstanceField = "RecommendationOptionsStorage" - ExportableInstanceFieldRecommendationOptionsNetwork ExportableInstanceField = "RecommendationOptionsNetwork" - ExportableInstanceFieldRecommendationOptionsOnDemandPrice ExportableInstanceField = "RecommendationOptionsOnDemandPrice" - ExportableInstanceFieldRecommendationOptionsStandardOneYearNoUpfrontReservedPrice ExportableInstanceField = "RecommendationOptionsStandardOneYearNoUpfrontReservedPrice" - ExportableInstanceFieldRecommendationOptionsStandardThreeYearNoUpfrontReservedPrice ExportableInstanceField = "RecommendationOptionsStandardThreeYearNoUpfrontReservedPrice" - ExportableInstanceFieldRecommendationsSourcesRecommendationSourceArn ExportableInstanceField = "RecommendationsSourcesRecommendationSourceArn" - ExportableInstanceFieldRecommendationsSourcesRecommendationSourceType ExportableInstanceField = "RecommendationsSourcesRecommendationSourceType" - ExportableInstanceFieldLastRefreshTimestamp ExportableInstanceField = "LastRefreshTimestamp" + ExportableInstanceFieldAccountId ExportableInstanceField = "AccountId" + ExportableInstanceFieldInstanceArn ExportableInstanceField = "InstanceArn" + ExportableInstanceFieldInstanceName ExportableInstanceField = "InstanceName" + ExportableInstanceFieldFinding ExportableInstanceField = "Finding" + ExportableInstanceFieldFindingReasonCodes ExportableInstanceField = "FindingReasonCodes" + ExportableInstanceFieldLookbackPeriodInDays ExportableInstanceField = "LookbackPeriodInDays" + ExportableInstanceFieldCurrentInstanceType ExportableInstanceField = "CurrentInstanceType" + ExportableInstanceFieldUtilizationMetricsCpuMaximum ExportableInstanceField = "UtilizationMetricsCpuMaximum" + ExportableInstanceFieldUtilizationMetricsMemoryMaximum ExportableInstanceField = "UtilizationMetricsMemoryMaximum" + ExportableInstanceFieldUtilizationMetricsEbsReadOpsPerSecondMaximum ExportableInstanceField = "UtilizationMetricsEbsReadOpsPerSecondMaximum" + ExportableInstanceFieldUtilizationMetricsEbsWriteOpsPerSecondMaximum ExportableInstanceField = "UtilizationMetricsEbsWriteOpsPerSecondMaximum" + ExportableInstanceFieldUtilizationMetricsEbsReadBytesPerSecondMaximum ExportableInstanceField = "UtilizationMetricsEbsReadBytesPerSecondMaximum" + ExportableInstanceFieldUtilizationMetricsEbsWriteBytesPerSecondMaximum ExportableInstanceField = "UtilizationMetricsEbsWriteBytesPerSecondMaximum" + ExportableInstanceFieldUtilizationMetricsDiskReadOpsPerSecondMaximum ExportableInstanceField = "UtilizationMetricsDiskReadOpsPerSecondMaximum" + ExportableInstanceFieldUtilizationMetricsDiskWriteOpsPerSecondMaximum ExportableInstanceField = "UtilizationMetricsDiskWriteOpsPerSecondMaximum" + ExportableInstanceFieldUtilizationMetricsDiskReadBytesPerSecondMaximum ExportableInstanceField = "UtilizationMetricsDiskReadBytesPerSecondMaximum" + ExportableInstanceFieldUtilizationMetricsDiskWriteBytesPerSecondMaximum ExportableInstanceField = "UtilizationMetricsDiskWriteBytesPerSecondMaximum" + ExportableInstanceFieldUtilizationMetricsNetworkInBytesPerSecondMaximum ExportableInstanceField = "UtilizationMetricsNetworkInBytesPerSecondMaximum" + ExportableInstanceFieldUtilizationMetricsNetworkOutBytesPerSecondMaximum ExportableInstanceField = "UtilizationMetricsNetworkOutBytesPerSecondMaximum" + ExportableInstanceFieldUtilizationMetricsNetworkPacketsInPerSecondMaximum ExportableInstanceField = "UtilizationMetricsNetworkPacketsInPerSecondMaximum" + ExportableInstanceFieldUtilizationMetricsNetworkPacketsOutPerSecondMaximum ExportableInstanceField = "UtilizationMetricsNetworkPacketsOutPerSecondMaximum" + ExportableInstanceFieldCurrentOnDemandPrice ExportableInstanceField = "CurrentOnDemandPrice" + ExportableInstanceFieldCurrentStandardOneYearNoUpfrontReservedPrice ExportableInstanceField = "CurrentStandardOneYearNoUpfrontReservedPrice" + ExportableInstanceFieldCurrentStandardThreeYearNoUpfrontReservedPrice ExportableInstanceField = "CurrentStandardThreeYearNoUpfrontReservedPrice" + ExportableInstanceFieldCurrentVcpus ExportableInstanceField = "CurrentVCpus" + ExportableInstanceFieldCurrentMemory ExportableInstanceField = "CurrentMemory" + ExportableInstanceFieldCurrentStorage ExportableInstanceField = "CurrentStorage" + ExportableInstanceFieldCurrentNetwork ExportableInstanceField = "CurrentNetwork" + ExportableInstanceFieldRecommendationOptionsInstanceType ExportableInstanceField = "RecommendationOptionsInstanceType" + ExportableInstanceFieldRecommendationOptionsProjectedUtilizationMetricsCpuMaximum ExportableInstanceField = "RecommendationOptionsProjectedUtilizationMetricsCpuMaximum" + ExportableInstanceFieldRecommendationOptionsProjectedUtilizationMetricsMemoryMaximum ExportableInstanceField = "RecommendationOptionsProjectedUtilizationMetricsMemoryMaximum" + ExportableInstanceFieldRecommendationOptionsPlatformDifferences ExportableInstanceField = "RecommendationOptionsPlatformDifferences" + ExportableInstanceFieldRecommendationOptionsPerformanceRisk ExportableInstanceField = "RecommendationOptionsPerformanceRisk" + ExportableInstanceFieldRecommendationOptionsVcpus ExportableInstanceField = "RecommendationOptionsVcpus" + ExportableInstanceFieldRecommendationOptionsMemory ExportableInstanceField = "RecommendationOptionsMemory" + ExportableInstanceFieldRecommendationOptionsStorage ExportableInstanceField = "RecommendationOptionsStorage" + ExportableInstanceFieldRecommendationOptionsNetwork ExportableInstanceField = "RecommendationOptionsNetwork" + ExportableInstanceFieldRecommendationOptionsOnDemandPrice ExportableInstanceField = "RecommendationOptionsOnDemandPrice" + ExportableInstanceFieldRecommendationOptionsStandardOneYearNoUpfrontReservedPrice ExportableInstanceField = "RecommendationOptionsStandardOneYearNoUpfrontReservedPrice" + ExportableInstanceFieldRecommendationOptionsStandardThreeYearNoUpfrontReservedPrice ExportableInstanceField = "RecommendationOptionsStandardThreeYearNoUpfrontReservedPrice" + ExportableInstanceFieldRecommendationsSourcesRecommendationSourceArn ExportableInstanceField = "RecommendationsSourcesRecommendationSourceArn" + ExportableInstanceFieldRecommendationsSourcesRecommendationSourceType ExportableInstanceField = "RecommendationsSourcesRecommendationSourceType" + ExportableInstanceFieldLastRefreshTimestamp ExportableInstanceField = "LastRefreshTimestamp" + ExportableInstanceFieldCurrentPerformanceRisk ExportableInstanceField = "CurrentPerformanceRisk" + ExportableInstanceFieldRecommendationOptionsSavingsOpportunityPercentage ExportableInstanceField = "RecommendationOptionsSavingsOpportunityPercentage" + ExportableInstanceFieldRecommendationOptionsEstimatedMonthlySavingsCurrency ExportableInstanceField = "RecommendationOptionsEstimatedMonthlySavingsCurrency" + ExportableInstanceFieldRecommendationOptionsEstimatedMonthlySavingsValue ExportableInstanceField = "RecommendationOptionsEstimatedMonthlySavingsValue" + ExportableInstanceFieldEffectiveRecommendationPreferencesCpuVendorArchitectures ExportableInstanceField = "EffectiveRecommendationPreferencesCpuVendorArchitectures" + ExportableInstanceFieldEffectiveRecommendationPreferencesEnhancedInfrastructureMetrics ExportableInstanceField = "EffectiveRecommendationPreferencesEnhancedInfrastructureMetrics" ) // Values returns all known values for ExportableInstanceField. Note that this can @@ -294,6 +371,12 @@ func (ExportableInstanceField) Values() []ExportableInstanceField { "RecommendationsSourcesRecommendationSourceArn", "RecommendationsSourcesRecommendationSourceType", "LastRefreshTimestamp", + "CurrentPerformanceRisk", + "RecommendationOptionsSavingsOpportunityPercentage", + "RecommendationOptionsEstimatedMonthlySavingsCurrency", + "RecommendationOptionsEstimatedMonthlySavingsValue", + "EffectiveRecommendationPreferencesCpuVendorArchitectures", + "EffectiveRecommendationPreferencesEnhancedInfrastructureMetrics", } } @@ -323,6 +406,10 @@ const ( ExportableLambdaFunctionFieldRecommendationOptionsProjectedUtilizationMetricsDurationUpperBound ExportableLambdaFunctionField = "RecommendationOptionsProjectedUtilizationMetricsDurationUpperBound" ExportableLambdaFunctionFieldRecommendationOptionsProjectedUtilizationMetricsDurationExpected ExportableLambdaFunctionField = "RecommendationOptionsProjectedUtilizationMetricsDurationExpected" ExportableLambdaFunctionFieldLastRefreshTimestamp ExportableLambdaFunctionField = "LastRefreshTimestamp" + ExportableLambdaFunctionFieldCurrentPerformanceRisk ExportableLambdaFunctionField = "CurrentPerformanceRisk" + ExportableLambdaFunctionFieldRecommendationOptionsSavingsOpportunityPercentage ExportableLambdaFunctionField = "RecommendationOptionsSavingsOpportunityPercentage" + ExportableLambdaFunctionFieldRecommendationOptionsEstimatedMonthlySavingsCurrency ExportableLambdaFunctionField = "RecommendationOptionsEstimatedMonthlySavingsCurrency" + ExportableLambdaFunctionFieldRecommendationOptionsEstimatedMonthlySavingsValue ExportableLambdaFunctionField = "RecommendationOptionsEstimatedMonthlySavingsValue" ) // Values returns all known values for ExportableLambdaFunctionField. Note that @@ -353,6 +440,10 @@ func (ExportableLambdaFunctionField) Values() []ExportableLambdaFunctionField { "RecommendationOptionsProjectedUtilizationMetricsDurationUpperBound", "RecommendationOptionsProjectedUtilizationMetricsDurationExpected", "LastRefreshTimestamp", + "CurrentPerformanceRisk", + "RecommendationOptionsSavingsOpportunityPercentage", + "RecommendationOptionsEstimatedMonthlySavingsCurrency", + "RecommendationOptionsEstimatedMonthlySavingsValue", } } @@ -384,6 +475,10 @@ const ( ExportableVolumeFieldRecommendationOptionsMonthlyPrice ExportableVolumeField = "RecommendationOptionsMonthlyPrice" ExportableVolumeFieldRecommendationOptionsPerformanceRisk ExportableVolumeField = "RecommendationOptionsPerformanceRisk" ExportableVolumeFieldLastRefreshTimestamp ExportableVolumeField = "LastRefreshTimestamp" + ExportableVolumeFieldCurrentPerformanceRisk ExportableVolumeField = "CurrentPerformanceRisk" + ExportableVolumeFieldRecommendationOptionsSavingsOpportunityPercentage ExportableVolumeField = "RecommendationOptionsSavingsOpportunityPercentage" + ExportableVolumeFieldRecommendationOptionsEstimatedMonthlySavingsCurrency ExportableVolumeField = "RecommendationOptionsEstimatedMonthlySavingsCurrency" + ExportableVolumeFieldRecommendationOptionsEstimatedMonthlySavingsValue ExportableVolumeField = "RecommendationOptionsEstimatedMonthlySavingsValue" ) // Values returns all known values for ExportableVolumeField. Note that this can be @@ -415,6 +510,10 @@ func (ExportableVolumeField) Values() []ExportableVolumeField { "RecommendationOptionsMonthlyPrice", "RecommendationOptionsPerformanceRisk", "LastRefreshTimestamp", + "CurrentPerformanceRisk", + "RecommendationOptionsSavingsOpportunityPercentage", + "RecommendationOptionsEstimatedMonthlySavingsCurrency", + "RecommendationOptionsEstimatedMonthlySavingsValue", } } @@ -805,6 +904,22 @@ func (PlatformDifference) Values() []PlatformDifference { } } +type RecommendationPreferenceName string + +// Enum values for RecommendationPreferenceName +const ( + RecommendationPreferenceNameEnhancedInfrastructureMetrics RecommendationPreferenceName = "EnhancedInfrastructureMetrics" +) + +// Values returns all known values for RecommendationPreferenceName. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// The ordering of this slice is not guaranteed to be stable across updates. +func (RecommendationPreferenceName) Values() []RecommendationPreferenceName { + return []RecommendationPreferenceName{ + "EnhancedInfrastructureMetrics", + } +} + type RecommendationSourceType string // Enum values for RecommendationSourceType @@ -849,6 +964,26 @@ func (ResourceType) Values() []ResourceType { } } +type ScopeName string + +// Enum values for ScopeName +const ( + ScopeNameOrganization ScopeName = "Organization" + ScopeNameAccountId ScopeName = "AccountId" + ScopeNameResourceArn ScopeName = "ResourceArn" +) + +// Values returns all known values for ScopeName. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (ScopeName) Values() []ScopeName { + return []ScopeName{ + "Organization", + "AccountId", + "ResourceArn", + } +} + type Status string // Enum values for Status diff --git a/service/computeoptimizer/types/types.go b/service/computeoptimizer/types/types.go index a77c763e776..d7b70ac53d0 100644 --- a/service/computeoptimizer/types/types.go +++ b/service/computeoptimizer/types/types.go @@ -63,6 +63,16 @@ type AutoScalingGroupRecommendation struct { // group. CurrentConfiguration *AutoScalingGroupConfiguration + // The risk of the current Auto Scaling group not meeting the performance needs of + // its workloads. The higher the risk, the more likely the current Auto Scaling + // group configuration has insufficient capacity and cannot meet workload + // requirements. + CurrentPerformanceRisk CurrentPerformanceRisk + + // An object that describes the effective recommendation preferences for the Auto + // Scaling group. + EffectiveRecommendationPreferences *EffectiveRecommendationPreferences + // The finding classification of the Auto Scaling group. Findings for Auto Scaling // groups include: // @@ -77,7 +87,7 @@ type AutoScalingGroupRecommendation struct { // instance type. Finding Finding - // The timestamp of when the Auto Scaling group recommendation was last refreshed. + // The timestamp of when the Auto Scaling group recommendation was last generated. LastRefreshTimestamp *time.Time // The number of days for which utilization metrics were analyzed for the Auto @@ -128,6 +138,33 @@ type AutoScalingGroupRecommendationOption struct { // option is ranked as 1. Rank int32 + // An object that describes the savings opportunity for the Auto Scaling group + // recommendation option. Savings opportunity includes the estimated monthly + // savings amount and percentage. + SavingsOpportunity *SavingsOpportunity + + noSmithyDocumentSerde +} + +// Describes the performance risk ratings for a given resource type. Resources with +// a high or medium rating are at risk of not meeting the performance needs of +// their workloads, while resources with a low rating are performing well in their +// workloads. +type CurrentPerformanceRiskRatings struct { + + // A count of the applicable resource types with a high performance risk rating. + High int64 + + // A count of the applicable resource types with a low performance risk rating. + Low int64 + + // A count of the applicable resource types with a medium performance risk rating. + Medium int64 + + // A count of the applicable resource types with a very low performance risk + // rating. + VeryLow int64 + noSmithyDocumentSerde } @@ -193,6 +230,35 @@ type EBSUtilizationMetric struct { noSmithyDocumentSerde } +// Describes the effective recommendation preferences for a resource. +type EffectiveRecommendationPreferences struct { + + // Describes the CPU vendor and architecture for an instance or Auto Scaling group + // recommendations. For example, when you specify AWS_ARM64 with: + // + // * A + // GetEC2InstanceRecommendations or GetAutoScalingGroupRecommendations request, + // Compute Optimizer returns recommendations that consist of Graviton2 instance + // types only. + // + // * A GetEC2RecommendationProjectedMetrics request, Compute Optimizer + // returns projected utilization metrics for Graviton2 instance type + // recommendations only. + // + // * A ExportEC2InstanceRecommendations or + // ExportAutoScalingGroupRecommendations request, Compute Optimizer exports + // recommendations that consist of Graviton2 instance types only. + CpuVendorArchitectures []CpuVendorArchitecture + + // Describes the activation status of the enhanced infrastructure metrics + // preference. A status of Active confirms that the preference is applied in the + // latest recommendation refresh, and a status of Inactive confirms that it's not + // yet applied. + EnhancedInfrastructureMetrics EnhancedInfrastructureMetrics + + noSmithyDocumentSerde +} + // Describes a filter that returns a more specific list of account enrollment // statuses. Use this filter with the GetEnrollmentStatusesForOrganization action. type EnrollmentFilter struct { @@ -208,6 +274,22 @@ type EnrollmentFilter struct { noSmithyDocumentSerde } +// Describes the estimated monthly savings amount possible for a given resource +// based on On-Demand instance pricing For more information, see Estimated monthly +// savings and savings opportunities +// (https://docs.aws.amazon.com/compute-optimizer/latest/ug/view-ec2-recommendations.html#ec2-savings-calculation) +// in the Compute Optimizer User Guide. +type EstimatedMonthlySavings struct { + + // The currency of the estimated monthly savings. + Currency Currency + + // The value of the estimated monthly savings. + Value float64 + + noSmithyDocumentSerde +} + // Describes the destination of the recommendations export and metadata files. type ExportDestination struct { @@ -357,6 +439,15 @@ type InstanceRecommendation struct { // The instance type of the current instance. CurrentInstanceType *string + // The risk of the current instance not meeting the performance needs of its + // workloads. The higher the risk, the more likely the current Lambda function + // requires more memory. + CurrentPerformanceRisk CurrentPerformanceRisk + + // An object that describes the effective recommendation preferences for the + // instance. + EffectiveRecommendationPreferences *EffectiveRecommendationPreferences + // The finding classification of the instance. Findings for instances include: // // * @@ -505,7 +596,7 @@ type InstanceRecommendation struct { // The name of the current instance. InstanceName *string - // The timestamp of when the instance recommendation was last refreshed. + // The timestamp of when the instance recommendation was last generated. LastRefreshTimestamp *time.Time // The number of days for which utilization metrics were analyzed for the instance. @@ -649,6 +740,11 @@ type InstanceRecommendationOption struct { // ranked as 1. Rank int32 + // An object that describes the savings opportunity for the instance recommendation + // option. Savings opportunity includes the estimated monthly savings amount and + // percentage. + SavingsOpportunity *SavingsOpportunity + noSmithyDocumentSerde } @@ -710,6 +806,11 @@ type LambdaFunctionMemoryRecommendationOption struct { // ranked as 1. Rank int32 + // An object that describes the savings opportunity for the Lambda function + // recommendation option. Savings opportunity includes the estimated monthly + // savings amount and percentage. + SavingsOpportunity *SavingsOpportunity + noSmithyDocumentSerde } @@ -722,6 +823,11 @@ type LambdaFunctionRecommendation struct { // The amount of memory, in MB, that's allocated to the current function. CurrentMemorySize int32 + // The risk of the current Lambda function not meeting the performance needs of its + // workloads. The higher the risk, the more likely the current Lambda function + // configuration is underperforming in its workload. + CurrentPerformanceRisk CurrentPerformanceRisk + // The finding classification of the function. Findings for functions include: // // * @@ -782,7 +888,7 @@ type LambdaFunctionRecommendation struct { // The version number of the current function. FunctionVersion *string - // The timestamp of when the function recommendation was last refreshed. + // The timestamp of when the function recommendation was last generated. LastRefreshTimestamp *time.Time // The number of days for which utilization metrics were analyzed for the function. @@ -944,7 +1050,9 @@ type RecommendationExportJob struct { noSmithyDocumentSerde } -// Describes preferences for recommendations. +// Describes the recommendation preferences to return in the response of a +// GetAutoScalingGroupRecommendations, GetEC2InstanceRecommendations, and +// GetEC2RecommendationProjectedMetrics request. type RecommendationPreferences struct { // Specifies the CPU vendor and architecture for Amazon EC2 instance and Auto @@ -967,6 +1075,32 @@ type RecommendationPreferences struct { noSmithyDocumentSerde } +// Describes a recommendation preference. +type RecommendationPreferencesDetail struct { + + // The status of the enhanced infrastructure metrics recommendation preference. A + // status of Active confirms that the preference is applied in the latest + // recommendation refresh, and a status of Inactive confirms that it's not yet + // applied. + EnhancedInfrastructureMetrics EnhancedInfrastructureMetrics + + // The target resource type of the recommendation preference to create. The + // Ec2Instance option encompasses standalone instances and instances that are part + // of Auto Scaling groups. The AutoScalingGroup option encompasses only instances + // that are part of an Auto Scaling group. + ResourceType ResourceType + + // An object that describes the scope of the recommendation preference. + // Recommendation preferences can be created at the organization level (for + // management accounts of an organization only), account level, and resource level. + // For more information, see Activating enhanced infrastructure metrics + // (https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html) + // in the Compute Optimizer User Guide. + Scope *Scope + + noSmithyDocumentSerde +} + // Describes the source of a recommendation, such as an Amazon EC2 instance or Auto // Scaling group. type RecommendationSource struct { @@ -986,9 +1120,17 @@ type RecommendationSummary struct { // The Amazon Web Services account ID of the recommendation summary. AccountId *string - // The resource type of the recommendation. + // An object that describes the performance risk ratings for a given resource type. + CurrentPerformanceRiskRatings *CurrentPerformanceRiskRatings + + // The resource type that the recommendation summary applies to. RecommendationResourceType RecommendationSourceType + // An object that describes the savings opportunity for a given resource type. + // Savings opportunity includes the estimated monthly savings amount and + // percentage. + SavingsOpportunity *SavingsOpportunity + // An array of objects that describe a recommendation summary. Summaries []Summary @@ -1061,6 +1203,79 @@ type S3DestinationConfig struct { noSmithyDocumentSerde } +// Describes the savings opportunity for recommendations of a given resource type +// or for the recommendation option of an individual resource. Savings opportunity +// represents the estimated monthly savings you can achieve by implementing a given +// Compute Optimizer recommendation. Savings opportunity data requires that you opt +// in to Cost Explorer, as well as activate Receive Amazon EC2 resource +// recommendations in the Cost Explorer preferences page. That creates a connection +// between Cost Explorer and Compute Optimizer. With this connection, Cost Explorer +// generates savings estimates considering the price of existing resources, the +// price of recommended resources, and historical usage data. Estimated monthly +// savings reflects the projected dollar savings associated with each of the +// recommendations generated. For more information, see Enabling Cost Explorer +// (https://docs.aws.amazon.com/cost-management/latest/userguide/ce-enable.html) +// and Optimizing your cost with Rightsizing Recommendations +// (https://docs.aws.amazon.com/cost-management/latest/userguide/ce-rightsizing.html) +// in the Cost Management User Guide. +type SavingsOpportunity struct { + + // An object that describes the estimated monthly savings amount possible based on + // On-Demand instance pricing. + EstimatedMonthlySavings *EstimatedMonthlySavings + + // The estimated monthly savings possible as a percentage of monthly cost. + SavingsOpportunityPercentage float64 + + noSmithyDocumentSerde +} + +// Describes the scope of a recommendation preference. Recommendation preferences +// can be created at the organization level (for management accounts of an +// organization only), account level, and resource level. For more information, see +// Activating enhanced infrastructure metrics +// (https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html) +// in the Compute Optimizer User Guide. You cannot create recommendation +// preferences for Auto Scaling groups at the organization and account levels. You +// can create recommendation preferences for Auto Scaling groups only at the +// resource level by specifying a scope name of ResourceArn and a scope value of +// the Auto Scaling group Amazon Resource Name (ARN). This will configure the +// preference for all instances that are part of the specified the Auto Scaling +// group. +type Scope struct { + + // The name of the scope. The following scopes are possible: + // + // * Organization - + // Specifies that the recommendation preference applies at the organization level, + // for all member accounts of an organization. + // + // * AccountId - Specifies that the + // recommendation preference applies at the account level, for all resources of a + // given resource type in an account. + // + // * ResourceArn - Specifies that the + // recommendation preference applies at the individual resource level. + Name ScopeName + + // The value of the scope. If you specified the name of the scope as: + // + // * + // Organization - The value must be ALL_ACCOUNTS. + // + // * AccountId - The value must be + // a 12-digit Amazon Web Services account ID. + // + // * ResourceArn - The value must be + // the Amazon Resource Name (ARN) of an EC2 instance or an Auto Scaling + // group. + // + // Only EC2 instance and Auto Scaling group ARNs are currently supported. + Value *string + + noSmithyDocumentSerde +} + // The summary of a recommendation. type Summary struct { @@ -1214,6 +1429,11 @@ type VolumeRecommendation struct { // An array of objects that describe the current configuration of the volume. CurrentConfiguration *VolumeConfiguration + // The risk of the current EBS volume not meeting the performance needs of its + // workloads. The higher the risk, the more likely the current EBS volume doesn't + // have sufficient capacity. + CurrentPerformanceRisk CurrentPerformanceRisk + // The finding classification of the volume. Findings for volumes include: // // * @@ -1227,7 +1447,7 @@ type VolumeRecommendation struct { // recommend a new generation volume type. Finding EBSFinding - // The timestamp of when the volume recommendation was last refreshed. + // The timestamp of when the volume recommendation was last generated. LastRefreshTimestamp *time.Time // The number of days for which utilization metrics were analyzed for the volume. @@ -1265,6 +1485,11 @@ type VolumeRecommendationOption struct { // ranked as 1. Rank int32 + // An object that describes the savings opportunity for the EBS volume + // recommendation option. Savings opportunity includes the estimated monthly + // savings amount and percentage. + SavingsOpportunity *SavingsOpportunity + noSmithyDocumentSerde } diff --git a/service/computeoptimizer/validators.go b/service/computeoptimizer/validators.go index f1091d092bf..856414e9fbf 100644 --- a/service/computeoptimizer/validators.go +++ b/service/computeoptimizer/validators.go @@ -9,6 +9,26 @@ import ( "github.com/aws/smithy-go/middleware" ) +type validateOpDeleteRecommendationPreferences struct { +} + +func (*validateOpDeleteRecommendationPreferences) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteRecommendationPreferences) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteRecommendationPreferencesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteRecommendationPreferencesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpExportAutoScalingGroupRecommendations struct { } @@ -109,6 +129,66 @@ func (m *validateOpGetEC2RecommendationProjectedMetrics) HandleInitialize(ctx co return next.HandleInitialize(ctx, in) } +type validateOpGetEffectiveRecommendationPreferences struct { +} + +func (*validateOpGetEffectiveRecommendationPreferences) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetEffectiveRecommendationPreferences) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetEffectiveRecommendationPreferencesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetEffectiveRecommendationPreferencesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetRecommendationPreferences struct { +} + +func (*validateOpGetRecommendationPreferences) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetRecommendationPreferences) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetRecommendationPreferencesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetRecommendationPreferencesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutRecommendationPreferences struct { +} + +func (*validateOpPutRecommendationPreferences) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutRecommendationPreferences) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutRecommendationPreferencesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutRecommendationPreferencesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateEnrollmentStatus struct { } @@ -129,6 +209,10 @@ func (m *validateOpUpdateEnrollmentStatus) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +func addOpDeleteRecommendationPreferencesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteRecommendationPreferences{}, middleware.After) +} + func addOpExportAutoScalingGroupRecommendationsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpExportAutoScalingGroupRecommendations{}, middleware.After) } @@ -149,10 +233,40 @@ func addOpGetEC2RecommendationProjectedMetricsValidationMiddleware(stack *middle return stack.Initialize.Add(&validateOpGetEC2RecommendationProjectedMetrics{}, middleware.After) } +func addOpGetEffectiveRecommendationPreferencesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetEffectiveRecommendationPreferences{}, middleware.After) +} + +func addOpGetRecommendationPreferencesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetRecommendationPreferences{}, middleware.After) +} + +func addOpPutRecommendationPreferencesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutRecommendationPreferences{}, middleware.After) +} + func addOpUpdateEnrollmentStatusValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateEnrollmentStatus{}, middleware.After) } +func validateOpDeleteRecommendationPreferencesInput(v *DeleteRecommendationPreferencesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteRecommendationPreferencesInput"} + if len(v.ResourceType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ResourceType")) + } + if v.RecommendationPreferenceNames == nil { + invalidParams.Add(smithy.NewErrParamRequired("RecommendationPreferenceNames")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpExportAutoScalingGroupRecommendationsInput(v *ExportAutoScalingGroupRecommendationsInput) error { if v == nil { return nil @@ -237,6 +351,51 @@ func validateOpGetEC2RecommendationProjectedMetricsInput(v *GetEC2Recommendation } } +func validateOpGetEffectiveRecommendationPreferencesInput(v *GetEffectiveRecommendationPreferencesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetEffectiveRecommendationPreferencesInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetRecommendationPreferencesInput(v *GetRecommendationPreferencesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetRecommendationPreferencesInput"} + if len(v.ResourceType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ResourceType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutRecommendationPreferencesInput(v *PutRecommendationPreferencesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutRecommendationPreferencesInput"} + if len(v.ResourceType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ResourceType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateEnrollmentStatusInput(v *UpdateEnrollmentStatusInput) error { if v == nil { return nil diff --git a/service/connect/api_op_CreateAgentStatus.go b/service/connect/api_op_CreateAgentStatus.go index bdbcf2f2601..e755d486b6c 100644 --- a/service/connect/api_op_CreateAgentStatus.go +++ b/service/connect/api_op_CreateAgentStatus.go @@ -52,7 +52,7 @@ type CreateAgentStatusInput struct { // The display order of the status. DisplayOrder *int32 - // One or more tags. + // The tags used to organize, track, or control access for this resource. Tags map[string]string noSmithyDocumentSerde diff --git a/service/connect/api_op_CreateContactFlowModule.go b/service/connect/api_op_CreateContactFlowModule.go new file mode 100644 index 00000000000..1b2de2a9f12 --- /dev/null +++ b/service/connect/api_op_CreateContactFlowModule.go @@ -0,0 +1,181 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a contact flow module for the specified Amazon Connect instance. +func (c *Client) CreateContactFlowModule(ctx context.Context, params *CreateContactFlowModuleInput, optFns ...func(*Options)) (*CreateContactFlowModuleOutput, error) { + if params == nil { + params = &CreateContactFlowModuleInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateContactFlowModule", params, optFns, c.addOperationCreateContactFlowModuleMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateContactFlowModuleOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateContactFlowModuleInput struct { + + // The content of the contact flow module. + // + // This member is required. + Content *string + + // The identifier of the Amazon Connect instance. You can find the instanceId in + // the ARN of the instance. + // + // This member is required. + InstanceId *string + + // The name of the contact flow module. + // + // This member is required. + Name *string + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientToken *string + + // The description of the contact flow module. + Description *string + + // The tags used to organize, track, or control access for this resource. + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateContactFlowModuleOutput struct { + + // The Amazon Resource Name (ARN) of the contact flow module. + Arn *string + + // The identifier of the contact flow module. + Id *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateContactFlowModuleMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateContactFlowModule{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateContactFlowModule{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opCreateContactFlowModuleMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateContactFlowModuleValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateContactFlowModule(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateContactFlowModule struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateContactFlowModule) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateContactFlowModule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*CreateContactFlowModuleInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateContactFlowModuleInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateContactFlowModuleMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateContactFlowModule{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateContactFlowModule(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "connect", + OperationName: "CreateContactFlowModule", + } +} diff --git a/service/connect/api_op_CreateHoursOfOperation.go b/service/connect/api_op_CreateHoursOfOperation.go index 7a1db95ef91..bcd41b677b4 100644 --- a/service/connect/api_op_CreateHoursOfOperation.go +++ b/service/connect/api_op_CreateHoursOfOperation.go @@ -11,6 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) +// This API is in preview release for Amazon Connect and is subject to change. // Creates hours of operation. func (c *Client) CreateHoursOfOperation(ctx context.Context, params *CreateHoursOfOperationInput, optFns ...func(*Options)) (*CreateHoursOfOperationOutput, error) { if params == nil { @@ -54,7 +55,7 @@ type CreateHoursOfOperationInput struct { // The description of the hours of operation. Description *string - // One or more tags. + // The tags used to organize, track, or control access for this resource. Tags map[string]string noSmithyDocumentSerde diff --git a/service/connect/api_op_CreateIntegrationAssociation.go b/service/connect/api_op_CreateIntegrationAssociation.go index 61742710c87..fe981f2f98d 100644 --- a/service/connect/api_op_CreateIntegrationAssociation.go +++ b/service/connect/api_op_CreateIntegrationAssociation.go @@ -57,7 +57,7 @@ type CreateIntegrationAssociationInput struct { // integration type. SourceType types.SourceType - // One or more tags. + // The tags used to organize, track, or control access for this resource. Tags map[string]string noSmithyDocumentSerde diff --git a/service/connect/api_op_CreateQueue.go b/service/connect/api_op_CreateQueue.go index e00695f7e96..acd495745a7 100644 --- a/service/connect/api_op_CreateQueue.go +++ b/service/connect/api_op_CreateQueue.go @@ -59,7 +59,7 @@ type CreateQueueInput struct { // The quick connects available to agents who are working the queue. QuickConnectIds []string - // One or more tags. + // The tags used to organize, track, or control access for this resource. Tags map[string]string noSmithyDocumentSerde diff --git a/service/connect/api_op_CreateQuickConnect.go b/service/connect/api_op_CreateQuickConnect.go index 448cee01cf5..036b479ae96 100644 --- a/service/connect/api_op_CreateQuickConnect.go +++ b/service/connect/api_op_CreateQuickConnect.go @@ -48,7 +48,7 @@ type CreateQuickConnectInput struct { // The description of the quick connect. Description *string - // One or more tags. + // The tags used to organize, track, or control access for this resource. Tags map[string]string noSmithyDocumentSerde diff --git a/service/connect/api_op_CreateSecurityProfile.go b/service/connect/api_op_CreateSecurityProfile.go index c328f14ee68..b0d086c8b24 100644 --- a/service/connect/api_op_CreateSecurityProfile.go +++ b/service/connect/api_op_CreateSecurityProfile.go @@ -46,7 +46,7 @@ type CreateSecurityProfileInput struct { // Permissions assigned to the security profile. Permissions []string - // One or more tags. + // The tags used to organize, track, or control access for this resource. Tags map[string]string noSmithyDocumentSerde diff --git a/service/connect/api_op_CreateUseCase.go b/service/connect/api_op_CreateUseCase.go index cd704049724..5a51b51f149 100644 --- a/service/connect/api_op_CreateUseCase.go +++ b/service/connect/api_op_CreateUseCase.go @@ -46,7 +46,7 @@ type CreateUseCaseInput struct { // This member is required. UseCaseType types.UseCaseType - // One or more tags. + // The tags used to organize, track, or control access for this resource. Tags map[string]string noSmithyDocumentSerde diff --git a/service/connect/api_op_DeleteContactFlow.go b/service/connect/api_op_DeleteContactFlow.go new file mode 100644 index 00000000000..ead6a9c8001 --- /dev/null +++ b/service/connect/api_op_DeleteContactFlow.go @@ -0,0 +1,122 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a contact flow for the specified Amazon Connect instance. +func (c *Client) DeleteContactFlow(ctx context.Context, params *DeleteContactFlowInput, optFns ...func(*Options)) (*DeleteContactFlowOutput, error) { + if params == nil { + params = &DeleteContactFlowInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteContactFlow", params, optFns, c.addOperationDeleteContactFlowMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteContactFlowOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteContactFlowInput struct { + + // The identifier of the contact flow. + // + // This member is required. + ContactFlowId *string + + // The identifier of the Amazon Connect instance. You can find the instanceId in + // the ARN of the instance. + // + // This member is required. + InstanceId *string + + noSmithyDocumentSerde +} + +type DeleteContactFlowOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteContactFlowMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteContactFlow{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteContactFlow{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteContactFlowValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteContactFlow(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteContactFlow(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "connect", + OperationName: "DeleteContactFlow", + } +} diff --git a/service/lambda/api_op_UpdateFunctionUrlConfig.go b/service/connect/api_op_DeleteContactFlowModule.go similarity index 58% rename from service/lambda/api_op_UpdateFunctionUrlConfig.go rename to service/connect/api_op_DeleteContactFlowModule.go index 672a3fffee1..34192b6417b 100644 --- a/service/lambda/api_op_UpdateFunctionUrlConfig.go +++ b/service/connect/api_op_DeleteContactFlowModule.go @@ -1,76 +1,60 @@ // Code generated by smithy-go-codegen DO NOT EDIT. -package lambda +package connect import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" - "github.com/aws/aws-sdk-go-v2/service/lambda/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -func (c *Client) UpdateFunctionUrlConfig(ctx context.Context, params *UpdateFunctionUrlConfigInput, optFns ...func(*Options)) (*UpdateFunctionUrlConfigOutput, error) { +// Deletes the specified contact flow module. +func (c *Client) DeleteContactFlowModule(ctx context.Context, params *DeleteContactFlowModuleInput, optFns ...func(*Options)) (*DeleteContactFlowModuleOutput, error) { if params == nil { - params = &UpdateFunctionUrlConfigInput{} + params = &DeleteContactFlowModuleInput{} } - result, metadata, err := c.invokeOperation(ctx, "UpdateFunctionUrlConfig", params, optFns, c.addOperationUpdateFunctionUrlConfigMiddlewares) + result, metadata, err := c.invokeOperation(ctx, "DeleteContactFlowModule", params, optFns, c.addOperationDeleteContactFlowModuleMiddlewares) if err != nil { return nil, err } - out := result.(*UpdateFunctionUrlConfigOutput) + out := result.(*DeleteContactFlowModuleOutput) out.ResultMetadata = metadata return out, nil } -type UpdateFunctionUrlConfigInput struct { +type DeleteContactFlowModuleInput struct { + // The identifier of the contact flow module. + // // This member is required. - FunctionName *string + ContactFlowModuleId *string - AuthorizationType types.AuthorizationType - - Cors *types.Cors - - Qualifier *string + // The identifier of the Amazon Connect instance. You can find the instanceId in + // the ARN of the instance. + // + // This member is required. + InstanceId *string noSmithyDocumentSerde } -type UpdateFunctionUrlConfigOutput struct { - - // This member is required. - AuthorizationType types.AuthorizationType - - // This member is required. - CreationTime *string - - // This member is required. - FunctionArn *string - - // This member is required. - FunctionUrl *string - - // This member is required. - LastModifiedTime *string - - Cors *types.Cors - +type DeleteContactFlowModuleOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } -func (c *Client) addOperationUpdateFunctionUrlConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { - err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateFunctionUrlConfig{}, middleware.After) +func (c *Client) addOperationDeleteContactFlowModuleMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteContactFlowModule{}, middleware.After) if err != nil { return err } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateFunctionUrlConfig{}, middleware.After) + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteContactFlowModule{}, middleware.After) if err != nil { return err } @@ -110,10 +94,10 @@ func (c *Client) addOperationUpdateFunctionUrlConfigMiddlewares(stack *middlewar if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addOpUpdateFunctionUrlConfigValidationMiddleware(stack); err != nil { + if err = addOpDeleteContactFlowModuleValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateFunctionUrlConfig(options.Region), middleware.Before); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteContactFlowModule(options.Region), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -128,11 +112,11 @@ func (c *Client) addOperationUpdateFunctionUrlConfigMiddlewares(stack *middlewar return nil } -func newServiceMetadataMiddleware_opUpdateFunctionUrlConfig(region string) *awsmiddleware.RegisterServiceMetadata { +func newServiceMetadataMiddleware_opDeleteContactFlowModule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, - SigningName: "lambda", - OperationName: "UpdateFunctionUrlConfig", + SigningName: "connect", + OperationName: "DeleteContactFlowModule", } } diff --git a/service/connect/api_op_DeleteHoursOfOperation.go b/service/connect/api_op_DeleteHoursOfOperation.go index 6ece7bc2b8f..211141fff9d 100644 --- a/service/connect/api_op_DeleteHoursOfOperation.go +++ b/service/connect/api_op_DeleteHoursOfOperation.go @@ -10,6 +10,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) +// This API is in preview release for Amazon Connect and is subject to change. // Deletes an hours of operation. func (c *Client) DeleteHoursOfOperation(ctx context.Context, params *DeleteHoursOfOperationInput, optFns ...func(*Options)) (*DeleteHoursOfOperationOutput, error) { if params == nil { diff --git a/service/connect/api_op_DescribeContact.go b/service/connect/api_op_DescribeContact.go index 336a006addc..ad82ccaf949 100644 --- a/service/connect/api_op_DescribeContact.go +++ b/service/connect/api_op_DescribeContact.go @@ -12,7 +12,7 @@ import ( ) // This API is in preview release for Amazon Connect and is subject to change. -// Describes the specified contact. Contact information is available in Amazon +// Describes the specified contact. Contact information remains available in Amazon // Connect for 24 months, and then it is deleted. func (c *Client) DescribeContact(ctx context.Context, params *DescribeContactInput, optFns ...func(*Options)) (*DescribeContactOutput, error) { if params == nil { @@ -31,7 +31,7 @@ func (c *Client) DescribeContact(ctx context.Context, params *DescribeContactInp type DescribeContactInput struct { - // The identifier of the initial contact. + // The identifier of the contact. // // This member is required. ContactId *string diff --git a/service/connect/api_op_DescribeContactFlowModule.go b/service/connect/api_op_DescribeContactFlowModule.go new file mode 100644 index 00000000000..aaf460f2467 --- /dev/null +++ b/service/connect/api_op_DescribeContactFlowModule.go @@ -0,0 +1,127 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/connect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Describes the specified contact flow module. +func (c *Client) DescribeContactFlowModule(ctx context.Context, params *DescribeContactFlowModuleInput, optFns ...func(*Options)) (*DescribeContactFlowModuleOutput, error) { + if params == nil { + params = &DescribeContactFlowModuleInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeContactFlowModule", params, optFns, c.addOperationDescribeContactFlowModuleMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeContactFlowModuleOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeContactFlowModuleInput struct { + + // The identifier of the contact flow module. + // + // This member is required. + ContactFlowModuleId *string + + // The identifier of the Amazon Connect instance. You can find the instanceId in + // the ARN of the instance. + // + // This member is required. + InstanceId *string + + noSmithyDocumentSerde +} + +type DescribeContactFlowModuleOutput struct { + + // Information about the contact flow module. + ContactFlowModule *types.ContactFlowModule + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeContactFlowModuleMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeContactFlowModule{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeContactFlowModule{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDescribeContactFlowModuleValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeContactFlowModule(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeContactFlowModule(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "connect", + OperationName: "DescribeContactFlowModule", + } +} diff --git a/service/connect/api_op_DescribeHoursOfOperation.go b/service/connect/api_op_DescribeHoursOfOperation.go index 4c2e8b8c306..5d9abccade9 100644 --- a/service/connect/api_op_DescribeHoursOfOperation.go +++ b/service/connect/api_op_DescribeHoursOfOperation.go @@ -11,6 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) +// This API is in preview release for Amazon Connect and is subject to change. // Describes the hours of operation. func (c *Client) DescribeHoursOfOperation(ctx context.Context, params *DescribeHoursOfOperationInput, optFns ...func(*Options)) (*DescribeHoursOfOperationOutput, error) { if params == nil { diff --git a/service/connect/api_op_ListContactFlowModules.go b/service/connect/api_op_ListContactFlowModules.go new file mode 100644 index 00000000000..9e180a16c94 --- /dev/null +++ b/service/connect/api_op_ListContactFlowModules.go @@ -0,0 +1,220 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/connect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Provides information about the contact flow modules for the specified Amazon +// Connect instance. +func (c *Client) ListContactFlowModules(ctx context.Context, params *ListContactFlowModulesInput, optFns ...func(*Options)) (*ListContactFlowModulesOutput, error) { + if params == nil { + params = &ListContactFlowModulesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListContactFlowModules", params, optFns, c.addOperationListContactFlowModulesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListContactFlowModulesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListContactFlowModulesInput struct { + + // The identifier of the Amazon Connect instance. You can find the instanceId in + // the ARN of the instance. + // + // This member is required. + InstanceId *string + + // The state of the contact flow module. + ContactFlowModuleState types.ContactFlowModuleState + + // The maximum number of results to return per page. + MaxResults int32 + + // The token for the next set of results. Use the value returned in the previous + // response in the next request to retrieve the next set of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListContactFlowModulesOutput struct { + + // Information about the contact flow module. + ContactFlowModulesSummaryList []types.ContactFlowModuleSummary + + // If there are additional results, this is the token for the next set of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListContactFlowModulesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListContactFlowModules{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListContactFlowModules{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListContactFlowModulesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListContactFlowModules(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListContactFlowModulesAPIClient is a client that implements the +// ListContactFlowModules operation. +type ListContactFlowModulesAPIClient interface { + ListContactFlowModules(context.Context, *ListContactFlowModulesInput, ...func(*Options)) (*ListContactFlowModulesOutput, error) +} + +var _ ListContactFlowModulesAPIClient = (*Client)(nil) + +// ListContactFlowModulesPaginatorOptions is the paginator options for +// ListContactFlowModules +type ListContactFlowModulesPaginatorOptions struct { + // The maximum number of results to return per page. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListContactFlowModulesPaginator is a paginator for ListContactFlowModules +type ListContactFlowModulesPaginator struct { + options ListContactFlowModulesPaginatorOptions + client ListContactFlowModulesAPIClient + params *ListContactFlowModulesInput + nextToken *string + firstPage bool +} + +// NewListContactFlowModulesPaginator returns a new ListContactFlowModulesPaginator +func NewListContactFlowModulesPaginator(client ListContactFlowModulesAPIClient, params *ListContactFlowModulesInput, optFns ...func(*ListContactFlowModulesPaginatorOptions)) *ListContactFlowModulesPaginator { + if params == nil { + params = &ListContactFlowModulesInput{} + } + + options := ListContactFlowModulesPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListContactFlowModulesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListContactFlowModulesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListContactFlowModules page. +func (p *ListContactFlowModulesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListContactFlowModulesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.MaxResults = p.options.Limit + + result, err := p.client.ListContactFlowModules(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListContactFlowModules(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "connect", + OperationName: "ListContactFlowModules", + } +} diff --git a/service/connect/api_op_ListContactReferences.go b/service/connect/api_op_ListContactReferences.go index cb7f7e10d01..94fd927338b 100644 --- a/service/connect/api_op_ListContactReferences.go +++ b/service/connect/api_op_ListContactReferences.go @@ -50,8 +50,8 @@ type ListContactReferencesInput struct { // The token for the next set of results. Use the value returned in the previous // response in the next request to retrieve the next set of results. This is not - // expected to be set since the value returned in the previous response is always - // null. + // expected to be set, because the value returned in the previous response is + // always null. NextToken *string noSmithyDocumentSerde diff --git a/service/connect/api_op_ListIntegrationAssociations.go b/service/connect/api_op_ListIntegrationAssociations.go index 6357f5e7ce9..c48cd96a572 100644 --- a/service/connect/api_op_ListIntegrationAssociations.go +++ b/service/connect/api_op_ListIntegrationAssociations.go @@ -37,7 +37,7 @@ type ListIntegrationAssociationsInput struct { // This member is required. InstanceId *string - // + // The integration type. IntegrationType types.IntegrationType // The maximum number of results to return per page. diff --git a/service/connect/api_op_StartTaskContact.go b/service/connect/api_op_StartTaskContact.go index 3a1e0811de6..124aeb54c7f 100644 --- a/service/connect/api_op_StartTaskContact.go +++ b/service/connect/api_op_StartTaskContact.go @@ -13,8 +13,7 @@ import ( "time" ) -// Initiates a contact flow to start a new task immediately or at a future date and -// time. +// Initiates a contact flow to start a new task. func (c *Client) StartTaskContact(ctx context.Context, params *StartTaskContactInput, optFns ...func(*Options)) (*StartTaskContactOutput, error) { if params == nil { params = &StartTaskContactInput{} diff --git a/service/connect/api_op_UpdateContact.go b/service/connect/api_op_UpdateContact.go index 0cab8288ea4..bf5f3cd6052 100644 --- a/service/connect/api_op_UpdateContact.go +++ b/service/connect/api_op_UpdateContact.go @@ -12,7 +12,7 @@ import ( ) // This API is in preview release for Amazon Connect and is subject to change. Adds -// or updates user defined contact information associated with the specified +// or updates user-defined contact information associated with the specified // contact. At least one field to be updated must be present in the request. You // can add or update user-defined contact information for both ongoing and // completed contacts. diff --git a/service/connect/api_op_UpdateContactFlowMetadata.go b/service/connect/api_op_UpdateContactFlowMetadata.go new file mode 100644 index 00000000000..6d30bb974e9 --- /dev/null +++ b/service/connect/api_op_UpdateContactFlowMetadata.go @@ -0,0 +1,132 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/connect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates metadata about specified contact flow. +func (c *Client) UpdateContactFlowMetadata(ctx context.Context, params *UpdateContactFlowMetadataInput, optFns ...func(*Options)) (*UpdateContactFlowMetadataOutput, error) { + if params == nil { + params = &UpdateContactFlowMetadataInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateContactFlowMetadata", params, optFns, c.addOperationUpdateContactFlowMetadataMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateContactFlowMetadataOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateContactFlowMetadataInput struct { + + // The identifier of the contact flow. + // + // This member is required. + ContactFlowId *string + + // The identifier of the Amazon Connect instance. You can find the instanceId in + // the ARN of the instance. + // + // This member is required. + InstanceId *string + + // The state of contact flow. + ContactFlowState types.ContactFlowState + + // The description of the contact flow. + Description *string + + // TThe name of the contact flow. + Name *string + + noSmithyDocumentSerde +} + +type UpdateContactFlowMetadataOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateContactFlowMetadataMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateContactFlowMetadata{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateContactFlowMetadata{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateContactFlowMetadataValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateContactFlowMetadata(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateContactFlowMetadata(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "connect", + OperationName: "UpdateContactFlowMetadata", + } +} diff --git a/service/connect/api_op_UpdateContactFlowModuleContent.go b/service/connect/api_op_UpdateContactFlowModuleContent.go new file mode 100644 index 00000000000..859e7573a9a --- /dev/null +++ b/service/connect/api_op_UpdateContactFlowModuleContent.go @@ -0,0 +1,127 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates specified contact flow module for the specified Amazon Connect instance. +func (c *Client) UpdateContactFlowModuleContent(ctx context.Context, params *UpdateContactFlowModuleContentInput, optFns ...func(*Options)) (*UpdateContactFlowModuleContentOutput, error) { + if params == nil { + params = &UpdateContactFlowModuleContentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateContactFlowModuleContent", params, optFns, c.addOperationUpdateContactFlowModuleContentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateContactFlowModuleContentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateContactFlowModuleContentInput struct { + + // The identifier of the contact flow module. + // + // This member is required. + ContactFlowModuleId *string + + // The content of the contact flow module. + // + // This member is required. + Content *string + + // The identifier of the Amazon Connect instance. You can find the instanceId in + // the ARN of the instance. + // + // This member is required. + InstanceId *string + + noSmithyDocumentSerde +} + +type UpdateContactFlowModuleContentOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateContactFlowModuleContentMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateContactFlowModuleContent{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateContactFlowModuleContent{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateContactFlowModuleContentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateContactFlowModuleContent(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateContactFlowModuleContent(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "connect", + OperationName: "UpdateContactFlowModuleContent", + } +} diff --git a/service/connect/api_op_UpdateContactFlowModuleMetadata.go b/service/connect/api_op_UpdateContactFlowModuleMetadata.go new file mode 100644 index 00000000000..60ed577bc20 --- /dev/null +++ b/service/connect/api_op_UpdateContactFlowModuleMetadata.go @@ -0,0 +1,132 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package connect + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/connect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates metadata about specified contact flow module. +func (c *Client) UpdateContactFlowModuleMetadata(ctx context.Context, params *UpdateContactFlowModuleMetadataInput, optFns ...func(*Options)) (*UpdateContactFlowModuleMetadataOutput, error) { + if params == nil { + params = &UpdateContactFlowModuleMetadataInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateContactFlowModuleMetadata", params, optFns, c.addOperationUpdateContactFlowModuleMetadataMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateContactFlowModuleMetadataOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateContactFlowModuleMetadataInput struct { + + // The identifier of the contact flow module. + // + // This member is required. + ContactFlowModuleId *string + + // The identifier of the Amazon Connect instance. You can find the instanceId in + // the ARN of the instance. + // + // This member is required. + InstanceId *string + + // The description of the contact flow module. + Description *string + + // The name of the contact flow module. + Name *string + + // The state of contact flow module. + State types.ContactFlowModuleState + + noSmithyDocumentSerde +} + +type UpdateContactFlowModuleMetadataOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateContactFlowModuleMetadataMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateContactFlowModuleMetadata{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateContactFlowModuleMetadata{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateContactFlowModuleMetadataValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateContactFlowModuleMetadata(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateContactFlowModuleMetadata(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "connect", + OperationName: "UpdateContactFlowModuleMetadata", + } +} diff --git a/service/connect/api_op_UpdateHoursOfOperation.go b/service/connect/api_op_UpdateHoursOfOperation.go index fcc88307776..3c0ee729038 100644 --- a/service/connect/api_op_UpdateHoursOfOperation.go +++ b/service/connect/api_op_UpdateHoursOfOperation.go @@ -11,6 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) +// This API is in preview release for Amazon Connect and is subject to change. // Updates the hours of operation. func (c *Client) UpdateHoursOfOperation(ctx context.Context, params *UpdateHoursOfOperationInput, optFns ...func(*Options)) (*UpdateHoursOfOperationOutput, error) { if params == nil { diff --git a/service/connect/deserializers.go b/service/connect/deserializers.go index 018cc860591..3fd5e98bac4 100644 --- a/service/connect/deserializers.go +++ b/service/connect/deserializers.go @@ -1348,6 +1348,193 @@ func awsRestjson1_deserializeOpDocumentCreateContactFlowOutput(v **CreateContact return nil } +type awsRestjson1_deserializeOpCreateContactFlowModule struct { +} + +func (*awsRestjson1_deserializeOpCreateContactFlowModule) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateContactFlowModule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCreateContactFlowModule(response, &metadata) + } + output := &CreateContactFlowModuleOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreateContactFlowModuleOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateContactFlowModule(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("DuplicateResourceException", errorCode): + return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) + + case strings.EqualFold("IdempotencyException", errorCode): + return awsRestjson1_deserializeErrorIdempotencyException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidContactFlowModuleException", errorCode): + return awsRestjson1_deserializeErrorInvalidContactFlowModuleException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateContactFlowModuleOutput(v **CreateContactFlowModuleOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateContactFlowModuleOutput + if *v == nil { + sv = &CreateContactFlowModuleOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContactFlowModuleId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpCreateHoursOfOperation struct { } @@ -3110,14 +3297,14 @@ func awsRestjson1_deserializeOpDocumentCreateUserHierarchyGroupOutput(v **Create return nil } -type awsRestjson1_deserializeOpDeleteHoursOfOperation struct { +type awsRestjson1_deserializeOpDeleteContactFlow struct { } -func (*awsRestjson1_deserializeOpDeleteHoursOfOperation) ID() string { +func (*awsRestjson1_deserializeOpDeleteContactFlow) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteHoursOfOperation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteContactFlow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3131,9 +3318,9 @@ func (m *awsRestjson1_deserializeOpDeleteHoursOfOperation) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteHoursOfOperation(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteContactFlow(response, &metadata) } - output := &DeleteHoursOfOperationOutput{} + output := &DeleteContactFlowOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -3145,7 +3332,7 @@ func (m *awsRestjson1_deserializeOpDeleteHoursOfOperation) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteHoursOfOperation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteContactFlow(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3186,6 +3373,9 @@ func awsRestjson1_deserializeOpErrorDeleteHoursOfOperation(response *smithyhttp. } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -3211,14 +3401,14 @@ func awsRestjson1_deserializeOpErrorDeleteHoursOfOperation(response *smithyhttp. } } -type awsRestjson1_deserializeOpDeleteInstance struct { +type awsRestjson1_deserializeOpDeleteContactFlowModule struct { } -func (*awsRestjson1_deserializeOpDeleteInstance) ID() string { +func (*awsRestjson1_deserializeOpDeleteContactFlowModule) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteContactFlowModule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3232,21 +3422,15 @@ func (m *awsRestjson1_deserializeOpDeleteInstance) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteInstance(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteContactFlowModule(response, &metadata) } - output := &DeleteInstanceOutput{} + output := &DeleteContactFlowModuleOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteContactFlowModule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3287,15 +3471,24 @@ func awsRestjson1_deserializeOpErrorDeleteInstance(response *smithyhttp.Response } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3306,14 +3499,14 @@ func awsRestjson1_deserializeOpErrorDeleteInstance(response *smithyhttp.Response } } -type awsRestjson1_deserializeOpDeleteIntegrationAssociation struct { +type awsRestjson1_deserializeOpDeleteHoursOfOperation struct { } -func (*awsRestjson1_deserializeOpDeleteIntegrationAssociation) ID() string { +func (*awsRestjson1_deserializeOpDeleteHoursOfOperation) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteIntegrationAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteHoursOfOperation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3327,9 +3520,9 @@ func (m *awsRestjson1_deserializeOpDeleteIntegrationAssociation) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteIntegrationAssociation(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteHoursOfOperation(response, &metadata) } - output := &DeleteIntegrationAssociationOutput{} + output := &DeleteHoursOfOperationOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -3341,7 +3534,7 @@ func (m *awsRestjson1_deserializeOpDeleteIntegrationAssociation) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteIntegrationAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteHoursOfOperation(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3385,6 +3578,9 @@ func awsRestjson1_deserializeOpErrorDeleteIntegrationAssociation(response *smith case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) @@ -3404,14 +3600,14 @@ func awsRestjson1_deserializeOpErrorDeleteIntegrationAssociation(response *smith } } -type awsRestjson1_deserializeOpDeleteQuickConnect struct { +type awsRestjson1_deserializeOpDeleteInstance struct { } -func (*awsRestjson1_deserializeOpDeleteQuickConnect) ID() string { +func (*awsRestjson1_deserializeOpDeleteInstance) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteQuickConnect) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3425,9 +3621,9 @@ func (m *awsRestjson1_deserializeOpDeleteQuickConnect) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteQuickConnect(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteInstance(response, &metadata) } - output := &DeleteQuickConnectOutput{} + output := &DeleteInstanceOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -3439,7 +3635,7 @@ func (m *awsRestjson1_deserializeOpDeleteQuickConnect) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteQuickConnect(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3483,18 +3679,12 @@ func awsRestjson1_deserializeOpErrorDeleteQuickConnect(response *smithyhttp.Resp case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): - return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3505,14 +3695,14 @@ func awsRestjson1_deserializeOpErrorDeleteQuickConnect(response *smithyhttp.Resp } } -type awsRestjson1_deserializeOpDeleteSecurityProfile struct { +type awsRestjson1_deserializeOpDeleteIntegrationAssociation struct { } -func (*awsRestjson1_deserializeOpDeleteSecurityProfile) ID() string { +func (*awsRestjson1_deserializeOpDeleteIntegrationAssociation) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteSecurityProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteIntegrationAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3526,9 +3716,9 @@ func (m *awsRestjson1_deserializeOpDeleteSecurityProfile) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteSecurityProfile(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteIntegrationAssociation(response, &metadata) } - output := &DeleteSecurityProfileOutput{} + output := &DeleteIntegrationAssociationOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -3540,7 +3730,7 @@ func (m *awsRestjson1_deserializeOpDeleteSecurityProfile) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteSecurityProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteIntegrationAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3581,21 +3771,220 @@ func awsRestjson1_deserializeOpErrorDeleteSecurityProfile(response *smithyhttp.R } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("ResourceInUseException", errorCode): - return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) - + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteQuickConnect struct { +} + +func (*awsRestjson1_deserializeOpDeleteQuickConnect) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteQuickConnect) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteQuickConnect(response, &metadata) + } + output := &DeleteQuickConnectOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteQuickConnect(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteSecurityProfile struct { +} + +func (*awsRestjson1_deserializeOpDeleteSecurityProfile) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteSecurityProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteSecurityProfile(response, &metadata) + } + output := &DeleteSecurityProfileOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteSecurityProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceInUseException", errorCode): + return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -4395,14 +4784,14 @@ func awsRestjson1_deserializeOpDocumentDescribeContactFlowOutput(v **DescribeCon return nil } -type awsRestjson1_deserializeOpDescribeHoursOfOperation struct { +type awsRestjson1_deserializeOpDescribeContactFlowModule struct { } -func (*awsRestjson1_deserializeOpDescribeHoursOfOperation) ID() string { +func (*awsRestjson1_deserializeOpDescribeContactFlowModule) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeHoursOfOperation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeContactFlowModule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4416,9 +4805,9 @@ func (m *awsRestjson1_deserializeOpDescribeHoursOfOperation) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeHoursOfOperation(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeContactFlowModule(response, &metadata) } - output := &DescribeHoursOfOperationOutput{} + output := &DescribeContactFlowModuleOutput{} out.Result = output var buff [1024]byte @@ -4439,7 +4828,7 @@ func (m *awsRestjson1_deserializeOpDescribeHoursOfOperation) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeHoursOfOperationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeContactFlowModuleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4452,7 +4841,7 @@ func (m *awsRestjson1_deserializeOpDescribeHoursOfOperation) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeHoursOfOperation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeContactFlowModule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4493,6 +4882,9 @@ func awsRestjson1_deserializeOpErrorDescribeHoursOfOperation(response *smithyhtt } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -4518,7 +4910,7 @@ func awsRestjson1_deserializeOpErrorDescribeHoursOfOperation(response *smithyhtt } } -func awsRestjson1_deserializeOpDocumentDescribeHoursOfOperationOutput(v **DescribeHoursOfOperationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeContactFlowModuleOutput(v **DescribeContactFlowModuleOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4531,17 +4923,17 @@ func awsRestjson1_deserializeOpDocumentDescribeHoursOfOperationOutput(v **Descri return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeHoursOfOperationOutput + var sv *DescribeContactFlowModuleOutput if *v == nil { - sv = &DescribeHoursOfOperationOutput{} + sv = &DescribeContactFlowModuleOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "HoursOfOperation": - if err := awsRestjson1_deserializeDocumentHoursOfOperation(&sv.HoursOfOperation, value); err != nil { + case "ContactFlowModule": + if err := awsRestjson1_deserializeDocumentContactFlowModule(&sv.ContactFlowModule, value); err != nil { return err } @@ -4554,14 +4946,14 @@ func awsRestjson1_deserializeOpDocumentDescribeHoursOfOperationOutput(v **Descri return nil } -type awsRestjson1_deserializeOpDescribeInstance struct { +type awsRestjson1_deserializeOpDescribeHoursOfOperation struct { } -func (*awsRestjson1_deserializeOpDescribeInstance) ID() string { +func (*awsRestjson1_deserializeOpDescribeHoursOfOperation) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeHoursOfOperation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4575,9 +4967,9 @@ func (m *awsRestjson1_deserializeOpDescribeInstance) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeInstance(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeHoursOfOperation(response, &metadata) } - output := &DescribeInstanceOutput{} + output := &DescribeHoursOfOperationOutput{} out.Result = output var buff [1024]byte @@ -4598,7 +4990,7 @@ func (m *awsRestjson1_deserializeOpDescribeInstance) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeInstanceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeHoursOfOperationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4611,7 +5003,7 @@ func (m *awsRestjson1_deserializeOpDescribeInstance) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeHoursOfOperation(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4655,12 +5047,18 @@ func awsRestjson1_deserializeOpErrorDescribeInstance(response *smithyhttp.Respon case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -4671,7 +5069,7 @@ func awsRestjson1_deserializeOpErrorDescribeInstance(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentDescribeInstanceOutput(v **DescribeInstanceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeHoursOfOperationOutput(v **DescribeHoursOfOperationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4684,17 +5082,17 @@ func awsRestjson1_deserializeOpDocumentDescribeInstanceOutput(v **DescribeInstan return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeInstanceOutput + var sv *DescribeHoursOfOperationOutput if *v == nil { - sv = &DescribeInstanceOutput{} + sv = &DescribeHoursOfOperationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Instance": - if err := awsRestjson1_deserializeDocumentInstance(&sv.Instance, value); err != nil { + case "HoursOfOperation": + if err := awsRestjson1_deserializeDocumentHoursOfOperation(&sv.HoursOfOperation, value); err != nil { return err } @@ -4707,10 +5105,163 @@ func awsRestjson1_deserializeOpDocumentDescribeInstanceOutput(v **DescribeInstan return nil } -type awsRestjson1_deserializeOpDescribeInstanceAttribute struct { +type awsRestjson1_deserializeOpDescribeInstance struct { } -func (*awsRestjson1_deserializeOpDescribeInstanceAttribute) ID() string { +func (*awsRestjson1_deserializeOpDescribeInstance) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDescribeInstance(response, &metadata) + } + output := &DescribeInstanceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDescribeInstanceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeInstanceOutput(v **DescribeInstanceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeInstanceOutput + if *v == nil { + sv = &DescribeInstanceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Instance": + if err := awsRestjson1_deserializeDocumentInstance(&sv.Instance, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeInstanceAttribute struct { +} + +func (*awsRestjson1_deserializeOpDescribeInstanceAttribute) ID() string { return "OperationDeserializer" } @@ -8111,14 +8662,14 @@ func awsRestjson1_deserializeOpDocumentListBotsOutput(v **ListBotsOutput, value return nil } -type awsRestjson1_deserializeOpListContactFlows struct { +type awsRestjson1_deserializeOpListContactFlowModules struct { } -func (*awsRestjson1_deserializeOpListContactFlows) ID() string { +func (*awsRestjson1_deserializeOpListContactFlowModules) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListContactFlows) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListContactFlowModules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8132,9 +8683,9 @@ func (m *awsRestjson1_deserializeOpListContactFlows) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListContactFlows(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListContactFlowModules(response, &metadata) } - output := &ListContactFlowsOutput{} + output := &ListContactFlowModulesOutput{} out.Result = output var buff [1024]byte @@ -8155,7 +8706,7 @@ func (m *awsRestjson1_deserializeOpListContactFlows) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListContactFlowsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListContactFlowModulesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8168,7 +8719,7 @@ func (m *awsRestjson1_deserializeOpListContactFlows) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorListContactFlows(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListContactFlowModules(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8209,6 +8760,9 @@ func awsRestjson1_deserializeOpErrorListContactFlows(response *smithyhttp.Respon } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -8234,7 +8788,7 @@ func awsRestjson1_deserializeOpErrorListContactFlows(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentListContactFlowsOutput(v **ListContactFlowsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListContactFlowModulesOutput(v **ListContactFlowModulesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8247,17 +8801,17 @@ func awsRestjson1_deserializeOpDocumentListContactFlowsOutput(v **ListContactFlo return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListContactFlowsOutput + var sv *ListContactFlowModulesOutput if *v == nil { - sv = &ListContactFlowsOutput{} + sv = &ListContactFlowModulesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ContactFlowSummaryList": - if err := awsRestjson1_deserializeDocumentContactFlowSummaryList(&sv.ContactFlowSummaryList, value); err != nil { + case "ContactFlowModulesSummaryList": + if err := awsRestjson1_deserializeDocumentContactFlowModulesSummaryList(&sv.ContactFlowModulesSummaryList, value); err != nil { return err } @@ -8279,14 +8833,14 @@ func awsRestjson1_deserializeOpDocumentListContactFlowsOutput(v **ListContactFlo return nil } -type awsRestjson1_deserializeOpListContactReferences struct { +type awsRestjson1_deserializeOpListContactFlows struct { } -func (*awsRestjson1_deserializeOpListContactReferences) ID() string { +func (*awsRestjson1_deserializeOpListContactFlows) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListContactReferences) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListContactFlows) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8300,9 +8854,9 @@ func (m *awsRestjson1_deserializeOpListContactReferences) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListContactReferences(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListContactFlows(response, &metadata) } - output := &ListContactReferencesOutput{} + output := &ListContactFlowsOutput{} out.Result = output var buff [1024]byte @@ -8323,7 +8877,7 @@ func (m *awsRestjson1_deserializeOpListContactReferences) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListContactReferencesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListContactFlowsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8336,7 +8890,7 @@ func (m *awsRestjson1_deserializeOpListContactReferences) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListContactReferences(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListContactFlows(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8402,7 +8956,7 @@ func awsRestjson1_deserializeOpErrorListContactReferences(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentListContactReferencesOutput(v **ListContactReferencesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListContactFlowsOutput(v **ListContactFlowsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8415,15 +8969,20 @@ func awsRestjson1_deserializeOpDocumentListContactReferencesOutput(v **ListConta return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListContactReferencesOutput + var sv *ListContactFlowsOutput if *v == nil { - sv = &ListContactReferencesOutput{} + sv = &ListContactFlowsOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "ContactFlowSummaryList": + if err := awsRestjson1_deserializeDocumentContactFlowSummaryList(&sv.ContactFlowSummaryList, value); err != nil { + return err + } + case "NextToken": if value != nil { jtv, ok := value.(string) @@ -8433,11 +8992,6 @@ func awsRestjson1_deserializeOpDocumentListContactReferencesOutput(v **ListConta sv.NextToken = ptr.String(jtv) } - case "ReferenceSummaryList": - if err := awsRestjson1_deserializeDocumentReferenceSummaryList(&sv.ReferenceSummaryList, value); err != nil { - return err - } - default: _, _ = key, value @@ -8447,14 +9001,14 @@ func awsRestjson1_deserializeOpDocumentListContactReferencesOutput(v **ListConta return nil } -type awsRestjson1_deserializeOpListHoursOfOperations struct { +type awsRestjson1_deserializeOpListContactReferences struct { } -func (*awsRestjson1_deserializeOpListHoursOfOperations) ID() string { +func (*awsRestjson1_deserializeOpListContactReferences) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListHoursOfOperations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListContactReferences) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8468,9 +9022,9 @@ func (m *awsRestjson1_deserializeOpListHoursOfOperations) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListHoursOfOperations(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListContactReferences(response, &metadata) } - output := &ListHoursOfOperationsOutput{} + output := &ListContactReferencesOutput{} out.Result = output var buff [1024]byte @@ -8491,7 +9045,7 @@ func (m *awsRestjson1_deserializeOpListHoursOfOperations) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListHoursOfOperationsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListContactReferencesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8504,7 +9058,7 @@ func (m *awsRestjson1_deserializeOpListHoursOfOperations) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListHoursOfOperations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListContactReferences(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8570,7 +9124,7 @@ func awsRestjson1_deserializeOpErrorListHoursOfOperations(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentListHoursOfOperationsOutput(v **ListHoursOfOperationsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListContactReferencesOutput(v **ListContactReferencesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8583,20 +9137,15 @@ func awsRestjson1_deserializeOpDocumentListHoursOfOperationsOutput(v **ListHours return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListHoursOfOperationsOutput + var sv *ListContactReferencesOutput if *v == nil { - sv = &ListHoursOfOperationsOutput{} + sv = &ListContactReferencesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "HoursOfOperationSummaryList": - if err := awsRestjson1_deserializeDocumentHoursOfOperationSummaryList(&sv.HoursOfOperationSummaryList, value); err != nil { - return err - } - case "NextToken": if value != nil { jtv, ok := value.(string) @@ -8606,6 +9155,11 @@ func awsRestjson1_deserializeOpDocumentListHoursOfOperationsOutput(v **ListHours sv.NextToken = ptr.String(jtv) } + case "ReferenceSummaryList": + if err := awsRestjson1_deserializeDocumentReferenceSummaryList(&sv.ReferenceSummaryList, value); err != nil { + return err + } + default: _, _ = key, value @@ -8615,14 +9169,14 @@ func awsRestjson1_deserializeOpDocumentListHoursOfOperationsOutput(v **ListHours return nil } -type awsRestjson1_deserializeOpListInstanceAttributes struct { +type awsRestjson1_deserializeOpListHoursOfOperations struct { } -func (*awsRestjson1_deserializeOpListInstanceAttributes) ID() string { +func (*awsRestjson1_deserializeOpListHoursOfOperations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListInstanceAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListHoursOfOperations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8636,9 +9190,9 @@ func (m *awsRestjson1_deserializeOpListInstanceAttributes) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListInstanceAttributes(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListHoursOfOperations(response, &metadata) } - output := &ListInstanceAttributesOutput{} + output := &ListHoursOfOperationsOutput{} out.Result = output var buff [1024]byte @@ -8659,7 +9213,7 @@ func (m *awsRestjson1_deserializeOpListInstanceAttributes) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListInstanceAttributesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListHoursOfOperationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8672,7 +9226,7 @@ func (m *awsRestjson1_deserializeOpListInstanceAttributes) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListInstanceAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListHoursOfOperations(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8738,7 +9292,7 @@ func awsRestjson1_deserializeOpErrorListInstanceAttributes(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentListInstanceAttributesOutput(v **ListInstanceAttributesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListHoursOfOperationsOutput(v **ListHoursOfOperationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8751,17 +9305,17 @@ func awsRestjson1_deserializeOpDocumentListInstanceAttributesOutput(v **ListInst return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListInstanceAttributesOutput + var sv *ListHoursOfOperationsOutput if *v == nil { - sv = &ListInstanceAttributesOutput{} + sv = &ListHoursOfOperationsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Attributes": - if err := awsRestjson1_deserializeDocumentAttributesList(&sv.Attributes, value); err != nil { + case "HoursOfOperationSummaryList": + if err := awsRestjson1_deserializeDocumentHoursOfOperationSummaryList(&sv.HoursOfOperationSummaryList, value); err != nil { return err } @@ -8783,10 +9337,178 @@ func awsRestjson1_deserializeOpDocumentListInstanceAttributesOutput(v **ListInst return nil } -type awsRestjson1_deserializeOpListInstances struct { +type awsRestjson1_deserializeOpListInstanceAttributes struct { } -func (*awsRestjson1_deserializeOpListInstances) ID() string { +func (*awsRestjson1_deserializeOpListInstanceAttributes) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListInstanceAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListInstanceAttributes(response, &metadata) + } + output := &ListInstanceAttributesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListInstanceAttributesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListInstanceAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListInstanceAttributesOutput(v **ListInstanceAttributesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListInstanceAttributesOutput + if *v == nil { + sv = &ListInstanceAttributesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Attributes": + if err := awsRestjson1_deserializeDocumentAttributesList(&sv.Attributes, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListInstances struct { +} + +func (*awsRestjson1_deserializeOpListInstances) ID() string { return "OperationDeserializer" } @@ -13776,14 +14498,14 @@ func awsRestjson1_deserializeOpErrorUpdateContactFlowContent(response *smithyhtt } } -type awsRestjson1_deserializeOpUpdateContactFlowName struct { +type awsRestjson1_deserializeOpUpdateContactFlowMetadata struct { } -func (*awsRestjson1_deserializeOpUpdateContactFlowName) ID() string { +func (*awsRestjson1_deserializeOpUpdateContactFlowMetadata) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateContactFlowName) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateContactFlowMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -13797,9 +14519,9 @@ func (m *awsRestjson1_deserializeOpUpdateContactFlowName) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactFlowName(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactFlowMetadata(response, &metadata) } - output := &UpdateContactFlowNameOutput{} + output := &UpdateContactFlowMetadataOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -13811,7 +14533,7 @@ func (m *awsRestjson1_deserializeOpUpdateContactFlowName) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateContactFlowName(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateContactFlowMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -13880,14 +14602,14 @@ func awsRestjson1_deserializeOpErrorUpdateContactFlowName(response *smithyhttp.R } } -type awsRestjson1_deserializeOpUpdateContactSchedule struct { +type awsRestjson1_deserializeOpUpdateContactFlowModuleContent struct { } -func (*awsRestjson1_deserializeOpUpdateContactSchedule) ID() string { +func (*awsRestjson1_deserializeOpUpdateContactFlowModuleContent) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateContactSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateContactFlowModuleContent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -13901,15 +14623,15 @@ func (m *awsRestjson1_deserializeOpUpdateContactSchedule) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactSchedule(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactFlowModuleContent(response, &metadata) } - output := &UpdateContactScheduleOutput{} + output := &UpdateContactFlowModuleContentOutput{} out.Result = output return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateContactSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateContactFlowModuleContent(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -13950,18 +14672,18 @@ func awsRestjson1_deserializeOpErrorUpdateContactSchedule(response *smithyhttp.R } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidContactFlowModuleException", errorCode): + return awsRestjson1_deserializeErrorInvalidContactFlowModuleException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -13978,14 +14700,14 @@ func awsRestjson1_deserializeOpErrorUpdateContactSchedule(response *smithyhttp.R } } -type awsRestjson1_deserializeOpUpdateHoursOfOperation struct { +type awsRestjson1_deserializeOpUpdateContactFlowModuleMetadata struct { } -func (*awsRestjson1_deserializeOpUpdateHoursOfOperation) ID() string { +func (*awsRestjson1_deserializeOpUpdateContactFlowModuleMetadata) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateHoursOfOperation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateContactFlowModuleMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -13999,21 +14721,15 @@ func (m *awsRestjson1_deserializeOpUpdateHoursOfOperation) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateHoursOfOperation(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactFlowModuleMetadata(response, &metadata) } - output := &UpdateHoursOfOperationOutput{} + output := &UpdateContactFlowModuleMetadataOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateHoursOfOperation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateContactFlowModuleMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -14054,6 +14770,9 @@ func awsRestjson1_deserializeOpErrorUpdateHoursOfOperation(response *smithyhttp. } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("DuplicateResourceException", errorCode): return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) @@ -14082,14 +14801,14 @@ func awsRestjson1_deserializeOpErrorUpdateHoursOfOperation(response *smithyhttp. } } -type awsRestjson1_deserializeOpUpdateInstanceAttribute struct { +type awsRestjson1_deserializeOpUpdateContactFlowName struct { } -func (*awsRestjson1_deserializeOpUpdateInstanceAttribute) ID() string { +func (*awsRestjson1_deserializeOpUpdateContactFlowName) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateInstanceAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateContactFlowName) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -14103,9 +14822,9 @@ func (m *awsRestjson1_deserializeOpUpdateInstanceAttribute) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateInstanceAttribute(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactFlowName(response, &metadata) } - output := &UpdateInstanceAttributeOutput{} + output := &UpdateContactFlowNameOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -14117,7 +14836,7 @@ func (m *awsRestjson1_deserializeOpUpdateInstanceAttribute) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateInstanceAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateContactFlowName(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -14158,6 +14877,9 @@ func awsRestjson1_deserializeOpErrorUpdateInstanceAttribute(response *smithyhttp } switch { + case strings.EqualFold("DuplicateResourceException", errorCode): + return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -14183,14 +14905,14 @@ func awsRestjson1_deserializeOpErrorUpdateInstanceAttribute(response *smithyhttp } } -type awsRestjson1_deserializeOpUpdateInstanceStorageConfig struct { +type awsRestjson1_deserializeOpUpdateContactSchedule struct { } -func (*awsRestjson1_deserializeOpUpdateInstanceStorageConfig) ID() string { +func (*awsRestjson1_deserializeOpUpdateContactSchedule) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateInstanceStorageConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateContactSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -14204,21 +14926,15 @@ func (m *awsRestjson1_deserializeOpUpdateInstanceStorageConfig) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateInstanceStorageConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateContactSchedule(response, &metadata) } - output := &UpdateInstanceStorageConfigOutput{} + output := &UpdateContactScheduleOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateInstanceStorageConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateContactSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -14268,6 +14984,9 @@ func awsRestjson1_deserializeOpErrorUpdateInstanceStorageConfig(response *smithy case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -14284,14 +15003,14 @@ func awsRestjson1_deserializeOpErrorUpdateInstanceStorageConfig(response *smithy } } -type awsRestjson1_deserializeOpUpdateQueueHoursOfOperation struct { +type awsRestjson1_deserializeOpUpdateHoursOfOperation struct { } -func (*awsRestjson1_deserializeOpUpdateQueueHoursOfOperation) ID() string { +func (*awsRestjson1_deserializeOpUpdateHoursOfOperation) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateQueueHoursOfOperation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateHoursOfOperation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -14305,9 +15024,9 @@ func (m *awsRestjson1_deserializeOpUpdateQueueHoursOfOperation) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateQueueHoursOfOperation(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateHoursOfOperation(response, &metadata) } - output := &UpdateQueueHoursOfOperationOutput{} + output := &UpdateHoursOfOperationOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -14319,7 +15038,7 @@ func (m *awsRestjson1_deserializeOpUpdateQueueHoursOfOperation) HandleDeserializ return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateQueueHoursOfOperation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateHoursOfOperation(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -14360,6 +15079,9 @@ func awsRestjson1_deserializeOpErrorUpdateQueueHoursOfOperation(response *smithy } switch { + case strings.EqualFold("DuplicateResourceException", errorCode): + return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -14385,14 +15107,14 @@ func awsRestjson1_deserializeOpErrorUpdateQueueHoursOfOperation(response *smithy } } -type awsRestjson1_deserializeOpUpdateQueueMaxContacts struct { +type awsRestjson1_deserializeOpUpdateInstanceAttribute struct { } -func (*awsRestjson1_deserializeOpUpdateQueueMaxContacts) ID() string { +func (*awsRestjson1_deserializeOpUpdateInstanceAttribute) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateQueueMaxContacts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateInstanceAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -14406,9 +15128,9 @@ func (m *awsRestjson1_deserializeOpUpdateQueueMaxContacts) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateQueueMaxContacts(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateInstanceAttribute(response, &metadata) } - output := &UpdateQueueMaxContactsOutput{} + output := &UpdateInstanceAttributeOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -14420,7 +15142,7 @@ func (m *awsRestjson1_deserializeOpUpdateQueueMaxContacts) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateQueueMaxContacts(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateInstanceAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -14486,14 +15208,14 @@ func awsRestjson1_deserializeOpErrorUpdateQueueMaxContacts(response *smithyhttp. } } -type awsRestjson1_deserializeOpUpdateQueueName struct { +type awsRestjson1_deserializeOpUpdateInstanceStorageConfig struct { } -func (*awsRestjson1_deserializeOpUpdateQueueName) ID() string { +func (*awsRestjson1_deserializeOpUpdateInstanceStorageConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateQueueName) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateInstanceStorageConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -14507,9 +15229,9 @@ func (m *awsRestjson1_deserializeOpUpdateQueueName) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateQueueName(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateInstanceStorageConfig(response, &metadata) } - output := &UpdateQueueNameOutput{} + output := &UpdateInstanceStorageConfigOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -14521,7 +15243,7 @@ func (m *awsRestjson1_deserializeOpUpdateQueueName) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateQueueName(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateInstanceStorageConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -14562,9 +15284,6 @@ func awsRestjson1_deserializeOpErrorUpdateQueueName(response *smithyhttp.Respons } switch { - case strings.EqualFold("DuplicateResourceException", errorCode): - return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -14590,14 +15309,14 @@ func awsRestjson1_deserializeOpErrorUpdateQueueName(response *smithyhttp.Respons } } -type awsRestjson1_deserializeOpUpdateQueueOutboundCallerConfig struct { +type awsRestjson1_deserializeOpUpdateQueueHoursOfOperation struct { } -func (*awsRestjson1_deserializeOpUpdateQueueOutboundCallerConfig) ID() string { +func (*awsRestjson1_deserializeOpUpdateQueueHoursOfOperation) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateQueueOutboundCallerConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateQueueHoursOfOperation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -14611,9 +15330,9 @@ func (m *awsRestjson1_deserializeOpUpdateQueueOutboundCallerConfig) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateQueueOutboundCallerConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateQueueHoursOfOperation(response, &metadata) } - output := &UpdateQueueOutboundCallerConfigOutput{} + output := &UpdateQueueHoursOfOperationOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -14625,7 +15344,7 @@ func (m *awsRestjson1_deserializeOpUpdateQueueOutboundCallerConfig) HandleDeseri return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateQueueOutboundCallerConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateQueueHoursOfOperation(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -14691,14 +15410,14 @@ func awsRestjson1_deserializeOpErrorUpdateQueueOutboundCallerConfig(response *sm } } -type awsRestjson1_deserializeOpUpdateQueueStatus struct { +type awsRestjson1_deserializeOpUpdateQueueMaxContacts struct { } -func (*awsRestjson1_deserializeOpUpdateQueueStatus) ID() string { +func (*awsRestjson1_deserializeOpUpdateQueueMaxContacts) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateQueueStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateQueueMaxContacts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -14712,9 +15431,9 @@ func (m *awsRestjson1_deserializeOpUpdateQueueStatus) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateQueueStatus(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateQueueMaxContacts(response, &metadata) } - output := &UpdateQueueStatusOutput{} + output := &UpdateQueueMaxContactsOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -14726,7 +15445,7 @@ func (m *awsRestjson1_deserializeOpUpdateQueueStatus) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateQueueStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateQueueMaxContacts(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -14792,14 +15511,14 @@ func awsRestjson1_deserializeOpErrorUpdateQueueStatus(response *smithyhttp.Respo } } -type awsRestjson1_deserializeOpUpdateQuickConnectConfig struct { +type awsRestjson1_deserializeOpUpdateQueueName struct { } -func (*awsRestjson1_deserializeOpUpdateQuickConnectConfig) ID() string { +func (*awsRestjson1_deserializeOpUpdateQueueName) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateQuickConnectConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateQueueName) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -14813,9 +15532,9 @@ func (m *awsRestjson1_deserializeOpUpdateQuickConnectConfig) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateQuickConnectConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateQueueName(response, &metadata) } - output := &UpdateQuickConnectConfigOutput{} + output := &UpdateQueueNameOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -14827,7 +15546,7 @@ func (m *awsRestjson1_deserializeOpUpdateQuickConnectConfig) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateQuickConnectConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateQueueName(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -14868,6 +15587,9 @@ func awsRestjson1_deserializeOpErrorUpdateQuickConnectConfig(response *smithyhtt } switch { + case strings.EqualFold("DuplicateResourceException", errorCode): + return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -14893,14 +15615,14 @@ func awsRestjson1_deserializeOpErrorUpdateQuickConnectConfig(response *smithyhtt } } -type awsRestjson1_deserializeOpUpdateQuickConnectName struct { +type awsRestjson1_deserializeOpUpdateQueueOutboundCallerConfig struct { } -func (*awsRestjson1_deserializeOpUpdateQuickConnectName) ID() string { +func (*awsRestjson1_deserializeOpUpdateQueueOutboundCallerConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateQuickConnectName) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateQueueOutboundCallerConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -14914,9 +15636,9 @@ func (m *awsRestjson1_deserializeOpUpdateQuickConnectName) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateQuickConnectName(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateQueueOutboundCallerConfig(response, &metadata) } - output := &UpdateQuickConnectNameOutput{} + output := &UpdateQueueOutboundCallerConfigOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -14928,7 +15650,7 @@ func (m *awsRestjson1_deserializeOpUpdateQuickConnectName) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateQuickConnectName(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateQueueOutboundCallerConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -14994,14 +15716,14 @@ func awsRestjson1_deserializeOpErrorUpdateQuickConnectName(response *smithyhttp. } } -type awsRestjson1_deserializeOpUpdateRoutingProfileConcurrency struct { +type awsRestjson1_deserializeOpUpdateQueueStatus struct { } -func (*awsRestjson1_deserializeOpUpdateRoutingProfileConcurrency) ID() string { +func (*awsRestjson1_deserializeOpUpdateQueueStatus) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateRoutingProfileConcurrency) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateQueueStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -15015,9 +15737,9 @@ func (m *awsRestjson1_deserializeOpUpdateRoutingProfileConcurrency) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateRoutingProfileConcurrency(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateQueueStatus(response, &metadata) } - output := &UpdateRoutingProfileConcurrencyOutput{} + output := &UpdateQueueStatusOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -15029,7 +15751,7 @@ func (m *awsRestjson1_deserializeOpUpdateRoutingProfileConcurrency) HandleDeseri return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateRoutingProfileConcurrency(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateQueueStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -15095,14 +15817,14 @@ func awsRestjson1_deserializeOpErrorUpdateRoutingProfileConcurrency(response *sm } } -type awsRestjson1_deserializeOpUpdateRoutingProfileDefaultOutboundQueue struct { +type awsRestjson1_deserializeOpUpdateQuickConnectConfig struct { } -func (*awsRestjson1_deserializeOpUpdateRoutingProfileDefaultOutboundQueue) ID() string { +func (*awsRestjson1_deserializeOpUpdateQuickConnectConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateRoutingProfileDefaultOutboundQueue) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateQuickConnectConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -15116,9 +15838,9 @@ func (m *awsRestjson1_deserializeOpUpdateRoutingProfileDefaultOutboundQueue) Han } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateRoutingProfileDefaultOutboundQueue(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateQuickConnectConfig(response, &metadata) } - output := &UpdateRoutingProfileDefaultOutboundQueueOutput{} + output := &UpdateQuickConnectConfigOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -15130,7 +15852,7 @@ func (m *awsRestjson1_deserializeOpUpdateRoutingProfileDefaultOutboundQueue) Han return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateRoutingProfileDefaultOutboundQueue(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateQuickConnectConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -15196,14 +15918,14 @@ func awsRestjson1_deserializeOpErrorUpdateRoutingProfileDefaultOutboundQueue(res } } -type awsRestjson1_deserializeOpUpdateRoutingProfileName struct { +type awsRestjson1_deserializeOpUpdateQuickConnectName struct { } -func (*awsRestjson1_deserializeOpUpdateRoutingProfileName) ID() string { +func (*awsRestjson1_deserializeOpUpdateQuickConnectName) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateRoutingProfileName) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateQuickConnectName) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -15217,9 +15939,9 @@ func (m *awsRestjson1_deserializeOpUpdateRoutingProfileName) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateRoutingProfileName(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateQuickConnectName(response, &metadata) } - output := &UpdateRoutingProfileNameOutput{} + output := &UpdateQuickConnectNameOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -15231,7 +15953,7 @@ func (m *awsRestjson1_deserializeOpUpdateRoutingProfileName) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateRoutingProfileName(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateQuickConnectName(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -15272,9 +15994,6 @@ func awsRestjson1_deserializeOpErrorUpdateRoutingProfileName(response *smithyhtt } switch { - case strings.EqualFold("DuplicateResourceException", errorCode): - return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -15300,14 +16019,14 @@ func awsRestjson1_deserializeOpErrorUpdateRoutingProfileName(response *smithyhtt } } -type awsRestjson1_deserializeOpUpdateRoutingProfileQueues struct { +type awsRestjson1_deserializeOpUpdateRoutingProfileConcurrency struct { } -func (*awsRestjson1_deserializeOpUpdateRoutingProfileQueues) ID() string { +func (*awsRestjson1_deserializeOpUpdateRoutingProfileConcurrency) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateRoutingProfileQueues) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateRoutingProfileConcurrency) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -15321,9 +16040,9 @@ func (m *awsRestjson1_deserializeOpUpdateRoutingProfileQueues) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateRoutingProfileQueues(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateRoutingProfileConcurrency(response, &metadata) } - output := &UpdateRoutingProfileQueuesOutput{} + output := &UpdateRoutingProfileConcurrencyOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -15335,7 +16054,7 @@ func (m *awsRestjson1_deserializeOpUpdateRoutingProfileQueues) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateRoutingProfileQueues(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateRoutingProfileConcurrency(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -15401,14 +16120,14 @@ func awsRestjson1_deserializeOpErrorUpdateRoutingProfileQueues(response *smithyh } } -type awsRestjson1_deserializeOpUpdateSecurityProfile struct { +type awsRestjson1_deserializeOpUpdateRoutingProfileDefaultOutboundQueue struct { } -func (*awsRestjson1_deserializeOpUpdateSecurityProfile) ID() string { +func (*awsRestjson1_deserializeOpUpdateRoutingProfileDefaultOutboundQueue) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateSecurityProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateRoutingProfileDefaultOutboundQueue) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -15422,9 +16141,9 @@ func (m *awsRestjson1_deserializeOpUpdateSecurityProfile) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateSecurityProfile(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateRoutingProfileDefaultOutboundQueue(response, &metadata) } - output := &UpdateSecurityProfileOutput{} + output := &UpdateRoutingProfileDefaultOutboundQueueOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -15436,7 +16155,7 @@ func (m *awsRestjson1_deserializeOpUpdateSecurityProfile) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateSecurityProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateRoutingProfileDefaultOutboundQueue(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -15502,14 +16221,14 @@ func awsRestjson1_deserializeOpErrorUpdateSecurityProfile(response *smithyhttp.R } } -type awsRestjson1_deserializeOpUpdateUserHierarchy struct { +type awsRestjson1_deserializeOpUpdateRoutingProfileName struct { } -func (*awsRestjson1_deserializeOpUpdateUserHierarchy) ID() string { +func (*awsRestjson1_deserializeOpUpdateRoutingProfileName) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateUserHierarchy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateRoutingProfileName) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -15523,9 +16242,9 @@ func (m *awsRestjson1_deserializeOpUpdateUserHierarchy) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateUserHierarchy(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateRoutingProfileName(response, &metadata) } - output := &UpdateUserHierarchyOutput{} + output := &UpdateRoutingProfileNameOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -15537,7 +16256,7 @@ func (m *awsRestjson1_deserializeOpUpdateUserHierarchy) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateUserHierarchy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateRoutingProfileName(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -15578,6 +16297,9 @@ func awsRestjson1_deserializeOpErrorUpdateUserHierarchy(response *smithyhttp.Res } switch { + case strings.EqualFold("DuplicateResourceException", errorCode): + return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -15603,14 +16325,14 @@ func awsRestjson1_deserializeOpErrorUpdateUserHierarchy(response *smithyhttp.Res } } -type awsRestjson1_deserializeOpUpdateUserHierarchyGroupName struct { +type awsRestjson1_deserializeOpUpdateRoutingProfileQueues struct { } -func (*awsRestjson1_deserializeOpUpdateUserHierarchyGroupName) ID() string { +func (*awsRestjson1_deserializeOpUpdateRoutingProfileQueues) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateUserHierarchyGroupName) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateRoutingProfileQueues) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -15624,9 +16346,9 @@ func (m *awsRestjson1_deserializeOpUpdateUserHierarchyGroupName) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateUserHierarchyGroupName(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateRoutingProfileQueues(response, &metadata) } - output := &UpdateUserHierarchyGroupNameOutput{} + output := &UpdateRoutingProfileQueuesOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -15638,7 +16360,7 @@ func (m *awsRestjson1_deserializeOpUpdateUserHierarchyGroupName) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateUserHierarchyGroupName(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateRoutingProfileQueues(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -15679,9 +16401,6 @@ func awsRestjson1_deserializeOpErrorUpdateUserHierarchyGroupName(response *smith } switch { - case strings.EqualFold("DuplicateResourceException", errorCode): - return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -15707,14 +16426,14 @@ func awsRestjson1_deserializeOpErrorUpdateUserHierarchyGroupName(response *smith } } -type awsRestjson1_deserializeOpUpdateUserHierarchyStructure struct { +type awsRestjson1_deserializeOpUpdateSecurityProfile struct { } -func (*awsRestjson1_deserializeOpUpdateUserHierarchyStructure) ID() string { +func (*awsRestjson1_deserializeOpUpdateSecurityProfile) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateUserHierarchyStructure) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateSecurityProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -15728,9 +16447,9 @@ func (m *awsRestjson1_deserializeOpUpdateUserHierarchyStructure) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateUserHierarchyStructure(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateSecurityProfile(response, &metadata) } - output := &UpdateUserHierarchyStructureOutput{} + output := &UpdateSecurityProfileOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -15742,7 +16461,7 @@ func (m *awsRestjson1_deserializeOpUpdateUserHierarchyStructure) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateUserHierarchyStructure(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateSecurityProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -15792,9 +16511,6 @@ func awsRestjson1_deserializeOpErrorUpdateUserHierarchyStructure(response *smith case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("ResourceInUseException", errorCode): - return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -15811,14 +16527,14 @@ func awsRestjson1_deserializeOpErrorUpdateUserHierarchyStructure(response *smith } } -type awsRestjson1_deserializeOpUpdateUserIdentityInfo struct { +type awsRestjson1_deserializeOpUpdateUserHierarchy struct { } -func (*awsRestjson1_deserializeOpUpdateUserIdentityInfo) ID() string { +func (*awsRestjson1_deserializeOpUpdateUserHierarchy) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateUserIdentityInfo) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateUserHierarchy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -15832,9 +16548,9 @@ func (m *awsRestjson1_deserializeOpUpdateUserIdentityInfo) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateUserIdentityInfo(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateUserHierarchy(response, &metadata) } - output := &UpdateUserIdentityInfoOutput{} + output := &UpdateUserHierarchyOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -15846,7 +16562,7 @@ func (m *awsRestjson1_deserializeOpUpdateUserIdentityInfo) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateUserIdentityInfo(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateUserHierarchy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -15912,14 +16628,14 @@ func awsRestjson1_deserializeOpErrorUpdateUserIdentityInfo(response *smithyhttp. } } -type awsRestjson1_deserializeOpUpdateUserPhoneConfig struct { +type awsRestjson1_deserializeOpUpdateUserHierarchyGroupName struct { } -func (*awsRestjson1_deserializeOpUpdateUserPhoneConfig) ID() string { +func (*awsRestjson1_deserializeOpUpdateUserHierarchyGroupName) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateUserPhoneConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateUserHierarchyGroupName) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -15933,9 +16649,9 @@ func (m *awsRestjson1_deserializeOpUpdateUserPhoneConfig) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateUserPhoneConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateUserHierarchyGroupName(response, &metadata) } - output := &UpdateUserPhoneConfigOutput{} + output := &UpdateUserHierarchyGroupNameOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -15947,7 +16663,7 @@ func (m *awsRestjson1_deserializeOpUpdateUserPhoneConfig) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateUserPhoneConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateUserHierarchyGroupName(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -15988,6 +16704,9 @@ func awsRestjson1_deserializeOpErrorUpdateUserPhoneConfig(response *smithyhttp.R } switch { + case strings.EqualFold("DuplicateResourceException", errorCode): + return awsRestjson1_deserializeErrorDuplicateResourceException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) @@ -16013,14 +16732,14 @@ func awsRestjson1_deserializeOpErrorUpdateUserPhoneConfig(response *smithyhttp.R } } -type awsRestjson1_deserializeOpUpdateUserRoutingProfile struct { +type awsRestjson1_deserializeOpUpdateUserHierarchyStructure struct { } -func (*awsRestjson1_deserializeOpUpdateUserRoutingProfile) ID() string { +func (*awsRestjson1_deserializeOpUpdateUserHierarchyStructure) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateUserRoutingProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateUserHierarchyStructure) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -16034,9 +16753,9 @@ func (m *awsRestjson1_deserializeOpUpdateUserRoutingProfile) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateUserRoutingProfile(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateUserHierarchyStructure(response, &metadata) } - output := &UpdateUserRoutingProfileOutput{} + output := &UpdateUserHierarchyStructureOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -16048,7 +16767,7 @@ func (m *awsRestjson1_deserializeOpUpdateUserRoutingProfile) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateUserRoutingProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateUserHierarchyStructure(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -16098,6 +16817,9 @@ func awsRestjson1_deserializeOpErrorUpdateUserRoutingProfile(response *smithyhtt case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("ResourceInUseException", errorCode): + return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -16114,14 +16836,14 @@ func awsRestjson1_deserializeOpErrorUpdateUserRoutingProfile(response *smithyhtt } } -type awsRestjson1_deserializeOpUpdateUserSecurityProfiles struct { +type awsRestjson1_deserializeOpUpdateUserIdentityInfo struct { } -func (*awsRestjson1_deserializeOpUpdateUserSecurityProfiles) ID() string { +func (*awsRestjson1_deserializeOpUpdateUserIdentityInfo) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateUserSecurityProfiles) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateUserIdentityInfo) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -16135,9 +16857,9 @@ func (m *awsRestjson1_deserializeOpUpdateUserSecurityProfiles) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateUserSecurityProfiles(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateUserIdentityInfo(response, &metadata) } - output := &UpdateUserSecurityProfilesOutput{} + output := &UpdateUserIdentityInfoOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -16149,7 +16871,7 @@ func (m *awsRestjson1_deserializeOpUpdateUserSecurityProfiles) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateUserSecurityProfiles(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateUserIdentityInfo(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -16215,99 +16937,63 @@ func awsRestjson1_deserializeOpErrorUpdateUserSecurityProfiles(response *smithyh } } -func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.AccessDeniedException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) +type awsRestjson1_deserializeOpUpdateUserPhoneConfig struct { +} - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) +func (*awsRestjson1_deserializeOpUpdateUserPhoneConfig) ID() string { + return "OperationDeserializer" +} +func (m *awsRestjson1_deserializeOpUpdateUserPhoneConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - - return output -} + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } -func awsRestjson1_deserializeErrorContactFlowNotPublishedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ContactFlowNotPublishedException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateUserPhoneConfig(response, &metadata) + } + output := &UpdateUserPhoneConfigOutput{} + out.Result = output - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), } - return err } - err := awsRestjson1_deserializeDocumentContactFlowNotPublishedException(&output, shape) + return out, metadata, err +} - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err +func awsRestjson1_deserializeOpErrorUpdateUserPhoneConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } + errorBody := bytes.NewReader(errorBuffer.Bytes()) - errorBody.Seek(0, io.SeekStart) + errorCode := "UnknownError" + errorMessage := errorCode - return output -} + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } -func awsRestjson1_deserializeErrorContactNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ContactNotFoundException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentContactNotFoundException(&output, shape) - + code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -16319,139 +17005,96 @@ func awsRestjson1_deserializeErrorContactNotFoundException(response *smithyhttp. } errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } - return output -} + switch { + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) -func awsRestjson1_deserializeErrorDestinationNotAllowedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.DestinationNotAllowedException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - err := awsRestjson1_deserializeDocumentDestinationNotAllowedException(&output, shape) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - errorBody.Seek(0, io.SeekStart) +type awsRestjson1_deserializeOpUpdateUserRoutingProfile struct { +} - return output +func (*awsRestjson1_deserializeOpUpdateUserRoutingProfile) ID() string { + return "OperationDeserializer" } -func awsRestjson1_deserializeErrorDuplicateResourceException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.DuplicateResourceException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) +func (m *awsRestjson1_deserializeOpUpdateUserRoutingProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } - err := awsRestjson1_deserializeDocumentDuplicateResourceException(&output, shape) + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateUserRoutingProfile(response, &metadata) + } + output := &UpdateUserRoutingProfileOutput{} + out.Result = output - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), } - return err } - errorBody.Seek(0, io.SeekStart) - - return output + return out, metadata, err } -func awsRestjson1_deserializeErrorInternalServiceException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InternalServiceException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err +func awsRestjson1_deserializeOpErrorUpdateUserRoutingProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } + errorBody := bytes.NewReader(errorBuffer.Bytes()) - err := awsRestjson1_deserializeDocumentInternalServiceException(&output, shape) + errorCode := "UnknownError" + errorMessage := errorCode - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) } - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorInvalidContactFlowException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidContactFlowException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentInvalidContactFlowException(&output, shape) - + code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -16463,12 +17106,142 @@ func awsRestjson1_deserializeErrorInvalidContactFlowException(response *smithyht } errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidParameterException{} + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUpdateUserSecurityProfiles struct { +} + +func (*awsRestjson1_deserializeOpUpdateUserSecurityProfiles) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateUserSecurityProfiles) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateUserSecurityProfiles(response, &metadata) + } + output := &UpdateUserSecurityProfilesOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateUserSecurityProfiles(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDeniedException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -16486,7 +17259,7 @@ func awsRestjson1_deserializeErrorInvalidParameterException(response *smithyhttp return err } - err := awsRestjson1_deserializeDocumentInvalidParameterException(&output, shape) + err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -16503,8 +17276,8 @@ func awsRestjson1_deserializeErrorInvalidParameterException(response *smithyhttp return output } -func awsRestjson1_deserializeErrorInvalidRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidRequestException{} +func awsRestjson1_deserializeErrorContactFlowNotPublishedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ContactFlowNotPublishedException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -16522,7 +17295,7 @@ func awsRestjson1_deserializeErrorInvalidRequestException(response *smithyhttp.R return err } - err := awsRestjson1_deserializeDocumentInvalidRequestException(&output, shape) + err := awsRestjson1_deserializeDocumentContactFlowNotPublishedException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -16539,8 +17312,8 @@ func awsRestjson1_deserializeErrorInvalidRequestException(response *smithyhttp.R return output } -func awsRestjson1_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.LimitExceededException{} +func awsRestjson1_deserializeErrorContactNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ContactNotFoundException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -16558,7 +17331,7 @@ func awsRestjson1_deserializeErrorLimitExceededException(response *smithyhttp.Re return err } - err := awsRestjson1_deserializeDocumentLimitExceededException(&output, shape) + err := awsRestjson1_deserializeDocumentContactNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -16575,8 +17348,8 @@ func awsRestjson1_deserializeErrorLimitExceededException(response *smithyhttp.Re return output } -func awsRestjson1_deserializeErrorOutboundContactNotPermittedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.OutboundContactNotPermittedException{} +func awsRestjson1_deserializeErrorDestinationNotAllowedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DestinationNotAllowedException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -16594,7 +17367,7 @@ func awsRestjson1_deserializeErrorOutboundContactNotPermittedException(response return err } - err := awsRestjson1_deserializeDocumentOutboundContactNotPermittedException(&output, shape) + err := awsRestjson1_deserializeDocumentDestinationNotAllowedException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -16611,8 +17384,8 @@ func awsRestjson1_deserializeErrorOutboundContactNotPermittedException(response return output } -func awsRestjson1_deserializeErrorResourceConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ResourceConflictException{} +func awsRestjson1_deserializeErrorDuplicateResourceException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DuplicateResourceException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -16630,7 +17403,7 @@ func awsRestjson1_deserializeErrorResourceConflictException(response *smithyhttp return err } - err := awsRestjson1_deserializeDocumentResourceConflictException(&output, shape) + err := awsRestjson1_deserializeDocumentDuplicateResourceException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -16647,8 +17420,8 @@ func awsRestjson1_deserializeErrorResourceConflictException(response *smithyhttp return output } -func awsRestjson1_deserializeErrorResourceInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ResourceInUseException{} +func awsRestjson1_deserializeErrorIdempotencyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.IdempotencyException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -16666,7 +17439,7 @@ func awsRestjson1_deserializeErrorResourceInUseException(response *smithyhttp.Re return err } - err := awsRestjson1_deserializeDocumentResourceInUseException(&output, shape) + err := awsRestjson1_deserializeDocumentIdempotencyException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -16683,8 +17456,8 @@ func awsRestjson1_deserializeErrorResourceInUseException(response *smithyhttp.Re return output } -func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ResourceNotFoundException{} +func awsRestjson1_deserializeErrorInternalServiceException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalServiceException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -16702,7 +17475,7 @@ func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp return err } - err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) + err := awsRestjson1_deserializeDocumentInternalServiceException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -16719,8 +17492,8 @@ func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp return output } -func awsRestjson1_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ServiceQuotaExceededException{} +func awsRestjson1_deserializeErrorInvalidContactFlowException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidContactFlowException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -16738,7 +17511,7 @@ func awsRestjson1_deserializeErrorServiceQuotaExceededException(response *smithy return err } - err := awsRestjson1_deserializeDocumentServiceQuotaExceededException(&output, shape) + err := awsRestjson1_deserializeDocumentInvalidContactFlowException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -16755,8 +17528,8 @@ func awsRestjson1_deserializeErrorServiceQuotaExceededException(response *smithy return output } -func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ThrottlingException{} +func awsRestjson1_deserializeErrorInvalidContactFlowModuleException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidContactFlowModuleException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -16774,7 +17547,7 @@ func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Respo return err } - err := awsRestjson1_deserializeDocumentThrottlingException(&output, shape) + err := awsRestjson1_deserializeDocumentInvalidContactFlowModuleException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -16791,8 +17564,44 @@ func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Respo return output } -func awsRestjson1_deserializeErrorUserNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.UserNotFoundException{} +func awsRestjson1_deserializeErrorInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidParameterException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentInvalidParameterException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorInvalidRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidRequestException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -16810,24 +17619,612 @@ func awsRestjson1_deserializeErrorUserNotFoundException(response *smithyhttp.Res return err } - err := awsRestjson1_deserializeDocumentUserNotFoundException(&output, shape) + err := awsRestjson1_deserializeDocumentInvalidRequestException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.LimitExceededException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentLimitExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorOutboundContactNotPermittedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.OutboundContactNotPermittedException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentOutboundContactNotPermittedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorResourceConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceConflictException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentResourceConflictException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorResourceInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceInUseException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentResourceInUseException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceNotFoundException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServiceQuotaExceededException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentServiceQuotaExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ThrottlingException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentThrottlingException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorUserNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.UserNotFoundException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentUserNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAgentInfo(v **types.AgentInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AgentInfo + if *v == nil { + sv = &types.AgentInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ConnectedToAgentTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ConnectedToAgentTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AgentResourceId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAgentStatus(v **types.AgentStatus, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AgentStatus + if *v == nil { + sv = &types.AgentStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AgentStatusARN": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.AgentStatusARN = ptr.String(jtv) + } + + case "AgentStatusId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AgentStatusId to be of type string, got %T instead", value) + } + sv.AgentStatusId = ptr.String(jtv) + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AgentStatusDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "DisplayOrder": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected AgentStatusOrderNumber to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DisplayOrder = ptr.Int32(int32(i64)) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AgentStatusName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AgentStatusState to be of type string, got %T instead", value) + } + sv.State = types.AgentStatusState(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AgentStatusType to be of type string, got %T instead", value) + } + sv.Type = types.AgentStatusType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAgentStatusSummary(v **types.AgentStatusSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AgentStatusSummary + if *v == nil { + sv = &types.AgentStatusSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AgentStatusId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AgentStatusName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AgentStatusType to be of type string, got %T instead", value) + } + sv.Type = types.AgentStatusType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAgentStatusSummaryList(v *[]types.AgentStatusSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + var cv []types.AgentStatusSummary + if *v == nil { + cv = []types.AgentStatusSummary{} + } else { + cv = *v } - errorBody.Seek(0, io.SeekStart) + for _, value := range shape { + var col types.AgentStatusSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentAgentStatusSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) - return output + } + *v = cv + return nil } -func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { +func awsRestjson1_deserializeDocumentAttachmentReference(v **types.AttachmentReference, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -16840,22 +18237,40 @@ func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDenie return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AccessDeniedException + var sv *types.AttachmentReference if *v == nil { - sv = &types.AccessDeniedException{} + sv = &types.AttachmentReference{} } else { sv = *v } for key, value := range shape { switch key { - case "Message": + case "Name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Message to be of type string, got %T instead", value) + return fmt.Errorf("expected ReferenceKey to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.Name = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReferenceStatus to be of type string, got %T instead", value) + } + sv.Status = types.ReferenceStatus(jtv) + } + + case "Value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReferenceValue to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) } default: @@ -16867,7 +18282,7 @@ func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDenie return nil } -func awsRestjson1_deserializeDocumentAgentInfo(v **types.AgentInfo, value interface{}) error { +func awsRestjson1_deserializeDocumentAttribute(v **types.Attribute, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -16880,38 +18295,31 @@ func awsRestjson1_deserializeDocumentAgentInfo(v **types.AgentInfo, value interf return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AgentInfo + var sv *types.Attribute if *v == nil { - sv = &types.AgentInfo{} + sv = &types.Attribute{} } else { sv = *v } for key, value := range shape { switch key { - case "ConnectedToAgentTimestamp": + case "AttributeType": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.ConnectedToAgentTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceAttributeType to be of type string, got %T instead", value) } + sv.AttributeType = types.InstanceAttributeType(jtv) } - case "Id": + case "Value": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AgentResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected InstanceAttributeValue to be of type string, got %T instead", value) } - sv.Id = ptr.String(jtv) + sv.Value = ptr.String(jtv) } default: @@ -16923,7 +18331,7 @@ func awsRestjson1_deserializeDocumentAgentInfo(v **types.AgentInfo, value interf return nil } -func awsRestjson1_deserializeDocumentAgentStatus(v **types.AgentStatus, value interface{}) error { +func awsRestjson1_deserializeDocumentAttributes(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -16936,85 +18344,229 @@ func awsRestjson1_deserializeDocumentAgentStatus(v **types.AgentStatus, value in return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AgentStatus + var mv map[string]string if *v == nil { - sv = &types.AgentStatus{} + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttributeValue to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentAttributesList(v *[]types.Attribute, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Attribute + if *v == nil { + cv = []types.Attribute{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Attribute + destAddr := &col + if err := awsRestjson1_deserializeDocumentAttribute(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentContact(v **types.Contact, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Contact + if *v == nil { + sv = &types.Contact{} } else { sv = *v } for key, value := range shape { switch key { - case "AgentStatusARN": + case "AgentInfo": + if err := awsRestjson1_deserializeDocumentAgentInfo(&sv.AgentInfo, value); err != nil { + return err + } + + case "Arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ARN to be of type string, got %T instead", value) } - sv.AgentStatusARN = ptr.String(jtv) + sv.Arn = ptr.String(jtv) } - case "AgentStatusId": + case "Channel": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AgentStatusId to be of type string, got %T instead", value) + return fmt.Errorf("expected Channel to be of type string, got %T instead", value) } - sv.AgentStatusId = ptr.String(jtv) + sv.Channel = types.Channel(jtv) } case "Description": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AgentStatusDescription to be of type string, got %T instead", value) + return fmt.Errorf("expected Description to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } - case "DisplayOrder": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected AgentStatusOrderNumber to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + case "DisconnectTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.DisconnectTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContactId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "InitialContactId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContactId to be of type string, got %T instead", value) + } + sv.InitialContactId = ptr.String(jtv) + } + + case "InitiationMethod": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContactInitiationMethod to be of type string, got %T instead", value) + } + sv.InitiationMethod = types.ContactInitiationMethod(jtv) + } + + case "InitiationTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.InitiationTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "LastUpdateTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdateTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + } - sv.DisplayOrder = ptr.Int32(int32(i64)) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AgentStatusName to be of type string, got %T instead", value) + return fmt.Errorf("expected Name to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } - case "State": + case "PreviousContactId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AgentStatusState to be of type string, got %T instead", value) + return fmt.Errorf("expected ContactId to be of type string, got %T instead", value) } - sv.State = types.AgentStatusState(jtv) + sv.PreviousContactId = ptr.String(jtv) } - case "Tags": - if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + case "QueueInfo": + if err := awsRestjson1_deserializeDocumentQueueInfo(&sv.QueueInfo, value); err != nil { return err } - case "Type": + case "ScheduledTimestamp": if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AgentStatusType to be of type string, got %T instead", value) + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ScheduledTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + } - sv.Type = types.AgentStatusType(jtv) } default: @@ -17026,7 +18578,7 @@ func awsRestjson1_deserializeDocumentAgentStatus(v **types.AgentStatus, value in return nil } -func awsRestjson1_deserializeDocumentAgentStatusSummary(v **types.AgentStatusSummary, value interface{}) error { +func awsRestjson1_deserializeDocumentContactFlow(v **types.ContactFlow, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17039,9 +18591,9 @@ func awsRestjson1_deserializeDocumentAgentStatusSummary(v **types.AgentStatusSum return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AgentStatusSummary + var sv *types.ContactFlow if *v == nil { - sv = &types.AgentStatusSummary{} + sv = &types.ContactFlow{} } else { sv = *v } @@ -17057,254 +18609,75 @@ func awsRestjson1_deserializeDocumentAgentStatusSummary(v **types.AgentStatusSum sv.Arn = ptr.String(jtv) } - case "Id": + case "Content": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AgentStatusId to be of type string, got %T instead", value) + return fmt.Errorf("expected ContactFlowContent to be of type string, got %T instead", value) } - sv.Id = ptr.String(jtv) + sv.Content = ptr.String(jtv) } - case "Name": + case "Description": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AgentStatusName to be of type string, got %T instead", value) + return fmt.Errorf("expected ContactFlowDescription to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.Description = ptr.String(jtv) } - case "Type": + case "Id": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AgentStatusType to be of type string, got %T instead", value) + return fmt.Errorf("expected ContactFlowId to be of type string, got %T instead", value) } - sv.Type = types.AgentStatusType(jtv) + sv.Id = ptr.String(jtv) } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentAgentStatusSummaryList(v *[]types.AgentStatusSummary, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.AgentStatusSummary - if *v == nil { - cv = []types.AgentStatusSummary{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.AgentStatusSummary - destAddr := &col - if err := awsRestjson1_deserializeDocumentAgentStatusSummary(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentAttachmentReference(v **types.AttachmentReference, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.AttachmentReference - if *v == nil { - sv = &types.AttachmentReference{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { case "Name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ReferenceKey to be of type string, got %T instead", value) + return fmt.Errorf("expected ContactFlowName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } - case "Status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ReferenceStatus to be of type string, got %T instead", value) - } - sv.Status = types.ReferenceStatus(jtv) - } - - case "Value": + case "State": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ReferenceValue to be of type string, got %T instead", value) + return fmt.Errorf("expected ContactFlowState to be of type string, got %T instead", value) } - sv.Value = ptr.String(jtv) + sv.State = types.ContactFlowState(jtv) } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentAttribute(v **types.Attribute, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.Attribute - if *v == nil { - sv = &types.Attribute{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AttributeType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected InstanceAttributeType to be of type string, got %T instead", value) - } - sv.AttributeType = types.InstanceAttributeType(jtv) + case "Tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err } - case "Value": + case "Type": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected InstanceAttributeValue to be of type string, got %T instead", value) + return fmt.Errorf("expected ContactFlowType to be of type string, got %T instead", value) } - sv.Value = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentAttributes(v *map[string]string, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var mv map[string]string - if *v == nil { - mv = map[string]string{} - } else { - mv = *v - } - - for key, value := range shape { - var parsedVal string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AttributeValue to be of type string, got %T instead", value) - } - parsedVal = jtv - } - mv[key] = parsedVal - - } - *v = mv - return nil -} - -func awsRestjson1_deserializeDocumentAttributesList(v *[]types.Attribute, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.Attribute - if *v == nil { - cv = []types.Attribute{} - } else { - cv = *v - } + sv.Type = types.ContactFlowType(jtv) + } - for _, value := range shape { - var col types.Attribute - destAddr := &col - if err := awsRestjson1_deserializeDocumentAttribute(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocumentContact(v **types.Contact, value interface{}) error { +func awsRestjson1_deserializeDocumentContactFlowModule(v **types.ContactFlowModule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17317,20 +18690,15 @@ func awsRestjson1_deserializeDocumentContact(v **types.Contact, value interface{ return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Contact + var sv *types.ContactFlowModule if *v == nil { - sv = &types.Contact{} + sv = &types.ContactFlowModule{} } else { sv = *v } for key, value := range shape { switch key { - case "AgentInfo": - if err := awsRestjson1_deserializeDocumentAgentInfo(&sv.AgentInfo, value); err != nil { - return err - } - case "Arn": if value != nil { jtv, ok := value.(string) @@ -17340,138 +18708,65 @@ func awsRestjson1_deserializeDocumentContact(v **types.Contact, value interface{ sv.Arn = ptr.String(jtv) } - case "Channel": + case "Content": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Channel to be of type string, got %T instead", value) + return fmt.Errorf("expected ContactFlowModuleContent to be of type string, got %T instead", value) } - sv.Channel = types.Channel(jtv) + sv.Content = ptr.String(jtv) } case "Description": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Description to be of type string, got %T instead", value) + return fmt.Errorf("expected ContactFlowModuleDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } - case "DisconnectTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.DisconnectTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - case "Id": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ContactId to be of type string, got %T instead", value) + return fmt.Errorf("expected ContactFlowModuleId to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } - case "InitialContactId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ContactId to be of type string, got %T instead", value) - } - sv.InitialContactId = ptr.String(jtv) - } - - case "InitiationMethod": + case "Name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ContactInitiationMethod to be of type string, got %T instead", value) - } - sv.InitiationMethod = types.ContactInitiationMethod(jtv) - } - - case "InitiationTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.InitiationTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "LastUpdateTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastUpdateTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - + return fmt.Errorf("expected ContactFlowModuleName to be of type string, got %T instead", value) } + sv.Name = ptr.String(jtv) } - case "Name": + case "State": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Name to be of type string, got %T instead", value) + return fmt.Errorf("expected ContactFlowModuleState to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.State = types.ContactFlowModuleState(jtv) } - case "PreviousContactId": + case "Status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ContactId to be of type string, got %T instead", value) + return fmt.Errorf("expected ContactFlowModuleStatus to be of type string, got %T instead", value) } - sv.PreviousContactId = ptr.String(jtv) + sv.Status = types.ContactFlowModuleStatus(jtv) } - case "QueueInfo": - if err := awsRestjson1_deserializeDocumentQueueInfo(&sv.QueueInfo, value); err != nil { + case "Tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err } - case "ScheduledTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.ScheduledTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - default: _, _ = key, value @@ -17481,7 +18776,41 @@ func awsRestjson1_deserializeDocumentContact(v **types.Contact, value interface{ return nil } -func awsRestjson1_deserializeDocumentContactFlow(v **types.ContactFlow, value interface{}) error { +func awsRestjson1_deserializeDocumentContactFlowModulesSummaryList(v *[]types.ContactFlowModuleSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ContactFlowModuleSummary + if *v == nil { + cv = []types.ContactFlowModuleSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ContactFlowModuleSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentContactFlowModuleSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentContactFlowModuleSummary(v **types.ContactFlowModuleSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17494,9 +18823,9 @@ func awsRestjson1_deserializeDocumentContactFlow(v **types.ContactFlow, value in return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ContactFlow + var sv *types.ContactFlowModuleSummary if *v == nil { - sv = &types.ContactFlow{} + sv = &types.ContactFlowModuleSummary{} } else { sv = *v } @@ -17512,29 +18841,11 @@ func awsRestjson1_deserializeDocumentContactFlow(v **types.ContactFlow, value in sv.Arn = ptr.String(jtv) } - case "Content": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ContactFlowContent to be of type string, got %T instead", value) - } - sv.Content = ptr.String(jtv) - } - - case "Description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ContactFlowDescription to be of type string, got %T instead", value) - } - sv.Description = ptr.String(jtv) - } - case "Id": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ContactFlowId to be of type string, got %T instead", value) + return fmt.Errorf("expected ContactFlowModuleId to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } @@ -17543,23 +18854,18 @@ func awsRestjson1_deserializeDocumentContactFlow(v **types.ContactFlow, value in if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ContactFlowName to be of type string, got %T instead", value) + return fmt.Errorf("expected ContactFlowModuleName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } - case "Tags": - if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { - return err - } - - case "Type": + case "State": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ContactFlowType to be of type string, got %T instead", value) + return fmt.Errorf("expected ContactFlowModuleState to be of type string, got %T instead", value) } - sv.Type = types.ContactFlowType(jtv) + sv.State = types.ContactFlowModuleState(jtv) } default: @@ -17642,6 +18948,15 @@ func awsRestjson1_deserializeDocumentContactFlowSummary(v **types.ContactFlowSum sv.Arn = ptr.String(jtv) } + case "ContactFlowState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContactFlowState to be of type string, got %T instead", value) + } + sv.ContactFlowState = types.ContactFlowState(jtv) + } + case "ContactFlowType": if value != nil { jtv, ok := value.(string) @@ -19166,6 +20481,46 @@ func awsRestjson1_deserializeDocumentHoursOfOperationTimeSlice(v **types.HoursOf return nil } +func awsRestjson1_deserializeDocumentIdempotencyException(v **types.IdempotencyException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.IdempotencyException + if *v == nil { + sv = &types.IdempotencyException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentInstance(v **types.Instance, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -19799,6 +21154,42 @@ func awsRestjson1_deserializeDocumentInvalidContactFlowException(v **types.Inval return nil } +func awsRestjson1_deserializeDocumentInvalidContactFlowModuleException(v **types.InvalidContactFlowModuleException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidContactFlowModuleException + if *v == nil { + sv = &types.InvalidContactFlowModuleException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Problems": + if err := awsRestjson1_deserializeDocumentProblems(&sv.Problems, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentInvalidParameterException(v **types.InvalidParameterException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/connect/generated.json b/service/connect/generated.json index 44917a1b043..7652943d858 100644 --- a/service/connect/generated.json +++ b/service/connect/generated.json @@ -17,6 +17,7 @@ "api_op_AssociateSecurityKey.go", "api_op_CreateAgentStatus.go", "api_op_CreateContactFlow.go", + "api_op_CreateContactFlowModule.go", "api_op_CreateHoursOfOperation.go", "api_op_CreateInstance.go", "api_op_CreateIntegrationAssociation.go", @@ -27,6 +28,8 @@ "api_op_CreateUseCase.go", "api_op_CreateUser.go", "api_op_CreateUserHierarchyGroup.go", + "api_op_DeleteContactFlow.go", + "api_op_DeleteContactFlowModule.go", "api_op_DeleteHoursOfOperation.go", "api_op_DeleteInstance.go", "api_op_DeleteIntegrationAssociation.go", @@ -38,6 +41,7 @@ "api_op_DescribeAgentStatus.go", "api_op_DescribeContact.go", "api_op_DescribeContactFlow.go", + "api_op_DescribeContactFlowModule.go", "api_op_DescribeHoursOfOperation.go", "api_op_DescribeInstance.go", "api_op_DescribeInstanceAttribute.go", @@ -64,6 +68,7 @@ "api_op_ListAgentStatuses.go", "api_op_ListApprovedOrigins.go", "api_op_ListBots.go", + "api_op_ListContactFlowModules.go", "api_op_ListContactFlows.go", "api_op_ListContactReferences.go", "api_op_ListHoursOfOperations.go", @@ -103,6 +108,9 @@ "api_op_UpdateContact.go", "api_op_UpdateContactAttributes.go", "api_op_UpdateContactFlowContent.go", + "api_op_UpdateContactFlowMetadata.go", + "api_op_UpdateContactFlowModuleContent.go", + "api_op_UpdateContactFlowModuleMetadata.go", "api_op_UpdateContactFlowName.go", "api_op_UpdateContactSchedule.go", "api_op_UpdateHoursOfOperation.go", diff --git a/service/connect/serializers.go b/service/connect/serializers.go index e39b8c6ced3..d46bcfbd701 100644 --- a/service/connect/serializers.go +++ b/service/connect/serializers.go @@ -910,6 +910,109 @@ func awsRestjson1_serializeOpDocumentCreateContactFlowInput(v *CreateContactFlow return nil } +type awsRestjson1_serializeOpCreateContactFlowModule struct { +} + +func (*awsRestjson1_serializeOpCreateContactFlowModule) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateContactFlowModule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateContactFlowModuleInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/contact-flow-modules/{InstanceId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateContactFlowModuleInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateContactFlowModuleInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateContactFlowModuleInput(v *CreateContactFlowModuleInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.InstanceId == nil || len(*v.InstanceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InstanceId must not be empty")} + } + if v.InstanceId != nil { + if err := encoder.SetURI("InstanceId").String(*v.InstanceId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateContactFlowModuleInput(v *CreateContactFlowModuleInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if v.Content != nil { + ok := object.Key("Content") + ok.String(*v.Content) + } + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCreateHoursOfOperation struct { } @@ -1957,6 +2060,140 @@ func awsRestjson1_serializeOpDocumentCreateUserHierarchyGroupInput(v *CreateUser return nil } +type awsRestjson1_serializeOpDeleteContactFlow struct { +} + +func (*awsRestjson1_serializeOpDeleteContactFlow) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteContactFlow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteContactFlowInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/contact-flows/{InstanceId}/{ContactFlowId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteContactFlowInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteContactFlowInput(v *DeleteContactFlowInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ContactFlowId == nil || len(*v.ContactFlowId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ContactFlowId must not be empty")} + } + if v.ContactFlowId != nil { + if err := encoder.SetURI("ContactFlowId").String(*v.ContactFlowId); err != nil { + return err + } + } + + if v.InstanceId == nil || len(*v.InstanceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InstanceId must not be empty")} + } + if v.InstanceId != nil { + if err := encoder.SetURI("InstanceId").String(*v.InstanceId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteContactFlowModule struct { +} + +func (*awsRestjson1_serializeOpDeleteContactFlowModule) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteContactFlowModule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteContactFlowModuleInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/contact-flow-modules/{InstanceId}/{ContactFlowModuleId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteContactFlowModuleInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteContactFlowModuleInput(v *DeleteContactFlowModuleInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ContactFlowModuleId == nil || len(*v.ContactFlowModuleId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ContactFlowModuleId must not be empty")} + } + if v.ContactFlowModuleId != nil { + if err := encoder.SetURI("ContactFlowModuleId").String(*v.ContactFlowModuleId); err != nil { + return err + } + } + + if v.InstanceId == nil || len(*v.InstanceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InstanceId must not be empty")} + } + if v.InstanceId != nil { + if err := encoder.SetURI("InstanceId").String(*v.InstanceId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDeleteHoursOfOperation struct { } @@ -2694,6 +2931,73 @@ func awsRestjson1_serializeOpHttpBindingsDescribeContactFlowInput(v *DescribeCon return nil } +type awsRestjson1_serializeOpDescribeContactFlowModule struct { +} + +func (*awsRestjson1_serializeOpDescribeContactFlowModule) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeContactFlowModule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeContactFlowModuleInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/contact-flow-modules/{InstanceId}/{ContactFlowModuleId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeContactFlowModuleInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeContactFlowModuleInput(v *DescribeContactFlowModuleInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ContactFlowModuleId == nil || len(*v.ContactFlowModuleId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ContactFlowModuleId must not be empty")} + } + if v.ContactFlowModuleId != nil { + if err := encoder.SetURI("ContactFlowModuleId").String(*v.ContactFlowModuleId); err != nil { + return err + } + } + + if v.InstanceId == nil || len(*v.InstanceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InstanceId must not be empty")} + } + if v.InstanceId != nil { + if err := encoder.SetURI("InstanceId").String(*v.InstanceId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDescribeHoursOfOperation struct { } @@ -4561,10 +4865,80 @@ func awsRestjson1_serializeOpHttpBindingsListBotsInput(v *ListBotsInput, encoder } } - if len(v.LexVersion) > 0 { - encoder.SetQuery("lexVersion").String(string(v.LexVersion)) - } - + if len(v.LexVersion) > 0 { + encoder.SetQuery("lexVersion").String(string(v.LexVersion)) + } + + if v.MaxResults != 0 { + encoder.SetQuery("maxResults").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListContactFlowModules struct { +} + +func (*awsRestjson1_serializeOpListContactFlowModules) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListContactFlowModules) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListContactFlowModulesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/contact-flow-modules-summary/{InstanceId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListContactFlowModulesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListContactFlowModulesInput(v *ListContactFlowModulesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if len(v.ContactFlowModuleState) > 0 { + encoder.SetQuery("state").String(string(v.ContactFlowModuleState)) + } + + if v.InstanceId == nil || len(*v.InstanceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InstanceId must not be empty")} + } + if v.InstanceId != nil { + if err := encoder.SetURI("InstanceId").String(*v.InstanceId); err != nil { + return err + } + } + if v.MaxResults != 0 { encoder.SetQuery("maxResults").Integer(v.MaxResults) } @@ -7574,6 +7948,296 @@ func awsRestjson1_serializeOpDocumentUpdateContactFlowContentInput(v *UpdateCont return nil } +type awsRestjson1_serializeOpUpdateContactFlowMetadata struct { +} + +func (*awsRestjson1_serializeOpUpdateContactFlowMetadata) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateContactFlowMetadata) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateContactFlowMetadataInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/contact-flows/{InstanceId}/{ContactFlowId}/metadata") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateContactFlowMetadataInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateContactFlowMetadataInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateContactFlowMetadataInput(v *UpdateContactFlowMetadataInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ContactFlowId == nil || len(*v.ContactFlowId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ContactFlowId must not be empty")} + } + if v.ContactFlowId != nil { + if err := encoder.SetURI("ContactFlowId").String(*v.ContactFlowId); err != nil { + return err + } + } + + if v.InstanceId == nil || len(*v.InstanceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InstanceId must not be empty")} + } + if v.InstanceId != nil { + if err := encoder.SetURI("InstanceId").String(*v.InstanceId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateContactFlowMetadataInput(v *UpdateContactFlowMetadataInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.ContactFlowState) > 0 { + ok := object.Key("ContactFlowState") + ok.String(string(v.ContactFlowState)) + } + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + return nil +} + +type awsRestjson1_serializeOpUpdateContactFlowModuleContent struct { +} + +func (*awsRestjson1_serializeOpUpdateContactFlowModuleContent) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateContactFlowModuleContent) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateContactFlowModuleContentInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/contact-flow-modules/{InstanceId}/{ContactFlowModuleId}/content") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateContactFlowModuleContentInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateContactFlowModuleContentInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateContactFlowModuleContentInput(v *UpdateContactFlowModuleContentInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ContactFlowModuleId == nil || len(*v.ContactFlowModuleId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ContactFlowModuleId must not be empty")} + } + if v.ContactFlowModuleId != nil { + if err := encoder.SetURI("ContactFlowModuleId").String(*v.ContactFlowModuleId); err != nil { + return err + } + } + + if v.InstanceId == nil || len(*v.InstanceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InstanceId must not be empty")} + } + if v.InstanceId != nil { + if err := encoder.SetURI("InstanceId").String(*v.InstanceId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateContactFlowModuleContentInput(v *UpdateContactFlowModuleContentInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Content != nil { + ok := object.Key("Content") + ok.String(*v.Content) + } + + return nil +} + +type awsRestjson1_serializeOpUpdateContactFlowModuleMetadata struct { +} + +func (*awsRestjson1_serializeOpUpdateContactFlowModuleMetadata) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateContactFlowModuleMetadata) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateContactFlowModuleMetadataInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/contact-flow-modules/{InstanceId}/{ContactFlowModuleId}/metadata") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateContactFlowModuleMetadataInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateContactFlowModuleMetadataInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateContactFlowModuleMetadataInput(v *UpdateContactFlowModuleMetadataInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ContactFlowModuleId == nil || len(*v.ContactFlowModuleId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ContactFlowModuleId must not be empty")} + } + if v.ContactFlowModuleId != nil { + if err := encoder.SetURI("ContactFlowModuleId").String(*v.ContactFlowModuleId); err != nil { + return err + } + } + + if v.InstanceId == nil || len(*v.InstanceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InstanceId must not be empty")} + } + if v.InstanceId != nil { + if err := encoder.SetURI("InstanceId").String(*v.InstanceId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateContactFlowModuleMetadataInput(v *UpdateContactFlowModuleMetadataInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if len(v.State) > 0 { + ok := object.Key("State") + ok.String(string(v.State)) + } + + return nil +} + type awsRestjson1_serializeOpUpdateContactFlowName struct { } diff --git a/service/connect/types/enums.go b/service/connect/types/enums.go index 08658ccd285..00046120a4b 100644 --- a/service/connect/types/enums.go +++ b/service/connect/types/enums.go @@ -76,6 +76,60 @@ func (Comparison) Values() []Comparison { } } +type ContactFlowModuleState string + +// Enum values for ContactFlowModuleState +const ( + ContactFlowModuleStateActive ContactFlowModuleState = "ACTIVE" + ContactFlowModuleStateArchived ContactFlowModuleState = "ARCHIVED" +) + +// Values returns all known values for ContactFlowModuleState. Note that this can +// be expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ContactFlowModuleState) Values() []ContactFlowModuleState { + return []ContactFlowModuleState{ + "ACTIVE", + "ARCHIVED", + } +} + +type ContactFlowModuleStatus string + +// Enum values for ContactFlowModuleStatus +const ( + ContactFlowModuleStatusPublished ContactFlowModuleStatus = "PUBLISHED" + ContactFlowModuleStatusSaved ContactFlowModuleStatus = "SAVED" +) + +// Values returns all known values for ContactFlowModuleStatus. Note that this can +// be expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ContactFlowModuleStatus) Values() []ContactFlowModuleStatus { + return []ContactFlowModuleStatus{ + "PUBLISHED", + "SAVED", + } +} + +type ContactFlowState string + +// Enum values for ContactFlowState +const ( + ContactFlowStateActive ContactFlowState = "ACTIVE" + ContactFlowStateArchived ContactFlowState = "ARCHIVED" +) + +// Values returns all known values for ContactFlowState. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ContactFlowState) Values() []ContactFlowState { + return []ContactFlowState{ + "ACTIVE", + "ARCHIVED", + } +} + type ContactFlowType string // Enum values for ContactFlowType diff --git a/service/connect/types/errors.go b/service/connect/types/errors.go index a2cb1a2bfbf..0bef7be88f7 100644 --- a/service/connect/types/errors.go +++ b/service/connect/types/errors.go @@ -7,7 +7,7 @@ import ( smithy "github.com/aws/smithy-go" ) -// You do not have sufficient access to perform this action. +// You do not have sufficient permissions to perform this action. type AccessDeniedException struct { Message *string @@ -104,6 +104,25 @@ func (e *DuplicateResourceException) ErrorMessage() string { func (e *DuplicateResourceException) ErrorCode() string { return "DuplicateResourceException" } func (e *DuplicateResourceException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// An entity with the same name already exists. +type IdempotencyException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *IdempotencyException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *IdempotencyException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *IdempotencyException) ErrorCode() string { return "IdempotencyException" } +func (e *IdempotencyException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // Request processing failed because of an error or failure with the service. type InternalServiceException struct { Message *string @@ -144,6 +163,29 @@ func (e *InvalidContactFlowException) ErrorMessage() string { func (e *InvalidContactFlowException) ErrorCode() string { return "InvalidContactFlowException" } func (e *InvalidContactFlowException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The problems with the module. Please fix before trying again. +type InvalidContactFlowModuleException struct { + Message *string + + Problems []ProblemDetail + + noSmithyDocumentSerde +} + +func (e *InvalidContactFlowModuleException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidContactFlowModuleException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidContactFlowModuleException) ErrorCode() string { + return "InvalidContactFlowModuleException" +} +func (e *InvalidContactFlowModuleException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // One or more of the specified parameters are not valid. type InvalidParameterException struct { Message *string diff --git a/service/connect/types/types.go b/service/connect/types/types.go index 23571b97d51..98da535ac05 100644 --- a/service/connect/types/types.go +++ b/service/connect/types/types.go @@ -40,7 +40,7 @@ type AgentStatus struct { // The state of the agent status. State AgentStatusState - // One or more tags. + // The tags used to organize, track, or control access for this resource. Tags map[string]string // The type of agent status. @@ -210,6 +210,9 @@ type ContactFlow struct { // The name of the contact flow. Name *string + // The type of contact flow. + State ContactFlowState + // One or more tags. Tags map[string]string @@ -222,6 +225,54 @@ type ContactFlow struct { noSmithyDocumentSerde } +// Contains information about a contact flow module. +type ContactFlowModule struct { + + // The Amazon Resource Name (ARN). + Arn *string + + // The content of the contact flow module. + Content *string + + // The description of the contact flow module. + Description *string + + // The identifier of the contact flow module. + Id *string + + // The name of the contact flow module. + Name *string + + // The type of contact flow module. + State ContactFlowModuleState + + // The status of the contact flow module. + Status ContactFlowModuleStatus + + // The tags used to organize, track, or control access for this resource. + Tags map[string]string + + noSmithyDocumentSerde +} + +// Contains summary information about a contact flow. +type ContactFlowModuleSummary struct { + + // The Amazon Resource Name (ARN) of the contact flow module. + Arn *string + + // The identifier of the contact flow module. + Id *string + + // The name of the contact flow module. + Name *string + + // The type of contact flow module. + State ContactFlowModuleState + + noSmithyDocumentSerde +} + // Contains summary information about a contact flow. You can also create and // update contact flows using the Amazon Connect Flow language // (https://docs.aws.amazon.com/connect/latest/adminguide/flow-language.html). @@ -230,6 +281,9 @@ type ContactFlowSummary struct { // The Amazon Resource Name (ARN) of the contact flow. Arn *string + // The type of contact flow. + ContactFlowState ContactFlowState + // The type of contact flow. ContactFlowType ContactFlowType @@ -530,7 +584,7 @@ type HoursOfOperation struct { // The name for the hours of operation. Name *string - // One or more tags. + // The tags used to organize, track, or control access for this resource. Tags map[string]string // The time zone for the hours of operation. @@ -936,7 +990,7 @@ type Queue struct { // The status of the queue. Status QueueStatus - // One or more tags. + // The tags used to organize, track, or control access for this resource. Tags map[string]string noSmithyDocumentSerde @@ -1019,7 +1073,7 @@ type QuickConnect struct { // The identifier for the quick connect. QuickConnectId *string - // One or more tags. + // The tags used to organize, track, or control access for this resource. Tags map[string]string noSmithyDocumentSerde @@ -1106,7 +1160,8 @@ type ReferenceSummaryMemberAttachment struct { func (*ReferenceSummaryMemberAttachment) isReferenceSummary() {} -// Information about Url reference if the referenceType is URL. Otherwise, null. +// Information about the URL reference if the referenceType is URL. Otherwise, +// null. type ReferenceSummaryMemberUrl struct { Value UrlReference @@ -1301,7 +1356,7 @@ type SecurityProfile struct { // The name for the security profile. SecurityProfileName *string - // One or more tags. + // The tags used to organize, track, or control access for this resource. Tags map[string]string noSmithyDocumentSerde diff --git a/service/connect/validators.go b/service/connect/validators.go index 81048074d00..4b1dc6f2658 100644 --- a/service/connect/validators.go +++ b/service/connect/validators.go @@ -210,6 +210,26 @@ func (m *validateOpCreateContactFlow) HandleInitialize(ctx context.Context, in m return next.HandleInitialize(ctx, in) } +type validateOpCreateContactFlowModule struct { +} + +func (*validateOpCreateContactFlowModule) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateContactFlowModule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateContactFlowModuleInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateContactFlowModuleInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateHoursOfOperation struct { } @@ -410,6 +430,46 @@ func (m *validateOpCreateUser) HandleInitialize(ctx context.Context, in middlewa return next.HandleInitialize(ctx, in) } +type validateOpDeleteContactFlow struct { +} + +func (*validateOpDeleteContactFlow) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteContactFlow) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteContactFlowInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteContactFlowInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteContactFlowModule struct { +} + +func (*validateOpDeleteContactFlowModule) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteContactFlowModule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteContactFlowModuleInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteContactFlowModuleInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteHoursOfOperation struct { } @@ -610,6 +670,26 @@ func (m *validateOpDescribeContactFlow) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpDescribeContactFlowModule struct { +} + +func (*validateOpDescribeContactFlowModule) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeContactFlowModule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeContactFlowModuleInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeContactFlowModuleInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeContact struct { } @@ -1150,6 +1230,26 @@ func (m *validateOpListBots) HandleInitialize(ctx context.Context, in middleware return next.HandleInitialize(ctx, in) } +type validateOpListContactFlowModules struct { +} + +func (*validateOpListContactFlowModules) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListContactFlowModules) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListContactFlowModulesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListContactFlowModulesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListContactFlows struct { } @@ -1890,6 +1990,66 @@ func (m *validateOpUpdateContactFlowContent) HandleInitialize(ctx context.Contex return next.HandleInitialize(ctx, in) } +type validateOpUpdateContactFlowMetadata struct { +} + +func (*validateOpUpdateContactFlowMetadata) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateContactFlowMetadata) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateContactFlowMetadataInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateContactFlowMetadataInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateContactFlowModuleContent struct { +} + +func (*validateOpUpdateContactFlowModuleContent) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateContactFlowModuleContent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateContactFlowModuleContentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateContactFlowModuleContentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateContactFlowModuleMetadata struct { +} + +func (*validateOpUpdateContactFlowModuleMetadata) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateContactFlowModuleMetadata) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateContactFlowModuleMetadataInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateContactFlowModuleMetadataInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateContactFlowName struct { } @@ -2430,6 +2590,10 @@ func addOpCreateContactFlowValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateContactFlow{}, middleware.After) } +func addOpCreateContactFlowModuleValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateContactFlowModule{}, middleware.After) +} + func addOpCreateHoursOfOperationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateHoursOfOperation{}, middleware.After) } @@ -2470,6 +2634,14 @@ func addOpCreateUserValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateUser{}, middleware.After) } +func addOpDeleteContactFlowValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteContactFlow{}, middleware.After) +} + +func addOpDeleteContactFlowModuleValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteContactFlowModule{}, middleware.After) +} + func addOpDeleteHoursOfOperationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteHoursOfOperation{}, middleware.After) } @@ -2510,6 +2682,10 @@ func addOpDescribeContactFlowValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpDescribeContactFlow{}, middleware.After) } +func addOpDescribeContactFlowModuleValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeContactFlowModule{}, middleware.After) +} + func addOpDescribeContactValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeContact{}, middleware.After) } @@ -2618,6 +2794,10 @@ func addOpListBotsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListBots{}, middleware.After) } +func addOpListContactFlowModulesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListContactFlowModules{}, middleware.After) +} + func addOpListContactFlowsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListContactFlows{}, middleware.After) } @@ -2766,6 +2946,18 @@ func addOpUpdateContactFlowContentValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpUpdateContactFlowContent{}, middleware.After) } +func addOpUpdateContactFlowMetadataValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateContactFlowMetadata{}, middleware.After) +} + +func addOpUpdateContactFlowModuleContentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateContactFlowModuleContent{}, middleware.After) +} + +func addOpUpdateContactFlowModuleMetadataValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateContactFlowModuleMetadata{}, middleware.After) +} + func addOpUpdateContactFlowNameValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateContactFlowName{}, middleware.After) } @@ -3590,6 +3782,27 @@ func validateOpCreateContactFlowInput(v *CreateContactFlowInput) error { } } +func validateOpCreateContactFlowModuleInput(v *CreateContactFlowModuleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateContactFlowModuleInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Content == nil { + invalidParams.Add(smithy.NewErrParamRequired("Content")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateHoursOfOperationInput(v *CreateHoursOfOperationInput) error { if v == nil { return nil @@ -3830,6 +4043,42 @@ func validateOpCreateUserInput(v *CreateUserInput) error { } } +func validateOpDeleteContactFlowInput(v *DeleteContactFlowInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteContactFlowInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.ContactFlowId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContactFlowId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteContactFlowModuleInput(v *DeleteContactFlowModuleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteContactFlowModuleInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.ContactFlowModuleId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContactFlowModuleId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteHoursOfOperationInput(v *DeleteHoursOfOperationInput) error { if v == nil { return nil @@ -4010,6 +4259,24 @@ func validateOpDescribeContactFlowInput(v *DescribeContactFlowInput) error { } } +func validateOpDescribeContactFlowModuleInput(v *DescribeContactFlowModuleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeContactFlowModuleInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.ContactFlowModuleId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContactFlowModuleId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeContactInput(v *DescribeContactInput) error { if v == nil { return nil @@ -4509,6 +4776,21 @@ func validateOpListBotsInput(v *ListBotsInput) error { } } +func validateOpListContactFlowModulesInput(v *ListContactFlowModulesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListContactFlowModulesInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListContactFlowsInput(v *ListContactFlowsInput) error { if v == nil { return nil @@ -5187,6 +5469,63 @@ func validateOpUpdateContactFlowContentInput(v *UpdateContactFlowContentInput) e } } +func validateOpUpdateContactFlowMetadataInput(v *UpdateContactFlowMetadataInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateContactFlowMetadataInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.ContactFlowId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContactFlowId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateContactFlowModuleContentInput(v *UpdateContactFlowModuleContentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateContactFlowModuleContentInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.ContactFlowModuleId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContactFlowModuleId")) + } + if v.Content == nil { + invalidParams.Add(smithy.NewErrParamRequired("Content")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateContactFlowModuleMetadataInput(v *UpdateContactFlowModuleMetadataInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateContactFlowModuleMetadataInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.ContactFlowModuleId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContactFlowModuleId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateContactFlowNameInput(v *UpdateContactFlowNameInput) error { if v == nil { return nil diff --git a/service/customerprofiles/api_op_CreateDomain.go b/service/customerprofiles/api_op_CreateDomain.go index 375cc7b06d7..5f8a487562a 100644 --- a/service/customerprofiles/api_op_CreateDomain.go +++ b/service/customerprofiles/api_op_CreateDomain.go @@ -21,7 +21,10 @@ import ( // (https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_UpdateDomain.html) // to enable identity resolution // (https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetMatches.html): -// set Matching to true. +// set Matching to true. To prevent cross-service impersonation when you call this +// API, see Cross-service confused deputy prevention +// (https://docs.aws.amazon.com/connect/latest/adminguide/cross-service-confused-deputy-prevention.html) +// for sample policies that you should apply. func (c *Client) CreateDomain(ctx context.Context, params *CreateDomainInput, optFns ...func(*Options)) (*CreateDomainOutput, error) { if params == nil { params = &CreateDomainInput{} @@ -61,11 +64,13 @@ type CreateDomainInput struct { DefaultEncryptionKey *string // The process of matching duplicate profiles. If Matching = true, Amazon Connect - // Customer Profiles starts a weekly batch process every Saturday at 12AM UTC to - // detect duplicate profiles in your domains. After that batch process completes, - // use the GetMatches + // Customer Profiles starts a weekly batch process called Identity Resolution Job. + // If you do not specify a date and time for Identity Resolution Job to run, by + // default it runs every Saturday at 12AM UTC to detect duplicate profiles in your + // domains. After the Identity Resolution Job completes, use the GetMatches // (https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetMatches.html) - // API to return and review the results. + // API to return and review the results. Or, if you have configured ExportingConfig + // in the MatchingRequest, you can download the results from S3. Matching *types.MatchingRequest // The tags used to organize, track, or control access for this resource. @@ -106,11 +111,13 @@ type CreateDomainOutput struct { DefaultEncryptionKey *string // The process of matching duplicate profiles. If Matching = true, Amazon Connect - // Customer Profiles starts a weekly batch process every Saturday at 12AM UTC to - // detect duplicate profiles in your domains. After that batch process completes, - // use the GetMatches + // Customer Profiles starts a weekly batch process called Identity Resolution Job. + // If you do not specify a date and time for Identity Resolution Job to run, by + // default it runs every Saturday at 12AM UTC to detect duplicate profiles in your + // domains. After the Identity Resolution Job completes, use the GetMatches // (https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetMatches.html) - // API to return and review the results. + // API to return and review the results. Or, if you have configured ExportingConfig + // in the MatchingRequest, you can download the results from S3. Matching *types.MatchingResponse // The tags used to organize, track, or control access for this resource. diff --git a/service/customerprofiles/api_op_GetAutoMergingPreview.go b/service/customerprofiles/api_op_GetAutoMergingPreview.go new file mode 100644 index 00000000000..92cc225ae48 --- /dev/null +++ b/service/customerprofiles/api_op_GetAutoMergingPreview.go @@ -0,0 +1,154 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package customerprofiles + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/customerprofiles/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Tests the auto-merging settings of your Identity Resolution Job without merging +// your data. It randomly selects a sample of matching groups from the existing +// matching results, and applies the automerging settings that you provided. You +// can then view the number of profiles in the sample, the number of matches, and +// the number of profiles identified to be merged. This enables you to evaluate the +// accuracy of the attributes in your matching list. You can't view which profiles +// are matched and would be merged. We strongly recommend you use this API to do a +// dry run of the automerging process before running the Identity Resolution Job. +// Include at least two matching attributes. If your matching list includes too few +// attributes (such as only FirstName or only LastName), there may be a large +// number of matches. This increases the chances of erroneous merges. +func (c *Client) GetAutoMergingPreview(ctx context.Context, params *GetAutoMergingPreviewInput, optFns ...func(*Options)) (*GetAutoMergingPreviewOutput, error) { + if params == nil { + params = &GetAutoMergingPreviewInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetAutoMergingPreview", params, optFns, c.addOperationGetAutoMergingPreviewMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetAutoMergingPreviewOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetAutoMergingPreviewInput struct { + + // How the auto-merging process should resolve conflicts between different + // profiles. + // + // This member is required. + ConflictResolution *types.ConflictResolution + + // A list of matching attributes that represent matching criteria. + // + // This member is required. + Consolidation *types.Consolidation + + // The unique name of the domain. + // + // This member is required. + DomainName *string + + noSmithyDocumentSerde +} + +type GetAutoMergingPreviewOutput struct { + + // The unique name of the domain. + // + // This member is required. + DomainName *string + + // The number of match groups in the domain that have been reviewed in this preview + // dry run. + NumberOfMatchesInSample int64 + + // The number of profiles found in this preview dry run. + NumberOfProfilesInSample int64 + + // The number of profiles that would be merged if this wasn't a preview dry run. + NumberOfProfilesWillBeMerged int64 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetAutoMergingPreviewMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetAutoMergingPreview{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetAutoMergingPreview{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetAutoMergingPreviewValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAutoMergingPreview(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetAutoMergingPreview(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "profile", + OperationName: "GetAutoMergingPreview", + } +} diff --git a/service/customerprofiles/api_op_GetDomain.go b/service/customerprofiles/api_op_GetDomain.go index 030a7f7261c..3c31290e042 100644 --- a/service/customerprofiles/api_op_GetDomain.go +++ b/service/customerprofiles/api_op_GetDomain.go @@ -68,11 +68,13 @@ type GetDomainOutput struct { DefaultExpirationDays *int32 // The process of matching duplicate profiles. If Matching = true, Amazon Connect - // Customer Profiles starts a weekly batch process every Saturday at 12AM UTC to - // detect duplicate profiles in your domains. After that batch process completes, - // use the GetMatches + // Customer Profiles starts a weekly batch process called Identity Resolution Job. + // If you do not specify a date and time for Identity Resolution Job to run, by + // default it runs every Saturday at 12AM UTC to detect duplicate profiles in your + // domains. After the Identity Resolution Job completes, use the GetMatches // (https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetMatches.html) - // API to return and review the results. + // API to return and review the results. Or, if you have configured ExportingConfig + // in the MatchingRequest, you can download the results from S3. Matching *types.MatchingResponse // Usage-specific statistics about the domain. diff --git a/service/customerprofiles/api_op_GetIdentityResolutionJob.go b/service/customerprofiles/api_op_GetIdentityResolutionJob.go new file mode 100644 index 00000000000..ebba84c43e8 --- /dev/null +++ b/service/customerprofiles/api_op_GetIdentityResolutionJob.go @@ -0,0 +1,186 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package customerprofiles + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/customerprofiles/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Returns information about an Identity Resolution Job in a specific domain. +// Identity Resolution Jobs are set up using the Amazon Connect admin console. For +// more information, see Use Identity Resolution to consolidate similar profiles +// (https://docs.aws.amazon.com/connect/latest/adminguide/use-identity-resolution.html). +func (c *Client) GetIdentityResolutionJob(ctx context.Context, params *GetIdentityResolutionJobInput, optFns ...func(*Options)) (*GetIdentityResolutionJobOutput, error) { + if params == nil { + params = &GetIdentityResolutionJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetIdentityResolutionJob", params, optFns, c.addOperationGetIdentityResolutionJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetIdentityResolutionJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetIdentityResolutionJobInput struct { + + // The unique name of the domain. + // + // This member is required. + DomainName *string + + // The unique identifier of the Identity Resolution Job. + // + // This member is required. + JobId *string + + noSmithyDocumentSerde +} + +type GetIdentityResolutionJobOutput struct { + + // Configuration settings for how to perform the auto-merging of profiles. + AutoMerging *types.AutoMerging + + // The unique name of the domain. + DomainName *string + + // The S3 location where the Identity Resolution Job writes result files. + ExportingLocation *types.ExportingLocation + + // The timestamp of when the Identity Resolution Job was completed. + JobEndTime *time.Time + + // The timestamp of when the Identity Resolution Job will expire. + JobExpirationTime *time.Time + + // The unique identifier of the Identity Resolution Job. + JobId *string + + // The timestamp of when the Identity Resolution Job was started or will be + // started. + JobStartTime *time.Time + + // Statistics about the Identity Resolution Job. + JobStats *types.JobStats + + // The timestamp of when the Identity Resolution Job was most recently edited. + LastUpdatedAt *time.Time + + // The error messages that are generated when the Identity Resolution Job runs. + Message *string + + // The status of the Identity Resolution Job. + // + // * PENDING: The Identity Resolution + // Job is scheduled but has not started yet. If you turn off the Identity + // Resolution feature in your domain, jobs in the PENDING state are deleted. + // + // * + // PREPROCESSING: The Identity Resolution Job is loading your data. + // + // * + // FIND_MATCHING: The Identity Resolution Job is using the machine learning model + // to identify profiles that belong to the same matching group. + // + // * MERGING: The + // Identity Resolution Job is merging duplicate profiles. + // + // * COMPLETED: The + // Identity Resolution Job completed successfully. + // + // * PARTIAL_SUCCESS: There's a + // system error and not all of the data is merged. The Identity Resolution Job + // writes a message indicating the source of the problem. + // + // * FAILED: The Identity + // Resolution Job did not merge any data. It writes a message indicating the source + // of the problem. + Status types.IdentityResolutionJobStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetIdentityResolutionJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetIdentityResolutionJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetIdentityResolutionJob{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetIdentityResolutionJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetIdentityResolutionJob(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetIdentityResolutionJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "profile", + OperationName: "GetIdentityResolutionJob", + } +} diff --git a/service/customerprofiles/api_op_GetMatches.go b/service/customerprofiles/api_op_GetMatches.go index b058eb4ba36..9dce0818de3 100644 --- a/service/customerprofiles/api_op_GetMatches.go +++ b/service/customerprofiles/api_op_GetMatches.go @@ -19,17 +19,23 @@ import ( // (https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_UpdateDomain.html) // to enable identity resolution: set Matching to true. GetMatches returns // potentially matching profiles, based on the results of the latest run of a -// machine learning process. Amazon Connect starts a batch process every Saturday -// at 12AM UTC to identify matching profiles. The results are returned up to seven -// days after the Saturday run. Amazon Connect uses the following profile -// attributes to identify matches: +// machine learning process. The process of matching duplicate profiles. If +// Matching = true, Amazon Connect Customer Profiles starts a weekly batch process +// called Identity Resolution Job. If you do not specify a date and time for +// Identity Resolution Job to run, by default it runs every Saturday at 12AM UTC to +// detect duplicate profiles in your domains. After the Identity Resolution Job +// completes, use the GetMatches +// (https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetMatches.html) +// API to return and review the results. Or, if you have configured ExportingConfig +// in the MatchingRequest, you can download the results from S3. Amazon Connect +// uses the following profile attributes to identify matches: // // * PhoneNumber // -// * HomePhoneNumber -// // * -// BusinessPhoneNumber +// HomePhoneNumber +// +// * BusinessPhoneNumber // // * MobilePhoneNumber // diff --git a/service/customerprofiles/api_op_GetProfileObjectType.go b/service/customerprofiles/api_op_GetProfileObjectType.go index 9fcc78729dc..3d06ddcc25d 100644 --- a/service/customerprofiles/api_op_GetProfileObjectType.go +++ b/service/customerprofiles/api_op_GetProfileObjectType.go @@ -81,6 +81,9 @@ type GetProfileObjectTypeOutput struct { // The timestamp of when the domain was most recently edited. LastUpdatedAt *time.Time + // The format of your sourceLastUpdatedTimestamp that was previously set up. + SourceLastUpdatedTimestampFormat *string + // The tags used to organize, track, or control access for this resource. Tags map[string]string diff --git a/service/customerprofiles/api_op_GetProfileObjectTypeTemplate.go b/service/customerprofiles/api_op_GetProfileObjectTypeTemplate.go index 834aa2a6a8b..ed3eb44932e 100644 --- a/service/customerprofiles/api_op_GetProfileObjectTypeTemplate.go +++ b/service/customerprofiles/api_op_GetProfileObjectTypeTemplate.go @@ -56,6 +56,9 @@ type GetProfileObjectTypeTemplateOutput struct { // A list of unique keys that can be used to map data to the profile. Keys map[string][]types.ObjectTypeKey + // The format of your sourceLastUpdatedTimestamp that was previously set up. + SourceLastUpdatedTimestampFormat *string + // The name of the source of the object template. SourceName *string diff --git a/service/customerprofiles/api_op_ListIdentityResolutionJobs.go b/service/customerprofiles/api_op_ListIdentityResolutionJobs.go new file mode 100644 index 00000000000..06b236137eb --- /dev/null +++ b/service/customerprofiles/api_op_ListIdentityResolutionJobs.go @@ -0,0 +1,132 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package customerprofiles + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/customerprofiles/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all of the Identity Resolution Jobs in your domain. The response sorts the +// list by JobStartTime. +func (c *Client) ListIdentityResolutionJobs(ctx context.Context, params *ListIdentityResolutionJobsInput, optFns ...func(*Options)) (*ListIdentityResolutionJobsOutput, error) { + if params == nil { + params = &ListIdentityResolutionJobsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListIdentityResolutionJobs", params, optFns, c.addOperationListIdentityResolutionJobsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListIdentityResolutionJobsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListIdentityResolutionJobsInput struct { + + // The unique name of the domain. + // + // This member is required. + DomainName *string + + // The maximum number of results to return per page. + MaxResults *int32 + + // The token for the next set of results. Use the value returned in the previous + // response in the next request to retrieve the next set of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListIdentityResolutionJobsOutput struct { + + // A list of Identity Resolution Jobs. + IdentityResolutionJobsList []types.IdentityResolutionJob + + // If there are additional results, this is the token for the next set of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListIdentityResolutionJobsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListIdentityResolutionJobs{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListIdentityResolutionJobs{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListIdentityResolutionJobsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListIdentityResolutionJobs(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListIdentityResolutionJobs(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "profile", + OperationName: "ListIdentityResolutionJobs", + } +} diff --git a/service/customerprofiles/api_op_PutProfileObjectType.go b/service/customerprofiles/api_op_PutProfileObjectType.go index c4e47915d40..09671bdf3e1 100644 --- a/service/customerprofiles/api_op_PutProfileObjectType.go +++ b/service/customerprofiles/api_op_PutProfileObjectType.go @@ -65,6 +65,9 @@ type PutProfileObjectTypeInput struct { // A list of unique keys that can be used to map data to the profile. Keys map[string][]types.ObjectTypeKey + // The format of your sourceLastUpdatedTimestamp that was previously set up. + SourceLastUpdatedTimestampFormat *string + // The tags used to organize, track, or control access for this resource. Tags map[string]string @@ -112,6 +115,13 @@ type PutProfileObjectTypeOutput struct { // The timestamp of when the domain was most recently edited. LastUpdatedAt *time.Time + // The format of your sourceLastUpdatedTimestamp that was previously set up in + // fields that were parsed using SimpleDateFormat + // (https://docs.oracle.com/javase/10/docs/api/java/text/SimpleDateFormat.html). If + // you have sourceLastUpdatedTimestamp in your field, you must set up + // sourceLastUpdatedTimestampFormat. + SourceLastUpdatedTimestampFormat *string + // The tags used to organize, track, or control access for this resource. Tags map[string]string diff --git a/service/customerprofiles/api_op_UpdateDomain.go b/service/customerprofiles/api_op_UpdateDomain.go index c1c9354c87d..e590b19a300 100644 --- a/service/customerprofiles/api_op_UpdateDomain.go +++ b/service/customerprofiles/api_op_UpdateDomain.go @@ -18,7 +18,10 @@ import ( // (https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_CreateDomain.html) // to enable identity resolution // (https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetMatches.html): -// set Matching to true. +// set Matching to true. To prevent cross-service impersonation when you call this +// API, see Cross-service confused deputy prevention +// (https://docs.aws.amazon.com/connect/latest/adminguide/cross-service-confused-deputy-prevention.html) +// for sample policies that you should apply. func (c *Client) UpdateDomain(ctx context.Context, params *UpdateDomainInput, optFns ...func(*Options)) (*UpdateDomainOutput, error) { if params == nil { params = &UpdateDomainInput{} @@ -58,11 +61,13 @@ type UpdateDomainInput struct { DefaultExpirationDays *int32 // The process of matching duplicate profiles. If Matching = true, Amazon Connect - // Customer Profiles starts a weekly batch process every Saturday at 12AM UTC to - // detect duplicate profiles in your domains. After that batch process completes, - // use the GetMatches + // Customer Profiles starts a weekly batch process called Identity Resolution Job. + // If you do not specify a date and time for Identity Resolution Job to run, by + // default it runs every Saturday at 12AM UTC to detect duplicate profiles in your + // domains. After the Identity Resolution Job completes, use the GetMatches // (https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetMatches.html) - // API to return and review the results. + // API to return and review the results. Or, if you have configured ExportingConfig + // in the MatchingRequest, you can download the results from S3. Matching *types.MatchingRequest // The tags used to organize, track, or control access for this resource. @@ -101,11 +106,13 @@ type UpdateDomainOutput struct { DefaultExpirationDays *int32 // The process of matching duplicate profiles. If Matching = true, Amazon Connect - // Customer Profiles starts a weekly batch process every Saturday at 12AM UTC to - // detect duplicate profiles in your domains. After that batch process completes, - // use the GetMatches + // Customer Profiles starts a weekly batch process called Identity Resolution Job. + // If you do not specify a date and time for Identity Resolution Job to run, by + // default it runs every Saturday at 12AM UTC to detect duplicate profiles in your + // domains. After the Identity Resolution Job completes, use the GetMatches // (https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetMatches.html) - // API to return and review the results. + // API to return and review the results. Or, if you have configured ExportingConfig + // in the MatchingRequest, you can download the results from S3. Matching *types.MatchingResponse // The tags used to organize, track, or control access for this resource. diff --git a/service/customerprofiles/deserializers.go b/service/customerprofiles/deserializers.go index d3d9b734668..14d8485c1ad 100644 --- a/service/customerprofiles/deserializers.go +++ b/service/customerprofiles/deserializers.go @@ -16,6 +16,7 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "io" + "math" "strings" ) @@ -1564,14 +1565,14 @@ func awsRestjson1_deserializeOpDocumentDeleteProfileObjectTypeOutput(v **DeleteP return nil } -type awsRestjson1_deserializeOpGetDomain struct { +type awsRestjson1_deserializeOpGetAutoMergingPreview struct { } -func (*awsRestjson1_deserializeOpGetDomain) ID() string { +func (*awsRestjson1_deserializeOpGetAutoMergingPreview) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetDomain) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetAutoMergingPreview) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1585,9 +1586,9 @@ func (m *awsRestjson1_deserializeOpGetDomain) HandleDeserialize(ctx context.Cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetDomain(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetAutoMergingPreview(response, &metadata) } - output := &GetDomainOutput{} + output := &GetAutoMergingPreviewOutput{} out.Result = output var buff [1024]byte @@ -1608,7 +1609,7 @@ func (m *awsRestjson1_deserializeOpGetDomain) HandleDeserialize(ctx context.Cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetDomainOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetAutoMergingPreviewOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1621,7 +1622,7 @@ func (m *awsRestjson1_deserializeOpGetDomain) HandleDeserialize(ctx context.Cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetDomain(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetAutoMergingPreview(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1687,7 +1688,7 @@ func awsRestjson1_deserializeOpErrorGetDomain(response *smithyhttp.Response, met } } -func awsRestjson1_deserializeOpDocumentGetDomainOutput(v **GetDomainOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetAutoMergingPreviewOutput(v **GetAutoMergingPreviewOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1700,100 +1701,61 @@ func awsRestjson1_deserializeOpDocumentGetDomainOutput(v **GetDomainOutput, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetDomainOutput + var sv *GetAutoMergingPreviewOutput if *v == nil { - sv = &GetDomainOutput{} + sv = &GetAutoMergingPreviewOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "CreatedAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "DeadLetterQueueUrl": + case "DomainName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected sqsQueueUrl to be of type string, got %T instead", value) + return fmt.Errorf("expected name to be of type string, got %T instead", value) } - sv.DeadLetterQueueUrl = ptr.String(jtv) + sv.DomainName = ptr.String(jtv) } - case "DefaultEncryptionKey": + case "NumberOfMatchesInSample": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected encryptionKey to be of type string, got %T instead", value) + return fmt.Errorf("expected long to be json.Number, got %T instead", value) } - sv.DefaultEncryptionKey = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.NumberOfMatchesInSample = i64 } - case "DefaultExpirationDays": + case "NumberOfProfilesInSample": if value != nil { jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected expirationDaysInteger to be json.Number, got %T instead", value) + return fmt.Errorf("expected long to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } - sv.DefaultExpirationDays = ptr.Int32(int32(i64)) + sv.NumberOfProfilesInSample = i64 } - case "DomainName": + case "NumberOfProfilesWillBeMerged": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected name to be of type string, got %T instead", value) + return fmt.Errorf("expected long to be json.Number, got %T instead", value) } - sv.DomainName = ptr.String(jtv) - } - - case "LastUpdatedAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastUpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected timestamp to be a JSON Number, got %T instead", value) - + i64, err := jtv.Int64() + if err != nil { + return err } - } - - case "Matching": - if err := awsRestjson1_deserializeDocumentMatchingResponse(&sv.Matching, value); err != nil { - return err - } - - case "Stats": - if err := awsRestjson1_deserializeDocumentDomainStats(&sv.Stats, value); err != nil { - return err - } - - case "Tags": - if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { - return err + sv.NumberOfProfilesWillBeMerged = i64 } default: @@ -1805,14 +1767,14 @@ func awsRestjson1_deserializeOpDocumentGetDomainOutput(v **GetDomainOutput, valu return nil } -type awsRestjson1_deserializeOpGetIntegration struct { +type awsRestjson1_deserializeOpGetDomain struct { } -func (*awsRestjson1_deserializeOpGetIntegration) ID() string { +func (*awsRestjson1_deserializeOpGetDomain) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetIntegration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetDomain) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1826,9 +1788,9 @@ func (m *awsRestjson1_deserializeOpGetIntegration) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetIntegration(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetDomain(response, &metadata) } - output := &GetIntegrationOutput{} + output := &GetDomainOutput{} out.Result = output var buff [1024]byte @@ -1849,7 +1811,7 @@ func (m *awsRestjson1_deserializeOpGetIntegration) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetIntegrationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetDomainOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1862,7 +1824,7 @@ func (m *awsRestjson1_deserializeOpGetIntegration) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetIntegration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetDomain(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1928,7 +1890,7 @@ func awsRestjson1_deserializeOpErrorGetIntegration(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentGetIntegrationOutput(v **GetIntegrationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetDomainOutput(v **GetDomainOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1941,9 +1903,9 @@ func awsRestjson1_deserializeOpDocumentGetIntegrationOutput(v **GetIntegrationOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetIntegrationOutput + var sv *GetDomainOutput if *v == nil { - sv = &GetIntegrationOutput{} + sv = &GetDomainOutput{} } else { sv = *v } @@ -1966,6 +1928,37 @@ func awsRestjson1_deserializeOpDocumentGetIntegrationOutput(v **GetIntegrationOu } } + case "DeadLetterQueueUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected sqsQueueUrl to be of type string, got %T instead", value) + } + sv.DeadLetterQueueUrl = ptr.String(jtv) + } + + case "DefaultEncryptionKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected encryptionKey to be of type string, got %T instead", value) + } + sv.DefaultEncryptionKey = ptr.String(jtv) + } + + case "DefaultExpirationDays": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected expirationDaysInteger to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DefaultExpirationDays = ptr.Int32(int32(i64)) + } + case "DomainName": if value != nil { jtv, ok := value.(string) @@ -1991,27 +1984,19 @@ func awsRestjson1_deserializeOpDocumentGetIntegrationOutput(v **GetIntegrationOu } } - case "ObjectTypeName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected typeName to be of type string, got %T instead", value) - } - sv.ObjectTypeName = ptr.String(jtv) + case "Matching": + if err := awsRestjson1_deserializeDocumentMatchingResponse(&sv.Matching, value); err != nil { + return err } - case "Tags": - if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + case "Stats": + if err := awsRestjson1_deserializeDocumentDomainStats(&sv.Stats, value); err != nil { return err } - case "Uri": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected string1To255 to be of type string, got %T instead", value) - } - sv.Uri = ptr.String(jtv) + case "Tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err } default: @@ -2023,14 +2008,14 @@ func awsRestjson1_deserializeOpDocumentGetIntegrationOutput(v **GetIntegrationOu return nil } -type awsRestjson1_deserializeOpGetMatches struct { +type awsRestjson1_deserializeOpGetIdentityResolutionJob struct { } -func (*awsRestjson1_deserializeOpGetMatches) ID() string { +func (*awsRestjson1_deserializeOpGetIdentityResolutionJob) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetMatches) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetIdentityResolutionJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2044,9 +2029,9 @@ func (m *awsRestjson1_deserializeOpGetMatches) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetMatches(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetIdentityResolutionJob(response, &metadata) } - output := &GetMatchesOutput{} + output := &GetIdentityResolutionJobOutput{} out.Result = output var buff [1024]byte @@ -2067,7 +2052,7 @@ func (m *awsRestjson1_deserializeOpGetMatches) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetMatchesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetIdentityResolutionJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2080,7 +2065,7 @@ func (m *awsRestjson1_deserializeOpGetMatches) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetMatches(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetIdentityResolutionJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2146,7 +2131,7 @@ func awsRestjson1_deserializeOpErrorGetMatches(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentGetMatchesOutput(v **GetMatchesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetIdentityResolutionJobOutput(v **GetIdentityResolutionJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2159,21 +2144,35 @@ func awsRestjson1_deserializeOpDocumentGetMatchesOutput(v **GetMatchesOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetMatchesOutput + var sv *GetIdentityResolutionJobOutput if *v == nil { - sv = &GetMatchesOutput{} + sv = &GetIdentityResolutionJobOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Matches": - if err := awsRestjson1_deserializeDocumentMatchesList(&sv.Matches, value); err != nil { + case "AutoMerging": + if err := awsRestjson1_deserializeDocumentAutoMerging(&sv.AutoMerging, value); err != nil { return err } - case "MatchGenerationDate": + case "DomainName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected name to be of type string, got %T instead", value) + } + sv.DomainName = ptr.String(jtv) + } + + case "ExportingLocation": + if err := awsRestjson1_deserializeDocumentExportingLocation(&sv.ExportingLocation, value); err != nil { + return err + } + + case "JobEndTime": if value != nil { switch jtv := value.(type) { case json.Number: @@ -2181,7 +2180,7 @@ func awsRestjson1_deserializeOpDocumentGetMatchesOutput(v **GetMatchesOutput, va if err != nil { return err } - sv.MatchGenerationDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + sv.JobEndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected timestamp to be a JSON Number, got %T instead", value) @@ -2189,26 +2188,84 @@ func awsRestjson1_deserializeOpDocumentGetMatchesOutput(v **GetMatchesOutput, va } } - case "NextToken": + case "JobExpirationTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.JobExpirationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "JobId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected token to be of type string, got %T instead", value) + return fmt.Errorf("expected uuid to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.JobId = ptr.String(jtv) } - case "PotentialMatches": + case "JobStartTime": if value != nil { - jtv, ok := value.(json.Number) + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.JobStartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "JobStats": + if err := awsRestjson1_deserializeDocumentJobStats(&sv.JobStats, value); err != nil { + return err + } + + case "LastUpdatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Message": + if value != nil { + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected matchesNumber to be json.Number, got %T instead", value) + return fmt.Errorf("expected stringTo2048 to be of type string, got %T instead", value) } - i64, err := jtv.Int64() - if err != nil { - return err + sv.Message = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdentityResolutionJobStatus to be of type string, got %T instead", value) } - sv.PotentialMatches = ptr.Int32(int32(i64)) + sv.Status = types.IdentityResolutionJobStatus(jtv) } default: @@ -2220,14 +2277,14 @@ func awsRestjson1_deserializeOpDocumentGetMatchesOutput(v **GetMatchesOutput, va return nil } -type awsRestjson1_deserializeOpGetProfileObjectType struct { +type awsRestjson1_deserializeOpGetIntegration struct { } -func (*awsRestjson1_deserializeOpGetProfileObjectType) ID() string { +func (*awsRestjson1_deserializeOpGetIntegration) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetProfileObjectType) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetIntegration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2241,9 +2298,9 @@ func (m *awsRestjson1_deserializeOpGetProfileObjectType) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetProfileObjectType(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetIntegration(response, &metadata) } - output := &GetProfileObjectTypeOutput{} + output := &GetIntegrationOutput{} out.Result = output var buff [1024]byte @@ -2264,7 +2321,7 @@ func (m *awsRestjson1_deserializeOpGetProfileObjectType) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetProfileObjectTypeOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetIntegrationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2277,7 +2334,7 @@ func (m *awsRestjson1_deserializeOpGetProfileObjectType) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetProfileObjectType(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetIntegration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2343,7 +2400,7 @@ func awsRestjson1_deserializeOpErrorGetProfileObjectType(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentGetProfileObjectTypeOutput(v **GetProfileObjectTypeOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetIntegrationOutput(v **GetIntegrationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2356,24 +2413,15 @@ func awsRestjson1_deserializeOpDocumentGetProfileObjectTypeOutput(v **GetProfile return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetProfileObjectTypeOutput + var sv *GetIntegrationOutput if *v == nil { - sv = &GetProfileObjectTypeOutput{} + sv = &GetIntegrationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AllowProfileCreation": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected boolean to be of type *bool, got %T instead", value) - } - sv.AllowProfileCreation = jtv - } - case "CreatedAt": if value != nil { switch jtv := value.(type) { @@ -2390,45 +2438,13 @@ func awsRestjson1_deserializeOpDocumentGetProfileObjectTypeOutput(v **GetProfile } } - case "Description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected text to be of type string, got %T instead", value) - } - sv.Description = ptr.String(jtv) - } - - case "EncryptionKey": + case "DomainName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected encryptionKey to be of type string, got %T instead", value) - } - sv.EncryptionKey = ptr.String(jtv) - } - - case "ExpirationDays": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected expirationDaysInteger to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected name to be of type string, got %T instead", value) } - sv.ExpirationDays = ptr.Int32(int32(i64)) - } - - case "Fields": - if err := awsRestjson1_deserializeDocumentFieldMap(&sv.Fields, value); err != nil { - return err - } - - case "Keys": - if err := awsRestjson1_deserializeDocumentKeyMap(&sv.Keys, value); err != nil { - return err + sv.DomainName = ptr.String(jtv) } case "LastUpdatedAt": @@ -2461,13 +2477,13 @@ func awsRestjson1_deserializeOpDocumentGetProfileObjectTypeOutput(v **GetProfile return err } - case "TemplateId": + case "Uri": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected name to be of type string, got %T instead", value) + return fmt.Errorf("expected string1To255 to be of type string, got %T instead", value) } - sv.TemplateId = ptr.String(jtv) + sv.Uri = ptr.String(jtv) } default: @@ -2479,14 +2495,14 @@ func awsRestjson1_deserializeOpDocumentGetProfileObjectTypeOutput(v **GetProfile return nil } -type awsRestjson1_deserializeOpGetProfileObjectTypeTemplate struct { +type awsRestjson1_deserializeOpGetMatches struct { } -func (*awsRestjson1_deserializeOpGetProfileObjectTypeTemplate) ID() string { +func (*awsRestjson1_deserializeOpGetMatches) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetProfileObjectTypeTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetMatches) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2500,9 +2516,9 @@ func (m *awsRestjson1_deserializeOpGetProfileObjectTypeTemplate) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetProfileObjectTypeTemplate(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetMatches(response, &metadata) } - output := &GetProfileObjectTypeTemplateOutput{} + output := &GetMatchesOutput{} out.Result = output var buff [1024]byte @@ -2523,7 +2539,7 @@ func (m *awsRestjson1_deserializeOpGetProfileObjectTypeTemplate) HandleDeseriali return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetProfileObjectTypeTemplateOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetMatchesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2536,7 +2552,7 @@ func (m *awsRestjson1_deserializeOpGetProfileObjectTypeTemplate) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetProfileObjectTypeTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetMatches(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2602,7 +2618,7 @@ func awsRestjson1_deserializeOpErrorGetProfileObjectTypeTemplate(response *smith } } -func awsRestjson1_deserializeOpDocumentGetProfileObjectTypeTemplateOutput(v **GetProfileObjectTypeTemplateOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetMatchesOutput(v **GetMatchesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2615,59 +2631,56 @@ func awsRestjson1_deserializeOpDocumentGetProfileObjectTypeTemplateOutput(v **Ge return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetProfileObjectTypeTemplateOutput + var sv *GetMatchesOutput if *v == nil { - sv = &GetProfileObjectTypeTemplateOutput{} + sv = &GetMatchesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AllowProfileCreation": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected boolean to be of type *bool, got %T instead", value) - } - sv.AllowProfileCreation = jtv - } - - case "Fields": - if err := awsRestjson1_deserializeDocumentFieldMap(&sv.Fields, value); err != nil { - return err - } - - case "Keys": - if err := awsRestjson1_deserializeDocumentKeyMap(&sv.Keys, value); err != nil { + case "Matches": + if err := awsRestjson1_deserializeDocumentMatchesList(&sv.Matches, value); err != nil { return err } - case "SourceName": + case "MatchGenerationDate": if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected name to be of type string, got %T instead", value) + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.MatchGenerationDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected timestamp to be a JSON Number, got %T instead", value) + } - sv.SourceName = ptr.String(jtv) } - case "SourceObject": + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected name to be of type string, got %T instead", value) + return fmt.Errorf("expected token to be of type string, got %T instead", value) } - sv.SourceObject = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } - case "TemplateId": + case "PotentialMatches": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected name to be of type string, got %T instead", value) + return fmt.Errorf("expected matchesNumber to be json.Number, got %T instead", value) } - sv.TemplateId = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.PotentialMatches = ptr.Int32(int32(i64)) } default: @@ -2679,14 +2692,14 @@ func awsRestjson1_deserializeOpDocumentGetProfileObjectTypeTemplateOutput(v **Ge return nil } -type awsRestjson1_deserializeOpListAccountIntegrations struct { +type awsRestjson1_deserializeOpGetProfileObjectType struct { } -func (*awsRestjson1_deserializeOpListAccountIntegrations) ID() string { +func (*awsRestjson1_deserializeOpGetProfileObjectType) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListAccountIntegrations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetProfileObjectType) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2700,9 +2713,9 @@ func (m *awsRestjson1_deserializeOpListAccountIntegrations) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListAccountIntegrations(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetProfileObjectType(response, &metadata) } - output := &ListAccountIntegrationsOutput{} + output := &GetProfileObjectTypeOutput{} out.Result = output var buff [1024]byte @@ -2723,7 +2736,7 @@ func (m *awsRestjson1_deserializeOpListAccountIntegrations) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListAccountIntegrationsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetProfileObjectTypeOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2736,7 +2749,7 @@ func (m *awsRestjson1_deserializeOpListAccountIntegrations) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorListAccountIntegrations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetProfileObjectType(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2802,7 +2815,7 @@ func awsRestjson1_deserializeOpErrorListAccountIntegrations(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentListAccountIntegrationsOutput(v **ListAccountIntegrationsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetProfileObjectTypeOutput(v **GetProfileObjectTypeOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2815,62 +2828,162 @@ func awsRestjson1_deserializeOpDocumentListAccountIntegrationsOutput(v **ListAcc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListAccountIntegrationsOutput + var sv *GetProfileObjectTypeOutput if *v == nil { - sv = &ListAccountIntegrationsOutput{} + sv = &GetProfileObjectTypeOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Items": - if err := awsRestjson1_deserializeDocumentIntegrationList(&sv.Items, value); err != nil { - return err + case "AllowProfileCreation": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", value) + } + sv.AllowProfileCreation = jtv } - case "NextToken": + case "CreatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Description": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected token to be of type string, got %T instead", value) + return fmt.Errorf("expected text to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.Description = ptr.String(jtv) } - default: - _, _ = key, value + case "EncryptionKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected encryptionKey to be of type string, got %T instead", value) + } + sv.EncryptionKey = ptr.String(jtv) + } - } - } - *v = sv - return nil -} + case "ExpirationDays": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected expirationDaysInteger to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ExpirationDays = ptr.Int32(int32(i64)) + } -type awsRestjson1_deserializeOpListDomains struct { -} + case "Fields": + if err := awsRestjson1_deserializeDocumentFieldMap(&sv.Fields, value); err != nil { + return err + } -func (*awsRestjson1_deserializeOpListDomains) ID() string { - return "OperationDeserializer" -} + case "Keys": + if err := awsRestjson1_deserializeDocumentKeyMap(&sv.Keys, value); err != nil { + return err + } -func (m *awsRestjson1_deserializeOpListDomains) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } + case "LastUpdatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } + default: + return fmt.Errorf("expected timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "ObjectTypeName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected typeName to be of type string, got %T instead", value) + } + sv.ObjectTypeName = ptr.String(jtv) + } + + case "SourceLastUpdatedTimestampFormat": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string1To255 to be of type string, got %T instead", value) + } + sv.SourceLastUpdatedTimestampFormat = ptr.String(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "TemplateId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected name to be of type string, got %T instead", value) + } + sv.TemplateId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetProfileObjectTypeTemplate struct { +} + +func (*awsRestjson1_deserializeOpGetProfileObjectTypeTemplate) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetProfileObjectTypeTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListDomains(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetProfileObjectTypeTemplate(response, &metadata) } - output := &ListDomainsOutput{} + output := &GetProfileObjectTypeTemplateOutput{} out.Result = output var buff [1024]byte @@ -2891,7 +3004,7 @@ func (m *awsRestjson1_deserializeOpListDomains) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListDomainsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetProfileObjectTypeTemplateOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2904,7 +3017,7 @@ func (m *awsRestjson1_deserializeOpListDomains) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListDomains(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetProfileObjectTypeTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2970,7 +3083,7 @@ func awsRestjson1_deserializeOpErrorListDomains(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpDocumentListDomainsOutput(v **ListDomainsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetProfileObjectTypeTemplateOutput(v **GetProfileObjectTypeTemplateOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2983,27 +3096,68 @@ func awsRestjson1_deserializeOpDocumentListDomainsOutput(v **ListDomainsOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListDomainsOutput + var sv *GetProfileObjectTypeTemplateOutput if *v == nil { - sv = &ListDomainsOutput{} + sv = &GetProfileObjectTypeTemplateOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Items": - if err := awsRestjson1_deserializeDocumentDomainList(&sv.Items, value); err != nil { + case "AllowProfileCreation": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", value) + } + sv.AllowProfileCreation = jtv + } + + case "Fields": + if err := awsRestjson1_deserializeDocumentFieldMap(&sv.Fields, value); err != nil { return err } - case "NextToken": + case "Keys": + if err := awsRestjson1_deserializeDocumentKeyMap(&sv.Keys, value); err != nil { + return err + } + + case "SourceLastUpdatedTimestampFormat": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected token to be of type string, got %T instead", value) + return fmt.Errorf("expected string1To255 to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.SourceLastUpdatedTimestampFormat = ptr.String(jtv) + } + + case "SourceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected name to be of type string, got %T instead", value) + } + sv.SourceName = ptr.String(jtv) + } + + case "SourceObject": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected name to be of type string, got %T instead", value) + } + sv.SourceObject = ptr.String(jtv) + } + + case "TemplateId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected name to be of type string, got %T instead", value) + } + sv.TemplateId = ptr.String(jtv) } default: @@ -3015,14 +3169,14 @@ func awsRestjson1_deserializeOpDocumentListDomainsOutput(v **ListDomainsOutput, return nil } -type awsRestjson1_deserializeOpListIntegrations struct { +type awsRestjson1_deserializeOpListAccountIntegrations struct { } -func (*awsRestjson1_deserializeOpListIntegrations) ID() string { +func (*awsRestjson1_deserializeOpListAccountIntegrations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListIntegrations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListAccountIntegrations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3036,9 +3190,9 @@ func (m *awsRestjson1_deserializeOpListIntegrations) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListIntegrations(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListAccountIntegrations(response, &metadata) } - output := &ListIntegrationsOutput{} + output := &ListAccountIntegrationsOutput{} out.Result = output var buff [1024]byte @@ -3059,7 +3213,7 @@ func (m *awsRestjson1_deserializeOpListIntegrations) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListIntegrationsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListAccountIntegrationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3072,7 +3226,7 @@ func (m *awsRestjson1_deserializeOpListIntegrations) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorListIntegrations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListAccountIntegrations(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3138,7 +3292,7 @@ func awsRestjson1_deserializeOpErrorListIntegrations(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentListIntegrationsOutput(v **ListIntegrationsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListAccountIntegrationsOutput(v **ListAccountIntegrationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3151,9 +3305,9 @@ func awsRestjson1_deserializeOpDocumentListIntegrationsOutput(v **ListIntegratio return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListIntegrationsOutput + var sv *ListAccountIntegrationsOutput if *v == nil { - sv = &ListIntegrationsOutput{} + sv = &ListAccountIntegrationsOutput{} } else { sv = *v } @@ -3183,14 +3337,14 @@ func awsRestjson1_deserializeOpDocumentListIntegrationsOutput(v **ListIntegratio return nil } -type awsRestjson1_deserializeOpListProfileObjects struct { +type awsRestjson1_deserializeOpListDomains struct { } -func (*awsRestjson1_deserializeOpListProfileObjects) ID() string { +func (*awsRestjson1_deserializeOpListDomains) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListProfileObjects) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListDomains) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3204,9 +3358,9 @@ func (m *awsRestjson1_deserializeOpListProfileObjects) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListProfileObjects(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListDomains(response, &metadata) } - output := &ListProfileObjectsOutput{} + output := &ListDomainsOutput{} out.Result = output var buff [1024]byte @@ -3227,7 +3381,7 @@ func (m *awsRestjson1_deserializeOpListProfileObjects) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListProfileObjectsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListDomainsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3240,7 +3394,7 @@ func (m *awsRestjson1_deserializeOpListProfileObjects) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorListProfileObjects(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListDomains(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3306,7 +3460,7 @@ func awsRestjson1_deserializeOpErrorListProfileObjects(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpDocumentListProfileObjectsOutput(v **ListProfileObjectsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListDomainsOutput(v **ListDomainsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3319,9 +3473,9 @@ func awsRestjson1_deserializeOpDocumentListProfileObjectsOutput(v **ListProfileO return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListProfileObjectsOutput + var sv *ListDomainsOutput if *v == nil { - sv = &ListProfileObjectsOutput{} + sv = &ListDomainsOutput{} } else { sv = *v } @@ -3329,7 +3483,7 @@ func awsRestjson1_deserializeOpDocumentListProfileObjectsOutput(v **ListProfileO for key, value := range shape { switch key { case "Items": - if err := awsRestjson1_deserializeDocumentProfileObjectList(&sv.Items, value); err != nil { + if err := awsRestjson1_deserializeDocumentDomainList(&sv.Items, value); err != nil { return err } @@ -3351,14 +3505,14 @@ func awsRestjson1_deserializeOpDocumentListProfileObjectsOutput(v **ListProfileO return nil } -type awsRestjson1_deserializeOpListProfileObjectTypes struct { +type awsRestjson1_deserializeOpListIdentityResolutionJobs struct { } -func (*awsRestjson1_deserializeOpListProfileObjectTypes) ID() string { +func (*awsRestjson1_deserializeOpListIdentityResolutionJobs) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListProfileObjectTypes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListIdentityResolutionJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3372,9 +3526,9 @@ func (m *awsRestjson1_deserializeOpListProfileObjectTypes) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListProfileObjectTypes(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListIdentityResolutionJobs(response, &metadata) } - output := &ListProfileObjectTypesOutput{} + output := &ListIdentityResolutionJobsOutput{} out.Result = output var buff [1024]byte @@ -3395,7 +3549,7 @@ func (m *awsRestjson1_deserializeOpListProfileObjectTypes) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListProfileObjectTypesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListIdentityResolutionJobsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3408,7 +3562,7 @@ func (m *awsRestjson1_deserializeOpListProfileObjectTypes) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListProfileObjectTypes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListIdentityResolutionJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3474,7 +3628,7 @@ func awsRestjson1_deserializeOpErrorListProfileObjectTypes(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentListProfileObjectTypesOutput(v **ListProfileObjectTypesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListIdentityResolutionJobsOutput(v **ListIdentityResolutionJobsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3487,17 +3641,17 @@ func awsRestjson1_deserializeOpDocumentListProfileObjectTypesOutput(v **ListProf return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListProfileObjectTypesOutput + var sv *ListIdentityResolutionJobsOutput if *v == nil { - sv = &ListProfileObjectTypesOutput{} + sv = &ListIdentityResolutionJobsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Items": - if err := awsRestjson1_deserializeDocumentProfileObjectTypeList(&sv.Items, value); err != nil { + case "IdentityResolutionJobsList": + if err := awsRestjson1_deserializeDocumentIdentityResolutionJobsList(&sv.IdentityResolutionJobsList, value); err != nil { return err } @@ -3519,14 +3673,14 @@ func awsRestjson1_deserializeOpDocumentListProfileObjectTypesOutput(v **ListProf return nil } -type awsRestjson1_deserializeOpListProfileObjectTypeTemplates struct { +type awsRestjson1_deserializeOpListIntegrations struct { } -func (*awsRestjson1_deserializeOpListProfileObjectTypeTemplates) ID() string { +func (*awsRestjson1_deserializeOpListIntegrations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListProfileObjectTypeTemplates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListIntegrations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3540,9 +3694,9 @@ func (m *awsRestjson1_deserializeOpListProfileObjectTypeTemplates) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListProfileObjectTypeTemplates(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListIntegrations(response, &metadata) } - output := &ListProfileObjectTypeTemplatesOutput{} + output := &ListIntegrationsOutput{} out.Result = output var buff [1024]byte @@ -3563,7 +3717,7 @@ func (m *awsRestjson1_deserializeOpListProfileObjectTypeTemplates) HandleDeseria return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListProfileObjectTypeTemplatesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListIntegrationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3576,7 +3730,7 @@ func (m *awsRestjson1_deserializeOpListProfileObjectTypeTemplates) HandleDeseria return out, metadata, err } -func awsRestjson1_deserializeOpErrorListProfileObjectTypeTemplates(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListIntegrations(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3642,7 +3796,7 @@ func awsRestjson1_deserializeOpErrorListProfileObjectTypeTemplates(response *smi } } -func awsRestjson1_deserializeOpDocumentListProfileObjectTypeTemplatesOutput(v **ListProfileObjectTypeTemplatesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListIntegrationsOutput(v **ListIntegrationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3655,9 +3809,9 @@ func awsRestjson1_deserializeOpDocumentListProfileObjectTypeTemplatesOutput(v ** return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListProfileObjectTypeTemplatesOutput + var sv *ListIntegrationsOutput if *v == nil { - sv = &ListProfileObjectTypeTemplatesOutput{} + sv = &ListIntegrationsOutput{} } else { sv = *v } @@ -3665,7 +3819,7 @@ func awsRestjson1_deserializeOpDocumentListProfileObjectTypeTemplatesOutput(v ** for key, value := range shape { switch key { case "Items": - if err := awsRestjson1_deserializeDocumentProfileObjectTypeTemplateList(&sv.Items, value); err != nil { + if err := awsRestjson1_deserializeDocumentIntegrationList(&sv.Items, value); err != nil { return err } @@ -3687,14 +3841,14 @@ func awsRestjson1_deserializeOpDocumentListProfileObjectTypeTemplatesOutput(v ** return nil } -type awsRestjson1_deserializeOpListTagsForResource struct { +type awsRestjson1_deserializeOpListProfileObjects struct { } -func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { +func (*awsRestjson1_deserializeOpListProfileObjects) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListProfileObjects) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3708,9 +3862,9 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListProfileObjects(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &ListProfileObjectsOutput{} out.Result = output var buff [1024]byte @@ -3731,7 +3885,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListProfileObjectsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3744,7 +3898,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListProfileObjects(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3785,6 +3939,9 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) @@ -3794,6 +3951,9 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3804,7 +3964,7 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListProfileObjectsOutput(v **ListProfileObjectsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3817,20 +3977,29 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTagsForResourceOutput + var sv *ListProfileObjectsOutput if *v == nil { - sv = &ListTagsForResourceOutput{} + sv = &ListProfileObjectsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "tags": - if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + case "Items": + if err := awsRestjson1_deserializeDocumentProfileObjectList(&sv.Items, value); err != nil { return err } + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected token to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + default: _, _ = key, value @@ -3840,14 +4009,14 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return nil } -type awsRestjson1_deserializeOpMergeProfiles struct { +type awsRestjson1_deserializeOpListProfileObjectTypes struct { } -func (*awsRestjson1_deserializeOpMergeProfiles) ID() string { +func (*awsRestjson1_deserializeOpListProfileObjectTypes) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpMergeProfiles) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListProfileObjectTypes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3861,9 +4030,9 @@ func (m *awsRestjson1_deserializeOpMergeProfiles) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorMergeProfiles(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListProfileObjectTypes(response, &metadata) } - output := &MergeProfilesOutput{} + output := &ListProfileObjectTypesOutput{} out.Result = output var buff [1024]byte @@ -3884,7 +4053,7 @@ func (m *awsRestjson1_deserializeOpMergeProfiles) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentMergeProfilesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListProfileObjectTypesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3897,7 +4066,7 @@ func (m *awsRestjson1_deserializeOpMergeProfiles) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorMergeProfiles(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListProfileObjectTypes(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3938,8 +4107,11 @@ func awsRestjson1_deserializeOpErrorMergeProfiles(response *smithyhttp.Response, } switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -3960,7 +4132,7 @@ func awsRestjson1_deserializeOpErrorMergeProfiles(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentMergeProfilesOutput(v **MergeProfilesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListProfileObjectTypesOutput(v **ListProfileObjectTypesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3973,22 +4145,27 @@ func awsRestjson1_deserializeOpDocumentMergeProfilesOutput(v **MergeProfilesOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *MergeProfilesOutput + var sv *ListProfileObjectTypesOutput if *v == nil { - sv = &MergeProfilesOutput{} + sv = &ListProfileObjectTypesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Message": + case "Items": + if err := awsRestjson1_deserializeDocumentProfileObjectTypeList(&sv.Items, value); err != nil { + return err + } + + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected message to be of type string, got %T instead", value) + return fmt.Errorf("expected token to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } default: @@ -4000,14 +4177,14 @@ func awsRestjson1_deserializeOpDocumentMergeProfilesOutput(v **MergeProfilesOutp return nil } -type awsRestjson1_deserializeOpPutIntegration struct { +type awsRestjson1_deserializeOpListProfileObjectTypeTemplates struct { } -func (*awsRestjson1_deserializeOpPutIntegration) ID() string { +func (*awsRestjson1_deserializeOpListProfileObjectTypeTemplates) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutIntegration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListProfileObjectTypeTemplates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4021,9 +4198,9 @@ func (m *awsRestjson1_deserializeOpPutIntegration) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutIntegration(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListProfileObjectTypeTemplates(response, &metadata) } - output := &PutIntegrationOutput{} + output := &ListProfileObjectTypeTemplatesOutput{} out.Result = output var buff [1024]byte @@ -4044,7 +4221,7 @@ func (m *awsRestjson1_deserializeOpPutIntegration) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentPutIntegrationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListProfileObjectTypeTemplatesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4057,7 +4234,7 @@ func (m *awsRestjson1_deserializeOpPutIntegration) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutIntegration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListProfileObjectTypeTemplates(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4123,7 +4300,7 @@ func awsRestjson1_deserializeOpErrorPutIntegration(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentPutIntegrationOutput(v **PutIntegrationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListProfileObjectTypeTemplatesOutput(v **ListProfileObjectTypeTemplatesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4136,77 +4313,27 @@ func awsRestjson1_deserializeOpDocumentPutIntegrationOutput(v **PutIntegrationOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *PutIntegrationOutput + var sv *ListProfileObjectTypeTemplatesOutput if *v == nil { - sv = &PutIntegrationOutput{} + sv = &ListProfileObjectTypeTemplatesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "CreatedAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "DomainName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected name to be of type string, got %T instead", value) - } - sv.DomainName = ptr.String(jtv) - } - - case "LastUpdatedAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastUpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "ObjectTypeName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected typeName to be of type string, got %T instead", value) - } - sv.ObjectTypeName = ptr.String(jtv) - } - - case "Tags": - if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + case "Items": + if err := awsRestjson1_deserializeDocumentProfileObjectTypeTemplateList(&sv.Items, value); err != nil { return err } - case "Uri": + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected string1To255 to be of type string, got %T instead", value) + return fmt.Errorf("expected token to be of type string, got %T instead", value) } - sv.Uri = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } default: @@ -4218,14 +4345,14 @@ func awsRestjson1_deserializeOpDocumentPutIntegrationOutput(v **PutIntegrationOu return nil } -type awsRestjson1_deserializeOpPutProfileObject struct { +type awsRestjson1_deserializeOpListTagsForResource struct { } -func (*awsRestjson1_deserializeOpPutProfileObject) ID() string { +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutProfileObject) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4239,9 +4366,9 @@ func (m *awsRestjson1_deserializeOpPutProfileObject) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutProfileObject(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) } - output := &PutProfileObjectOutput{} + output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte @@ -4262,7 +4389,7 @@ func (m *awsRestjson1_deserializeOpPutProfileObject) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentPutProfileObjectOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4275,7 +4402,7 @@ func (m *awsRestjson1_deserializeOpPutProfileObject) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutProfileObject(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4316,9 +4443,6 @@ func awsRestjson1_deserializeOpErrorPutProfileObject(response *smithyhttp.Respon } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) @@ -4328,9 +4452,6 @@ func awsRestjson1_deserializeOpErrorPutProfileObject(response *smithyhttp.Respon case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): - return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -4341,7 +4462,7 @@ func awsRestjson1_deserializeOpErrorPutProfileObject(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentPutProfileObjectOutput(v **PutProfileObjectOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4354,22 +4475,18 @@ func awsRestjson1_deserializeOpDocumentPutProfileObjectOutput(v **PutProfileObje return fmt.Errorf("unexpected JSON type %v", value) } - var sv *PutProfileObjectOutput + var sv *ListTagsForResourceOutput if *v == nil { - sv = &PutProfileObjectOutput{} + sv = &ListTagsForResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ProfileObjectUniqueKey": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected string1To255 to be of type string, got %T instead", value) - } - sv.ProfileObjectUniqueKey = ptr.String(jtv) + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err } default: @@ -4381,14 +4498,14 @@ func awsRestjson1_deserializeOpDocumentPutProfileObjectOutput(v **PutProfileObje return nil } -type awsRestjson1_deserializeOpPutProfileObjectType struct { +type awsRestjson1_deserializeOpMergeProfiles struct { } -func (*awsRestjson1_deserializeOpPutProfileObjectType) ID() string { +func (*awsRestjson1_deserializeOpMergeProfiles) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutProfileObjectType) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpMergeProfiles) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4402,9 +4519,9 @@ func (m *awsRestjson1_deserializeOpPutProfileObjectType) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutProfileObjectType(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorMergeProfiles(response, &metadata) } - output := &PutProfileObjectTypeOutput{} + output := &MergeProfilesOutput{} out.Result = output var buff [1024]byte @@ -4425,7 +4542,7 @@ func (m *awsRestjson1_deserializeOpPutProfileObjectType) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentPutProfileObjectTypeOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentMergeProfilesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4438,7 +4555,7 @@ func (m *awsRestjson1_deserializeOpPutProfileObjectType) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutProfileObjectType(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorMergeProfiles(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4479,9 +4596,6 @@ func awsRestjson1_deserializeOpErrorPutProfileObjectType(response *smithyhttp.Re } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) @@ -4504,7 +4618,7 @@ func awsRestjson1_deserializeOpErrorPutProfileObjectType(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentPutProfileObjectTypeOutput(v **PutProfileObjectTypeOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentMergeProfilesOutput(v **MergeProfilesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4517,89 +4631,211 @@ func awsRestjson1_deserializeOpDocumentPutProfileObjectTypeOutput(v **PutProfile return fmt.Errorf("unexpected JSON type %v", value) } - var sv *PutProfileObjectTypeOutput + var sv *MergeProfilesOutput if *v == nil { - sv = &PutProfileObjectTypeOutput{} + sv = &MergeProfilesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AllowProfileCreation": + case "Message": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected boolean to be of type *bool, got %T instead", value) + return fmt.Errorf("expected message to be of type string, got %T instead", value) } - sv.AllowProfileCreation = jtv + sv.Message = ptr.String(jtv) } - case "CreatedAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + default: + _, _ = key, value - default: - return fmt.Errorf("expected timestamp to be a JSON Number, got %T instead", value) + } + } + *v = sv + return nil +} - } - } +type awsRestjson1_deserializeOpPutIntegration struct { +} - case "Description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected text to be of type string, got %T instead", value) - } - sv.Description = ptr.String(jtv) - } +func (*awsRestjson1_deserializeOpPutIntegration) ID() string { + return "OperationDeserializer" +} - case "EncryptionKey": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected encryptionKey to be of type string, got %T instead", value) - } - sv.EncryptionKey = ptr.String(jtv) - } +func (m *awsRestjson1_deserializeOpPutIntegration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } - case "ExpirationDays": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected expirationDaysInteger to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.ExpirationDays = ptr.Int32(int32(i64)) - } + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } - case "Fields": - if err := awsRestjson1_deserializeDocumentFieldMap(&sv.Fields, value); err != nil { - return err - } + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorPutIntegration(response, &metadata) + } + output := &PutIntegrationOutput{} + out.Result = output - case "Keys": - if err := awsRestjson1_deserializeDocumentKeyMap(&sv.Keys, value); err != nil { - return err - } + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) - case "LastUpdatedAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentPutIntegrationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPutIntegration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentPutIntegrationOutput(v **PutIntegrationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutIntegrationOutput + if *v == nil { + sv = &PutIntegrationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CreatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "DomainName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected name to be of type string, got %T instead", value) + } + sv.DomainName = ptr.String(jtv) + } + + case "LastUpdatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } sv.LastUpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: @@ -4622,13 +4858,13 @@ func awsRestjson1_deserializeOpDocumentPutProfileObjectTypeOutput(v **PutProfile return err } - case "TemplateId": + case "Uri": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected name to be of type string, got %T instead", value) + return fmt.Errorf("expected string1To255 to be of type string, got %T instead", value) } - sv.TemplateId = ptr.String(jtv) + sv.Uri = ptr.String(jtv) } default: @@ -4640,14 +4876,14 @@ func awsRestjson1_deserializeOpDocumentPutProfileObjectTypeOutput(v **PutProfile return nil } -type awsRestjson1_deserializeOpSearchProfiles struct { +type awsRestjson1_deserializeOpPutProfileObject struct { } -func (*awsRestjson1_deserializeOpSearchProfiles) ID() string { +func (*awsRestjson1_deserializeOpPutProfileObject) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpSearchProfiles) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutProfileObject) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4661,9 +4897,9 @@ func (m *awsRestjson1_deserializeOpSearchProfiles) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorSearchProfiles(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutProfileObject(response, &metadata) } - output := &SearchProfilesOutput{} + output := &PutProfileObjectOutput{} out.Result = output var buff [1024]byte @@ -4684,7 +4920,7 @@ func (m *awsRestjson1_deserializeOpSearchProfiles) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentSearchProfilesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentPutProfileObjectOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4697,7 +4933,7 @@ func (m *awsRestjson1_deserializeOpSearchProfiles) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorSearchProfiles(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutProfileObject(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4763,7 +4999,7 @@ func awsRestjson1_deserializeOpErrorSearchProfiles(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentSearchProfilesOutput(v **SearchProfilesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentPutProfileObjectOutput(v **PutProfileObjectOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4776,27 +5012,22 @@ func awsRestjson1_deserializeOpDocumentSearchProfilesOutput(v **SearchProfilesOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *SearchProfilesOutput + var sv *PutProfileObjectOutput if *v == nil { - sv = &SearchProfilesOutput{} + sv = &PutProfileObjectOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Items": - if err := awsRestjson1_deserializeDocumentProfileList(&sv.Items, value); err != nil { - return err - } - - case "NextToken": + case "ProfileObjectUniqueKey": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected token to be of type string, got %T instead", value) + return fmt.Errorf("expected string1To255 to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.ProfileObjectUniqueKey = ptr.String(jtv) } default: @@ -4808,14 +5039,14 @@ func awsRestjson1_deserializeOpDocumentSearchProfilesOutput(v **SearchProfilesOu return nil } -type awsRestjson1_deserializeOpTagResource struct { +type awsRestjson1_deserializeOpPutProfileObjectType struct { } -func (*awsRestjson1_deserializeOpTagResource) ID() string { +func (*awsRestjson1_deserializeOpPutProfileObjectType) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutProfileObjectType) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4829,15 +5060,43 @@ func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutProfileObjectType(response, &metadata) } - output := &TagResourceOutput{} + output := &PutProfileObjectTypeOutput{} out.Result = output + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentPutProfileObjectTypeOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + return out, metadata, err } -func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutProfileObjectType(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4878,6 +5137,9 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) @@ -4887,6 +5149,9 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -4897,27 +5162,429 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -type awsRestjson1_deserializeOpUntagResource struct { -} - -func (*awsRestjson1_deserializeOpUntagResource) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err +func awsRestjson1_deserializeOpDocumentPutProfileObjectTypeOutput(v **PutProfileObjectTypeOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil } - response, ok := out.RawResponse.(*smithyhttp.Response) + shape, ok := value.(map[string]interface{}) if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + return fmt.Errorf("unexpected JSON type %v", value) } - if response.StatusCode < 200 || response.StatusCode >= 300 { + var sv *PutProfileObjectTypeOutput + if *v == nil { + sv = &PutProfileObjectTypeOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AllowProfileCreation": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", value) + } + sv.AllowProfileCreation = jtv + } + + case "CreatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected text to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "EncryptionKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected encryptionKey to be of type string, got %T instead", value) + } + sv.EncryptionKey = ptr.String(jtv) + } + + case "ExpirationDays": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected expirationDaysInteger to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ExpirationDays = ptr.Int32(int32(i64)) + } + + case "Fields": + if err := awsRestjson1_deserializeDocumentFieldMap(&sv.Fields, value); err != nil { + return err + } + + case "Keys": + if err := awsRestjson1_deserializeDocumentKeyMap(&sv.Keys, value); err != nil { + return err + } + + case "LastUpdatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "ObjectTypeName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected typeName to be of type string, got %T instead", value) + } + sv.ObjectTypeName = ptr.String(jtv) + } + + case "SourceLastUpdatedTimestampFormat": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string1To255 to be of type string, got %T instead", value) + } + sv.SourceLastUpdatedTimestampFormat = ptr.String(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "TemplateId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected name to be of type string, got %T instead", value) + } + sv.TemplateId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpSearchProfiles struct { +} + +func (*awsRestjson1_deserializeOpSearchProfiles) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpSearchProfiles) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorSearchProfiles(response, &metadata) + } + output := &SearchProfilesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentSearchProfilesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorSearchProfiles(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentSearchProfilesOutput(v **SearchProfilesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *SearchProfilesOutput + if *v == nil { + sv = &SearchProfilesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Items": + if err := awsRestjson1_deserializeDocumentProfileList(&sv.Items, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected token to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpTagResource struct { +} + +func (*awsRestjson1_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) + } + output := &TagResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUntagResource struct { +} + +func (*awsRestjson1_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) } output := &UntagResourceOutput{} @@ -5762,6 +6429,56 @@ func awsRestjson1_deserializeDocumentAttributes(v *map[string]string, value inte return nil } +func awsRestjson1_deserializeDocumentAutoMerging(v **types.AutoMerging, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AutoMerging + if *v == nil { + sv = &types.AutoMerging{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ConflictResolution": + if err := awsRestjson1_deserializeDocumentConflictResolution(&sv.ConflictResolution, value); err != nil { + return err + } + + case "Consolidation": + if err := awsRestjson1_deserializeDocumentConsolidation(&sv.Consolidation, value); err != nil { + return err + } + + case "Enabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected optionalBoolean to be of type *bool, got %T instead", value) + } + sv.Enabled = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentBadRequestException(v **types.BadRequestException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -5784,13 +6501,98 @@ func awsRestjson1_deserializeDocumentBadRequestException(v **types.BadRequestExc for key, value := range shape { switch key { - case "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected message to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentConflictResolution(v **types.ConflictResolution, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConflictResolution + if *v == nil { + sv = &types.ConflictResolution{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ConflictResolvingModel": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConflictResolvingModel to be of type string, got %T instead", value) + } + sv.ConflictResolvingModel = types.ConflictResolvingModel(jtv) + } + + case "SourceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string1To255 to be of type string, got %T instead", value) + } + sv.SourceName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentConsolidation(v **types.Consolidation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Consolidation + if *v == nil { + sv = &types.Consolidation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "MatchingAttributesList": + if err := awsRestjson1_deserializeDocumentMatchingAttributesList(&sv.MatchingAttributesList, value); err != nil { + return err } default: @@ -5919,6 +6721,78 @@ func awsRestjson1_deserializeDocumentDomainStats(v **types.DomainStats, value in return nil } +func awsRestjson1_deserializeDocumentExportingConfig(v **types.ExportingConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ExportingConfig + if *v == nil { + sv = &types.ExportingConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "S3Exporting": + if err := awsRestjson1_deserializeDocumentS3ExportingConfig(&sv.S3Exporting, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentExportingLocation(v **types.ExportingLocation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ExportingLocation + if *v == nil { + sv = &types.ExportingLocation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "S3Exporting": + if err := awsRestjson1_deserializeDocumentS3ExportingLocation(&sv.S3Exporting, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentFieldMap(v *map[string]types.ObjectTypeField, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -5981,16 +6855,233 @@ func awsRestjson1_deserializeDocumentFieldNameList(v *[]string, value interface{ if !ok { return fmt.Errorf("expected name to be of type string, got %T instead", value) } - col = jtv - } - cv = append(cv, col) + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentIdentityResolutionJob(v **types.IdentityResolutionJob, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.IdentityResolutionJob + if *v == nil { + sv = &types.IdentityResolutionJob{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DomainName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected name to be of type string, got %T instead", value) + } + sv.DomainName = ptr.String(jtv) + } + + case "ExportingLocation": + if err := awsRestjson1_deserializeDocumentExportingLocation(&sv.ExportingLocation, value); err != nil { + return err + } + + case "JobEndTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.JobEndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "JobId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected uuid to be of type string, got %T instead", value) + } + sv.JobId = ptr.String(jtv) + } + + case "JobStartTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.JobStartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "JobStats": + if err := awsRestjson1_deserializeDocumentJobStats(&sv.JobStats, value); err != nil { + return err + } + + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected stringTo2048 to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdentityResolutionJobStatus to be of type string, got %T instead", value) + } + sv.Status = types.IdentityResolutionJobStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentIdentityResolutionJobsList(v *[]types.IdentityResolutionJob, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.IdentityResolutionJob + if *v == nil { + cv = []types.IdentityResolutionJob{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.IdentityResolutionJob + destAddr := &col + if err := awsRestjson1_deserializeDocumentIdentityResolutionJob(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentIntegrationList(v *[]types.ListIntegrationItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ListIntegrationItem + if *v == nil { + cv = []types.ListIntegrationItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ListIntegrationItem + destAddr := &col + if err := awsRestjson1_deserializeDocumentListIntegrationItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InternalServerException + if *v == nil { + sv = &types.InternalServerException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocumentIntegrationList(v *[]types.ListIntegrationItem, value interface{}) error { +func awsRestjson1_deserializeDocumentJobSchedule(v **types.JobSchedule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5998,33 +7089,48 @@ func awsRestjson1_deserializeDocumentIntegrationList(v *[]types.ListIntegrationI return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ListIntegrationItem + var sv *types.JobSchedule if *v == nil { - cv = []types.ListIntegrationItem{} + sv = &types.JobSchedule{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.ListIntegrationItem - destAddr := &col - if err := awsRestjson1_deserializeDocumentListIntegrationItem(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "DayOfTheWeek": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobScheduleDayOfTheWeek to be of type string, got %T instead", value) + } + sv.DayOfTheWeek = types.JobScheduleDayOfTheWeek(jtv) + } + + case "Time": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobScheduleTime to be of type string, got %T instead", value) + } + sv.Time = ptr.String(jtv) + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { +func awsRestjson1_deserializeDocumentJobStats(v **types.JobStats, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6037,22 +7143,52 @@ func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalS return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InternalServerException + var sv *types.JobStats if *v == nil { - sv = &types.InternalServerException{} + sv = &types.JobStats{} } else { sv = *v } for key, value := range shape { switch key { - case "Message": + case "NumberOfMatchesFound": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected message to be of type string, got %T instead", value) + return fmt.Errorf("expected long to be json.Number, got %T instead", value) } - sv.Message = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.NumberOfMatchesFound = i64 + } + + case "NumberOfMergesDone": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.NumberOfMergesDone = i64 + } + + case "NumberOfProfilesReviewed": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.NumberOfProfilesReviewed = i64 } default: @@ -6506,6 +7642,74 @@ func awsRestjson1_deserializeDocumentMatchesList(v *[]types.MatchItem, value int return nil } +func awsRestjson1_deserializeDocumentMatchingAttributes(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string1To255 to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentMatchingAttributesList(v *[][]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv [][]string + if *v == nil { + cv = [][]string{} + } else { + cv = *v + } + + for _, value := range shape { + var col []string + if err := awsRestjson1_deserializeDocumentMatchingAttributes(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentMatchingResponse(v **types.MatchingResponse, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6528,6 +7732,11 @@ func awsRestjson1_deserializeDocumentMatchingResponse(v **types.MatchingResponse for key, value := range shape { switch key { + case "AutoMerging": + if err := awsRestjson1_deserializeDocumentAutoMerging(&sv.AutoMerging, value); err != nil { + return err + } + case "Enabled": if value != nil { jtv, ok := value.(bool) @@ -6537,6 +7746,16 @@ func awsRestjson1_deserializeDocumentMatchingResponse(v **types.MatchingResponse sv.Enabled = ptr.Bool(jtv) } + case "ExportingConfig": + if err := awsRestjson1_deserializeDocumentExportingConfig(&sv.ExportingConfig, value); err != nil { + return err + } + + case "JobSchedule": + if err := awsRestjson1_deserializeDocumentJobSchedule(&sv.JobSchedule, value); err != nil { + return err + } + default: _, _ = key, value @@ -6568,6 +7787,40 @@ func awsRestjson1_deserializeDocumentMatchItem(v **types.MatchItem, value interf for key, value := range shape { switch key { + case "ConfidenceScore": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ConfidenceScore = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.ConfidenceScore = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + case "MatchId": if value != nil { jtv, ok := value.(string) @@ -7181,6 +8434,104 @@ func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.Resourc return nil } +func awsRestjson1_deserializeDocumentS3ExportingConfig(v **types.S3ExportingConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.S3ExportingConfig + if *v == nil { + sv = &types.S3ExportingConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "S3BucketName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected s3BucketName to be of type string, got %T instead", value) + } + sv.S3BucketName = ptr.String(jtv) + } + + case "S3KeyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected s3KeyNameCustomerOutputConfig to be of type string, got %T instead", value) + } + sv.S3KeyName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentS3ExportingLocation(v **types.S3ExportingLocation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.S3ExportingLocation + if *v == nil { + sv = &types.S3ExportingLocation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "S3BucketName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected s3BucketName to be of type string, got %T instead", value) + } + sv.S3BucketName = ptr.String(jtv) + } + + case "S3KeyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected s3KeyName to be of type string, got %T instead", value) + } + sv.S3KeyName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentStandardIdentifierList(v *[]types.StandardIdentifier, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/customerprofiles/generated.json b/service/customerprofiles/generated.json index b7b4a9831ae..ff8dc717413 100644 --- a/service/customerprofiles/generated.json +++ b/service/customerprofiles/generated.json @@ -16,13 +16,16 @@ "api_op_DeleteProfileKey.go", "api_op_DeleteProfileObject.go", "api_op_DeleteProfileObjectType.go", + "api_op_GetAutoMergingPreview.go", "api_op_GetDomain.go", + "api_op_GetIdentityResolutionJob.go", "api_op_GetIntegration.go", "api_op_GetMatches.go", "api_op_GetProfileObjectType.go", "api_op_GetProfileObjectTypeTemplate.go", "api_op_ListAccountIntegrations.go", "api_op_ListDomains.go", + "api_op_ListIdentityResolutionJobs.go", "api_op_ListIntegrations.go", "api_op_ListProfileObjectTypeTemplates.go", "api_op_ListProfileObjectTypes.go", diff --git a/service/customerprofiles/serializers.go b/service/customerprofiles/serializers.go index 8ca3dbbb71d..345fcf53e3a 100644 --- a/service/customerprofiles/serializers.go +++ b/service/customerprofiles/serializers.go @@ -875,6 +875,96 @@ func awsRestjson1_serializeOpHttpBindingsDeleteProfileObjectTypeInput(v *DeleteP return nil } +type awsRestjson1_serializeOpGetAutoMergingPreview struct { +} + +func (*awsRestjson1_serializeOpGetAutoMergingPreview) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetAutoMergingPreview) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetAutoMergingPreviewInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/domains/{DomainName}/identity-resolution-jobs/auto-merging-preview") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetAutoMergingPreviewInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentGetAutoMergingPreviewInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetAutoMergingPreviewInput(v *GetAutoMergingPreviewInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainName == nil || len(*v.DomainName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DomainName must not be empty")} + } + if v.DomainName != nil { + if err := encoder.SetURI("DomainName").String(*v.DomainName); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentGetAutoMergingPreviewInput(v *GetAutoMergingPreviewInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ConflictResolution != nil { + ok := object.Key("ConflictResolution") + if err := awsRestjson1_serializeDocumentConflictResolution(v.ConflictResolution, ok); err != nil { + return err + } + } + + if v.Consolidation != nil { + ok := object.Key("Consolidation") + if err := awsRestjson1_serializeDocumentConsolidation(v.Consolidation, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpGetDomain struct { } @@ -933,6 +1023,73 @@ func awsRestjson1_serializeOpHttpBindingsGetDomainInput(v *GetDomainInput, encod return nil } +type awsRestjson1_serializeOpGetIdentityResolutionJob struct { +} + +func (*awsRestjson1_serializeOpGetIdentityResolutionJob) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetIdentityResolutionJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetIdentityResolutionJobInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/domains/{DomainName}/identity-resolution-jobs/{JobId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetIdentityResolutionJobInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetIdentityResolutionJobInput(v *GetIdentityResolutionJobInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainName == nil || len(*v.DomainName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DomainName must not be empty")} + } + if v.DomainName != nil { + if err := encoder.SetURI("DomainName").String(*v.DomainName); err != nil { + return err + } + } + + if v.JobId == nil || len(*v.JobId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member JobId must not be empty")} + } + if v.JobId != nil { + if err := encoder.SetURI("JobId").String(*v.JobId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpGetIntegration struct { } @@ -1342,6 +1499,72 @@ func awsRestjson1_serializeOpHttpBindingsListDomainsInput(v *ListDomainsInput, e return nil } +type awsRestjson1_serializeOpListIdentityResolutionJobs struct { +} + +func (*awsRestjson1_serializeOpListIdentityResolutionJobs) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListIdentityResolutionJobs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListIdentityResolutionJobsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/domains/{DomainName}/identity-resolution-jobs") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListIdentityResolutionJobsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListIdentityResolutionJobsInput(v *ListIdentityResolutionJobsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainName == nil || len(*v.DomainName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DomainName must not be empty")} + } + if v.DomainName != nil { + if err := encoder.SetURI("DomainName").String(*v.DomainName); err != nil { + return err + } + } + + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) + } + + return nil +} + type awsRestjson1_serializeOpListIntegrations struct { } @@ -2087,6 +2310,11 @@ func awsRestjson1_serializeOpDocumentPutProfileObjectTypeInput(v *PutProfileObje } } + if v.SourceLastUpdatedTimestampFormat != nil { + ok := object.Key("SourceLastUpdatedTimestampFormat") + ok.String(*v.SourceLastUpdatedTimestampFormat) + } + if v.Tags != nil { ok := object.Key("Tags") if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { @@ -2725,6 +2953,49 @@ func awsRestjson1_serializeDocumentAttributeSourceIdMap(v map[string]string, val return nil } +func awsRestjson1_serializeDocumentAutoMerging(v *types.AutoMerging, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ConflictResolution != nil { + ok := object.Key("ConflictResolution") + if err := awsRestjson1_serializeDocumentConflictResolution(v.ConflictResolution, ok); err != nil { + return err + } + } + + if v.Consolidation != nil { + ok := object.Key("Consolidation") + if err := awsRestjson1_serializeDocumentConsolidation(v.Consolidation, ok); err != nil { + return err + } + } + + if v.Enabled != nil { + ok := object.Key("Enabled") + ok.Boolean(*v.Enabled) + } + + return nil +} + +func awsRestjson1_serializeDocumentConflictResolution(v *types.ConflictResolution, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.ConflictResolvingModel) > 0 { + ok := object.Key("ConflictResolvingModel") + ok.String(string(v.ConflictResolvingModel)) + } + + if v.SourceName != nil { + ok := object.Key("SourceName") + ok.String(*v.SourceName) + } + + return nil +} + func awsRestjson1_serializeDocumentConnectorOperator(v *types.ConnectorOperator, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2757,6 +3028,34 @@ func awsRestjson1_serializeDocumentConnectorOperator(v *types.ConnectorOperator, return nil } +func awsRestjson1_serializeDocumentConsolidation(v *types.Consolidation, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MatchingAttributesList != nil { + ok := object.Key("MatchingAttributesList") + if err := awsRestjson1_serializeDocumentMatchingAttributesList(v.MatchingAttributesList, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentExportingConfig(v *types.ExportingConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.S3Exporting != nil { + ok := object.Key("S3Exporting") + if err := awsRestjson1_serializeDocumentS3ExportingConfig(v.S3Exporting, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentFieldMap(v map[string]types.ObjectTypeField, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2951,6 +3250,23 @@ func awsRestjson1_serializeDocumentIncrementalPullConfig(v *types.IncrementalPul return nil } +func awsRestjson1_serializeDocumentJobSchedule(v *types.JobSchedule, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.DayOfTheWeek) > 0 { + ok := object.Key("DayOfTheWeek") + ok.String(string(v.DayOfTheWeek)) + } + + if v.Time != nil { + ok := object.Key("Time") + ok.String(*v.Time) + } + + return nil +} + func awsRestjson1_serializeDocumentKeyMap(v map[string][]types.ObjectTypeKey, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2979,15 +3295,63 @@ func awsRestjson1_serializeDocumentMarketoSourceProperties(v *types.MarketoSourc return nil } +func awsRestjson1_serializeDocumentMatchingAttributes(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentMatchingAttributesList(v [][]string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if vv := v[i]; vv == nil { + continue + } + if err := awsRestjson1_serializeDocumentMatchingAttributes(v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentMatchingRequest(v *types.MatchingRequest, value smithyjson.Value) error { object := value.Object() defer object.Close() + if v.AutoMerging != nil { + ok := object.Key("AutoMerging") + if err := awsRestjson1_serializeDocumentAutoMerging(v.AutoMerging, ok); err != nil { + return err + } + } + if v.Enabled != nil { ok := object.Key("Enabled") ok.Boolean(*v.Enabled) } + if v.ExportingConfig != nil { + ok := object.Key("ExportingConfig") + if err := awsRestjson1_serializeDocumentExportingConfig(v.ExportingConfig, ok); err != nil { + return err + } + } + + if v.JobSchedule != nil { + ok := object.Key("JobSchedule") + if err := awsRestjson1_serializeDocumentJobSchedule(v.JobSchedule, ok); err != nil { + return err + } + } + return nil } @@ -3088,6 +3452,23 @@ func awsRestjson1_serializeDocumentRequestValueList(v []string, value smithyjson return nil } +func awsRestjson1_serializeDocumentS3ExportingConfig(v *types.S3ExportingConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.S3BucketName != nil { + ok := object.Key("S3BucketName") + ok.String(*v.S3BucketName) + } + + if v.S3KeyName != nil { + ok := object.Key("S3KeyName") + ok.String(*v.S3KeyName) + } + + return nil +} + func awsRestjson1_serializeDocumentS3SourceProperties(v *types.S3SourceProperties, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/customerprofiles/types/enums.go b/service/customerprofiles/types/enums.go index 2321d4d2370..9a6cec946b0 100644 --- a/service/customerprofiles/types/enums.go +++ b/service/customerprofiles/types/enums.go @@ -2,6 +2,24 @@ package types +type ConflictResolvingModel string + +// Enum values for ConflictResolvingModel +const ( + ConflictResolvingModelRecency ConflictResolvingModel = "RECENCY" + ConflictResolvingModelSource ConflictResolvingModel = "SOURCE" +) + +// Values returns all known values for ConflictResolvingModel. Note that this can +// be expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ConflictResolvingModel) Values() []ConflictResolvingModel { + return []ConflictResolvingModel{ + "RECENCY", + "SOURCE", + } +} + type DataPullMode string // Enum values for DataPullMode @@ -64,6 +82,62 @@ func (Gender) Values() []Gender { } } +type IdentityResolutionJobStatus string + +// Enum values for IdentityResolutionJobStatus +const ( + IdentityResolutionJobStatusPending IdentityResolutionJobStatus = "PENDING" + IdentityResolutionJobStatusPreprocessing IdentityResolutionJobStatus = "PREPROCESSING" + IdentityResolutionJobStatusFindMatching IdentityResolutionJobStatus = "FIND_MATCHING" + IdentityResolutionJobStatusMerging IdentityResolutionJobStatus = "MERGING" + IdentityResolutionJobStatusCompleted IdentityResolutionJobStatus = "COMPLETED" + IdentityResolutionJobStatusPartialSuccess IdentityResolutionJobStatus = "PARTIAL_SUCCESS" + IdentityResolutionJobStatusFailed IdentityResolutionJobStatus = "FAILED" +) + +// Values returns all known values for IdentityResolutionJobStatus. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// The ordering of this slice is not guaranteed to be stable across updates. +func (IdentityResolutionJobStatus) Values() []IdentityResolutionJobStatus { + return []IdentityResolutionJobStatus{ + "PENDING", + "PREPROCESSING", + "FIND_MATCHING", + "MERGING", + "COMPLETED", + "PARTIAL_SUCCESS", + "FAILED", + } +} + +type JobScheduleDayOfTheWeek string + +// Enum values for JobScheduleDayOfTheWeek +const ( + JobScheduleDayOfTheWeekSunday JobScheduleDayOfTheWeek = "SUNDAY" + JobScheduleDayOfTheWeekMonday JobScheduleDayOfTheWeek = "MONDAY" + JobScheduleDayOfTheWeekTuesday JobScheduleDayOfTheWeek = "TUESDAY" + JobScheduleDayOfTheWeekWednesday JobScheduleDayOfTheWeek = "WEDNESDAY" + JobScheduleDayOfTheWeekThursday JobScheduleDayOfTheWeek = "THURSDAY" + JobScheduleDayOfTheWeekFriday JobScheduleDayOfTheWeek = "FRIDAY" + JobScheduleDayOfTheWeekSaturday JobScheduleDayOfTheWeek = "SATURDAY" +) + +// Values returns all known values for JobScheduleDayOfTheWeek. Note that this can +// be expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (JobScheduleDayOfTheWeek) Values() []JobScheduleDayOfTheWeek { + return []JobScheduleDayOfTheWeek{ + "SUNDAY", + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + } +} + type MarketoConnectorOperator string // Enum values for MarketoConnectorOperator diff --git a/service/customerprofiles/types/types.go b/service/customerprofiles/types/types.go index 2b07a81a60d..6b155bc2d80 100644 --- a/service/customerprofiles/types/types.go +++ b/service/customerprofiles/types/types.go @@ -44,6 +44,51 @@ type Address struct { noSmithyDocumentSerde } +// Configuration settings for how to perform the auto-merging of profiles. +type AutoMerging struct { + + // The flag that enables the auto-merging of duplicate profiles. + // + // This member is required. + Enabled *bool + + // How the auto-merging process should resolve conflicts between different + // profiles. For example, if Profile A and Profile B have the same FirstName and + // LastName (and that is the matching criteria), which EmailAddress should be used? + ConflictResolution *ConflictResolution + + // A list of matching attributes that represent matching criteria. If two profiles + // meet at least one of the requirements in the matching attributes list, they will + // be merged. + Consolidation *Consolidation + + noSmithyDocumentSerde +} + +// How the auto-merging process should resolve conflicts between different +// profiles. +type ConflictResolution struct { + + // How the auto-merging process should resolve conflicts between different + // profiles. + // + // * RECENCY: Uses the data that was most recently updated. + // + // * SOURCE: + // Uses the data from a specific source. For example, if a company has been aquired + // or two departments have merged, data from the specified source is used. If two + // duplicate profiles are from the same source, then RECENCY is used again. + // + // This member is required. + ConflictResolvingModel ConflictResolvingModel + + // The ObjectType name that is used to resolve profile merging conflicts when + // choosing SOURCE as the ConflictResolvingModel. + SourceName *string + + noSmithyDocumentSerde +} + // The operation to be performed on the provided source fields. type ConnectorOperator struct { @@ -65,6 +110,17 @@ type ConnectorOperator struct { noSmithyDocumentSerde } +// The matching criteria to be used during the auto-merging process. +type Consolidation struct { + + // A list of matching criteria. + // + // This member is required. + MatchingAttributesList [][]string + + noSmithyDocumentSerde +} + // Usage-specific statistics about the domain. type DomainStats struct { @@ -86,6 +142,30 @@ type DomainStats struct { noSmithyDocumentSerde } +// Configuration information about the S3 bucket where Identity Resolution Jobs +// writes result files. You need to give Customer Profiles service principal write +// permission to your S3 bucket. Otherwise, you'll get an exception in the API +// response. For an example policy, see Amazon Connect Customer Profiles +// cross-service confused deputy prevention +// (https://docs.aws.amazon.com/connect/latest/adminguide/cross-service-confused-deputy-prevention.html#customer-profiles-cross-service). +type ExportingConfig struct { + + // The S3 location where Identity Resolution Jobs write result files. + S3Exporting *S3ExportingConfig + + noSmithyDocumentSerde +} + +// The S3 location where Identity Resolution Jobs write result files. +type ExportingLocation struct { + + // Information about the S3 location where Identity Resolution Jobs write result + // files. + S3Exporting *S3ExportingLocation + + noSmithyDocumentSerde +} + // A duplicate customer profile that is to be merged into a main profile. type FieldSourceProfileIds struct { @@ -195,6 +275,61 @@ type FlowDefinition struct { noSmithyDocumentSerde } +// Information about the Identity Resolution Job. +type IdentityResolutionJob struct { + + // The unique name of the domain. + DomainName *string + + // The S3 location where the Identity Resolution Job writes result files. + ExportingLocation *ExportingLocation + + // The timestamp of when the job was completed. + JobEndTime *time.Time + + // The unique identifier of the Identity Resolution Job. + JobId *string + + // The timestamp of when the job was started or will be started. + JobStartTime *time.Time + + // Statistics about an Identity Resolution Job. + JobStats *JobStats + + // The error messages that are generated when the Identity Resolution Job runs. + Message *string + + // The status of the Identity Resolution Job. + // + // * PENDING: The Identity Resolution + // Job is scheduled but has not started yet. If you turn off the Identity + // Resolution feature in your domain, jobs in the PENDING state are deleted. + // + // * + // PREPROCESSING: The Identity Resolution Job is loading your data. + // + // * + // FIND_MATCHING: The Identity Resolution Job is using the machine learning model + // to identify profiles that belong to the same matching group. + // + // * MERGING: The + // Identity Resolution Job is merging duplicate profiles. + // + // * COMPLETED: The + // Identity Resolution Job completed successfully. + // + // * PARTIAL_SUCCESS: There's a + // system error and not all of the data is merged. The Identity Resolution Job + // writes a message indicating the source of the problem. + // + // * FAILED: The Identity + // Resolution Job did not merge any data. It writes a message indicating the source + // of the problem. + Status IdentityResolutionJobStatus + + noSmithyDocumentSerde +} + // Specifies the configuration used when importing incremental records from the // source. type IncrementalPullConfig struct { @@ -206,6 +341,38 @@ type IncrementalPullConfig struct { noSmithyDocumentSerde } +// The day and time when do you want to start the Identity Resolution Job every +// week. +type JobSchedule struct { + + // The day when the Identity Resolution Job should run every week. + // + // This member is required. + DayOfTheWeek JobScheduleDayOfTheWeek + + // The time when the Identity Resolution Job should run every week. + // + // This member is required. + Time *string + + noSmithyDocumentSerde +} + +// Statistics about the Identity Resolution Job. +type JobStats struct { + + // The number of matches found. + NumberOfMatchesFound int64 + + // The number of merges completed. + NumberOfMergesDone int64 + + // The number of profiles reviewed. + NumberOfProfilesReviewed int64 + + noSmithyDocumentSerde +} + // An object in a list that represents a domain. type ListDomainItem struct { @@ -339,21 +506,47 @@ type MatchingRequest struct { // This member is required. Enabled *bool + // Configuration information about the auto-merging process. + AutoMerging *AutoMerging + + // Configuration information for exporting Identity Resolution results, for + // example, to an S3 bucket. + ExportingConfig *ExportingConfig + + // The day and time when do you want to start the Identity Resolution Job every + // week. + JobSchedule *JobSchedule + noSmithyDocumentSerde } // The flag that enables the matching process of duplicate profiles. type MatchingResponse struct { + // Configuration information about the auto-merging process. + AutoMerging *AutoMerging + // The flag that enables the matching process of duplicate profiles. Enabled *bool + // Configuration information for exporting Identity Resolution results, for + // example, to an S3 bucket. + ExportingConfig *ExportingConfig + + // The day and time when do you want to start the Identity Resolution Job every + // week. + JobSchedule *JobSchedule + noSmithyDocumentSerde } // The Match group object. type MatchItem struct { + // A number between 0 and 1 that represents the confidence level of assigning + // profiles to a matching group. A score of 1 likely indicates an exact match. + ConfidenceScore *float64 + // The unique identifiers for this group of profiles that match. MatchId *string @@ -497,6 +690,36 @@ type Profile struct { noSmithyDocumentSerde } +// Configuration information about the S3 bucket where Identity Resolution Jobs +// write result files. +type S3ExportingConfig struct { + + // The name of the S3 bucket where Identity Resolution Jobs write result files. + // + // This member is required. + S3BucketName *string + + // The S3 key name of the location where Identity Resolution Jobs write result + // files. + S3KeyName *string + + noSmithyDocumentSerde +} + +// The S3 location where Identity Resolution Jobs write result files. +type S3ExportingLocation struct { + + // The name of the S3 bucket name where Identity Resolution Jobs write result + // files. + S3BucketName *string + + // The S3 key name of the location where Identity Resolution Jobs write result + // files. + S3KeyName *string + + noSmithyDocumentSerde +} + // The properties that are applied when Amazon S3 is being used as the flow source. type S3SourceProperties struct { diff --git a/service/customerprofiles/validators.go b/service/customerprofiles/validators.go index cb1417fc74a..64438209456 100644 --- a/service/customerprofiles/validators.go +++ b/service/customerprofiles/validators.go @@ -190,6 +190,26 @@ func (m *validateOpDeleteProfileObjectType) HandleInitialize(ctx context.Context return next.HandleInitialize(ctx, in) } +type validateOpGetAutoMergingPreview struct { +} + +func (*validateOpGetAutoMergingPreview) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetAutoMergingPreview) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetAutoMergingPreviewInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetAutoMergingPreviewInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetDomain struct { } @@ -210,6 +230,26 @@ func (m *validateOpGetDomain) HandleInitialize(ctx context.Context, in middlewar return next.HandleInitialize(ctx, in) } +type validateOpGetIdentityResolutionJob struct { +} + +func (*validateOpGetIdentityResolutionJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetIdentityResolutionJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetIdentityResolutionJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetIdentityResolutionJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetIntegration struct { } @@ -310,6 +350,26 @@ func (m *validateOpListAccountIntegrations) HandleInitialize(ctx context.Context return next.HandleInitialize(ctx, in) } +type validateOpListIdentityResolutionJobs struct { +} + +func (*validateOpListIdentityResolutionJobs) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListIdentityResolutionJobs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListIdentityResolutionJobsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListIdentityResolutionJobsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListIntegrations struct { } @@ -606,10 +666,18 @@ func addOpDeleteProfileObjectTypeValidationMiddleware(stack *middleware.Stack) e return stack.Initialize.Add(&validateOpDeleteProfileObjectType{}, middleware.After) } +func addOpGetAutoMergingPreviewValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetAutoMergingPreview{}, middleware.After) +} + func addOpGetDomainValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetDomain{}, middleware.After) } +func addOpGetIdentityResolutionJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetIdentityResolutionJob{}, middleware.After) +} + func addOpGetIntegrationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetIntegration{}, middleware.After) } @@ -630,6 +698,10 @@ func addOpListAccountIntegrationsValidationMiddleware(stack *middleware.Stack) e return stack.Initialize.Add(&validateOpListAccountIntegrations{}, middleware.After) } +func addOpListIdentityResolutionJobsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListIdentityResolutionJobs{}, middleware.After) +} + func addOpListIntegrationsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListIntegrations{}, middleware.After) } @@ -682,6 +754,78 @@ func addOpUpdateProfileValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateProfile{}, middleware.After) } +func validateAutoMerging(v *types.AutoMerging) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AutoMerging"} + if v.Enabled == nil { + invalidParams.Add(smithy.NewErrParamRequired("Enabled")) + } + if v.Consolidation != nil { + if err := validateConsolidation(v.Consolidation); err != nil { + invalidParams.AddNested("Consolidation", err.(smithy.InvalidParamsError)) + } + } + if v.ConflictResolution != nil { + if err := validateConflictResolution(v.ConflictResolution); err != nil { + invalidParams.AddNested("ConflictResolution", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateConflictResolution(v *types.ConflictResolution) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ConflictResolution"} + if len(v.ConflictResolvingModel) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ConflictResolvingModel")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateConsolidation(v *types.Consolidation) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Consolidation"} + if v.MatchingAttributesList == nil { + invalidParams.Add(smithy.NewErrParamRequired("MatchingAttributesList")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateExportingConfig(v *types.ExportingConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ExportingConfig"} + if v.S3Exporting != nil { + if err := validateS3ExportingConfig(v.S3Exporting); err != nil { + invalidParams.AddNested("S3Exporting", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateFlowDefinition(v *types.FlowDefinition) error { if v == nil { return nil @@ -721,6 +865,24 @@ func validateFlowDefinition(v *types.FlowDefinition) error { } } +func validateJobSchedule(v *types.JobSchedule) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "JobSchedule"} + if len(v.DayOfTheWeek) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("DayOfTheWeek")) + } + if v.Time == nil { + invalidParams.Add(smithy.NewErrParamRequired("Time")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateMarketoSourceProperties(v *types.MarketoSourceProperties) error { if v == nil { return nil @@ -744,6 +906,21 @@ func validateMatchingRequest(v *types.MatchingRequest) error { if v.Enabled == nil { invalidParams.Add(smithy.NewErrParamRequired("Enabled")) } + if v.JobSchedule != nil { + if err := validateJobSchedule(v.JobSchedule); err != nil { + invalidParams.AddNested("JobSchedule", err.(smithy.InvalidParamsError)) + } + } + if v.AutoMerging != nil { + if err := validateAutoMerging(v.AutoMerging); err != nil { + invalidParams.AddNested("AutoMerging", err.(smithy.InvalidParamsError)) + } + } + if v.ExportingConfig != nil { + if err := validateExportingConfig(v.ExportingConfig); err != nil { + invalidParams.AddNested("ExportingConfig", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -769,6 +946,21 @@ func validateObjectFilter(v *types.ObjectFilter) error { } } +func validateS3ExportingConfig(v *types.S3ExportingConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "S3ExportingConfig"} + if v.S3BucketName == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3BucketName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateS3SourceProperties(v *types.S3SourceProperties) error { if v == nil { return nil @@ -1154,6 +1346,35 @@ func validateOpDeleteProfileObjectTypeInput(v *DeleteProfileObjectTypeInput) err } } +func validateOpGetAutoMergingPreviewInput(v *GetAutoMergingPreviewInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetAutoMergingPreviewInput"} + if v.DomainName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainName")) + } + if v.Consolidation == nil { + invalidParams.Add(smithy.NewErrParamRequired("Consolidation")) + } else if v.Consolidation != nil { + if err := validateConsolidation(v.Consolidation); err != nil { + invalidParams.AddNested("Consolidation", err.(smithy.InvalidParamsError)) + } + } + if v.ConflictResolution == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConflictResolution")) + } else if v.ConflictResolution != nil { + if err := validateConflictResolution(v.ConflictResolution); err != nil { + invalidParams.AddNested("ConflictResolution", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetDomainInput(v *GetDomainInput) error { if v == nil { return nil @@ -1169,6 +1390,24 @@ func validateOpGetDomainInput(v *GetDomainInput) error { } } +func validateOpGetIdentityResolutionJobInput(v *GetIdentityResolutionJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetIdentityResolutionJobInput"} + if v.DomainName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainName")) + } + if v.JobId == nil { + invalidParams.Add(smithy.NewErrParamRequired("JobId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetIntegrationInput(v *GetIntegrationInput) error { if v == nil { return nil @@ -1250,6 +1489,21 @@ func validateOpListAccountIntegrationsInput(v *ListAccountIntegrationsInput) err } } +func validateOpListIdentityResolutionJobsInput(v *ListIdentityResolutionJobsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListIdentityResolutionJobsInput"} + if v.DomainName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListIntegrationsInput(v *ListIntegrationsInput) error { if v == nil { return nil diff --git a/service/databasemigrationservice/api_op_StartReplicationTaskAssessment.go b/service/databasemigrationservice/api_op_StartReplicationTaskAssessment.go index d419dbd6efa..4234bd47363 100644 --- a/service/databasemigrationservice/api_op_StartReplicationTaskAssessment.go +++ b/service/databasemigrationservice/api_op_StartReplicationTaskAssessment.go @@ -12,7 +12,19 @@ import ( ) // Starts the replication task assessment for unsupported data types in the source -// database. +// database. You can only use this operation for a task if the following conditions +// are true: +// +// * The task must be in the stopped state. +// +// * The task must have +// successful connections to the source and target. +// +// If either of these conditions +// are not met, an InvalidResourceStateFault error will result. For information +// about DMS task assessments, see Creating a task assessment report +// (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.AssessmentReport.html) +// in the Database Migration Service User Guide. func (c *Client) StartReplicationTaskAssessment(ctx context.Context, params *StartReplicationTaskAssessmentInput, optFns ...func(*Options)) (*StartReplicationTaskAssessmentOutput, error) { if params == nil { params = &StartReplicationTaskAssessmentInput{} diff --git a/service/databasemigrationservice/deserializers.go b/service/databasemigrationservice/deserializers.go index 534ec037a5b..8659048178a 100644 --- a/service/databasemigrationservice/deserializers.go +++ b/service/databasemigrationservice/deserializers.go @@ -14162,6 +14162,15 @@ func awsAwsjson11_deserializeDocumentS3Settings(v **types.S3Settings, value inte sv.DatePartitionSequence = types.DatePartitionSequenceValue(jtv) } + case "DatePartitionTimezone": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.DatePartitionTimezone = ptr.String(jtv) + } + case "DictPageSizeLimit": if value != nil { jtv, ok := value.(json.Number) diff --git a/service/databasemigrationservice/serializers.go b/service/databasemigrationservice/serializers.go index a58920ed0d1..6cb8efede52 100644 --- a/service/databasemigrationservice/serializers.go +++ b/service/databasemigrationservice/serializers.go @@ -4432,6 +4432,11 @@ func awsAwsjson11_serializeDocumentS3Settings(v *types.S3Settings, value smithyj ok.String(string(v.DatePartitionSequence)) } + if v.DatePartitionTimezone != nil { + ok := object.Key("DatePartitionTimezone") + ok.String(*v.DatePartitionTimezone) + } + if v.DictPageSizeLimit != nil { ok := object.Key("DictPageSizeLimit") ok.Integer(*v.DictPageSizeLimit) diff --git a/service/databasemigrationservice/types/types.go b/service/databasemigrationservice/types/types.go index 094d6ceab48..525629378df 100644 --- a/service/databasemigrationservice/types/types.go +++ b/service/databasemigrationservice/types/types.go @@ -2565,6 +2565,16 @@ type S3Settings struct { // set to true. DatePartitionSequence DatePartitionSequenceValue + // When creating an S3 target endpoint, set DatePartitionTimezone to convert the + // current UTC time into a specified time zone. The conversion occurs when a date + // partition folder is created and a CDC filename is generated. The time zone + // format is Area/Location. Use this parameter when DatePartitionedEnabled is set + // to true, as shown in the following example. + // s3-settings='{"DatePartitionEnabled": true, "DatePartitionSequence": + // "YYYYMMDDHH", "DatePartitionDelimiter": "SLASH", + // "DatePartitionTimezone":"Asia/Seoul", "BucketName": "dms-nattarat-test"}' + DatePartitionTimezone *string + // The maximum size of an encoded dictionary page of a column. If the dictionary // page exceeds this, this column is stored using an encoding type of PLAIN. This // parameter defaults to 1024 * 1024 bytes (1 MiB), the maximum size of a diff --git a/service/dataexchange/api_op_GetAsset.go b/service/dataexchange/api_op_GetAsset.go index 81946def9e1..358e63d41b4 100644 --- a/service/dataexchange/api_op_GetAsset.go +++ b/service/dataexchange/api_op_GetAsset.go @@ -70,7 +70,9 @@ type GetAssetOutput struct { // The name of the asset. When importing from Amazon S3, the S3 object key is used // as the asset name. When exporting to Amazon S3, the asset name is used as - // default target S3 object key. + // default target S3 object key. When importing from Amazon API Gateway API, the + // API name is used as the asset name. When importing from Amazon Redshift, the + // datashare name is used as the asset name. Name *string // The unique identifier for the revision associated with this asset. diff --git a/service/dataexchange/api_op_SendApiAsset.go b/service/dataexchange/api_op_SendApiAsset.go new file mode 100644 index 00000000000..93e5868dc21 --- /dev/null +++ b/service/dataexchange/api_op_SendApiAsset.go @@ -0,0 +1,189 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package dataexchange + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// This operation invokes an API Gateway API asset. The request is proxied to the +// provider’s API Gateway API. +func (c *Client) SendApiAsset(ctx context.Context, params *SendApiAssetInput, optFns ...func(*Options)) (*SendApiAssetOutput, error) { + if params == nil { + params = &SendApiAssetInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SendApiAsset", params, optFns, c.addOperationSendApiAssetMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SendApiAssetOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The request body for SendApiAsset. +type SendApiAssetInput struct { + + // Asset ID value for the API request. + // + // This member is required. + AssetId *string + + // Data set ID value for the API request. + // + // This member is required. + DataSetId *string + + // Revision ID value for the API request. + // + // This member is required. + RevisionId *string + + // The request body. + Body *string + + // HTTP method value for the API request. Alternatively, you can use the + // appropriate verb in your request. + Method *string + + // URI path value for the API request. Alternatively, you can set the URI path + // directly by invoking /v1/{pathValue} + Path *string + + // Attach query string parameters to the end of the URI (for example, + // /v1/examplePath?exampleParam=exampleValue). + QueryStringParameters map[string]string + + // Any header value prefixed with x-amzn-dataexchange-header- will have that + // stripped before sending the Asset API request. Use this when you want to + // override a header that AWS Data Exchange uses. Alternatively, you can use the + // header without a prefix to the HTTP request. + RequestHeaders map[string]string + + noSmithyDocumentSerde +} + +type SendApiAssetOutput struct { + + // The response body from the underlying API tracked by the API asset. + Body *string + + // The response headers from the underlying API tracked by the API asset. + // + // Map keys will be normalized to lower-case. + ResponseHeaders map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSendApiAssetMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpSendApiAsset{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpSendApiAsset{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addEndpointPrefix_opSendApiAssetMiddleware(stack); err != nil { + return err + } + if err = addOpSendApiAssetValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSendApiAsset(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type endpointPrefix_opSendApiAssetMiddleware struct { +} + +func (*endpointPrefix_opSendApiAssetMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opSendApiAssetMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api-fulfill." + req.URL.Host + + return next.HandleSerialize(ctx, in) +} +func addEndpointPrefix_opSendApiAssetMiddleware(stack *middleware.Stack) error { + return stack.Serialize.Insert(&endpointPrefix_opSendApiAssetMiddleware{}, `OperationSerializer`, middleware.After) +} + +func newServiceMetadataMiddleware_opSendApiAsset(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "dataexchange", + OperationName: "SendApiAsset", + } +} diff --git a/service/dataexchange/api_op_UpdateAsset.go b/service/dataexchange/api_op_UpdateAsset.go index f00e9c425d5..8b2aa602631 100644 --- a/service/dataexchange/api_op_UpdateAsset.go +++ b/service/dataexchange/api_op_UpdateAsset.go @@ -43,7 +43,9 @@ type UpdateAssetInput struct { // The name of the asset. When importing from Amazon S3, the S3 object key is used // as the asset name. When exporting to Amazon S3, the asset name is used as - // default target S3 object key. + // default target S3 object key. When importing from Amazon API Gateway API, the + // API name is used as the asset name. When importing from Amazon Redshift, the + // datashare name is used as the asset name. // // This member is required. Name *string @@ -78,7 +80,9 @@ type UpdateAssetOutput struct { // The name of the asset. When importing from Amazon S3, the S3 object key is used // as the asset name. When exporting to Amazon S3, the asset name is used as - // default target S3 object key. + // default target S3 object key. When importing from Amazon API Gateway API, the + // API name is used as the asset name. When importing from Amazon Redshift, the + // datashare name is used as the asset name. Name *string // The unique identifier for the revision associated with this asset. diff --git a/service/dataexchange/deserializers.go b/service/dataexchange/deserializers.go index ef712cd9573..b690b67cef9 100644 --- a/service/dataexchange/deserializers.go +++ b/service/dataexchange/deserializers.go @@ -3586,6 +3586,143 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return nil } +type awsRestjson1_deserializeOpSendApiAsset struct { +} + +func (*awsRestjson1_deserializeOpSendApiAsset) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpSendApiAsset) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorSendApiAsset(response, &metadata) + } + output := &SendApiAssetOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsSendApiAssetOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + err = awsRestjson1_deserializeOpDocumentSendApiAssetOutput(output, response.Body) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)} + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorSendApiAsset(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsSendApiAssetOutput(v *SendApiAssetOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + for headerKey, headerValues := range response.Header { + if lenPrefix := len(""); len(headerKey) >= lenPrefix && strings.EqualFold(headerKey[:lenPrefix], "") { + if v.ResponseHeaders == nil { + v.ResponseHeaders = map[string]string{} + } + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ResponseHeaders[strings.ToLower(headerKey[lenPrefix:])] = headerValues[0] + } + } + + return nil +} +func awsRestjson1_deserializeOpDocumentSendApiAssetOutput(v *SendApiAssetOutput, body io.ReadCloser) error { + if v == nil { + return fmt.Errorf("unsupported deserialization of nil %T", v) + } + + bs, err := ioutil.ReadAll(body) + if err != nil { + return err + } + if len(bs) > 0 { + v.Body = ptr.String(string(bs)) + } + return nil +} + type awsRestjson1_deserializeOpStartJob struct { } @@ -5128,6 +5265,122 @@ func awsRestjson1_deserializeDocumentAction(v **types.Action, value interface{}) return nil } +func awsRestjson1_deserializeDocumentApiGatewayApiAsset(v **types.ApiGatewayApiAsset, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ApiGatewayApiAsset + if *v == nil { + sv = &types.ApiGatewayApiAsset{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApiDescription": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApiDescription to be of type string, got %T instead", value) + } + sv.ApiDescription = ptr.String(jtv) + } + + case "ApiEndpoint": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.ApiEndpoint = ptr.String(jtv) + } + + case "ApiId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.ApiId = ptr.String(jtv) + } + + case "ApiKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.ApiKey = ptr.String(jtv) + } + + case "ApiName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.ApiName = ptr.String(jtv) + } + + case "ApiSpecificationDownloadUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.ApiSpecificationDownloadUrl = ptr.String(jtv) + } + + case "ApiSpecificationDownloadUrlExpiresAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ApiSpecificationDownloadUrlExpiresAt = ptr.Time(t) + } + + case "ProtocolType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProtocolType to be of type string, got %T instead", value) + } + sv.ProtocolType = types.ProtocolType(jtv) + } + + case "Stage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Stage = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentAssetDestinationEntry(v **types.AssetDestinationEntry, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -5208,6 +5461,11 @@ func awsRestjson1_deserializeDocumentAssetDetails(v **types.AssetDetails, value for key, value := range shape { switch key { + case "ApiGatewayApiAsset": + if err := awsRestjson1_deserializeDocumentApiGatewayApiAsset(&sv.ApiGatewayApiAsset, value); err != nil { + return err + } + case "RedshiftDataShareAsset": if err := awsRestjson1_deserializeDocumentRedshiftDataShareAsset(&sv.RedshiftDataShareAsset, value); err != nil { return err @@ -6083,6 +6341,140 @@ func awsRestjson1_deserializeDocumentExportServerSideEncryption(v **types.Export return nil } +func awsRestjson1_deserializeDocumentImportAssetFromApiGatewayApiResponseDetails(v **types.ImportAssetFromApiGatewayApiResponseDetails, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ImportAssetFromApiGatewayApiResponseDetails + if *v == nil { + sv = &types.ImportAssetFromApiGatewayApiResponseDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApiDescription": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApiDescription to be of type string, got %T instead", value) + } + sv.ApiDescription = ptr.String(jtv) + } + + case "ApiId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.ApiId = ptr.String(jtv) + } + + case "ApiKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.ApiKey = ptr.String(jtv) + } + + case "ApiName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.ApiName = ptr.String(jtv) + } + + case "ApiSpecificationMd5Hash": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin24Max24PatternAZaZ094AZaZ092AZaZ093 to be of type string, got %T instead", value) + } + sv.ApiSpecificationMd5Hash = ptr.String(jtv) + } + + case "ApiSpecificationUploadUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.ApiSpecificationUploadUrl = ptr.String(jtv) + } + + case "ApiSpecificationUploadUrlExpiresAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ApiSpecificationUploadUrlExpiresAt = ptr.Time(t) + } + + case "DataSetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Id to be of type string, got %T instead", value) + } + sv.DataSetId = ptr.String(jtv) + } + + case "ProtocolType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProtocolType to be of type string, got %T instead", value) + } + sv.ProtocolType = types.ProtocolType(jtv) + } + + case "RevisionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Id to be of type string, got %T instead", value) + } + sv.RevisionId = ptr.String(jtv) + } + + case "Stage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Stage = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentImportAssetFromSignedUrlJobErrorDetails(v **types.ImportAssetFromSignedUrlJobErrorDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -7169,6 +7561,11 @@ func awsRestjson1_deserializeDocumentResponseDetails(v **types.ResponseDetails, return err } + case "ImportAssetFromApiGatewayApi": + if err := awsRestjson1_deserializeDocumentImportAssetFromApiGatewayApiResponseDetails(&sv.ImportAssetFromApiGatewayApi, value); err != nil { + return err + } + case "ImportAssetFromSignedUrl": if err := awsRestjson1_deserializeDocumentImportAssetFromSignedUrlResponseDetails(&sv.ImportAssetFromSignedUrl, value); err != nil { return err diff --git a/service/dataexchange/generated.json b/service/dataexchange/generated.json index 94b862d8368..e1bbb724b46 100644 --- a/service/dataexchange/generated.json +++ b/service/dataexchange/generated.json @@ -27,6 +27,7 @@ "api_op_ListJobs.go", "api_op_ListRevisionAssets.go", "api_op_ListTagsForResource.go", + "api_op_SendApiAsset.go", "api_op_StartJob.go", "api_op_TagResource.go", "api_op_UntagResource.go", diff --git a/service/dataexchange/serializers.go b/service/dataexchange/serializers.go index 48a526267a0..9e3fecfaba7 100644 --- a/service/dataexchange/serializers.go +++ b/service/dataexchange/serializers.go @@ -12,6 +12,8 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "net/http" + "strings" ) type awsRestjson1_serializeOpCancelJob struct { @@ -1359,6 +1361,109 @@ func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsFor return nil } +type awsRestjson1_serializeOpSendApiAsset struct { +} + +func (*awsRestjson1_serializeOpSendApiAsset) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpSendApiAsset) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*SendApiAssetInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsSendApiAssetInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if input.Body != nil { + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("text/plain") + } + + payload := strings.NewReader(*input.Body) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsSendApiAssetInput(v *SendApiAssetInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AssetId != nil && len(*v.AssetId) > 0 { + locationName := "X-Amzn-Dataexchange-Asset-Id" + encoder.SetHeader(locationName).String(*v.AssetId) + } + + if v.DataSetId != nil && len(*v.DataSetId) > 0 { + locationName := "X-Amzn-Dataexchange-Data-Set-Id" + encoder.SetHeader(locationName).String(*v.DataSetId) + } + + if v.Method != nil && len(*v.Method) > 0 { + locationName := "X-Amzn-Dataexchange-Http-Method" + encoder.SetHeader(locationName).String(*v.Method) + } + + if v.Path != nil && len(*v.Path) > 0 { + locationName := "X-Amzn-Dataexchange-Path" + encoder.SetHeader(locationName).String(*v.Path) + } + + if v.QueryStringParameters != nil { + for qkey, qvalue := range v.QueryStringParameters { + if encoder.HasQuery(qkey) { + continue + } + encoder.SetQuery(qkey).String(qvalue) + } + } + + if v.RequestHeaders != nil { + hv := encoder.Headers("X-Amzn-Dataexchange-Header-") + for mapKey, mapVal := range v.RequestHeaders { + if len(mapVal) > 0 { + hv.SetHeader(http.CanonicalHeaderKey(mapKey)).String(mapVal) + } + } + } + + if v.RevisionId != nil && len(*v.RevisionId) > 0 { + locationName := "X-Amzn-Dataexchange-Revision-Id" + encoder.SetHeader(locationName).String(*v.RevisionId) + } + + return nil +} + type awsRestjson1_serializeOpStartJob struct { } @@ -2128,6 +2233,58 @@ func awsRestjson1_serializeDocumentExportServerSideEncryption(v *types.ExportSer return nil } +func awsRestjson1_serializeDocumentImportAssetFromApiGatewayApiRequestDetails(v *types.ImportAssetFromApiGatewayApiRequestDetails, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ApiDescription != nil { + ok := object.Key("ApiDescription") + ok.String(*v.ApiDescription) + } + + if v.ApiId != nil { + ok := object.Key("ApiId") + ok.String(*v.ApiId) + } + + if v.ApiKey != nil { + ok := object.Key("ApiKey") + ok.String(*v.ApiKey) + } + + if v.ApiName != nil { + ok := object.Key("ApiName") + ok.String(*v.ApiName) + } + + if v.ApiSpecificationMd5Hash != nil { + ok := object.Key("ApiSpecificationMd5Hash") + ok.String(*v.ApiSpecificationMd5Hash) + } + + if v.DataSetId != nil { + ok := object.Key("DataSetId") + ok.String(*v.DataSetId) + } + + if len(v.ProtocolType) > 0 { + ok := object.Key("ProtocolType") + ok.String(string(v.ProtocolType)) + } + + if v.RevisionId != nil { + ok := object.Key("RevisionId") + ok.String(*v.RevisionId) + } + + if v.Stage != nil { + ok := object.Key("Stage") + ok.String(*v.Stage) + } + + return nil +} + func awsRestjson1_serializeDocumentImportAssetFromSignedUrlRequestDetails(v *types.ImportAssetFromSignedUrlRequestDetails, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2303,6 +2460,13 @@ func awsRestjson1_serializeDocumentRequestDetails(v *types.RequestDetails, value } } + if v.ImportAssetFromApiGatewayApi != nil { + ok := object.Key("ImportAssetFromApiGatewayApi") + if err := awsRestjson1_serializeDocumentImportAssetFromApiGatewayApiRequestDetails(v.ImportAssetFromApiGatewayApi, ok); err != nil { + return err + } + } + if v.ImportAssetFromSignedUrl != nil { ok := object.Key("ImportAssetFromSignedUrl") if err := awsRestjson1_serializeDocumentImportAssetFromSignedUrlRequestDetails(v.ImportAssetFromSignedUrl, ok); err != nil { diff --git a/service/dataexchange/types/enums.go b/service/dataexchange/types/enums.go index 5541e809cf2..3686f8dd9bf 100644 --- a/service/dataexchange/types/enums.go +++ b/service/dataexchange/types/enums.go @@ -8,6 +8,7 @@ type AssetType string const ( AssetTypeS3Snapshot AssetType = "S3_SNAPSHOT" AssetTypeRedshiftDataShare AssetType = "REDSHIFT_DATA_SHARE" + AssetTypeApiGatewayApi AssetType = "API_GATEWAY_API" ) // Values returns all known values for AssetType. Note that this can be expanded in @@ -17,6 +18,7 @@ func (AssetType) Values() []AssetType { return []AssetType{ "S3_SNAPSHOT", "REDSHIFT_DATA_SHARE", + "API_GATEWAY_API", } } @@ -129,6 +131,9 @@ const ( LimitNameConcurrentInProgressJobsToImportAssetsFromAmazonRedshiftDatashares LimitName = "Concurrent in progress jobs to import assets from Amazon Redshift datashares" LimitNameRevisionsPerAmazonRedshiftDatashareDataSet LimitName = "Revisions per Amazon Redshift datashare data set" LimitNameAmazonRedshiftDatashareAssetsPerRevision LimitName = "Amazon Redshift datashare assets per revision" + LimitNameConcurrentInProgressJobsToImportAssetsFromAnApiGatewayApi LimitName = "Concurrent in progress jobs to import assets from an API Gateway API" + LimitNameAmazonApiGatewayApiAssetsPerRevision LimitName = "Amazon API Gateway API assets per revision" + LimitNameRevisionsPerAmazonApiGatewayApiDataSet LimitName = "Revisions per Amazon API Gateway API data set" ) // Values returns all known values for LimitName. Note that this can be expanded in @@ -155,6 +160,9 @@ func (LimitName) Values() []LimitName { "Concurrent in progress jobs to import assets from Amazon Redshift datashares", "Revisions per Amazon Redshift datashare data set", "Amazon Redshift datashare assets per revision", + "Concurrent in progress jobs to import assets from an API Gateway API", + "Amazon API Gateway API assets per revision", + "Revisions per Amazon API Gateway API data set", } } @@ -176,6 +184,22 @@ func (Origin) Values() []Origin { } } +type ProtocolType string + +// Enum values for ProtocolType +const ( + ProtocolTypeRest ProtocolType = "REST" +) + +// Values returns all known values for ProtocolType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (ProtocolType) Values() []ProtocolType { + return []ProtocolType{ + "REST", + } +} + type ResourceType string // Enum values for ResourceType @@ -254,6 +278,7 @@ const ( TypeExportAssetToSignedUrl Type = "EXPORT_ASSET_TO_SIGNED_URL" TypeExportRevisionsToS3 Type = "EXPORT_REVISIONS_TO_S3" TypeImportAssetsFromRedshiftDataShares Type = "IMPORT_ASSETS_FROM_REDSHIFT_DATA_SHARES" + TypeImportAssetFromApiGatewayApi Type = "IMPORT_ASSET_FROM_API_GATEWAY_API" ) // Values returns all known values for Type. Note that this can be expanded in the @@ -267,5 +292,6 @@ func (Type) Values() []Type { "EXPORT_ASSET_TO_SIGNED_URL", "EXPORT_REVISIONS_TO_S3", "IMPORT_ASSETS_FROM_REDSHIFT_DATA_SHARES", + "IMPORT_ASSET_FROM_API_GATEWAY_API", } } diff --git a/service/dataexchange/types/types.go b/service/dataexchange/types/types.go index 73a09fbb6f8..ae2075b3b7c 100644 --- a/service/dataexchange/types/types.go +++ b/service/dataexchange/types/types.go @@ -16,6 +16,39 @@ type Action struct { noSmithyDocumentSerde } +// The API Gateway API that is the asset. +type ApiGatewayApiAsset struct { + + // The API description of the API asset. + ApiDescription *string + + // The API endpoint of the API asset. + ApiEndpoint *string + + // The unique identifier of the API asset. + ApiId *string + + // The API key of the API asset. + ApiKey *string + + // The API name of the API asset. + ApiName *string + + // The download URL of the API specification of the API asset. + ApiSpecificationDownloadUrl *string + + // The date and time that the upload URL expires, in ISO 8601 format. + ApiSpecificationDownloadUrlExpiresAt *time.Time + + // The protocol type of the API asset. + ProtocolType ProtocolType + + // The stage of the API asset. + Stage *string + + noSmithyDocumentSerde +} + // The destination for the asset. type AssetDestinationEntry struct { @@ -38,6 +71,9 @@ type AssetDestinationEntry struct { // Information about the asset. type AssetDetails struct { + // Information about the API Gateway API asset. + ApiGatewayApiAsset *ApiGatewayApiAsset + // The Amazon Redshift datashare that is the asset. RedshiftDataShareAsset *RedshiftDataShareAsset @@ -47,11 +83,12 @@ type AssetDetails struct { noSmithyDocumentSerde } -// An asset in AWS Data Exchange is a piece of data. The asset can be a structured -// data file, an image file, or some other data file that can be stored as an S3 -// object, or an Amazon Redshift datashare (Preview). When you create an import job -// for your files, you create an asset in AWS Data Exchange for each of those -// files. +// An asset in AWS Data Exchange is a piece of data (S3 object) or a means of +// fulfilling data (Amazon Redshift datashare or Amazon API Gateway API). The asset +// can be a structured data file, an image file, or some other data file that can +// be stored as an S3 object, an Amazon API Gateway API, or an Amazon Redshift +// datashare (Preview). When you create an import job for your files, API Gateway +// APIs, or Amazon Redshift datashares, you create an asset in AWS Data Exchange. type AssetEntry struct { // The ARN for the asset. @@ -86,7 +123,9 @@ type AssetEntry struct { // The name of the asset. When importing from Amazon S3, the S3 object key is used // as the asset name. When exporting to Amazon S3, the asset name is used as - // default target S3 object key. + // default target S3 object key. When importing from Amazon API Gateway API, the + // API name is used as the asset name. When importing from Amazon Redshift, the + // datashare name is used as the asset name. // // This member is required. Name *string @@ -427,6 +466,112 @@ type ExportServerSideEncryption struct { noSmithyDocumentSerde } +// The request details. +type ImportAssetFromApiGatewayApiRequestDetails struct { + + // The API Gateway API ID. + // + // This member is required. + ApiId *string + + // The API name. + // + // This member is required. + ApiName *string + + // The Base64-encoded MD5 hash of the OpenAPI 3.0 JSON API specification file. It + // is used to ensure the integrity of the file. + // + // This member is required. + ApiSpecificationMd5Hash *string + + // The data set ID. + // + // This member is required. + DataSetId *string + + // The protocol type. + // + // This member is required. + ProtocolType ProtocolType + + // The revision ID. + // + // This member is required. + RevisionId *string + + // The API stage. + // + // This member is required. + Stage *string + + // The API description. Markdown supported. + ApiDescription *string + + // The API Gateway API key. + ApiKey *string + + noSmithyDocumentSerde +} + +// The response details. +type ImportAssetFromApiGatewayApiResponseDetails struct { + + // The API ID. + // + // This member is required. + ApiId *string + + // The API name. + // + // This member is required. + ApiName *string + + // The Base64-encoded Md5 hash for the API asset, used to ensure the integrity of + // the API at that location. + // + // This member is required. + ApiSpecificationMd5Hash *string + + // The upload URL of the API specification. + // + // This member is required. + ApiSpecificationUploadUrl *string + + // The date and time that the upload URL expires, in ISO 8601 format. + // + // This member is required. + ApiSpecificationUploadUrlExpiresAt *time.Time + + // The data set ID. + // + // This member is required. + DataSetId *string + + // The protocol type. + // + // This member is required. + ProtocolType ProtocolType + + // The revision ID. + // + // This member is required. + RevisionId *string + + // The API stage. + // + // This member is required. + Stage *string + + // The API description. + ApiDescription *string + + // The API key. + ApiKey *string + + noSmithyDocumentSerde +} + // Information about the job error. type ImportAssetFromSignedUrlJobErrorDetails struct { @@ -706,6 +851,9 @@ type RequestDetails struct { // Details about the export to Amazon S3 request. ExportRevisionsToS3 *ExportRevisionsToS3RequestDetails + // Information about the import asset from API Gateway API request. + ImportAssetFromApiGatewayApi *ImportAssetFromApiGatewayApiRequestDetails + // Details about the import from signed URL request. ImportAssetFromSignedUrl *ImportAssetFromSignedUrlRequestDetails @@ -730,6 +878,9 @@ type ResponseDetails struct { // Details for the export revisions to Amazon S3 response. ExportRevisionsToS3 *ExportRevisionsToS3ResponseDetails + // The response details. + ImportAssetFromApiGatewayApi *ImportAssetFromApiGatewayApiResponseDetails + // Details for the import from signed URL response. ImportAssetFromSignedUrl *ImportAssetFromSignedUrlResponseDetails diff --git a/service/dataexchange/validators.go b/service/dataexchange/validators.go index f392c7780c3..bc04e6cf644 100644 --- a/service/dataexchange/validators.go +++ b/service/dataexchange/validators.go @@ -350,6 +350,26 @@ func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpSendApiAsset struct { +} + +func (*validateOpSendApiAsset) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSendApiAsset) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SendApiAssetInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSendApiAssetInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpStartJob struct { } @@ -558,6 +578,10 @@ func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } +func addOpSendApiAssetValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSendApiAsset{}, middleware.After) +} + func addOpStartJobValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartJob{}, middleware.After) } @@ -788,6 +812,39 @@ func validateExportServerSideEncryption(v *types.ExportServerSideEncryption) err } } +func validateImportAssetFromApiGatewayApiRequestDetails(v *types.ImportAssetFromApiGatewayApiRequestDetails) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ImportAssetFromApiGatewayApiRequestDetails"} + if v.ApiId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApiId")) + } + if v.ApiName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApiName")) + } + if v.ApiSpecificationMd5Hash == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApiSpecificationMd5Hash")) + } + if v.DataSetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DataSetId")) + } + if len(v.ProtocolType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ProtocolType")) + } + if v.RevisionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("RevisionId")) + } + if v.Stage == nil { + invalidParams.Add(smithy.NewErrParamRequired("Stage")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateImportAssetFromSignedUrlRequestDetails(v *types.ImportAssetFromSignedUrlRequestDetails) error { if v == nil { return nil @@ -980,6 +1037,11 @@ func validateRequestDetails(v *types.RequestDetails) error { invalidParams.AddNested("ImportAssetsFromRedshiftDataShares", err.(smithy.InvalidParamsError)) } } + if v.ImportAssetFromApiGatewayApi != nil { + if err := validateImportAssetFromApiGatewayApiRequestDetails(v.ImportAssetFromApiGatewayApi); err != nil { + invalidParams.AddNested("ImportAssetFromApiGatewayApi", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1320,6 +1382,27 @@ func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { } } +func validateOpSendApiAssetInput(v *SendApiAssetInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SendApiAssetInput"} + if v.AssetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AssetId")) + } + if v.DataSetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DataSetId")) + } + if v.RevisionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("RevisionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpStartJobInput(v *StartJobInput) error { if v == nil { return nil diff --git a/service/dynamodb/api_op_BatchExecuteStatement.go b/service/dynamodb/api_op_BatchExecuteStatement.go index 70ec9f0aa75..57426c756a4 100644 --- a/service/dynamodb/api_op_BatchExecuteStatement.go +++ b/service/dynamodb/api_op_BatchExecuteStatement.go @@ -36,11 +36,32 @@ type BatchExecuteStatementInput struct { // This member is required. Statements []types.BatchStatementRequest + // Determines the level of detail about either provisioned or on-demand throughput + // consumption that is returned in the response: + // + // * INDEXES - The response includes + // the aggregate ConsumedCapacity for the operation, together with ConsumedCapacity + // for each table and secondary index that was accessed. Note that some operations, + // such as GetItem and BatchGetItem, do not access any indexes at all. In these + // cases, specifying INDEXES will only return ConsumedCapacity information for + // table(s). + // + // * TOTAL - The response includes only the aggregate ConsumedCapacity + // for the operation. + // + // * NONE - No ConsumedCapacity details are included in the + // response. + ReturnConsumedCapacity types.ReturnConsumedCapacity + noSmithyDocumentSerde } type BatchExecuteStatementOutput struct { + // The capacity units consumed by the entire operation. The values of the list are + // ordered according to the ordering of the statements. + ConsumedCapacity []types.ConsumedCapacity + // The response to each PartiQL statement in the batch. Responses []types.BatchStatementResponse diff --git a/service/dynamodb/api_op_BatchGetItem.go b/service/dynamodb/api_op_BatchGetItem.go index 9c1f347b36b..79bab0f4a56 100644 --- a/service/dynamodb/api_op_BatchGetItem.go +++ b/service/dynamodb/api_op_BatchGetItem.go @@ -145,14 +145,14 @@ type BatchGetItemInput struct { // This member is required. RequestItems map[string]types.KeysAndAttributes - // Determines the level of detail about provisioned throughput consumption that is - // returned in the response: + // Determines the level of detail about either provisioned or on-demand throughput + // consumption that is returned in the response: // - // * INDEXES - The response includes the aggregate - // ConsumedCapacity for the operation, together with ConsumedCapacity for each - // table and secondary index that was accessed. Note that some operations, such as - // GetItem and BatchGetItem, do not access any indexes at all. In these cases, - // specifying INDEXES will only return ConsumedCapacity information for + // * INDEXES - The response includes + // the aggregate ConsumedCapacity for the operation, together with ConsumedCapacity + // for each table and secondary index that was accessed. Note that some operations, + // such as GetItem and BatchGetItem, do not access any indexes at all. In these + // cases, specifying INDEXES will only return ConsumedCapacity information for // table(s). // // * TOTAL - The response includes only the aggregate ConsumedCapacity diff --git a/service/dynamodb/api_op_BatchWriteItem.go b/service/dynamodb/api_op_BatchWriteItem.go index c8ecb8bfe3b..311a717150f 100644 --- a/service/dynamodb/api_op_BatchWriteItem.go +++ b/service/dynamodb/api_op_BatchWriteItem.go @@ -123,14 +123,14 @@ type BatchWriteItemInput struct { // This member is required. RequestItems map[string][]types.WriteRequest - // Determines the level of detail about provisioned throughput consumption that is - // returned in the response: + // Determines the level of detail about either provisioned or on-demand throughput + // consumption that is returned in the response: // - // * INDEXES - The response includes the aggregate - // ConsumedCapacity for the operation, together with ConsumedCapacity for each - // table and secondary index that was accessed. Note that some operations, such as - // GetItem and BatchGetItem, do not access any indexes at all. In these cases, - // specifying INDEXES will only return ConsumedCapacity information for + // * INDEXES - The response includes + // the aggregate ConsumedCapacity for the operation, together with ConsumedCapacity + // for each table and secondary index that was accessed. Note that some operations, + // such as GetItem and BatchGetItem, do not access any indexes at all. In these + // cases, specifying INDEXES will only return ConsumedCapacity information for // table(s). // // * TOTAL - The response includes only the aggregate ConsumedCapacity diff --git a/service/dynamodb/api_op_DeleteItem.go b/service/dynamodb/api_op_DeleteItem.go index 86a6edd19c5..51f346b45ce 100644 --- a/service/dynamodb/api_op_DeleteItem.go +++ b/service/dynamodb/api_op_DeleteItem.go @@ -139,14 +139,14 @@ type DeleteItemInput struct { // in the Amazon DynamoDB Developer Guide. ExpressionAttributeValues map[string]types.AttributeValue - // Determines the level of detail about provisioned throughput consumption that is - // returned in the response: + // Determines the level of detail about either provisioned or on-demand throughput + // consumption that is returned in the response: // - // * INDEXES - The response includes the aggregate - // ConsumedCapacity for the operation, together with ConsumedCapacity for each - // table and secondary index that was accessed. Note that some operations, such as - // GetItem and BatchGetItem, do not access any indexes at all. In these cases, - // specifying INDEXES will only return ConsumedCapacity information for + // * INDEXES - The response includes + // the aggregate ConsumedCapacity for the operation, together with ConsumedCapacity + // for each table and secondary index that was accessed. Note that some operations, + // such as GetItem and BatchGetItem, do not access any indexes at all. In these + // cases, specifying INDEXES will only return ConsumedCapacity information for // table(s). // // * TOTAL - The response includes only the aggregate ConsumedCapacity diff --git a/service/dynamodb/api_op_ExecuteStatement.go b/service/dynamodb/api_op_ExecuteStatement.go index db090cfc92a..f2ee6e4ad3e 100644 --- a/service/dynamodb/api_op_ExecuteStatement.go +++ b/service/dynamodb/api_op_ExecuteStatement.go @@ -46,11 +46,36 @@ type ExecuteStatementInput struct { // The parameters for the PartiQL statement, if any. Parameters []types.AttributeValue + // Determines the level of detail about either provisioned or on-demand throughput + // consumption that is returned in the response: + // + // * INDEXES - The response includes + // the aggregate ConsumedCapacity for the operation, together with ConsumedCapacity + // for each table and secondary index that was accessed. Note that some operations, + // such as GetItem and BatchGetItem, do not access any indexes at all. In these + // cases, specifying INDEXES will only return ConsumedCapacity information for + // table(s). + // + // * TOTAL - The response includes only the aggregate ConsumedCapacity + // for the operation. + // + // * NONE - No ConsumedCapacity details are included in the + // response. + ReturnConsumedCapacity types.ReturnConsumedCapacity + noSmithyDocumentSerde } type ExecuteStatementOutput struct { + // The capacity units consumed by an operation. The data returned includes the + // total provisioned throughput consumed, along with statistics for the table and + // any indexes involved in the operation. ConsumedCapacity is only returned if the + // request asked for it. For more information, see Provisioned Throughput + // (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html) + // in the Amazon DynamoDB Developer Guide. + ConsumedCapacity *types.ConsumedCapacity + // If a read operation was used, this property will contain the result of the read // operation; a map of attribute names and their values. For the write operations // this value will be empty. diff --git a/service/dynamodb/api_op_ExecuteTransaction.go b/service/dynamodb/api_op_ExecuteTransaction.go index 935b4393f8c..267702bf32d 100644 --- a/service/dynamodb/api_op_ExecuteTransaction.go +++ b/service/dynamodb/api_op_ExecuteTransaction.go @@ -46,11 +46,23 @@ type ExecuteTransactionInput struct { // statement response. ClientRequestToken *string + // Determines the level of detail about either provisioned or on-demand throughput + // consumption that is returned in the response. For more information, see + // TransactGetItems + // (https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_TransactGetItems.html) + // and TransactWriteItems + // (https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_TransactWriteItems.html). + ReturnConsumedCapacity types.ReturnConsumedCapacity + noSmithyDocumentSerde } type ExecuteTransactionOutput struct { + // The capacity units consumed by the entire operation. The values of the list are + // ordered according to the ordering of the statements. + ConsumedCapacity []types.ConsumedCapacity + // The response to a PartiQL transaction. Responses []types.ItemResponse diff --git a/service/dynamodb/api_op_GetItem.go b/service/dynamodb/api_op_GetItem.go index d705b3e9b2f..3ec33d2aa6c 100644 --- a/service/dynamodb/api_op_GetItem.go +++ b/service/dynamodb/api_op_GetItem.go @@ -114,14 +114,14 @@ type GetItemInput struct { // in the Amazon DynamoDB Developer Guide. ProjectionExpression *string - // Determines the level of detail about provisioned throughput consumption that is - // returned in the response: + // Determines the level of detail about either provisioned or on-demand throughput + // consumption that is returned in the response: // - // * INDEXES - The response includes the aggregate - // ConsumedCapacity for the operation, together with ConsumedCapacity for each - // table and secondary index that was accessed. Note that some operations, such as - // GetItem and BatchGetItem, do not access any indexes at all. In these cases, - // specifying INDEXES will only return ConsumedCapacity information for + // * INDEXES - The response includes + // the aggregate ConsumedCapacity for the operation, together with ConsumedCapacity + // for each table and secondary index that was accessed. Note that some operations, + // such as GetItem and BatchGetItem, do not access any indexes at all. In these + // cases, specifying INDEXES will only return ConsumedCapacity information for // table(s). // // * TOTAL - The response includes only the aggregate ConsumedCapacity diff --git a/service/dynamodb/api_op_PutItem.go b/service/dynamodb/api_op_PutItem.go index de33e1664da..979fe0ca8e2 100644 --- a/service/dynamodb/api_op_PutItem.go +++ b/service/dynamodb/api_op_PutItem.go @@ -199,14 +199,14 @@ type PutItemInput struct { // in the Amazon DynamoDB Developer Guide. ExpressionAttributeValues map[string]types.AttributeValue - // Determines the level of detail about provisioned throughput consumption that is - // returned in the response: + // Determines the level of detail about either provisioned or on-demand throughput + // consumption that is returned in the response: // - // * INDEXES - The response includes the aggregate - // ConsumedCapacity for the operation, together with ConsumedCapacity for each - // table and secondary index that was accessed. Note that some operations, such as - // GetItem and BatchGetItem, do not access any indexes at all. In these cases, - // specifying INDEXES will only return ConsumedCapacity information for + // * INDEXES - The response includes + // the aggregate ConsumedCapacity for the operation, together with ConsumedCapacity + // for each table and secondary index that was accessed. Note that some operations, + // such as GetItem and BatchGetItem, do not access any indexes at all. In these + // cases, specifying INDEXES will only return ConsumedCapacity information for // table(s). // // * TOTAL - The response includes only the aggregate ConsumedCapacity diff --git a/service/dynamodb/api_op_Query.go b/service/dynamodb/api_op_Query.go index 44f25214169..8517cefba5d 100644 --- a/service/dynamodb/api_op_Query.go +++ b/service/dynamodb/api_op_Query.go @@ -280,14 +280,14 @@ type QueryInput struct { // in the Amazon DynamoDB Developer Guide. QueryFilter map[string]types.Condition - // Determines the level of detail about provisioned throughput consumption that is - // returned in the response: - // - // * INDEXES - The response includes the aggregate - // ConsumedCapacity for the operation, together with ConsumedCapacity for each - // table and secondary index that was accessed. Note that some operations, such as - // GetItem and BatchGetItem, do not access any indexes at all. In these cases, - // specifying INDEXES will only return ConsumedCapacity information for + // Determines the level of detail about either provisioned or on-demand throughput + // consumption that is returned in the response: + // + // * INDEXES - The response includes + // the aggregate ConsumedCapacity for the operation, together with ConsumedCapacity + // for each table and secondary index that was accessed. Note that some operations, + // such as GetItem and BatchGetItem, do not access any indexes at all. In these + // cases, specifying INDEXES will only return ConsumedCapacity information for // table(s). // // * TOTAL - The response includes only the aggregate ConsumedCapacity diff --git a/service/dynamodb/api_op_Scan.go b/service/dynamodb/api_op_Scan.go index a3aeb430a5a..c2f47691dca 100644 --- a/service/dynamodb/api_op_Scan.go +++ b/service/dynamodb/api_op_Scan.go @@ -188,14 +188,14 @@ type ScanInput struct { // in the Amazon DynamoDB Developer Guide. ProjectionExpression *string - // Determines the level of detail about provisioned throughput consumption that is - // returned in the response: + // Determines the level of detail about either provisioned or on-demand throughput + // consumption that is returned in the response: // - // * INDEXES - The response includes the aggregate - // ConsumedCapacity for the operation, together with ConsumedCapacity for each - // table and secondary index that was accessed. Note that some operations, such as - // GetItem and BatchGetItem, do not access any indexes at all. In these cases, - // specifying INDEXES will only return ConsumedCapacity information for + // * INDEXES - The response includes + // the aggregate ConsumedCapacity for the operation, together with ConsumedCapacity + // for each table and secondary index that was accessed. Note that some operations, + // such as GetItem and BatchGetItem, do not access any indexes at all. In these + // cases, specifying INDEXES will only return ConsumedCapacity information for // table(s). // // * TOTAL - The response includes only the aggregate ConsumedCapacity diff --git a/service/dynamodb/api_op_TransactWriteItems.go b/service/dynamodb/api_op_TransactWriteItems.go index fa1b03a1e3c..b4cca0a94e8 100644 --- a/service/dynamodb/api_op_TransactWriteItems.go +++ b/service/dynamodb/api_op_TransactWriteItems.go @@ -112,14 +112,14 @@ type TransactWriteItemsInput struct { // IdempotentParameterMismatch exception. ClientRequestToken *string - // Determines the level of detail about provisioned throughput consumption that is - // returned in the response: + // Determines the level of detail about either provisioned or on-demand throughput + // consumption that is returned in the response: // - // * INDEXES - The response includes the aggregate - // ConsumedCapacity for the operation, together with ConsumedCapacity for each - // table and secondary index that was accessed. Note that some operations, such as - // GetItem and BatchGetItem, do not access any indexes at all. In these cases, - // specifying INDEXES will only return ConsumedCapacity information for + // * INDEXES - The response includes + // the aggregate ConsumedCapacity for the operation, together with ConsumedCapacity + // for each table and secondary index that was accessed. Note that some operations, + // such as GetItem and BatchGetItem, do not access any indexes at all. In these + // cases, specifying INDEXES will only return ConsumedCapacity information for // table(s). // // * TOTAL - The response includes only the aggregate ConsumedCapacity diff --git a/service/dynamodb/api_op_UpdateItem.go b/service/dynamodb/api_op_UpdateItem.go index c34fad0052e..36a3192d32e 100644 --- a/service/dynamodb/api_op_UpdateItem.go +++ b/service/dynamodb/api_op_UpdateItem.go @@ -142,14 +142,14 @@ type UpdateItemInput struct { // in the Amazon DynamoDB Developer Guide. ExpressionAttributeValues map[string]types.AttributeValue - // Determines the level of detail about provisioned throughput consumption that is - // returned in the response: - // - // * INDEXES - The response includes the aggregate - // ConsumedCapacity for the operation, together with ConsumedCapacity for each - // table and secondary index that was accessed. Note that some operations, such as - // GetItem and BatchGetItem, do not access any indexes at all. In these cases, - // specifying INDEXES will only return ConsumedCapacity information for + // Determines the level of detail about either provisioned or on-demand throughput + // consumption that is returned in the response: + // + // * INDEXES - The response includes + // the aggregate ConsumedCapacity for the operation, together with ConsumedCapacity + // for each table and secondary index that was accessed. Note that some operations, + // such as GetItem and BatchGetItem, do not access any indexes at all. In these + // cases, specifying INDEXES will only return ConsumedCapacity information for // table(s). // // * TOTAL - The response includes only the aggregate ConsumedCapacity diff --git a/service/dynamodb/deserializers.go b/service/dynamodb/deserializers.go index 957dd60178f..85a0d34104b 100644 --- a/service/dynamodb/deserializers.go +++ b/service/dynamodb/deserializers.go @@ -14147,6 +14147,11 @@ func awsAwsjson10_deserializeOpDocumentBatchExecuteStatementOutput(v **BatchExec for key, value := range shape { switch key { + case "ConsumedCapacity": + if err := awsAwsjson10_deserializeDocumentConsumedCapacityMultiple(&sv.ConsumedCapacity, value); err != nil { + return err + } + case "Responses": if err := awsAwsjson10_deserializeDocumentPartiQLBatchResponse(&sv.Responses, value); err != nil { return err @@ -15162,6 +15167,11 @@ func awsAwsjson10_deserializeOpDocumentExecuteStatementOutput(v **ExecuteStateme for key, value := range shape { switch key { + case "ConsumedCapacity": + if err := awsAwsjson10_deserializeDocumentConsumedCapacity(&sv.ConsumedCapacity, value); err != nil { + return err + } + case "Items": if err := awsAwsjson10_deserializeDocumentItemList(&sv.Items, value); err != nil { return err @@ -15207,6 +15217,11 @@ func awsAwsjson10_deserializeOpDocumentExecuteTransactionOutput(v **ExecuteTrans for key, value := range shape { switch key { + case "ConsumedCapacity": + if err := awsAwsjson10_deserializeDocumentConsumedCapacityMultiple(&sv.ConsumedCapacity, value); err != nil { + return err + } + case "Responses": if err := awsAwsjson10_deserializeDocumentItemResponseList(&sv.Responses, value); err != nil { return err diff --git a/service/dynamodb/serializers.go b/service/dynamodb/serializers.go index 992b2f2bdb3..da95ff53126 100644 --- a/service/dynamodb/serializers.go +++ b/service/dynamodb/serializers.go @@ -4587,6 +4587,11 @@ func awsAwsjson10_serializeOpDocumentBatchExecuteStatementInput(v *BatchExecuteS object := value.Object() defer object.Close() + if len(v.ReturnConsumedCapacity) > 0 { + ok := object.Key("ReturnConsumedCapacity") + ok.String(string(v.ReturnConsumedCapacity)) + } + if v.Statements != nil { ok := object.Key("Statements") if err := awsAwsjson10_serializeDocumentPartiQLBatchRequest(v.Statements, ok); err != nil { @@ -5032,6 +5037,11 @@ func awsAwsjson10_serializeOpDocumentExecuteStatementInput(v *ExecuteStatementIn } } + if len(v.ReturnConsumedCapacity) > 0 { + ok := object.Key("ReturnConsumedCapacity") + ok.String(string(v.ReturnConsumedCapacity)) + } + if v.Statement != nil { ok := object.Key("Statement") ok.String(*v.Statement) @@ -5049,6 +5059,11 @@ func awsAwsjson10_serializeOpDocumentExecuteTransactionInput(v *ExecuteTransacti ok.String(*v.ClientRequestToken) } + if len(v.ReturnConsumedCapacity) > 0 { + ok := object.Key("ReturnConsumedCapacity") + ok.String(string(v.ReturnConsumedCapacity)) + } + if v.TransactStatements != nil { ok := object.Key("TransactStatements") if err := awsAwsjson10_serializeDocumentParameterizedStatements(v.TransactStatements, ok); err != nil { diff --git a/service/ec2/api_op_AssociateSubnetCidrBlock.go b/service/ec2/api_op_AssociateSubnetCidrBlock.go index 75f13b95211..7c0c0b66744 100644 --- a/service/ec2/api_op_AssociateSubnetCidrBlock.go +++ b/service/ec2/api_op_AssociateSubnetCidrBlock.go @@ -46,7 +46,7 @@ type AssociateSubnetCidrBlockInput struct { type AssociateSubnetCidrBlockOutput struct { - // Information about the IPv6 CIDR block association. + // Information about the IPv6 association. Ipv6CidrBlockAssociation *types.SubnetIpv6CidrBlockAssociation // The ID of the subnet. diff --git a/service/ec2/api_op_AuthorizeSecurityGroupEgress.go b/service/ec2/api_op_AuthorizeSecurityGroupEgress.go index ec7a26537f6..234cd286376 100644 --- a/service/ec2/api_op_AuthorizeSecurityGroupEgress.go +++ b/service/ec2/api_op_AuthorizeSecurityGroupEgress.go @@ -14,13 +14,13 @@ import ( // [VPC only] Adds the specified outbound (egress) rules to a security group for // use with a VPC. An outbound rule permits instances to send traffic to the // specified IPv4 or IPv6 CIDR address ranges, or to the instances that are -// associated with the specified destination security groups. You specify a -// protocol for each rule (for example, TCP). For the TCP and UDP protocols, you -// must also specify the destination port or port range. For the ICMP protocol, you -// must also specify the ICMP type and code. You can use -1 for the type or code to -// mean all types or all codes. Rule changes are propagated to affected instances -// as quickly as possible. However, a small delay might occur. For information -// about VPC security group quotas, see Amazon VPC quotas +// associated with the specified source security groups. You specify a protocol for +// each rule (for example, TCP). For the TCP and UDP protocols, you must also +// specify the destination port or port range. For the ICMP protocol, you must also +// specify the ICMP type and code. You can use -1 for the type or code to mean all +// types or all codes. Rule changes are propagated to affected instances as quickly +// as possible. However, a small delay might occur. For information about VPC +// security group quotas, see Amazon VPC quotas // (https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html). func (c *Client) AuthorizeSecurityGroupEgress(ctx context.Context, params *AuthorizeSecurityGroupEgressInput, optFns ...func(*Options)) (*AuthorizeSecurityGroupEgressOutput, error) { if params == nil { diff --git a/service/ec2/api_op_CreateDefaultSubnet.go b/service/ec2/api_op_CreateDefaultSubnet.go index 86b347a1386..4beb579b833 100644 --- a/service/ec2/api_op_CreateDefaultSubnet.go +++ b/service/ec2/api_op_CreateDefaultSubnet.go @@ -44,6 +44,11 @@ type CreateDefaultSubnetInput struct { // UnauthorizedOperation. DryRun *bool + // Indicates whether to create an IPv6 only subnet. If you already have a default + // subnet for this Availability Zone, you must delete it before you can create an + // IPv6 only subnet. + Ipv6Native *bool + noSmithyDocumentSerde } diff --git a/service/ec2/api_op_CreateRoute.go b/service/ec2/api_op_CreateRoute.go index 6bfbfba0180..88b006df30d 100644 --- a/service/ec2/api_op_CreateRoute.go +++ b/service/ec2/api_op_CreateRoute.go @@ -55,6 +55,7 @@ type CreateRouteInput struct { // contains a subnet which is associated with a Wavelength Zone. CarrierGatewayId *string + // The Amazon Resource Name (ARN) of the core network. CoreNetworkArn *string // The IPv4 CIDR address block used for the destination match. Routing decisions diff --git a/service/ec2/api_op_CreateSnapshot.go b/service/ec2/api_op_CreateSnapshot.go index 06b478988ac..179173f629b 100644 --- a/service/ec2/api_op_CreateSnapshot.go +++ b/service/ec2/api_op_CreateSnapshot.go @@ -139,6 +139,10 @@ type CreateSnapshotOutput struct { // The progress of the snapshot, as a percentage. Progress *string + // Only for archived snapshots that are temporarily restored. Indicates the date + // and time when a temporarily restored snapshot will be automatically re-archived. + RestoreExpiryTime *time.Time + // The ID of the snapshot. Each snapshot receives a unique identifier when it is // created. SnapshotId *string @@ -156,6 +160,12 @@ type CreateSnapshotOutput struct { // DescribeSnapshots. StateMessage *string + // The storage tier in which the snapshot is stored. standard indicates that the + // snapshot is stored in the standard snapshot storage tier and that it is ready + // for use. archive indicates that the snapshot is currently archived and that it + // must be restored before it can be used. + StorageTier types.StorageTier + // Any tags assigned to the snapshot. Tags []types.Tag diff --git a/service/ec2/api_op_CreateSubnet.go b/service/ec2/api_op_CreateSubnet.go index 6829fdd3ca0..c71dc15d82f 100644 --- a/service/ec2/api_op_CreateSubnet.go +++ b/service/ec2/api_op_CreateSubnet.go @@ -43,13 +43,6 @@ func (c *Client) CreateSubnet(ctx context.Context, params *CreateSubnetInput, op type CreateSubnetInput struct { - // The IPv4 network range for the subnet, in CIDR notation. For example, - // 10.0.0.0/24. We modify the specified CIDR block to its canonical form; for - // example, if you specify 100.68.0.18/18, we modify it to 100.68.0.0/18. - // - // This member is required. - CidrBlock *string - // The ID of the VPC. // // This member is required. @@ -70,6 +63,12 @@ type CreateSubnetInput struct { // The AZ ID or the Local Zone ID of the subnet. AvailabilityZoneId *string + // The IPv4 network range for the subnet, in CIDR notation. For example, + // 10.0.0.0/24. We modify the specified CIDR block to its canonical form; for + // example, if you specify 100.68.0.18/18, we modify it to 100.68.0.0/18. This + // parameter is not supported for an IPv6 only subnet. + CidrBlock *string + // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation. Otherwise, it is @@ -77,9 +76,12 @@ type CreateSubnetInput struct { DryRun *bool // The IPv6 network range for the subnet, in CIDR notation. The subnet size must - // use a /64 prefix length. + // use a /64 prefix length. This parameter is required for an IPv6 only subnet. Ipv6CidrBlock *string + // Indicates whether to create an IPv6 only subnet. + Ipv6Native *bool + // The Amazon Resource Name (ARN) of the Outpost. If you specify an Outpost ARN, // you must also specify the Availability Zone of the Outpost subnet. OutpostArn *string diff --git a/service/ec2/api_op_DeleteTags.go b/service/ec2/api_op_DeleteTags.go index e087038e6a2..4b323f0729f 100644 --- a/service/ec2/api_op_DeleteTags.go +++ b/service/ec2/api_op_DeleteTags.go @@ -51,7 +51,7 @@ type DeleteTagsInput struct { // string as the tag value, we delete the tag only if its value is an empty string. // If you omit this parameter, we delete all user-defined tags for the specified // resources. We do not delete Amazon Web Services-generated tags (tags that have - // the aws: prefix). + // the aws: prefix). Constraints: Up to 1000 tags. Tags []types.Tag noSmithyDocumentSerde diff --git a/service/ec2/api_op_DescribeInstanceStatus.go b/service/ec2/api_op_DescribeInstanceStatus.go index 63f29269bd0..2e2bc70281a 100644 --- a/service/ec2/api_op_DescribeInstanceStatus.go +++ b/service/ec2/api_op_DescribeInstanceStatus.go @@ -27,7 +27,7 @@ import ( // instances to identify hardware and software issues. For more information, see // Status checks for your instances // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-system-instance-status-check.html) -// and Troubleshooting instances with failed status checks +// and Troubleshoot instances with failed status checks // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstances.html) // in the Amazon EC2 User Guide. // diff --git a/service/ec2/api_op_DescribeSnapshotTierStatus.go b/service/ec2/api_op_DescribeSnapshotTierStatus.go new file mode 100644 index 00000000000..aeffc8fe42f --- /dev/null +++ b/service/ec2/api_op_DescribeSnapshotTierStatus.go @@ -0,0 +1,233 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ec2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/ec2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Describes the storage tier status of one or more Amazon EBS snapshots. +func (c *Client) DescribeSnapshotTierStatus(ctx context.Context, params *DescribeSnapshotTierStatusInput, optFns ...func(*Options)) (*DescribeSnapshotTierStatusOutput, error) { + if params == nil { + params = &DescribeSnapshotTierStatusInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeSnapshotTierStatus", params, optFns, c.addOperationDescribeSnapshotTierStatusMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeSnapshotTierStatusOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeSnapshotTierStatusInput struct { + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have the + // required permissions, the error response is DryRunOperation. Otherwise, it is + // UnauthorizedOperation. + DryRun *bool + + // The filters. + // + // * snapshot-id - The snapshot ID. + // + // * volume-id - The ID of the + // volume the snapshot is for. + // + // * last-tiering-operation - The state of the last + // archive or restore action. (archiving | archival_error | archival_complete | + // restoring | restore_error | restore_complete) + Filters []types.Filter + + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + MaxResults *int32 + + // The token for the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeSnapshotTierStatusOutput struct { + + // The token to use to retrieve the next page of results. This value is null when + // there are no more results to return. + NextToken *string + + // Information about the snapshot's storage tier. + SnapshotTierStatuses []types.SnapshotTierStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeSnapshotTierStatusMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeSnapshotTierStatus{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeSnapshotTierStatus{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSnapshotTierStatus(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// DescribeSnapshotTierStatusAPIClient is a client that implements the +// DescribeSnapshotTierStatus operation. +type DescribeSnapshotTierStatusAPIClient interface { + DescribeSnapshotTierStatus(context.Context, *DescribeSnapshotTierStatusInput, ...func(*Options)) (*DescribeSnapshotTierStatusOutput, error) +} + +var _ DescribeSnapshotTierStatusAPIClient = (*Client)(nil) + +// DescribeSnapshotTierStatusPaginatorOptions is the paginator options for +// DescribeSnapshotTierStatus +type DescribeSnapshotTierStatusPaginatorOptions struct { + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeSnapshotTierStatusPaginator is a paginator for +// DescribeSnapshotTierStatus +type DescribeSnapshotTierStatusPaginator struct { + options DescribeSnapshotTierStatusPaginatorOptions + client DescribeSnapshotTierStatusAPIClient + params *DescribeSnapshotTierStatusInput + nextToken *string + firstPage bool +} + +// NewDescribeSnapshotTierStatusPaginator returns a new +// DescribeSnapshotTierStatusPaginator +func NewDescribeSnapshotTierStatusPaginator(client DescribeSnapshotTierStatusAPIClient, params *DescribeSnapshotTierStatusInput, optFns ...func(*DescribeSnapshotTierStatusPaginatorOptions)) *DescribeSnapshotTierStatusPaginator { + if params == nil { + params = &DescribeSnapshotTierStatusInput{} + } + + options := DescribeSnapshotTierStatusPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeSnapshotTierStatusPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeSnapshotTierStatusPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribeSnapshotTierStatus page. +func (p *DescribeSnapshotTierStatusPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSnapshotTierStatusOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.DescribeSnapshotTierStatus(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opDescribeSnapshotTierStatus(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ec2", + OperationName: "DescribeSnapshotTierStatus", + } +} diff --git a/service/ec2/api_op_DescribeSnapshots.go b/service/ec2/api_op_DescribeSnapshots.go index 20b590726f3..4bdecfeb342 100644 --- a/service/ec2/api_op_DescribeSnapshots.go +++ b/service/ec2/api_op_DescribeSnapshots.go @@ -109,21 +109,23 @@ type DescribeSnapshotsInput struct { // * status - // The status of the snapshot (pending | completed | error). // - // * tag: - The - // key/value combination of a tag assigned to the resource. Use the tag key in the - // filter name and the tag value as the filter value. For example, to find all - // resources that have a tag with the key Owner and the value TeamA, specify - // tag:Owner for the filter name and TeamA for the filter value. + // * storage-tier - The + // storage tier of the snapshot (archive | standard). // - // * tag-key - The - // key of a tag assigned to the resource. Use this filter to find all resources - // assigned a tag with a specific key, regardless of the tag value. + // * tag: - The key/value + // combination of a tag assigned to the resource. Use the tag key in the filter + // name and the tag value as the filter value. For example, to find all resources + // that have a tag with the key Owner and the value TeamA, specify tag:Owner for + // the filter name and TeamA for the filter value. // - // * volume-id - - // The ID of the volume the snapshot is for. + // * tag-key - The key of a tag + // assigned to the resource. Use this filter to find all resources assigned a tag + // with a specific key, regardless of the tag value. // - // * volume-size - The size of the - // volume, in GiB. + // * volume-id - The ID of the + // volume the snapshot is for. + // + // * volume-size - The size of the volume, in GiB. Filters []types.Filter // The maximum number of snapshot results returned by DescribeSnapshots in diff --git a/service/ec2/api_op_DescribeSubnets.go b/service/ec2/api_op_DescribeSubnets.go index ae5fc21571c..5df58b29ce0 100644 --- a/service/ec2/api_op_DescribeSubnets.go +++ b/service/ec2/api_op_DescribeSubnets.go @@ -60,45 +60,48 @@ type DescribeSubnetsInput struct { // also use cidr or cidrBlock as the filter names. // // * default-for-az - Indicates - // whether this is the default subnet for the Availability Zone. You can also use - // defaultForAz as the filter name. - // - // * ipv6-cidr-block-association.ipv6-cidr-block - // - An IPv6 CIDR block associated with the subnet. + // whether this is the default subnet for the Availability Zone (true | false). You + // can also use defaultForAz as the filter name. // // * - // ipv6-cidr-block-association.association-id - An association ID for an IPv6 CIDR - // block associated with the subnet. + // ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated with + // the subnet. // - // * ipv6-cidr-block-association.state - The - // state of an IPv6 CIDR block associated with the subnet. + // * ipv6-cidr-block-association.association-id - An association ID + // for an IPv6 CIDR block associated with the subnet. // - // * outpost-arn - The - // Amazon Resource Name (ARN) of the Outpost. + // * + // ipv6-cidr-block-association.state - The state of an IPv6 CIDR block associated + // with the subnet. // - // * owner-id - The ID of the Amazon - // Web Services account that owns the subnet. + // * ipv6-native - Indicates whether this is an IPv6 only subnet + // (true | false). // - // * state - The state of the subnet - // (pending | available). + // * outpost-arn - The Amazon Resource Name (ARN) of the + // Outpost. // - // * subnet-arn - The Amazon Resource Name (ARN) of the + // * owner-id - The ID of the Amazon Web Services account that owns the // subnet. // - // * subnet-id - The ID of the subnet. + // * state - The state of the subnet (pending | available). // - // * tag: - The key/value combination - // of a tag assigned to the resource. Use the tag key in the filter name and the - // tag value as the filter value. For example, to find all resources that have a - // tag with the key Owner and the value TeamA, specify tag:Owner for the filter - // name and TeamA for the filter value. + // * subnet-arn + // - The Amazon Resource Name (ARN) of the subnet. // - // * tag-key - The key of a tag assigned to - // the resource. Use this filter to find all resources assigned a tag with a - // specific key, regardless of the tag value. - // - // * vpc-id - The ID of the VPC for the + // * subnet-id - The ID of the // subnet. + // + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. For + // example, to find all resources that have a tag with the key Owner and the value + // TeamA, specify tag:Owner for the filter name and TeamA for the filter value. + // + // * + // tag-key - The key of a tag assigned to the resource. Use this filter to find all + // resources assigned a tag with a specific key, regardless of the tag value. + // + // * + // vpc-id - The ID of the VPC for the subnet. Filters []types.Filter // The maximum number of results to return with a single call. To retrieve the diff --git a/service/ec2/api_op_ListSnapshotsInRecycleBin.go b/service/ec2/api_op_ListSnapshotsInRecycleBin.go new file mode 100644 index 00000000000..f89cceeb51d --- /dev/null +++ b/service/ec2/api_op_ListSnapshotsInRecycleBin.go @@ -0,0 +1,224 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ec2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/ec2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists one or more snapshots that are currently in the Recycle Bin. +func (c *Client) ListSnapshotsInRecycleBin(ctx context.Context, params *ListSnapshotsInRecycleBinInput, optFns ...func(*Options)) (*ListSnapshotsInRecycleBinOutput, error) { + if params == nil { + params = &ListSnapshotsInRecycleBinInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListSnapshotsInRecycleBin", params, optFns, c.addOperationListSnapshotsInRecycleBinMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListSnapshotsInRecycleBinOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListSnapshotsInRecycleBinInput struct { + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have the + // required permissions, the error response is DryRunOperation. Otherwise, it is + // UnauthorizedOperation. + DryRun *bool + + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + MaxResults *int32 + + // The token for the next page of results. + NextToken *string + + // The IDs of the snapshots to list. Omit this parameter to list all of the + // snapshots that are in the Recycle Bin. + SnapshotIds []string + + noSmithyDocumentSerde +} + +type ListSnapshotsInRecycleBinOutput struct { + + // The token to use to retrieve the next page of results. This value is null when + // there are no more results to return. + NextToken *string + + // Information about the snapshots. + Snapshots []types.SnapshotRecycleBinInfo + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListSnapshotsInRecycleBinMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsEc2query_serializeOpListSnapshotsInRecycleBin{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsEc2query_deserializeOpListSnapshotsInRecycleBin{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSnapshotsInRecycleBin(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListSnapshotsInRecycleBinAPIClient is a client that implements the +// ListSnapshotsInRecycleBin operation. +type ListSnapshotsInRecycleBinAPIClient interface { + ListSnapshotsInRecycleBin(context.Context, *ListSnapshotsInRecycleBinInput, ...func(*Options)) (*ListSnapshotsInRecycleBinOutput, error) +} + +var _ ListSnapshotsInRecycleBinAPIClient = (*Client)(nil) + +// ListSnapshotsInRecycleBinPaginatorOptions is the paginator options for +// ListSnapshotsInRecycleBin +type ListSnapshotsInRecycleBinPaginatorOptions struct { + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListSnapshotsInRecycleBinPaginator is a paginator for ListSnapshotsInRecycleBin +type ListSnapshotsInRecycleBinPaginator struct { + options ListSnapshotsInRecycleBinPaginatorOptions + client ListSnapshotsInRecycleBinAPIClient + params *ListSnapshotsInRecycleBinInput + nextToken *string + firstPage bool +} + +// NewListSnapshotsInRecycleBinPaginator returns a new +// ListSnapshotsInRecycleBinPaginator +func NewListSnapshotsInRecycleBinPaginator(client ListSnapshotsInRecycleBinAPIClient, params *ListSnapshotsInRecycleBinInput, optFns ...func(*ListSnapshotsInRecycleBinPaginatorOptions)) *ListSnapshotsInRecycleBinPaginator { + if params == nil { + params = &ListSnapshotsInRecycleBinInput{} + } + + options := ListSnapshotsInRecycleBinPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListSnapshotsInRecycleBinPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListSnapshotsInRecycleBinPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListSnapshotsInRecycleBin page. +func (p *ListSnapshotsInRecycleBinPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListSnapshotsInRecycleBinOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListSnapshotsInRecycleBin(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListSnapshotsInRecycleBin(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ec2", + OperationName: "ListSnapshotsInRecycleBin", + } +} diff --git a/service/ec2/api_op_ModifyInstanceAttribute.go b/service/ec2/api_op_ModifyInstanceAttribute.go index 52071523368..fb99b391058 100644 --- a/service/ec2/api_op_ModifyInstanceAttribute.go +++ b/service/ec2/api_op_ModifyInstanceAttribute.go @@ -18,7 +18,7 @@ import ( // security groups associated with an ENI attached to an instance that has multiple // ENIs, we recommend that you use the ModifyNetworkInterfaceAttribute action. To // modify some attributes, the instance must be stopped. For more information, see -// Modifying attributes of a stopped instance +// Modify a stopped instance // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_ChangingAttributesWhileInstanceStopped.html) // in the Amazon EC2 User Guide. func (c *Client) ModifyInstanceAttribute(ctx context.Context, params *ModifyInstanceAttributeInput, optFns ...func(*Options)) (*ModifyInstanceAttributeOutput, error) { @@ -51,7 +51,7 @@ type ModifyInstanceAttributeInput struct { // DeleteOnTermination, the default is true and the volume is deleted when the // instance is terminated. To add instance store volumes to an Amazon EBS-backed // instance, you must add them when you launch the instance. For more information, - // see Updating the block device mapping when launching an instance + // see Update the block device mapping when launching an instance // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html#Using_OverridingAMIBDM) // in the Amazon EC2 User Guide. BlockDeviceMappings []types.InstanceBlockDeviceMappingSpecification diff --git a/service/ec2/api_op_ModifyInstanceMetadataOptions.go b/service/ec2/api_op_ModifyInstanceMetadataOptions.go index 7026b995a68..200e0ab46f7 100644 --- a/service/ec2/api_op_ModifyInstanceMetadataOptions.go +++ b/service/ec2/api_op_ModifyInstanceMetadataOptions.go @@ -48,13 +48,13 @@ type ModifyInstanceMetadataOptionsInput struct { // UnauthorizedOperation. DryRun *bool - // This parameter enables or disables the HTTP metadata endpoint on your instances. - // If the parameter is not specified, the existing state is maintained. If you - // specify a value of disabled, you will not be able to access your instance - // metadata. + // Enables or disables the HTTP metadata endpoint on your instances. If the + // parameter is not specified, the existing state is maintained. If you specify a + // value of disabled, you cannot access your instance metadata. HttpEndpoint types.InstanceMetadataEndpointState - // Enables or disables the IPv6 endpoint for the instance metadata service. + // Enables or disables the IPv6 endpoint for the instance metadata service. This + // setting applies only if you have enabled the HTTP metadata endpoint. HttpProtocolIpv6 types.InstanceMetadataProtocolState // The desired HTTP PUT response hop limit for instance metadata requests. The diff --git a/service/ec2/api_op_ModifyInstancePlacement.go b/service/ec2/api_op_ModifyInstancePlacement.go index 00dcc200a35..b078e9c7395 100644 --- a/service/ec2/api_op_ModifyInstancePlacement.go +++ b/service/ec2/api_op_ModifyInstancePlacement.go @@ -73,7 +73,8 @@ type ModifyInstancePlacementInput struct { // The ARN of the host resource group in which to place the instance. HostResourceGroupArn *string - // Reserved for future use. + // The number of the partition in which to place the instance. Valid only if the + // placement group strategy is set to partition. PartitionNumber *int32 // The tenancy for the instance. For T3 instances, you can't change the tenancy diff --git a/service/ec2/api_op_ModifyPrivateDnsNameOptions.go b/service/ec2/api_op_ModifyPrivateDnsNameOptions.go new file mode 100644 index 00000000000..d1ec347fa8a --- /dev/null +++ b/service/ec2/api_op_ModifyPrivateDnsNameOptions.go @@ -0,0 +1,136 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ec2 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/ec2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Modifies the options for instance hostnames for the specified instance. +func (c *Client) ModifyPrivateDnsNameOptions(ctx context.Context, params *ModifyPrivateDnsNameOptionsInput, optFns ...func(*Options)) (*ModifyPrivateDnsNameOptionsOutput, error) { + if params == nil { + params = &ModifyPrivateDnsNameOptionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ModifyPrivateDnsNameOptions", params, optFns, c.addOperationModifyPrivateDnsNameOptionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ModifyPrivateDnsNameOptionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ModifyPrivateDnsNameOptionsInput struct { + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have the + // required permissions, the error response is DryRunOperation. Otherwise, it is + // UnauthorizedOperation. + DryRun *bool + + // Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA + // records. + EnableResourceNameDnsAAAARecord *bool + + // Indicates whether to respond to DNS queries for instance hostnames with DNS A + // records. + EnableResourceNameDnsARecord *bool + + // The ID of the instance. + InstanceId *string + + // The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS + // name must be based on the instance IPv4 address. For IPv6 only subnets, an + // instance DNS name must be based on the instance ID. For dual-stack subnets, you + // can specify whether DNS names use the instance IPv4 address or the instance ID. + PrivateDnsHostnameType types.HostnameType + + noSmithyDocumentSerde +} + +type ModifyPrivateDnsNameOptionsOutput struct { + + // Returns true if the request succeeds; otherwise, it returns an error. + Return *bool + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationModifyPrivateDnsNameOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsEc2query_serializeOpModifyPrivateDnsNameOptions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyPrivateDnsNameOptions{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyPrivateDnsNameOptions(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opModifyPrivateDnsNameOptions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ec2", + OperationName: "ModifyPrivateDnsNameOptions", + } +} diff --git a/service/ec2/api_op_ModifySnapshotTier.go b/service/ec2/api_op_ModifySnapshotTier.go new file mode 100644 index 00000000000..52495e3a7a9 --- /dev/null +++ b/service/ec2/api_op_ModifySnapshotTier.go @@ -0,0 +1,139 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ec2 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/ec2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Archives an Amazon EBS snapshot. When you archive a snapshot, it is converted to +// a full snapshot that includes all of the blocks of data that were written to the +// volume at the time the snapshot was created, and moved from the standard tier to +// the archive tier. For more information, see Archive Amazon EBS snapshots +// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-archive.html) in +// the Amazon Elastic Compute Cloud User Guide. +func (c *Client) ModifySnapshotTier(ctx context.Context, params *ModifySnapshotTierInput, optFns ...func(*Options)) (*ModifySnapshotTierOutput, error) { + if params == nil { + params = &ModifySnapshotTierInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ModifySnapshotTier", params, optFns, c.addOperationModifySnapshotTierMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ModifySnapshotTierOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ModifySnapshotTierInput struct { + + // The ID of the snapshot. + // + // This member is required. + SnapshotId *string + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have the + // required permissions, the error response is DryRunOperation. Otherwise, it is + // UnauthorizedOperation. + DryRun *bool + + // The name of the storage tier. You must specify archive. + StorageTier types.TargetStorageTier + + noSmithyDocumentSerde +} + +type ModifySnapshotTierOutput struct { + + // The ID of the snapshot. + SnapshotId *string + + // The date and time when the archive process was started. + TieringStartTime *time.Time + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationModifySnapshotTierMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsEc2query_serializeOpModifySnapshotTier{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifySnapshotTier{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpModifySnapshotTierValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifySnapshotTier(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opModifySnapshotTier(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ec2", + OperationName: "ModifySnapshotTier", + } +} diff --git a/service/ec2/api_op_ModifySubnetAttribute.go b/service/ec2/api_op_ModifySubnetAttribute.go index 39f19d7e388..5a0054c02ab 100644 --- a/service/ec2/api_op_ModifySubnetAttribute.go +++ b/service/ec2/api_op_ModifySubnetAttribute.go @@ -50,6 +50,14 @@ type ModifySubnetAttributeInput struct { // subnet should return synthetic IPv6 addresses for IPv4-only destinations. EnableDns64 *types.AttributeBooleanValue + // Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA + // records. + EnableResourceNameDnsAAAARecordOnLaunch *types.AttributeBooleanValue + + // Indicates whether to respond to DNS queries for instance hostnames with DNS A + // records. + EnableResourceNameDnsARecordOnLaunch *types.AttributeBooleanValue + // Specify true to indicate that network interfaces attached to instances created // in the specified subnet should be assigned a customer-owned IPv4 address. When // this value is true, you must specify the customer-owned IP pool using @@ -60,6 +68,13 @@ type ModifySubnetAttributeInput struct { // in the specified subnet should be assigned a public IPv4 address. MapPublicIpOnLaunch *types.AttributeBooleanValue + // The type of hostnames to assign to instances in the subnet at launch. For IPv4 + // only subnets, an instance DNS name must be based on the instance IPv4 address. + // For IPv6 only subnets, an instance DNS name must be based on the instance ID. + // For dual-stack subnets, you can specify whether DNS names use the instance IPv4 + // address or the instance ID. + PrivateDnsHostnameTypeOnLaunch types.HostnameType + noSmithyDocumentSerde } diff --git a/service/ec2/api_op_MonitorInstances.go b/service/ec2/api_op_MonitorInstances.go index 23518ac1378..8a0bf09b64e 100644 --- a/service/ec2/api_op_MonitorInstances.go +++ b/service/ec2/api_op_MonitorInstances.go @@ -12,7 +12,7 @@ import ( ) // Enables detailed monitoring for a running instance. Otherwise, basic monitoring -// is enabled. For more information, see Monitoring your instances and volumes +// is enabled. For more information, see Monitor your instances using CloudWatch // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html) in // the Amazon EC2 User Guide. To disable detailed monitoring, see . func (c *Client) MonitorInstances(ctx context.Context, params *MonitorInstancesInput, optFns ...func(*Options)) (*MonitorInstancesOutput, error) { diff --git a/service/ec2/api_op_RebootInstances.go b/service/ec2/api_op_RebootInstances.go index b24bef8e35f..d763e3b5d2e 100644 --- a/service/ec2/api_op_RebootInstances.go +++ b/service/ec2/api_op_RebootInstances.go @@ -15,7 +15,7 @@ import ( // if the instances are valid and belong to you. Requests to reboot terminated // instances are ignored. If an instance does not cleanly shut down within a few // minutes, Amazon EC2 performs a hard reboot. For more information about -// troubleshooting, see Getting console output and rebooting instances +// troubleshooting, see Troubleshoot an unreachable instance // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html) in // the Amazon EC2 User Guide. func (c *Client) RebootInstances(ctx context.Context, params *RebootInstancesInput, optFns ...func(*Options)) (*RebootInstancesOutput, error) { diff --git a/service/ec2/api_op_ReplaceRoute.go b/service/ec2/api_op_ReplaceRoute.go index 7d0647f78ec..2ff6238bd33 100644 --- a/service/ec2/api_op_ReplaceRoute.go +++ b/service/ec2/api_op_ReplaceRoute.go @@ -41,6 +41,7 @@ type ReplaceRouteInput struct { // [IPv4 traffic only] The ID of a carrier gateway. CarrierGatewayId *string + // The Amazon Resource Name (ARN) of the core network. CoreNetworkArn *string // The IPv4 CIDR address block used for the destination match. The value that you diff --git a/service/ec2/api_op_RestoreSnapshotFromRecycleBin.go b/service/ec2/api_op_RestoreSnapshotFromRecycleBin.go new file mode 100644 index 00000000000..58be950574b --- /dev/null +++ b/service/ec2/api_op_RestoreSnapshotFromRecycleBin.go @@ -0,0 +1,161 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ec2 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/ec2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Restores a snapshot from the Recycle Bin. For more information, see Restore +// snapshots from the Recycle Bin +// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin-working-with-snaps.html#recycle-bin-restore-snaps) +// in the Amazon Elastic Compute Cloud User Guide. +func (c *Client) RestoreSnapshotFromRecycleBin(ctx context.Context, params *RestoreSnapshotFromRecycleBinInput, optFns ...func(*Options)) (*RestoreSnapshotFromRecycleBinOutput, error) { + if params == nil { + params = &RestoreSnapshotFromRecycleBinInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RestoreSnapshotFromRecycleBin", params, optFns, c.addOperationRestoreSnapshotFromRecycleBinMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RestoreSnapshotFromRecycleBinOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RestoreSnapshotFromRecycleBinInput struct { + + // The ID of the snapshot to restore. + // + // This member is required. + SnapshotId *string + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have the + // required permissions, the error response is DryRunOperation. Otherwise, it is + // UnauthorizedOperation. + DryRun *bool + + noSmithyDocumentSerde +} + +type RestoreSnapshotFromRecycleBinOutput struct { + + // The description for the snapshot. + Description *string + + // Indicates whether the snapshot is encrypted. + Encrypted *bool + + // The ARN of the Outpost on which the snapshot is stored. For more information, + // see Amazon EBS local snapshots on Outposts + // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html) in + // the Amazon Elastic Compute Cloud User Guide. + OutpostArn *string + + // The ID of the Amazon Web Services account that owns the EBS snapshot. + OwnerId *string + + // The progress of the snapshot, as a percentage. + Progress *string + + // The ID of the snapshot. + SnapshotId *string + + // The time stamp when the snapshot was initiated. + StartTime *time.Time + + // The state of the snapshot. + State types.SnapshotState + + // The ID of the volume that was used to create the snapshot. + VolumeId *string + + // The size of the volume, in GiB. + VolumeSize *int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRestoreSnapshotFromRecycleBinMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsEc2query_serializeOpRestoreSnapshotFromRecycleBin{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsEc2query_deserializeOpRestoreSnapshotFromRecycleBin{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpRestoreSnapshotFromRecycleBinValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRestoreSnapshotFromRecycleBin(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opRestoreSnapshotFromRecycleBin(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ec2", + OperationName: "RestoreSnapshotFromRecycleBin", + } +} diff --git a/service/ec2/api_op_RestoreSnapshotTier.go b/service/ec2/api_op_RestoreSnapshotTier.go new file mode 100644 index 00000000000..9e8945b9906 --- /dev/null +++ b/service/ec2/api_op_RestoreSnapshotTier.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ec2 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Restores an archived Amazon EBS snapshot for use temporarily or permanently, or +// modifies the restore period or restore type for a snapshot that was previously +// temporarily restored. For more information see Restore an archived snapshot +// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/working-with-snapshot-archiving.html#restore-archived-snapshot) +// and modify the restore period or restore type for a temporarily restored +// snapshot +// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/working-with-snapshot-archiving.html#modify-temp-restore-period) +// in the Amazon Elastic Compute Cloud User Guide. +func (c *Client) RestoreSnapshotTier(ctx context.Context, params *RestoreSnapshotTierInput, optFns ...func(*Options)) (*RestoreSnapshotTierOutput, error) { + if params == nil { + params = &RestoreSnapshotTierInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RestoreSnapshotTier", params, optFns, c.addOperationRestoreSnapshotTierMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RestoreSnapshotTierOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RestoreSnapshotTierInput struct { + + // The ID of the snapshot to restore. + // + // This member is required. + SnapshotId *string + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have the + // required permissions, the error response is DryRunOperation. Otherwise, it is + // UnauthorizedOperation. + DryRun *bool + + // Indicates whether to permanently restore an archived snapshot. To permanently + // restore an archived snapshot, specify true and omit the + // RestoreSnapshotTierRequest$TemporaryRestoreDays parameter. + PermanentRestore *bool + + // Specifies the number of days for which to temporarily restore an archived + // snapshot. Required for temporary restores only. The snapshot will be + // automatically re-archived after this period. To temporarily restore an archived + // snapshot, specify the number of days and omit the PermanentRestore parameter or + // set it to false. + TemporaryRestoreDays *int32 + + noSmithyDocumentSerde +} + +type RestoreSnapshotTierOutput struct { + + // Indicates whether the snapshot is permanently restored. true indicates a + // permanent restore. false indicates a temporary restore. + IsPermanentRestore *bool + + // For temporary restores only. The number of days for which the archived snapshot + // is temporarily restored. + RestoreDuration *int32 + + // The date and time when the snapshot restore process started. + RestoreStartTime *time.Time + + // The ID of the snapshot. + SnapshotId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRestoreSnapshotTierMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsEc2query_serializeOpRestoreSnapshotTier{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsEc2query_deserializeOpRestoreSnapshotTier{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpRestoreSnapshotTierValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRestoreSnapshotTier(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opRestoreSnapshotTier(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ec2", + OperationName: "RestoreSnapshotTier", + } +} diff --git a/service/ec2/api_op_RunInstances.go b/service/ec2/api_op_RunInstances.go index a1d94cefeec..10edadb4151 100644 --- a/service/ec2/api_op_RunInstances.go +++ b/service/ec2/api_op_RunInstances.go @@ -133,8 +133,7 @@ type RunInstancesInput struct { // Constraints: Maximum 64 ASCII characters ClientToken *string - // The CPU options for the instance. For more information, see Optimizing CPU - // options + // The CPU options for the instance. For more information, see Optimize CPU options // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) // in the Amazon EC2 User Guide. CpuOptions *types.CpuOptionsRequest @@ -275,6 +274,10 @@ type RunInstancesInput struct { // The placement for the instance. Placement *types.Placement + // The options for the instance hostname. The default values are inherited from the + // subnet. + PrivateDnsNameOptions *types.PrivateDnsNameOptionsRequest + // [EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 // address range of the subnet. Only one private IP address can be designated as // primary. You can't specify this option if you've specified the option to @@ -318,14 +321,14 @@ type RunInstancesInput struct { // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html). TagSpecifications []types.TagSpecification - // The user data to make available to the instance. For more information, see - // Running commands on your Linux instance at launch - // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html) (Linux) and - // Adding User Data - // (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data) - // (Windows). If you are using a command line tool, base64-encoding is performed - // for you, and you can load the text from a file. Otherwise, you must provide - // base64-encoded text. User data is limited to 16 KB. + // The user data to make available to the instance. For more information, see Run + // commands on your Linux instance at launch + // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html) and Run + // commands on your Windows instance at launch + // (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-windows-user-data.html). + // If you are using a command line tool, base64-encoding is performed for you, and + // you can load the text from a file. Otherwise, you must provide base64-encoded + // text. User data is limited to 16 KB. UserData *string noSmithyDocumentSerde diff --git a/service/ec2/api_op_SendDiagnosticInterrupt.go b/service/ec2/api_op_SendDiagnosticInterrupt.go index 2cd866ce2a2..581637b0780 100644 --- a/service/ec2/api_op_SendDiagnosticInterrupt.go +++ b/service/ec2/api_op_SendDiagnosticInterrupt.go @@ -21,8 +21,9 @@ import ( // operating system is configured to perform the required diagnostic tasks. For // more information about configuring your operating system to generate a crash // dump when a kernel panic or stop error occurs, see Send a diagnostic interrupt +// (for advanced users) // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/diagnostic-interrupt.html) -// (Linux instances) or Send a Diagnostic Interrupt +// (Linux instances) or Send a diagnostic interrupt (for advanced users) // (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/diagnostic-interrupt.html) // (Windows instances). func (c *Client) SendDiagnosticInterrupt(ctx context.Context, params *SendDiagnosticInterruptInput, optFns ...func(*Options)) (*SendDiagnosticInterruptOutput, error) { diff --git a/service/ec2/api_op_StartInstances.go b/service/ec2/api_op_StartInstances.go index 926563e68e5..18821a93130 100644 --- a/service/ec2/api_op_StartInstances.go +++ b/service/ec2/api_op_StartInstances.go @@ -26,7 +26,7 @@ import ( // option, the request fails. The unlimited CPU credit option is not supported on // Dedicated Hosts. Before you start the instance, either change its CPU credit // option to standard, or change its tenancy to default or dedicated. For more -// information, see Stopping instances +// information, see Stop and start your instance // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html) in the // Amazon EC2 User Guide. func (c *Client) StartInstances(ctx context.Context, params *StartInstancesInput, optFns ...func(*Options)) (*StartInstancesOutput, error) { diff --git a/service/ec2/api_op_StopInstances.go b/service/ec2/api_op_StopInstances.go index 8c164442796..d627526b559 100644 --- a/service/ec2/api_op_StopInstances.go +++ b/service/ec2/api_op_StopInstances.go @@ -44,7 +44,7 @@ import ( // in the Amazon EC2 User Guide. When you stop an instance, we attempt to shut it // down forcibly after a short while. If your instance appears stuck in the // stopping state after a period of time, there may be an issue with the underlying -// host computer. For more information, see Troubleshooting stopping your instance +// host computer. For more information, see Troubleshoot stopping your instance // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesStopping.html) // in the Amazon EC2 User Guide. func (c *Client) StopInstances(ctx context.Context, params *StopInstancesInput, optFns ...func(*Options)) (*StopInstancesOutput, error) { diff --git a/service/ec2/deserializers.go b/service/ec2/deserializers.go index a9a75a7e2a8..a0ec8a54a74 100644 --- a/service/ec2/deserializers.go +++ b/service/ec2/deserializers.go @@ -22949,6 +22949,97 @@ func awsEc2query_deserializeOpErrorDescribeSnapshots(response *smithyhttp.Respon } } +type awsEc2query_deserializeOpDescribeSnapshotTierStatus struct { +} + +func (*awsEc2query_deserializeOpDescribeSnapshotTierStatus) ID() string { + return "OperationDeserializer" +} + +func (m *awsEc2query_deserializeOpDescribeSnapshotTierStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsEc2query_deserializeOpErrorDescribeSnapshotTierStatus(response, &metadata) + } + output := &DescribeSnapshotTierStatusOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentDescribeSnapshotTierStatusOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsEc2query_deserializeOpErrorDescribeSnapshotTierStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) + if err != nil { + return err + } + awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsEc2query_deserializeOpDescribeSpotDatafeedSubscription struct { } @@ -32775,6 +32866,97 @@ func awsEc2query_deserializeOpErrorImportVolume(response *smithyhttp.Response, m } } +type awsEc2query_deserializeOpListSnapshotsInRecycleBin struct { +} + +func (*awsEc2query_deserializeOpListSnapshotsInRecycleBin) ID() string { + return "OperationDeserializer" +} + +func (m *awsEc2query_deserializeOpListSnapshotsInRecycleBin) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsEc2query_deserializeOpErrorListSnapshotsInRecycleBin(response, &metadata) + } + output := &ListSnapshotsInRecycleBinOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentListSnapshotsInRecycleBinOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsEc2query_deserializeOpErrorListSnapshotsInRecycleBin(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) + if err != nil { + return err + } + awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsEc2query_deserializeOpModifyAddressAttribute struct { } @@ -34753,6 +34935,97 @@ func awsEc2query_deserializeOpErrorModifyNetworkInterfaceAttribute(response *smi } } +type awsEc2query_deserializeOpModifyPrivateDnsNameOptions struct { +} + +func (*awsEc2query_deserializeOpModifyPrivateDnsNameOptions) ID() string { + return "OperationDeserializer" +} + +func (m *awsEc2query_deserializeOpModifyPrivateDnsNameOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsEc2query_deserializeOpErrorModifyPrivateDnsNameOptions(response, &metadata) + } + output := &ModifyPrivateDnsNameOptionsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentModifyPrivateDnsNameOptionsOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsEc2query_deserializeOpErrorModifyPrivateDnsNameOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) + if err != nil { + return err + } + awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsEc2query_deserializeOpModifyReservedInstances struct { } @@ -35003,14 +35276,14 @@ func awsEc2query_deserializeOpErrorModifySnapshotAttribute(response *smithyhttp. } } -type awsEc2query_deserializeOpModifySpotFleetRequest struct { +type awsEc2query_deserializeOpModifySnapshotTier struct { } -func (*awsEc2query_deserializeOpModifySpotFleetRequest) ID() string { +func (*awsEc2query_deserializeOpModifySnapshotTier) ID() string { return "OperationDeserializer" } -func (m *awsEc2query_deserializeOpModifySpotFleetRequest) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsEc2query_deserializeOpModifySnapshotTier) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -35024,9 +35297,9 @@ func (m *awsEc2query_deserializeOpModifySpotFleetRequest) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifySpotFleetRequest(response, &metadata) + return out, metadata, awsEc2query_deserializeOpErrorModifySnapshotTier(response, &metadata) } - output := &ModifySpotFleetRequestOutput{} + output := &ModifySnapshotTierOutput{} out.Result = output var buff [1024]byte @@ -35047,7 +35320,7 @@ func (m *awsEc2query_deserializeOpModifySpotFleetRequest) HandleDeserialize(ctx } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifySpotFleetRequestOutput(&output, decoder) + err = awsEc2query_deserializeOpDocumentModifySnapshotTierOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -35061,7 +35334,98 @@ func (m *awsEc2query_deserializeOpModifySpotFleetRequest) HandleDeserialize(ctx return out, metadata, err } -func awsEc2query_deserializeOpErrorModifySpotFleetRequest(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsEc2query_deserializeOpErrorModifySnapshotTier(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) + if err != nil { + return err + } + awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsEc2query_deserializeOpModifySpotFleetRequest struct { +} + +func (*awsEc2query_deserializeOpModifySpotFleetRequest) ID() string { + return "OperationDeserializer" +} + +func (m *awsEc2query_deserializeOpModifySpotFleetRequest) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsEc2query_deserializeOpErrorModifySpotFleetRequest(response, &metadata) + } + output := &ModifySpotFleetRequestOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentModifySpotFleetRequestOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsEc2query_deserializeOpErrorModifySpotFleetRequest(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -39914,6 +40278,188 @@ func awsEc2query_deserializeOpErrorRestoreManagedPrefixListVersion(response *smi } } +type awsEc2query_deserializeOpRestoreSnapshotFromRecycleBin struct { +} + +func (*awsEc2query_deserializeOpRestoreSnapshotFromRecycleBin) ID() string { + return "OperationDeserializer" +} + +func (m *awsEc2query_deserializeOpRestoreSnapshotFromRecycleBin) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsEc2query_deserializeOpErrorRestoreSnapshotFromRecycleBin(response, &metadata) + } + output := &RestoreSnapshotFromRecycleBinOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentRestoreSnapshotFromRecycleBinOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsEc2query_deserializeOpErrorRestoreSnapshotFromRecycleBin(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) + if err != nil { + return err + } + awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsEc2query_deserializeOpRestoreSnapshotTier struct { +} + +func (*awsEc2query_deserializeOpRestoreSnapshotTier) ID() string { + return "OperationDeserializer" +} + +func (m *awsEc2query_deserializeOpRestoreSnapshotTier) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsEc2query_deserializeOpErrorRestoreSnapshotTier(response, &metadata) + } + output := &RestoreSnapshotTierOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentRestoreSnapshotTierOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsEc2query_deserializeOpErrorRestoreSnapshotTier(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) + if err != nil { + return err + } + awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsEc2query_deserializeOpRevokeClientVpnIngress struct { } @@ -64417,6 +64963,19 @@ func awsEc2query_deserializeDocumentInstance(v **types.Instance, decoder smithyx sv.InstanceType = types.InstanceType(xtv) } + case strings.EqualFold("ipv6Address", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Ipv6Address = ptr.String(xtv) + } + case strings.EqualFold("kernelId", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -64542,6 +65101,12 @@ func awsEc2query_deserializeDocumentInstance(v **types.Instance, decoder smithyx sv.PrivateDnsName = ptr.String(xtv) } + case strings.EqualFold("privateDnsNameOptions", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentPrivateDnsNameOptionsResponse(&sv.PrivateDnsNameOptions, nodeDecoder); err != nil { + return err + } + case strings.EqualFold("privateIpAddress", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -74510,6 +75075,87 @@ func awsEc2query_deserializeDocumentLaunchTemplatePlacement(v **types.LaunchTemp return nil } +func awsEc2query_deserializeDocumentLaunchTemplatePrivateDnsNameOptions(v **types.LaunchTemplatePrivateDnsNameOptions, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.LaunchTemplatePrivateDnsNameOptions + if *v == nil { + sv = &types.LaunchTemplatePrivateDnsNameOptions{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("enableResourceNameDnsAAAARecord", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) + } + sv.EnableResourceNameDnsAAAARecord = ptr.Bool(xtv) + } + + case strings.EqualFold("enableResourceNameDnsARecord", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) + } + sv.EnableResourceNameDnsARecord = ptr.Bool(xtv) + } + + case strings.EqualFold("hostnameType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.HostnameType = types.HostnameType(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsEc2query_deserializeDocumentLaunchTemplateSet(v *[]types.LaunchTemplate, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -79320,12 +79966,41 @@ func awsEc2query_deserializeDocumentNetworkInterface(v **types.NetworkInterface, return err } + case strings.EqualFold("ipv6Address", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Ipv6Address = ptr.String(xtv) + } + case strings.EqualFold("ipv6AddressesSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsEc2query_deserializeDocumentNetworkInterfaceIpv6AddressesList(&sv.Ipv6Addresses, nodeDecoder); err != nil { return err } + case strings.EqualFold("ipv6Native", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) + } + sv.Ipv6Native = ptr.Bool(xtv) + } + case strings.EqualFold("ipv6PrefixSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsEc2query_deserializeDocumentIpv6PrefixesList(&sv.Ipv6Prefixes, nodeDecoder); err != nil { @@ -83839,6 +84514,168 @@ func awsEc2query_deserializeDocumentPrivateDnsNameConfiguration(v **types.Privat return nil } +func awsEc2query_deserializeDocumentPrivateDnsNameOptionsOnLaunch(v **types.PrivateDnsNameOptionsOnLaunch, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PrivateDnsNameOptionsOnLaunch + if *v == nil { + sv = &types.PrivateDnsNameOptionsOnLaunch{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("enableResourceNameDnsAAAARecord", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) + } + sv.EnableResourceNameDnsAAAARecord = ptr.Bool(xtv) + } + + case strings.EqualFold("enableResourceNameDnsARecord", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) + } + sv.EnableResourceNameDnsARecord = ptr.Bool(xtv) + } + + case strings.EqualFold("hostnameType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.HostnameType = types.HostnameType(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeDocumentPrivateDnsNameOptionsResponse(v **types.PrivateDnsNameOptionsResponse, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PrivateDnsNameOptionsResponse + if *v == nil { + sv = &types.PrivateDnsNameOptionsResponse{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("enableResourceNameDnsAAAARecord", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) + } + sv.EnableResourceNameDnsAAAARecord = ptr.Bool(xtv) + } + + case strings.EqualFold("enableResourceNameDnsARecord", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) + } + sv.EnableResourceNameDnsARecord = ptr.Bool(xtv) + } + + case strings.EqualFold("hostnameType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.HostnameType = types.HostnameType(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsEc2query_deserializeDocumentPrivateIpAddressSpecification(v **types.PrivateIpAddressSpecification, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -87864,6 +88701,12 @@ func awsEc2query_deserializeDocumentResponseLaunchTemplateData(v **types.Respons return err } + case strings.EqualFold("privateDnsNameOptions", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentLaunchTemplatePrivateDnsNameOptions(&sv.PrivateDnsNameOptions, nodeDecoder); err != nil { + return err + } + case strings.EqualFold("ramDiskId", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -91059,6 +91902,23 @@ func awsEc2query_deserializeDocumentSnapshot(v **types.Snapshot, decoder smithyx sv.Progress = ptr.String(xtv) } + case strings.EqualFold("restoreExpiryTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.RestoreExpiryTime = ptr.Time(t) + } + case strings.EqualFold("snapshotId", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -91115,6 +91975,19 @@ func awsEc2query_deserializeDocumentSnapshot(v **types.Snapshot, decoder smithyx sv.StateMessage = ptr.String(xtv) } + case strings.EqualFold("storageTier", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.StorageTier = types.StorageTier(xtv) + } + case strings.EqualFold("tagSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { @@ -91647,6 +92520,183 @@ func awsEc2query_deserializeDocumentSnapshotListUnwrapped(v *[]types.Snapshot, d *v = sv return nil } +func awsEc2query_deserializeDocumentSnapshotRecycleBinInfo(v **types.SnapshotRecycleBinInfo, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.SnapshotRecycleBinInfo + if *v == nil { + sv = &types.SnapshotRecycleBinInfo{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("description", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Description = ptr.String(xtv) + } + + case strings.EqualFold("recycleBinEnterTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.RecycleBinEnterTime = ptr.Time(t) + } + + case strings.EqualFold("recycleBinExitTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.RecycleBinExitTime = ptr.Time(t) + } + + case strings.EqualFold("snapshotId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SnapshotId = ptr.String(xtv) + } + + case strings.EqualFold("volumeId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.VolumeId = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeDocumentSnapshotRecycleBinInfoList(v *[]types.SnapshotRecycleBinInfo, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.SnapshotRecycleBinInfo + if *v == nil { + sv = make([]types.SnapshotRecycleBinInfo, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("item", t.Name.Local): + var col types.SnapshotRecycleBinInfo + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsEc2query_deserializeDocumentSnapshotRecycleBinInfo(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeDocumentSnapshotRecycleBinInfoListUnwrapped(v *[]types.SnapshotRecycleBinInfo, decoder smithyxml.NodeDecoder) error { + var sv []types.SnapshotRecycleBinInfo + if *v == nil { + sv = make([]types.SnapshotRecycleBinInfo, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.SnapshotRecycleBinInfo + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsEc2query_deserializeDocumentSnapshotRecycleBinInfo(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} func awsEc2query_deserializeDocumentSnapshotSet(v *[]types.SnapshotInfo, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -91894,6 +92944,275 @@ func awsEc2query_deserializeDocumentSnapshotTaskDetail(v **types.SnapshotTaskDet return nil } +func awsEc2query_deserializeDocumentSnapshotTierStatus(v **types.SnapshotTierStatus, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.SnapshotTierStatus + if *v == nil { + sv = &types.SnapshotTierStatus{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("archivalCompleteTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.ArchivalCompleteTime = ptr.Time(t) + } + + case strings.EqualFold("lastTieringOperationStatus", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.LastTieringOperationStatus = types.TieringOperationStatus(xtv) + } + + case strings.EqualFold("lastTieringOperationStatusDetail", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.LastTieringOperationStatusDetail = ptr.String(xtv) + } + + case strings.EqualFold("lastTieringProgress", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.LastTieringProgress = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("lastTieringStartTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.LastTieringStartTime = ptr.Time(t) + } + + case strings.EqualFold("ownerId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.OwnerId = ptr.String(xtv) + } + + case strings.EqualFold("restoreExpiryTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.RestoreExpiryTime = ptr.Time(t) + } + + case strings.EqualFold("snapshotId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SnapshotId = ptr.String(xtv) + } + + case strings.EqualFold("status", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Status = types.SnapshotState(xtv) + } + + case strings.EqualFold("storageTier", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.StorageTier = types.StorageTier(xtv) + } + + case strings.EqualFold("tagSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("volumeId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.VolumeId = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeDocumentSnapshotTierStatusSet(v *[]types.SnapshotTierStatus, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.SnapshotTierStatus + if *v == nil { + sv = make([]types.SnapshotTierStatus, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("item", t.Name.Local): + var col types.SnapshotTierStatus + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsEc2query_deserializeDocumentSnapshotTierStatus(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeDocumentSnapshotTierStatusSetUnwrapped(v *[]types.SnapshotTierStatus, decoder smithyxml.NodeDecoder) error { + var sv []types.SnapshotTierStatus + if *v == nil { + sv = make([]types.SnapshotTierStatus, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.SnapshotTierStatus + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsEc2query_deserializeDocumentSnapshotTierStatus(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} func awsEc2query_deserializeDocumentSpotCapacityRebalance(v **types.SpotCapacityRebalance, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -94941,6 +96260,22 @@ func awsEc2query_deserializeDocumentSubnet(v **types.Subnet, decoder smithyxml.N return err } + case strings.EqualFold("ipv6Native", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) + } + sv.Ipv6Native = ptr.Bool(xtv) + } + case strings.EqualFold("mapCustomerOwnedIpOnLaunch", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -94999,6 +96334,12 @@ func awsEc2query_deserializeDocumentSubnet(v **types.Subnet, decoder smithyxml.N sv.OwnerId = ptr.String(xtv) } + case strings.EqualFold("privateDnsNameOptionsOnLaunch", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentPrivateDnsNameOptionsOnLaunch(&sv.PrivateDnsNameOptionsOnLaunch, nodeDecoder); err != nil { + return err + } + case strings.EqualFold("state", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -112951,6 +114292,23 @@ func awsEc2query_deserializeOpDocumentCreateSnapshotOutput(v **CreateSnapshotOut sv.Progress = ptr.String(xtv) } + case strings.EqualFold("restoreExpiryTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.RestoreExpiryTime = ptr.Time(t) + } + case strings.EqualFold("snapshotId", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -113007,6 +114365,19 @@ func awsEc2query_deserializeOpDocumentCreateSnapshotOutput(v **CreateSnapshotOut sv.StateMessage = ptr.String(xtv) } + case strings.EqualFold("storageTier", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.StorageTier = types.StorageTier(xtv) + } + case strings.EqualFold("tagSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { @@ -120740,51 +122111,106 @@ func awsEc2query_deserializeOpDocumentDescribeScheduledInstancesOutput(v **Descr sv.NextToken = ptr.String(xtv) } - case strings.EqualFold("scheduledInstanceSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentScheduledInstanceSet(&sv.ScheduledInstanceSet, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeSecurityGroupReferencesOutput(v **DescribeSecurityGroupReferencesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeSecurityGroupReferencesOutput - if *v == nil { - sv = &DescribeSecurityGroupReferencesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("securityGroupReferenceSet", t.Name.Local): + case strings.EqualFold("scheduledInstanceSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentScheduledInstanceSet(&sv.ScheduledInstanceSet, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeOpDocumentDescribeSecurityGroupReferencesOutput(v **DescribeSecurityGroupReferencesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *DescribeSecurityGroupReferencesOutput + if *v == nil { + sv = &DescribeSecurityGroupReferencesOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("securityGroupReferenceSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentSecurityGroupReferences(&sv.SecurityGroupReferenceSet, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeOpDocumentDescribeSecurityGroupRulesOutput(v **DescribeSecurityGroupRulesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *DescribeSecurityGroupRulesOutput + if *v == nil { + sv = &DescribeSecurityGroupRulesOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("nextToken", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextToken = ptr.String(xtv) + } + + case strings.EqualFold("securityGroupRuleSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSecurityGroupReferences(&sv.SecurityGroupReferenceSet, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentSecurityGroupRuleList(&sv.SecurityGroupRules, nodeDecoder); err != nil { return err } @@ -120802,13 +122228,13 @@ func awsEc2query_deserializeOpDocumentDescribeSecurityGroupReferencesOutput(v ** return nil } -func awsEc2query_deserializeOpDocumentDescribeSecurityGroupRulesOutput(v **DescribeSecurityGroupRulesOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeSecurityGroupsOutput(v **DescribeSecurityGroupsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeSecurityGroupRulesOutput + var sv *DescribeSecurityGroupsOutput if *v == nil { - sv = &DescribeSecurityGroupRulesOutput{} + sv = &DescribeSecurityGroupsOutput{} } else { sv = *v } @@ -120837,9 +122263,9 @@ func awsEc2query_deserializeOpDocumentDescribeSecurityGroupRulesOutput(v **Descr sv.NextToken = ptr.String(xtv) } - case strings.EqualFold("securityGroupRuleSet", t.Name.Local): + case strings.EqualFold("securityGroupInfo", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSecurityGroupRuleList(&sv.SecurityGroupRules, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentSecurityGroupList(&sv.SecurityGroups, nodeDecoder); err != nil { return err } @@ -120857,13 +122283,13 @@ func awsEc2query_deserializeOpDocumentDescribeSecurityGroupRulesOutput(v **Descr return nil } -func awsEc2query_deserializeOpDocumentDescribeSecurityGroupsOutput(v **DescribeSecurityGroupsOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeSnapshotAttributeOutput(v **DescribeSnapshotAttributeOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeSecurityGroupsOutput + var sv *DescribeSnapshotAttributeOutput if *v == nil { - sv = &DescribeSecurityGroupsOutput{} + sv = &DescribeSnapshotAttributeOutput{} } else { sv = *v } @@ -120879,7 +122305,19 @@ func awsEc2query_deserializeOpDocumentDescribeSecurityGroupsOutput(v **DescribeS originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("nextToken", t.Name.Local): + case strings.EqualFold("createVolumePermission", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentCreateVolumePermissionList(&sv.CreateVolumePermissions, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("productCodes", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentProductCodeList(&sv.ProductCodes, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("snapshotId", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -120889,13 +122327,7 @@ func awsEc2query_deserializeOpDocumentDescribeSecurityGroupsOutput(v **DescribeS } { xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("securityGroupInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSecurityGroupList(&sv.SecurityGroups, nodeDecoder); err != nil { - return err + sv.SnapshotId = ptr.String(xtv) } default: @@ -120912,13 +122344,13 @@ func awsEc2query_deserializeOpDocumentDescribeSecurityGroupsOutput(v **DescribeS return nil } -func awsEc2query_deserializeOpDocumentDescribeSnapshotAttributeOutput(v **DescribeSnapshotAttributeOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeSnapshotsOutput(v **DescribeSnapshotsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeSnapshotAttributeOutput + var sv *DescribeSnapshotsOutput if *v == nil { - sv = &DescribeSnapshotAttributeOutput{} + sv = &DescribeSnapshotsOutput{} } else { sv = *v } @@ -120934,19 +122366,7 @@ func awsEc2query_deserializeOpDocumentDescribeSnapshotAttributeOutput(v **Descri originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { - case strings.EqualFold("createVolumePermission", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCreateVolumePermissionList(&sv.CreateVolumePermissions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("productCodes", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentProductCodeList(&sv.ProductCodes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("snapshotId", t.Name.Local): + case strings.EqualFold("nextToken", t.Name.Local): val, err := decoder.Value() if err != nil { return err @@ -120956,7 +122376,13 @@ func awsEc2query_deserializeOpDocumentDescribeSnapshotAttributeOutput(v **Descri } { xtv := string(val) - sv.SnapshotId = ptr.String(xtv) + sv.NextToken = ptr.String(xtv) + } + + case strings.EqualFold("snapshotSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentSnapshotList(&sv.Snapshots, nodeDecoder); err != nil { + return err } default: @@ -120973,13 +122399,13 @@ func awsEc2query_deserializeOpDocumentDescribeSnapshotAttributeOutput(v **Descri return nil } -func awsEc2query_deserializeOpDocumentDescribeSnapshotsOutput(v **DescribeSnapshotsOutput, decoder smithyxml.NodeDecoder) error { +func awsEc2query_deserializeOpDocumentDescribeSnapshotTierStatusOutput(v **DescribeSnapshotTierStatusOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *DescribeSnapshotsOutput + var sv *DescribeSnapshotTierStatusOutput if *v == nil { - sv = &DescribeSnapshotsOutput{} + sv = &DescribeSnapshotTierStatusOutput{} } else { sv = *v } @@ -121008,9 +122434,9 @@ func awsEc2query_deserializeOpDocumentDescribeSnapshotsOutput(v **DescribeSnapsh sv.NextToken = ptr.String(xtv) } - case strings.EqualFold("snapshotSet", t.Name.Local): + case strings.EqualFold("snapshotTierStatusSet", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSnapshotList(&sv.Snapshots, nodeDecoder); err != nil { + if err := awsEc2query_deserializeDocumentSnapshotTierStatusSet(&sv.SnapshotTierStatuses, nodeDecoder); err != nil { return err } @@ -127077,6 +128503,61 @@ func awsEc2query_deserializeOpDocumentImportVolumeOutput(v **ImportVolumeOutput, return nil } +func awsEc2query_deserializeOpDocumentListSnapshotsInRecycleBinOutput(v **ListSnapshotsInRecycleBinOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListSnapshotsInRecycleBinOutput + if *v == nil { + sv = &ListSnapshotsInRecycleBinOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("nextToken", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextToken = ptr.String(xtv) + } + + case strings.EqualFold("snapshotSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentSnapshotRecycleBinInfoList(&sv.Snapshots, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsEc2query_deserializeOpDocumentModifyAddressAttributeOutput(v **ModifyAddressAttributeOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -127935,6 +129416,58 @@ func awsEc2query_deserializeOpDocumentModifyManagedPrefixListOutput(v **ModifyMa return nil } +func awsEc2query_deserializeOpDocumentModifyPrivateDnsNameOptionsOutput(v **ModifyPrivateDnsNameOptionsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ModifyPrivateDnsNameOptionsOutput + if *v == nil { + sv = &ModifyPrivateDnsNameOptionsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("return", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) + } + sv.Return = ptr.Bool(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsEc2query_deserializeOpDocumentModifyReservedInstancesOutput(v **ModifyReservedInstancesOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -128036,6 +129569,72 @@ func awsEc2query_deserializeOpDocumentModifySecurityGroupRulesOutput(v **ModifyS return nil } +func awsEc2query_deserializeOpDocumentModifySnapshotTierOutput(v **ModifySnapshotTierOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ModifySnapshotTierOutput + if *v == nil { + sv = &ModifySnapshotTierOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("snapshotId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SnapshotId = ptr.String(xtv) + } + + case strings.EqualFold("tieringStartTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.TieringStartTime = ptr.Time(t) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsEc2query_deserializeOpDocumentModifySpotFleetRequestOutput(v **ModifySpotFleetRequestOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -130158,6 +131757,282 @@ func awsEc2query_deserializeOpDocumentRestoreManagedPrefixListVersionOutput(v ** return nil } +func awsEc2query_deserializeOpDocumentRestoreSnapshotFromRecycleBinOutput(v **RestoreSnapshotFromRecycleBinOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *RestoreSnapshotFromRecycleBinOutput + if *v == nil { + sv = &RestoreSnapshotFromRecycleBinOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("description", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Description = ptr.String(xtv) + } + + case strings.EqualFold("encrypted", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) + } + sv.Encrypted = ptr.Bool(xtv) + } + + case strings.EqualFold("outpostArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.OutpostArn = ptr.String(xtv) + } + + case strings.EqualFold("ownerId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.OwnerId = ptr.String(xtv) + } + + case strings.EqualFold("progress", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Progress = ptr.String(xtv) + } + + case strings.EqualFold("snapshotId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SnapshotId = ptr.String(xtv) + } + + case strings.EqualFold("startTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.StartTime = ptr.Time(t) + } + + case strings.EqualFold("status", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.State = types.SnapshotState(xtv) + } + + case strings.EqualFold("volumeId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.VolumeId = ptr.String(xtv) + } + + case strings.EqualFold("volumeSize", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.VolumeSize = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeOpDocumentRestoreSnapshotTierOutput(v **RestoreSnapshotTierOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *RestoreSnapshotTierOutput + if *v == nil { + sv = &RestoreSnapshotTierOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("isPermanentRestore", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) + } + sv.IsPermanentRestore = ptr.Bool(xtv) + } + + case strings.EqualFold("restoreDuration", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.RestoreDuration = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("restoreStartTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.RestoreStartTime = ptr.Time(t) + } + + case strings.EqualFold("snapshotId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SnapshotId = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsEc2query_deserializeOpDocumentRevokeClientVpnIngressOutput(v **RevokeClientVpnIngressOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/ec2/generated.json b/service/ec2/generated.json index 8e13872c3ad..b01319f3772 100644 --- a/service/ec2/generated.json +++ b/service/ec2/generated.json @@ -268,6 +268,7 @@ "api_op_DescribeSecurityGroupRules.go", "api_op_DescribeSecurityGroups.go", "api_op_DescribeSnapshotAttribute.go", + "api_op_DescribeSnapshotTierStatus.go", "api_op_DescribeSnapshots.go", "api_op_DescribeSpotDatafeedSubscription.go", "api_op_DescribeSpotFleetInstances.go", @@ -379,6 +380,7 @@ "api_op_ImportKeyPair.go", "api_op_ImportSnapshot.go", "api_op_ImportVolume.go", + "api_op_ListSnapshotsInRecycleBin.go", "api_op_ModifyAddressAttribute.go", "api_op_ModifyAvailabilityZoneGroup.go", "api_op_ModifyCapacityReservation.go", @@ -402,9 +404,11 @@ "api_op_ModifyLaunchTemplate.go", "api_op_ModifyManagedPrefixList.go", "api_op_ModifyNetworkInterfaceAttribute.go", + "api_op_ModifyPrivateDnsNameOptions.go", "api_op_ModifyReservedInstances.go", "api_op_ModifySecurityGroupRules.go", "api_op_ModifySnapshotAttribute.go", + "api_op_ModifySnapshotTier.go", "api_op_ModifySpotFleetRequest.go", "api_op_ModifySubnetAttribute.go", "api_op_ModifyTrafficMirrorFilterNetworkServices.go", @@ -462,6 +466,8 @@ "api_op_ResetSnapshotAttribute.go", "api_op_RestoreAddressToClassic.go", "api_op_RestoreManagedPrefixListVersion.go", + "api_op_RestoreSnapshotFromRecycleBin.go", + "api_op_RestoreSnapshotTier.go", "api_op_RevokeClientVpnIngress.go", "api_op_RevokeSecurityGroupEgress.go", "api_op_RevokeSecurityGroupIngress.go", diff --git a/service/ec2/serializers.go b/service/ec2/serializers.go index 0a2616fad31..5825339059e 100644 --- a/service/ec2/serializers.go +++ b/service/ec2/serializers.go @@ -16593,6 +16593,70 @@ func (m *awsEc2query_serializeOpDescribeSnapshots) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } +type awsEc2query_serializeOpDescribeSnapshotTierStatus struct { +} + +func (*awsEc2query_serializeOpDescribeSnapshotTierStatus) ID() string { + return "OperationSerializer" +} + +func (m *awsEc2query_serializeOpDescribeSnapshotTierStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeSnapshotTierStatusInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("DescribeSnapshotTierStatus") + body.Key("Version").String("2016-11-15") + + if err := awsEc2query_serializeOpDocumentDescribeSnapshotTierStatusInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsEc2query_serializeOpDescribeSpotDatafeedSubscription struct { } @@ -23633,6 +23697,70 @@ func (m *awsEc2query_serializeOpImportVolume) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } +type awsEc2query_serializeOpListSnapshotsInRecycleBin struct { +} + +func (*awsEc2query_serializeOpListSnapshotsInRecycleBin) ID() string { + return "OperationSerializer" +} + +func (m *awsEc2query_serializeOpListSnapshotsInRecycleBin) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListSnapshotsInRecycleBinInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("ListSnapshotsInRecycleBin") + body.Key("Version").String("2016-11-15") + + if err := awsEc2query_serializeOpDocumentListSnapshotsInRecycleBinInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsEc2query_serializeOpModifyAddressAttribute struct { } @@ -25105,14 +25233,14 @@ func (m *awsEc2query_serializeOpModifyNetworkInterfaceAttribute) HandleSerialize return next.HandleSerialize(ctx, in) } -type awsEc2query_serializeOpModifyReservedInstances struct { +type awsEc2query_serializeOpModifyPrivateDnsNameOptions struct { } -func (*awsEc2query_serializeOpModifyReservedInstances) ID() string { +func (*awsEc2query_serializeOpModifyPrivateDnsNameOptions) ID() string { return "OperationSerializer" } -func (m *awsEc2query_serializeOpModifyReservedInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsEc2query_serializeOpModifyPrivateDnsNameOptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -25120,7 +25248,7 @@ func (m *awsEc2query_serializeOpModifyReservedInstances) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ModifyReservedInstancesInput) + input, ok := in.Parameters.(*ModifyPrivateDnsNameOptionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -25145,10 +25273,10 @@ func (m *awsEc2query_serializeOpModifyReservedInstances) HandleSerialize(ctx con bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() - body.Key("Action").String("ModifyReservedInstances") + body.Key("Action").String("ModifyPrivateDnsNameOptions") body.Key("Version").String("2016-11-15") - if err := awsEc2query_serializeOpDocumentModifyReservedInstancesInput(input, bodyEncoder.Value); err != nil { + if err := awsEc2query_serializeOpDocumentModifyPrivateDnsNameOptionsInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -25169,14 +25297,14 @@ func (m *awsEc2query_serializeOpModifyReservedInstances) HandleSerialize(ctx con return next.HandleSerialize(ctx, in) } -type awsEc2query_serializeOpModifySecurityGroupRules struct { +type awsEc2query_serializeOpModifyReservedInstances struct { } -func (*awsEc2query_serializeOpModifySecurityGroupRules) ID() string { +func (*awsEc2query_serializeOpModifyReservedInstances) ID() string { return "OperationSerializer" } -func (m *awsEc2query_serializeOpModifySecurityGroupRules) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsEc2query_serializeOpModifyReservedInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -25184,7 +25312,7 @@ func (m *awsEc2query_serializeOpModifySecurityGroupRules) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ModifySecurityGroupRulesInput) + input, ok := in.Parameters.(*ModifyReservedInstancesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -25209,10 +25337,10 @@ func (m *awsEc2query_serializeOpModifySecurityGroupRules) HandleSerialize(ctx co bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() - body.Key("Action").String("ModifySecurityGroupRules") + body.Key("Action").String("ModifyReservedInstances") body.Key("Version").String("2016-11-15") - if err := awsEc2query_serializeOpDocumentModifySecurityGroupRulesInput(input, bodyEncoder.Value); err != nil { + if err := awsEc2query_serializeOpDocumentModifyReservedInstancesInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -25233,14 +25361,14 @@ func (m *awsEc2query_serializeOpModifySecurityGroupRules) HandleSerialize(ctx co return next.HandleSerialize(ctx, in) } -type awsEc2query_serializeOpModifySnapshotAttribute struct { +type awsEc2query_serializeOpModifySecurityGroupRules struct { } -func (*awsEc2query_serializeOpModifySnapshotAttribute) ID() string { +func (*awsEc2query_serializeOpModifySecurityGroupRules) ID() string { return "OperationSerializer" } -func (m *awsEc2query_serializeOpModifySnapshotAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsEc2query_serializeOpModifySecurityGroupRules) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -25248,7 +25376,7 @@ func (m *awsEc2query_serializeOpModifySnapshotAttribute) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ModifySnapshotAttributeInput) + input, ok := in.Parameters.(*ModifySecurityGroupRulesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -25273,10 +25401,10 @@ func (m *awsEc2query_serializeOpModifySnapshotAttribute) HandleSerialize(ctx con bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() - body.Key("Action").String("ModifySnapshotAttribute") + body.Key("Action").String("ModifySecurityGroupRules") body.Key("Version").String("2016-11-15") - if err := awsEc2query_serializeOpDocumentModifySnapshotAttributeInput(input, bodyEncoder.Value); err != nil { + if err := awsEc2query_serializeOpDocumentModifySecurityGroupRulesInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -25297,14 +25425,14 @@ func (m *awsEc2query_serializeOpModifySnapshotAttribute) HandleSerialize(ctx con return next.HandleSerialize(ctx, in) } -type awsEc2query_serializeOpModifySpotFleetRequest struct { +type awsEc2query_serializeOpModifySnapshotAttribute struct { } -func (*awsEc2query_serializeOpModifySpotFleetRequest) ID() string { +func (*awsEc2query_serializeOpModifySnapshotAttribute) ID() string { return "OperationSerializer" } -func (m *awsEc2query_serializeOpModifySpotFleetRequest) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsEc2query_serializeOpModifySnapshotAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -25312,7 +25440,7 @@ func (m *awsEc2query_serializeOpModifySpotFleetRequest) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ModifySpotFleetRequestInput) + input, ok := in.Parameters.(*ModifySnapshotAttributeInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -25337,10 +25465,10 @@ func (m *awsEc2query_serializeOpModifySpotFleetRequest) HandleSerialize(ctx cont bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() - body.Key("Action").String("ModifySpotFleetRequest") + body.Key("Action").String("ModifySnapshotAttribute") body.Key("Version").String("2016-11-15") - if err := awsEc2query_serializeOpDocumentModifySpotFleetRequestInput(input, bodyEncoder.Value); err != nil { + if err := awsEc2query_serializeOpDocumentModifySnapshotAttributeInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -25361,14 +25489,14 @@ func (m *awsEc2query_serializeOpModifySpotFleetRequest) HandleSerialize(ctx cont return next.HandleSerialize(ctx, in) } -type awsEc2query_serializeOpModifySubnetAttribute struct { +type awsEc2query_serializeOpModifySnapshotTier struct { } -func (*awsEc2query_serializeOpModifySubnetAttribute) ID() string { +func (*awsEc2query_serializeOpModifySnapshotTier) ID() string { return "OperationSerializer" } -func (m *awsEc2query_serializeOpModifySubnetAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsEc2query_serializeOpModifySnapshotTier) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -25376,7 +25504,7 @@ func (m *awsEc2query_serializeOpModifySubnetAttribute) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ModifySubnetAttributeInput) + input, ok := in.Parameters.(*ModifySnapshotTierInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -25401,10 +25529,10 @@ func (m *awsEc2query_serializeOpModifySubnetAttribute) HandleSerialize(ctx conte bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() - body.Key("Action").String("ModifySubnetAttribute") + body.Key("Action").String("ModifySnapshotTier") body.Key("Version").String("2016-11-15") - if err := awsEc2query_serializeOpDocumentModifySubnetAttributeInput(input, bodyEncoder.Value); err != nil { + if err := awsEc2query_serializeOpDocumentModifySnapshotTierInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -25425,14 +25553,14 @@ func (m *awsEc2query_serializeOpModifySubnetAttribute) HandleSerialize(ctx conte return next.HandleSerialize(ctx, in) } -type awsEc2query_serializeOpModifyTrafficMirrorFilterNetworkServices struct { +type awsEc2query_serializeOpModifySpotFleetRequest struct { } -func (*awsEc2query_serializeOpModifyTrafficMirrorFilterNetworkServices) ID() string { +func (*awsEc2query_serializeOpModifySpotFleetRequest) ID() string { return "OperationSerializer" } -func (m *awsEc2query_serializeOpModifyTrafficMirrorFilterNetworkServices) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsEc2query_serializeOpModifySpotFleetRequest) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -25440,7 +25568,7 @@ func (m *awsEc2query_serializeOpModifyTrafficMirrorFilterNetworkServices) Handle return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ModifyTrafficMirrorFilterNetworkServicesInput) + input, ok := in.Parameters.(*ModifySpotFleetRequestInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -25465,10 +25593,10 @@ func (m *awsEc2query_serializeOpModifyTrafficMirrorFilterNetworkServices) Handle bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() - body.Key("Action").String("ModifyTrafficMirrorFilterNetworkServices") + body.Key("Action").String("ModifySpotFleetRequest") body.Key("Version").String("2016-11-15") - if err := awsEc2query_serializeOpDocumentModifyTrafficMirrorFilterNetworkServicesInput(input, bodyEncoder.Value); err != nil { + if err := awsEc2query_serializeOpDocumentModifySpotFleetRequestInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -25489,14 +25617,14 @@ func (m *awsEc2query_serializeOpModifyTrafficMirrorFilterNetworkServices) Handle return next.HandleSerialize(ctx, in) } -type awsEc2query_serializeOpModifyTrafficMirrorFilterRule struct { +type awsEc2query_serializeOpModifySubnetAttribute struct { } -func (*awsEc2query_serializeOpModifyTrafficMirrorFilterRule) ID() string { +func (*awsEc2query_serializeOpModifySubnetAttribute) ID() string { return "OperationSerializer" } -func (m *awsEc2query_serializeOpModifyTrafficMirrorFilterRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsEc2query_serializeOpModifySubnetAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -25504,7 +25632,7 @@ func (m *awsEc2query_serializeOpModifyTrafficMirrorFilterRule) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ModifyTrafficMirrorFilterRuleInput) + input, ok := in.Parameters.(*ModifySubnetAttributeInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -25529,10 +25657,10 @@ func (m *awsEc2query_serializeOpModifyTrafficMirrorFilterRule) HandleSerialize(c bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() - body.Key("Action").String("ModifyTrafficMirrorFilterRule") + body.Key("Action").String("ModifySubnetAttribute") body.Key("Version").String("2016-11-15") - if err := awsEc2query_serializeOpDocumentModifyTrafficMirrorFilterRuleInput(input, bodyEncoder.Value); err != nil { + if err := awsEc2query_serializeOpDocumentModifySubnetAttributeInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -25553,14 +25681,14 @@ func (m *awsEc2query_serializeOpModifyTrafficMirrorFilterRule) HandleSerialize(c return next.HandleSerialize(ctx, in) } -type awsEc2query_serializeOpModifyTrafficMirrorSession struct { +type awsEc2query_serializeOpModifyTrafficMirrorFilterNetworkServices struct { } -func (*awsEc2query_serializeOpModifyTrafficMirrorSession) ID() string { +func (*awsEc2query_serializeOpModifyTrafficMirrorFilterNetworkServices) ID() string { return "OperationSerializer" } -func (m *awsEc2query_serializeOpModifyTrafficMirrorSession) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsEc2query_serializeOpModifyTrafficMirrorFilterNetworkServices) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -25568,7 +25696,7 @@ func (m *awsEc2query_serializeOpModifyTrafficMirrorSession) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ModifyTrafficMirrorSessionInput) + input, ok := in.Parameters.(*ModifyTrafficMirrorFilterNetworkServicesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -25593,10 +25721,10 @@ func (m *awsEc2query_serializeOpModifyTrafficMirrorSession) HandleSerialize(ctx bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() - body.Key("Action").String("ModifyTrafficMirrorSession") + body.Key("Action").String("ModifyTrafficMirrorFilterNetworkServices") body.Key("Version").String("2016-11-15") - if err := awsEc2query_serializeOpDocumentModifyTrafficMirrorSessionInput(input, bodyEncoder.Value); err != nil { + if err := awsEc2query_serializeOpDocumentModifyTrafficMirrorFilterNetworkServicesInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -25617,14 +25745,14 @@ func (m *awsEc2query_serializeOpModifyTrafficMirrorSession) HandleSerialize(ctx return next.HandleSerialize(ctx, in) } -type awsEc2query_serializeOpModifyTransitGateway struct { +type awsEc2query_serializeOpModifyTrafficMirrorFilterRule struct { } -func (*awsEc2query_serializeOpModifyTransitGateway) ID() string { +func (*awsEc2query_serializeOpModifyTrafficMirrorFilterRule) ID() string { return "OperationSerializer" } -func (m *awsEc2query_serializeOpModifyTransitGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsEc2query_serializeOpModifyTrafficMirrorFilterRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -25632,7 +25760,7 @@ func (m *awsEc2query_serializeOpModifyTransitGateway) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ModifyTransitGatewayInput) + input, ok := in.Parameters.(*ModifyTrafficMirrorFilterRuleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -25657,10 +25785,10 @@ func (m *awsEc2query_serializeOpModifyTransitGateway) HandleSerialize(ctx contex bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() - body.Key("Action").String("ModifyTransitGateway") + body.Key("Action").String("ModifyTrafficMirrorFilterRule") body.Key("Version").String("2016-11-15") - if err := awsEc2query_serializeOpDocumentModifyTransitGatewayInput(input, bodyEncoder.Value); err != nil { + if err := awsEc2query_serializeOpDocumentModifyTrafficMirrorFilterRuleInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -25681,14 +25809,14 @@ func (m *awsEc2query_serializeOpModifyTransitGateway) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } -type awsEc2query_serializeOpModifyTransitGatewayPrefixListReference struct { +type awsEc2query_serializeOpModifyTrafficMirrorSession struct { } -func (*awsEc2query_serializeOpModifyTransitGatewayPrefixListReference) ID() string { +func (*awsEc2query_serializeOpModifyTrafficMirrorSession) ID() string { return "OperationSerializer" } -func (m *awsEc2query_serializeOpModifyTransitGatewayPrefixListReference) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsEc2query_serializeOpModifyTrafficMirrorSession) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -25696,7 +25824,7 @@ func (m *awsEc2query_serializeOpModifyTransitGatewayPrefixListReference) HandleS return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ModifyTransitGatewayPrefixListReferenceInput) + input, ok := in.Parameters.(*ModifyTrafficMirrorSessionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -25721,10 +25849,10 @@ func (m *awsEc2query_serializeOpModifyTransitGatewayPrefixListReference) HandleS bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() - body.Key("Action").String("ModifyTransitGatewayPrefixListReference") + body.Key("Action").String("ModifyTrafficMirrorSession") body.Key("Version").String("2016-11-15") - if err := awsEc2query_serializeOpDocumentModifyTransitGatewayPrefixListReferenceInput(input, bodyEncoder.Value); err != nil { + if err := awsEc2query_serializeOpDocumentModifyTrafficMirrorSessionInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -25745,14 +25873,14 @@ func (m *awsEc2query_serializeOpModifyTransitGatewayPrefixListReference) HandleS return next.HandleSerialize(ctx, in) } -type awsEc2query_serializeOpModifyTransitGatewayVpcAttachment struct { +type awsEc2query_serializeOpModifyTransitGateway struct { } -func (*awsEc2query_serializeOpModifyTransitGatewayVpcAttachment) ID() string { +func (*awsEc2query_serializeOpModifyTransitGateway) ID() string { return "OperationSerializer" } -func (m *awsEc2query_serializeOpModifyTransitGatewayVpcAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsEc2query_serializeOpModifyTransitGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -25760,7 +25888,7 @@ func (m *awsEc2query_serializeOpModifyTransitGatewayVpcAttachment) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ModifyTransitGatewayVpcAttachmentInput) + input, ok := in.Parameters.(*ModifyTransitGatewayInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -25785,10 +25913,10 @@ func (m *awsEc2query_serializeOpModifyTransitGatewayVpcAttachment) HandleSeriali bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() - body.Key("Action").String("ModifyTransitGatewayVpcAttachment") + body.Key("Action").String("ModifyTransitGateway") body.Key("Version").String("2016-11-15") - if err := awsEc2query_serializeOpDocumentModifyTransitGatewayVpcAttachmentInput(input, bodyEncoder.Value); err != nil { + if err := awsEc2query_serializeOpDocumentModifyTransitGatewayInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -25809,14 +25937,14 @@ func (m *awsEc2query_serializeOpModifyTransitGatewayVpcAttachment) HandleSeriali return next.HandleSerialize(ctx, in) } -type awsEc2query_serializeOpModifyVolume struct { +type awsEc2query_serializeOpModifyTransitGatewayPrefixListReference struct { } -func (*awsEc2query_serializeOpModifyVolume) ID() string { +func (*awsEc2query_serializeOpModifyTransitGatewayPrefixListReference) ID() string { return "OperationSerializer" } -func (m *awsEc2query_serializeOpModifyVolume) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsEc2query_serializeOpModifyTransitGatewayPrefixListReference) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -25824,7 +25952,7 @@ func (m *awsEc2query_serializeOpModifyVolume) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ModifyVolumeInput) + input, ok := in.Parameters.(*ModifyTransitGatewayPrefixListReferenceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -25849,10 +25977,10 @@ func (m *awsEc2query_serializeOpModifyVolume) HandleSerialize(ctx context.Contex bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() - body.Key("Action").String("ModifyVolume") + body.Key("Action").String("ModifyTransitGatewayPrefixListReference") body.Key("Version").String("2016-11-15") - if err := awsEc2query_serializeOpDocumentModifyVolumeInput(input, bodyEncoder.Value); err != nil { + if err := awsEc2query_serializeOpDocumentModifyTransitGatewayPrefixListReferenceInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -25873,14 +26001,14 @@ func (m *awsEc2query_serializeOpModifyVolume) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } -type awsEc2query_serializeOpModifyVolumeAttribute struct { +type awsEc2query_serializeOpModifyTransitGatewayVpcAttachment struct { } -func (*awsEc2query_serializeOpModifyVolumeAttribute) ID() string { +func (*awsEc2query_serializeOpModifyTransitGatewayVpcAttachment) ID() string { return "OperationSerializer" } -func (m *awsEc2query_serializeOpModifyVolumeAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsEc2query_serializeOpModifyTransitGatewayVpcAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -25888,7 +26016,7 @@ func (m *awsEc2query_serializeOpModifyVolumeAttribute) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ModifyVolumeAttributeInput) + input, ok := in.Parameters.(*ModifyTransitGatewayVpcAttachmentInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -25913,10 +26041,138 @@ func (m *awsEc2query_serializeOpModifyVolumeAttribute) HandleSerialize(ctx conte bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() - body.Key("Action").String("ModifyVolumeAttribute") + body.Key("Action").String("ModifyTransitGatewayVpcAttachment") body.Key("Version").String("2016-11-15") - if err := awsEc2query_serializeOpDocumentModifyVolumeAttributeInput(input, bodyEncoder.Value); err != nil { + if err := awsEc2query_serializeOpDocumentModifyTransitGatewayVpcAttachmentInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsEc2query_serializeOpModifyVolume struct { +} + +func (*awsEc2query_serializeOpModifyVolume) ID() string { + return "OperationSerializer" +} + +func (m *awsEc2query_serializeOpModifyVolume) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ModifyVolumeInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("ModifyVolume") + body.Key("Version").String("2016-11-15") + + if err := awsEc2query_serializeOpDocumentModifyVolumeInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsEc2query_serializeOpModifyVolumeAttribute struct { +} + +func (*awsEc2query_serializeOpModifyVolumeAttribute) ID() string { + return "OperationSerializer" +} + +func (m *awsEc2query_serializeOpModifyVolumeAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ModifyVolumeAttributeInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("ModifyVolumeAttribute") + body.Key("Version").String("2016-11-15") + + if err := awsEc2query_serializeOpDocumentModifyVolumeAttributeInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -28945,6 +29201,134 @@ func (m *awsEc2query_serializeOpRestoreManagedPrefixListVersion) HandleSerialize return next.HandleSerialize(ctx, in) } +type awsEc2query_serializeOpRestoreSnapshotFromRecycleBin struct { +} + +func (*awsEc2query_serializeOpRestoreSnapshotFromRecycleBin) ID() string { + return "OperationSerializer" +} + +func (m *awsEc2query_serializeOpRestoreSnapshotFromRecycleBin) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*RestoreSnapshotFromRecycleBinInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("RestoreSnapshotFromRecycleBin") + body.Key("Version").String("2016-11-15") + + if err := awsEc2query_serializeOpDocumentRestoreSnapshotFromRecycleBinInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsEc2query_serializeOpRestoreSnapshotTier struct { +} + +func (*awsEc2query_serializeOpRestoreSnapshotTier) ID() string { + return "OperationSerializer" +} + +func (m *awsEc2query_serializeOpRestoreSnapshotTier) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*RestoreSnapshotTierInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("RestoreSnapshotTier") + body.Key("Version").String("2016-11-15") + + if err := awsEc2query_serializeOpDocumentRestoreSnapshotTierInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsEc2query_serializeOpRevokeClientVpnIngress struct { } @@ -34126,6 +34510,28 @@ func awsEc2query_serializeDocumentLaunchTemplatePlacementRequest(v *types.Launch return nil } +func awsEc2query_serializeDocumentLaunchTemplatePrivateDnsNameOptionsRequest(v *types.LaunchTemplatePrivateDnsNameOptionsRequest, value query.Value) error { + object := value.Object() + _ = object + + if v.EnableResourceNameDnsAAAARecord != nil { + objectKey := object.Key("EnableResourceNameDnsAAAARecord") + objectKey.Boolean(*v.EnableResourceNameDnsAAAARecord) + } + + if v.EnableResourceNameDnsARecord != nil { + objectKey := object.Key("EnableResourceNameDnsARecord") + objectKey.Boolean(*v.EnableResourceNameDnsARecord) + } + + if len(v.HostnameType) > 0 { + objectKey := object.Key("HostnameType") + objectKey.String(string(v.HostnameType)) + } + + return nil +} + func awsEc2query_serializeDocumentLaunchTemplatesMonitoringRequest(v *types.LaunchTemplatesMonitoringRequest, value query.Value) error { object := value.Object() _ = object @@ -35350,6 +35756,28 @@ func awsEc2query_serializeDocumentPriceScheduleSpecificationList(v []types.Price return nil } +func awsEc2query_serializeDocumentPrivateDnsNameOptionsRequest(v *types.PrivateDnsNameOptionsRequest, value query.Value) error { + object := value.Object() + _ = object + + if v.EnableResourceNameDnsAAAARecord != nil { + objectKey := object.Key("EnableResourceNameDnsAAAARecord") + objectKey.Boolean(*v.EnableResourceNameDnsAAAARecord) + } + + if v.EnableResourceNameDnsARecord != nil { + objectKey := object.Key("EnableResourceNameDnsARecord") + objectKey.Boolean(*v.EnableResourceNameDnsARecord) + } + + if len(v.HostnameType) > 0 { + objectKey := object.Key("HostnameType") + objectKey.String(string(v.HostnameType)) + } + + return nil +} + func awsEc2query_serializeDocumentPrivateIpAddressConfigSet(v []types.ScheduledInstancesPrivateIpAddressConfig, value query.Value) error { if len(v) == 0 { return nil @@ -35782,6 +36210,13 @@ func awsEc2query_serializeDocumentRequestLaunchTemplateData(v *types.RequestLaun } } + if v.PrivateDnsNameOptions != nil { + objectKey := object.Key("PrivateDnsNameOptions") + if err := awsEc2query_serializeDocumentLaunchTemplatePrivateDnsNameOptionsRequest(v.PrivateDnsNameOptions, objectKey); err != nil { + return err + } + } + if v.RamDiskId != nil { objectKey := object.Key("RamDiskId") objectKey.String(*v.RamDiskId) @@ -40224,6 +40659,11 @@ func awsEc2query_serializeOpDocumentCreateDefaultSubnetInput(v *CreateDefaultSub objectKey.Boolean(*v.DryRun) } + if v.Ipv6Native != nil { + objectKey := object.Key("Ipv6Native") + objectKey.Boolean(*v.Ipv6Native) + } + return nil } @@ -41639,6 +42079,11 @@ func awsEc2query_serializeOpDocumentCreateSubnetInput(v *CreateSubnetInput, valu objectKey.String(*v.Ipv6CidrBlock) } + if v.Ipv6Native != nil { + objectKey := object.Key("Ipv6Native") + objectKey.Boolean(*v.Ipv6Native) + } + if v.OutpostArn != nil { objectKey := object.Key("OutpostArn") objectKey.String(*v.OutpostArn) @@ -46734,6 +47179,35 @@ func awsEc2query_serializeOpDocumentDescribeSnapshotsInput(v *DescribeSnapshotsI return nil } +func awsEc2query_serializeOpDocumentDescribeSnapshotTierStatusInput(v *DescribeSnapshotTierStatusInput, value query.Value) error { + object := value.Object() + _ = object + + if v.DryRun != nil { + objectKey := object.Key("DryRun") + objectKey.Boolean(*v.DryRun) + } + + if v.Filters != nil { + objectKey := object.FlatKey("Filter") + if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { + return err + } + } + + if v.MaxResults != nil { + objectKey := object.Key("MaxResults") + objectKey.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + objectKey := object.Key("NextToken") + objectKey.String(*v.NextToken) + } + + return nil +} + func awsEc2query_serializeOpDocumentDescribeSpotDatafeedSubscriptionInput(v *DescribeSpotDatafeedSubscriptionInput, value query.Value) error { object := value.Object() _ = object @@ -49802,6 +50276,35 @@ func awsEc2query_serializeOpDocumentImportVolumeInput(v *ImportVolumeInput, valu return nil } +func awsEc2query_serializeOpDocumentListSnapshotsInRecycleBinInput(v *ListSnapshotsInRecycleBinInput, value query.Value) error { + object := value.Object() + _ = object + + if v.DryRun != nil { + objectKey := object.Key("DryRun") + objectKey.Boolean(*v.DryRun) + } + + if v.MaxResults != nil { + objectKey := object.Key("MaxResults") + objectKey.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + objectKey := object.Key("NextToken") + objectKey.String(*v.NextToken) + } + + if v.SnapshotIds != nil { + objectKey := object.FlatKey("SnapshotId") + if err := awsEc2query_serializeDocumentSnapshotIdStringList(v.SnapshotIds, objectKey); err != nil { + return err + } + } + + return nil +} + func awsEc2query_serializeOpDocumentModifyAddressAttributeInput(v *ModifyAddressAttributeInput, value query.Value) error { object := value.Object() _ = object @@ -50716,6 +51219,38 @@ func awsEc2query_serializeOpDocumentModifyNetworkInterfaceAttributeInput(v *Modi return nil } +func awsEc2query_serializeOpDocumentModifyPrivateDnsNameOptionsInput(v *ModifyPrivateDnsNameOptionsInput, value query.Value) error { + object := value.Object() + _ = object + + if v.DryRun != nil { + objectKey := object.Key("DryRun") + objectKey.Boolean(*v.DryRun) + } + + if v.EnableResourceNameDnsAAAARecord != nil { + objectKey := object.Key("EnableResourceNameDnsAAAARecord") + objectKey.Boolean(*v.EnableResourceNameDnsAAAARecord) + } + + if v.EnableResourceNameDnsARecord != nil { + objectKey := object.Key("EnableResourceNameDnsARecord") + objectKey.Boolean(*v.EnableResourceNameDnsARecord) + } + + if v.InstanceId != nil { + objectKey := object.Key("InstanceId") + objectKey.String(*v.InstanceId) + } + + if len(v.PrivateDnsHostnameType) > 0 { + objectKey := object.Key("PrivateDnsHostnameType") + objectKey.String(string(v.PrivateDnsHostnameType)) + } + + return nil +} + func awsEc2query_serializeOpDocumentModifyReservedInstancesInput(v *ModifyReservedInstancesInput, value query.Value) error { object := value.Object() _ = object @@ -50814,6 +51349,28 @@ func awsEc2query_serializeOpDocumentModifySnapshotAttributeInput(v *ModifySnapsh return nil } +func awsEc2query_serializeOpDocumentModifySnapshotTierInput(v *ModifySnapshotTierInput, value query.Value) error { + object := value.Object() + _ = object + + if v.DryRun != nil { + objectKey := object.Key("DryRun") + objectKey.Boolean(*v.DryRun) + } + + if v.SnapshotId != nil { + objectKey := object.Key("SnapshotId") + objectKey.String(*v.SnapshotId) + } + + if len(v.StorageTier) > 0 { + objectKey := object.Key("StorageTier") + objectKey.String(string(v.StorageTier)) + } + + return nil +} + func awsEc2query_serializeOpDocumentModifySpotFleetRequestInput(v *ModifySpotFleetRequestInput, value query.Value) error { object := value.Object() _ = object @@ -50876,6 +51433,20 @@ func awsEc2query_serializeOpDocumentModifySubnetAttributeInput(v *ModifySubnetAt } } + if v.EnableResourceNameDnsAAAARecordOnLaunch != nil { + objectKey := object.Key("EnableResourceNameDnsAAAARecordOnLaunch") + if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.EnableResourceNameDnsAAAARecordOnLaunch, objectKey); err != nil { + return err + } + } + + if v.EnableResourceNameDnsARecordOnLaunch != nil { + objectKey := object.Key("EnableResourceNameDnsARecordOnLaunch") + if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.EnableResourceNameDnsARecordOnLaunch, objectKey); err != nil { + return err + } + } + if v.MapCustomerOwnedIpOnLaunch != nil { objectKey := object.Key("MapCustomerOwnedIpOnLaunch") if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.MapCustomerOwnedIpOnLaunch, objectKey); err != nil { @@ -50890,6 +51461,11 @@ func awsEc2query_serializeOpDocumentModifySubnetAttributeInput(v *ModifySubnetAt } } + if len(v.PrivateDnsHostnameTypeOnLaunch) > 0 { + objectKey := object.Key("PrivateDnsHostnameTypeOnLaunch") + objectKey.String(string(v.PrivateDnsHostnameTypeOnLaunch)) + } + if v.SubnetId != nil { objectKey := object.Key("SubnetId") objectKey.String(*v.SubnetId) @@ -52694,6 +53270,50 @@ func awsEc2query_serializeOpDocumentRestoreManagedPrefixListVersionInput(v *Rest return nil } +func awsEc2query_serializeOpDocumentRestoreSnapshotFromRecycleBinInput(v *RestoreSnapshotFromRecycleBinInput, value query.Value) error { + object := value.Object() + _ = object + + if v.DryRun != nil { + objectKey := object.Key("DryRun") + objectKey.Boolean(*v.DryRun) + } + + if v.SnapshotId != nil { + objectKey := object.Key("SnapshotId") + objectKey.String(*v.SnapshotId) + } + + return nil +} + +func awsEc2query_serializeOpDocumentRestoreSnapshotTierInput(v *RestoreSnapshotTierInput, value query.Value) error { + object := value.Object() + _ = object + + if v.DryRun != nil { + objectKey := object.Key("DryRun") + objectKey.Boolean(*v.DryRun) + } + + if v.PermanentRestore != nil { + objectKey := object.Key("PermanentRestore") + objectKey.Boolean(*v.PermanentRestore) + } + + if v.SnapshotId != nil { + objectKey := object.Key("SnapshotId") + objectKey.String(*v.SnapshotId) + } + + if v.TemporaryRestoreDays != nil { + objectKey := object.Key("TemporaryRestoreDays") + objectKey.Integer(*v.TemporaryRestoreDays) + } + + return nil +} + func awsEc2query_serializeOpDocumentRevokeClientVpnIngressInput(v *RevokeClientVpnIngressInput, value query.Value) error { object := value.Object() _ = object @@ -53041,6 +53661,13 @@ func awsEc2query_serializeOpDocumentRunInstancesInput(v *RunInstancesInput, valu } } + if v.PrivateDnsNameOptions != nil { + objectKey := object.Key("PrivateDnsNameOptions") + if err := awsEc2query_serializeDocumentPrivateDnsNameOptionsRequest(v.PrivateDnsNameOptions, objectKey); err != nil { + return err + } + } + if v.PrivateIpAddress != nil { objectKey := object.Key("PrivateIpAddress") objectKey.String(*v.PrivateIpAddress) diff --git a/service/ec2/types/enums.go b/service/ec2/types/enums.go index 45eff8392ed..41159fe2416 100644 --- a/service/ec2/types/enums.go +++ b/service/ec2/types/enums.go @@ -1950,6 +1950,24 @@ func (GatewayType) Values() []GatewayType { } } +type HostnameType string + +// Enum values for HostnameType +const ( + HostnameTypeIpName HostnameType = "ip-name" + HostnameTypeResourceName HostnameType = "resource-name" +) + +// Values returns all known values for HostnameType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (HostnameType) Values() []HostnameType { + return []HostnameType{ + "ip-name", + "resource-name", + } +} + type HostRecovery string // Enum values for HostRecovery @@ -2830,6 +2848,16 @@ const ( InstanceTypeM6gd8xlarge InstanceType = "m6gd.8xlarge" InstanceTypeM6gd12xlarge InstanceType = "m6gd.12xlarge" InstanceTypeM6gd16xlarge InstanceType = "m6gd.16xlarge" + InstanceTypeM6aLarge InstanceType = "m6a.large" + InstanceTypeM6aXlarge InstanceType = "m6a.xlarge" + InstanceTypeM6a2xlarge InstanceType = "m6a.2xlarge" + InstanceTypeM6a4xlarge InstanceType = "m6a.4xlarge" + InstanceTypeM6a8xlarge InstanceType = "m6a.8xlarge" + InstanceTypeM6a12xlarge InstanceType = "m6a.12xlarge" + InstanceTypeM6a16xlarge InstanceType = "m6a.16xlarge" + InstanceTypeM6a24xlarge InstanceType = "m6a.24xlarge" + InstanceTypeM6a32xlarge InstanceType = "m6a.32xlarge" + InstanceTypeM6a48xlarge InstanceType = "m6a.48xlarge" InstanceTypeM6iLarge InstanceType = "m6i.large" InstanceTypeM6iXlarge InstanceType = "m6i.xlarge" InstanceTypeM6i2xlarge InstanceType = "m6i.2xlarge" @@ -2852,6 +2880,12 @@ const ( InstanceTypeVt13xlarge InstanceType = "vt1.3xlarge" InstanceTypeVt16xlarge InstanceType = "vt1.6xlarge" InstanceTypeVt124xlarge InstanceType = "vt1.24xlarge" + InstanceTypeG5gXlarge InstanceType = "g5g.xlarge" + InstanceTypeG5g2xlarge InstanceType = "g5g.2xlarge" + InstanceTypeG5g4xlarge InstanceType = "g5g.4xlarge" + InstanceTypeG5g8xlarge InstanceType = "g5g.8xlarge" + InstanceTypeG5g16xlarge InstanceType = "g5g.16xlarge" + InstanceTypeG5gMetal InstanceType = "g5g.metal" InstanceTypeG5Xlarge InstanceType = "g5.xlarge" InstanceTypeG52xlarge InstanceType = "g5.2xlarge" InstanceTypeG54xlarge InstanceType = "g5.4xlarge" @@ -3275,6 +3309,16 @@ func (InstanceType) Values() []InstanceType { "m6gd.8xlarge", "m6gd.12xlarge", "m6gd.16xlarge", + "m6a.large", + "m6a.xlarge", + "m6a.2xlarge", + "m6a.4xlarge", + "m6a.8xlarge", + "m6a.12xlarge", + "m6a.16xlarge", + "m6a.24xlarge", + "m6a.32xlarge", + "m6a.48xlarge", "m6i.large", "m6i.xlarge", "m6i.2xlarge", @@ -3297,6 +3341,12 @@ func (InstanceType) Values() []InstanceType { "vt1.3xlarge", "vt1.6xlarge", "vt1.24xlarge", + "g5g.xlarge", + "g5g.2xlarge", + "g5g.4xlarge", + "g5g.8xlarge", + "g5g.16xlarge", + "g5g.metal", "g5.xlarge", "g5.2xlarge", "g5.4xlarge", @@ -4801,9 +4851,11 @@ type SnapshotState string // Enum values for SnapshotState const ( - SnapshotStatePending SnapshotState = "pending" - SnapshotStateCompleted SnapshotState = "completed" - SnapshotStateError SnapshotState = "error" + SnapshotStatePending SnapshotState = "pending" + SnapshotStateCompleted SnapshotState = "completed" + SnapshotStateError SnapshotState = "error" + SnapshotStateRecoverable SnapshotState = "recoverable" + SnapshotStateRecovering SnapshotState = "recovering" ) // Values returns all known values for SnapshotState. Note that this can be @@ -4814,6 +4866,8 @@ func (SnapshotState) Values() []SnapshotState { "pending", "completed", "error", + "recoverable", + "recovering", } } @@ -5008,6 +5062,24 @@ func (StatusType) Values() []StatusType { } } +type StorageTier string + +// Enum values for StorageTier +const ( + StorageTierArchive StorageTier = "archive" + StorageTierStandard StorageTier = "standard" +) + +// Values returns all known values for StorageTier. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (StorageTier) Values() []StorageTier { + return []StorageTier{ + "archive", + "standard", + } +} + type SubnetCidrBlockStateCode string // Enum values for SubnetCidrBlockStateCode @@ -5114,6 +5186,22 @@ func (TargetCapacityUnitType) Values() []TargetCapacityUnitType { } } +type TargetStorageTier string + +// Enum values for TargetStorageTier +const ( + TargetStorageTierArchive TargetStorageTier = "archive" +) + +// Values returns all known values for TargetStorageTier. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (TargetStorageTier) Values() []TargetStorageTier { + return []TargetStorageTier{ + "archive", + } +} + type TelemetryStatus string // Enum values for TelemetryStatus @@ -5152,6 +5240,38 @@ func (Tenancy) Values() []Tenancy { } } +type TieringOperationStatus string + +// Enum values for TieringOperationStatus +const ( + TieringOperationStatusArchivalInProgress TieringOperationStatus = "archival-in-progress" + TieringOperationStatusArchivalCompleted TieringOperationStatus = "archival-completed" + TieringOperationStatusArchivalFailed TieringOperationStatus = "archival-failed" + TieringOperationStatusTemporaryRestoreInProgress TieringOperationStatus = "temporary-restore-in-progress" + TieringOperationStatusTemporaryRestoreCompleted TieringOperationStatus = "temporary-restore-completed" + TieringOperationStatusTemporaryRestoreFailed TieringOperationStatus = "temporary-restore-failed" + TieringOperationStatusPermanentRestoreInProgress TieringOperationStatus = "permanent-restore-in-progress" + TieringOperationStatusPermanentRestoreCompleted TieringOperationStatus = "permanent-restore-completed" + TieringOperationStatusPermanentRestoreFailed TieringOperationStatus = "permanent-restore-failed" +) + +// Values returns all known values for TieringOperationStatus. Note that this can +// be expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (TieringOperationStatus) Values() []TieringOperationStatus { + return []TieringOperationStatus{ + "archival-in-progress", + "archival-completed", + "archival-failed", + "temporary-restore-in-progress", + "temporary-restore-completed", + "temporary-restore-failed", + "permanent-restore-in-progress", + "permanent-restore-completed", + "permanent-restore-failed", + } +} + type TrafficDirection string // Enum values for TrafficDirection diff --git a/service/ec2/types/types.go b/service/ec2/types/types.go index 637c15e3925..eb313fe9fe9 100644 --- a/service/ec2/types/types.go +++ b/service/ec2/types/types.go @@ -3627,7 +3627,9 @@ type FleetSpotCapacityRebalance struct { ReplacementStrategy FleetReplacementStrategy // The amount of time (in seconds) that Amazon EC2 waits before terminating the old - // Spot Instance after launching a new replacement Spot Instance. + // Spot Instance after launching a new replacement Spot Instance. Valid only when + // replacementStrategy is set to launch-before-terminate. Valid values: Minimum + // value of 120 seconds. Maximum value of 7200 seconds. TerminationDelay *int32 noSmithyDocumentSerde @@ -3653,7 +3655,9 @@ type FleetSpotCapacityRebalanceRequest struct { ReplacementStrategy FleetReplacementStrategy // The amount of time (in seconds) that Amazon EC2 waits before terminating the old - // Spot Instance after launching a new replacement Spot Instance. + // Spot Instance after launching a new replacement Spot Instance. Valid only when + // ReplacementStrategy is set to launch-before-terminate. Valid values: Minimum + // value of 120 seconds. Maximum value of 7200 seconds. TerminationDelay *int32 noSmithyDocumentSerde @@ -4726,6 +4730,9 @@ type Instance struct { // The instance type. InstanceType InstanceType + // The IPv6 address assigned to the instance. + Ipv6Address *string + // The kernel associated with this instance, if applicable. KernelId *string @@ -4772,6 +4779,9 @@ type Instance struct { // servers must resolve the hostname as appropriate. PrivateDnsName *string + // The options for the instance hostname. + PrivateDnsNameOptions *PrivateDnsNameOptionsResponse + // The private IPv4 address assigned to the instance. PrivateIpAddress *string @@ -7332,6 +7342,44 @@ type LaunchTemplatePlacementRequest struct { noSmithyDocumentSerde } +// Describes the options for instance hostnames. +type LaunchTemplatePrivateDnsNameOptions struct { + + // Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA + // records. + EnableResourceNameDnsAAAARecord *bool + + // Indicates whether to respond to DNS queries for instance hostnames with DNS A + // records. + EnableResourceNameDnsARecord *bool + + // The type of hostname to assign to an instance. + HostnameType HostnameType + + noSmithyDocumentSerde +} + +// Describes the options for instance hostnames. +type LaunchTemplatePrivateDnsNameOptionsRequest struct { + + // Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA + // records. + EnableResourceNameDnsAAAARecord *bool + + // Indicates whether to respond to DNS queries for instance hostnames with DNS A + // records. + EnableResourceNameDnsARecord *bool + + // The type of hostname for Amazon EC2 instances. For IPv4 only subnets, an + // instance DNS name must be based on the instance IPv4 address. For IPv6 native + // subnets, an instance DNS name must be based on the instance ID. For dual-stack + // subnets, you can specify whether DNS names use the instance IPv4 address or the + // instance ID. + HostnameType HostnameType + + noSmithyDocumentSerde +} + // Describes the monitoring for the instance. type LaunchTemplatesMonitoring struct { @@ -8388,9 +8436,15 @@ type NetworkInterface struct { // The IPv4 prefixes that are assigned to the network interface. Ipv4Prefixes []Ipv4PrefixSpecification + // The IPv6 globally unique address associated with the network interface. + Ipv6Address *string + // The IPv6 addresses associated with the network interface. Ipv6Addresses []NetworkInterfaceIpv6Address + // Indicates whether this is an IPv6 only network interface. + Ipv6Native *bool + // The IPv6 prefixes that are assigned to the network interface. Ipv6Prefixes []Ipv6PrefixSpecification @@ -8623,12 +8677,11 @@ type NewDhcpConfiguration struct { // Describes the configuration of On-Demand Instances in an EC2 Fleet. type OnDemandOptions struct { - // The order of the launch template overrides to use in fulfilling On-Demand - // capacity. If you specify lowest-price, EC2 Fleet uses price to determine the - // order, launching the lowest price first. If you specify prioritized, EC2 Fleet + // The strategy that determines the order of the launch template overrides to use + // in fulfilling On-Demand capacity. lowest-price - EC2 Fleet uses price to + // determine the order, launching the lowest price first. prioritized - EC2 Fleet // uses the priority that you assigned to each launch template override, launching - // the highest priority first. If you do not specify a value, EC2 Fleet defaults to - // lowest-price. + // the highest priority first. Default: lowest-price AllocationStrategy FleetOnDemandAllocationStrategy // The strategy for using unused Capacity Reservations for fulfilling On-Demand @@ -8639,7 +8692,9 @@ type OnDemandOptions struct { MaxTotalPrice *string // The minimum target capacity for On-Demand Instances in the fleet. If the minimum - // target capacity is not reached, the fleet launches no instances. + // target capacity is not reached, the fleet launches no instances. Supported only + // for fleets of type instant. At least one of the following must be specified: + // SingleAvailabilityZone | SingleInstanceType MinTargetCapacity *int32 // Indicates that the fleet launches all On-Demand Instances into a single @@ -8656,12 +8711,11 @@ type OnDemandOptions struct { // Describes the configuration of On-Demand Instances in an EC2 Fleet. type OnDemandOptionsRequest struct { - // The order of the launch template overrides to use in fulfilling On-Demand - // capacity. If you specify lowest-price, EC2 Fleet uses price to determine the - // order, launching the lowest price first. If you specify prioritized, EC2 Fleet + // The strategy that determines the order of the launch template overrides to use + // in fulfilling On-Demand capacity. lowest-price - EC2 Fleet uses price to + // determine the order, launching the lowest price first. prioritized - EC2 Fleet // uses the priority that you assigned to each launch template override, launching - // the highest priority first. If you do not specify a value, EC2 Fleet defaults to - // lowest-price. + // the highest priority first. Default: lowest-price AllocationStrategy FleetOnDemandAllocationStrategy // The strategy for using unused Capacity Reservations for fulfilling On-Demand @@ -8672,7 +8726,9 @@ type OnDemandOptionsRequest struct { MaxTotalPrice *string // The minimum target capacity for On-Demand Instances in the fleet. If the minimum - // target capacity is not reached, the fleet launches no instances. + // target capacity is not reached, the fleet launches no instances. Supported only + // for fleets of type instant. At least one of the following must be specified: + // SingleAvailabilityZone | SingleInstanceType MinTargetCapacity *int32 // Indicates that the fleet launches all On-Demand Instances into a single @@ -8952,7 +9008,7 @@ type Placement struct { // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet). HostResourceGroupArn *string - // The number of the partition the instance is in. Valid only if the placement + // The number of the partition that the instance is in. Valid only if the placement // group strategy is set to partition. This parameter is not supported by // CreateFleet // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet). @@ -9192,6 +9248,63 @@ type PrivateDnsNameConfiguration struct { noSmithyDocumentSerde } +// Describes the options for instance hostnames. +type PrivateDnsNameOptionsOnLaunch struct { + + // Indicates whether to respond to DNS queries for instance hostname with DNS AAAA + // records. + EnableResourceNameDnsAAAARecord *bool + + // Indicates whether to respond to DNS queries for instance hostnames with DNS A + // records. + EnableResourceNameDnsARecord *bool + + // The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS + // name must be based on the instance IPv4 address. For IPv6 only subnets, an + // instance DNS name must be based on the instance ID. For dual-stack subnets, you + // can specify whether DNS names use the instance IPv4 address or the instance ID. + HostnameType HostnameType + + noSmithyDocumentSerde +} + +// Describes the options for instance hostnames. +type PrivateDnsNameOptionsRequest struct { + + // Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA + // records. + EnableResourceNameDnsAAAARecord *bool + + // Indicates whether to respond to DNS queries for instance hostnames with DNS A + // records. + EnableResourceNameDnsARecord *bool + + // The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS + // name must be based on the instance IPv4 address. For IPv6 only subnets, an + // instance DNS name must be based on the instance ID. For dual-stack subnets, you + // can specify whether DNS names use the instance IPv4 address or the instance ID. + HostnameType HostnameType + + noSmithyDocumentSerde +} + +// Describes the options for instance hostnames. +type PrivateDnsNameOptionsResponse struct { + + // Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA + // records. + EnableResourceNameDnsAAAARecord *bool + + // Indicates whether to respond to DNS queries for instance hostnames with DNS A + // records. + EnableResourceNameDnsARecord *bool + + // The type of hostname to assign to an instance. + HostnameType HostnameType + + noSmithyDocumentSerde +} + // Describes a secondary private IPv4 address for a network interface. type PrivateIpAddressSpecification struct { @@ -9620,6 +9733,10 @@ type RequestLaunchTemplateData struct { // The placement for the instance. Placement *LaunchTemplatePlacementRequest + // The options for the instance hostname. The default values are inherited from the + // subnet. + PrivateDnsNameOptions *LaunchTemplatePrivateDnsNameOptionsRequest + // The ID of the RAM disk. We recommend that you use PV-GRUB instead of kernels and // RAM disks. For more information, see User Provided Kernels // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html) @@ -10183,6 +10300,9 @@ type ResponseLaunchTemplateData struct { // The placement of the instance. Placement *LaunchTemplatePlacement + // The options for the instance hostname. + PrivateDnsNameOptions *LaunchTemplatePrivateDnsNameOptions + // The ID of the RAM disk, if applicable. RamDiskId *string @@ -10207,6 +10327,7 @@ type Route struct { // The ID of the carrier gateway. CarrierGatewayId *string + // The Amazon Resource Name (ARN) of the core network. CoreNetworkArn *string // The IPv4 CIDR block used for the destination match. @@ -11115,6 +11236,10 @@ type Snapshot struct { // The progress of the snapshot, as a percentage. Progress *string + // Only for archived snapshots that are temporarily restored. Indicates the date + // and time when a temporarily restored snapshot will be automatically re-archived. + RestoreExpiryTime *time.Time + // The ID of the snapshot. Each snapshot receives a unique identifier when it is // created. SnapshotId *string @@ -11132,6 +11257,12 @@ type Snapshot struct { // DescribeSnapshots. StateMessage *string + // The storage tier in which the snapshot is stored. standard indicates that the + // snapshot is stored in the standard snapshot storage tier and that it is ready + // for use. archive indicates that the snapshot is currently archived and that it + // must be restored before it can be used. + StorageTier StorageTier + // Any tags assigned to the snapshot. Tags []Tag @@ -11245,6 +11376,28 @@ type SnapshotInfo struct { noSmithyDocumentSerde } +// Information about a snapshot that is currently in the Recycle Bin. +type SnapshotRecycleBinInfo struct { + + // The description for the snapshot. + Description *string + + // The date and time when the snaphsot entered the Recycle Bin. + RecycleBinEnterTime *time.Time + + // The date and time when the snapshot is to be permanently deleted from the + // Recycle Bin. + RecycleBinExitTime *time.Time + + // The ID of the snapshot. + SnapshotId *string + + // The ID of the volume from which the snapshot was created. + VolumeId *string + + noSmithyDocumentSerde +} + // Details about the import snapshot task. type SnapshotTaskDetail struct { @@ -11284,6 +11437,52 @@ type SnapshotTaskDetail struct { noSmithyDocumentSerde } +// Provides information about a snapshot's storage tier. +type SnapshotTierStatus struct { + + // The date and time when the last archive process was completed. + ArchivalCompleteTime *time.Time + + // The status of the last archive or restore process. + LastTieringOperationStatus TieringOperationStatus + + // A message describing the status of the last archive or restore process. + LastTieringOperationStatusDetail *string + + // The progress of the last archive or restore process, as a percentage. + LastTieringProgress *int32 + + // The date and time when the last archive or restore process was started. + LastTieringStartTime *time.Time + + // The ID of the Amazon Web Services account that owns the snapshot. + OwnerId *string + + // Only for archived snapshots that are temporarily restored. Indicates the date + // and time when a temporarily restored snapshot will be automatically re-archived. + RestoreExpiryTime *time.Time + + // The ID of the snapshot. + SnapshotId *string + + // The state of the snapshot. + Status SnapshotState + + // The storage tier in which the snapshot is stored. standard indicates that the + // snapshot is stored in the standard snapshot storage tier and that it is ready + // for use. archive indicates that the snapshot is currently archived and that it + // must be restored before it can be used. + StorageTier StorageTier + + // The tags that are assigned to the snapshot. + Tags []Tag + + // The ID of the volume from which the snapshot was created. + VolumeId *string + + noSmithyDocumentSerde +} + // The Spot Instance replacement strategy to use when Amazon EC2 emits a signal // that your Spot Instance is at an elevated risk of being interrupted. For more // information, see Capacity rebalancing @@ -11304,7 +11503,9 @@ type SpotCapacityRebalance struct { ReplacementStrategy ReplacementStrategy // The amount of time (in seconds) that Amazon EC2 waits before terminating the old - // Spot Instance after launching a new replacement Spot Instance. + // Spot Instance after launching a new replacement Spot Instance. Valid only when + // ReplacementStrategy is set to launch-before-terminate. Valid values: Minimum + // value of 120 seconds. Maximum value of 7200 seconds. TerminationDelay *int32 noSmithyDocumentSerde @@ -11825,38 +12026,37 @@ type SpotMarketOptions struct { // Describes the configuration of Spot Instances in an EC2 Fleet. type SpotOptions struct { - // Indicates how to allocate the target Spot Instance capacity across the Spot - // Instance pools specified by the EC2 Fleet. If the allocation strategy is - // lowest-price, EC2 Fleet launches instances from the Spot Instance pools with the - // lowest price. This is the default allocation strategy. If the allocation - // strategy is diversified, EC2 Fleet launches instances from all of the Spot - // Instance pools that you specify. If the allocation strategy is - // capacity-optimized (recommended), EC2 Fleet launches instances from Spot - // Instance pools with optimal capacity for the number of instances that are - // launching. To give certain instance types a higher chance of launching first, - // use capacity-optimized-prioritized. Set a priority for each instance type by - // using the Priority parameter for LaunchTemplateOverrides. You can assign the - // same priority to different LaunchTemplateOverrides. EC2 implements the - // priorities on a best-effort basis, but optimizes for capacity first. - // capacity-optimized-prioritized is supported only if your fleet uses a launch - // template. Note that if the On-Demand AllocationStrategy is set to prioritized, - // the same priority is applied when fulfilling On-Demand capacity. + // The strategy that determines how to allocate the target Spot Instance capacity + // across the Spot Instance pools specified by the EC2 Fleet. lowest-price - EC2 + // Fleet launches instances from the Spot Instance pools with the lowest price. + // diversified - EC2 Fleet launches instances from all of the Spot Instance pools + // that you specify. capacity-optimized (recommended) - EC2 Fleet launches + // instances from Spot Instance pools with optimal capacity for the number of + // instances that are launching. To give certain instance types a higher chance of + // launching first, use capacity-optimized-prioritized. Set a priority for each + // instance type by using the Priority parameter for LaunchTemplateOverrides. You + // can assign the same priority to different LaunchTemplateOverrides. EC2 + // implements the priorities on a best-effort basis, but optimizes for capacity + // first. capacity-optimized-prioritized is supported only if your fleet uses a + // launch template. Note that if the On-Demand AllocationStrategy is set to + // prioritized, the same priority is applied when fulfilling On-Demand capacity. + // Default: lowest-price AllocationStrategy SpotAllocationStrategy - // The behavior when a Spot Instance is interrupted. The default is terminate. + // The behavior when a Spot Instance is interrupted. Default: terminate InstanceInterruptionBehavior SpotInstanceInterruptionBehavior // The number of Spot pools across which to allocate your target Spot capacity. - // Valid only when AllocationStrategy is set to lowest-price. EC2 Fleet selects the - // cheapest Spot pools and evenly allocates your target Spot capacity across the - // number of Spot pools that you specify. Note that EC2 Fleet attempts to draw Spot - // Instances from the number of pools that you specify on a best effort basis. If a - // pool runs out of Spot capacity before fulfilling your target capacity, EC2 Fleet - // will continue to fulfill your request by drawing from the next cheapest pool. To - // ensure that your target capacity is met, you might receive Spot Instances from - // more than the number of pools that you specified. Similarly, if most of the - // pools have no Spot capacity, you might receive your full target capacity from - // fewer than the number of pools that you specified. + // Supported only when AllocationStrategy is set to lowest-price. EC2 Fleet selects + // the cheapest Spot pools and evenly allocates your target Spot capacity across + // the number of Spot pools that you specify. Note that EC2 Fleet attempts to draw + // Spot Instances from the number of pools that you specify on a best effort basis. + // If a pool runs out of Spot capacity before fulfilling your target capacity, EC2 + // Fleet will continue to fulfill your request by drawing from the next cheapest + // pool. To ensure that your target capacity is met, you might receive Spot + // Instances from more than the number of pools that you specified. Similarly, if + // most of the pools have no Spot capacity, you might receive your full target + // capacity from fewer than the number of pools that you specified. InstancePoolsToUseCount *int32 // The strategies for managing your workloads on your Spot Instances that will be @@ -11867,7 +12067,9 @@ type SpotOptions struct { MaxTotalPrice *string // The minimum target capacity for Spot Instances in the fleet. If the minimum - // target capacity is not reached, the fleet launches no instances. + // target capacity is not reached, the fleet launches no instances. Supported only + // for fleets of type instant. At least one of the following must be specified: + // SingleAvailabilityZone | SingleInstanceType MinTargetCapacity *int32 // Indicates that the fleet launches all Spot Instances into a single Availability @@ -11884,29 +12086,28 @@ type SpotOptions struct { // Describes the configuration of Spot Instances in an EC2 Fleet request. type SpotOptionsRequest struct { - // Indicates how to allocate the target Spot Instance capacity across the Spot - // Instance pools specified by the EC2 Fleet. If the allocation strategy is - // lowest-price, EC2 Fleet launches instances from the Spot Instance pools with the - // lowest price. This is the default allocation strategy. If the allocation - // strategy is diversified, EC2 Fleet launches instances from all of the Spot - // Instance pools that you specify. If the allocation strategy is - // capacity-optimized (recommended), EC2 Fleet launches instances from Spot - // Instance pools with optimal capacity for the number of instances that are - // launching. To give certain instance types a higher chance of launching first, - // use capacity-optimized-prioritized. Set a priority for each instance type by - // using the Priority parameter for LaunchTemplateOverrides. You can assign the - // same priority to different LaunchTemplateOverrides. EC2 implements the - // priorities on a best-effort basis, but optimizes for capacity first. - // capacity-optimized-prioritized is supported only if your fleet uses a launch - // template. Note that if the On-Demand AllocationStrategy is set to prioritized, - // the same priority is applied when fulfilling On-Demand capacity. + // The strategy that determines how to allocate the target Spot Instance capacity + // across the Spot Instance pools specified by the EC2 Fleet. lowest-price - EC2 + // Fleet launches instances from the Spot Instance pools with the lowest price. + // diversified - EC2 Fleet launches instances from all of the Spot Instance pools + // that you specify. capacity-optimized (recommended) - EC2 Fleet launches + // instances from Spot Instance pools with optimal capacity for the number of + // instances that are launching. To give certain instance types a higher chance of + // launching first, use capacity-optimized-prioritized. Set a priority for each + // instance type by using the Priority parameter for LaunchTemplateOverrides. You + // can assign the same priority to different LaunchTemplateOverrides. EC2 + // implements the priorities on a best-effort basis, but optimizes for capacity + // first. capacity-optimized-prioritized is supported only if your fleet uses a + // launch template. Note that if the On-Demand AllocationStrategy is set to + // prioritized, the same priority is applied when fulfilling On-Demand capacity. + // Default: lowest-price AllocationStrategy SpotAllocationStrategy - // The behavior when a Spot Instance is interrupted. The default is terminate. + // The behavior when a Spot Instance is interrupted. Default: terminate InstanceInterruptionBehavior SpotInstanceInterruptionBehavior // The number of Spot pools across which to allocate your target Spot capacity. - // Valid only when Spot AllocationStrategy is set to lowest-price. EC2 Fleet + // Supported only when Spot AllocationStrategy is set to lowest-price. EC2 Fleet // selects the cheapest Spot pools and evenly allocates your target Spot capacity // across the number of Spot pools that you specify. Note that EC2 Fleet attempts // to draw Spot Instances from the number of pools that you specify on a best @@ -11926,7 +12127,9 @@ type SpotOptionsRequest struct { MaxTotalPrice *string // The minimum target capacity for Spot Instances in the fleet. If the minimum - // target capacity is not reached, the fleet launches no instances. + // target capacity is not reached, the fleet launches no instances. Supported only + // for fleets of type instant. At least one of the following must be specified: + // SingleAvailabilityZone | SingleInstanceType MinTargetCapacity *int32 // Indicates that the fleet launches all Spot Instances into a single Availability @@ -12190,6 +12393,9 @@ type Subnet struct { // Information about the IPv6 CIDR blocks associated with the subnet. Ipv6CidrBlockAssociationSet []SubnetIpv6CidrBlockAssociation + // Indicates whether this is an IPv6 only subnet. + Ipv6Native *bool + // Indicates whether a network interface created in this subnet (including a // network interface created by RunInstances) receives a customer-owned IPv4 // address. @@ -12205,6 +12411,10 @@ type Subnet struct { // The ID of the Amazon Web Services account that owns the subnet. OwnerId *string + // The type of hostnames to assign to instances in the subnet at launch. An + // instance hostname is based on the IPv4 address or ID of the instance. + PrivateDnsNameOptionsOnLaunch *PrivateDnsNameOptionsOnLaunch + // The current state of the subnet. State SubnetState @@ -12274,16 +12484,16 @@ type SubnetCidrReservation struct { noSmithyDocumentSerde } -// Describes an IPv6 CIDR block associated with a subnet. +// Describes an association between a subnet and an IPv6 CIDR block. type SubnetIpv6CidrBlockAssociation struct { - // The association ID for the CIDR block. + // The ID of the association. AssociationId *string // The IPv6 CIDR block. Ipv6CidrBlock *string - // Information about the state of the CIDR block. + // The state of the CIDR block. Ipv6CidrBlockState *SubnetCidrBlockState noSmithyDocumentSerde diff --git a/service/ec2/validators.go b/service/ec2/validators.go index 800f731b2a8..f093134bbbc 100644 --- a/service/ec2/validators.go +++ b/service/ec2/validators.go @@ -4970,6 +4970,26 @@ func (m *validateOpModifySnapshotAttribute) HandleInitialize(ctx context.Context return next.HandleInitialize(ctx, in) } +type validateOpModifySnapshotTier struct { +} + +func (*validateOpModifySnapshotTier) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpModifySnapshotTier) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ModifySnapshotTierInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpModifySnapshotTierInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpModifySpotFleetRequest struct { } @@ -5990,6 +6010,46 @@ func (m *validateOpRestoreManagedPrefixListVersion) HandleInitialize(ctx context return next.HandleInitialize(ctx, in) } +type validateOpRestoreSnapshotFromRecycleBin struct { +} + +func (*validateOpRestoreSnapshotFromRecycleBin) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRestoreSnapshotFromRecycleBin) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RestoreSnapshotFromRecycleBinInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRestoreSnapshotFromRecycleBinInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpRestoreSnapshotTier struct { +} + +func (*validateOpRestoreSnapshotTier) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRestoreSnapshotTier) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RestoreSnapshotTierInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRestoreSnapshotTierInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpRevokeClientVpnIngress struct { } @@ -7322,6 +7382,10 @@ func addOpModifySnapshotAttributeValidationMiddleware(stack *middleware.Stack) e return stack.Initialize.Add(&validateOpModifySnapshotAttribute{}, middleware.After) } +func addOpModifySnapshotTierValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpModifySnapshotTier{}, middleware.After) +} + func addOpModifySpotFleetRequestValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpModifySpotFleetRequest{}, middleware.After) } @@ -7526,6 +7590,14 @@ func addOpRestoreManagedPrefixListVersionValidationMiddleware(stack *middleware. return stack.Initialize.Add(&validateOpRestoreManagedPrefixListVersion{}, middleware.After) } +func addOpRestoreSnapshotFromRecycleBinValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRestoreSnapshotFromRecycleBin{}, middleware.After) +} + +func addOpRestoreSnapshotTierValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRestoreSnapshotTier{}, middleware.After) +} + func addOpRevokeClientVpnIngressValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRevokeClientVpnIngress{}, middleware.After) } @@ -9647,9 +9719,6 @@ func validateOpCreateSubnetInput(v *CreateSubnetInput) error { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateSubnetInput"} - if v.CidrBlock == nil { - invalidParams.Add(smithy.NewErrParamRequired("CidrBlock")) - } if v.VpcId == nil { invalidParams.Add(smithy.NewErrParamRequired("VpcId")) } @@ -12531,6 +12600,21 @@ func validateOpModifySnapshotAttributeInput(v *ModifySnapshotAttributeInput) err } } +func validateOpModifySnapshotTierInput(v *ModifySnapshotTierInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ModifySnapshotTierInput"} + if v.SnapshotId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SnapshotId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpModifySpotFleetRequestInput(v *ModifySpotFleetRequestInput) error { if v == nil { return nil @@ -13383,6 +13467,36 @@ func validateOpRestoreManagedPrefixListVersionInput(v *RestoreManagedPrefixListV } } +func validateOpRestoreSnapshotFromRecycleBinInput(v *RestoreSnapshotFromRecycleBinInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RestoreSnapshotFromRecycleBinInput"} + if v.SnapshotId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SnapshotId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpRestoreSnapshotTierInput(v *RestoreSnapshotTierInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RestoreSnapshotTierInput"} + if v.SnapshotId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SnapshotId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpRevokeClientVpnIngressInput(v *RevokeClientVpnIngressInput) error { if v == nil { return nil diff --git a/service/ecr/api_op_BatchGetRepositoryScanningConfiguration.go b/service/ecr/api_op_BatchGetRepositoryScanningConfiguration.go new file mode 100644 index 00000000000..42adcbbc46a --- /dev/null +++ b/service/ecr/api_op_BatchGetRepositoryScanningConfiguration.go @@ -0,0 +1,124 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ecr + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/ecr/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets the scanning configuration for one or more repositories. +func (c *Client) BatchGetRepositoryScanningConfiguration(ctx context.Context, params *BatchGetRepositoryScanningConfigurationInput, optFns ...func(*Options)) (*BatchGetRepositoryScanningConfigurationOutput, error) { + if params == nil { + params = &BatchGetRepositoryScanningConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchGetRepositoryScanningConfiguration", params, optFns, c.addOperationBatchGetRepositoryScanningConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchGetRepositoryScanningConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchGetRepositoryScanningConfigurationInput struct { + + // One or more repository names to get the scanning configuration for. + // + // This member is required. + RepositoryNames []string + + noSmithyDocumentSerde +} + +type BatchGetRepositoryScanningConfigurationOutput struct { + + // Any failures associated with the call. + Failures []types.RepositoryScanningConfigurationFailure + + // The scanning configuration for the requested repositories. + ScanningConfigurations []types.RepositoryScanningConfiguration + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchGetRepositoryScanningConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchGetRepositoryScanningConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchGetRepositoryScanningConfiguration{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpBatchGetRepositoryScanningConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetRepositoryScanningConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opBatchGetRepositoryScanningConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ecr", + OperationName: "BatchGetRepositoryScanningConfiguration", + } +} diff --git a/service/ecr/api_op_CreatePullThroughCacheRule.go b/service/ecr/api_op_CreatePullThroughCacheRule.go new file mode 100644 index 00000000000..6a67466e977 --- /dev/null +++ b/service/ecr/api_op_CreatePullThroughCacheRule.go @@ -0,0 +1,144 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ecr + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Creates a pull through cache rule. A pull through cache rule provides a way to +// cache images from an external public registry in your Amazon ECR private +// registry. +func (c *Client) CreatePullThroughCacheRule(ctx context.Context, params *CreatePullThroughCacheRuleInput, optFns ...func(*Options)) (*CreatePullThroughCacheRuleOutput, error) { + if params == nil { + params = &CreatePullThroughCacheRuleInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreatePullThroughCacheRule", params, optFns, c.addOperationCreatePullThroughCacheRuleMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreatePullThroughCacheRuleOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreatePullThroughCacheRuleInput struct { + + // The repository name prefix to use when caching images from the source registry. + // + // This member is required. + EcrRepositoryPrefix *string + + // The registry URL of the upstream public registry to use as the source for the + // pull through cache rule. + // + // This member is required. + UpstreamRegistryUrl *string + + // The Amazon Web Services account ID associated with the registry to create the + // pull through cache rule for. If you do not specify a registry, the default + // registry is assumed. + RegistryId *string + + noSmithyDocumentSerde +} + +type CreatePullThroughCacheRuleOutput struct { + + // The date and time, in JavaScript date format, when the pull through cache rule + // was created. + CreatedAt *time.Time + + // The Amazon ECR repository prefix associated with the pull through cache rule. + EcrRepositoryPrefix *string + + // The registry ID associated with the request. + RegistryId *string + + // The upstream registry URL associated with the pull through cache rule. + UpstreamRegistryUrl *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreatePullThroughCacheRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreatePullThroughCacheRule{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreatePullThroughCacheRule{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreatePullThroughCacheRuleValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreatePullThroughCacheRule(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreatePullThroughCacheRule(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ecr", + OperationName: "CreatePullThroughCacheRule", + } +} diff --git a/service/ecr/api_op_CreateRepository.go b/service/ecr/api_op_CreateRepository.go index e3bfa67908c..1f22e5c8217 100644 --- a/service/ecr/api_op_CreateRepository.go +++ b/service/ecr/api_op_CreateRepository.go @@ -53,8 +53,8 @@ type CreateRepositoryInput struct { // will be immutable which will prevent them from being overwritten. ImageTagMutability types.ImageTagMutability - // The AWS account ID associated with the registry to create the repository. If you - // do not specify a registry, the default registry is assumed. + // The Amazon Web Services account ID associated with the registry to create the + // repository. If you do not specify a registry, the default registry is assumed. RegistryId *string // The metadata that you apply to the repository to help you categorize and diff --git a/service/ecr/api_op_DeletePullThroughCacheRule.go b/service/ecr/api_op_DeletePullThroughCacheRule.go new file mode 100644 index 00000000000..1f4bd9701dd --- /dev/null +++ b/service/ecr/api_op_DeletePullThroughCacheRule.go @@ -0,0 +1,136 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ecr + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Deletes a pull through cache rule. +func (c *Client) DeletePullThroughCacheRule(ctx context.Context, params *DeletePullThroughCacheRuleInput, optFns ...func(*Options)) (*DeletePullThroughCacheRuleOutput, error) { + if params == nil { + params = &DeletePullThroughCacheRuleInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeletePullThroughCacheRule", params, optFns, c.addOperationDeletePullThroughCacheRuleMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeletePullThroughCacheRuleOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeletePullThroughCacheRuleInput struct { + + // The Amazon ECR repository prefix associated with the pull through cache rule to + // delete. + // + // This member is required. + EcrRepositoryPrefix *string + + // The Amazon Web Services account ID associated with the registry that contains + // the pull through cache rule. If you do not specify a registry, the default + // registry is assumed. + RegistryId *string + + noSmithyDocumentSerde +} + +type DeletePullThroughCacheRuleOutput struct { + + // The timestamp associated with the pull through cache rule. + CreatedAt *time.Time + + // The Amazon ECR repository prefix associated with the request. + EcrRepositoryPrefix *string + + // The registry ID associated with the request. + RegistryId *string + + // The upstream registry URL associated with the pull through cache rule. + UpstreamRegistryUrl *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeletePullThroughCacheRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeletePullThroughCacheRule{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeletePullThroughCacheRule{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeletePullThroughCacheRuleValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePullThroughCacheRule(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeletePullThroughCacheRule(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ecr", + OperationName: "DeletePullThroughCacheRule", + } +} diff --git a/service/ecr/api_op_DescribePullThroughCacheRules.go b/service/ecr/api_op_DescribePullThroughCacheRules.go new file mode 100644 index 00000000000..1ccaabcc0d8 --- /dev/null +++ b/service/ecr/api_op_DescribePullThroughCacheRules.go @@ -0,0 +1,245 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ecr + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/ecr/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the pull through cache rules for a registry. +func (c *Client) DescribePullThroughCacheRules(ctx context.Context, params *DescribePullThroughCacheRulesInput, optFns ...func(*Options)) (*DescribePullThroughCacheRulesOutput, error) { + if params == nil { + params = &DescribePullThroughCacheRulesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribePullThroughCacheRules", params, optFns, c.addOperationDescribePullThroughCacheRulesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribePullThroughCacheRulesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribePullThroughCacheRulesInput struct { + + // The Amazon ECR repository prefixes associated with the pull through cache rules + // to return. If no repository prefix value is specified, all pull through cache + // rules are returned. + EcrRepositoryPrefixes []string + + // The maximum number of pull through cache rules returned by + // DescribePullThroughCacheRulesRequest in paginated output. When this parameter is + // used, DescribePullThroughCacheRulesRequest only returns maxResults results in a + // single page along with a nextToken response element. The remaining results of + // the initial request can be seen by sending another + // DescribePullThroughCacheRulesRequest request with the returned nextToken value. + // This value can be between 1 and 1000. If this parameter is not used, then + // DescribePullThroughCacheRulesRequest returns up to 100 results and a nextToken + // value, if applicable. + MaxResults *int32 + + // The nextToken value returned from a previous paginated + // DescribePullThroughCacheRulesRequest request where maxResults was used and the + // results exceeded the value of that parameter. Pagination continues from the end + // of the previous results that returned the nextToken value. This value is null + // when there are no more results to return. + NextToken *string + + // The Amazon Web Services account ID associated with the registry to return the + // pull through cache rules for. If you do not specify a registry, the default + // registry is assumed. + RegistryId *string + + noSmithyDocumentSerde +} + +type DescribePullThroughCacheRulesOutput struct { + + // The nextToken value to include in a future DescribePullThroughCacheRulesRequest + // request. When the results of a DescribePullThroughCacheRulesRequest request + // exceed maxResults, this value can be used to retrieve the next page of results. + // This value is null when there are no more results to return. + NextToken *string + + // The details of the pull through cache rules. + PullThroughCacheRules []types.PullThroughCacheRule + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribePullThroughCacheRulesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribePullThroughCacheRules{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribePullThroughCacheRules{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePullThroughCacheRules(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// DescribePullThroughCacheRulesAPIClient is a client that implements the +// DescribePullThroughCacheRules operation. +type DescribePullThroughCacheRulesAPIClient interface { + DescribePullThroughCacheRules(context.Context, *DescribePullThroughCacheRulesInput, ...func(*Options)) (*DescribePullThroughCacheRulesOutput, error) +} + +var _ DescribePullThroughCacheRulesAPIClient = (*Client)(nil) + +// DescribePullThroughCacheRulesPaginatorOptions is the paginator options for +// DescribePullThroughCacheRules +type DescribePullThroughCacheRulesPaginatorOptions struct { + // The maximum number of pull through cache rules returned by + // DescribePullThroughCacheRulesRequest in paginated output. When this parameter is + // used, DescribePullThroughCacheRulesRequest only returns maxResults results in a + // single page along with a nextToken response element. The remaining results of + // the initial request can be seen by sending another + // DescribePullThroughCacheRulesRequest request with the returned nextToken value. + // This value can be between 1 and 1000. If this parameter is not used, then + // DescribePullThroughCacheRulesRequest returns up to 100 results and a nextToken + // value, if applicable. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribePullThroughCacheRulesPaginator is a paginator for +// DescribePullThroughCacheRules +type DescribePullThroughCacheRulesPaginator struct { + options DescribePullThroughCacheRulesPaginatorOptions + client DescribePullThroughCacheRulesAPIClient + params *DescribePullThroughCacheRulesInput + nextToken *string + firstPage bool +} + +// NewDescribePullThroughCacheRulesPaginator returns a new +// DescribePullThroughCacheRulesPaginator +func NewDescribePullThroughCacheRulesPaginator(client DescribePullThroughCacheRulesAPIClient, params *DescribePullThroughCacheRulesInput, optFns ...func(*DescribePullThroughCacheRulesPaginatorOptions)) *DescribePullThroughCacheRulesPaginator { + if params == nil { + params = &DescribePullThroughCacheRulesInput{} + } + + options := DescribePullThroughCacheRulesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribePullThroughCacheRulesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribePullThroughCacheRulesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribePullThroughCacheRules page. +func (p *DescribePullThroughCacheRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribePullThroughCacheRulesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.DescribePullThroughCacheRules(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opDescribePullThroughCacheRules(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ecr", + OperationName: "DescribePullThroughCacheRules", + } +} diff --git a/service/ecr/api_op_GetRegistryScanningConfiguration.go b/service/ecr/api_op_GetRegistryScanningConfiguration.go new file mode 100644 index 00000000000..07f5e4dc3ac --- /dev/null +++ b/service/ecr/api_op_GetRegistryScanningConfiguration.go @@ -0,0 +1,115 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ecr + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/ecr/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the scanning configuration for a registry. +func (c *Client) GetRegistryScanningConfiguration(ctx context.Context, params *GetRegistryScanningConfigurationInput, optFns ...func(*Options)) (*GetRegistryScanningConfigurationOutput, error) { + if params == nil { + params = &GetRegistryScanningConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetRegistryScanningConfiguration", params, optFns, c.addOperationGetRegistryScanningConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetRegistryScanningConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetRegistryScanningConfigurationInput struct { + noSmithyDocumentSerde +} + +type GetRegistryScanningConfigurationOutput struct { + + // The ID of the registry. + RegistryId *string + + // The scanning configuration for the registry. + ScanningConfiguration *types.RegistryScanningConfiguration + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetRegistryScanningConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetRegistryScanningConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetRegistryScanningConfiguration{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRegistryScanningConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetRegistryScanningConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ecr", + OperationName: "GetRegistryScanningConfiguration", + } +} diff --git a/service/ecr/api_op_PutRegistryScanningConfiguration.go b/service/ecr/api_op_PutRegistryScanningConfiguration.go new file mode 100644 index 00000000000..51a0d66ca59 --- /dev/null +++ b/service/ecr/api_op_PutRegistryScanningConfiguration.go @@ -0,0 +1,128 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ecr + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/ecr/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates or updates the scanning configuration for your private registry. +func (c *Client) PutRegistryScanningConfiguration(ctx context.Context, params *PutRegistryScanningConfigurationInput, optFns ...func(*Options)) (*PutRegistryScanningConfigurationOutput, error) { + if params == nil { + params = &PutRegistryScanningConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutRegistryScanningConfiguration", params, optFns, c.addOperationPutRegistryScanningConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutRegistryScanningConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutRegistryScanningConfigurationInput struct { + + // The scanning rules to use for the registry. A scanning rule is used to determine + // which repository filters are used and at what frequency scanning will occur. + Rules []types.RegistryScanningRule + + // The scanning type to set for the registry. By default, the BASIC scan type is + // used. When basic scanning is set, you may specify filters to determine which + // individual repositories, or all repositories, are scanned when new images are + // pushed. Alternatively, you can do manual scans of images with basic scanning. + // When the ENHANCED scan type is set, Amazon Inspector provides automated, + // continuous scanning of all repositories in your registry. + ScanType types.ScanType + + noSmithyDocumentSerde +} + +type PutRegistryScanningConfigurationOutput struct { + + // The scanning configuration for your registry. + RegistryScanningConfiguration *types.RegistryScanningConfiguration + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutRegistryScanningConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutRegistryScanningConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutRegistryScanningConfiguration{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpPutRegistryScanningConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutRegistryScanningConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutRegistryScanningConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ecr", + OperationName: "PutRegistryScanningConfiguration", + } +} diff --git a/service/ecr/deserializers.go b/service/ecr/deserializers.go index ec522be9087..2963e2b6762 100644 --- a/service/ecr/deserializers.go +++ b/service/ecr/deserializers.go @@ -16,6 +16,7 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "io" + "math" "strings" ) @@ -370,14 +371,14 @@ func awsAwsjson11_deserializeOpErrorBatchGetImage(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpCompleteLayerUpload struct { +type awsAwsjson11_deserializeOpBatchGetRepositoryScanningConfiguration struct { } -func (*awsAwsjson11_deserializeOpCompleteLayerUpload) ID() string { +func (*awsAwsjson11_deserializeOpBatchGetRepositoryScanningConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpCompleteLayerUpload) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpBatchGetRepositoryScanningConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -391,9 +392,9 @@ func (m *awsAwsjson11_deserializeOpCompleteLayerUpload) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorCompleteLayerUpload(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorBatchGetRepositoryScanningConfiguration(response, &metadata) } - output := &CompleteLayerUploadOutput{} + output := &BatchGetRepositoryScanningConfigurationOutput{} out.Result = output var buff [1024]byte @@ -413,7 +414,7 @@ func (m *awsAwsjson11_deserializeOpCompleteLayerUpload) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentCompleteLayerUploadOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentBatchGetRepositoryScanningConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -427,7 +428,7 @@ func (m *awsAwsjson11_deserializeOpCompleteLayerUpload) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorCompleteLayerUpload(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorBatchGetRepositoryScanningConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -468,32 +469,17 @@ func awsAwsjson11_deserializeOpErrorCompleteLayerUpload(response *smithyhttp.Res } switch { - case strings.EqualFold("EmptyUploadException", errorCode): - return awsAwsjson11_deserializeErrorEmptyUploadException(response, errorBody) - - case strings.EqualFold("InvalidLayerException", errorCode): - return awsAwsjson11_deserializeErrorInvalidLayerException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("KmsException", errorCode): - return awsAwsjson11_deserializeErrorKmsException(response, errorBody) - - case strings.EqualFold("LayerAlreadyExistsException", errorCode): - return awsAwsjson11_deserializeErrorLayerAlreadyExistsException(response, errorBody) - - case strings.EqualFold("LayerPartTooSmallException", errorCode): - return awsAwsjson11_deserializeErrorLayerPartTooSmallException(response, errorBody) - case strings.EqualFold("RepositoryNotFoundException", errorCode): return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) case strings.EqualFold("ServerException", errorCode): return awsAwsjson11_deserializeErrorServerException(response, errorBody) - case strings.EqualFold("UploadNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorUploadNotFoundException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -505,14 +491,14 @@ func awsAwsjson11_deserializeOpErrorCompleteLayerUpload(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpCreateRepository struct { +type awsAwsjson11_deserializeOpCompleteLayerUpload struct { } -func (*awsAwsjson11_deserializeOpCreateRepository) ID() string { +func (*awsAwsjson11_deserializeOpCompleteLayerUpload) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpCreateRepository) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpCompleteLayerUpload) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -526,9 +512,9 @@ func (m *awsAwsjson11_deserializeOpCreateRepository) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorCreateRepository(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorCompleteLayerUpload(response, &metadata) } - output := &CreateRepositoryOutput{} + output := &CompleteLayerUploadOutput{} out.Result = output var buff [1024]byte @@ -548,7 +534,7 @@ func (m *awsAwsjson11_deserializeOpCreateRepository) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentCreateRepositoryOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentCompleteLayerUploadOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -562,7 +548,7 @@ func (m *awsAwsjson11_deserializeOpCreateRepository) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorCreateRepository(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorCompleteLayerUpload(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -603,26 +589,32 @@ func awsAwsjson11_deserializeOpErrorCreateRepository(response *smithyhttp.Respon } switch { + case strings.EqualFold("EmptyUploadException", errorCode): + return awsAwsjson11_deserializeErrorEmptyUploadException(response, errorBody) + + case strings.EqualFold("InvalidLayerException", errorCode): + return awsAwsjson11_deserializeErrorInvalidLayerException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidTagParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidTagParameterException(response, errorBody) - case strings.EqualFold("KmsException", errorCode): return awsAwsjson11_deserializeErrorKmsException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("LayerAlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorLayerAlreadyExistsException(response, errorBody) - case strings.EqualFold("RepositoryAlreadyExistsException", errorCode): - return awsAwsjson11_deserializeErrorRepositoryAlreadyExistsException(response, errorBody) + case strings.EqualFold("LayerPartTooSmallException", errorCode): + return awsAwsjson11_deserializeErrorLayerPartTooSmallException(response, errorBody) + + case strings.EqualFold("RepositoryNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) case strings.EqualFold("ServerException", errorCode): return awsAwsjson11_deserializeErrorServerException(response, errorBody) - case strings.EqualFold("TooManyTagsException", errorCode): - return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody) + case strings.EqualFold("UploadNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorUploadNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -634,14 +626,14 @@ func awsAwsjson11_deserializeOpErrorCreateRepository(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpDeleteLifecyclePolicy struct { +type awsAwsjson11_deserializeOpCreatePullThroughCacheRule struct { } -func (*awsAwsjson11_deserializeOpDeleteLifecyclePolicy) ID() string { +func (*awsAwsjson11_deserializeOpCreatePullThroughCacheRule) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteLifecyclePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpCreatePullThroughCacheRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -655,9 +647,9 @@ func (m *awsAwsjson11_deserializeOpDeleteLifecyclePolicy) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteLifecyclePolicy(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorCreatePullThroughCacheRule(response, &metadata) } - output := &DeleteLifecyclePolicyOutput{} + output := &CreatePullThroughCacheRuleOutput{} out.Result = output var buff [1024]byte @@ -677,7 +669,7 @@ func (m *awsAwsjson11_deserializeOpDeleteLifecyclePolicy) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteLifecyclePolicyOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentCreatePullThroughCacheRuleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -691,7 +683,7 @@ func (m *awsAwsjson11_deserializeOpDeleteLifecyclePolicy) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteLifecyclePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorCreatePullThroughCacheRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -735,15 +727,21 @@ func awsAwsjson11_deserializeOpErrorDeleteLifecyclePolicy(response *smithyhttp.R case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("LifecyclePolicyNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorLifecyclePolicyNotFoundException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("RepositoryNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) + case strings.EqualFold("PullThroughCacheRuleAlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorPullThroughCacheRuleAlreadyExistsException(response, errorBody) case strings.EqualFold("ServerException", errorCode): return awsAwsjson11_deserializeErrorServerException(response, errorBody) + case strings.EqualFold("UnsupportedUpstreamRegistryException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedUpstreamRegistryException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -754,14 +752,14 @@ func awsAwsjson11_deserializeOpErrorDeleteLifecyclePolicy(response *smithyhttp.R } } -type awsAwsjson11_deserializeOpDeleteRegistryPolicy struct { +type awsAwsjson11_deserializeOpCreateRepository struct { } -func (*awsAwsjson11_deserializeOpDeleteRegistryPolicy) ID() string { +func (*awsAwsjson11_deserializeOpCreateRepository) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteRegistryPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpCreateRepository) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -775,9 +773,9 @@ func (m *awsAwsjson11_deserializeOpDeleteRegistryPolicy) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteRegistryPolicy(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorCreateRepository(response, &metadata) } - output := &DeleteRegistryPolicyOutput{} + output := &CreateRepositoryOutput{} out.Result = output var buff [1024]byte @@ -797,7 +795,7 @@ func (m *awsAwsjson11_deserializeOpDeleteRegistryPolicy) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteRegistryPolicyOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentCreateRepositoryOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -811,7 +809,7 @@ func (m *awsAwsjson11_deserializeOpDeleteRegistryPolicy) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteRegistryPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorCreateRepository(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -855,14 +853,23 @@ func awsAwsjson11_deserializeOpErrorDeleteRegistryPolicy(response *smithyhttp.Re case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("RegistryPolicyNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorRegistryPolicyNotFoundException(response, errorBody) + case strings.EqualFold("InvalidTagParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidTagParameterException(response, errorBody) + + case strings.EqualFold("KmsException", errorCode): + return awsAwsjson11_deserializeErrorKmsException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("RepositoryAlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorRepositoryAlreadyExistsException(response, errorBody) case strings.EqualFold("ServerException", errorCode): return awsAwsjson11_deserializeErrorServerException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): - return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + case strings.EqualFold("TooManyTagsException", errorCode): + return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -874,14 +881,14 @@ func awsAwsjson11_deserializeOpErrorDeleteRegistryPolicy(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpDeleteRepository struct { +type awsAwsjson11_deserializeOpDeleteLifecyclePolicy struct { } -func (*awsAwsjson11_deserializeOpDeleteRepository) ID() string { +func (*awsAwsjson11_deserializeOpDeleteLifecyclePolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteRepository) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteLifecyclePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -895,9 +902,9 @@ func (m *awsAwsjson11_deserializeOpDeleteRepository) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteRepository(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteLifecyclePolicy(response, &metadata) } - output := &DeleteRepositoryOutput{} + output := &DeleteLifecyclePolicyOutput{} out.Result = output var buff [1024]byte @@ -917,7 +924,7 @@ func (m *awsAwsjson11_deserializeOpDeleteRepository) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteRepositoryOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteLifecyclePolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -931,7 +938,7 @@ func (m *awsAwsjson11_deserializeOpDeleteRepository) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteRepository(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteLifecyclePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -975,11 +982,8 @@ func awsAwsjson11_deserializeOpErrorDeleteRepository(response *smithyhttp.Respon case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("KmsException", errorCode): - return awsAwsjson11_deserializeErrorKmsException(response, errorBody) - - case strings.EqualFold("RepositoryNotEmptyException", errorCode): - return awsAwsjson11_deserializeErrorRepositoryNotEmptyException(response, errorBody) + case strings.EqualFold("LifecyclePolicyNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorLifecyclePolicyNotFoundException(response, errorBody) case strings.EqualFold("RepositoryNotFoundException", errorCode): return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) @@ -997,14 +1001,14 @@ func awsAwsjson11_deserializeOpErrorDeleteRepository(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpDeleteRepositoryPolicy struct { +type awsAwsjson11_deserializeOpDeletePullThroughCacheRule struct { } -func (*awsAwsjson11_deserializeOpDeleteRepositoryPolicy) ID() string { +func (*awsAwsjson11_deserializeOpDeletePullThroughCacheRule) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteRepositoryPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeletePullThroughCacheRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1018,9 +1022,9 @@ func (m *awsAwsjson11_deserializeOpDeleteRepositoryPolicy) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteRepositoryPolicy(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeletePullThroughCacheRule(response, &metadata) } - output := &DeleteRepositoryPolicyOutput{} + output := &DeletePullThroughCacheRuleOutput{} out.Result = output var buff [1024]byte @@ -1040,7 +1044,7 @@ func (m *awsAwsjson11_deserializeOpDeleteRepositoryPolicy) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteRepositoryPolicyOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeletePullThroughCacheRuleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1054,7 +1058,7 @@ func (m *awsAwsjson11_deserializeOpDeleteRepositoryPolicy) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteRepositoryPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeletePullThroughCacheRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1098,15 +1102,15 @@ func awsAwsjson11_deserializeOpErrorDeleteRepositoryPolicy(response *smithyhttp. case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("RepositoryNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) - - case strings.EqualFold("RepositoryPolicyNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorRepositoryPolicyNotFoundException(response, errorBody) + case strings.EqualFold("PullThroughCacheRuleNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorPullThroughCacheRuleNotFoundException(response, errorBody) case strings.EqualFold("ServerException", errorCode): return awsAwsjson11_deserializeErrorServerException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -1117,14 +1121,14 @@ func awsAwsjson11_deserializeOpErrorDeleteRepositoryPolicy(response *smithyhttp. } } -type awsAwsjson11_deserializeOpDescribeImageReplicationStatus struct { +type awsAwsjson11_deserializeOpDeleteRegistryPolicy struct { } -func (*awsAwsjson11_deserializeOpDescribeImageReplicationStatus) ID() string { +func (*awsAwsjson11_deserializeOpDeleteRegistryPolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeImageReplicationStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteRegistryPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1138,9 +1142,9 @@ func (m *awsAwsjson11_deserializeOpDescribeImageReplicationStatus) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeImageReplicationStatus(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteRegistryPolicy(response, &metadata) } - output := &DescribeImageReplicationStatusOutput{} + output := &DeleteRegistryPolicyOutput{} out.Result = output var buff [1024]byte @@ -1160,7 +1164,7 @@ func (m *awsAwsjson11_deserializeOpDescribeImageReplicationStatus) HandleDeseria return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeImageReplicationStatusOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteRegistryPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1174,7 +1178,7 @@ func (m *awsAwsjson11_deserializeOpDescribeImageReplicationStatus) HandleDeseria return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeImageReplicationStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteRegistryPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1215,14 +1219,11 @@ func awsAwsjson11_deserializeOpErrorDescribeImageReplicationStatus(response *smi } switch { - case strings.EqualFold("ImageNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorImageNotFoundException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("RepositoryNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) + case strings.EqualFold("RegistryPolicyNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorRegistryPolicyNotFoundException(response, errorBody) case strings.EqualFold("ServerException", errorCode): return awsAwsjson11_deserializeErrorServerException(response, errorBody) @@ -1240,14 +1241,14 @@ func awsAwsjson11_deserializeOpErrorDescribeImageReplicationStatus(response *smi } } -type awsAwsjson11_deserializeOpDescribeImages struct { +type awsAwsjson11_deserializeOpDeleteRepository struct { } -func (*awsAwsjson11_deserializeOpDescribeImages) ID() string { +func (*awsAwsjson11_deserializeOpDeleteRepository) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeImages) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteRepository) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1261,9 +1262,9 @@ func (m *awsAwsjson11_deserializeOpDescribeImages) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeImages(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteRepository(response, &metadata) } - output := &DescribeImagesOutput{} + output := &DeleteRepositoryOutput{} out.Result = output var buff [1024]byte @@ -1283,7 +1284,7 @@ func (m *awsAwsjson11_deserializeOpDescribeImages) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeImagesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteRepositoryOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1297,7 +1298,7 @@ func (m *awsAwsjson11_deserializeOpDescribeImages) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeImages(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteRepository(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1338,12 +1339,15 @@ func awsAwsjson11_deserializeOpErrorDescribeImages(response *smithyhttp.Response } switch { - case strings.EqualFold("ImageNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorImageNotFoundException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("KmsException", errorCode): + return awsAwsjson11_deserializeErrorKmsException(response, errorBody) + + case strings.EqualFold("RepositoryNotEmptyException", errorCode): + return awsAwsjson11_deserializeErrorRepositoryNotEmptyException(response, errorBody) + case strings.EqualFold("RepositoryNotFoundException", errorCode): return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) @@ -1360,14 +1364,14 @@ func awsAwsjson11_deserializeOpErrorDescribeImages(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpDescribeImageScanFindings struct { +type awsAwsjson11_deserializeOpDeleteRepositoryPolicy struct { } -func (*awsAwsjson11_deserializeOpDescribeImageScanFindings) ID() string { +func (*awsAwsjson11_deserializeOpDeleteRepositoryPolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeImageScanFindings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteRepositoryPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1381,9 +1385,9 @@ func (m *awsAwsjson11_deserializeOpDescribeImageScanFindings) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeImageScanFindings(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteRepositoryPolicy(response, &metadata) } - output := &DescribeImageScanFindingsOutput{} + output := &DeleteRepositoryPolicyOutput{} out.Result = output var buff [1024]byte @@ -1403,7 +1407,7 @@ func (m *awsAwsjson11_deserializeOpDescribeImageScanFindings) HandleDeserialize( return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeImageScanFindingsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteRepositoryPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1417,7 +1421,7 @@ func (m *awsAwsjson11_deserializeOpDescribeImageScanFindings) HandleDeserialize( return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeImageScanFindings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteRepositoryPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1458,17 +1462,14 @@ func awsAwsjson11_deserializeOpErrorDescribeImageScanFindings(response *smithyht } switch { - case strings.EqualFold("ImageNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorImageNotFoundException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("RepositoryNotFoundException", errorCode): return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) - case strings.EqualFold("ScanNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorScanNotFoundException(response, errorBody) + case strings.EqualFold("RepositoryPolicyNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorRepositoryPolicyNotFoundException(response, errorBody) case strings.EqualFold("ServerException", errorCode): return awsAwsjson11_deserializeErrorServerException(response, errorBody) @@ -1483,14 +1484,14 @@ func awsAwsjson11_deserializeOpErrorDescribeImageScanFindings(response *smithyht } } -type awsAwsjson11_deserializeOpDescribeRegistry struct { +type awsAwsjson11_deserializeOpDescribeImageReplicationStatus struct { } -func (*awsAwsjson11_deserializeOpDescribeRegistry) ID() string { +func (*awsAwsjson11_deserializeOpDescribeImageReplicationStatus) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeRegistry) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeImageReplicationStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1504,9 +1505,9 @@ func (m *awsAwsjson11_deserializeOpDescribeRegistry) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeRegistry(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeImageReplicationStatus(response, &metadata) } - output := &DescribeRegistryOutput{} + output := &DescribeImageReplicationStatusOutput{} out.Result = output var buff [1024]byte @@ -1526,7 +1527,7 @@ func (m *awsAwsjson11_deserializeOpDescribeRegistry) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeRegistryOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeImageReplicationStatusOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1540,7 +1541,7 @@ func (m *awsAwsjson11_deserializeOpDescribeRegistry) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeRegistry(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeImageReplicationStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1581,9 +1582,15 @@ func awsAwsjson11_deserializeOpErrorDescribeRegistry(response *smithyhttp.Respon } switch { + case strings.EqualFold("ImageNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorImageNotFoundException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("RepositoryNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) + case strings.EqualFold("ServerException", errorCode): return awsAwsjson11_deserializeErrorServerException(response, errorBody) @@ -1600,14 +1607,14 @@ func awsAwsjson11_deserializeOpErrorDescribeRegistry(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpDescribeRepositories struct { +type awsAwsjson11_deserializeOpDescribeImages struct { } -func (*awsAwsjson11_deserializeOpDescribeRepositories) ID() string { +func (*awsAwsjson11_deserializeOpDescribeImages) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeRepositories) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeImages) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1621,9 +1628,9 @@ func (m *awsAwsjson11_deserializeOpDescribeRepositories) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeRepositories(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeImages(response, &metadata) } - output := &DescribeRepositoriesOutput{} + output := &DescribeImagesOutput{} out.Result = output var buff [1024]byte @@ -1643,7 +1650,7 @@ func (m *awsAwsjson11_deserializeOpDescribeRepositories) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeRepositoriesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeImagesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1657,7 +1664,7 @@ func (m *awsAwsjson11_deserializeOpDescribeRepositories) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeRepositories(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeImages(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1698,6 +1705,9 @@ func awsAwsjson11_deserializeOpErrorDescribeRepositories(response *smithyhttp.Re } switch { + case strings.EqualFold("ImageNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorImageNotFoundException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) @@ -1717,14 +1727,14 @@ func awsAwsjson11_deserializeOpErrorDescribeRepositories(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpGetAuthorizationToken struct { +type awsAwsjson11_deserializeOpDescribeImageScanFindings struct { } -func (*awsAwsjson11_deserializeOpGetAuthorizationToken) ID() string { +func (*awsAwsjson11_deserializeOpDescribeImageScanFindings) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetAuthorizationToken) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeImageScanFindings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1738,9 +1748,9 @@ func (m *awsAwsjson11_deserializeOpGetAuthorizationToken) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetAuthorizationToken(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeImageScanFindings(response, &metadata) } - output := &GetAuthorizationTokenOutput{} + output := &DescribeImageScanFindingsOutput{} out.Result = output var buff [1024]byte @@ -1760,7 +1770,7 @@ func (m *awsAwsjson11_deserializeOpGetAuthorizationToken) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetAuthorizationTokenOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeImageScanFindingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1774,7 +1784,7 @@ func (m *awsAwsjson11_deserializeOpGetAuthorizationToken) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetAuthorizationToken(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeImageScanFindings(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1815,12 +1825,24 @@ func awsAwsjson11_deserializeOpErrorGetAuthorizationToken(response *smithyhttp.R } switch { + case strings.EqualFold("ImageNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorImageNotFoundException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("RepositoryNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) + + case strings.EqualFold("ScanNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorScanNotFoundException(response, errorBody) + case strings.EqualFold("ServerException", errorCode): return awsAwsjson11_deserializeErrorServerException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -1831,14 +1853,14 @@ func awsAwsjson11_deserializeOpErrorGetAuthorizationToken(response *smithyhttp.R } } -type awsAwsjson11_deserializeOpGetDownloadUrlForLayer struct { +type awsAwsjson11_deserializeOpDescribePullThroughCacheRules struct { } -func (*awsAwsjson11_deserializeOpGetDownloadUrlForLayer) ID() string { +func (*awsAwsjson11_deserializeOpDescribePullThroughCacheRules) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetDownloadUrlForLayer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribePullThroughCacheRules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1852,9 +1874,9 @@ func (m *awsAwsjson11_deserializeOpGetDownloadUrlForLayer) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetDownloadUrlForLayer(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribePullThroughCacheRules(response, &metadata) } - output := &GetDownloadUrlForLayerOutput{} + output := &DescribePullThroughCacheRulesOutput{} out.Result = output var buff [1024]byte @@ -1874,7 +1896,7 @@ func (m *awsAwsjson11_deserializeOpGetDownloadUrlForLayer) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetDownloadUrlForLayerOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribePullThroughCacheRulesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1888,7 +1910,7 @@ func (m *awsAwsjson11_deserializeOpGetDownloadUrlForLayer) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetDownloadUrlForLayer(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribePullThroughCacheRules(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1932,18 +1954,15 @@ func awsAwsjson11_deserializeOpErrorGetDownloadUrlForLayer(response *smithyhttp. case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("LayerInaccessibleException", errorCode): - return awsAwsjson11_deserializeErrorLayerInaccessibleException(response, errorBody) - - case strings.EqualFold("LayersNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorLayersNotFoundException(response, errorBody) - - case strings.EqualFold("RepositoryNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) + case strings.EqualFold("PullThroughCacheRuleNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorPullThroughCacheRuleNotFoundException(response, errorBody) case strings.EqualFold("ServerException", errorCode): return awsAwsjson11_deserializeErrorServerException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -1954,14 +1973,14 @@ func awsAwsjson11_deserializeOpErrorGetDownloadUrlForLayer(response *smithyhttp. } } -type awsAwsjson11_deserializeOpGetLifecyclePolicy struct { +type awsAwsjson11_deserializeOpDescribeRegistry struct { } -func (*awsAwsjson11_deserializeOpGetLifecyclePolicy) ID() string { +func (*awsAwsjson11_deserializeOpDescribeRegistry) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetLifecyclePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeRegistry) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1975,9 +1994,9 @@ func (m *awsAwsjson11_deserializeOpGetLifecyclePolicy) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetLifecyclePolicy(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeRegistry(response, &metadata) } - output := &GetLifecyclePolicyOutput{} + output := &DescribeRegistryOutput{} out.Result = output var buff [1024]byte @@ -1997,7 +2016,7 @@ func (m *awsAwsjson11_deserializeOpGetLifecyclePolicy) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetLifecyclePolicyOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeRegistryOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2011,7 +2030,7 @@ func (m *awsAwsjson11_deserializeOpGetLifecyclePolicy) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetLifecyclePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeRegistry(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2055,15 +2074,12 @@ func awsAwsjson11_deserializeOpErrorGetLifecyclePolicy(response *smithyhttp.Resp case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("LifecyclePolicyNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorLifecyclePolicyNotFoundException(response, errorBody) - - case strings.EqualFold("RepositoryNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) - case strings.EqualFold("ServerException", errorCode): return awsAwsjson11_deserializeErrorServerException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2074,14 +2090,14 @@ func awsAwsjson11_deserializeOpErrorGetLifecyclePolicy(response *smithyhttp.Resp } } -type awsAwsjson11_deserializeOpGetLifecyclePolicyPreview struct { +type awsAwsjson11_deserializeOpDescribeRepositories struct { } -func (*awsAwsjson11_deserializeOpGetLifecyclePolicyPreview) ID() string { +func (*awsAwsjson11_deserializeOpDescribeRepositories) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetLifecyclePolicyPreview) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeRepositories) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2095,9 +2111,9 @@ func (m *awsAwsjson11_deserializeOpGetLifecyclePolicyPreview) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetLifecyclePolicyPreview(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeRepositories(response, &metadata) } - output := &GetLifecyclePolicyPreviewOutput{} + output := &DescribeRepositoriesOutput{} out.Result = output var buff [1024]byte @@ -2117,7 +2133,7 @@ func (m *awsAwsjson11_deserializeOpGetLifecyclePolicyPreview) HandleDeserialize( return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetLifecyclePolicyPreviewOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeRepositoriesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2131,7 +2147,7 @@ func (m *awsAwsjson11_deserializeOpGetLifecyclePolicyPreview) HandleDeserialize( return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetLifecyclePolicyPreview(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeRepositories(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2175,9 +2191,6 @@ func awsAwsjson11_deserializeOpErrorGetLifecyclePolicyPreview(response *smithyht case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("LifecyclePolicyPreviewNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorLifecyclePolicyPreviewNotFoundException(response, errorBody) - case strings.EqualFold("RepositoryNotFoundException", errorCode): return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) @@ -2194,14 +2207,14 @@ func awsAwsjson11_deserializeOpErrorGetLifecyclePolicyPreview(response *smithyht } } -type awsAwsjson11_deserializeOpGetRegistryPolicy struct { +type awsAwsjson11_deserializeOpGetAuthorizationToken struct { } -func (*awsAwsjson11_deserializeOpGetRegistryPolicy) ID() string { +func (*awsAwsjson11_deserializeOpGetAuthorizationToken) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetRegistryPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetAuthorizationToken) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2215,9 +2228,9 @@ func (m *awsAwsjson11_deserializeOpGetRegistryPolicy) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetRegistryPolicy(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetAuthorizationToken(response, &metadata) } - output := &GetRegistryPolicyOutput{} + output := &GetAuthorizationTokenOutput{} out.Result = output var buff [1024]byte @@ -2237,7 +2250,7 @@ func (m *awsAwsjson11_deserializeOpGetRegistryPolicy) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetRegistryPolicyOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetAuthorizationTokenOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2251,7 +2264,7 @@ func (m *awsAwsjson11_deserializeOpGetRegistryPolicy) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetRegistryPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetAuthorizationToken(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2295,15 +2308,9 @@ func awsAwsjson11_deserializeOpErrorGetRegistryPolicy(response *smithyhttp.Respo case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("RegistryPolicyNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorRegistryPolicyNotFoundException(response, errorBody) - case strings.EqualFold("ServerException", errorCode): return awsAwsjson11_deserializeErrorServerException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): - return awsAwsjson11_deserializeErrorValidationException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2314,14 +2321,14 @@ func awsAwsjson11_deserializeOpErrorGetRegistryPolicy(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpGetRepositoryPolicy struct { +type awsAwsjson11_deserializeOpGetDownloadUrlForLayer struct { } -func (*awsAwsjson11_deserializeOpGetRepositoryPolicy) ID() string { +func (*awsAwsjson11_deserializeOpGetDownloadUrlForLayer) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetRepositoryPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetDownloadUrlForLayer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2335,9 +2342,9 @@ func (m *awsAwsjson11_deserializeOpGetRepositoryPolicy) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetRepositoryPolicy(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetDownloadUrlForLayer(response, &metadata) } - output := &GetRepositoryPolicyOutput{} + output := &GetDownloadUrlForLayerOutput{} out.Result = output var buff [1024]byte @@ -2357,7 +2364,7 @@ func (m *awsAwsjson11_deserializeOpGetRepositoryPolicy) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetRepositoryPolicyOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetDownloadUrlForLayerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2371,7 +2378,7 @@ func (m *awsAwsjson11_deserializeOpGetRepositoryPolicy) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetRepositoryPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetDownloadUrlForLayer(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2415,12 +2422,15 @@ func awsAwsjson11_deserializeOpErrorGetRepositoryPolicy(response *smithyhttp.Res case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("LayerInaccessibleException", errorCode): + return awsAwsjson11_deserializeErrorLayerInaccessibleException(response, errorBody) + + case strings.EqualFold("LayersNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorLayersNotFoundException(response, errorBody) + case strings.EqualFold("RepositoryNotFoundException", errorCode): return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) - case strings.EqualFold("RepositoryPolicyNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorRepositoryPolicyNotFoundException(response, errorBody) - case strings.EqualFold("ServerException", errorCode): return awsAwsjson11_deserializeErrorServerException(response, errorBody) @@ -2434,14 +2444,14 @@ func awsAwsjson11_deserializeOpErrorGetRepositoryPolicy(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpInitiateLayerUpload struct { +type awsAwsjson11_deserializeOpGetLifecyclePolicy struct { } -func (*awsAwsjson11_deserializeOpInitiateLayerUpload) ID() string { +func (*awsAwsjson11_deserializeOpGetLifecyclePolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpInitiateLayerUpload) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetLifecyclePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2455,9 +2465,9 @@ func (m *awsAwsjson11_deserializeOpInitiateLayerUpload) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorInitiateLayerUpload(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetLifecyclePolicy(response, &metadata) } - output := &InitiateLayerUploadOutput{} + output := &GetLifecyclePolicyOutput{} out.Result = output var buff [1024]byte @@ -2477,7 +2487,7 @@ func (m *awsAwsjson11_deserializeOpInitiateLayerUpload) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentInitiateLayerUploadOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetLifecyclePolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2491,7 +2501,7 @@ func (m *awsAwsjson11_deserializeOpInitiateLayerUpload) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorInitiateLayerUpload(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetLifecyclePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2535,8 +2545,8 @@ func awsAwsjson11_deserializeOpErrorInitiateLayerUpload(response *smithyhttp.Res case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("KmsException", errorCode): - return awsAwsjson11_deserializeErrorKmsException(response, errorBody) + case strings.EqualFold("LifecyclePolicyNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorLifecyclePolicyNotFoundException(response, errorBody) case strings.EqualFold("RepositoryNotFoundException", errorCode): return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) @@ -2554,14 +2564,14 @@ func awsAwsjson11_deserializeOpErrorInitiateLayerUpload(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpListImages struct { +type awsAwsjson11_deserializeOpGetLifecyclePolicyPreview struct { } -func (*awsAwsjson11_deserializeOpListImages) ID() string { +func (*awsAwsjson11_deserializeOpGetLifecyclePolicyPreview) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListImages) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetLifecyclePolicyPreview) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2575,9 +2585,9 @@ func (m *awsAwsjson11_deserializeOpListImages) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListImages(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetLifecyclePolicyPreview(response, &metadata) } - output := &ListImagesOutput{} + output := &GetLifecyclePolicyPreviewOutput{} out.Result = output var buff [1024]byte @@ -2597,7 +2607,7 @@ func (m *awsAwsjson11_deserializeOpListImages) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListImagesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetLifecyclePolicyPreviewOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2611,7 +2621,7 @@ func (m *awsAwsjson11_deserializeOpListImages) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListImages(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetLifecyclePolicyPreview(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2655,6 +2665,9 @@ func awsAwsjson11_deserializeOpErrorListImages(response *smithyhttp.Response, me case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("LifecyclePolicyPreviewNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorLifecyclePolicyPreviewNotFoundException(response, errorBody) + case strings.EqualFold("RepositoryNotFoundException", errorCode): return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) @@ -2671,14 +2684,14 @@ func awsAwsjson11_deserializeOpErrorListImages(response *smithyhttp.Response, me } } -type awsAwsjson11_deserializeOpListTagsForResource struct { +type awsAwsjson11_deserializeOpGetRegistryPolicy struct { } -func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string { +func (*awsAwsjson11_deserializeOpGetRegistryPolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetRegistryPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2692,9 +2705,9 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListTagsForResource(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetRegistryPolicy(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &GetRegistryPolicyOutput{} out.Result = output var buff [1024]byte @@ -2714,7 +2727,7 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetRegistryPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2728,7 +2741,7 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetRegistryPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2772,12 +2785,15 @@ func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Res case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("RepositoryNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) + case strings.EqualFold("RegistryPolicyNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorRegistryPolicyNotFoundException(response, errorBody) case strings.EqualFold("ServerException", errorCode): return awsAwsjson11_deserializeErrorServerException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2788,14 +2804,14 @@ func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpPutImage struct { +type awsAwsjson11_deserializeOpGetRegistryScanningConfiguration struct { } -func (*awsAwsjson11_deserializeOpPutImage) ID() string { +func (*awsAwsjson11_deserializeOpGetRegistryScanningConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutImage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetRegistryScanningConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2809,9 +2825,9 @@ func (m *awsAwsjson11_deserializeOpPutImage) HandleDeserialize(ctx context.Conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutImage(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetRegistryScanningConfiguration(response, &metadata) } - output := &PutImageOutput{} + output := &GetRegistryScanningConfigurationOutput{} out.Result = output var buff [1024]byte @@ -2831,7 +2847,7 @@ func (m *awsAwsjson11_deserializeOpPutImage) HandleDeserialize(ctx context.Conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutImageOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetRegistryScanningConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2845,7 +2861,7 @@ func (m *awsAwsjson11_deserializeOpPutImage) HandleDeserialize(ctx context.Conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutImage(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetRegistryScanningConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2886,36 +2902,15 @@ func awsAwsjson11_deserializeOpErrorPutImage(response *smithyhttp.Response, meta } switch { - case strings.EqualFold("ImageAlreadyExistsException", errorCode): - return awsAwsjson11_deserializeErrorImageAlreadyExistsException(response, errorBody) - - case strings.EqualFold("ImageDigestDoesNotMatchException", errorCode): - return awsAwsjson11_deserializeErrorImageDigestDoesNotMatchException(response, errorBody) - - case strings.EqualFold("ImageTagAlreadyExistsException", errorCode): - return awsAwsjson11_deserializeErrorImageTagAlreadyExistsException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("KmsException", errorCode): - return awsAwsjson11_deserializeErrorKmsException(response, errorBody) - - case strings.EqualFold("LayersNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorLayersNotFoundException(response, errorBody) - - case strings.EqualFold("LimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) - - case strings.EqualFold("ReferencedImagesNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorReferencedImagesNotFoundException(response, errorBody) - - case strings.EqualFold("RepositoryNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) - case strings.EqualFold("ServerException", errorCode): return awsAwsjson11_deserializeErrorServerException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2926,14 +2921,14 @@ func awsAwsjson11_deserializeOpErrorPutImage(response *smithyhttp.Response, meta } } -type awsAwsjson11_deserializeOpPutImageScanningConfiguration struct { +type awsAwsjson11_deserializeOpGetRepositoryPolicy struct { } -func (*awsAwsjson11_deserializeOpPutImageScanningConfiguration) ID() string { +func (*awsAwsjson11_deserializeOpGetRepositoryPolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutImageScanningConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetRepositoryPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2947,9 +2942,9 @@ func (m *awsAwsjson11_deserializeOpPutImageScanningConfiguration) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutImageScanningConfiguration(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetRepositoryPolicy(response, &metadata) } - output := &PutImageScanningConfigurationOutput{} + output := &GetRepositoryPolicyOutput{} out.Result = output var buff [1024]byte @@ -2969,7 +2964,7 @@ func (m *awsAwsjson11_deserializeOpPutImageScanningConfiguration) HandleDeserial return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutImageScanningConfigurationOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetRepositoryPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2983,7 +2978,7 @@ func (m *awsAwsjson11_deserializeOpPutImageScanningConfiguration) HandleDeserial return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutImageScanningConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetRepositoryPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3030,6 +3025,9 @@ func awsAwsjson11_deserializeOpErrorPutImageScanningConfiguration(response *smit case strings.EqualFold("RepositoryNotFoundException", errorCode): return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) + case strings.EqualFold("RepositoryPolicyNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorRepositoryPolicyNotFoundException(response, errorBody) + case strings.EqualFold("ServerException", errorCode): return awsAwsjson11_deserializeErrorServerException(response, errorBody) @@ -3043,14 +3041,14 @@ func awsAwsjson11_deserializeOpErrorPutImageScanningConfiguration(response *smit } } -type awsAwsjson11_deserializeOpPutImageTagMutability struct { +type awsAwsjson11_deserializeOpInitiateLayerUpload struct { } -func (*awsAwsjson11_deserializeOpPutImageTagMutability) ID() string { +func (*awsAwsjson11_deserializeOpInitiateLayerUpload) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutImageTagMutability) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpInitiateLayerUpload) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3064,9 +3062,9 @@ func (m *awsAwsjson11_deserializeOpPutImageTagMutability) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutImageTagMutability(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorInitiateLayerUpload(response, &metadata) } - output := &PutImageTagMutabilityOutput{} + output := &InitiateLayerUploadOutput{} out.Result = output var buff [1024]byte @@ -3086,7 +3084,7 @@ func (m *awsAwsjson11_deserializeOpPutImageTagMutability) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutImageTagMutabilityOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentInitiateLayerUploadOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3100,7 +3098,7 @@ func (m *awsAwsjson11_deserializeOpPutImageTagMutability) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutImageTagMutability(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorInitiateLayerUpload(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3144,6 +3142,9 @@ func awsAwsjson11_deserializeOpErrorPutImageTagMutability(response *smithyhttp.R case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("KmsException", errorCode): + return awsAwsjson11_deserializeErrorKmsException(response, errorBody) + case strings.EqualFold("RepositoryNotFoundException", errorCode): return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) @@ -3160,14 +3161,14 @@ func awsAwsjson11_deserializeOpErrorPutImageTagMutability(response *smithyhttp.R } } -type awsAwsjson11_deserializeOpPutLifecyclePolicy struct { +type awsAwsjson11_deserializeOpListImages struct { } -func (*awsAwsjson11_deserializeOpPutLifecyclePolicy) ID() string { +func (*awsAwsjson11_deserializeOpListImages) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutLifecyclePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListImages) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3181,9 +3182,9 @@ func (m *awsAwsjson11_deserializeOpPutLifecyclePolicy) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutLifecyclePolicy(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListImages(response, &metadata) } - output := &PutLifecyclePolicyOutput{} + output := &ListImagesOutput{} out.Result = output var buff [1024]byte @@ -3203,7 +3204,7 @@ func (m *awsAwsjson11_deserializeOpPutLifecyclePolicy) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutLifecyclePolicyOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListImagesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3217,7 +3218,7 @@ func (m *awsAwsjson11_deserializeOpPutLifecyclePolicy) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutLifecyclePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListImages(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3277,14 +3278,14 @@ func awsAwsjson11_deserializeOpErrorPutLifecyclePolicy(response *smithyhttp.Resp } } -type awsAwsjson11_deserializeOpPutRegistryPolicy struct { +type awsAwsjson11_deserializeOpListTagsForResource struct { } -func (*awsAwsjson11_deserializeOpPutRegistryPolicy) ID() string { +func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutRegistryPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3298,9 +3299,9 @@ func (m *awsAwsjson11_deserializeOpPutRegistryPolicy) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutRegistryPolicy(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListTagsForResource(response, &metadata) } - output := &PutRegistryPolicyOutput{} + output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte @@ -3320,7 +3321,7 @@ func (m *awsAwsjson11_deserializeOpPutRegistryPolicy) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutRegistryPolicyOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3334,7 +3335,7 @@ func (m *awsAwsjson11_deserializeOpPutRegistryPolicy) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutRegistryPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3378,12 +3379,12 @@ func awsAwsjson11_deserializeOpErrorPutRegistryPolicy(response *smithyhttp.Respo case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("RepositoryNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) + case strings.EqualFold("ServerException", errorCode): return awsAwsjson11_deserializeErrorServerException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): - return awsAwsjson11_deserializeErrorValidationException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3394,14 +3395,14 @@ func awsAwsjson11_deserializeOpErrorPutRegistryPolicy(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpPutReplicationConfiguration struct { +type awsAwsjson11_deserializeOpPutImage struct { } -func (*awsAwsjson11_deserializeOpPutReplicationConfiguration) ID() string { +func (*awsAwsjson11_deserializeOpPutImage) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutReplicationConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutImage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3415,9 +3416,9 @@ func (m *awsAwsjson11_deserializeOpPutReplicationConfiguration) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutReplicationConfiguration(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutImage(response, &metadata) } - output := &PutReplicationConfigurationOutput{} + output := &PutImageOutput{} out.Result = output var buff [1024]byte @@ -3437,7 +3438,7 @@ func (m *awsAwsjson11_deserializeOpPutReplicationConfiguration) HandleDeserializ return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutReplicationConfigurationOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentPutImageOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3451,7 +3452,7 @@ func (m *awsAwsjson11_deserializeOpPutReplicationConfiguration) HandleDeserializ return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutReplicationConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutImage(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3492,15 +3493,36 @@ func awsAwsjson11_deserializeOpErrorPutReplicationConfiguration(response *smithy } switch { + case strings.EqualFold("ImageAlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorImageAlreadyExistsException(response, errorBody) + + case strings.EqualFold("ImageDigestDoesNotMatchException", errorCode): + return awsAwsjson11_deserializeErrorImageDigestDoesNotMatchException(response, errorBody) + + case strings.EqualFold("ImageTagAlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorImageTagAlreadyExistsException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("KmsException", errorCode): + return awsAwsjson11_deserializeErrorKmsException(response, errorBody) + + case strings.EqualFold("LayersNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorLayersNotFoundException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ReferencedImagesNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorReferencedImagesNotFoundException(response, errorBody) + + case strings.EqualFold("RepositoryNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) + case strings.EqualFold("ServerException", errorCode): return awsAwsjson11_deserializeErrorServerException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): - return awsAwsjson11_deserializeErrorValidationException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3511,14 +3533,14 @@ func awsAwsjson11_deserializeOpErrorPutReplicationConfiguration(response *smithy } } -type awsAwsjson11_deserializeOpSetRepositoryPolicy struct { +type awsAwsjson11_deserializeOpPutImageScanningConfiguration struct { } -func (*awsAwsjson11_deserializeOpSetRepositoryPolicy) ID() string { +func (*awsAwsjson11_deserializeOpPutImageScanningConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpSetRepositoryPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutImageScanningConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3532,9 +3554,9 @@ func (m *awsAwsjson11_deserializeOpSetRepositoryPolicy) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorSetRepositoryPolicy(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutImageScanningConfiguration(response, &metadata) } - output := &SetRepositoryPolicyOutput{} + output := &PutImageScanningConfigurationOutput{} out.Result = output var buff [1024]byte @@ -3554,7 +3576,7 @@ func (m *awsAwsjson11_deserializeOpSetRepositoryPolicy) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentSetRepositoryPolicyOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentPutImageScanningConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3568,7 +3590,7 @@ func (m *awsAwsjson11_deserializeOpSetRepositoryPolicy) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorSetRepositoryPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutImageScanningConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3618,6 +3640,9 @@ func awsAwsjson11_deserializeOpErrorSetRepositoryPolicy(response *smithyhttp.Res case strings.EqualFold("ServerException", errorCode): return awsAwsjson11_deserializeErrorServerException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3628,14 +3653,14 @@ func awsAwsjson11_deserializeOpErrorSetRepositoryPolicy(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpStartImageScan struct { +type awsAwsjson11_deserializeOpPutImageTagMutability struct { } -func (*awsAwsjson11_deserializeOpStartImageScan) ID() string { +func (*awsAwsjson11_deserializeOpPutImageTagMutability) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartImageScan) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutImageTagMutability) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3649,9 +3674,9 @@ func (m *awsAwsjson11_deserializeOpStartImageScan) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartImageScan(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutImageTagMutability(response, &metadata) } - output := &StartImageScanOutput{} + output := &PutImageTagMutabilityOutput{} out.Result = output var buff [1024]byte @@ -3671,7 +3696,7 @@ func (m *awsAwsjson11_deserializeOpStartImageScan) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartImageScanOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentPutImageTagMutabilityOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3685,7 +3710,7 @@ func (m *awsAwsjson11_deserializeOpStartImageScan) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartImageScan(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutImageTagMutability(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3726,24 +3751,15 @@ func awsAwsjson11_deserializeOpErrorStartImageScan(response *smithyhttp.Response } switch { - case strings.EqualFold("ImageNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorImageNotFoundException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("RepositoryNotFoundException", errorCode): return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) case strings.EqualFold("ServerException", errorCode): return awsAwsjson11_deserializeErrorServerException(response, errorBody) - case strings.EqualFold("UnsupportedImageTypeException", errorCode): - return awsAwsjson11_deserializeErrorUnsupportedImageTypeException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3754,14 +3770,14 @@ func awsAwsjson11_deserializeOpErrorStartImageScan(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpStartLifecyclePolicyPreview struct { +type awsAwsjson11_deserializeOpPutLifecyclePolicy struct { } -func (*awsAwsjson11_deserializeOpStartLifecyclePolicyPreview) ID() string { +func (*awsAwsjson11_deserializeOpPutLifecyclePolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartLifecyclePolicyPreview) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutLifecyclePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3775,9 +3791,9 @@ func (m *awsAwsjson11_deserializeOpStartLifecyclePolicyPreview) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartLifecyclePolicyPreview(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutLifecyclePolicy(response, &metadata) } - output := &StartLifecyclePolicyPreviewOutput{} + output := &PutLifecyclePolicyOutput{} out.Result = output var buff [1024]byte @@ -3797,7 +3813,7 @@ func (m *awsAwsjson11_deserializeOpStartLifecyclePolicyPreview) HandleDeserializ return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartLifecyclePolicyPreviewOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentPutLifecyclePolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3811,7 +3827,7 @@ func (m *awsAwsjson11_deserializeOpStartLifecyclePolicyPreview) HandleDeserializ return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartLifecyclePolicyPreview(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutLifecyclePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3855,12 +3871,6 @@ func awsAwsjson11_deserializeOpErrorStartLifecyclePolicyPreview(response *smithy case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("LifecyclePolicyNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorLifecyclePolicyNotFoundException(response, errorBody) - - case strings.EqualFold("LifecyclePolicyPreviewInProgressException", errorCode): - return awsAwsjson11_deserializeErrorLifecyclePolicyPreviewInProgressException(response, errorBody) - case strings.EqualFold("RepositoryNotFoundException", errorCode): return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) @@ -3877,14 +3887,14 @@ func awsAwsjson11_deserializeOpErrorStartLifecyclePolicyPreview(response *smithy } } -type awsAwsjson11_deserializeOpTagResource struct { +type awsAwsjson11_deserializeOpPutRegistryPolicy struct { } -func (*awsAwsjson11_deserializeOpTagResource) ID() string { +func (*awsAwsjson11_deserializeOpPutRegistryPolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutRegistryPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3898,9 +3908,9 @@ func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorTagResource(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutRegistryPolicy(response, &metadata) } - output := &TagResourceOutput{} + output := &PutRegistryPolicyOutput{} out.Result = output var buff [1024]byte @@ -3920,7 +3930,7 @@ func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentTagResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentPutRegistryPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3934,7 +3944,7 @@ func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutRegistryPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3978,17 +3988,11 @@ func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, m case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidTagParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidTagParameterException(response, errorBody) - - case strings.EqualFold("RepositoryNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) - case strings.EqualFold("ServerException", errorCode): return awsAwsjson11_deserializeErrorServerException(response, errorBody) - case strings.EqualFold("TooManyTagsException", errorCode): - return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -4000,14 +4004,14 @@ func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpUntagResource struct { +type awsAwsjson11_deserializeOpPutRegistryScanningConfiguration struct { } -func (*awsAwsjson11_deserializeOpUntagResource) ID() string { +func (*awsAwsjson11_deserializeOpPutRegistryScanningConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutRegistryScanningConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4021,9 +4025,9 @@ func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUntagResource(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutRegistryScanningConfiguration(response, &metadata) } - output := &UntagResourceOutput{} + output := &PutRegistryScanningConfigurationOutput{} out.Result = output var buff [1024]byte @@ -4043,7 +4047,7 @@ func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUntagResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentPutRegistryScanningConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4057,7 +4061,7 @@ func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutRegistryScanningConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4101,17 +4105,11 @@ func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidTagParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidTagParameterException(response, errorBody) - - case strings.EqualFold("RepositoryNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) - case strings.EqualFold("ServerException", errorCode): return awsAwsjson11_deserializeErrorServerException(response, errorBody) - case strings.EqualFold("TooManyTagsException", errorCode): - return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -4123,14 +4121,14 @@ func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpUploadLayerPart struct { +type awsAwsjson11_deserializeOpPutReplicationConfiguration struct { } -func (*awsAwsjson11_deserializeOpUploadLayerPart) ID() string { +func (*awsAwsjson11_deserializeOpPutReplicationConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUploadLayerPart) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutReplicationConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4144,9 +4142,9 @@ func (m *awsAwsjson11_deserializeOpUploadLayerPart) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUploadLayerPart(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutReplicationConfiguration(response, &metadata) } - output := &UploadLayerPartOutput{} + output := &PutReplicationConfigurationOutput{} out.Result = output var buff [1024]byte @@ -4166,7 +4164,7 @@ func (m *awsAwsjson11_deserializeOpUploadLayerPart) HandleDeserialize(ctx contex return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUploadLayerPartOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentPutReplicationConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4180,7 +4178,7 @@ func (m *awsAwsjson11_deserializeOpUploadLayerPart) HandleDeserialize(ctx contex return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUploadLayerPart(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutReplicationConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4221,26 +4219,14 @@ func awsAwsjson11_deserializeOpErrorUploadLayerPart(response *smithyhttp.Respons } switch { - case strings.EqualFold("InvalidLayerPartException", errorCode): - return awsAwsjson11_deserializeErrorInvalidLayerPartException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("KmsException", errorCode): - return awsAwsjson11_deserializeErrorKmsException(response, errorBody) - - case strings.EqualFold("LimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) - - case strings.EqualFold("RepositoryNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) - case strings.EqualFold("ServerException", errorCode): return awsAwsjson11_deserializeErrorServerException(response, errorBody) - case strings.EqualFold("UploadNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorUploadNotFoundException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -4252,11 +4238,36 @@ func awsAwsjson11_deserializeOpErrorUploadLayerPart(response *smithyhttp.Respons } } -func awsAwsjson11_deserializeErrorEmptyUploadException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +type awsAwsjson11_deserializeOpSetRepositoryPolicy struct { +} + +func (*awsAwsjson11_deserializeOpSetRepositoryPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpSetRepositoryPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorSetRepositoryPolicy(response, &metadata) + } + output := &SetRepositoryPolicyOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -4267,12 +4278,10 @@ func awsAwsjson11_deserializeErrorEmptyUploadException(response *smithyhttp.Resp Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.EmptyUploadException{} - err := awsAwsjson11_deserializeDocumentEmptyUploadException(&output, shape) - + err = awsAwsjson11_deserializeOpDocumentSetRepositoryPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4280,22 +4289,35 @@ func awsAwsjson11_deserializeErrorEmptyUploadException(response *smithyhttp.Resp Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson11_deserializeErrorImageAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeOpErrorSetRepositoryPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -4305,63 +4327,64 @@ func awsAwsjson11_deserializeErrorImageAlreadyExistsException(response *smithyht return err } - output := &types.ImageAlreadyExistsException{} - err := awsAwsjson11_deserializeDocumentImageAlreadyExistsException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message } - errorBody.Seek(0, io.SeekStart) - return output -} + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) -func awsAwsjson11_deserializeErrorImageDigestDoesNotMatchException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + case strings.EqualFold("RepositoryNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + case strings.EqualFold("ServerException", errorCode): + return awsAwsjson11_deserializeErrorServerException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - output := &types.ImageDigestDoesNotMatchException{} - err := awsAwsjson11_deserializeDocumentImageDigestDoesNotMatchException(&output, shape) +type awsAwsjson11_deserializeOpStartImageScan struct { +} + +func (*awsAwsjson11_deserializeOpStartImageScan) ID() string { + return "OperationDeserializer" +} +func (m *awsAwsjson11_deserializeOpStartImageScan) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output -} + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorStartImageScan(response, &metadata) + } + output := &StartImageScanOutput{} + out.Result = output -func awsAwsjson11_deserializeErrorImageNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -4372,12 +4395,10 @@ func awsAwsjson11_deserializeErrorImageNotFoundException(response *smithyhttp.Re Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.ImageNotFoundException{} - err := awsAwsjson11_deserializeDocumentImageNotFoundException(&output, shape) - + err = awsAwsjson11_deserializeOpDocumentStartImageScanOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4385,34 +4406,34 @@ func awsAwsjson11_deserializeErrorImageNotFoundException(response *smithyhttp.Re Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson11_deserializeErrorImageTagAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeOpErrorStartImageScan(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - output := &types.ImageTagAlreadyExistsException{} - err := awsAwsjson11_deserializeDocumentImageTagAlreadyExistsException(&output, shape) - + code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4424,49 +4445,75 @@ func awsAwsjson11_deserializeErrorImageTagAlreadyExistsException(response *smith } errorBody.Seek(0, io.SeekStart) - return output -} + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } -func awsAwsjson11_deserializeErrorInvalidLayerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + switch { + case strings.EqualFold("ImageNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorImageNotFoundException(response, errorBody) - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("RepositoryNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) + + case strings.EqualFold("ServerException", errorCode): + return awsAwsjson11_deserializeErrorServerException(response, errorBody) + + case strings.EqualFold("UnsupportedImageTypeException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedImageTypeException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - output := &types.InvalidLayerException{} - err := awsAwsjson11_deserializeDocumentInvalidLayerException(&output, shape) +type awsAwsjson11_deserializeOpStartLifecyclePolicyPreview struct { +} + +func (*awsAwsjson11_deserializeOpStartLifecyclePolicyPreview) ID() string { + return "OperationDeserializer" +} +func (m *awsAwsjson11_deserializeOpStartLifecyclePolicyPreview) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output -} + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorStartLifecyclePolicyPreview(response, &metadata) + } + output := &StartLifecyclePolicyPreviewOutput{} + out.Result = output -func awsAwsjson11_deserializeErrorInvalidLayerPartException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -4477,12 +4524,10 @@ func awsAwsjson11_deserializeErrorInvalidLayerPartException(response *smithyhttp Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.InvalidLayerPartException{} - err := awsAwsjson11_deserializeDocumentInvalidLayerPartException(&output, shape) - + err = awsAwsjson11_deserializeOpDocumentStartLifecyclePolicyPreviewOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4490,34 +4535,34 @@ func awsAwsjson11_deserializeErrorInvalidLayerPartException(response *smithyhttp Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson11_deserializeErrorInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeOpErrorStartLifecyclePolicyPreview(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - output := &types.InvalidParameterException{} - err := awsAwsjson11_deserializeDocumentInvalidParameterException(&output, shape) - + code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4529,84 +4574,69 @@ func awsAwsjson11_deserializeErrorInvalidParameterException(response *smithyhttp } errorBody.Seek(0, io.SeekStart) - return output -} + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } -func awsAwsjson11_deserializeErrorInvalidTagParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } + case strings.EqualFold("LifecyclePolicyNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorLifecyclePolicyNotFoundException(response, errorBody) - output := &types.InvalidTagParameterException{} - err := awsAwsjson11_deserializeDocumentInvalidTagParameterException(&output, shape) + case strings.EqualFold("LifecyclePolicyPreviewInProgressException", errorCode): + return awsAwsjson11_deserializeErrorLifecyclePolicyPreviewInProgressException(response, errorBody) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + case strings.EqualFold("RepositoryNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) + + case strings.EqualFold("ServerException", errorCode): + return awsAwsjson11_deserializeErrorServerException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - errorBody.Seek(0, io.SeekStart) - return output +type awsAwsjson11_deserializeOpTagResource struct { } -func awsAwsjson11_deserializeErrorKmsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) +func (*awsAwsjson11_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err +func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err } - output := &types.KmsException{} - err := awsAwsjson11_deserializeDocumentKmsException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } - errorBody.Seek(0, io.SeekStart) - return output -} + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorTagResource(response, &metadata) + } + output := &TagResourceOutput{} + out.Result = output -func awsAwsjson11_deserializeErrorLayerAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -4617,12 +4647,10 @@ func awsAwsjson11_deserializeErrorLayerAlreadyExistsException(response *smithyht Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.LayerAlreadyExistsException{} - err := awsAwsjson11_deserializeDocumentLayerAlreadyExistsException(&output, shape) - + err = awsAwsjson11_deserializeOpDocumentTagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4630,34 +4658,34 @@ func awsAwsjson11_deserializeErrorLayerAlreadyExistsException(response *smithyht Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson11_deserializeErrorLayerInaccessibleException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - output := &types.LayerInaccessibleException{} - err := awsAwsjson11_deserializeDocumentLayerInaccessibleException(&output, shape) - + code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4669,49 +4697,69 @@ func awsAwsjson11_deserializeErrorLayerInaccessibleException(response *smithyhtt } errorBody.Seek(0, io.SeekStart) - return output -} + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } -func awsAwsjson11_deserializeErrorLayerPartTooSmallException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + case strings.EqualFold("InvalidTagParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidTagParameterException(response, errorBody) + + case strings.EqualFold("RepositoryNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) + + case strings.EqualFold("ServerException", errorCode): + return awsAwsjson11_deserializeErrorServerException(response, errorBody) + + case strings.EqualFold("TooManyTagsException", errorCode): + return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - output := &types.LayerPartTooSmallException{} - err := awsAwsjson11_deserializeDocumentLayerPartTooSmallException(&output, shape) +type awsAwsjson11_deserializeOpUntagResource struct { +} + +func (*awsAwsjson11_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} +func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output -} + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUntagResource(response, &metadata) + } + output := &UntagResourceOutput{} + out.Result = output -func awsAwsjson11_deserializeErrorLayersNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -4722,12 +4770,10 @@ func awsAwsjson11_deserializeErrorLayersNotFoundException(response *smithyhttp.R Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.LayersNotFoundException{} - err := awsAwsjson11_deserializeDocumentLayersNotFoundException(&output, shape) - + err = awsAwsjson11_deserializeOpDocumentUntagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4735,22 +4781,35 @@ func awsAwsjson11_deserializeErrorLayersNotFoundException(response *smithyhttp.R Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson11_deserializeErrorLifecyclePolicyNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -4760,9 +4819,119 @@ func awsAwsjson11_deserializeErrorLifecyclePolicyNotFoundException(response *smi return err } - output := &types.LifecyclePolicyNotFoundException{} - err := awsAwsjson11_deserializeDocumentLifecyclePolicyNotFoundException(&output, shape) + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidTagParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidTagParameterException(response, errorBody) + + case strings.EqualFold("RepositoryNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) + + case strings.EqualFold("ServerException", errorCode): + return awsAwsjson11_deserializeErrorServerException(response, errorBody) + + case strings.EqualFold("TooManyTagsException", errorCode): + return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUploadLayerPart struct { +} + +func (*awsAwsjson11_deserializeOpUploadLayerPart) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUploadLayerPart) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUploadLayerPart(response, &metadata) + } + output := &UploadLayerPartOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUploadLayerPartOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUploadLayerPart(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4774,10 +4943,46 @@ func awsAwsjson11_deserializeErrorLifecyclePolicyNotFoundException(response *smi } errorBody.Seek(0, io.SeekStart) - return output + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidLayerPartException", errorCode): + return awsAwsjson11_deserializeErrorInvalidLayerPartException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("KmsException", errorCode): + return awsAwsjson11_deserializeErrorKmsException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("RepositoryNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorRepositoryNotFoundException(response, errorBody) + + case strings.EqualFold("ServerException", errorCode): + return awsAwsjson11_deserializeErrorServerException(response, errorBody) + + case strings.EqualFold("UploadNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorUploadNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } } -func awsAwsjson11_deserializeErrorLifecyclePolicyPreviewInProgressException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorEmptyUploadException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4795,8 +5000,8 @@ func awsAwsjson11_deserializeErrorLifecyclePolicyPreviewInProgressException(resp return err } - output := &types.LifecyclePolicyPreviewInProgressException{} - err := awsAwsjson11_deserializeDocumentLifecyclePolicyPreviewInProgressException(&output, shape) + output := &types.EmptyUploadException{} + err := awsAwsjson11_deserializeDocumentEmptyUploadException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4812,7 +5017,7 @@ func awsAwsjson11_deserializeErrorLifecyclePolicyPreviewInProgressException(resp return output } -func awsAwsjson11_deserializeErrorLifecyclePolicyPreviewNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorImageAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4830,8 +5035,8 @@ func awsAwsjson11_deserializeErrorLifecyclePolicyPreviewNotFoundException(respon return err } - output := &types.LifecyclePolicyPreviewNotFoundException{} - err := awsAwsjson11_deserializeDocumentLifecyclePolicyPreviewNotFoundException(&output, shape) + output := &types.ImageAlreadyExistsException{} + err := awsAwsjson11_deserializeDocumentImageAlreadyExistsException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4847,7 +5052,7 @@ func awsAwsjson11_deserializeErrorLifecyclePolicyPreviewNotFoundException(respon return output } -func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorImageDigestDoesNotMatchException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4865,8 +5070,8 @@ func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Re return err } - output := &types.LimitExceededException{} - err := awsAwsjson11_deserializeDocumentLimitExceededException(&output, shape) + output := &types.ImageDigestDoesNotMatchException{} + err := awsAwsjson11_deserializeDocumentImageDigestDoesNotMatchException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4882,7 +5087,7 @@ func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Re return output } -func awsAwsjson11_deserializeErrorReferencedImagesNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorImageNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4900,8 +5105,8 @@ func awsAwsjson11_deserializeErrorReferencedImagesNotFoundException(response *sm return err } - output := &types.ReferencedImagesNotFoundException{} - err := awsAwsjson11_deserializeDocumentReferencedImagesNotFoundException(&output, shape) + output := &types.ImageNotFoundException{} + err := awsAwsjson11_deserializeDocumentImageNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4917,7 +5122,7 @@ func awsAwsjson11_deserializeErrorReferencedImagesNotFoundException(response *sm return output } -func awsAwsjson11_deserializeErrorRegistryPolicyNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorImageTagAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4935,8 +5140,8 @@ func awsAwsjson11_deserializeErrorRegistryPolicyNotFoundException(response *smit return err } - output := &types.RegistryPolicyNotFoundException{} - err := awsAwsjson11_deserializeDocumentRegistryPolicyNotFoundException(&output, shape) + output := &types.ImageTagAlreadyExistsException{} + err := awsAwsjson11_deserializeDocumentImageTagAlreadyExistsException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4952,7 +5157,7 @@ func awsAwsjson11_deserializeErrorRegistryPolicyNotFoundException(response *smit return output } -func awsAwsjson11_deserializeErrorRepositoryAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidLayerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4970,8 +5175,8 @@ func awsAwsjson11_deserializeErrorRepositoryAlreadyExistsException(response *smi return err } - output := &types.RepositoryAlreadyExistsException{} - err := awsAwsjson11_deserializeDocumentRepositoryAlreadyExistsException(&output, shape) + output := &types.InvalidLayerException{} + err := awsAwsjson11_deserializeDocumentInvalidLayerException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4987,7 +5192,7 @@ func awsAwsjson11_deserializeErrorRepositoryAlreadyExistsException(response *smi return output } -func awsAwsjson11_deserializeErrorRepositoryNotEmptyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidLayerPartException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5005,8 +5210,8 @@ func awsAwsjson11_deserializeErrorRepositoryNotEmptyException(response *smithyht return err } - output := &types.RepositoryNotEmptyException{} - err := awsAwsjson11_deserializeDocumentRepositoryNotEmptyException(&output, shape) + output := &types.InvalidLayerPartException{} + err := awsAwsjson11_deserializeDocumentInvalidLayerPartException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5022,7 +5227,7 @@ func awsAwsjson11_deserializeErrorRepositoryNotEmptyException(response *smithyht return output } -func awsAwsjson11_deserializeErrorRepositoryNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5040,8 +5245,8 @@ func awsAwsjson11_deserializeErrorRepositoryNotFoundException(response *smithyht return err } - output := &types.RepositoryNotFoundException{} - err := awsAwsjson11_deserializeDocumentRepositoryNotFoundException(&output, shape) + output := &types.InvalidParameterException{} + err := awsAwsjson11_deserializeDocumentInvalidParameterException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5057,7 +5262,7 @@ func awsAwsjson11_deserializeErrorRepositoryNotFoundException(response *smithyht return output } -func awsAwsjson11_deserializeErrorRepositoryPolicyNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidTagParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5075,8 +5280,8 @@ func awsAwsjson11_deserializeErrorRepositoryPolicyNotFoundException(response *sm return err } - output := &types.RepositoryPolicyNotFoundException{} - err := awsAwsjson11_deserializeDocumentRepositoryPolicyNotFoundException(&output, shape) + output := &types.InvalidTagParameterException{} + err := awsAwsjson11_deserializeDocumentInvalidTagParameterException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5092,7 +5297,7 @@ func awsAwsjson11_deserializeErrorRepositoryPolicyNotFoundException(response *sm return output } -func awsAwsjson11_deserializeErrorScanNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorKmsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5110,8 +5315,8 @@ func awsAwsjson11_deserializeErrorScanNotFoundException(response *smithyhttp.Res return err } - output := &types.ScanNotFoundException{} - err := awsAwsjson11_deserializeDocumentScanNotFoundException(&output, shape) + output := &types.KmsException{} + err := awsAwsjson11_deserializeDocumentKmsException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5127,7 +5332,7 @@ func awsAwsjson11_deserializeErrorScanNotFoundException(response *smithyhttp.Res return output } -func awsAwsjson11_deserializeErrorServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorLayerAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5145,8 +5350,8 @@ func awsAwsjson11_deserializeErrorServerException(response *smithyhttp.Response, return err } - output := &types.ServerException{} - err := awsAwsjson11_deserializeDocumentServerException(&output, shape) + output := &types.LayerAlreadyExistsException{} + err := awsAwsjson11_deserializeDocumentLayerAlreadyExistsException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5162,7 +5367,7 @@ func awsAwsjson11_deserializeErrorServerException(response *smithyhttp.Response, return output } -func awsAwsjson11_deserializeErrorTooManyTagsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorLayerInaccessibleException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5180,8 +5385,8 @@ func awsAwsjson11_deserializeErrorTooManyTagsException(response *smithyhttp.Resp return err } - output := &types.TooManyTagsException{} - err := awsAwsjson11_deserializeDocumentTooManyTagsException(&output, shape) + output := &types.LayerInaccessibleException{} + err := awsAwsjson11_deserializeDocumentLayerInaccessibleException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5197,7 +5402,7 @@ func awsAwsjson11_deserializeErrorTooManyTagsException(response *smithyhttp.Resp return output } -func awsAwsjson11_deserializeErrorUnsupportedImageTypeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorLayerPartTooSmallException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5215,8 +5420,8 @@ func awsAwsjson11_deserializeErrorUnsupportedImageTypeException(response *smithy return err } - output := &types.UnsupportedImageTypeException{} - err := awsAwsjson11_deserializeDocumentUnsupportedImageTypeException(&output, shape) + output := &types.LayerPartTooSmallException{} + err := awsAwsjson11_deserializeDocumentLayerPartTooSmallException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5232,7 +5437,7 @@ func awsAwsjson11_deserializeErrorUnsupportedImageTypeException(response *smithy return output } -func awsAwsjson11_deserializeErrorUploadNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorLayersNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5250,8 +5455,8 @@ func awsAwsjson11_deserializeErrorUploadNotFoundException(response *smithyhttp.R return err } - output := &types.UploadNotFoundException{} - err := awsAwsjson11_deserializeDocumentUploadNotFoundException(&output, shape) + output := &types.LayersNotFoundException{} + err := awsAwsjson11_deserializeDocumentLayersNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5267,7 +5472,7 @@ func awsAwsjson11_deserializeErrorUploadNotFoundException(response *smithyhttp.R return output } -func awsAwsjson11_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorLifecyclePolicyNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5285,24 +5490,2259 @@ func awsAwsjson11_deserializeErrorValidationException(response *smithyhttp.Respo return err } - output := &types.ValidationException{} - err := awsAwsjson11_deserializeDocumentValidationException(&output, shape) + output := &types.LifecyclePolicyNotFoundException{} + err := awsAwsjson11_deserializeDocumentLifecyclePolicyNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorLifecyclePolicyPreviewInProgressException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.LifecyclePolicyPreviewInProgressException{} + err := awsAwsjson11_deserializeDocumentLifecyclePolicyPreviewInProgressException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorLifecyclePolicyPreviewNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.LifecyclePolicyPreviewNotFoundException{} + err := awsAwsjson11_deserializeDocumentLifecyclePolicyPreviewNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.LimitExceededException{} + err := awsAwsjson11_deserializeDocumentLimitExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorPullThroughCacheRuleAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.PullThroughCacheRuleAlreadyExistsException{} + err := awsAwsjson11_deserializeDocumentPullThroughCacheRuleAlreadyExistsException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorPullThroughCacheRuleNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.PullThroughCacheRuleNotFoundException{} + err := awsAwsjson11_deserializeDocumentPullThroughCacheRuleNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorReferencedImagesNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ReferencedImagesNotFoundException{} + err := awsAwsjson11_deserializeDocumentReferencedImagesNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorRegistryPolicyNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.RegistryPolicyNotFoundException{} + err := awsAwsjson11_deserializeDocumentRegistryPolicyNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorRepositoryAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.RepositoryAlreadyExistsException{} + err := awsAwsjson11_deserializeDocumentRepositoryAlreadyExistsException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorRepositoryNotEmptyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.RepositoryNotEmptyException{} + err := awsAwsjson11_deserializeDocumentRepositoryNotEmptyException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorRepositoryNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.RepositoryNotFoundException{} + err := awsAwsjson11_deserializeDocumentRepositoryNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorRepositoryPolicyNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.RepositoryPolicyNotFoundException{} + err := awsAwsjson11_deserializeDocumentRepositoryPolicyNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorScanNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ScanNotFoundException{} + err := awsAwsjson11_deserializeDocumentScanNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ServerException{} + err := awsAwsjson11_deserializeDocumentServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorTooManyTagsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.TooManyTagsException{} + err := awsAwsjson11_deserializeDocumentTooManyTagsException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorUnsupportedImageTypeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.UnsupportedImageTypeException{} + err := awsAwsjson11_deserializeDocumentUnsupportedImageTypeException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorUnsupportedUpstreamRegistryException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.UnsupportedUpstreamRegistryException{} + err := awsAwsjson11_deserializeDocumentUnsupportedUpstreamRegistryException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorUploadNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.UploadNotFoundException{} + err := awsAwsjson11_deserializeDocumentUploadNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ValidationException{} + err := awsAwsjson11_deserializeDocumentValidationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeDocumentAttribute(v **types.Attribute, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Attribute + if *v == nil { + sv = &types.Attribute{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttributeKey to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + case "value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttributeValue to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAttributeList(v *[]types.Attribute, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Attribute + if *v == nil { + cv = []types.Attribute{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Attribute + destAddr := &col + if err := awsAwsjson11_deserializeDocumentAttribute(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentAuthorizationData(v **types.AuthorizationData, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AuthorizationData + if *v == nil { + sv = &types.AuthorizationData{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "authorizationToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Base64 to be of type string, got %T instead", value) + } + sv.AuthorizationToken = ptr.String(jtv) + } + + case "expiresAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExpiresAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected ExpirationTimestamp to be a JSON Number, got %T instead", value) + + } + } + + case "proxyEndpoint": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProxyEndpoint to be of type string, got %T instead", value) + } + sv.ProxyEndpoint = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAuthorizationDataList(v *[]types.AuthorizationData, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.AuthorizationData + if *v == nil { + cv = []types.AuthorizationData{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AuthorizationData + destAddr := &col + if err := awsAwsjson11_deserializeDocumentAuthorizationData(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentAwsEcrContainerImageDetails(v **types.AwsEcrContainerImageDetails, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AwsEcrContainerImageDetails + if *v == nil { + sv = &types.AwsEcrContainerImageDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "architecture": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arch to be of type string, got %T instead", value) + } + sv.Architecture = ptr.String(jtv) + } + + case "author": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Author to be of type string, got %T instead", value) + } + sv.Author = ptr.String(jtv) + } + + case "imageHash": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImageDigest to be of type string, got %T instead", value) + } + sv.ImageHash = ptr.String(jtv) + } + + case "imageTags": + if err := awsAwsjson11_deserializeDocumentImageTagsList(&sv.ImageTags, value); err != nil { + return err + } + + case "platform": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Platform to be of type string, got %T instead", value) + } + sv.Platform = ptr.String(jtv) + } + + case "pushedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.PushedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "registry": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RegistryId to be of type string, got %T instead", value) + } + sv.Registry = ptr.String(jtv) + } + + case "repositoryName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RepositoryName to be of type string, got %T instead", value) + } + sv.RepositoryName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentCvssScore(v **types.CvssScore, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CvssScore + if *v == nil { + sv = &types.CvssScore{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "baseScore": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.BaseScore = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.BaseScore = f64 + + default: + return fmt.Errorf("expected BaseScore to be a JSON Number, got %T instead", value) + + } + } + + case "scoringVector": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScoringVector to be of type string, got %T instead", value) + } + sv.ScoringVector = ptr.String(jtv) + } + + case "source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Source to be of type string, got %T instead", value) + } + sv.Source = ptr.String(jtv) + } + + case "version": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Version to be of type string, got %T instead", value) + } + sv.Version = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentCvssScoreAdjustment(v **types.CvssScoreAdjustment, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CvssScoreAdjustment + if *v == nil { + sv = &types.CvssScoreAdjustment{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "metric": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Metric to be of type string, got %T instead", value) + } + sv.Metric = ptr.String(jtv) + } + + case "reason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Reason to be of type string, got %T instead", value) + } + sv.Reason = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentCvssScoreAdjustmentList(v *[]types.CvssScoreAdjustment, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.CvssScoreAdjustment + if *v == nil { + cv = []types.CvssScoreAdjustment{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CvssScoreAdjustment + destAddr := &col + if err := awsAwsjson11_deserializeDocumentCvssScoreAdjustment(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentCvssScoreDetails(v **types.CvssScoreDetails, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CvssScoreDetails + if *v == nil { + sv = &types.CvssScoreDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "adjustments": + if err := awsAwsjson11_deserializeDocumentCvssScoreAdjustmentList(&sv.Adjustments, value); err != nil { + return err + } + + case "score": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Score = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Score = f64 + + default: + return fmt.Errorf("expected Score to be a JSON Number, got %T instead", value) + + } + } + + case "scoreSource": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Source to be of type string, got %T instead", value) + } + sv.ScoreSource = ptr.String(jtv) + } + + case "scoringVector": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScoringVector to be of type string, got %T instead", value) + } + sv.ScoringVector = ptr.String(jtv) + } + + case "version": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Version to be of type string, got %T instead", value) + } + sv.Version = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentCvssScoreList(v *[]types.CvssScore, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.CvssScore + if *v == nil { + cv = []types.CvssScore{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CvssScore + destAddr := &col + if err := awsAwsjson11_deserializeDocumentCvssScore(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentEmptyUploadException(v **types.EmptyUploadException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EmptyUploadException + if *v == nil { + sv = &types.EmptyUploadException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentEncryptionConfiguration(v **types.EncryptionConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EncryptionConfiguration + if *v == nil { + sv = &types.EncryptionConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "encryptionType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EncryptionType to be of type string, got %T instead", value) + } + sv.EncryptionType = types.EncryptionType(jtv) + } + + case "kmsKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KmsKey to be of type string, got %T instead", value) + } + sv.KmsKey = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentEnhancedImageScanFinding(v **types.EnhancedImageScanFinding, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EnhancedImageScanFinding + if *v == nil { + sv = &types.EnhancedImageScanFinding{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "awsAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RegistryId to be of type string, got %T instead", value) + } + sv.AwsAccountId = ptr.String(jtv) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FindingDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "findingArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FindingArn to be of type string, got %T instead", value) + } + sv.FindingArn = ptr.String(jtv) + } + + case "firstObservedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.FirstObservedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "lastObservedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastObservedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "packageVulnerabilityDetails": + if err := awsAwsjson11_deserializeDocumentPackageVulnerabilityDetails(&sv.PackageVulnerabilityDetails, value); err != nil { + return err + } + + case "remediation": + if err := awsAwsjson11_deserializeDocumentRemediation(&sv.Remediation, value); err != nil { + return err + } + + case "resources": + if err := awsAwsjson11_deserializeDocumentResourceList(&sv.Resources, value); err != nil { + return err + } + + case "score": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Score = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Score = f64 + + default: + return fmt.Errorf("expected Score to be a JSON Number, got %T instead", value) + + } + } + + case "scoreDetails": + if err := awsAwsjson11_deserializeDocumentScoreDetails(&sv.ScoreDetails, value); err != nil { + return err + } + + case "severity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Severity to be of type string, got %T instead", value) + } + sv.Severity = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Status to be of type string, got %T instead", value) + } + sv.Status = ptr.String(jtv) + } + + case "title": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Title to be of type string, got %T instead", value) + } + sv.Title = ptr.String(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Type to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + case "updatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentEnhancedImageScanFindingList(v *[]types.EnhancedImageScanFinding, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.EnhancedImageScanFinding + if *v == nil { + cv = []types.EnhancedImageScanFinding{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EnhancedImageScanFinding + destAddr := &col + if err := awsAwsjson11_deserializeDocumentEnhancedImageScanFinding(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentFindingSeverityCounts(v *map[string]int32, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]int32 + if *v == nil { + mv = map[string]int32{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal int32 + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected SeverityCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + parsedVal = int32(i64) + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentImage(v **types.Image, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Image + if *v == nil { + sv = &types.Image{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "imageId": + if err := awsAwsjson11_deserializeDocumentImageIdentifier(&sv.ImageId, value); err != nil { + return err + } + + case "imageManifest": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImageManifest to be of type string, got %T instead", value) + } + sv.ImageManifest = ptr.String(jtv) + } + + case "imageManifestMediaType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MediaType to be of type string, got %T instead", value) + } + sv.ImageManifestMediaType = ptr.String(jtv) + } + + case "registryId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RegistryId to be of type string, got %T instead", value) + } + sv.RegistryId = ptr.String(jtv) + } + + case "repositoryName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RepositoryName to be of type string, got %T instead", value) + } + sv.RepositoryName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentImageAlreadyExistsException(v **types.ImageAlreadyExistsException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ImageAlreadyExistsException + if *v == nil { + sv = &types.ImageAlreadyExistsException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentImageDetail(v **types.ImageDetail, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ImageDetail + if *v == nil { + sv = &types.ImageDetail{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "artifactMediaType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MediaType to be of type string, got %T instead", value) + } + sv.ArtifactMediaType = ptr.String(jtv) + } + + case "imageDigest": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImageDigest to be of type string, got %T instead", value) + } + sv.ImageDigest = ptr.String(jtv) + } + + case "imageManifestMediaType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MediaType to be of type string, got %T instead", value) + } + sv.ImageManifestMediaType = ptr.String(jtv) + } + + case "imagePushedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ImagePushedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected PushTimestamp to be a JSON Number, got %T instead", value) + + } + } + + case "imageScanFindingsSummary": + if err := awsAwsjson11_deserializeDocumentImageScanFindingsSummary(&sv.ImageScanFindingsSummary, value); err != nil { + return err + } + + case "imageScanStatus": + if err := awsAwsjson11_deserializeDocumentImageScanStatus(&sv.ImageScanStatus, value); err != nil { + return err + } + + case "imageSizeInBytes": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ImageSizeInBytes to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ImageSizeInBytes = ptr.Int64(i64) + } + + case "imageTags": + if err := awsAwsjson11_deserializeDocumentImageTagList(&sv.ImageTags, value); err != nil { + return err + } + + case "registryId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RegistryId to be of type string, got %T instead", value) + } + sv.RegistryId = ptr.String(jtv) + } + + case "repositoryName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RepositoryName to be of type string, got %T instead", value) + } + sv.RepositoryName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentImageDetailList(v *[]types.ImageDetail, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ImageDetail + if *v == nil { + cv = []types.ImageDetail{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ImageDetail + destAddr := &col + if err := awsAwsjson11_deserializeDocumentImageDetail(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentImageDigestDoesNotMatchException(v **types.ImageDigestDoesNotMatchException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ImageDigestDoesNotMatchException + if *v == nil { + sv = &types.ImageDigestDoesNotMatchException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentImageFailure(v **types.ImageFailure, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ImageFailure + if *v == nil { + sv = &types.ImageFailure{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "failureCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImageFailureCode to be of type string, got %T instead", value) + } + sv.FailureCode = types.ImageFailureCode(jtv) + } + + case "failureReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImageFailureReason to be of type string, got %T instead", value) + } + sv.FailureReason = ptr.String(jtv) + } + + case "imageId": + if err := awsAwsjson11_deserializeDocumentImageIdentifier(&sv.ImageId, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentImageFailureList(v *[]types.ImageFailure, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ImageFailure + if *v == nil { + cv = []types.ImageFailure{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ImageFailure + destAddr := &col + if err := awsAwsjson11_deserializeDocumentImageFailure(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentImageIdentifier(v **types.ImageIdentifier, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ImageIdentifier + if *v == nil { + sv = &types.ImageIdentifier{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "imageDigest": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImageDigest to be of type string, got %T instead", value) + } + sv.ImageDigest = ptr.String(jtv) + } + + case "imageTag": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImageTag to be of type string, got %T instead", value) + } + sv.ImageTag = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentImageIdentifierList(v *[]types.ImageIdentifier, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ImageIdentifier + if *v == nil { + cv = []types.ImageIdentifier{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ImageIdentifier + destAddr := &col + if err := awsAwsjson11_deserializeDocumentImageIdentifier(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentImageList(v *[]types.Image, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Image + if *v == nil { + cv = []types.Image{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Image + destAddr := &col + if err := awsAwsjson11_deserializeDocumentImage(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentImageNotFoundException(v **types.ImageNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ImageNotFoundException + if *v == nil { + sv = &types.ImageNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentImageReplicationStatus(v **types.ImageReplicationStatus, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ImageReplicationStatus + if *v == nil { + sv = &types.ImageReplicationStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "failureCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReplicationError to be of type string, got %T instead", value) + } + sv.FailureCode = ptr.String(jtv) + } + + case "region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Region to be of type string, got %T instead", value) + } + sv.Region = ptr.String(jtv) + } + + case "registryId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RegistryId to be of type string, got %T instead", value) + } + sv.RegistryId = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReplicationStatus to be of type string, got %T instead", value) + } + sv.Status = types.ReplicationStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentImageReplicationStatusList(v *[]types.ImageReplicationStatus, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + var cv []types.ImageReplicationStatus + if *v == nil { + cv = []types.ImageReplicationStatus{} + } else { + cv = *v } - errorBody.Seek(0, io.SeekStart) - return output + for _, value := range shape { + var col types.ImageReplicationStatus + destAddr := &col + if err := awsAwsjson11_deserializeDocumentImageReplicationStatus(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil } -func awsAwsjson11_deserializeDocumentAttribute(v **types.Attribute, value interface{}) error { +func awsAwsjson11_deserializeDocumentImageScanFinding(v **types.ImageScanFinding, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5315,31 +7755,54 @@ func awsAwsjson11_deserializeDocumentAttribute(v **types.Attribute, value interf return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Attribute + var sv *types.ImageScanFinding if *v == nil { - sv = &types.Attribute{} + sv = &types.ImageScanFinding{} } else { sv = *v } for key, value := range shape { switch key { - case "key": + case "attributes": + if err := awsAwsjson11_deserializeDocumentAttributeList(&sv.Attributes, value); err != nil { + return err + } + + case "description": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AttributeKey to be of type string, got %T instead", value) + return fmt.Errorf("expected FindingDescription to be of type string, got %T instead", value) } - sv.Key = ptr.String(jtv) + sv.Description = ptr.String(jtv) } - case "value": + case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AttributeValue to be of type string, got %T instead", value) + return fmt.Errorf("expected FindingName to be of type string, got %T instead", value) } - sv.Value = ptr.String(jtv) + sv.Name = ptr.String(jtv) + } + + case "severity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FindingSeverity to be of type string, got %T instead", value) + } + sv.Severity = types.FindingSeverity(jtv) + } + + case "uri": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Url to be of type string, got %T instead", value) + } + sv.Uri = ptr.String(jtv) } default: @@ -5351,7 +7814,7 @@ func awsAwsjson11_deserializeDocumentAttribute(v **types.Attribute, value interf return nil } -func awsAwsjson11_deserializeDocumentAttributeList(v *[]types.Attribute, value interface{}) error { +func awsAwsjson11_deserializeDocumentImageScanFindingList(v *[]types.ImageScanFinding, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5364,17 +7827,17 @@ func awsAwsjson11_deserializeDocumentAttributeList(v *[]types.Attribute, value i return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.Attribute + var cv []types.ImageScanFinding if *v == nil { - cv = []types.Attribute{} + cv = []types.ImageScanFinding{} } else { cv = *v } for _, value := range shape { - var col types.Attribute + var col types.ImageScanFinding destAddr := &col - if err := awsAwsjson11_deserializeDocumentAttribute(&destAddr, value); err != nil { + if err := awsAwsjson11_deserializeDocumentImageScanFinding(&destAddr, value); err != nil { return err } col = *destAddr @@ -5385,7 +7848,7 @@ func awsAwsjson11_deserializeDocumentAttributeList(v *[]types.Attribute, value i return nil } -func awsAwsjson11_deserializeDocumentAuthorizationData(v **types.AuthorizationData, value interface{}) error { +func awsAwsjson11_deserializeDocumentImageScanFindings(v **types.ImageScanFindings, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5398,25 +7861,31 @@ func awsAwsjson11_deserializeDocumentAuthorizationData(v **types.AuthorizationDa return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AuthorizationData + var sv *types.ImageScanFindings if *v == nil { - sv = &types.AuthorizationData{} + sv = &types.ImageScanFindings{} } else { sv = *v } for key, value := range shape { switch key { - case "authorizationToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Base64 to be of type string, got %T instead", value) - } - sv.AuthorizationToken = ptr.String(jtv) + case "enhancedFindings": + if err := awsAwsjson11_deserializeDocumentEnhancedImageScanFindingList(&sv.EnhancedFindings, value); err != nil { + return err } - case "expiresAt": + case "findings": + if err := awsAwsjson11_deserializeDocumentImageScanFindingList(&sv.Findings, value); err != nil { + return err + } + + case "findingSeverityCounts": + if err := awsAwsjson11_deserializeDocumentFindingSeverityCounts(&sv.FindingSeverityCounts, value); err != nil { + return err + } + + case "imageScanCompletedAt": if value != nil { switch jtv := value.(type) { case json.Number: @@ -5424,21 +7893,28 @@ func awsAwsjson11_deserializeDocumentAuthorizationData(v **types.AuthorizationDa if err != nil { return err } - sv.ExpiresAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + sv.ImageScanCompletedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: - return fmt.Errorf("expected ExpirationTimestamp to be a JSON Number, got %T instead", value) + return fmt.Errorf("expected ScanTimestamp to be a JSON Number, got %T instead", value) } } - case "proxyEndpoint": + case "vulnerabilitySourceUpdatedAt": if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ProxyEndpoint to be of type string, got %T instead", value) + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.VulnerabilitySourceUpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected VulnerabilitySourceUpdateTimestamp to be a JSON Number, got %T instead", value) + } - sv.ProxyEndpoint = ptr.String(jtv) } default: @@ -5450,7 +7926,7 @@ func awsAwsjson11_deserializeDocumentAuthorizationData(v **types.AuthorizationDa return nil } -func awsAwsjson11_deserializeDocumentAuthorizationDataList(v *[]types.AuthorizationData, value interface{}) error { +func awsAwsjson11_deserializeDocumentImageScanFindingsSummary(v **types.ImageScanFindingsSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5458,33 +7934,67 @@ func awsAwsjson11_deserializeDocumentAuthorizationDataList(v *[]types.Authorizat return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.AuthorizationData + var sv *types.ImageScanFindingsSummary if *v == nil { - cv = []types.AuthorizationData{} + sv = &types.ImageScanFindingsSummary{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.AuthorizationData - destAddr := &col - if err := awsAwsjson11_deserializeDocumentAuthorizationData(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "findingSeverityCounts": + if err := awsAwsjson11_deserializeDocumentFindingSeverityCounts(&sv.FindingSeverityCounts, value); err != nil { + return err + } + + case "imageScanCompletedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ImageScanCompletedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected ScanTimestamp to be a JSON Number, got %T instead", value) + + } + } + + case "vulnerabilitySourceUpdatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.VulnerabilitySourceUpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected VulnerabilitySourceUpdateTimestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentEmptyUploadException(v **types.EmptyUploadException, value interface{}) error { +func awsAwsjson11_deserializeDocumentImageScanningConfiguration(v **types.ImageScanningConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5497,22 +8007,22 @@ func awsAwsjson11_deserializeDocumentEmptyUploadException(v **types.EmptyUploadE return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EmptyUploadException + var sv *types.ImageScanningConfiguration if *v == nil { - sv = &types.EmptyUploadException{} + sv = &types.ImageScanningConfiguration{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "scanOnPush": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected ScanOnPushFlag to be of type *bool, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.ScanOnPush = jtv } default: @@ -5524,7 +8034,7 @@ func awsAwsjson11_deserializeDocumentEmptyUploadException(v **types.EmptyUploadE return nil } -func awsAwsjson11_deserializeDocumentEncryptionConfiguration(v **types.EncryptionConfiguration, value interface{}) error { +func awsAwsjson11_deserializeDocumentImageScanStatus(v **types.ImageScanStatus, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5537,31 +8047,71 @@ func awsAwsjson11_deserializeDocumentEncryptionConfiguration(v **types.Encryptio return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EncryptionConfiguration + var sv *types.ImageScanStatus if *v == nil { - sv = &types.EncryptionConfiguration{} + sv = &types.ImageScanStatus{} } else { sv = *v } for key, value := range shape { switch key { - case "encryptionType": + case "description": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EncryptionType to be of type string, got %T instead", value) + return fmt.Errorf("expected ScanStatusDescription to be of type string, got %T instead", value) } - sv.EncryptionType = types.EncryptionType(jtv) + sv.Description = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScanStatus to be of type string, got %T instead", value) + } + sv.Status = types.ScanStatus(jtv) } - case "kmsKey": + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentImageTagAlreadyExistsException(v **types.ImageTagAlreadyExistsException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ImageTagAlreadyExistsException + if *v == nil { + sv = &types.ImageTagAlreadyExistsException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected KmsKey to be of type string, got %T instead", value) + return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) } - sv.KmsKey = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -5573,7 +8123,7 @@ func awsAwsjson11_deserializeDocumentEncryptionConfiguration(v **types.Encryptio return nil } -func awsAwsjson11_deserializeDocumentFindingSeverityCounts(v *map[string]int32, value interface{}) error { +func awsAwsjson11_deserializeDocumentImageTagList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5581,39 +8131,35 @@ func awsAwsjson11_deserializeDocumentFindingSeverityCounts(v *map[string]int32, return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var mv map[string]int32 + var cv []string if *v == nil { - mv = map[string]int32{} + cv = []string{} } else { - mv = *v + cv = *v } - for key, value := range shape { - var parsedVal int32 + for _, value := range shape { + var col string if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SeverityCount to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected ImageTag to be of type string, got %T instead", value) } - parsedVal = int32(i64) + col = jtv } - mv[key] = parsedVal + cv = append(cv, col) } - *v = mv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentImage(v **types.Image, value interface{}) error { +func awsAwsjson11_deserializeDocumentImageTagsList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5621,71 +8167,35 @@ func awsAwsjson11_deserializeDocumentImage(v **types.Image, value interface{}) e return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Image + var cv []string if *v == nil { - sv = &types.Image{} + cv = []string{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "imageId": - if err := awsAwsjson11_deserializeDocumentImageIdentifier(&sv.ImageId, value); err != nil { - return err - } - - case "imageManifest": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ImageManifest to be of type string, got %T instead", value) - } - sv.ImageManifest = ptr.String(jtv) - } - - case "imageManifestMediaType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MediaType to be of type string, got %T instead", value) - } - sv.ImageManifestMediaType = ptr.String(jtv) - } - - case "registryId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RegistryId to be of type string, got %T instead", value) - } - sv.RegistryId = ptr.String(jtv) - } - - case "repositoryName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RepositoryName to be of type string, got %T instead", value) - } - sv.RepositoryName = ptr.String(jtv) + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImageTag to be of type string, got %T instead", value) } - - default: - _, _ = key, value - + col = jtv } + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentImageAlreadyExistsException(v **types.ImageAlreadyExistsException, value interface{}) error { +func awsAwsjson11_deserializeDocumentInvalidLayerException(v **types.InvalidLayerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5698,9 +8208,9 @@ func awsAwsjson11_deserializeDocumentImageAlreadyExistsException(v **types.Image return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ImageAlreadyExistsException + var sv *types.InvalidLayerException if *v == nil { - sv = &types.ImageAlreadyExistsException{} + sv = &types.InvalidLayerException{} } else { sv = *v } @@ -5725,7 +8235,7 @@ func awsAwsjson11_deserializeDocumentImageAlreadyExistsException(v **types.Image return nil } -func awsAwsjson11_deserializeDocumentImageDetail(v **types.ImageDetail, value interface{}) error { +func awsAwsjson11_deserializeDocumentInvalidLayerPartException(v **types.InvalidLayerPartException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5738,84 +8248,35 @@ func awsAwsjson11_deserializeDocumentImageDetail(v **types.ImageDetail, value in return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ImageDetail + var sv *types.InvalidLayerPartException if *v == nil { - sv = &types.ImageDetail{} + sv = &types.InvalidLayerPartException{} } else { sv = *v } for key, value := range shape { switch key { - case "artifactMediaType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MediaType to be of type string, got %T instead", value) - } - sv.ArtifactMediaType = ptr.String(jtv) - } - - case "imageDigest": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ImageDigest to be of type string, got %T instead", value) - } - sv.ImageDigest = ptr.String(jtv) - } - - case "imageManifestMediaType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MediaType to be of type string, got %T instead", value) - } - sv.ImageManifestMediaType = ptr.String(jtv) - } - - case "imagePushedAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.ImagePushedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected PushTimestamp to be a JSON Number, got %T instead", value) - - } - } - - case "imageScanFindingsSummary": - if err := awsAwsjson11_deserializeDocumentImageScanFindingsSummary(&sv.ImageScanFindingsSummary, value); err != nil { - return err - } - - case "imageScanStatus": - if err := awsAwsjson11_deserializeDocumentImageScanStatus(&sv.ImageScanStatus, value); err != nil { - return err - } - - case "imageSizeInBytes": + case "lastValidByteReceived": if value != nil { jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected ImageSizeInBytes to be json.Number, got %T instead", value) + return fmt.Errorf("expected PartSize to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } - sv.ImageSizeInBytes = ptr.Int64(i64) + sv.LastValidByteReceived = ptr.Int64(i64) } - case "imageTags": - if err := awsAwsjson11_deserializeDocumentImageTagList(&sv.ImageTags, value); err != nil { - return err + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) } case "registryId": @@ -5836,78 +8297,13 @@ func awsAwsjson11_deserializeDocumentImageDetail(v **types.ImageDetail, value in sv.RepositoryName = ptr.String(jtv) } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentImageDetailList(v *[]types.ImageDetail, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.ImageDetail - if *v == nil { - cv = []types.ImageDetail{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.ImageDetail - destAddr := &col - if err := awsAwsjson11_deserializeDocumentImageDetail(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson11_deserializeDocumentImageDigestDoesNotMatchException(v **types.ImageDigestDoesNotMatchException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ImageDigestDoesNotMatchException - if *v == nil { - sv = &types.ImageDigestDoesNotMatchException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "message": + case "uploadId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected UploadId to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.UploadId = ptr.String(jtv) } default: @@ -5919,7 +8315,7 @@ func awsAwsjson11_deserializeDocumentImageDigestDoesNotMatchException(v **types. return nil } -func awsAwsjson11_deserializeDocumentImageFailure(v **types.ImageFailure, value interface{}) error { +func awsAwsjson11_deserializeDocumentInvalidParameterException(v **types.InvalidParameterException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5932,36 +8328,22 @@ func awsAwsjson11_deserializeDocumentImageFailure(v **types.ImageFailure, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ImageFailure + var sv *types.InvalidParameterException if *v == nil { - sv = &types.ImageFailure{} + sv = &types.InvalidParameterException{} } else { sv = *v } for key, value := range shape { switch key { - case "failureCode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ImageFailureCode to be of type string, got %T instead", value) - } - sv.FailureCode = types.ImageFailureCode(jtv) - } - - case "failureReason": + case "message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ImageFailureReason to be of type string, got %T instead", value) + return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) } - sv.FailureReason = ptr.String(jtv) - } - - case "imageId": - if err := awsAwsjson11_deserializeDocumentImageIdentifier(&sv.ImageId, value); err != nil { - return err + sv.Message = ptr.String(jtv) } default: @@ -5973,7 +8355,7 @@ func awsAwsjson11_deserializeDocumentImageFailure(v **types.ImageFailure, value return nil } -func awsAwsjson11_deserializeDocumentImageFailureList(v *[]types.ImageFailure, value interface{}) error { +func awsAwsjson11_deserializeDocumentInvalidTagParameterException(v **types.InvalidTagParameterException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5981,33 +8363,39 @@ func awsAwsjson11_deserializeDocumentImageFailureList(v *[]types.ImageFailure, v return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ImageFailure + var sv *types.InvalidTagParameterException if *v == nil { - cv = []types.ImageFailure{} + sv = &types.InvalidTagParameterException{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.ImageFailure - destAddr := &col - if err := awsAwsjson11_deserializeDocumentImageFailure(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentImageIdentifier(v **types.ImageIdentifier, value interface{}) error { +func awsAwsjson11_deserializeDocumentKmsException(v **types.KmsException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6020,31 +8408,31 @@ func awsAwsjson11_deserializeDocumentImageIdentifier(v **types.ImageIdentifier, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ImageIdentifier + var sv *types.KmsException if *v == nil { - sv = &types.ImageIdentifier{} + sv = &types.KmsException{} } else { sv = *v } for key, value := range shape { switch key { - case "imageDigest": + case "kmsError": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ImageDigest to be of type string, got %T instead", value) + return fmt.Errorf("expected KmsError to be of type string, got %T instead", value) } - sv.ImageDigest = ptr.String(jtv) + sv.KmsError = ptr.String(jtv) } - case "imageTag": + case "message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ImageTag to be of type string, got %T instead", value) + return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) } - sv.ImageTag = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -6056,7 +8444,7 @@ func awsAwsjson11_deserializeDocumentImageIdentifier(v **types.ImageIdentifier, return nil } -func awsAwsjson11_deserializeDocumentImageIdentifierList(v *[]types.ImageIdentifier, value interface{}) error { +func awsAwsjson11_deserializeDocumentLayer(v **types.Layer, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6064,67 +8452,70 @@ func awsAwsjson11_deserializeDocumentImageIdentifierList(v *[]types.ImageIdentif return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ImageIdentifier + var sv *types.Layer if *v == nil { - cv = []types.ImageIdentifier{} + sv = &types.Layer{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.ImageIdentifier - destAddr := &col - if err := awsAwsjson11_deserializeDocumentImageIdentifier(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "layerAvailability": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LayerAvailability to be of type string, got %T instead", value) + } + sv.LayerAvailability = types.LayerAvailability(jtv) + } - } - *v = cv - return nil -} + case "layerDigest": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LayerDigest to be of type string, got %T instead", value) + } + sv.LayerDigest = ptr.String(jtv) + } -func awsAwsjson11_deserializeDocumentImageList(v *[]types.Image, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } + case "layerSize": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected LayerSizeInBytes to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LayerSize = ptr.Int64(i64) + } - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + case "mediaType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MediaType to be of type string, got %T instead", value) + } + sv.MediaType = ptr.String(jtv) + } - var cv []types.Image - if *v == nil { - cv = []types.Image{} - } else { - cv = *v - } + default: + _, _ = key, value - for _, value := range shape { - var col types.Image - destAddr := &col - if err := awsAwsjson11_deserializeDocumentImage(&destAddr, value); err != nil { - return err } - col = *destAddr - cv = append(cv, col) - } - *v = cv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentImageNotFoundException(v **types.ImageNotFoundException, value interface{}) error { +func awsAwsjson11_deserializeDocumentLayerAlreadyExistsException(v **types.LayerAlreadyExistsException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6137,9 +8528,9 @@ func awsAwsjson11_deserializeDocumentImageNotFoundException(v **types.ImageNotFo return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ImageNotFoundException + var sv *types.LayerAlreadyExistsException if *v == nil { - sv = &types.ImageNotFoundException{} + sv = &types.LayerAlreadyExistsException{} } else { sv = *v } @@ -6164,7 +8555,7 @@ func awsAwsjson11_deserializeDocumentImageNotFoundException(v **types.ImageNotFo return nil } -func awsAwsjson11_deserializeDocumentImageReplicationStatus(v **types.ImageReplicationStatus, value interface{}) error { +func awsAwsjson11_deserializeDocumentLayerFailure(v **types.LayerFailure, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6177,9 +8568,9 @@ func awsAwsjson11_deserializeDocumentImageReplicationStatus(v **types.ImageRepli return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ImageReplicationStatus + var sv *types.LayerFailure if *v == nil { - sv = &types.ImageReplicationStatus{} + sv = &types.LayerFailure{} } else { sv = *v } @@ -6190,36 +8581,27 @@ func awsAwsjson11_deserializeDocumentImageReplicationStatus(v **types.ImageRepli if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ReplicationError to be of type string, got %T instead", value) - } - sv.FailureCode = ptr.String(jtv) - } - - case "region": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Region to be of type string, got %T instead", value) + return fmt.Errorf("expected LayerFailureCode to be of type string, got %T instead", value) } - sv.Region = ptr.String(jtv) + sv.FailureCode = types.LayerFailureCode(jtv) } - case "registryId": + case "failureReason": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RegistryId to be of type string, got %T instead", value) + return fmt.Errorf("expected LayerFailureReason to be of type string, got %T instead", value) } - sv.RegistryId = ptr.String(jtv) + sv.FailureReason = ptr.String(jtv) } - case "status": + case "layerDigest": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ReplicationStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected BatchedOperationLayerDigest to be of type string, got %T instead", value) } - sv.Status = types.ReplicationStatus(jtv) + sv.LayerDigest = ptr.String(jtv) } default: @@ -6231,7 +8613,7 @@ func awsAwsjson11_deserializeDocumentImageReplicationStatus(v **types.ImageRepli return nil } -func awsAwsjson11_deserializeDocumentImageReplicationStatusList(v *[]types.ImageReplicationStatus, value interface{}) error { +func awsAwsjson11_deserializeDocumentLayerFailureList(v *[]types.LayerFailure, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6244,17 +8626,17 @@ func awsAwsjson11_deserializeDocumentImageReplicationStatusList(v *[]types.Image return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ImageReplicationStatus + var cv []types.LayerFailure if *v == nil { - cv = []types.ImageReplicationStatus{} + cv = []types.LayerFailure{} } else { cv = *v } for _, value := range shape { - var col types.ImageReplicationStatus + var col types.LayerFailure destAddr := &col - if err := awsAwsjson11_deserializeDocumentImageReplicationStatus(&destAddr, value); err != nil { + if err := awsAwsjson11_deserializeDocumentLayerFailure(&destAddr, value); err != nil { return err } col = *destAddr @@ -6265,7 +8647,7 @@ func awsAwsjson11_deserializeDocumentImageReplicationStatusList(v *[]types.Image return nil } -func awsAwsjson11_deserializeDocumentImageScanFinding(v **types.ImageScanFinding, value interface{}) error { +func awsAwsjson11_deserializeDocumentLayerInaccessibleException(v **types.LayerInaccessibleException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6278,54 +8660,22 @@ func awsAwsjson11_deserializeDocumentImageScanFinding(v **types.ImageScanFinding return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ImageScanFinding + var sv *types.LayerInaccessibleException if *v == nil { - sv = &types.ImageScanFinding{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "attributes": - if err := awsAwsjson11_deserializeDocumentAttributeList(&sv.Attributes, value); err != nil { - return err - } - - case "description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected FindingDescription to be of type string, got %T instead", value) - } - sv.Description = ptr.String(jtv) - } - - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected FindingName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "severity": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected FindingSeverity to be of type string, got %T instead", value) - } - sv.Severity = types.FindingSeverity(jtv) - } + sv = &types.LayerInaccessibleException{} + } else { + sv = *v + } - case "uri": + for key, value := range shape { + switch key { + case "message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Url to be of type string, got %T instead", value) + return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) } - sv.Uri = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -6337,7 +8687,7 @@ func awsAwsjson11_deserializeDocumentImageScanFinding(v **types.ImageScanFinding return nil } -func awsAwsjson11_deserializeDocumentImageScanFindingList(v *[]types.ImageScanFinding, value interface{}) error { +func awsAwsjson11_deserializeDocumentLayerList(v *[]types.Layer, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6350,17 +8700,17 @@ func awsAwsjson11_deserializeDocumentImageScanFindingList(v *[]types.ImageScanFi return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ImageScanFinding + var cv []types.Layer if *v == nil { - cv = []types.ImageScanFinding{} + cv = []types.Layer{} } else { cv = *v } for _, value := range shape { - var col types.ImageScanFinding + var col types.Layer destAddr := &col - if err := awsAwsjson11_deserializeDocumentImageScanFinding(&destAddr, value); err != nil { + if err := awsAwsjson11_deserializeDocumentLayer(&destAddr, value); err != nil { return err } col = *destAddr @@ -6371,7 +8721,7 @@ func awsAwsjson11_deserializeDocumentImageScanFindingList(v *[]types.ImageScanFi return nil } -func awsAwsjson11_deserializeDocumentImageScanFindings(v **types.ImageScanFindings, value interface{}) error { +func awsAwsjson11_deserializeDocumentLayerPartTooSmallException(v **types.LayerPartTooSmallException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6384,55 +8734,22 @@ func awsAwsjson11_deserializeDocumentImageScanFindings(v **types.ImageScanFindin return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ImageScanFindings + var sv *types.LayerPartTooSmallException if *v == nil { - sv = &types.ImageScanFindings{} + sv = &types.LayerPartTooSmallException{} } else { sv = *v } for key, value := range shape { switch key { - case "findings": - if err := awsAwsjson11_deserializeDocumentImageScanFindingList(&sv.Findings, value); err != nil { - return err - } - - case "findingSeverityCounts": - if err := awsAwsjson11_deserializeDocumentFindingSeverityCounts(&sv.FindingSeverityCounts, value); err != nil { - return err - } - - case "imageScanCompletedAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.ImageScanCompletedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected ScanTimestamp to be a JSON Number, got %T instead", value) - - } - } - - case "vulnerabilitySourceUpdatedAt": + case "message": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.VulnerabilitySourceUpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected VulnerabilitySourceUpdateTimestamp to be a JSON Number, got %T instead", value) - + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) } + sv.Message = ptr.String(jtv) } default: @@ -6444,7 +8761,7 @@ func awsAwsjson11_deserializeDocumentImageScanFindings(v **types.ImageScanFindin return nil } -func awsAwsjson11_deserializeDocumentImageScanFindingsSummary(v **types.ImageScanFindingsSummary, value interface{}) error { +func awsAwsjson11_deserializeDocumentLayersNotFoundException(v **types.LayersNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6457,50 +8774,22 @@ func awsAwsjson11_deserializeDocumentImageScanFindingsSummary(v **types.ImageSca return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ImageScanFindingsSummary + var sv *types.LayersNotFoundException if *v == nil { - sv = &types.ImageScanFindingsSummary{} + sv = &types.LayersNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { - case "findingSeverityCounts": - if err := awsAwsjson11_deserializeDocumentFindingSeverityCounts(&sv.FindingSeverityCounts, value); err != nil { - return err - } - - case "imageScanCompletedAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.ImageScanCompletedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected ScanTimestamp to be a JSON Number, got %T instead", value) - - } - } - - case "vulnerabilitySourceUpdatedAt": + case "message": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.VulnerabilitySourceUpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected VulnerabilitySourceUpdateTimestamp to be a JSON Number, got %T instead", value) - + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) } + sv.Message = ptr.String(jtv) } default: @@ -6512,7 +8801,7 @@ func awsAwsjson11_deserializeDocumentImageScanFindingsSummary(v **types.ImageSca return nil } -func awsAwsjson11_deserializeDocumentImageScanningConfiguration(v **types.ImageScanningConfiguration, value interface{}) error { +func awsAwsjson11_deserializeDocumentLifecyclePolicyNotFoundException(v **types.LifecyclePolicyNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6525,22 +8814,22 @@ func awsAwsjson11_deserializeDocumentImageScanningConfiguration(v **types.ImageS return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ImageScanningConfiguration + var sv *types.LifecyclePolicyNotFoundException if *v == nil { - sv = &types.ImageScanningConfiguration{} + sv = &types.LifecyclePolicyNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { - case "scanOnPush": + case "message": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ScanOnPushFlag to be of type *bool, got %T instead", value) + return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) } - sv.ScanOnPush = jtv + sv.Message = ptr.String(jtv) } default: @@ -6552,7 +8841,7 @@ func awsAwsjson11_deserializeDocumentImageScanningConfiguration(v **types.ImageS return nil } -func awsAwsjson11_deserializeDocumentImageScanStatus(v **types.ImageScanStatus, value interface{}) error { +func awsAwsjson11_deserializeDocumentLifecyclePolicyPreviewInProgressException(v **types.LifecyclePolicyPreviewInProgressException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6565,31 +8854,22 @@ func awsAwsjson11_deserializeDocumentImageScanStatus(v **types.ImageScanStatus, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ImageScanStatus + var sv *types.LifecyclePolicyPreviewInProgressException if *v == nil { - sv = &types.ImageScanStatus{} + sv = &types.LifecyclePolicyPreviewInProgressException{} } else { sv = *v } for key, value := range shape { switch key { - case "description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ScanStatusDescription to be of type string, got %T instead", value) - } - sv.Description = ptr.String(jtv) - } - - case "status": + case "message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ScanStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) } - sv.Status = types.ScanStatus(jtv) + sv.Message = ptr.String(jtv) } default: @@ -6601,7 +8881,7 @@ func awsAwsjson11_deserializeDocumentImageScanStatus(v **types.ImageScanStatus, return nil } -func awsAwsjson11_deserializeDocumentImageTagAlreadyExistsException(v **types.ImageTagAlreadyExistsException, value interface{}) error { +func awsAwsjson11_deserializeDocumentLifecyclePolicyPreviewNotFoundException(v **types.LifecyclePolicyPreviewNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6614,9 +8894,9 @@ func awsAwsjson11_deserializeDocumentImageTagAlreadyExistsException(v **types.Im return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ImageTagAlreadyExistsException + var sv *types.LifecyclePolicyPreviewNotFoundException if *v == nil { - sv = &types.ImageTagAlreadyExistsException{} + sv = &types.LifecyclePolicyPreviewNotFoundException{} } else { sv = *v } @@ -6641,7 +8921,7 @@ func awsAwsjson11_deserializeDocumentImageTagAlreadyExistsException(v **types.Im return nil } -func awsAwsjson11_deserializeDocumentImageTagList(v *[]string, value interface{}) error { +func awsAwsjson11_deserializeDocumentLifecyclePolicyPreviewResult(v **types.LifecyclePolicyPreviewResult, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6649,35 +8929,78 @@ func awsAwsjson11_deserializeDocumentImageTagList(v *[]string, value interface{} return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []string + var sv *types.LifecyclePolicyPreviewResult if *v == nil { - cv = []string{} + sv = &types.LifecyclePolicyPreviewResult{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ImageTag to be of type string, got %T instead", value) + for key, value := range shape { + switch key { + case "action": + if err := awsAwsjson11_deserializeDocumentLifecyclePolicyRuleAction(&sv.Action, value); err != nil { + return err } - col = jtv - } - cv = append(cv, col) + case "appliedRulePriority": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected LifecyclePolicyRulePriority to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AppliedRulePriority = ptr.Int32(int32(i64)) + } + + case "imageDigest": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImageDigest to be of type string, got %T instead", value) + } + sv.ImageDigest = ptr.String(jtv) + } + + case "imagePushedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ImagePushedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected PushTimestamp to be a JSON Number, got %T instead", value) + + } + } + + case "imageTags": + if err := awsAwsjson11_deserializeDocumentImageTagList(&sv.ImageTags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentInvalidLayerException(v **types.InvalidLayerException, value interface{}) error { +func awsAwsjson11_deserializeDocumentLifecyclePolicyPreviewResultList(v *[]types.LifecyclePolicyPreviewResult, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6685,39 +9008,33 @@ func awsAwsjson11_deserializeDocumentInvalidLayerException(v **types.InvalidLaye return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidLayerException + var cv []types.LifecyclePolicyPreviewResult if *v == nil { - sv = &types.InvalidLayerException{} + cv = []types.LifecyclePolicyPreviewResult{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - + for _, value := range shape { + var col types.LifecyclePolicyPreviewResult + destAddr := &col + if err := awsAwsjson11_deserializeDocumentLifecyclePolicyPreviewResult(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentInvalidLayerPartException(v **types.InvalidLayerPartException, value interface{}) error { +func awsAwsjson11_deserializeDocumentLifecyclePolicyPreviewSummary(v **types.LifecyclePolicyPreviewSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6730,62 +9047,26 @@ func awsAwsjson11_deserializeDocumentInvalidLayerPartException(v **types.Invalid return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidLayerPartException + var sv *types.LifecyclePolicyPreviewSummary if *v == nil { - sv = &types.InvalidLayerPartException{} + sv = &types.LifecyclePolicyPreviewSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "lastValidByteReceived": + case "expiringImageTotalCount": if value != nil { jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected PartSize to be json.Number, got %T instead", value) + return fmt.Errorf("expected ImageCount to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } - sv.LastValidByteReceived = ptr.Int64(i64) - } - - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - case "registryId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RegistryId to be of type string, got %T instead", value) - } - sv.RegistryId = ptr.String(jtv) - } - - case "repositoryName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RepositoryName to be of type string, got %T instead", value) - } - sv.RepositoryName = ptr.String(jtv) - } - - case "uploadId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UploadId to be of type string, got %T instead", value) - } - sv.UploadId = ptr.String(jtv) + sv.ExpiringImageTotalCount = ptr.Int32(int32(i64)) } default: @@ -6797,7 +9078,7 @@ func awsAwsjson11_deserializeDocumentInvalidLayerPartException(v **types.Invalid return nil } -func awsAwsjson11_deserializeDocumentInvalidParameterException(v **types.InvalidParameterException, value interface{}) error { +func awsAwsjson11_deserializeDocumentLifecyclePolicyRuleAction(v **types.LifecyclePolicyRuleAction, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6810,22 +9091,22 @@ func awsAwsjson11_deserializeDocumentInvalidParameterException(v **types.Invalid return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidParameterException + var sv *types.LifecyclePolicyRuleAction if *v == nil { - sv = &types.InvalidParameterException{} + sv = &types.LifecyclePolicyRuleAction{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "type": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected ImageActionType to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.Type = types.ImageActionType(jtv) } default: @@ -6837,7 +9118,7 @@ func awsAwsjson11_deserializeDocumentInvalidParameterException(v **types.Invalid return nil } -func awsAwsjson11_deserializeDocumentInvalidTagParameterException(v **types.InvalidTagParameterException, value interface{}) error { +func awsAwsjson11_deserializeDocumentLimitExceededException(v **types.LimitExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6850,9 +9131,9 @@ func awsAwsjson11_deserializeDocumentInvalidTagParameterException(v **types.Inva return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidTagParameterException + var sv *types.LimitExceededException if *v == nil { - sv = &types.InvalidTagParameterException{} + sv = &types.LimitExceededException{} } else { sv = *v } @@ -6877,7 +9158,7 @@ func awsAwsjson11_deserializeDocumentInvalidTagParameterException(v **types.Inva return nil } -func awsAwsjson11_deserializeDocumentKmsException(v **types.KmsException, value interface{}) error { +func awsAwsjson11_deserializeDocumentPackageVulnerabilityDetails(v **types.PackageVulnerabilityDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6890,31 +9171,101 @@ func awsAwsjson11_deserializeDocumentKmsException(v **types.KmsException, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.KmsException + var sv *types.PackageVulnerabilityDetails if *v == nil { - sv = &types.KmsException{} + sv = &types.PackageVulnerabilityDetails{} } else { sv = *v } for key, value := range shape { switch key { - case "kmsError": + case "cvss": + if err := awsAwsjson11_deserializeDocumentCvssScoreList(&sv.Cvss, value); err != nil { + return err + } + + case "referenceUrls": + if err := awsAwsjson11_deserializeDocumentReferenceUrlsList(&sv.ReferenceUrls, value); err != nil { + return err + } + + case "relatedVulnerabilities": + if err := awsAwsjson11_deserializeDocumentRelatedVulnerabilitiesList(&sv.RelatedVulnerabilities, value); err != nil { + return err + } + + case "source": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected KmsError to be of type string, got %T instead", value) + return fmt.Errorf("expected Source to be of type string, got %T instead", value) } - sv.KmsError = ptr.String(jtv) + sv.Source = ptr.String(jtv) } - case "message": + case "sourceUrl": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected Url to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.SourceUrl = ptr.String(jtv) + } + + case "vendorCreatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.VendorCreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "vendorSeverity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Severity to be of type string, got %T instead", value) + } + sv.VendorSeverity = ptr.String(jtv) + } + + case "vendorUpdatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.VendorUpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "vulnerabilityId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VulnerabilityId to be of type string, got %T instead", value) + } + sv.VulnerabilityId = ptr.String(jtv) + } + + case "vulnerablePackages": + if err := awsAwsjson11_deserializeDocumentVulnerablePackagesList(&sv.VulnerablePackages, value); err != nil { + return err } default: @@ -6926,7 +9277,7 @@ func awsAwsjson11_deserializeDocumentKmsException(v **types.KmsException, value return nil } -func awsAwsjson11_deserializeDocumentLayer(v **types.Layer, value interface{}) error { +func awsAwsjson11_deserializeDocumentPullThroughCacheRule(v **types.PullThroughCacheRule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6939,53 +9290,56 @@ func awsAwsjson11_deserializeDocumentLayer(v **types.Layer, value interface{}) e return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Layer + var sv *types.PullThroughCacheRule if *v == nil { - sv = &types.Layer{} + sv = &types.PullThroughCacheRule{} } else { sv = *v } for key, value := range shape { switch key { - case "layerAvailability": + case "createdAt": if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LayerAvailability to be of type string, got %T instead", value) + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected CreationTimestamp to be a JSON Number, got %T instead", value) + } - sv.LayerAvailability = types.LayerAvailability(jtv) } - case "layerDigest": + case "ecrRepositoryPrefix": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected LayerDigest to be of type string, got %T instead", value) + return fmt.Errorf("expected PullThroughCacheRuleRepositoryPrefix to be of type string, got %T instead", value) } - sv.LayerDigest = ptr.String(jtv) + sv.EcrRepositoryPrefix = ptr.String(jtv) } - case "layerSize": + case "registryId": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected LayerSizeInBytes to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected RegistryId to be of type string, got %T instead", value) } - sv.LayerSize = ptr.Int64(i64) + sv.RegistryId = ptr.String(jtv) } - case "mediaType": + case "upstreamRegistryUrl": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected MediaType to be of type string, got %T instead", value) + return fmt.Errorf("expected Url to be of type string, got %T instead", value) } - sv.MediaType = ptr.String(jtv) + sv.UpstreamRegistryUrl = ptr.String(jtv) } default: @@ -6997,7 +9351,7 @@ func awsAwsjson11_deserializeDocumentLayer(v **types.Layer, value interface{}) e return nil } -func awsAwsjson11_deserializeDocumentLayerAlreadyExistsException(v **types.LayerAlreadyExistsException, value interface{}) error { +func awsAwsjson11_deserializeDocumentPullThroughCacheRuleAlreadyExistsException(v **types.PullThroughCacheRuleAlreadyExistsException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7010,9 +9364,9 @@ func awsAwsjson11_deserializeDocumentLayerAlreadyExistsException(v **types.Layer return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.LayerAlreadyExistsException + var sv *types.PullThroughCacheRuleAlreadyExistsException if *v == nil { - sv = &types.LayerAlreadyExistsException{} + sv = &types.PullThroughCacheRuleAlreadyExistsException{} } else { sv = *v } @@ -7037,7 +9391,41 @@ func awsAwsjson11_deserializeDocumentLayerAlreadyExistsException(v **types.Layer return nil } -func awsAwsjson11_deserializeDocumentLayerFailure(v **types.LayerFailure, value interface{}) error { +func awsAwsjson11_deserializeDocumentPullThroughCacheRuleList(v *[]types.PullThroughCacheRule, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.PullThroughCacheRule + if *v == nil { + cv = []types.PullThroughCacheRule{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PullThroughCacheRule + destAddr := &col + if err := awsAwsjson11_deserializeDocumentPullThroughCacheRule(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentPullThroughCacheRuleNotFoundException(v **types.PullThroughCacheRuleNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7050,40 +9438,22 @@ func awsAwsjson11_deserializeDocumentLayerFailure(v **types.LayerFailure, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.LayerFailure + var sv *types.PullThroughCacheRuleNotFoundException if *v == nil { - sv = &types.LayerFailure{} + sv = &types.PullThroughCacheRuleNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { - case "failureCode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LayerFailureCode to be of type string, got %T instead", value) - } - sv.FailureCode = types.LayerFailureCode(jtv) - } - - case "failureReason": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LayerFailureReason to be of type string, got %T instead", value) - } - sv.FailureReason = ptr.String(jtv) - } - - case "layerDigest": + case "message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected BatchedOperationLayerDigest to be of type string, got %T instead", value) + return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) } - sv.LayerDigest = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -7095,7 +9465,7 @@ func awsAwsjson11_deserializeDocumentLayerFailure(v **types.LayerFailure, value return nil } -func awsAwsjson11_deserializeDocumentLayerFailureList(v *[]types.LayerFailure, value interface{}) error { +func awsAwsjson11_deserializeDocumentRecommendation(v **types.Recommendation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7103,33 +9473,48 @@ func awsAwsjson11_deserializeDocumentLayerFailureList(v *[]types.LayerFailure, v return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.LayerFailure + var sv *types.Recommendation if *v == nil { - cv = []types.LayerFailure{} + sv = &types.Recommendation{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.LayerFailure - destAddr := &col - if err := awsAwsjson11_deserializeDocumentLayerFailure(&destAddr, value); err != nil { - return err + for key, value := range shape { + switch key { + case "text": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RecommendationText to be of type string, got %T instead", value) + } + sv.Text = ptr.String(jtv) + } + + case "url": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Url to be of type string, got %T instead", value) + } + sv.Url = ptr.String(jtv) + } + + default: + _, _ = key, value + } - col = *destAddr - cv = append(cv, col) - } - *v = cv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentLayerInaccessibleException(v **types.LayerInaccessibleException, value interface{}) error { +func awsAwsjson11_deserializeDocumentReferencedImagesNotFoundException(v **types.ReferencedImagesNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7142,9 +9527,9 @@ func awsAwsjson11_deserializeDocumentLayerInaccessibleException(v **types.LayerI return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.LayerInaccessibleException + var sv *types.ReferencedImagesNotFoundException if *v == nil { - sv = &types.LayerInaccessibleException{} + sv = &types.ReferencedImagesNotFoundException{} } else { sv = *v } @@ -7169,7 +9554,7 @@ func awsAwsjson11_deserializeDocumentLayerInaccessibleException(v **types.LayerI return nil } -func awsAwsjson11_deserializeDocumentLayerList(v *[]types.Layer, value interface{}) error { +func awsAwsjson11_deserializeDocumentReferenceUrlsList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7182,20 +9567,22 @@ func awsAwsjson11_deserializeDocumentLayerList(v *[]types.Layer, value interface return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.Layer + var cv []string if *v == nil { - cv = []types.Layer{} + cv = []string{} } else { cv = *v } for _, value := range shape { - var col types.Layer - destAddr := &col - if err := awsAwsjson11_deserializeDocumentLayer(&destAddr, value); err != nil { - return err + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Url to be of type string, got %T instead", value) + } + col = jtv } - col = *destAddr cv = append(cv, col) } @@ -7203,7 +9590,7 @@ func awsAwsjson11_deserializeDocumentLayerList(v *[]types.Layer, value interface return nil } -func awsAwsjson11_deserializeDocumentLayerPartTooSmallException(v **types.LayerPartTooSmallException, value interface{}) error { +func awsAwsjson11_deserializeDocumentRegistryPolicyNotFoundException(v **types.RegistryPolicyNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7216,9 +9603,9 @@ func awsAwsjson11_deserializeDocumentLayerPartTooSmallException(v **types.LayerP return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.LayerPartTooSmallException + var sv *types.RegistryPolicyNotFoundException if *v == nil { - sv = &types.LayerPartTooSmallException{} + sv = &types.RegistryPolicyNotFoundException{} } else { sv = *v } @@ -7243,7 +9630,7 @@ func awsAwsjson11_deserializeDocumentLayerPartTooSmallException(v **types.LayerP return nil } -func awsAwsjson11_deserializeDocumentLayersNotFoundException(v **types.LayersNotFoundException, value interface{}) error { +func awsAwsjson11_deserializeDocumentRegistryScanningConfiguration(v **types.RegistryScanningConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7256,22 +9643,27 @@ func awsAwsjson11_deserializeDocumentLayersNotFoundException(v **types.LayersNot return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.LayersNotFoundException + var sv *types.RegistryScanningConfiguration if *v == nil { - sv = &types.LayersNotFoundException{} + sv = &types.RegistryScanningConfiguration{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "rules": + if err := awsAwsjson11_deserializeDocumentRegistryScanningRuleList(&sv.Rules, value); err != nil { + return err + } + + case "scanType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected ScanType to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.ScanType = types.ScanType(jtv) } default: @@ -7283,7 +9675,7 @@ func awsAwsjson11_deserializeDocumentLayersNotFoundException(v **types.LayersNot return nil } -func awsAwsjson11_deserializeDocumentLifecyclePolicyNotFoundException(v **types.LifecyclePolicyNotFoundException, value interface{}) error { +func awsAwsjson11_deserializeDocumentRegistryScanningRule(v **types.RegistryScanningRule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7296,22 +9688,27 @@ func awsAwsjson11_deserializeDocumentLifecyclePolicyNotFoundException(v **types. return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.LifecyclePolicyNotFoundException + var sv *types.RegistryScanningRule if *v == nil { - sv = &types.LifecyclePolicyNotFoundException{} + sv = &types.RegistryScanningRule{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "repositoryFilters": + if err := awsAwsjson11_deserializeDocumentScanningRepositoryFilterList(&sv.RepositoryFilters, value); err != nil { + return err + } + + case "scanFrequency": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected ScanFrequency to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.ScanFrequency = types.ScanFrequency(jtv) } default: @@ -7323,7 +9720,77 @@ func awsAwsjson11_deserializeDocumentLifecyclePolicyNotFoundException(v **types. return nil } -func awsAwsjson11_deserializeDocumentLifecyclePolicyPreviewInProgressException(v **types.LifecyclePolicyPreviewInProgressException, value interface{}) error { +func awsAwsjson11_deserializeDocumentRegistryScanningRuleList(v *[]types.RegistryScanningRule, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.RegistryScanningRule + if *v == nil { + cv = []types.RegistryScanningRule{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RegistryScanningRule + destAddr := &col + if err := awsAwsjson11_deserializeDocumentRegistryScanningRule(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentRelatedVulnerabilitiesList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RelatedVulnerability to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentRemediation(v **types.Remediation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7336,22 +9803,18 @@ func awsAwsjson11_deserializeDocumentLifecyclePolicyPreviewInProgressException(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.LifecyclePolicyPreviewInProgressException + var sv *types.Remediation if *v == nil { - sv = &types.LifecyclePolicyPreviewInProgressException{} + sv = &types.Remediation{} } else { sv = *v } for key, value := range shape { switch key { - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) + case "recommendation": + if err := awsAwsjson11_deserializeDocumentRecommendation(&sv.Recommendation, value); err != nil { + return err } default: @@ -7363,7 +9826,7 @@ func awsAwsjson11_deserializeDocumentLifecyclePolicyPreviewInProgressException(v return nil } -func awsAwsjson11_deserializeDocumentLifecyclePolicyPreviewNotFoundException(v **types.LifecyclePolicyPreviewNotFoundException, value interface{}) error { +func awsAwsjson11_deserializeDocumentReplicationConfiguration(v **types.ReplicationConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7376,22 +9839,18 @@ func awsAwsjson11_deserializeDocumentLifecyclePolicyPreviewNotFoundException(v * return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.LifecyclePolicyPreviewNotFoundException + var sv *types.ReplicationConfiguration if *v == nil { - sv = &types.LifecyclePolicyPreviewNotFoundException{} + sv = &types.ReplicationConfiguration{} } else { sv = *v } for key, value := range shape { switch key { - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) + case "rules": + if err := awsAwsjson11_deserializeDocumentReplicationRuleList(&sv.Rules, value); err != nil { + return err } default: @@ -7403,7 +9862,7 @@ func awsAwsjson11_deserializeDocumentLifecyclePolicyPreviewNotFoundException(v * return nil } -func awsAwsjson11_deserializeDocumentLifecyclePolicyPreviewResult(v **types.LifecyclePolicyPreviewResult, value interface{}) error { +func awsAwsjson11_deserializeDocumentReplicationDestination(v **types.ReplicationDestination, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7416,61 +9875,31 @@ func awsAwsjson11_deserializeDocumentLifecyclePolicyPreviewResult(v **types.Life return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.LifecyclePolicyPreviewResult + var sv *types.ReplicationDestination if *v == nil { - sv = &types.LifecyclePolicyPreviewResult{} + sv = &types.ReplicationDestination{} } else { sv = *v } for key, value := range shape { switch key { - case "action": - if err := awsAwsjson11_deserializeDocumentLifecyclePolicyRuleAction(&sv.Action, value); err != nil { - return err - } - - case "appliedRulePriority": + case "region": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected LifecyclePolicyRulePriority to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected Region to be of type string, got %T instead", value) } - sv.AppliedRulePriority = ptr.Int32(int32(i64)) + sv.Region = ptr.String(jtv) } - case "imageDigest": + case "registryId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ImageDigest to be of type string, got %T instead", value) - } - sv.ImageDigest = ptr.String(jtv) - } - - case "imagePushedAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.ImagePushedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected PushTimestamp to be a JSON Number, got %T instead", value) - + return fmt.Errorf("expected RegistryId to be of type string, got %T instead", value) } - } - - case "imageTags": - if err := awsAwsjson11_deserializeDocumentImageTagList(&sv.ImageTags, value); err != nil { - return err + sv.RegistryId = ptr.String(jtv) } default: @@ -7482,7 +9911,7 @@ func awsAwsjson11_deserializeDocumentLifecyclePolicyPreviewResult(v **types.Life return nil } -func awsAwsjson11_deserializeDocumentLifecyclePolicyPreviewResultList(v *[]types.LifecyclePolicyPreviewResult, value interface{}) error { +func awsAwsjson11_deserializeDocumentReplicationDestinationList(v *[]types.ReplicationDestination, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7495,17 +9924,17 @@ func awsAwsjson11_deserializeDocumentLifecyclePolicyPreviewResultList(v *[]types return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.LifecyclePolicyPreviewResult + var cv []types.ReplicationDestination if *v == nil { - cv = []types.LifecyclePolicyPreviewResult{} + cv = []types.ReplicationDestination{} } else { cv = *v } for _, value := range shape { - var col types.LifecyclePolicyPreviewResult + var col types.ReplicationDestination destAddr := &col - if err := awsAwsjson11_deserializeDocumentLifecyclePolicyPreviewResult(&destAddr, value); err != nil { + if err := awsAwsjson11_deserializeDocumentReplicationDestination(&destAddr, value); err != nil { return err } col = *destAddr @@ -7516,7 +9945,7 @@ func awsAwsjson11_deserializeDocumentLifecyclePolicyPreviewResultList(v *[]types return nil } -func awsAwsjson11_deserializeDocumentLifecyclePolicyPreviewSummary(v **types.LifecyclePolicyPreviewSummary, value interface{}) error { +func awsAwsjson11_deserializeDocumentReplicationRule(v **types.ReplicationRule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7529,26 +9958,23 @@ func awsAwsjson11_deserializeDocumentLifecyclePolicyPreviewSummary(v **types.Lif return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.LifecyclePolicyPreviewSummary + var sv *types.ReplicationRule if *v == nil { - sv = &types.LifecyclePolicyPreviewSummary{} + sv = &types.ReplicationRule{} } else { sv = *v } for key, value := range shape { switch key { - case "expiringImageTotalCount": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected ImageCount to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.ExpiringImageTotalCount = ptr.Int32(int32(i64)) + case "destinations": + if err := awsAwsjson11_deserializeDocumentReplicationDestinationList(&sv.Destinations, value); err != nil { + return err + } + + case "repositoryFilters": + if err := awsAwsjson11_deserializeDocumentRepositoryFilterList(&sv.RepositoryFilters, value); err != nil { + return err } default: @@ -7556,11 +9982,45 @@ func awsAwsjson11_deserializeDocumentLifecyclePolicyPreviewSummary(v **types.Lif } } - *v = sv + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentReplicationRuleList(v *[]types.ReplicationRule, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ReplicationRule + if *v == nil { + cv = []types.ReplicationRule{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ReplicationRule + destAddr := &col + if err := awsAwsjson11_deserializeDocumentReplicationRule(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv return nil } -func awsAwsjson11_deserializeDocumentLifecyclePolicyRuleAction(v **types.LifecyclePolicyRuleAction, value interface{}) error { +func awsAwsjson11_deserializeDocumentRepository(v **types.Repository, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7573,22 +10033,84 @@ func awsAwsjson11_deserializeDocumentLifecyclePolicyRuleAction(v **types.Lifecyc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.LifecyclePolicyRuleAction + var sv *types.Repository if *v == nil { - sv = &types.LifecyclePolicyRuleAction{} + sv = &types.Repository{} } else { sv = *v } for key, value := range shape { switch key { - case "type": + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected CreationTimestamp to be a JSON Number, got %T instead", value) + + } + } + + case "encryptionConfiguration": + if err := awsAwsjson11_deserializeDocumentEncryptionConfiguration(&sv.EncryptionConfiguration, value); err != nil { + return err + } + + case "imageScanningConfiguration": + if err := awsAwsjson11_deserializeDocumentImageScanningConfiguration(&sv.ImageScanningConfiguration, value); err != nil { + return err + } + + case "imageTagMutability": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ImageActionType to be of type string, got %T instead", value) + return fmt.Errorf("expected ImageTagMutability to be of type string, got %T instead", value) } - sv.Type = types.ImageActionType(jtv) + sv.ImageTagMutability = types.ImageTagMutability(jtv) + } + + case "registryId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RegistryId to be of type string, got %T instead", value) + } + sv.RegistryId = ptr.String(jtv) + } + + case "repositoryArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.RepositoryArn = ptr.String(jtv) + } + + case "repositoryName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RepositoryName to be of type string, got %T instead", value) + } + sv.RepositoryName = ptr.String(jtv) + } + + case "repositoryUri": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Url to be of type string, got %T instead", value) + } + sv.RepositoryUri = ptr.String(jtv) } default: @@ -7600,7 +10122,7 @@ func awsAwsjson11_deserializeDocumentLifecyclePolicyRuleAction(v **types.Lifecyc return nil } -func awsAwsjson11_deserializeDocumentLimitExceededException(v **types.LimitExceededException, value interface{}) error { +func awsAwsjson11_deserializeDocumentRepositoryAlreadyExistsException(v **types.RepositoryAlreadyExistsException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7613,9 +10135,9 @@ func awsAwsjson11_deserializeDocumentLimitExceededException(v **types.LimitExcee return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.LimitExceededException + var sv *types.RepositoryAlreadyExistsException if *v == nil { - sv = &types.LimitExceededException{} + sv = &types.RepositoryAlreadyExistsException{} } else { sv = *v } @@ -7640,7 +10162,7 @@ func awsAwsjson11_deserializeDocumentLimitExceededException(v **types.LimitExcee return nil } -func awsAwsjson11_deserializeDocumentReferencedImagesNotFoundException(v **types.ReferencedImagesNotFoundException, value interface{}) error { +func awsAwsjson11_deserializeDocumentRepositoryFilter(v **types.RepositoryFilter, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7653,22 +10175,31 @@ func awsAwsjson11_deserializeDocumentReferencedImagesNotFoundException(v **types return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ReferencedImagesNotFoundException + var sv *types.RepositoryFilter if *v == nil { - sv = &types.ReferencedImagesNotFoundException{} + sv = &types.RepositoryFilter{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "filter": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected RepositoryFilterValue to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.Filter = ptr.String(jtv) + } + + case "filterType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RepositoryFilterType to be of type string, got %T instead", value) + } + sv.FilterType = types.RepositoryFilterType(jtv) } default: @@ -7680,7 +10211,7 @@ func awsAwsjson11_deserializeDocumentReferencedImagesNotFoundException(v **types return nil } -func awsAwsjson11_deserializeDocumentRegistryPolicyNotFoundException(v **types.RegistryPolicyNotFoundException, value interface{}) error { +func awsAwsjson11_deserializeDocumentRepositoryFilterList(v *[]types.RepositoryFilter, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7688,39 +10219,33 @@ func awsAwsjson11_deserializeDocumentRegistryPolicyNotFoundException(v **types.R return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.RegistryPolicyNotFoundException + var cv []types.RepositoryFilter if *v == nil { - sv = &types.RegistryPolicyNotFoundException{} + cv = []types.RepositoryFilter{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - + for _, value := range shape { + var col types.RepositoryFilter + destAddr := &col + if err := awsAwsjson11_deserializeDocumentRepositoryFilter(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentReplicationConfiguration(v **types.ReplicationConfiguration, value interface{}) error { +func awsAwsjson11_deserializeDocumentRepositoryList(v *[]types.Repository, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7728,35 +10253,33 @@ func awsAwsjson11_deserializeDocumentReplicationConfiguration(v **types.Replicat return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ReplicationConfiguration + var cv []types.Repository if *v == nil { - sv = &types.ReplicationConfiguration{} + cv = []types.Repository{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "rules": - if err := awsAwsjson11_deserializeDocumentReplicationRuleList(&sv.Rules, value); err != nil { - return err - } - - default: - _, _ = key, value - + for _, value := range shape { + var col types.Repository + destAddr := &col + if err := awsAwsjson11_deserializeDocumentRepository(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentReplicationDestination(v **types.ReplicationDestination, value interface{}) error { +func awsAwsjson11_deserializeDocumentRepositoryNotEmptyException(v **types.RepositoryNotEmptyException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7769,31 +10292,22 @@ func awsAwsjson11_deserializeDocumentReplicationDestination(v **types.Replicatio return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ReplicationDestination + var sv *types.RepositoryNotEmptyException if *v == nil { - sv = &types.ReplicationDestination{} + sv = &types.RepositoryNotEmptyException{} } else { sv = *v } for key, value := range shape { switch key { - case "region": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Region to be of type string, got %T instead", value) - } - sv.Region = ptr.String(jtv) - } - - case "registryId": + case "message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RegistryId to be of type string, got %T instead", value) + return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) } - sv.RegistryId = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -7805,41 +10319,7 @@ func awsAwsjson11_deserializeDocumentReplicationDestination(v **types.Replicatio return nil } -func awsAwsjson11_deserializeDocumentReplicationDestinationList(v *[]types.ReplicationDestination, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.ReplicationDestination - if *v == nil { - cv = []types.ReplicationDestination{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.ReplicationDestination - destAddr := &col - if err := awsAwsjson11_deserializeDocumentReplicationDestination(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson11_deserializeDocumentReplicationRule(v **types.ReplicationRule, value interface{}) error { +func awsAwsjson11_deserializeDocumentRepositoryNotFoundException(v **types.RepositoryNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7852,23 +10332,22 @@ func awsAwsjson11_deserializeDocumentReplicationRule(v **types.ReplicationRule, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ReplicationRule + var sv *types.RepositoryNotFoundException if *v == nil { - sv = &types.ReplicationRule{} + sv = &types.RepositoryNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { - case "destinations": - if err := awsAwsjson11_deserializeDocumentReplicationDestinationList(&sv.Destinations, value); err != nil { - return err - } - - case "repositoryFilters": - if err := awsAwsjson11_deserializeDocumentRepositoryFilterList(&sv.RepositoryFilters, value); err != nil { - return err + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) } default: @@ -7880,7 +10359,7 @@ func awsAwsjson11_deserializeDocumentReplicationRule(v **types.ReplicationRule, return nil } -func awsAwsjson11_deserializeDocumentReplicationRuleList(v *[]types.ReplicationRule, value interface{}) error { +func awsAwsjson11_deserializeDocumentRepositoryPolicyNotFoundException(v **types.RepositoryPolicyNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7888,33 +10367,39 @@ func awsAwsjson11_deserializeDocumentReplicationRuleList(v *[]types.ReplicationR return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ReplicationRule + var sv *types.RepositoryPolicyNotFoundException if *v == nil { - cv = []types.ReplicationRule{} + sv = &types.RepositoryPolicyNotFoundException{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.ReplicationRule - destAddr := &col - if err := awsAwsjson11_deserializeDocumentReplicationRule(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentRepository(v **types.Repository, value interface{}) error { +func awsAwsjson11_deserializeDocumentRepositoryScanningConfiguration(v **types.RepositoryScanningConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7927,59 +10412,20 @@ func awsAwsjson11_deserializeDocumentRepository(v **types.Repository, value inte return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Repository + var sv *types.RepositoryScanningConfiguration if *v == nil { - sv = &types.Repository{} + sv = &types.RepositoryScanningConfiguration{} } else { sv = *v } for key, value := range shape { switch key { - case "createdAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected CreationTimestamp to be a JSON Number, got %T instead", value) - - } - } - - case "encryptionConfiguration": - if err := awsAwsjson11_deserializeDocumentEncryptionConfiguration(&sv.EncryptionConfiguration, value); err != nil { - return err - } - - case "imageScanningConfiguration": - if err := awsAwsjson11_deserializeDocumentImageScanningConfiguration(&sv.ImageScanningConfiguration, value); err != nil { + case "appliedScanFilters": + if err := awsAwsjson11_deserializeDocumentScanningRepositoryFilterList(&sv.AppliedScanFilters, value); err != nil { return err } - case "imageTagMutability": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ImageTagMutability to be of type string, got %T instead", value) - } - sv.ImageTagMutability = types.ImageTagMutability(jtv) - } - - case "registryId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RegistryId to be of type string, got %T instead", value) - } - sv.RegistryId = ptr.String(jtv) - } - case "repositoryArn": if value != nil { jtv, ok := value.(string) @@ -7998,13 +10444,22 @@ func awsAwsjson11_deserializeDocumentRepository(v **types.Repository, value inte sv.RepositoryName = ptr.String(jtv) } - case "repositoryUri": + case "scanFrequency": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Url to be of type string, got %T instead", value) + return fmt.Errorf("expected ScanFrequency to be of type string, got %T instead", value) } - sv.RepositoryUri = ptr.String(jtv) + sv.ScanFrequency = types.ScanFrequency(jtv) + } + + case "scanOnPush": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected ScanOnPushFlag to be of type *bool, got %T instead", value) + } + sv.ScanOnPush = jtv } default: @@ -8016,7 +10471,7 @@ func awsAwsjson11_deserializeDocumentRepository(v **types.Repository, value inte return nil } -func awsAwsjson11_deserializeDocumentRepositoryAlreadyExistsException(v **types.RepositoryAlreadyExistsException, value interface{}) error { +func awsAwsjson11_deserializeDocumentRepositoryScanningConfigurationFailure(v **types.RepositoryScanningConfigurationFailure, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8029,71 +10484,40 @@ func awsAwsjson11_deserializeDocumentRepositoryAlreadyExistsException(v **types. return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.RepositoryAlreadyExistsException + var sv *types.RepositoryScanningConfigurationFailure if *v == nil { - sv = &types.RepositoryAlreadyExistsException{} + sv = &types.RepositoryScanningConfigurationFailure{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "failureCode": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected ScanningConfigurationFailureCode to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.FailureCode = types.ScanningConfigurationFailureCode(jtv) } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentRepositoryFilter(v **types.RepositoryFilter, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.RepositoryFilter - if *v == nil { - sv = &types.RepositoryFilter{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "filter": + case "failureReason": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RepositoryFilterValue to be of type string, got %T instead", value) + return fmt.Errorf("expected ScanningConfigurationFailureReason to be of type string, got %T instead", value) } - sv.Filter = ptr.String(jtv) + sv.FailureReason = ptr.String(jtv) } - case "filterType": + case "repositoryName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RepositoryFilterType to be of type string, got %T instead", value) + return fmt.Errorf("expected RepositoryName to be of type string, got %T instead", value) } - sv.FilterType = types.RepositoryFilterType(jtv) + sv.RepositoryName = ptr.String(jtv) } default: @@ -8105,7 +10529,7 @@ func awsAwsjson11_deserializeDocumentRepositoryFilter(v **types.RepositoryFilter return nil } -func awsAwsjson11_deserializeDocumentRepositoryFilterList(v *[]types.RepositoryFilter, value interface{}) error { +func awsAwsjson11_deserializeDocumentRepositoryScanningConfigurationFailureList(v *[]types.RepositoryScanningConfigurationFailure, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8118,17 +10542,17 @@ func awsAwsjson11_deserializeDocumentRepositoryFilterList(v *[]types.RepositoryF return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.RepositoryFilter + var cv []types.RepositoryScanningConfigurationFailure if *v == nil { - cv = []types.RepositoryFilter{} + cv = []types.RepositoryScanningConfigurationFailure{} } else { cv = *v } for _, value := range shape { - var col types.RepositoryFilter + var col types.RepositoryScanningConfigurationFailure destAddr := &col - if err := awsAwsjson11_deserializeDocumentRepositoryFilter(&destAddr, value); err != nil { + if err := awsAwsjson11_deserializeDocumentRepositoryScanningConfigurationFailure(&destAddr, value); err != nil { return err } col = *destAddr @@ -8139,7 +10563,7 @@ func awsAwsjson11_deserializeDocumentRepositoryFilterList(v *[]types.RepositoryF return nil } -func awsAwsjson11_deserializeDocumentRepositoryList(v *[]types.Repository, value interface{}) error { +func awsAwsjson11_deserializeDocumentRepositoryScanningConfigurationList(v *[]types.RepositoryScanningConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8152,17 +10576,17 @@ func awsAwsjson11_deserializeDocumentRepositoryList(v *[]types.Repository, value return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.Repository + var cv []types.RepositoryScanningConfiguration if *v == nil { - cv = []types.Repository{} + cv = []types.RepositoryScanningConfiguration{} } else { cv = *v } for _, value := range shape { - var col types.Repository + var col types.RepositoryScanningConfiguration destAddr := &col - if err := awsAwsjson11_deserializeDocumentRepository(&destAddr, value); err != nil { + if err := awsAwsjson11_deserializeDocumentRepositoryScanningConfiguration(&destAddr, value); err != nil { return err } col = *destAddr @@ -8173,7 +10597,7 @@ func awsAwsjson11_deserializeDocumentRepositoryList(v *[]types.Repository, value return nil } -func awsAwsjson11_deserializeDocumentRepositoryNotEmptyException(v **types.RepositoryNotEmptyException, value interface{}) error { +func awsAwsjson11_deserializeDocumentResource(v **types.Resource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8186,22 +10610,41 @@ func awsAwsjson11_deserializeDocumentRepositoryNotEmptyException(v **types.Repos return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.RepositoryNotEmptyException + var sv *types.Resource if *v == nil { - sv = &types.RepositoryNotEmptyException{} + sv = &types.Resource{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "details": + if err := awsAwsjson11_deserializeDocumentResourceDetails(&sv.Details, value); err != nil { + return err + } + + case "id": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.Id = ptr.String(jtv) + } + + case "tags": + if err := awsAwsjson11_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Type to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) } default: @@ -8213,7 +10656,7 @@ func awsAwsjson11_deserializeDocumentRepositoryNotEmptyException(v **types.Repos return nil } -func awsAwsjson11_deserializeDocumentRepositoryNotFoundException(v **types.RepositoryNotFoundException, value interface{}) error { +func awsAwsjson11_deserializeDocumentResourceDetails(v **types.ResourceDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8226,34 +10669,147 @@ func awsAwsjson11_deserializeDocumentRepositoryNotFoundException(v **types.Repos return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.RepositoryNotFoundException + var sv *types.ResourceDetails if *v == nil { - sv = &types.RepositoryNotFoundException{} + sv = &types.ResourceDetails{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "awsEcrContainerImage": + if err := awsAwsjson11_deserializeDocumentAwsEcrContainerImageDetails(&sv.AwsEcrContainerImage, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceList(v *[]types.Resource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Resource + if *v == nil { + cv = []types.Resource{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Resource + destAddr := &col + if err := awsAwsjson11_deserializeDocumentResource(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentScanningRepositoryFilter(v **types.ScanningRepositoryFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ScanningRepositoryFilter + if *v == nil { + sv = &types.ScanningRepositoryFilter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "filter": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected ScanningRepositoryFilterValue to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.Filter = ptr.String(jtv) + } + + case "filterType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScanningRepositoryFilterType to be of type string, got %T instead", value) + } + sv.FilterType = types.ScanningRepositoryFilterType(jtv) } - default: - _, _ = key, value + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentScanningRepositoryFilterList(v *[]types.ScanningRepositoryFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + var cv []types.ScanningRepositoryFilter + if *v == nil { + cv = []types.ScanningRepositoryFilter{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ScanningRepositoryFilter + destAddr := &col + if err := awsAwsjson11_deserializeDocumentScanningRepositoryFilter(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentRepositoryPolicyNotFoundException(v **types.RepositoryPolicyNotFoundException, value interface{}) error { +func awsAwsjson11_deserializeDocumentScanNotFoundException(v **types.ScanNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8266,9 +10822,9 @@ func awsAwsjson11_deserializeDocumentRepositoryPolicyNotFoundException(v **types return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.RepositoryPolicyNotFoundException + var sv *types.ScanNotFoundException if *v == nil { - sv = &types.RepositoryPolicyNotFoundException{} + sv = &types.ScanNotFoundException{} } else { sv = *v } @@ -8293,7 +10849,7 @@ func awsAwsjson11_deserializeDocumentRepositoryPolicyNotFoundException(v **types return nil } -func awsAwsjson11_deserializeDocumentScanNotFoundException(v **types.ScanNotFoundException, value interface{}) error { +func awsAwsjson11_deserializeDocumentScoreDetails(v **types.ScoreDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8306,22 +10862,18 @@ func awsAwsjson11_deserializeDocumentScanNotFoundException(v **types.ScanNotFoun return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ScanNotFoundException + var sv *types.ScoreDetails if *v == nil { - sv = &types.ScanNotFoundException{} + sv = &types.ScoreDetails{} } else { sv = *v } for key, value := range shape { switch key { - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) + case "cvss": + if err := awsAwsjson11_deserializeDocumentCvssScoreDetails(&sv.Cvss, value); err != nil { + return err } default: @@ -8456,6 +11008,42 @@ func awsAwsjson11_deserializeDocumentTagList(v *[]types.Tag, value interface{}) return nil } +func awsAwsjson11_deserializeDocumentTags(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + func awsAwsjson11_deserializeDocumentTooManyTagsException(v **types.TooManyTagsException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8536,6 +11124,46 @@ func awsAwsjson11_deserializeDocumentUnsupportedImageTypeException(v **types.Uns return nil } +func awsAwsjson11_deserializeDocumentUnsupportedUpstreamRegistryException(v **types.UnsupportedUpstreamRegistryException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.UnsupportedUpstreamRegistryException + if *v == nil { + sv = &types.UnsupportedUpstreamRegistryException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentUploadNotFoundException(v **types.UploadNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8616,6 +11244,147 @@ func awsAwsjson11_deserializeDocumentValidationException(v **types.ValidationExc return nil } +func awsAwsjson11_deserializeDocumentVulnerablePackage(v **types.VulnerablePackage, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.VulnerablePackage + if *v == nil { + sv = &types.VulnerablePackage{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arch": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arch to be of type string, got %T instead", value) + } + sv.Arch = ptr.String(jtv) + } + + case "epoch": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Epoch to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Epoch = ptr.Int32(int32(i64)) + } + + case "filePath": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FilePath to be of type string, got %T instead", value) + } + sv.FilePath = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VulnerablePackageName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "packageManager": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageManager to be of type string, got %T instead", value) + } + sv.PackageManager = ptr.String(jtv) + } + + case "release": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Release to be of type string, got %T instead", value) + } + sv.Release = ptr.String(jtv) + } + + case "sourceLayerHash": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SourceLayerHash to be of type string, got %T instead", value) + } + sv.SourceLayerHash = ptr.String(jtv) + } + + case "version": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Version to be of type string, got %T instead", value) + } + sv.Version = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentVulnerablePackagesList(v *[]types.VulnerablePackage, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.VulnerablePackage + if *v == nil { + cv = []types.VulnerablePackage{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.VulnerablePackage + destAddr := &col + if err := awsAwsjson11_deserializeDocumentVulnerablePackage(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeOpDocumentBatchCheckLayerAvailabilityOutput(v **BatchCheckLayerAvailabilityOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8672,7 +11441,48 @@ func awsAwsjson11_deserializeOpDocumentBatchDeleteImageOutput(v **BatchDeleteIma var sv *BatchDeleteImageOutput if *v == nil { - sv = &BatchDeleteImageOutput{} + sv = &BatchDeleteImageOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "failures": + if err := awsAwsjson11_deserializeDocumentImageFailureList(&sv.Failures, value); err != nil { + return err + } + + case "imageIds": + if err := awsAwsjson11_deserializeDocumentImageIdentifierList(&sv.ImageIds, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentBatchGetImageOutput(v **BatchGetImageOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *BatchGetImageOutput + if *v == nil { + sv = &BatchGetImageOutput{} } else { sv = *v } @@ -8684,8 +11494,8 @@ func awsAwsjson11_deserializeOpDocumentBatchDeleteImageOutput(v **BatchDeleteIma return err } - case "imageIds": - if err := awsAwsjson11_deserializeDocumentImageIdentifierList(&sv.ImageIds, value); err != nil { + case "images": + if err := awsAwsjson11_deserializeDocumentImageList(&sv.Images, value); err != nil { return err } @@ -8698,7 +11508,7 @@ func awsAwsjson11_deserializeOpDocumentBatchDeleteImageOutput(v **BatchDeleteIma return nil } -func awsAwsjson11_deserializeOpDocumentBatchGetImageOutput(v **BatchGetImageOutput, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentBatchGetRepositoryScanningConfigurationOutput(v **BatchGetRepositoryScanningConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8711,9 +11521,9 @@ func awsAwsjson11_deserializeOpDocumentBatchGetImageOutput(v **BatchGetImageOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *BatchGetImageOutput + var sv *BatchGetRepositoryScanningConfigurationOutput if *v == nil { - sv = &BatchGetImageOutput{} + sv = &BatchGetRepositoryScanningConfigurationOutput{} } else { sv = *v } @@ -8721,12 +11531,12 @@ func awsAwsjson11_deserializeOpDocumentBatchGetImageOutput(v **BatchGetImageOutp for key, value := range shape { switch key { case "failures": - if err := awsAwsjson11_deserializeDocumentImageFailureList(&sv.Failures, value); err != nil { + if err := awsAwsjson11_deserializeDocumentRepositoryScanningConfigurationFailureList(&sv.Failures, value); err != nil { return err } - case "images": - if err := awsAwsjson11_deserializeDocumentImageList(&sv.Images, value); err != nil { + case "scanningConfigurations": + if err := awsAwsjson11_deserializeDocumentRepositoryScanningConfigurationList(&sv.ScanningConfigurations, value); err != nil { return err } @@ -8806,6 +11616,80 @@ func awsAwsjson11_deserializeOpDocumentCompleteLayerUploadOutput(v **CompleteLay return nil } +func awsAwsjson11_deserializeOpDocumentCreatePullThroughCacheRuleOutput(v **CreatePullThroughCacheRuleOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreatePullThroughCacheRuleOutput + if *v == nil { + sv = &CreatePullThroughCacheRuleOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected CreationTimestamp to be a JSON Number, got %T instead", value) + + } + } + + case "ecrRepositoryPrefix": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PullThroughCacheRuleRepositoryPrefix to be of type string, got %T instead", value) + } + sv.EcrRepositoryPrefix = ptr.String(jtv) + } + + case "registryId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RegistryId to be of type string, got %T instead", value) + } + sv.RegistryId = ptr.String(jtv) + } + + case "upstreamRegistryUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Url to be of type string, got %T instead", value) + } + sv.UpstreamRegistryUrl = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentCreateRepositoryOutput(v **CreateRepositoryOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8916,6 +11800,80 @@ func awsAwsjson11_deserializeOpDocumentDeleteLifecyclePolicyOutput(v **DeleteLif return nil } +func awsAwsjson11_deserializeOpDocumentDeletePullThroughCacheRuleOutput(v **DeletePullThroughCacheRuleOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeletePullThroughCacheRuleOutput + if *v == nil { + sv = &DeletePullThroughCacheRuleOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected CreationTimestamp to be a JSON Number, got %T instead", value) + + } + } + + case "ecrRepositoryPrefix": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PullThroughCacheRuleRepositoryPrefix to be of type string, got %T instead", value) + } + sv.EcrRepositoryPrefix = ptr.String(jtv) + } + + case "registryId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RegistryId to be of type string, got %T instead", value) + } + sv.RegistryId = ptr.String(jtv) + } + + case "upstreamRegistryUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Url to be of type string, got %T instead", value) + } + sv.UpstreamRegistryUrl = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentDeleteRegistryPolicyOutput(v **DeleteRegistryPolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -9227,6 +12185,51 @@ func awsAwsjson11_deserializeOpDocumentDescribeImagesOutput(v **DescribeImagesOu return nil } +func awsAwsjson11_deserializeOpDocumentDescribePullThroughCacheRulesOutput(v **DescribePullThroughCacheRulesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribePullThroughCacheRulesOutput + if *v == nil { + sv = &DescribePullThroughCacheRulesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "pullThroughCacheRules": + if err := awsAwsjson11_deserializeDocumentPullThroughCacheRuleList(&sv.PullThroughCacheRules, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentDescribeRegistryOutput(v **DescribeRegistryOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -9611,6 +12614,51 @@ func awsAwsjson11_deserializeOpDocumentGetRegistryPolicyOutput(v **GetRegistryPo return nil } +func awsAwsjson11_deserializeOpDocumentGetRegistryScanningConfigurationOutput(v **GetRegistryScanningConfigurationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetRegistryScanningConfigurationOutput + if *v == nil { + sv = &GetRegistryScanningConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "registryId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RegistryId to be of type string, got %T instead", value) + } + sv.RegistryId = ptr.String(jtv) + } + + case "scanningConfiguration": + if err := awsAwsjson11_deserializeDocumentRegistryScanningConfiguration(&sv.ScanningConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentGetRepositoryPolicyOutput(v **GetRepositoryPolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -10058,6 +13106,42 @@ func awsAwsjson11_deserializeOpDocumentPutRegistryPolicyOutput(v **PutRegistryPo return nil } +func awsAwsjson11_deserializeOpDocumentPutRegistryScanningConfigurationOutput(v **PutRegistryScanningConfigurationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutRegistryScanningConfigurationOutput + if *v == nil { + sv = &PutRegistryScanningConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "registryScanningConfiguration": + if err := awsAwsjson11_deserializeDocumentRegistryScanningConfiguration(&sv.RegistryScanningConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentPutReplicationConfigurationOutput(v **PutReplicationConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/ecr/generated.json b/service/ecr/generated.json index a1aed452a66..5f7cddbfa22 100644 --- a/service/ecr/generated.json +++ b/service/ecr/generated.json @@ -11,15 +11,19 @@ "api_op_BatchCheckLayerAvailability.go", "api_op_BatchDeleteImage.go", "api_op_BatchGetImage.go", + "api_op_BatchGetRepositoryScanningConfiguration.go", "api_op_CompleteLayerUpload.go", + "api_op_CreatePullThroughCacheRule.go", "api_op_CreateRepository.go", "api_op_DeleteLifecyclePolicy.go", + "api_op_DeletePullThroughCacheRule.go", "api_op_DeleteRegistryPolicy.go", "api_op_DeleteRepository.go", "api_op_DeleteRepositoryPolicy.go", "api_op_DescribeImageReplicationStatus.go", "api_op_DescribeImageScanFindings.go", "api_op_DescribeImages.go", + "api_op_DescribePullThroughCacheRules.go", "api_op_DescribeRegistry.go", "api_op_DescribeRepositories.go", "api_op_GetAuthorizationToken.go", @@ -27,6 +31,7 @@ "api_op_GetLifecyclePolicy.go", "api_op_GetLifecyclePolicyPreview.go", "api_op_GetRegistryPolicy.go", + "api_op_GetRegistryScanningConfiguration.go", "api_op_GetRepositoryPolicy.go", "api_op_InitiateLayerUpload.go", "api_op_ListImages.go", @@ -36,6 +41,7 @@ "api_op_PutImageTagMutability.go", "api_op_PutLifecyclePolicy.go", "api_op_PutRegistryPolicy.go", + "api_op_PutRegistryScanningConfiguration.go", "api_op_PutReplicationConfiguration.go", "api_op_SetRepositoryPolicy.go", "api_op_StartImageScan.go", diff --git a/service/ecr/serializers.go b/service/ecr/serializers.go index dbe3461ca88..e513d0312fd 100644 --- a/service/ecr/serializers.go +++ b/service/ecr/serializers.go @@ -180,6 +180,61 @@ func (m *awsAwsjson11_serializeOpBatchGetImage) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpBatchGetRepositoryScanningConfiguration struct { +} + +func (*awsAwsjson11_serializeOpBatchGetRepositoryScanningConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpBatchGetRepositoryScanningConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*BatchGetRepositoryScanningConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonEC2ContainerRegistry_V20150921.BatchGetRepositoryScanningConfiguration") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentBatchGetRepositoryScanningConfigurationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpCompleteLayerUpload struct { } @@ -235,6 +290,61 @@ func (m *awsAwsjson11_serializeOpCompleteLayerUpload) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpCreatePullThroughCacheRule struct { +} + +func (*awsAwsjson11_serializeOpCreatePullThroughCacheRule) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreatePullThroughCacheRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreatePullThroughCacheRuleInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonEC2ContainerRegistry_V20150921.CreatePullThroughCacheRule") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreatePullThroughCacheRuleInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpCreateRepository struct { } @@ -345,6 +455,61 @@ func (m *awsAwsjson11_serializeOpDeleteLifecyclePolicy) HandleSerialize(ctx cont return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDeletePullThroughCacheRule struct { +} + +func (*awsAwsjson11_serializeOpDeletePullThroughCacheRule) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeletePullThroughCacheRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeletePullThroughCacheRuleInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonEC2ContainerRegistry_V20150921.DeletePullThroughCacheRule") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeletePullThroughCacheRuleInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpDeleteRegistryPolicy struct { } @@ -675,6 +840,61 @@ func (m *awsAwsjson11_serializeOpDescribeImageScanFindings) HandleSerialize(ctx return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDescribePullThroughCacheRules struct { +} + +func (*awsAwsjson11_serializeOpDescribePullThroughCacheRules) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribePullThroughCacheRules) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribePullThroughCacheRulesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonEC2ContainerRegistry_V20150921.DescribePullThroughCacheRules") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribePullThroughCacheRulesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpDescribeRegistry struct { } @@ -1060,6 +1280,61 @@ func (m *awsAwsjson11_serializeOpGetRegistryPolicy) HandleSerialize(ctx context. return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpGetRegistryScanningConfiguration struct { +} + +func (*awsAwsjson11_serializeOpGetRegistryScanningConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetRegistryScanningConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetRegistryScanningConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonEC2ContainerRegistry_V20150921.GetRegistryScanningConfiguration") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetRegistryScanningConfigurationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpGetRepositoryPolicy struct { } @@ -1555,6 +1830,61 @@ func (m *awsAwsjson11_serializeOpPutRegistryPolicy) HandleSerialize(ctx context. return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpPutRegistryScanningConfiguration struct { +} + +func (*awsAwsjson11_serializeOpPutRegistryScanningConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutRegistryScanningConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutRegistryScanningConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonEC2ContainerRegistry_V20150921.PutRegistryScanningConfiguration") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutRegistryScanningConfigurationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpPutReplicationConfiguration struct { } @@ -2078,6 +2408,49 @@ func awsAwsjson11_serializeDocumentMediaTypeList(v []string, value smithyjson.Va return nil } +func awsAwsjson11_serializeDocumentPullThroughCacheRuleRepositoryPrefixList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentRegistryScanningRule(v *types.RegistryScanningRule, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RepositoryFilters != nil { + ok := object.Key("repositoryFilters") + if err := awsAwsjson11_serializeDocumentScanningRepositoryFilterList(v.RepositoryFilters, ok); err != nil { + return err + } + } + + if len(v.ScanFrequency) > 0 { + ok := object.Key("scanFrequency") + ok.String(string(v.ScanFrequency)) + } + + return nil +} + +func awsAwsjson11_serializeDocumentRegistryScanningRuleList(v []types.RegistryScanningRule, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentRegistryScanningRule(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsAwsjson11_serializeDocumentReplicationConfiguration(v *types.ReplicationConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2197,6 +2570,47 @@ func awsAwsjson11_serializeDocumentRepositoryNameList(v []string, value smithyjs return nil } +func awsAwsjson11_serializeDocumentScanningConfigurationRepositoryNameList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentScanningRepositoryFilter(v *types.ScanningRepositoryFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filter != nil { + ok := object.Key("filter") + ok.String(*v.Filter) + } + + if len(v.FilterType) > 0 { + ok := object.Key("filterType") + ok.String(string(v.FilterType)) + } + + return nil +} + +func awsAwsjson11_serializeDocumentScanningRepositoryFilterList(v []types.ScanningRepositoryFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentScanningRepositoryFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsAwsjson11_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2317,6 +2731,20 @@ func awsAwsjson11_serializeOpDocumentBatchGetImageInput(v *BatchGetImageInput, v return nil } +func awsAwsjson11_serializeOpDocumentBatchGetRepositoryScanningConfigurationInput(v *BatchGetRepositoryScanningConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RepositoryNames != nil { + ok := object.Key("repositoryNames") + if err := awsAwsjson11_serializeDocumentScanningConfigurationRepositoryNameList(v.RepositoryNames, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeOpDocumentCompleteLayerUploadInput(v *CompleteLayerUploadInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2346,6 +2774,28 @@ func awsAwsjson11_serializeOpDocumentCompleteLayerUploadInput(v *CompleteLayerUp return nil } +func awsAwsjson11_serializeOpDocumentCreatePullThroughCacheRuleInput(v *CreatePullThroughCacheRuleInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EcrRepositoryPrefix != nil { + ok := object.Key("ecrRepositoryPrefix") + ok.String(*v.EcrRepositoryPrefix) + } + + if v.RegistryId != nil { + ok := object.Key("registryId") + ok.String(*v.RegistryId) + } + + if v.UpstreamRegistryUrl != nil { + ok := object.Key("upstreamRegistryUrl") + ok.String(*v.UpstreamRegistryUrl) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentCreateRepositoryInput(v *CreateRepositoryInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2406,6 +2856,23 @@ func awsAwsjson11_serializeOpDocumentDeleteLifecyclePolicyInput(v *DeleteLifecyc return nil } +func awsAwsjson11_serializeOpDocumentDeletePullThroughCacheRuleInput(v *DeletePullThroughCacheRuleInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EcrRepositoryPrefix != nil { + ok := object.Key("ecrRepositoryPrefix") + ok.String(*v.EcrRepositoryPrefix) + } + + if v.RegistryId != nil { + ok := object.Key("registryId") + ok.String(*v.RegistryId) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDeleteRegistryPolicyInput(v *DeleteRegistryPolicyInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2551,6 +3018,35 @@ func awsAwsjson11_serializeOpDocumentDescribeImagesInput(v *DescribeImagesInput, return nil } +func awsAwsjson11_serializeOpDocumentDescribePullThroughCacheRulesInput(v *DescribePullThroughCacheRulesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EcrRepositoryPrefixes != nil { + ok := object.Key("ecrRepositoryPrefixes") + if err := awsAwsjson11_serializeDocumentPullThroughCacheRuleRepositoryPrefixList(v.EcrRepositoryPrefixes, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.RegistryId != nil { + ok := object.Key("registryId") + ok.String(*v.RegistryId) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDescribeRegistryInput(v *DescribeRegistryInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2688,6 +3184,13 @@ func awsAwsjson11_serializeOpDocumentGetRegistryPolicyInput(v *GetRegistryPolicy return nil } +func awsAwsjson11_serializeOpDocumentGetRegistryScanningConfigurationInput(v *GetRegistryScanningConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + return nil +} + func awsAwsjson11_serializeOpDocumentGetRepositoryPolicyInput(v *GetRepositoryPolicyInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2885,6 +3388,25 @@ func awsAwsjson11_serializeOpDocumentPutRegistryPolicyInput(v *PutRegistryPolicy return nil } +func awsAwsjson11_serializeOpDocumentPutRegistryScanningConfigurationInput(v *PutRegistryScanningConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Rules != nil { + ok := object.Key("rules") + if err := awsAwsjson11_serializeDocumentRegistryScanningRuleList(v.Rules, ok); err != nil { + return err + } + } + + if len(v.ScanType) > 0 { + ok := object.Key("scanType") + ok.String(string(v.ScanType)) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentPutReplicationConfigurationInput(v *PutReplicationConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/ecr/types/enums.go b/service/ecr/types/enums.go index 90f05a2697f..9356aabf1bb 100644 --- a/service/ecr/types/enums.go +++ b/service/ecr/types/enums.go @@ -202,13 +202,71 @@ func (RepositoryFilterType) Values() []RepositoryFilterType { } } +type ScanFrequency string + +// Enum values for ScanFrequency +const ( + ScanFrequencyScanOnPush ScanFrequency = "SCAN_ON_PUSH" + ScanFrequencyContinuousScan ScanFrequency = "CONTINUOUS_SCAN" + ScanFrequencyManual ScanFrequency = "MANUAL" +) + +// Values returns all known values for ScanFrequency. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ScanFrequency) Values() []ScanFrequency { + return []ScanFrequency{ + "SCAN_ON_PUSH", + "CONTINUOUS_SCAN", + "MANUAL", + } +} + +type ScanningConfigurationFailureCode string + +// Enum values for ScanningConfigurationFailureCode +const ( + ScanningConfigurationFailureCodeRepositoryNotFound ScanningConfigurationFailureCode = "REPOSITORY_NOT_FOUND" +) + +// Values returns all known values for ScanningConfigurationFailureCode. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. The ordering of this slice is not guaranteed to be stable across +// updates. +func (ScanningConfigurationFailureCode) Values() []ScanningConfigurationFailureCode { + return []ScanningConfigurationFailureCode{ + "REPOSITORY_NOT_FOUND", + } +} + +type ScanningRepositoryFilterType string + +// Enum values for ScanningRepositoryFilterType +const ( + ScanningRepositoryFilterTypeWildcard ScanningRepositoryFilterType = "WILDCARD" +) + +// Values returns all known values for ScanningRepositoryFilterType. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// The ordering of this slice is not guaranteed to be stable across updates. +func (ScanningRepositoryFilterType) Values() []ScanningRepositoryFilterType { + return []ScanningRepositoryFilterType{ + "WILDCARD", + } +} + type ScanStatus string // Enum values for ScanStatus const ( - ScanStatusInProgress ScanStatus = "IN_PROGRESS" - ScanStatusComplete ScanStatus = "COMPLETE" - ScanStatusFailed ScanStatus = "FAILED" + ScanStatusInProgress ScanStatus = "IN_PROGRESS" + ScanStatusComplete ScanStatus = "COMPLETE" + ScanStatusFailed ScanStatus = "FAILED" + ScanStatusUnsupportedImage ScanStatus = "UNSUPPORTED_IMAGE" + ScanStatusActive ScanStatus = "ACTIVE" + ScanStatusPending ScanStatus = "PENDING" + ScanStatusScanEligibilityExpired ScanStatus = "SCAN_ELIGIBILITY_EXPIRED" + ScanStatusFindingsUnavailable ScanStatus = "FINDINGS_UNAVAILABLE" ) // Values returns all known values for ScanStatus. Note that this can be expanded @@ -219,6 +277,29 @@ func (ScanStatus) Values() []ScanStatus { "IN_PROGRESS", "COMPLETE", "FAILED", + "UNSUPPORTED_IMAGE", + "ACTIVE", + "PENDING", + "SCAN_ELIGIBILITY_EXPIRED", + "FINDINGS_UNAVAILABLE", + } +} + +type ScanType string + +// Enum values for ScanType +const ( + ScanTypeBasic ScanType = "BASIC" + ScanTypeEnhanced ScanType = "ENHANCED" +) + +// Values returns all known values for ScanType. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (ScanType) Values() []ScanType { + return []ScanType{ + "BASIC", + "ENHANCED", } } diff --git a/service/ecr/types/errors.go b/service/ecr/types/errors.go index 536f374252e..944907efd14 100644 --- a/service/ecr/types/errors.go +++ b/service/ecr/types/errors.go @@ -382,6 +382,54 @@ func (e *LimitExceededException) ErrorMessage() string { func (e *LimitExceededException) ErrorCode() string { return "LimitExceededException" } func (e *LimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// A pull through cache rule with these settings already exists for the private +// registry. +type PullThroughCacheRuleAlreadyExistsException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *PullThroughCacheRuleAlreadyExistsException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *PullThroughCacheRuleAlreadyExistsException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *PullThroughCacheRuleAlreadyExistsException) ErrorCode() string { + return "PullThroughCacheRuleAlreadyExistsException" +} +func (e *PullThroughCacheRuleAlreadyExistsException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The pull through cache rule was not found. Specify a valid pull through cache +// rule and try again. +type PullThroughCacheRuleNotFoundException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *PullThroughCacheRuleNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *PullThroughCacheRuleNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *PullThroughCacheRuleNotFoundException) ErrorCode() string { + return "PullThroughCacheRuleNotFoundException" +} +func (e *PullThroughCacheRuleNotFoundException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + // The manifest list is referencing an image that does not exist. type ReferencedImagesNotFoundException struct { Message *string @@ -586,6 +634,29 @@ func (e *UnsupportedImageTypeException) ErrorMessage() string { func (e *UnsupportedImageTypeException) ErrorCode() string { return "UnsupportedImageTypeException" } func (e *UnsupportedImageTypeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The specified upstream registry isn't supported. +type UnsupportedUpstreamRegistryException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *UnsupportedUpstreamRegistryException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *UnsupportedUpstreamRegistryException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *UnsupportedUpstreamRegistryException) ErrorCode() string { + return "UnsupportedUpstreamRegistryException" +} +func (e *UnsupportedUpstreamRegistryException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + // The upload could not be found, or the specified upload ID is not valid for this // repository. type UploadNotFoundException struct { diff --git a/service/ecr/types/types.go b/service/ecr/types/types.go index 408a73c337c..2e79d0731cc 100644 --- a/service/ecr/types/types.go +++ b/service/ecr/types/types.go @@ -42,6 +42,88 @@ type AuthorizationData struct { noSmithyDocumentSerde } +// The image details of the Amazon ECR container image. +type AwsEcrContainerImageDetails struct { + + // The architecture of the Amazon ECR container image. + Architecture *string + + // The image author of the Amazon ECR container image. + Author *string + + // The image hash of the Amazon ECR container image. + ImageHash *string + + // The image tags attached to the Amazon ECR container image. + ImageTags []string + + // The platform of the Amazon ECR container image. + Platform *string + + // The date and time the Amazon ECR container image was pushed. + PushedAt *time.Time + + // The registry the Amazon ECR container image belongs to. + Registry *string + + // The name of the repository the Amazon ECR container image resides in. + RepositoryName *string + + noSmithyDocumentSerde +} + +// The CVSS score for a finding. +type CvssScore struct { + + // The base CVSS score used for the finding. + BaseScore float64 + + // The vector string of the CVSS score. + ScoringVector *string + + // The source of the CVSS score. + Source *string + + // The version of CVSS used for the score. + Version *string + + noSmithyDocumentSerde +} + +// Details on adjustments Amazon Inspector made to the CVSS score for a finding. +type CvssScoreAdjustment struct { + + // The metric used to adjust the CVSS score. + Metric *string + + // The reason the CVSS score has been adjustment. + Reason *string + + noSmithyDocumentSerde +} + +// Information about the CVSS score. +type CvssScoreDetails struct { + + // An object that contains details about adjustment Amazon Inspector made to the + // CVSS score. + Adjustments []CvssScoreAdjustment + + // The CVSS score. + Score float64 + + // The source for the CVSS score. + ScoreSource *string + + // The vector for the CVSS score. + ScoringVector *string + + // The CVSS version used in scoring. + Version *string + + noSmithyDocumentSerde +} + // An object representing a filter on a DescribeImages operation. type DescribeImagesFilter struct { @@ -73,13 +155,13 @@ type EncryptionConfiguration struct { // see Protecting data using server-side encryption with an KMS key stored in Key // Management Service (SSE-KMS) // (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html) in the - // Amazon Simple Storage Service Console Developer Guide.. If you use the AES256 + // Amazon Simple Storage Service Console Developer Guide. If you use the AES256 // encryption type, Amazon ECR uses server-side encryption with Amazon S3-managed // encryption keys which encrypts the images in the repository using an AES-256 // encryption algorithm. For more information, see Protecting data using // server-side encryption with Amazon S3-managed encryption keys (SSE-S3) // (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html) - // in the Amazon Simple Storage Service Console Developer Guide.. + // in the Amazon Simple Storage Service Console Developer Guide. // // This member is required. EncryptionType EncryptionType @@ -93,6 +175,58 @@ type EncryptionConfiguration struct { noSmithyDocumentSerde } +// The details of an enhanced image scan. This is returned when enhanced scanning +// is enabled for your private registry. +type EnhancedImageScanFinding struct { + + // The Amazon Web Services account ID associated with the image. + AwsAccountId *string + + // The description of the finding. + Description *string + + // The Amazon Resource Number (ARN) of the finding. + FindingArn *string + + // The date and time that the finding was first observed. + FirstObservedAt *time.Time + + // The date and time that the finding was last observed. + LastObservedAt *time.Time + + // An object that contains the details of a package vulnerability finding. + PackageVulnerabilityDetails *PackageVulnerabilityDetails + + // An object that contains the details about how to remediate a finding. + Remediation *Remediation + + // Contains information on the resources involved in a finding. + Resources []Resource + + // The Amazon Inspector score given to the finding. + Score float64 + + // An object that contains details of the Amazon Inspector score. + ScoreDetails *ScoreDetails + + // The severity of the finding. + Severity *string + + // The status of the finding. + Status *string + + // The title of the finding. + Title *string + + // The type of the finding. + Type *string + + // The date and time the finding was last updated at. + UpdatedAt *time.Time + + noSmithyDocumentSerde +} + // An object representing an Amazon ECR image. type Image struct { @@ -194,7 +328,8 @@ type ImageReplicationStatus struct { // The destination Region for the image replication. Region *string - // The AWS account ID associated with the registry to which the image belongs. + // The Amazon Web Services account ID associated with the registry to which the + // image belongs. RegistryId *string // The image replication status. @@ -227,6 +362,9 @@ type ImageScanFinding struct { // The details of an image scan. type ImageScanFindings struct { + // Details about the enhanced scan findings from Amazon Inspector. + EnhancedFindings []EnhancedImageScanFinding + // The image vulnerability counts, sorted by severity. FindingSeverityCounts map[string]int32 @@ -377,6 +515,113 @@ type ListImagesFilter struct { noSmithyDocumentSerde } +// Information about a package vulnerability finding. +type PackageVulnerabilityDetails struct { + + // An object that contains details about the CVSS score of a finding. + Cvss []CvssScore + + // One or more URLs that contain details about this vulnerability type. + ReferenceUrls []string + + // One or more vulnerabilities related to the one identified in this finding. + RelatedVulnerabilities []string + + // The source of the vulnerability information. + Source *string + + // A URL to the source of the vulnerability information. + SourceUrl *string + + // The date and time that this vulnerability was first added to the vendor's + // database. + VendorCreatedAt *time.Time + + // The severity the vendor has given to this vulnerability type. + VendorSeverity *string + + // The date and time the vendor last updated this vulnerability in their database. + VendorUpdatedAt *time.Time + + // The ID given to this vulnerability. + VulnerabilityId *string + + // The packages impacted by this vulnerability. + VulnerablePackages []VulnerablePackage + + noSmithyDocumentSerde +} + +// The details of a pull through cache rule. +type PullThroughCacheRule struct { + + // The date and time the pull through cache was created. + CreatedAt *time.Time + + // The Amazon ECR repository prefix associated with the pull through cache rule. + EcrRepositoryPrefix *string + + // The Amazon Web Services account ID associated with the registry the pull through + // cache rule is associated with. + RegistryId *string + + // The upstream registry URL associated with the pull through cache rule. + UpstreamRegistryUrl *string + + noSmithyDocumentSerde +} + +// Details about the recommended course of action to remediate the finding. +type Recommendation struct { + + // The recommended course of action to remediate the finding. + Text *string + + // The URL address to the CVE remediation recommendations. + Url *string + + noSmithyDocumentSerde +} + +// The scanning configuration for a private registry. +type RegistryScanningConfiguration struct { + + // The scanning rules associated with the registry. + Rules []RegistryScanningRule + + // The type of scanning configured for the registry. + ScanType ScanType + + noSmithyDocumentSerde +} + +// The details of a scanning rule for a private registry. +type RegistryScanningRule struct { + + // The repository filters associated with the scanning configuration for a private + // registry. + // + // This member is required. + RepositoryFilters []ScanningRepositoryFilter + + // The frequency that scans are performed at for a private registry. + // + // This member is required. + ScanFrequency ScanFrequency + + noSmithyDocumentSerde +} + +// Information on how to remediate a finding. +type Remediation struct { + + // An object that contains information about the recommended course of action to + // remediate the finding. + Recommendation *Recommendation + + noSmithyDocumentSerde +} + // The replication configuration for a registry. type ReplicationConfiguration struct { @@ -482,6 +727,96 @@ type RepositoryFilter struct { noSmithyDocumentSerde } +// The details of the scanning configuration for a repository. +type RepositoryScanningConfiguration struct { + + // The scan filters applied to the repository. + AppliedScanFilters []ScanningRepositoryFilter + + // The ARN of the repository. + RepositoryArn *string + + // The name of the repository. + RepositoryName *string + + // The scan frequency for the repository. + ScanFrequency ScanFrequency + + // Whether or not scan on push is configured for the repository. + ScanOnPush bool + + noSmithyDocumentSerde +} + +// The details about any failures associated with the scanning configuration of a +// repository. +type RepositoryScanningConfigurationFailure struct { + + // The failure code. + FailureCode ScanningConfigurationFailureCode + + // The reason for the failure. + FailureReason *string + + // The name of the repository. + RepositoryName *string + + noSmithyDocumentSerde +} + +// Details about the resource involved in a finding. +type Resource struct { + + // An object that contains details about the resource involved in a finding. + Details *ResourceDetails + + // The ID of the resource. + Id *string + + // The tags attached to the resource. + Tags map[string]string + + // The type of resource. + Type *string + + noSmithyDocumentSerde +} + +// Contains details about the resource involved in the finding. +type ResourceDetails struct { + + // An object that contains details about the Amazon ECR container image involved in + // the finding. + AwsEcrContainerImage *AwsEcrContainerImageDetails + + noSmithyDocumentSerde +} + +// The details of a scanning repository filter. +type ScanningRepositoryFilter struct { + + // The filter to use when scanning. + // + // This member is required. + Filter *string + + // The type associated with the filter. + // + // This member is required. + FilterType ScanningRepositoryFilterType + + noSmithyDocumentSerde +} + +// Information about the Amazon Inspector score given to a finding. +type ScoreDetails struct { + + // An object that contains details about the CVSS score given to a finding. + Cvss *CvssScoreDetails + + noSmithyDocumentSerde +} + // The metadata that you apply to a resource to help you categorize and organize // them. Each tag consists of a key and an optional value, both of which you // define. Tag keys can have a maximum character length of 128 characters, and tag @@ -499,4 +834,34 @@ type Tag struct { noSmithyDocumentSerde } +// Information on the vulnerable package identified by a finding. +type VulnerablePackage struct { + + // The architecture of the vulnerable package. + Arch *string + + // The epoch of the vulnerable package. + Epoch *int32 + + // The file path of the vulnerable package. + FilePath *string + + // The name of the vulnerable package. + Name *string + + // The package manager of the vulnerable package. + PackageManager *string + + // The release of the vulnerable package. + Release *string + + // The source layer hash of the vulnerable package. + SourceLayerHash *string + + // The version of the vulnerable package. + Version *string + + noSmithyDocumentSerde +} + type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/ecr/validators.go b/service/ecr/validators.go index 1baf1f52b77..9baf8c8cffe 100644 --- a/service/ecr/validators.go +++ b/service/ecr/validators.go @@ -70,6 +70,26 @@ func (m *validateOpBatchGetImage) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpBatchGetRepositoryScanningConfiguration struct { +} + +func (*validateOpBatchGetRepositoryScanningConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchGetRepositoryScanningConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchGetRepositoryScanningConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchGetRepositoryScanningConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCompleteLayerUpload struct { } @@ -90,6 +110,26 @@ func (m *validateOpCompleteLayerUpload) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpCreatePullThroughCacheRule struct { +} + +func (*validateOpCreatePullThroughCacheRule) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreatePullThroughCacheRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreatePullThroughCacheRuleInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreatePullThroughCacheRuleInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateRepository struct { } @@ -130,6 +170,26 @@ func (m *validateOpDeleteLifecyclePolicy) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpDeletePullThroughCacheRule struct { +} + +func (*validateOpDeletePullThroughCacheRule) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeletePullThroughCacheRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeletePullThroughCacheRuleInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeletePullThroughCacheRuleInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteRepository struct { } @@ -470,6 +530,26 @@ func (m *validateOpPutRegistryPolicy) HandleInitialize(ctx context.Context, in m return next.HandleInitialize(ctx, in) } +type validateOpPutRegistryScanningConfiguration struct { +} + +func (*validateOpPutRegistryScanningConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutRegistryScanningConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutRegistryScanningConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutRegistryScanningConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpPutReplicationConfiguration struct { } @@ -622,10 +702,18 @@ func addOpBatchGetImageValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpBatchGetImage{}, middleware.After) } +func addOpBatchGetRepositoryScanningConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchGetRepositoryScanningConfiguration{}, middleware.After) +} + func addOpCompleteLayerUploadValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCompleteLayerUpload{}, middleware.After) } +func addOpCreatePullThroughCacheRuleValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreatePullThroughCacheRule{}, middleware.After) +} + func addOpCreateRepositoryValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateRepository{}, middleware.After) } @@ -634,6 +722,10 @@ func addOpDeleteLifecyclePolicyValidationMiddleware(stack *middleware.Stack) err return stack.Initialize.Add(&validateOpDeleteLifecyclePolicy{}, middleware.After) } +func addOpDeletePullThroughCacheRuleValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeletePullThroughCacheRule{}, middleware.After) +} + func addOpDeleteRepositoryValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteRepository{}, middleware.After) } @@ -702,6 +794,10 @@ func addOpPutRegistryPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutRegistryPolicy{}, middleware.After) } +func addOpPutRegistryScanningConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutRegistryScanningConfiguration{}, middleware.After) +} + func addOpPutReplicationConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutReplicationConfiguration{}, middleware.After) } @@ -745,6 +841,45 @@ func validateEncryptionConfiguration(v *types.EncryptionConfiguration) error { } } +func validateRegistryScanningRule(v *types.RegistryScanningRule) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RegistryScanningRule"} + if len(v.ScanFrequency) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ScanFrequency")) + } + if v.RepositoryFilters == nil { + invalidParams.Add(smithy.NewErrParamRequired("RepositoryFilters")) + } else if v.RepositoryFilters != nil { + if err := validateScanningRepositoryFilterList(v.RepositoryFilters); err != nil { + invalidParams.AddNested("RepositoryFilters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRegistryScanningRuleList(v []types.RegistryScanningRule) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RegistryScanningRuleList"} + for i := range v { + if err := validateRegistryScanningRule(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateReplicationConfiguration(v *types.ReplicationConfiguration) error { if v == nil { return nil @@ -875,6 +1010,41 @@ func validateRepositoryFilterList(v []types.RepositoryFilter) error { } } +func validateScanningRepositoryFilter(v *types.ScanningRepositoryFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ScanningRepositoryFilter"} + if v.Filter == nil { + invalidParams.Add(smithy.NewErrParamRequired("Filter")) + } + if len(v.FilterType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("FilterType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateScanningRepositoryFilterList(v []types.ScanningRepositoryFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ScanningRepositoryFilterList"} + for i := range v { + if err := validateScanningRepositoryFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpBatchCheckLayerAvailabilityInput(v *BatchCheckLayerAvailabilityInput) error { if v == nil { return nil @@ -929,6 +1099,21 @@ func validateOpBatchGetImageInput(v *BatchGetImageInput) error { } } +func validateOpBatchGetRepositoryScanningConfigurationInput(v *BatchGetRepositoryScanningConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchGetRepositoryScanningConfigurationInput"} + if v.RepositoryNames == nil { + invalidParams.Add(smithy.NewErrParamRequired("RepositoryNames")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCompleteLayerUploadInput(v *CompleteLayerUploadInput) error { if v == nil { return nil @@ -950,6 +1135,24 @@ func validateOpCompleteLayerUploadInput(v *CompleteLayerUploadInput) error { } } +func validateOpCreatePullThroughCacheRuleInput(v *CreatePullThroughCacheRuleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreatePullThroughCacheRuleInput"} + if v.EcrRepositoryPrefix == nil { + invalidParams.Add(smithy.NewErrParamRequired("EcrRepositoryPrefix")) + } + if v.UpstreamRegistryUrl == nil { + invalidParams.Add(smithy.NewErrParamRequired("UpstreamRegistryUrl")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateRepositoryInput(v *CreateRepositoryInput) error { if v == nil { return nil @@ -985,6 +1188,21 @@ func validateOpDeleteLifecyclePolicyInput(v *DeleteLifecyclePolicyInput) error { } } +func validateOpDeletePullThroughCacheRuleInput(v *DeletePullThroughCacheRuleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeletePullThroughCacheRuleInput"} + if v.EcrRepositoryPrefix == nil { + invalidParams.Add(smithy.NewErrParamRequired("EcrRepositoryPrefix")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteRepositoryInput(v *DeleteRepositoryInput) error { if v == nil { return nil @@ -1261,6 +1479,23 @@ func validateOpPutRegistryPolicyInput(v *PutRegistryPolicyInput) error { } } +func validateOpPutRegistryScanningConfigurationInput(v *PutRegistryScanningConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutRegistryScanningConfigurationInput"} + if v.Rules != nil { + if err := validateRegistryScanningRuleList(v.Rules); err != nil { + invalidParams.AddNested("Rules", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpPutReplicationConfigurationInput(v *PutReplicationConfigurationInput) error { if v == nil { return nil diff --git a/service/ecs/types/types.go b/service/ecs/types/types.go index 6f352ab4357..821b0273338 100644 --- a/service/ecs/types/types.go +++ b/service/ecs/types/types.go @@ -819,9 +819,11 @@ type ContainerDefinition struct { // value, memory must be greater than memoryReservation. If you specify // memoryReservation, then that value is subtracted from the available memory // resources for the container instance where the container is placed. Otherwise, - // the value of memory is used. The Docker daemon reserves a minimum of 4 MiB of - // memory for a container. Therefore, we recommend that you specify fewer than 4 - // MiB of memory for your containers. + // the value of memory is used. The Docker 20.10.0 or later daemon reserves a + // minimum of 6 MiB of memory for a container, so you should not specify fewer than + // 6 MiB of memory for your containers. The Docker 19.03.13-ce or earlier daemon + // reserves a minimum of 4 MiB of memory for a container, so you should not specify + // fewer than 4 MiB of memory for your containers. Memory *int32 // The soft limit (in MiB) of memory to reserve for the container. When system @@ -2715,10 +2717,15 @@ type ResourceRequirement struct { noSmithyDocumentSerde } -// Information about the platform for the Amazon ECS service or task. +// Information about the platform for the Amazon ECS service or task. For more +// informataion about RuntimePlatform, see RuntimePlatform +// (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#runtime-platform) +// in the Amazon Elastic Container Service Developer Guide. type RuntimePlatform struct { - // The CPU architecture. + // The CPU architecture. You can run your Linux tasks on an ARM-based platform by + // setting the value to ARM64. This option is avaiable for tasks that run on Linuc + // Amazon EC2 instance or Linux containers on Fargate. CpuArchitecture CPUArchitecture // The operating system. diff --git a/service/eks/api_op_AssociateIdentityProviderConfig.go b/service/eks/api_op_AssociateIdentityProviderConfig.go index 742b638ad7f..d934a63c62c 100644 --- a/service/eks/api_op_AssociateIdentityProviderConfig.go +++ b/service/eks/api_op_AssociateIdentityProviderConfig.go @@ -54,8 +54,7 @@ type AssociateIdentityProviderConfigInput struct { ClientRequestToken *string // The metadata to apply to the configuration to assist with categorization and - // organization. Each tag consists of a key and an optional value, both of which - // you define. + // organization. Each tag consists of a key and an optional value. You define both. Tags map[string]string noSmithyDocumentSerde diff --git a/service/eks/api_op_CreateAddon.go b/service/eks/api_op_CreateAddon.go index ee3713a1c0f..833b1ad02ed 100644 --- a/service/eks/api_op_CreateAddon.go +++ b/service/eks/api_op_CreateAddon.go @@ -76,8 +76,7 @@ type CreateAddonInput struct { ServiceAccountRoleArn *string // The metadata to apply to the cluster to assist with categorization and - // organization. Each tag consists of a key and an optional value, both of which - // you define. + // organization. Each tag consists of a key and an optional value. You define both. Tags map[string]string noSmithyDocumentSerde diff --git a/service/eks/api_op_CreateCluster.go b/service/eks/api_op_CreateCluster.go index 3e04d6c4db9..fe21c0ce73d 100644 --- a/service/eks/api_op_CreateCluster.go +++ b/service/eks/api_op_CreateCluster.go @@ -15,19 +15,19 @@ import ( // Creates an Amazon EKS control plane. The Amazon EKS control plane consists of // control plane instances that run the Kubernetes software, such as etcd and the // API server. The control plane runs in an account managed by Amazon Web Services, -// and the Kubernetes API is exposed via the Amazon EKS API server endpoint. Each -// Amazon EKS cluster control plane is single-tenant and unique and runs on its own +// and the Kubernetes API is exposed by the Amazon EKS API server endpoint. Each +// Amazon EKS cluster control plane is single tenant and unique. It runs on its own // set of Amazon EC2 instances. The cluster control plane is provisioned across // multiple Availability Zones and fronted by an Elastic Load Balancing Network // Load Balancer. Amazon EKS also provisions elastic network interfaces in your VPC // subnets to provide connectivity from the control plane instances to the nodes // (for example, to support kubectl exec, logs, and proxy data flows). Amazon EKS // nodes run in your Amazon Web Services account and connect to your cluster's -// control plane via the Kubernetes API server endpoint and a certificate file that -// is created for your cluster. Cluster creation typically takes several minutes. -// After you create an Amazon EKS cluster, you must configure your Kubernetes -// tooling to communicate with the API server and launch nodes into your cluster. -// For more information, see Managing Cluster Authentication +// control plane over the Kubernetes API server endpoint and a certificate file +// that is created for your cluster. In most cases, it takes several minutes to +// create a cluster. After you create an Amazon EKS cluster, you must configure +// your Kubernetes tooling to communicate with the API server and launch nodes into +// your cluster. For more information, see Managing Cluster Authentication // (https://docs.aws.amazon.com/eks/latest/userguide/managing-auth.html) and // Launching Amazon EKS nodes // (https://docs.aws.amazon.com/eks/latest/userguide/launch-workers.html) in the @@ -54,14 +54,14 @@ type CreateClusterInput struct { // This member is required. Name *string - // The VPC configuration used by the cluster control plane. Amazon EKS VPC + // The VPC configuration that's used by the cluster control plane. Amazon EKS VPC // resources have specific requirements to work properly with Kubernetes. For more // information, see Cluster VPC Considerations // (https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html) and Cluster // Security Group Considerations // (https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html) in the // Amazon EKS User Guide. You must specify at least two subnets. You can specify up - // to five security groups, but we recommend that you use a dedicated security + // to five security groups. However, we recommend that you use a dedicated security // group for your cluster control plane. // // This member is required. @@ -96,8 +96,7 @@ type CreateClusterInput struct { Logging *types.Logging // The metadata to apply to the cluster to assist with categorization and - // organization. Each tag consists of a key and an optional value, both of which - // you define. + // organization. Each tag consists of a key and an optional value. You define both. Tags map[string]string // The desired Kubernetes version for your cluster. If you don't specify a value diff --git a/service/eks/api_op_CreateFargateProfile.go b/service/eks/api_op_CreateFargateProfile.go index 08aa6bbfd59..17e84a67bed 100644 --- a/service/eks/api_op_CreateFargateProfile.go +++ b/service/eks/api_op_CreateFargateProfile.go @@ -92,10 +92,9 @@ type CreateFargateProfileInput struct { Subnets []string // The metadata to apply to the Fargate profile to assist with categorization and - // organization. Each tag consists of a key and an optional value, both of which - // you define. Fargate profile tags do not propagate to any other resources - // associated with the Fargate profile, such as the pods that are scheduled with - // it. + // organization. Each tag consists of a key and an optional value. You define both. + // Fargate profile tags do not propagate to any other resources associated with the + // Fargate profile, such as the pods that are scheduled with it. Tags map[string]string noSmithyDocumentSerde diff --git a/service/eks/api_op_CreateNodegroup.go b/service/eks/api_op_CreateNodegroup.go index 46309e044e4..2249c9fd62e 100644 --- a/service/eks/api_op_CreateNodegroup.go +++ b/service/eks/api_op_CreateNodegroup.go @@ -160,9 +160,9 @@ type CreateNodegroupInput struct { ScalingConfig *types.NodegroupScalingConfig // The metadata to apply to the node group to assist with categorization and - // organization. Each tag consists of a key and an optional value, both of which - // you define. Node group tags do not propagate to any other resources associated - // with the node group, such as the Amazon EC2 instances or subnets. + // organization. Each tag consists of a key and an optional value. You define both. + // Node group tags do not propagate to any other resources associated with the node + // group, such as the Amazon EC2 instances or subnets. Tags map[string]string // The Kubernetes taints to be applied to the nodes in the node group. diff --git a/service/eks/api_op_ListClusters.go b/service/eks/api_op_ListClusters.go index 5ad0a3ff2e1..34bc39ae0ae 100644 --- a/service/eks/api_op_ListClusters.go +++ b/service/eks/api_op_ListClusters.go @@ -30,8 +30,9 @@ func (c *Client) ListClusters(ctx context.Context, params *ListClustersInput, op type ListClustersInput struct { - // Indicates whether connected clusters are included in the returned list. Default - // value is 'ALL'. + // Indicates whether external clusters are included in the returned list. Use 'all' + // to return connected clusters, or blank to return only Amazon EKS clusters. 'all' + // must be in lowercase otherwise an error occurs. Include []string // The maximum number of cluster results returned by ListClusters in paginated diff --git a/service/eks/deserializers.go b/service/eks/deserializers.go index 9dea097aef6..23e7b8c07da 100644 --- a/service/eks/deserializers.go +++ b/service/eks/deserializers.go @@ -4325,9 +4325,15 @@ func awsRestjson1_deserializeOpErrorRegisterCluster(response *smithyhttp.Respons case strings.EqualFold("InvalidParameterException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("ResourceInUseException", errorCode): + return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) + case strings.EqualFold("ResourceLimitExceededException", errorCode): return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + case strings.EqualFold("ResourcePropagationDelayException", errorCode): + return awsRestjson1_deserializeErrorResourcePropagationDelayException(response, errorBody) + case strings.EqualFold("ServerException", errorCode): return awsRestjson1_deserializeErrorServerException(response, errorBody) @@ -5686,6 +5692,42 @@ func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp return output } +func awsRestjson1_deserializeErrorResourcePropagationDelayException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourcePropagationDelayException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentResourcePropagationDelayException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + func awsRestjson1_deserializeErrorServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ServerException{} var buff [1024]byte @@ -8817,6 +8859,46 @@ func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.Resourc return nil } +func awsRestjson1_deserializeDocumentResourcePropagationDelayException(v **types.ResourcePropagationDelayException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourcePropagationDelayException + if *v == nil { + sv = &types.ResourcePropagationDelayException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentServerException(v **types.ServerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/eks/types/errors.go b/service/eks/types/errors.go index ffabfc73f32..29cebba7915 100644 --- a/service/eks/types/errors.go +++ b/service/eks/types/errors.go @@ -215,6 +215,28 @@ func (e *ResourceNotFoundException) ErrorMessage() string { func (e *ResourceNotFoundException) ErrorCode() string { return "ResourceNotFoundException" } func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// Required resources (such as Service Linked Roles) were created and are still +// propagating. Retry later. +type ResourcePropagationDelayException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *ResourcePropagationDelayException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourcePropagationDelayException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourcePropagationDelayException) ErrorCode() string { + return "ResourcePropagationDelayException" +} +func (e *ResourcePropagationDelayException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // These errors are usually caused by a server-side issue. type ServerException struct { Message *string diff --git a/service/eks/types/types.go b/service/eks/types/types.go index 87893305b2c..1fa315c17f4 100644 --- a/service/eks/types/types.go +++ b/service/eks/types/types.go @@ -41,9 +41,8 @@ type Addon struct { Status AddonStatus // The metadata that you apply to the add-on to assist with categorization and - // organization. Each tag consists of a key and an optional value, both of which - // you define. Add-on tags do not propagate to any other resources associated with - // the cluster. + // organization. Each tag consists of a key and an optional value. You define both. + // Add-on tags do not propagate to any other resources associated with the cluster. Tags map[string]string noSmithyDocumentSerde @@ -186,9 +185,9 @@ type Cluster struct { Status ClusterStatus // The metadata that you apply to the cluster to assist with categorization and - // organization. Each tag consists of a key and an optional value, both of which - // you define. Cluster tags do not propagate to any other resources associated with - // the cluster. + // organization. Each tag consists of a key and an optional value. You define both. + // Cluster tags do not propagate to any other resources associated with the + // cluster. Tags map[string]string // The Kubernetes server version for the cluster. @@ -333,10 +332,9 @@ type FargateProfile struct { Subnets []string // The metadata applied to the Fargate profile to assist with categorization and - // organization. Each tag consists of a key and an optional value, both of which - // you define. Fargate profile tags do not propagate to any other resources - // associated with the Fargate profile, such as the pods that are scheduled with - // it. + // organization. Each tag consists of a key and an optional value. You define both. + // Fargate profile tags do not propagate to any other resources associated with the + // Fargate profile, such as the pods that are scheduled with it. Tags map[string]string noSmithyDocumentSerde @@ -655,9 +653,9 @@ type Nodegroup struct { Subnets []string // The metadata applied to the node group to assist with categorization and - // organization. Each tag consists of a key and an optional value, both of which - // you define. Node group tags do not propagate to any other resources associated - // with the node group, such as the Amazon EC2 instances or subnets. + // organization. Each tag consists of a key and an optional value. You define both. + // Node group tags do not propagate to any other resources associated with the node + // group, such as the Amazon EC2 instances or subnets. Tags map[string]string // The Kubernetes taints to be applied to the nodes in the node group when they are @@ -798,7 +796,7 @@ type OidcIdentityProviderConfig struct { // The metadata to apply to the provider configuration to assist with // categorization and organization. Each tag consists of a key and an optional - // value, both of which you defined. + // value. You define both. Tags map[string]string // The JSON Web token (JWT) claim that is used as the username. diff --git a/service/elasticache/api_op_CreateCacheCluster.go b/service/elasticache/api_op_CreateCacheCluster.go index 95323dc908f..94b81afda87 100644 --- a/service/elasticache/api_op_CreateCacheCluster.go +++ b/service/elasticache/api_op_CreateCacheCluster.go @@ -70,7 +70,9 @@ type CreateCacheClusterInput struct { // http://redis.io/commands/AUTH. AuthToken *string - // This parameter is currently disabled. + // If you are running Redis engine version 6.0 or later, set this parameter to yes + // if you want to opt-in to the next auto minor version upgrade campaign. This + // parameter is disabled for previous versions. AutoMinorVersionUpgrade *bool // The compute and memory capacity of the nodes in the node group (shard). The @@ -82,7 +84,7 @@ type CreateCacheClusterInput struct { // General purpose: // // * Current generation: M6g node types (available only for Redis - // engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward). + // engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward): // cache.m6g.large, cache.m6g.xlarge, cache.m6g.2xlarge, cache.m6g.4xlarge, // cache.m6g.8xlarge, cache.m6g.12xlarge, cache.m6g.16xlarge For region // availability, see Supported Node Types @@ -90,27 +92,37 @@ type CreateCacheClusterInput struct { // M5 node types: cache.m5.large, cache.m5.xlarge, cache.m5.2xlarge, // cache.m5.4xlarge, cache.m5.12xlarge, cache.m5.24xlarge M4 node types: // cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, - // cache.m4.10xlarge T3 node types: cache.t3.micro, cache.t3.small, cache.t3.medium - // T2 node types: cache.t2.micro, cache.t2.small, cache.t2.medium + // cache.m4.10xlarge T4g node types (available only for Redis engine version 5.0.6 + // onward and Memcached engine version 1.5.16 onward): cache.t4g.micro, + // cache.t4g.small, cache.t4g.medium T3 node types: cache.t3.micro, cache.t3.small, + // cache.t3.medium T2 node types: cache.t2.micro, cache.t2.small, + // cache.t2.medium // - // * Previous - // generation: (not recommended) T1 node types: cache.t1.micro M1 node types: - // cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge M3 node types: - // cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge + // * Previous generation: (not recommended) T1 node types: + // cache.t1.micro M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, + // cache.m1.xlarge M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, + // cache.m3.2xlarge // - // * Compute - // optimized: + // * Compute optimized: // - // * Previous generation: (not recommended) C1 node types: - // cache.c1.xlarge + // * Previous generation: (not recommended) + // C1 node types: cache.c1.xlarge // - // * Memory optimized: + // * Memory optimized with data tiering: // - // * Current generation: R6g node types - // (available only for Redis engine version 5.0.6 onward and for Memcached engine - // version 1.5.16 onward). cache.r6g.large, cache.r6g.xlarge, cache.r6g.2xlarge, - // cache.r6g.4xlarge, cache.r6g.8xlarge, cache.r6g.12xlarge, cache.r6g.16xlarge For - // region availability, see Supported Node Types + // * Current + // generation: R6gd node types (available only for Redis engine version 6.2 + // onward). cache.r6gd.xlarge, cache.r6gd.2xlarge, cache.r6gd.4xlarge, + // cache.r6gd.8xlarge, cache.r6gd.12xlarge, cache.r6gd.16xlarge + // + // * Memory + // optimized: + // + // * Current generation: R6g node types (available only for Redis + // engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward). + // cache.r6g.large, cache.r6g.xlarge, cache.r6g.2xlarge, cache.r6g.4xlarge, + // cache.r6g.8xlarge, cache.r6g.12xlarge, cache.r6g.16xlarge For region + // availability, see Supported Node Types // (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) // R5 node types: cache.r5.large, cache.r5.xlarge, cache.r5.2xlarge, // cache.r5.4xlarge, cache.r5.12xlarge, cache.r5.24xlarge R4 node types: diff --git a/service/elasticache/api_op_CreateCacheParameterGroup.go b/service/elasticache/api_op_CreateCacheParameterGroup.go index dfa7934cb6b..0ccafe9d88b 100644 --- a/service/elasticache/api_op_CreateCacheParameterGroup.go +++ b/service/elasticache/api_op_CreateCacheParameterGroup.go @@ -46,7 +46,7 @@ type CreateCacheParameterGroupInput struct { // The name of the cache parameter group family that the cache parameter group can // be used with. Valid values are: memcached1.4 | memcached1.5 | memcached1.6 | - // redis2.6 | redis2.8 | redis3.2 | redis4.0 | redis5.0 | redis6.x | + // redis2.6 | redis2.8 | redis3.2 | redis4.0 | redis5.0 | redis6.0 | redis6.2 // // This member is required. CacheParameterGroupFamily *string diff --git a/service/elasticache/api_op_CreateReplicationGroup.go b/service/elasticache/api_op_CreateReplicationGroup.go index 7609c31976e..c22d9545865 100644 --- a/service/elasticache/api_op_CreateReplicationGroup.go +++ b/service/elasticache/api_op_CreateReplicationGroup.go @@ -105,7 +105,9 @@ type CreateReplicationGroupInput struct { // AUTH password (http://redis.io/commands/AUTH) at http://redis.io/commands/AUTH. AuthToken *string - // This parameter is currently disabled. + // If you are running Redis engine version 6.0 or later, set this parameter to yes + // if you want to opt-in to the next auto minor version upgrade campaign. This + // parameter is disabled for previous versions. AutoMinorVersionUpgrade *bool // Specifies whether a read-only replica is automatically promoted to read/write @@ -122,7 +124,7 @@ type CreateReplicationGroupInput struct { // General purpose: // // * Current generation: M6g node types (available only for Redis - // engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward). + // engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward): // cache.m6g.large, cache.m6g.xlarge, cache.m6g.2xlarge, cache.m6g.4xlarge, // cache.m6g.8xlarge, cache.m6g.12xlarge, cache.m6g.16xlarge For region // availability, see Supported Node Types @@ -130,27 +132,41 @@ type CreateReplicationGroupInput struct { // M5 node types: cache.m5.large, cache.m5.xlarge, cache.m5.2xlarge, // cache.m5.4xlarge, cache.m5.12xlarge, cache.m5.24xlarge M4 node types: // cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, - // cache.m4.10xlarge T3 node types: cache.t3.micro, cache.t3.small, cache.t3.medium - // T2 node types: cache.t2.micro, cache.t2.small, cache.t2.medium + // cache.m4.10xlarge T4g node types (available only for Redis engine version 5.0.6 + // onward and Memcached engine version 1.5.16 onward): // - // * Previous - // generation: (not recommended) T1 node types: cache.t1.micro M1 node types: - // cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge M3 node types: - // cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge + // cache.t4g.micro, + // cache.t4g.small, cache.t4g.medium // - // * Compute - // optimized: + // T3 node types: cache.t3.micro, + // cache.t3.small, cache.t3.medium T2 node types: cache.t2.micro, cache.t2.small, + // cache.t2.medium + // + // * Previous generation: (not recommended) T1 node types: + // cache.t1.micro M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, + // cache.m1.xlarge M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, + // cache.m3.2xlarge + // + // * Compute optimized: + // + // * Previous generation: (not recommended) + // C1 node types: cache.c1.xlarge // - // * Previous generation: (not recommended) C1 node types: - // cache.c1.xlarge + // * Memory optimized with data tiering: // - // * Memory optimized: + // * Current + // generation: R6gd node types (available only for Redis engine version 6.2 + // onward). cache.r6gd.xlarge, cache.r6gd.2xlarge, cache.r6gd.4xlarge, + // cache.r6gd.8xlarge, cache.r6gd.12xlarge, cache.r6gd.16xlarge // - // * Current generation: R6g node types - // (available only for Redis engine version 5.0.6 onward and for Memcached engine - // version 1.5.16 onward). cache.r6g.large, cache.r6g.xlarge, cache.r6g.2xlarge, - // cache.r6g.4xlarge, cache.r6g.8xlarge, cache.r6g.12xlarge, cache.r6g.16xlarge For - // region availability, see Supported Node Types + // * Memory + // optimized: + // + // * Current generation: R6g node types (available only for Redis + // engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward). + // cache.r6g.large, cache.r6g.xlarge, cache.r6g.2xlarge, cache.r6g.4xlarge, + // cache.r6g.8xlarge, cache.r6g.12xlarge, cache.r6g.16xlarge For region + // availability, see Supported Node Types // (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) // R5 node types: cache.r5.large, cache.r5.xlarge, cache.r5.2xlarge, // cache.r5.4xlarge, cache.r5.12xlarge, cache.r5.24xlarge R4 node types: @@ -203,6 +219,12 @@ type CreateReplicationGroupInput struct { // (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SubnetGroups.html). CacheSubnetGroupName *string + // Enables data tiering. Data tiering is only supported for replication groups + // using the r6gd node type. This parameter must be set to true when using r6gd + // nodes. For more information, see Data tiering + // (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/data-tiering.html). + DataTieringEnabled *bool + // The name of the cache engine to be used for the clusters in this replication // group. Must be Redis. Engine *string diff --git a/service/elasticache/api_op_CreateUser.go b/service/elasticache/api_op_CreateUser.go index b7dda70fc24..d03ec3fb911 100644 --- a/service/elasticache/api_op_CreateUser.go +++ b/service/elasticache/api_op_CreateUser.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// For Redis engine version 6.x onwards: Creates a Redis user. For more +// For Redis engine version 6.0 onwards: Creates a Redis user. For more // information, see Using Role Based Access Control (RBAC) // (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.RBAC.html). func (c *Client) CreateUser(ctx context.Context, params *CreateUserInput, optFns ...func(*Options)) (*CreateUserOutput, error) { @@ -78,6 +78,9 @@ type CreateUserOutput struct { // The current supported value is Redis. Engine *string + // The minimum engine version required, which is Redis 6.0 + MinimumEngineVersion *string + // Indicates the user status. Can be "active", "modifying" or "deleting". Status *string diff --git a/service/elasticache/api_op_CreateUserGroup.go b/service/elasticache/api_op_CreateUserGroup.go index cae3ead8650..a9dde9a7608 100644 --- a/service/elasticache/api_op_CreateUserGroup.go +++ b/service/elasticache/api_op_CreateUserGroup.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// For Redis engine version 6.x onwards: Creates a Redis user group. For more +// For Redis engine version 6.0 onwards: Creates a Redis user group. For more // information, see Using Role Based Access Control (RBAC) // (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.RBAC.html) func (c *Client) CreateUserGroup(ctx context.Context, params *CreateUserGroupInput, optFns ...func(*Options)) (*CreateUserGroupOutput, error) { @@ -59,6 +59,9 @@ type CreateUserGroupOutput struct { // The current supported value is Redis. Engine *string + // The minimum engine version required, which is Redis 6.0 + MinimumEngineVersion *string + // A list of updates being applied to the user group. PendingChanges *types.UserGroupPendingChanges diff --git a/service/elasticache/api_op_DeleteUser.go b/service/elasticache/api_op_DeleteUser.go index 9968f56b2f6..73820e0834b 100644 --- a/service/elasticache/api_op_DeleteUser.go +++ b/service/elasticache/api_op_DeleteUser.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// For Redis engine version 6.x onwards: Deletes a user. The user will be removed +// For Redis engine version 6.0 onwards: Deletes a user. The user will be removed // from all user groups and in turn removed from all replication groups. For more // information, see Using Role Based Access Control (RBAC) // (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.RBAC.html). @@ -54,6 +54,9 @@ type DeleteUserOutput struct { // The current supported value is Redis. Engine *string + // The minimum engine version required, which is Redis 6.0 + MinimumEngineVersion *string + // Indicates the user status. Can be "active", "modifying" or "deleting". Status *string diff --git a/service/elasticache/api_op_DeleteUserGroup.go b/service/elasticache/api_op_DeleteUserGroup.go index 00b2e6b4a37..e761f2b0996 100644 --- a/service/elasticache/api_op_DeleteUserGroup.go +++ b/service/elasticache/api_op_DeleteUserGroup.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// For Redis engine version 6.x onwards: Deletes a user group. The user group must +// For Redis engine version 6.0 onwards: Deletes a user group. The user group must // first be disassociated from the replication group before it can be deleted. For // more information, see Using Role Based Access Control (RBAC) // (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.RBAC.html). @@ -48,6 +48,9 @@ type DeleteUserGroupOutput struct { // The current supported value is Redis. Engine *string + // The minimum engine version required, which is Redis 6.0 + MinimumEngineVersion *string + // A list of updates being applied to the user group. PendingChanges *types.UserGroupPendingChanges diff --git a/service/elasticache/api_op_DescribeCacheEngineVersions.go b/service/elasticache/api_op_DescribeCacheEngineVersions.go index e1dafdbb6e1..0902463b12f 100644 --- a/service/elasticache/api_op_DescribeCacheEngineVersions.go +++ b/service/elasticache/api_op_DescribeCacheEngineVersions.go @@ -33,15 +33,15 @@ type DescribeCacheEngineVersionsInput struct { // The name of a specific cache parameter group family to return details for. Valid // values are: memcached1.4 | memcached1.5 | memcached1.6 | redis2.6 | redis2.8 | - // redis3.2 | redis4.0 | redis5.0 | redis6.x | Constraints: + // redis3.2 | redis4.0 | redis5.0 | redis6.x | redis6.2 Constraints: // - // * Must be 1 to 255 - // alphanumeric characters + // * Must be 1 + // to 255 alphanumeric characters // // * First character must be a letter // - // * Cannot end with a - // hyphen or contain two consecutive hyphens + // * Cannot end + // with a hyphen or contain two consecutive hyphens CacheParameterGroupFamily *string // If true, specifies that only the default version of the specified engine or diff --git a/service/elasticache/api_op_DescribeEngineDefaultParameters.go b/service/elasticache/api_op_DescribeEngineDefaultParameters.go index 5e65599847a..b32649f78fe 100644 --- a/service/elasticache/api_op_DescribeEngineDefaultParameters.go +++ b/service/elasticache/api_op_DescribeEngineDefaultParameters.go @@ -34,7 +34,7 @@ type DescribeEngineDefaultParametersInput struct { // The name of the cache parameter group family. Valid values are: memcached1.4 | // memcached1.5 | memcached1.6 | redis2.6 | redis2.8 | redis3.2 | redis4.0 | - // redis5.0 | redis6.x | + // redis5.0 | redis6.x | redis6.2 // // This member is required. CacheParameterGroupFamily *string diff --git a/service/elasticache/api_op_DescribeReservedCacheNodes.go b/service/elasticache/api_op_DescribeReservedCacheNodes.go index e9703dfce9d..7917713339d 100644 --- a/service/elasticache/api_op_DescribeReservedCacheNodes.go +++ b/service/elasticache/api_op_DescribeReservedCacheNodes.go @@ -41,8 +41,8 @@ type DescribeReservedCacheNodesInput struct { // * General purpose: // // * Current - // generation: M6g node types (available only for Redis engine version 5.0.6 onward - // and for Memcached engine version 1.5.16 onward). cache.m6g.large, + // generation: M6g node types: (available only for Redis engine version 5.0.6 + // onward and for Memcached engine version 1.5.16 onward): cache.m6g.large, // cache.m6g.xlarge, cache.m6g.2xlarge, cache.m6g.4xlarge, cache.m6g.8xlarge, // cache.m6g.12xlarge, cache.m6g.16xlarge For region availability, see Supported // Node Types @@ -50,27 +50,37 @@ type DescribeReservedCacheNodesInput struct { // M5 node types: cache.m5.large, cache.m5.xlarge, cache.m5.2xlarge, // cache.m5.4xlarge, cache.m5.12xlarge, cache.m5.24xlarge M4 node types: // cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, - // cache.m4.10xlarge T3 node types: cache.t3.micro, cache.t3.small, cache.t3.medium - // T2 node types: cache.t2.micro, cache.t2.small, cache.t2.medium + // cache.m4.10xlarge T4g node types (available only for Redis engine version 5.0.6 + // onward and for Memcached engine version 1.5.16 onward): cache.t4g.micro, + // cache.t4g.small, cache.t4g.medium T3 node types: cache.t3.micro, cache.t3.small, + // cache.t3.medium T2 node types: cache.t2.micro, cache.t2.small, + // cache.t2.medium // - // * Previous - // generation: (not recommended) T1 node types: cache.t1.micro M1 node types: - // cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge M3 node types: - // cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge + // * Previous generation: (not recommended) T1 node types: + // cache.t1.micro M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, + // cache.m1.xlarge M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, + // cache.m3.2xlarge // - // * Compute - // optimized: + // * Compute optimized: + // + // * Previous generation: (not recommended) + // C1 node types: cache.c1.xlarge // - // * Previous generation: (not recommended) C1 node types: - // cache.c1.xlarge + // * Memory optimized with data tiering: // - // * Memory optimized: + // * Current + // generation: R6gd node types (available only for Redis engine version 6.2 + // onward). cache.r6gd.xlarge, cache.r6gd.2xlarge, cache.r6gd.4xlarge, + // cache.r6gd.8xlarge, cache.r6gd.12xlarge, cache.r6gd.16xlarge + // + // * Memory + // optimized: // - // * Current generation: R6g node types - // (available only for Redis engine version 5.0.6 onward and for Memcached engine - // version 1.5.16 onward). cache.r6g.large, cache.r6g.xlarge, cache.r6g.2xlarge, - // cache.r6g.4xlarge, cache.r6g.8xlarge, cache.r6g.12xlarge, cache.r6g.16xlarge For - // region availability, see Supported Node Types + // * Current generation: R6g node types (available only for Redis + // engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward). + // cache.r6g.large, cache.r6g.xlarge, cache.r6g.2xlarge, cache.r6g.4xlarge, + // cache.r6g.8xlarge, cache.r6g.12xlarge, cache.r6g.16xlarge For region + // availability, see Supported Node Types // (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) // R5 node types: cache.r5.large, cache.r5.xlarge, cache.r5.2xlarge, // cache.r5.4xlarge, cache.r5.12xlarge, cache.r5.24xlarge R4 node types: diff --git a/service/elasticache/api_op_DescribeReservedCacheNodesOfferings.go b/service/elasticache/api_op_DescribeReservedCacheNodesOfferings.go index d2b3f888e6c..3c95f14cbd7 100644 --- a/service/elasticache/api_op_DescribeReservedCacheNodesOfferings.go +++ b/service/elasticache/api_op_DescribeReservedCacheNodesOfferings.go @@ -40,8 +40,8 @@ type DescribeReservedCacheNodesOfferingsInput struct { // * General purpose: // // * Current - // generation: M6g node types (available only for Redis engine version 5.0.6 onward - // and for Memcached engine version 1.5.16 onward). cache.m6g.large, + // generation: M6g node types: (available only for Redis engine version 5.0.6 + // onward and for Memcached engine version 1.5.16 onward) cache.m6g.large, // cache.m6g.xlarge, cache.m6g.2xlarge, cache.m6g.4xlarge, cache.m6g.8xlarge, // cache.m6g.12xlarge, cache.m6g.16xlarge For region availability, see Supported // Node Types @@ -49,27 +49,37 @@ type DescribeReservedCacheNodesOfferingsInput struct { // M5 node types: cache.m5.large, cache.m5.xlarge, cache.m5.2xlarge, // cache.m5.4xlarge, cache.m5.12xlarge, cache.m5.24xlarge M4 node types: // cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, - // cache.m4.10xlarge T3 node types: cache.t3.micro, cache.t3.small, cache.t3.medium - // T2 node types: cache.t2.micro, cache.t2.small, cache.t2.medium + // cache.m4.10xlarge T4g node types (available only for Redis engine version 5.0.6 + // onward and for Memcached engine version 1.5.16 onward): cache.t4g.micro, + // cache.t4g.small, cache.t4g.medium T3 node types: cache.t3.micro, cache.t3.small, + // cache.t3.medium T2 node types: cache.t2.micro, cache.t2.small, + // cache.t2.medium // - // * Previous - // generation: (not recommended) T1 node types: cache.t1.micro M1 node types: - // cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge M3 node types: - // cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge + // * Previous generation: (not recommended) T1 node types: + // cache.t1.micro M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, + // cache.m1.xlarge M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, + // cache.m3.2xlarge // - // * Compute - // optimized: + // * Compute optimized: + // + // * Previous generation: (not recommended) + // C1 node types: cache.c1.xlarge // - // * Previous generation: (not recommended) C1 node types: - // cache.c1.xlarge + // * Memory optimized with data tiering: // - // * Memory optimized: + // * Current + // generation: R6gd node types (available only for Redis engine version 6.2 + // onward). cache.r6gd.xlarge, cache.r6gd.2xlarge, cache.r6gd.4xlarge, + // cache.r6gd.8xlarge, cache.r6gd.12xlarge, cache.r6gd.16xlarge + // + // * Memory + // optimized: // - // * Current generation: R6g node types - // (available only for Redis engine version 5.0.6 onward and for Memcached engine - // version 1.5.16 onward). cache.r6g.large, cache.r6g.xlarge, cache.r6g.2xlarge, - // cache.r6g.4xlarge, cache.r6g.8xlarge, cache.r6g.12xlarge, cache.r6g.16xlarge For - // region availability, see Supported Node Types + // * Current generation: R6g node types (available only for Redis + // engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward). + // cache.r6g.large, cache.r6g.xlarge, cache.r6g.2xlarge, cache.r6g.4xlarge, + // cache.r6g.8xlarge, cache.r6g.12xlarge, cache.r6g.16xlarge For region + // availability, see Supported Node Types // (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) // R5 node types: cache.r5.large, cache.r5.xlarge, cache.r5.2xlarge, // cache.r5.4xlarge, cache.r5.12xlarge, cache.r5.24xlarge R4 node types: diff --git a/service/elasticache/api_op_ModifyCacheCluster.go b/service/elasticache/api_op_ModifyCacheCluster.go index a9f01e6a56d..77e9e6cca0b 100644 --- a/service/elasticache/api_op_ModifyCacheCluster.go +++ b/service/elasticache/api_op_ModifyCacheCluster.go @@ -83,7 +83,9 @@ type ModifyCacheClusterInput struct { // (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/auth.html) AuthTokenUpdateStrategy types.AuthTokenUpdateStrategyType - // This parameter is currently disabled. + // If you are running Redis engine version 6.0 or later, set this parameter to yes + // if you want to opt-in to the next auto minor version upgrade campaign. This + // parameter is disabled for previous versions. AutoMinorVersionUpgrade *bool // A list of cache node IDs to be removed. A node ID is a numeric identifier (0001, diff --git a/service/elasticache/api_op_ModifyReplicationGroup.go b/service/elasticache/api_op_ModifyReplicationGroup.go index ffb8f5075ff..84702adfaa9 100644 --- a/service/elasticache/api_op_ModifyReplicationGroup.go +++ b/service/elasticache/api_op_ModifyReplicationGroup.go @@ -82,7 +82,9 @@ type ModifyReplicationGroupInput struct { // (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/auth.html) AuthTokenUpdateStrategy types.AuthTokenUpdateStrategyType - // This parameter is currently disabled. + // If you are running Redis engine version 6.0 or later, set this parameter to yes + // if you want to opt-in to the next auto minor version upgrade campaign. This + // parameter is disabled for previous versions. AutoMinorVersionUpgrade *bool // Determines whether a read replica is automatically promoted to read/write diff --git a/service/elasticache/api_op_ModifyUser.go b/service/elasticache/api_op_ModifyUser.go index d5f1f5ebafd..8a149d1bb54 100644 --- a/service/elasticache/api_op_ModifyUser.go +++ b/service/elasticache/api_op_ModifyUser.go @@ -63,6 +63,9 @@ type ModifyUserOutput struct { // The current supported value is Redis. Engine *string + // The minimum engine version required, which is Redis 6.0 + MinimumEngineVersion *string + // Indicates the user status. Can be "active", "modifying" or "deleting". Status *string diff --git a/service/elasticache/api_op_ModifyUserGroup.go b/service/elasticache/api_op_ModifyUserGroup.go index 0e60c2d11e7..fe66d3adaaf 100644 --- a/service/elasticache/api_op_ModifyUserGroup.go +++ b/service/elasticache/api_op_ModifyUserGroup.go @@ -51,6 +51,9 @@ type ModifyUserGroupOutput struct { // The current supported value is Redis. Engine *string + // The minimum engine version required, which is Redis 6.0 + MinimumEngineVersion *string + // A list of updates being applied to the user group. PendingChanges *types.UserGroupPendingChanges diff --git a/service/elasticache/api_op_TestFailover.go b/service/elasticache/api_op_TestFailover.go index 53883fc42b6..07ae6105e41 100644 --- a/service/elasticache/api_op_TestFailover.go +++ b/service/elasticache/api_op_TestFailover.go @@ -13,42 +13,46 @@ import ( // Represents the input of a TestFailover operation which test automatic failover // on a specified node group (called shard in the console) in a replication group -// (called cluster in the console). Note the following +// (called cluster in the console). This API is designed for testing the behavior +// of your application in case of ElastiCache failover. It is not designed to be an +// operational tool for initiating a failover to overcome a problem you may have +// with the cluster. Moreover, in certain conditions such as large-scale +// operational events, Amazon may block this API. Note the following // -// * A customer can use this -// operation to test automatic failover on up to 5 shards (called node groups in -// the ElastiCache API and Amazon CLI) in any rolling 24-hour period. +// * A customer +// can use this operation to test automatic failover on up to 5 shards (called node +// groups in the ElastiCache API and Amazon CLI) in any rolling 24-hour period. // -// * If calling -// this operation on shards in different clusters (called replication groups in the -// API and CLI), the calls can be made concurrently. +// * +// If calling this operation on shards in different clusters (called replication +// groups in the API and CLI), the calls can be made concurrently. // -// * If calling this operation -// multiple times on different shards in the same Redis (cluster mode enabled) -// replication group, the first node replacement must complete before a subsequent -// call can be made. +// * If calling +// this operation multiple times on different shards in the same Redis (cluster +// mode enabled) replication group, the first node replacement must complete before +// a subsequent call can be made. // -// * To determine whether the node replacement is complete you -// can check Events using the Amazon ElastiCache console, the Amazon CLI, or the -// ElastiCache API. Look for the following automatic failover related events, -// listed here in order of occurrance: +// * To determine whether the node replacement is +// complete you can check Events using the Amazon ElastiCache console, the Amazon +// CLI, or the ElastiCache API. Look for the following automatic failover related +// events, listed here in order of occurrance: // -// * Replication group message: Test Failover -// API called for node group +// * Replication group message: Test +// Failover API called for node group // -// * Cache cluster message: Failover from primary node -// to replica node completed +// * Cache cluster message: Failover from +// primary node to replica node completed // -// * Replication group message: Failover from primary -// node to replica node completed +// * Replication group message: Failover +// from primary node to replica node completed // -// * Cache cluster message: Recovering cache -// nodes +// * Cache cluster message: Recovering +// cache nodes // // * Cache cluster message: Finished recovery for cache nodes // -// For more -// information see: +// For +// more information see: // // * Viewing ElastiCache Events // (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ECEvents.Viewing.html) diff --git a/service/elasticache/deserializers.go b/service/elasticache/deserializers.go index f1385495f4a..1e2dd7aa5b8 100644 --- a/service/elasticache/deserializers.go +++ b/service/elasticache/deserializers.go @@ -1780,6 +1780,9 @@ func awsAwsquery_deserializeOpErrorCreateUser(response *smithyhttp.Response, met case strings.EqualFold("InvalidParameterValue", errorCode): return awsAwsquery_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("ServiceLinkedRoleNotFoundFault", errorCode): + return awsAwsquery_deserializeErrorServiceLinkedRoleNotFoundFault(response, errorBody) + case strings.EqualFold("TagQuotaPerResourceExceeded", errorCode): return awsAwsquery_deserializeErrorTagQuotaPerResourceExceeded(response, errorBody) @@ -1903,6 +1906,9 @@ func awsAwsquery_deserializeOpErrorCreateUserGroup(response *smithyhttp.Response case strings.EqualFold("InvalidParameterValue", errorCode): return awsAwsquery_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("ServiceLinkedRoleNotFoundFault", errorCode): + return awsAwsquery_deserializeErrorServiceLinkedRoleNotFoundFault(response, errorBody) + case strings.EqualFold("TagQuotaPerResourceExceeded", errorCode): return awsAwsquery_deserializeErrorTagQuotaPerResourceExceeded(response, errorBody) @@ -3010,6 +3016,9 @@ func awsAwsquery_deserializeOpErrorDeleteUser(response *smithyhttp.Response, met case strings.EqualFold("InvalidUserState", errorCode): return awsAwsquery_deserializeErrorInvalidUserStateFault(response, errorBody) + case strings.EqualFold("ServiceLinkedRoleNotFoundFault", errorCode): + return awsAwsquery_deserializeErrorServiceLinkedRoleNotFoundFault(response, errorBody) + case strings.EqualFold("UserNotFound", errorCode): return awsAwsquery_deserializeErrorUserNotFoundFault(response, errorBody) @@ -3124,6 +3133,9 @@ func awsAwsquery_deserializeOpErrorDeleteUserGroup(response *smithyhttp.Response case strings.EqualFold("InvalidUserGroupState", errorCode): return awsAwsquery_deserializeErrorInvalidUserGroupStateFault(response, errorBody) + case strings.EqualFold("ServiceLinkedRoleNotFoundFault", errorCode): + return awsAwsquery_deserializeErrorServiceLinkedRoleNotFoundFault(response, errorBody) + case strings.EqualFold("UserGroupNotFound", errorCode): return awsAwsquery_deserializeErrorUserGroupNotFoundFault(response, errorBody) @@ -4924,6 +4936,9 @@ func awsAwsquery_deserializeOpErrorDescribeUserGroups(response *smithyhttp.Respo case strings.EqualFold("InvalidParameterCombination", errorCode): return awsAwsquery_deserializeErrorInvalidParameterCombinationException(response, errorBody) + case strings.EqualFold("ServiceLinkedRoleNotFoundFault", errorCode): + return awsAwsquery_deserializeErrorServiceLinkedRoleNotFoundFault(response, errorBody) + case strings.EqualFold("UserGroupNotFound", errorCode): return awsAwsquery_deserializeErrorUserGroupNotFoundFault(response, errorBody) @@ -5035,6 +5050,9 @@ func awsAwsquery_deserializeOpErrorDescribeUsers(response *smithyhttp.Response, case strings.EqualFold("InvalidParameterCombination", errorCode): return awsAwsquery_deserializeErrorInvalidParameterCombinationException(response, errorBody) + case strings.EqualFold("ServiceLinkedRoleNotFoundFault", errorCode): + return awsAwsquery_deserializeErrorServiceLinkedRoleNotFoundFault(response, errorBody) + case strings.EqualFold("UserNotFound", errorCode): return awsAwsquery_deserializeErrorUserNotFoundFault(response, errorBody) @@ -6676,6 +6694,9 @@ func awsAwsquery_deserializeOpErrorModifyUser(response *smithyhttp.Response, met case strings.EqualFold("InvalidUserState", errorCode): return awsAwsquery_deserializeErrorInvalidUserStateFault(response, errorBody) + case strings.EqualFold("ServiceLinkedRoleNotFoundFault", errorCode): + return awsAwsquery_deserializeErrorServiceLinkedRoleNotFoundFault(response, errorBody) + case strings.EqualFold("UserNotFound", errorCode): return awsAwsquery_deserializeErrorUserNotFoundFault(response, errorBody) @@ -6799,6 +6820,9 @@ func awsAwsquery_deserializeOpErrorModifyUserGroup(response *smithyhttp.Response case strings.EqualFold("InvalidUserGroupState", errorCode): return awsAwsquery_deserializeErrorInvalidUserGroupStateFault(response, errorBody) + case strings.EqualFold("ServiceLinkedRoleNotFoundFault", errorCode): + return awsAwsquery_deserializeErrorServiceLinkedRoleNotFoundFault(response, errorBody) + case strings.EqualFold("UserGroupNotFound", errorCode): return awsAwsquery_deserializeErrorUserGroupNotFoundFault(response, errorBody) @@ -18796,6 +18820,19 @@ func awsAwsquery_deserializeDocumentReplicationGroup(v **types.ReplicationGroup, return err } + case strings.EqualFold("DataTiering", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DataTiering = types.DataTieringStatus(xtv) + } + case strings.EqualFold("Description", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -20856,6 +20893,19 @@ func awsAwsquery_deserializeDocumentSnapshot(v **types.Snapshot, decoder smithyx sv.CacheSubnetGroupName = ptr.String(xtv) } + case strings.EqualFold("DataTiering", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DataTiering = types.DataTieringStatus(xtv) + } + case strings.EqualFold("Engine", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -22586,6 +22636,19 @@ func awsAwsquery_deserializeDocumentUser(v **types.User, decoder smithyxml.NodeD sv.Engine = ptr.String(xtv) } + case strings.EqualFold("MinimumEngineVersion", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.MinimumEngineVersion = ptr.String(xtv) + } + case strings.EqualFold("Status", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -22742,6 +22805,19 @@ func awsAwsquery_deserializeDocumentUserGroup(v **types.UserGroup, decoder smith sv.Engine = ptr.String(xtv) } + case strings.EqualFold("MinimumEngineVersion", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.MinimumEngineVersion = ptr.String(xtv) + } + case strings.EqualFold("PendingChanges", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsAwsquery_deserializeDocumentUserGroupPendingChanges(&sv.PendingChanges, nodeDecoder); err != nil { @@ -24043,6 +24119,19 @@ func awsAwsquery_deserializeOpDocumentCreateUserGroupOutput(v **CreateUserGroupO sv.Engine = ptr.String(xtv) } + case strings.EqualFold("MinimumEngineVersion", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.MinimumEngineVersion = ptr.String(xtv) + } + case strings.EqualFold("PendingChanges", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsAwsquery_deserializeDocumentUserGroupPendingChanges(&sv.PendingChanges, nodeDecoder); err != nil { @@ -24168,6 +24257,19 @@ func awsAwsquery_deserializeOpDocumentCreateUserOutput(v **CreateUserOutput, dec sv.Engine = ptr.String(xtv) } + case strings.EqualFold("MinimumEngineVersion", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.MinimumEngineVersion = ptr.String(xtv) + } + case strings.EqualFold("Status", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -24527,6 +24629,19 @@ func awsAwsquery_deserializeOpDocumentDeleteUserGroupOutput(v **DeleteUserGroupO sv.Engine = ptr.String(xtv) } + case strings.EqualFold("MinimumEngineVersion", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.MinimumEngineVersion = ptr.String(xtv) + } + case strings.EqualFold("PendingChanges", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsAwsquery_deserializeDocumentUserGroupPendingChanges(&sv.PendingChanges, nodeDecoder); err != nil { @@ -24652,6 +24767,19 @@ func awsAwsquery_deserializeOpDocumentDeleteUserOutput(v **DeleteUserOutput, dec sv.Engine = ptr.String(xtv) } + case strings.EqualFold("MinimumEngineVersion", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.MinimumEngineVersion = ptr.String(xtv) + } + case strings.EqualFold("Status", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -26204,6 +26332,19 @@ func awsAwsquery_deserializeOpDocumentModifyUserGroupOutput(v **ModifyUserGroupO sv.Engine = ptr.String(xtv) } + case strings.EqualFold("MinimumEngineVersion", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.MinimumEngineVersion = ptr.String(xtv) + } + case strings.EqualFold("PendingChanges", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsAwsquery_deserializeDocumentUserGroupPendingChanges(&sv.PendingChanges, nodeDecoder); err != nil { @@ -26329,6 +26470,19 @@ func awsAwsquery_deserializeOpDocumentModifyUserOutput(v **ModifyUserOutput, dec sv.Engine = ptr.String(xtv) } + case strings.EqualFold("MinimumEngineVersion", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.MinimumEngineVersion = ptr.String(xtv) + } + case strings.EqualFold("Status", t.Name.Local): val, err := decoder.Value() if err != nil { diff --git a/service/elasticache/serializers.go b/service/elasticache/serializers.go index 5b295220e46..95ba9e6e09c 100644 --- a/service/elasticache/serializers.go +++ b/service/elasticache/serializers.go @@ -5347,6 +5347,11 @@ func awsAwsquery_serializeOpDocumentCreateReplicationGroupInput(v *CreateReplica objectKey.String(*v.CacheSubnetGroupName) } + if v.DataTieringEnabled != nil { + objectKey := object.Key("DataTieringEnabled") + objectKey.Boolean(*v.DataTieringEnabled) + } + if v.Engine != nil { objectKey := object.Key("Engine") objectKey.String(*v.Engine) diff --git a/service/elasticache/types/enums.go b/service/elasticache/types/enums.go index 61cc056c812..e51f6b35a78 100644 --- a/service/elasticache/types/enums.go +++ b/service/elasticache/types/enums.go @@ -116,6 +116,24 @@ func (ChangeType) Values() []ChangeType { } } +type DataTieringStatus string + +// Enum values for DataTieringStatus +const ( + DataTieringStatusEnabled DataTieringStatus = "enabled" + DataTieringStatusDisabled DataTieringStatus = "disabled" +) + +// Values returns all known values for DataTieringStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (DataTieringStatus) Values() []DataTieringStatus { + return []DataTieringStatus{ + "enabled", + "disabled", + } +} + type DestinationType string // Enum values for DestinationType diff --git a/service/elasticache/types/types.go b/service/elasticache/types/types.go index 3bb8980ea2a..e83dc8de822 100644 --- a/service/elasticache/types/types.go +++ b/service/elasticache/types/types.go @@ -48,7 +48,9 @@ type CacheCluster struct { // The date the auth token was last modified AuthTokenLastModifiedDate *time.Time - // This parameter is currently disabled. + // If you are running Redis engine version 6.0 or later, set this parameter to yes + // if you want to opt-in to the next auto minor version upgrade campaign. This + // parameter is disabled for previous versions. AutoMinorVersionUpgrade bool // The date and time when the cluster was created. @@ -71,36 +73,46 @@ type CacheCluster struct { // * // General purpose: // - // * Current generation: M6g node types (available only for Redis - // engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward). - // cache.m6g.large, cache.m6g.xlarge, cache.m6g.2xlarge, cache.m6g.4xlarge, - // cache.m6g.8xlarge, cache.m6g.12xlarge, cache.m6g.16xlarge For region - // availability, see Supported Node Types + // * Current generation: M6g node types: (available only for + // Redis engine version 5.0.6 onward and for Memcached engine version 1.5.16 + // onward): cache.m6g.large, cache.m6g.xlarge, cache.m6g.2xlarge, + // cache.m6g.4xlarge, cache.m6g.8xlarge, cache.m6g.12xlarge, cache.m6g.16xlarge For + // region availability, see Supported Node Types // (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) // M5 node types: cache.m5.large, cache.m5.xlarge, cache.m5.2xlarge, // cache.m5.4xlarge, cache.m5.12xlarge, cache.m5.24xlarge M4 node types: // cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, - // cache.m4.10xlarge T3 node types: cache.t3.micro, cache.t3.small, cache.t3.medium - // T2 node types: cache.t2.micro, cache.t2.small, cache.t2.medium + // cache.m4.10xlarge T4g node types (available only for Redis engine version 5.0.6 + // onward and for Memcached engine version 1.5.16 onward): cache.t4g.micro, + // cache.t4g.small, cache.t4g.medium T3 node types: cache.t3.micro, cache.t3.small, + // cache.t3.medium T2 node types: cache.t2.micro, cache.t2.small, + // cache.t2.medium // - // * Previous - // generation: (not recommended) T1 node types: cache.t1.micro M1 node types: - // cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge M3 node types: - // cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge + // * Previous generation: (not recommended) T1 node types: + // cache.t1.micro M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, + // cache.m1.xlarge M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, + // cache.m3.2xlarge // - // * Compute - // optimized: + // * Compute optimized: // - // * Previous generation: (not recommended) C1 node types: - // cache.c1.xlarge + // * Previous generation: (not recommended) + // C1 node types: cache.c1.xlarge // - // * Memory optimized: + // * Memory optimized with data tiering: // - // * Current generation: R6g node types - // (available only for Redis engine version 5.0.6 onward and for Memcached engine - // version 1.5.16 onward). cache.r6g.large, cache.r6g.xlarge, cache.r6g.2xlarge, - // cache.r6g.4xlarge, cache.r6g.8xlarge, cache.r6g.12xlarge, cache.r6g.16xlarge For - // region availability, see Supported Node Types + // * Current + // generation: R6gd node types (available only for Redis engine version 6.2 + // onward). cache.r6gd.xlarge, cache.r6gd.2xlarge, cache.r6gd.4xlarge, + // cache.r6gd.8xlarge, cache.r6gd.12xlarge, cache.r6gd.16xlarge + // + // * Memory + // optimized: + // + // * Current generation: R6g node types (available only for Redis + // engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward). + // cache.r6g.large, cache.r6g.xlarge, cache.r6g.2xlarge, cache.r6g.4xlarge, + // cache.r6g.8xlarge, cache.r6g.12xlarge, cache.r6g.16xlarge For region + // availability, see Supported Node Types // (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) // R5 node types: cache.r5.large, cache.r5.xlarge, cache.r5.2xlarge, // cache.r5.4xlarge, cache.r5.12xlarge, cache.r5.24xlarge R4 node types: @@ -245,7 +257,7 @@ type CacheEngineVersion struct { // The name of the cache parameter group family associated with this cache engine. // Valid values are: memcached1.4 | memcached1.5 | memcached1.6 | redis2.6 | - // redis2.8 | redis3.2 | redis4.0 | redis5.0 | redis6.x | + // redis2.8 | redis3.2 | redis4.0 | redis5.0 | redis6.0 | redis6.2 CacheParameterGroupFamily *string // The name of the cache engine. @@ -267,35 +279,45 @@ type CacheEngineVersion struct { // * General purpose: // // * Current generation: M6g node -// types (available only for Redis engine version 5.0.6 onward and for Memcached -// engine version 1.5.16 onward). cache.m6g.large, cache.m6g.xlarge, +// types: (available only for Redis engine version 5.0.6 onward and for Memcached +// engine version 1.5.16 onward): cache.m6g.large, cache.m6g.xlarge, // cache.m6g.2xlarge, cache.m6g.4xlarge, cache.m6g.8xlarge, cache.m6g.12xlarge, // cache.m6g.16xlarge For region availability, see Supported Node Types // (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) // M5 node types: cache.m5.large, cache.m5.xlarge, cache.m5.2xlarge, // cache.m5.4xlarge, cache.m5.12xlarge, cache.m5.24xlarge M4 node types: // cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, -// cache.m4.10xlarge T3 node types: cache.t3.micro, cache.t3.small, cache.t3.medium -// T2 node types: cache.t2.micro, cache.t2.small, cache.t2.medium +// cache.m4.10xlarge T4g node types (available only for Redis engine version 5.0.6 +// onward and for Memcached engine version 1.5.16 onward): cache.t4g.micro, +// cache.t4g.small, cache.t4g.medium T3 node types: cache.t3.micro, cache.t3.small, +// cache.t3.medium T2 node types: cache.t2.micro, cache.t2.small, +// cache.t2.medium // -// * Previous -// generation: (not recommended) T1 node types: cache.t1.micro M1 node types: -// cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge M3 node types: -// cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge +// * Previous generation: (not recommended) T1 node types: +// cache.t1.micro M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, +// cache.m1.xlarge M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, +// cache.m3.2xlarge // -// * Compute -// optimized: +// * Compute optimized: +// +// * Previous generation: (not recommended) +// C1 node types: cache.c1.xlarge // -// * Previous generation: (not recommended) C1 node types: -// cache.c1.xlarge +// * Memory optimized with data tiering: // -// * Memory optimized: +// * Current +// generation: R6gd node types (available only for Redis engine version 6.2 +// onward). cache.r6gd.xlarge, cache.r6gd.2xlarge, cache.r6gd.4xlarge, +// cache.r6gd.8xlarge, cache.r6gd.12xlarge, cache.r6gd.16xlarge // -// * Current generation: R6g node types -// (available only for Redis engine version 5.0.6 onward and for Memcached engine -// version 1.5.16 onward). cache.r6g.large, cache.r6g.xlarge, cache.r6g.2xlarge, -// cache.r6g.4xlarge, cache.r6g.8xlarge, cache.r6g.12xlarge, cache.r6g.16xlarge For -// region availability, see Supported Node Types +// * Memory +// optimized: +// +// * Current generation: R6g node types (available only for Redis +// engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward). +// cache.r6g.large, cache.r6g.xlarge, cache.r6g.2xlarge, cache.r6g.4xlarge, +// cache.r6g.8xlarge, cache.r6g.12xlarge, cache.r6g.16xlarge For region +// availability, see Supported Node Types // (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) // R5 node types: cache.r5.large, cache.r5.xlarge, cache.r5.2xlarge, // cache.r5.4xlarge, cache.r5.12xlarge, cache.r5.24xlarge R4 node types: @@ -446,7 +468,7 @@ type CacheParameterGroup struct { // The name of the cache parameter group family that this cache parameter group is // compatible with. Valid values are: memcached1.4 | memcached1.5 | memcached1.6 | - // redis2.6 | redis2.8 | redis3.2 | redis4.0 | redis5.0 | redis6.x | + // redis2.6 | redis2.8 | redis3.2 | redis4.0 | redis5.0 | redis6.0 | CacheParameterGroupFamily *string // The name of the cache parameter group. @@ -663,7 +685,8 @@ type EngineDefaults struct { // Specifies the name of the cache parameter group family to which the engine // default parameters apply. Valid values are: memcached1.4 | memcached1.5 | - // memcached1.6 | redis2.6 | redis2.8 | redis3.2 | redis4.0 | redis5.0 | redis6.x | + // memcached1.6 | redis2.6 | redis2.8 | redis3.2 | redis4.0 | redis5.0 | redis6.0 | + // redis6.2 CacheParameterGroupFamily *string // Provides an identifier to allow retrieval of paginated results. @@ -1249,6 +1272,12 @@ type ReplicationGroup struct { // endpoint to connect to this replication group. ConfigurationEndpoint *Endpoint + // Enables data tiering. Data tiering is only supported for replication groups + // using the r6gd node type. This parameter must be set to true when using r6gd + // nodes. For more information, see Data tiering + // (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/data-tiering.html). + DataTiering DataTieringStatus + // The user supplied description of the replication group. Description *string @@ -1362,8 +1391,8 @@ type ReservedCacheNode struct { // * General purpose: // // * Current - // generation: M6g node types (available only for Redis engine version 5.0.6 onward - // and for Memcached engine version 1.5.16 onward). cache.m6g.large, + // generation: M6g node types: (available only for Redis engine version 5.0.6 + // onward and for Memcached engine version 1.5.16 onward): cache.m6g.large, // cache.m6g.xlarge, cache.m6g.2xlarge, cache.m6g.4xlarge, cache.m6g.8xlarge, // cache.m6g.12xlarge, cache.m6g.16xlarge For region availability, see Supported // Node Types @@ -1371,27 +1400,39 @@ type ReservedCacheNode struct { // M5 node types: cache.m5.large, cache.m5.xlarge, cache.m5.2xlarge, // cache.m5.4xlarge, cache.m5.12xlarge, cache.m5.24xlarge M4 node types: // cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, - // cache.m4.10xlarge T3 node types: cache.t3.micro, cache.t3.small, cache.t3.medium - // T2 node types: cache.t2.micro, cache.t2.small, cache.t2.medium + // cache.m4.10xlarge T4g node types (available only for Redis engine version 5.0.6 + // onward and Memcached engine version 1.5.16 onward): cache.t4g.micro, + // cache.t4g.small, cache.t4g.medium // - // * Previous - // generation: (not recommended) T1 node types: cache.t1.micro M1 node types: - // cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge M3 node types: - // cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge + // T3 node types: cache.t3.micro, + // cache.t3.small, cache.t3.medium T2 node types: cache.t2.micro, cache.t2.small, + // cache.t2.medium // - // * Compute - // optimized: + // * Previous generation: (not recommended) T1 node types: + // cache.t1.micro M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, + // cache.m1.xlarge M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, + // cache.m3.2xlarge // - // * Previous generation: (not recommended) C1 node types: - // cache.c1.xlarge + // * Compute optimized: // - // * Memory optimized: + // * Previous generation: (not recommended) + // C1 node types: cache.c1.xlarge // - // * Current generation: R6g node types - // (available only for Redis engine version 5.0.6 onward and for Memcached engine - // version 1.5.16 onward). cache.r6g.large, cache.r6g.xlarge, cache.r6g.2xlarge, - // cache.r6g.4xlarge, cache.r6g.8xlarge, cache.r6g.12xlarge, cache.r6g.16xlarge For - // region availability, see Supported Node Types + // * Memory optimized with data tiering: + // + // * Current + // generation: R6gd node types (available only for Redis engine version 6.2 + // onward). cache.r6gd.xlarge, cache.r6gd.2xlarge, cache.r6gd.4xlarge, + // cache.r6gd.8xlarge, cache.r6gd.12xlarge, cache.r6gd.16xlarge + // + // * Memory + // optimized: + // + // * Current generation: R6g node types (available only for Redis + // engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward). + // cache.r6g.large, cache.r6g.xlarge, cache.r6g.2xlarge, cache.r6g.4xlarge, + // cache.r6g.8xlarge, cache.r6g.12xlarge, cache.r6g.16xlarge For region + // availability, see Supported Node Types // (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) // R5 node types: cache.r5.large, cache.r5.xlarge, cache.r5.2xlarge, // cache.r5.4xlarge, cache.r5.12xlarge, cache.r5.24xlarge R4 node types: @@ -1468,8 +1509,8 @@ type ReservedCacheNodesOffering struct { // * General purpose: // // * Current - // generation: M6g node types (available only for Redis engine version 5.0.6 onward - // and for Memcached engine version 1.5.16 onward). cache.m6g.large, + // generation: M6g node types: (available only for Redis engine version 5.0.6 + // onward and for Memcached engine version 1.5.16 onward): cache.m6g.large, // cache.m6g.xlarge, cache.m6g.2xlarge, cache.m6g.4xlarge, cache.m6g.8xlarge, // cache.m6g.12xlarge, cache.m6g.16xlarge For region availability, see Supported // Node Types @@ -1477,27 +1518,37 @@ type ReservedCacheNodesOffering struct { // M5 node types: cache.m5.large, cache.m5.xlarge, cache.m5.2xlarge, // cache.m5.4xlarge, cache.m5.12xlarge, cache.m5.24xlarge M4 node types: // cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, - // cache.m4.10xlarge T3 node types: cache.t3.micro, cache.t3.small, cache.t3.medium - // T2 node types: cache.t2.micro, cache.t2.small, cache.t2.medium + // cache.m4.10xlarge T4g node types (available only for Redis engine version 5.0.6 + // onward and Memcached engine version 1.5.16 onward): cache.t4g.micro, + // cache.t4g.small, cache.t4g.medium T3 node types: cache.t3.micro, cache.t3.small, + // cache.t3.medium T2 node types: cache.t2.micro, cache.t2.small, + // cache.t2.medium // - // * Previous - // generation: (not recommended) T1 node types: cache.t1.micro M1 node types: - // cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge M3 node types: - // cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge + // * Previous generation: (not recommended) T1 node types: + // cache.t1.micro M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, + // cache.m1.xlarge M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, + // cache.m3.2xlarge // - // * Compute - // optimized: + // * Compute optimized: // - // * Previous generation: (not recommended) C1 node types: - // cache.c1.xlarge + // * Previous generation: (not recommended) + // C1 node types: cache.c1.xlarge // - // * Memory optimized: + // * Memory optimized with data tiering: // - // * Current generation: R6g node types - // (available only for Redis engine version 5.0.6 onward and for Memcached engine - // version 1.5.16 onward). cache.r6g.large, cache.r6g.xlarge, cache.r6g.2xlarge, - // cache.r6g.4xlarge, cache.r6g.8xlarge, cache.r6g.12xlarge, cache.r6g.16xlarge For - // region availability, see Supported Node Types + // * Current + // generation: R6gd node types (available only for Redis engine version 6.2 + // onward). cache.r6gd.xlarge, cache.r6gd.2xlarge, cache.r6gd.4xlarge, + // cache.r6gd.8xlarge, cache.r6gd.12xlarge, cache.r6gd.16xlarge + // + // * Memory + // optimized: + // + // * Current generation: R6g node types (available only for Redis + // engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward). + // cache.r6g.large, cache.r6g.xlarge, cache.r6g.2xlarge, cache.r6g.4xlarge, + // cache.r6g.8xlarge, cache.r6g.12xlarge, cache.r6g.16xlarge For region + // availability, see Supported Node Types // (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) // R5 node types: cache.r5.large, cache.r5.xlarge, cache.r5.2xlarge, // cache.r5.4xlarge, cache.r5.12xlarge, cache.r5.24xlarge R4 node types: @@ -1649,7 +1700,9 @@ type Snapshot struct { // The ARN (Amazon Resource Name) of the snapshot. ARN *string - // This parameter is currently disabled. + // If you are running Redis engine version 6.0 or later, set this parameter to yes + // if you want to opt-in to the next auto minor version upgrade campaign. This + // parameter is disabled for previous versions. AutoMinorVersionUpgrade bool // Indicates the status of automatic failover for the source Redis replication @@ -1679,27 +1732,39 @@ type Snapshot struct { // M5 node types: cache.m5.large, cache.m5.xlarge, cache.m5.2xlarge, // cache.m5.4xlarge, cache.m5.12xlarge, cache.m5.24xlarge M4 node types: // cache.m4.large, cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, - // cache.m4.10xlarge T3 node types: cache.t3.micro, cache.t3.small, cache.t3.medium - // T2 node types: cache.t2.micro, cache.t2.small, cache.t2.medium + // cache.m4.10xlarge T4g node types (available only for Redis engine version 5.0.6 + // onward and Memcached engine version 1.5.16 onward): cache.t4g.micro, + // cache.t4g.small, cache.t4g.medium T3 node types: cache.t3.micro, cache.t3.small, + // cache.t3.medium T2 node types: cache.t2.micro, cache.t2.small, + // cache.t2.medium // - // * Previous - // generation: (not recommended) T1 node types: cache.t1.micro M1 node types: - // cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge M3 node types: - // cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge + // * Previous generation: (not recommended) T1 node types: + // cache.t1.micro M1 node types: cache.m1.small, cache.m1.medium, cache.m1.large, + // cache.m1.xlarge M3 node types: cache.m3.medium, cache.m3.large, cache.m3.xlarge, + // cache.m3.2xlarge // - // * Compute - // optimized: + // * Compute optimized: // - // * Previous generation: (not recommended) C1 node types: - // cache.c1.xlarge + // * Previous generation: (not recommended) + // C1 node types: cache.c1.xlarge // - // * Memory optimized: + // * Memory optimized with data tiering: // - // * Current generation: R6g node types - // (available only for Redis engine version 5.0.6 onward and for Memcached engine - // version 1.5.16 onward). cache.r6g.large, cache.r6g.xlarge, cache.r6g.2xlarge, - // cache.r6g.4xlarge, cache.r6g.8xlarge, cache.r6g.12xlarge, cache.r6g.16xlarge For - // region availability, see Supported Node Types + // * Current + // generation: R6gd node types (available only for Redis engine version 6.2 + // onward). cache.r6gd.xlarge, cache.r6gd.2xlarge, cache.r6gd.4xlarge, + // cache.r6gd.8xlarge, cache.r6gd.12xlarge, cache.r6gd.16xlarge + // + // * Memory + // optimized: + // + // * Current generation: R6g node types (available only for Redis + // engine version 5.0.6 onward and for Memcached engine version 1.5.16 onward). + // cache.r6g.large, cache.r6g.xlarge, cache.r6g.2xlarge, cache.r6g.4xlarge, + // cache.r6g.8xlarge, cache.r6g.12xlarge, cache.r6g.16xlarge For region + // availability, see Supported Node Types + // (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) + // For region availability, see Supported Node Types // (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion) // R5 node types: cache.r5.large, cache.r5.xlarge, cache.r5.2xlarge, // cache.r5.4xlarge, cache.r5.12xlarge, cache.r5.24xlarge R4 node types: @@ -1734,6 +1799,12 @@ type Snapshot struct { // The name of the cache subnet group associated with the source cluster. CacheSubnetGroupName *string + // Enables data tiering. Data tiering is only supported for replication groups + // using the r6gd node type. This parameter must be set to true when using r6gd + // nodes. For more information, see Data tiering + // (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/data-tiering.html). + DataTiering DataTieringStatus + // The name of the cache engine (memcached or redis) used by the source cluster. Engine *string @@ -1982,6 +2053,9 @@ type User struct { // The current supported value is Redis. Engine *string + // The minimum engine version required, which is Redis 6.0 + MinimumEngineVersion *string + // Indicates the user status. Can be "active", "modifying" or "deleting". Status *string @@ -2005,6 +2079,9 @@ type UserGroup struct { // The current supported value is Redis. Engine *string + // The minimum engine version required, which is Redis 6.0 + MinimumEngineVersion *string + // A list of updates being applied to the user group. PendingChanges *UserGroupPendingChanges diff --git a/service/elasticloadbalancingv2/api_op_CreateLoadBalancer.go b/service/elasticloadbalancingv2/api_op_CreateLoadBalancer.go index 51d9ff85290..4a99f1be62f 100644 --- a/service/elasticloadbalancingv2/api_op_CreateLoadBalancer.go +++ b/service/elasticloadbalancingv2/api_op_CreateLoadBalancer.go @@ -60,7 +60,7 @@ type CreateLoadBalancerInput struct { // The type of IP addresses used by the subnets for your load balancer. The // possible values are ipv4 (for IPv4 addresses) and dualstack (for IPv4 and IPv6 - // addresses). Internal load balancers must use ipv4. + // addresses). IpAddressType types.IpAddressType // The nodes of an Internet-facing load balancer have public IP addresses. The DNS diff --git a/service/elasticloadbalancingv2/api_op_SetIpAddressType.go b/service/elasticloadbalancingv2/api_op_SetIpAddressType.go index 24a0117fbb5..92adce031bf 100644 --- a/service/elasticloadbalancingv2/api_op_SetIpAddressType.go +++ b/service/elasticloadbalancingv2/api_op_SetIpAddressType.go @@ -31,8 +31,8 @@ func (c *Client) SetIpAddressType(ctx context.Context, params *SetIpAddressTypeI type SetIpAddressTypeInput struct { // The IP address type. The possible values are ipv4 (for IPv4 addresses) and - // dualstack (for IPv4 and IPv6 addresses). Internal load balancers must use ipv4. - // You can’t specify dualstack for a load balancer with a UDP or TCP_UDP listener. + // dualstack (for IPv4 and IPv6 addresses). You can’t specify dualstack for a load + // balancer with a UDP or TCP_UDP listener. // // This member is required. IpAddressType types.IpAddressType diff --git a/service/elasticloadbalancingv2/api_op_SetSubnets.go b/service/elasticloadbalancingv2/api_op_SetSubnets.go index 51afb0657c8..fcc393a1a8b 100644 --- a/service/elasticloadbalancingv2/api_op_SetSubnets.go +++ b/service/elasticloadbalancingv2/api_op_SetSubnets.go @@ -41,7 +41,7 @@ type SetSubnetsInput struct { // [Network Load Balancers] The type of IP addresses used by the subnets for your // load balancer. The possible values are ipv4 (for IPv4 addresses) and dualstack // (for IPv4 and IPv6 addresses). You can’t specify dualstack for a load balancer - // with a UDP or TCP_UDP listener. Internal load balancers must use ipv4. + // with a UDP or TCP_UDP listener. . IpAddressType types.IpAddressType // The IDs of the public subnets. You can specify only one subnet per Availability diff --git a/service/elasticloadbalancingv2/types/types.go b/service/elasticloadbalancingv2/types/types.go index 8cf8f3211ff..3236719b845 100644 --- a/service/elasticloadbalancingv2/types/types.go +++ b/service/elasticloadbalancingv2/types/types.go @@ -505,22 +505,27 @@ type LoadBalancerAttribute struct { // * access_logs.s3.prefix - // The prefix for the location in the S3 bucket for the access logs. // - // The following - // attributes are supported by only Application Load Balancers: - // - // * - // idle_timeout.timeout_seconds - The idle timeout value, in seconds. The valid - // range is 1-4000 seconds. The default is 60 seconds. - // - // * - // routing.http.desync_mitigation_mode - Determines how the load balancer handles - // requests that might pose a security risk to your application. The possible - // values are monitor, defensive, and strictest. The default is defensive. - // // * - // routing.http.drop_invalid_header_fields.enabled - Indicates whether HTTP headers - // with invalid header fields are removed by the load balancer (true) or routed to - // targets (false). The default is false. + // ipv6.deny-all-igw-traffic - Blocks internet gateway (IGW) access to the load + // balancer. It is set to false for internet-facing load balancers and true for + // internal load balancers, preventing unintended access to your internal load + // balancer through an internet gateway. + // + // The following attributes are supported by + // only Application Load Balancers: + // + // * idle_timeout.timeout_seconds - The idle + // timeout value, in seconds. The valid range is 1-4000 seconds. The default is 60 + // seconds. + // + // * routing.http.desync_mitigation_mode - Determines how the load + // balancer handles requests that might pose a security risk to your application. + // The possible values are monitor, defensive, and strictest. The default is + // defensive. + // + // * routing.http.drop_invalid_header_fields.enabled - Indicates + // whether HTTP headers with invalid header fields are removed by the load balancer + // (true) or routed to targets (false). The default is false. // // * // routing.http.x_amzn_tls_version_and_cipher_suite.enabled - Indicates whether the diff --git a/service/elasticsearchservice/api_op_UpdateElasticsearchDomainConfig.go b/service/elasticsearchservice/api_op_UpdateElasticsearchDomainConfig.go index 8ab3b24760e..4e138f391f4 100644 --- a/service/elasticsearchservice/api_op_UpdateElasticsearchDomainConfig.go +++ b/service/elasticsearchservice/api_op_UpdateElasticsearchDomainConfig.go @@ -62,6 +62,13 @@ type UpdateElasticsearchDomainConfigInput struct { // Options to specify configuration that will be applied to the domain endpoint. DomainEndpointOptions *types.DomainEndpointOptions + // This flag, when set to True, specifies whether the UpdateElasticsearchDomain + // request should return the results of validation checks without actually applying + // the change. This flag, when set to True, specifies the deployment mechanism + // through which the update shall be applied on the domain. This will not actually + // perform the Update. + DryRun *bool + // Specify the type and size of the EBS volume that you want to use. EBSOptions *types.EBSOptions @@ -100,6 +107,9 @@ type UpdateElasticsearchDomainConfigOutput struct { // This member is required. DomainConfig *types.ElasticsearchDomainConfig + // Contains result of DryRun. + DryRunResults *types.DryRunResults + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/elasticsearchservice/deserializers.go b/service/elasticsearchservice/deserializers.go index 5457c02f647..d98fbc15b54 100644 --- a/service/elasticsearchservice/deserializers.go +++ b/service/elasticsearchservice/deserializers.go @@ -5973,6 +5973,11 @@ func awsRestjson1_deserializeOpDocumentUpdateElasticsearchDomainConfigOutput(v * return err } + case "DryRunResults": + if err := awsRestjson1_deserializeDocumentDryRunResults(&sv.DryRunResults, value); err != nil { + return err + } + default: _, _ = key, value @@ -8271,6 +8276,55 @@ func awsRestjson1_deserializeDocumentDomainPackageDetailsList(v *[]types.DomainP return nil } +func awsRestjson1_deserializeDocumentDryRunResults(v **types.DryRunResults, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DryRunResults + if *v == nil { + sv = &types.DryRunResults{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DeploymentType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeploymentType to be of type string, got %T instead", value) + } + sv.DeploymentType = ptr.String(jtv) + } + + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentDuration(v **types.Duration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/elasticsearchservice/serializers.go b/service/elasticsearchservice/serializers.go index dc1ba00a511..bfd3dcfb4c2 100644 --- a/service/elasticsearchservice/serializers.go +++ b/service/elasticsearchservice/serializers.go @@ -2668,6 +2668,11 @@ func awsRestjson1_serializeOpDocumentUpdateElasticsearchDomainConfigInput(v *Upd } } + if v.DryRun != nil { + ok := object.Key("DryRun") + ok.Boolean(*v.DryRun) + } + if v.EBSOptions != nil { ok := object.Key("EBSOptions") if err := awsRestjson1_serializeDocumentEBSOptions(v.EBSOptions, ok); err != nil { diff --git a/service/elasticsearchservice/types/types.go b/service/elasticsearchservice/types/types.go index d8cd0812cdb..1a2373cf50f 100644 --- a/service/elasticsearchservice/types/types.go +++ b/service/elasticsearchservice/types/types.go @@ -468,6 +468,23 @@ type DomainPackageDetails struct { noSmithyDocumentSerde } +type DryRunResults struct { + + // Specifies the deployment mechanism through which the update shall be applied on + // the domain. Possible responses are Blue/Green (The update will require a + // blue/green deployment.) DynamicUpdate (The update can be applied in-place + // without a Blue/Green deployment required.) Undetermined (The domain is + // undergoing an update which needs to complete before the deployment type can be + // predicted.) None (The configuration change matches the current configuration and + // will not result in any update.) + DeploymentType *string + + // Contains an optional message associated with the DryRunResults. + Message *string + + noSmithyDocumentSerde +} + // Specifies maintenance schedule duration: duration value and duration unit. See // the Developer Guide // (https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/auto-tune.html) diff --git a/service/evidently/LICENSE.txt b/service/evidently/LICENSE.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/service/evidently/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/service/evidently/api_client.go b/service/evidently/api_client.go new file mode 100644 index 00000000000..9419ec90ea7 --- /dev/null +++ b/service/evidently/api_client.go @@ -0,0 +1,297 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/retry" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" + smithy "github.com/aws/smithy-go" + smithydocument "github.com/aws/smithy-go/document" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/http" + "time" +) + +const ServiceID = "Evidently" +const ServiceAPIVersion = "2021-02-01" + +// Client provides the API client to make operations call for Amazon CloudWatch +// Evidently. +type Client struct { + options Options +} + +// New returns an initialized Client based on the functional options. Provide +// additional functional options to further configure the behavior of the client, +// such as changing the client's endpoint or adding custom middleware behavior. +func New(options Options, optFns ...func(*Options)) *Client { + options = options.Copy() + + resolveDefaultLogger(&options) + + resolveRetryer(&options) + + resolveHTTPClient(&options) + + resolveHTTPSignerV4(&options) + + resolveDefaultEndpointConfiguration(&options) + + for _, fn := range optFns { + fn(&options) + } + + client := &Client{ + options: options, + } + + return client +} + +type Options struct { + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + APIOptions []func(*middleware.Stack) error + + // Configures the events that will be sent to the configured logger. + ClientLogMode aws.ClientLogMode + + // The credentials object to use when signing requests. + Credentials aws.CredentialsProvider + + // The endpoint options to be used when attempting to resolve an endpoint. + EndpointOptions EndpointResolverOptions + + // The service endpoint resolver. + EndpointResolver EndpointResolver + + // Signature Version 4 (SigV4) Signer + HTTPSignerV4 HTTPSignerV4 + + // The logger writer interface to write logging messages to. + Logger logging.Logger + + // The region to send requests to. (Required) + Region string + + // Retryer guides how HTTP requests should be retried in case of recoverable + // failures. When nil the API client will use a default retryer. + Retryer aws.Retryer + + // The HTTP client to invoke API calls with. Defaults to client's default HTTP + // implementation if nil. + HTTPClient HTTPClient +} + +// WithAPIOptions returns a functional option for setting the Client's APIOptions +// option. +func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { + return func(o *Options) { + o.APIOptions = append(o.APIOptions, optFns...) + } +} + +// WithEndpointResolver returns a functional option for setting the Client's +// EndpointResolver option. +func WithEndpointResolver(v EndpointResolver) func(*Options) { + return func(o *Options) { + o.EndpointResolver = v + } +} + +type HTTPClient interface { + Do(*http.Request) (*http.Response, error) +} + +// Copy creates a clone where the APIOptions list is deep copied. +func (o Options) Copy() Options { + to := o + to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) + copy(to.APIOptions, o.APIOptions) + return to +} +func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { + ctx = middleware.ClearStackValues(ctx) + stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) + options := c.options.Copy() + for _, fn := range optFns { + fn(&options) + } + + finalizeClientEndpointResolverOptions(&options) + + for _, fn := range stackFns { + if err := fn(stack, options); err != nil { + return nil, metadata, err + } + } + + for _, fn := range options.APIOptions { + if err := fn(stack); err != nil { + return nil, metadata, err + } + } + + handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) + result, metadata, err = handler.Handle(ctx, params) + if err != nil { + err = &smithy.OperationError{ + ServiceID: ServiceID, + OperationName: opID, + Err: err, + } + } + return result, metadata, err +} + +type noSmithyDocumentSerde = smithydocument.NoSerde + +func resolveDefaultLogger(o *Options) { + if o.Logger != nil { + return + } + o.Logger = logging.Nop{} +} + +func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { + return middleware.AddSetLoggerMiddleware(stack, o.Logger) +} + +// NewFromConfig returns a new client from the provided config. +func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { + opts := Options{ + Region: cfg.Region, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + } + resolveAWSRetryerProvider(cfg, &opts) + resolveAWSEndpointResolver(cfg, &opts) + resolveUseDualStackEndpoint(cfg, &opts) + resolveUseFIPSEndpoint(cfg, &opts) + return New(opts, optFns...) +} + +func resolveHTTPClient(o *Options) { + if o.HTTPClient != nil { + return + } + o.HTTPClient = awshttp.NewBuildableClient() +} + +func resolveRetryer(o *Options) { + if o.Retryer != nil { + return + } + o.Retryer = retry.NewStandard() +} + +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + +func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { + if cfg.EndpointResolver == nil { + return + } + o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver()) +} + +func addClientUserAgent(stack *middleware.Stack) error { + return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "evidently", goModuleVersion)(stack) +} + +func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error { + mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{ + CredentialsProvider: o.Credentials, + Signer: o.HTTPSignerV4, + LogSigning: o.ClientLogMode.IsSigning(), + }) + return stack.Finalize.Add(mw, middleware.After) +} + +type HTTPSignerV4 interface { + SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error +} + +func resolveHTTPSignerV4(o *Options) { + if o.HTTPSignerV4 != nil { + return + } + o.HTTPSignerV4 = newDefaultV4Signer(*o) +} + +func newDefaultV4Signer(o Options) *v4.Signer { + return v4.NewSigner(func(so *v4.SignerOptions) { + so.Logger = o.Logger + so.LogSigning = o.ClientLogMode.IsSigning() + }) +} + +func addRetryMiddlewares(stack *middleware.Stack, o Options) error { + mo := retry.AddRetryMiddlewaresOptions{ + Retryer: o.Retryer, + LogRetryAttempts: o.ClientLogMode.IsRetries(), + } + return retry.AddRetryMiddlewares(stack, mo) +} + +// resolves dual-stack endpoint configuration +func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseDualStackEndpoint = value + } + return nil +} + +// resolves FIPS endpoint configuration +func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseFIPSEndpoint = value + } + return nil +} + +func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { + return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) +} + +func addResponseErrorMiddleware(stack *middleware.Stack) error { + return awshttp.AddResponseErrorMiddleware(stack) +} + +func addRequestResponseLogging(stack *middleware.Stack, o Options) error { + return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ + LogRequest: o.ClientLogMode.IsRequest(), + LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), + LogResponse: o.ClientLogMode.IsResponse(), + LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), + }, middleware.After) +} diff --git a/service/evidently/api_op_BatchEvaluateFeature.go b/service/evidently/api_op_BatchEvaluateFeature.go new file mode 100644 index 00000000000..3aa4ba29fb6 --- /dev/null +++ b/service/evidently/api_op_BatchEvaluateFeature.go @@ -0,0 +1,143 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/evidently/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// This operation assigns feature variation to user sessions. For each user +// session, you pass in an entityID that represents the user. Evidently then checks +// the evaluation rules and assigns the variation. The first rules that are +// evaluated are the override rules. If the user's entityID matches an override +// rule, the user is served the variation specified by that rule. Next, if there is +// a launch of the feature, the user might be assigned to a variation in the +// launch. The chance of this depends on the percentage of users that are allocated +// to that launch. If the user is enrolled in the launch, the variation they are +// served depends on the allocation of the various feature variations used for the +// launch. If the user is not assigned to a launch, and there is an ongoing +// experiment for this feature, the user might be assigned to a variation in the +// experiment. The chance of this depends on the percentage of users that are +// allocated to that experiment. If the user is enrolled in the experiment, the +// variation they are served depends on the allocation of the various feature +// variations used for the experiment. If the user is not assigned to a launch or +// experiment, they are served the default variation. +func (c *Client) BatchEvaluateFeature(ctx context.Context, params *BatchEvaluateFeatureInput, optFns ...func(*Options)) (*BatchEvaluateFeatureOutput, error) { + if params == nil { + params = &BatchEvaluateFeatureInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchEvaluateFeature", params, optFns, c.addOperationBatchEvaluateFeatureMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchEvaluateFeatureOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchEvaluateFeatureInput struct { + + // The name or ARN of the project that contains the feature being evaluated. + // + // This member is required. + Project *string + + // An array of structures, where each structure assigns a feature variation to one + // user session. + // + // This member is required. + Requests []types.EvaluationRequest + + noSmithyDocumentSerde +} + +type BatchEvaluateFeatureOutput struct { + + // An array of structures, where each structure displays the results of one feature + // evaluation assignment to one user session. + Results []types.EvaluationResult + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchEvaluateFeatureMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpBatchEvaluateFeature{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpBatchEvaluateFeature{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpBatchEvaluateFeatureValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchEvaluateFeature(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opBatchEvaluateFeature(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "BatchEvaluateFeature", + } +} diff --git a/service/evidently/api_op_CreateExperiment.go b/service/evidently/api_op_CreateExperiment.go new file mode 100644 index 00000000000..c4d0b399331 --- /dev/null +++ b/service/evidently/api_op_CreateExperiment.go @@ -0,0 +1,181 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/evidently/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an Evidently experiment. Before you create an experiment, you must +// create the feature to use for the experiment. An experiment helps you make +// feature design decisions based on evidence and data. An experiment can test as +// many as five variations at once. Evidently collects experiment data and analyzes +// it by statistical methods, and provides clear recommendations about which +// variations perform better. Don't use this operation to update an existing +// experiment. Instead, use UpdateExperiment +// (https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_UpdateExperiment.html). +func (c *Client) CreateExperiment(ctx context.Context, params *CreateExperimentInput, optFns ...func(*Options)) (*CreateExperimentOutput, error) { + if params == nil { + params = &CreateExperimentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateExperiment", params, optFns, c.addOperationCreateExperimentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateExperimentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateExperimentInput struct { + + // An array of structures that defines the metrics used for the experiment, and + // whether a higher or lower value for each metric is the goal. + // + // This member is required. + MetricGoals []types.MetricGoalConfig + + // A name for the new experiment. + // + // This member is required. + Name *string + + // The name or ARN of the project that you want to create the new experiment in. + // + // This member is required. + Project *string + + // An array of structures that describe the configuration of each feature variation + // used in the experiment. + // + // This member is required. + Treatments []types.TreatmentConfig + + // An optional description of the experiment. + Description *string + + // A structure that contains the configuration of which variation to use as the + // "control" version. tThe "control" version is used for comparison with other + // variations. This structure also specifies how much experiment traffic is + // allocated to each variation. + OnlineAbConfig *types.OnlineAbConfig + + // When Evidently assigns a particular user session to an experiment, it must use a + // randomization ID to determine which variation the user session is served. This + // randomization ID is a combination of the entity ID and randomizationSalt. If you + // omit randomizationSalt, Evidently uses the experiment name as the + // randomizationSalt. + RandomizationSalt *string + + // The portion of the available audience that you want to allocate to this + // experiment, in thousandths of a percent. The available audience is the total + // audience minus the audience that you have allocated to overrides or current + // launches of this feature. This is represented in thousandths of a percent. For + // example, specify 10,000 to allocate 10% of the available audience. + SamplingRate int64 + + // Assigns one or more tags (key-value pairs) to the experiment. Tags can help you + // organize and categorize your resources. You can also use them to scope user + // permissions by granting a user permission to access or change only resources + // with certain tag values. Tags don't have any semantic meaning to Amazon Web + // Services and are interpreted strictly as strings of characters. You can + // associate as many as 50 tags with an experiment. For more information, see + // Tagging Amazon Web Services resources + // (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html). + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateExperimentOutput struct { + + // A structure containing the configuration details of the experiment that you + // created. + // + // This member is required. + Experiment *types.Experiment + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateExperimentMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateExperiment{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateExperiment{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateExperimentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateExperiment(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateExperiment(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "CreateExperiment", + } +} diff --git a/service/evidently/api_op_CreateFeature.go b/service/evidently/api_op_CreateFeature.go new file mode 100644 index 00000000000..82e00d40e96 --- /dev/null +++ b/service/evidently/api_op_CreateFeature.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/evidently/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an Evidently feature that you want to launch or test. You can define up +// to five variations of a feature, and use these variations in your launches and +// experiments. A feature must be created in a project. For information about +// creating a project, see CreateProject +// (https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_CreateProject.html). +// Don't use this operation to update an existing feature. Instead, use +// UpdateFeature +// (https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_UpdateFeature.html). +func (c *Client) CreateFeature(ctx context.Context, params *CreateFeatureInput, optFns ...func(*Options)) (*CreateFeatureOutput, error) { + if params == nil { + params = &CreateFeatureInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateFeature", params, optFns, c.addOperationCreateFeatureMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateFeatureOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateFeatureInput struct { + + // The name for the new feature. + // + // This member is required. + Name *string + + // The name or ARN of the project that is to contain the new feature. + // + // This member is required. + Project *string + + // An array of structures that contain the configuration of the feature's different + // variations. + // + // This member is required. + Variations []types.VariationConfig + + // The name of the variation to use as the default variation. The default variation + // is served to users who are not allocated to any ongoing launches or experiments + // of this feature. This variation must also be listed in the variations structure. + // If you omit defaultVariation, the first variation listed in the variations + // structure is used as the default variation. + DefaultVariation *string + + // An optional description of the feature. + Description *string + + // Specify users that should always be served a specific variation of a feature. + // Each user is specified by a key-value pair . For each key, specify a user by + // entering their user ID, account ID, or some other identifier. For the value, + // specify the name of the variation that they are to be served. + EntityOverrides map[string]string + + // Specify ALL_RULES to activate the traffic allocation specified by any ongoing + // launches or experiments. Specify DEFAULT_VARIATION to serve the default + // variation to all users instead. + EvaluationStrategy types.FeatureEvaluationStrategy + + // Assigns one or more tags (key-value pairs) to the feature. Tags can help you + // organize and categorize your resources. You can also use them to scope user + // permissions by granting a user permission to access or change only resources + // with certain tag values. Tags don't have any semantic meaning to Amazon Web + // Services and are interpreted strictly as strings of characters. You can + // associate as many as 50 tags with a feature. For more information, see Tagging + // Amazon Web Services resources + // (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html). + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateFeatureOutput struct { + + // A structure that contains information about the new feature. + Feature *types.Feature + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateFeatureMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateFeature{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateFeature{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateFeatureValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateFeature(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateFeature(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "CreateFeature", + } +} diff --git a/service/evidently/api_op_CreateLaunch.go b/service/evidently/api_op_CreateLaunch.go new file mode 100644 index 00000000000..9e72e8ce573 --- /dev/null +++ b/service/evidently/api_op_CreateLaunch.go @@ -0,0 +1,169 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/evidently/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a launch of a given feature. Before you create a launch, you must create +// the feature to use for the launch. You can use a launch to safely validate new +// features by serving them to a specified percentage of your users while you roll +// out the feature. You can monitor the performance of the new feature to help you +// decide when to ramp up traffic to more users. This helps you reduce risk and +// identify unintended consequences before you fully launch the feature. Don't use +// this operation to update an existing launch. Instead, use UpdateLaunch +// (https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_UpdateLaunch.html). +func (c *Client) CreateLaunch(ctx context.Context, params *CreateLaunchInput, optFns ...func(*Options)) (*CreateLaunchOutput, error) { + if params == nil { + params = &CreateLaunchInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateLaunch", params, optFns, c.addOperationCreateLaunchMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateLaunchOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateLaunchInput struct { + + // An array of structures that contains the feature and variations that are to be + // used for the launch. + // + // This member is required. + Groups []types.LaunchGroupConfig + + // The name for the new launch. + // + // This member is required. + Name *string + + // The name or ARN of the project that you want to create the launch in. + // + // This member is required. + Project *string + + // An optional description for the launch. + Description *string + + // An array of structures that define the metrics that will be used to monitor the + // launch performance. + MetricMonitors []types.MetricMonitorConfig + + // When Evidently assigns a particular user session to a launch, it must use a + // randomization ID to determine which variation the user session is served. This + // randomization ID is a combination of the entity ID and randomizationSalt. If you + // omit randomizationSalt, Evidently uses the launch name as the + // randomizationsSalt. + RandomizationSalt *string + + // An array of structures that define the traffic allocation percentages among the + // feature variations during each step of the launch. + ScheduledSplitsConfig *types.ScheduledSplitsLaunchConfig + + // Assigns one or more tags (key-value pairs) to the launch. Tags can help you + // organize and categorize your resources. You can also use them to scope user + // permissions by granting a user permission to access or change only resources + // with certain tag values. Tags don't have any semantic meaning to Amazon Web + // Services and are interpreted strictly as strings of characters. You can + // associate as many as 50 tags with a launch. For more information, see Tagging + // Amazon Web Services resources + // (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html). + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateLaunchOutput struct { + + // A structure that contains the configuration of the launch that was created. + // + // This member is required. + Launch *types.Launch + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateLaunchMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateLaunch{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateLaunch{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateLaunchValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLaunch(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateLaunch(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "CreateLaunch", + } +} diff --git a/service/evidently/api_op_CreateProject.go b/service/evidently/api_op_CreateProject.go new file mode 100644 index 00000000000..aeb39a3a46b --- /dev/null +++ b/service/evidently/api_op_CreateProject.go @@ -0,0 +1,145 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/evidently/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a project, which is the logical object in Evidently that can contain +// features, launches, and experiments. Use projects to group similar features +// together. To update an existing project, use UpdateProject +// (https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_UpdateProject.html). +func (c *Client) CreateProject(ctx context.Context, params *CreateProjectInput, optFns ...func(*Options)) (*CreateProjectOutput, error) { + if params == nil { + params = &CreateProjectInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateProject", params, optFns, c.addOperationCreateProjectMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateProjectOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateProjectInput struct { + + // The name for the project. + // + // This member is required. + Name *string + + // A structure that contains information about where Evidently is to store + // evaluation events for longer term storage, if you choose to do so. If you choose + // not to store these events, Evidently deletes them after using them to produce + // metrics and other experiment results that you can view. + DataDelivery *types.ProjectDataDeliveryConfig + + // An optional description of the project. + Description *string + + // Assigns one or more tags (key-value pairs) to the project. Tags can help you + // organize and categorize your resources. You can also use them to scope user + // permissions by granting a user permission to access or change only resources + // with certain tag values. Tags don't have any semantic meaning to Amazon Web + // Services and are interpreted strictly as strings of characters. You can + // associate as many as 50 tags with a project. For more information, see Tagging + // Amazon Web Services resources + // (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html). + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateProjectOutput struct { + + // A structure that contains information about the created project. + // + // This member is required. + Project *types.Project + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateProjectMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateProject{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateProject{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateProjectValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateProject(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateProject(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "CreateProject", + } +} diff --git a/service/evidently/api_op_DeleteExperiment.go b/service/evidently/api_op_DeleteExperiment.go new file mode 100644 index 00000000000..d9f035b9867 --- /dev/null +++ b/service/evidently/api_op_DeleteExperiment.go @@ -0,0 +1,123 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes an Evidently experiment. The feature used for the experiment is not +// deleted. To stop an experiment without deleting it, use StopExperiment +// (https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_StopExperiment.html). +func (c *Client) DeleteExperiment(ctx context.Context, params *DeleteExperimentInput, optFns ...func(*Options)) (*DeleteExperimentOutput, error) { + if params == nil { + params = &DeleteExperimentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteExperiment", params, optFns, c.addOperationDeleteExperimentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteExperimentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteExperimentInput struct { + + // The name of the experiment to delete. + // + // This member is required. + Experiment *string + + // The name or ARN of the project that contains the experiment to delete. + // + // This member is required. + Project *string + + noSmithyDocumentSerde +} + +type DeleteExperimentOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteExperimentMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteExperiment{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteExperiment{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteExperimentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteExperiment(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteExperiment(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "DeleteExperiment", + } +} diff --git a/service/evidently/api_op_DeleteFeature.go b/service/evidently/api_op_DeleteFeature.go new file mode 100644 index 00000000000..3c5989f5ba1 --- /dev/null +++ b/service/evidently/api_op_DeleteFeature.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes an Evidently feature. +func (c *Client) DeleteFeature(ctx context.Context, params *DeleteFeatureInput, optFns ...func(*Options)) (*DeleteFeatureOutput, error) { + if params == nil { + params = &DeleteFeatureInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteFeature", params, optFns, c.addOperationDeleteFeatureMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteFeatureOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteFeatureInput struct { + + // The name of the feature to delete. + // + // This member is required. + Feature *string + + // The name or ARN of the project that contains the feature to delete. + // + // This member is required. + Project *string + + noSmithyDocumentSerde +} + +type DeleteFeatureOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteFeatureMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteFeature{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteFeature{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteFeatureValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteFeature(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteFeature(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "DeleteFeature", + } +} diff --git a/service/evidently/api_op_DeleteLaunch.go b/service/evidently/api_op_DeleteLaunch.go new file mode 100644 index 00000000000..49af7cd849f --- /dev/null +++ b/service/evidently/api_op_DeleteLaunch.go @@ -0,0 +1,123 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes an Evidently launch. The feature used for the launch is not deleted. To +// stop a launch without deleting it, use StopLaunch +// (https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_StopLaunch.html). +func (c *Client) DeleteLaunch(ctx context.Context, params *DeleteLaunchInput, optFns ...func(*Options)) (*DeleteLaunchOutput, error) { + if params == nil { + params = &DeleteLaunchInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteLaunch", params, optFns, c.addOperationDeleteLaunchMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteLaunchOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteLaunchInput struct { + + // The name of the launch to delete. + // + // This member is required. + Launch *string + + // The name or ARN of the project that contains the launch to delete. + // + // This member is required. + Project *string + + noSmithyDocumentSerde +} + +type DeleteLaunchOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteLaunchMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteLaunch{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteLaunch{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteLaunchValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLaunch(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteLaunch(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "DeleteLaunch", + } +} diff --git a/service/evidently/api_op_DeleteProject.go b/service/evidently/api_op_DeleteProject.go new file mode 100644 index 00000000000..60b3c6b287f --- /dev/null +++ b/service/evidently/api_op_DeleteProject.go @@ -0,0 +1,119 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes an Evidently project. Before you can delete a project, you must delete +// all the features that the project contains. To delete a feature, use +// DeleteFeature +// (https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_DeleteFeature.html). +func (c *Client) DeleteProject(ctx context.Context, params *DeleteProjectInput, optFns ...func(*Options)) (*DeleteProjectOutput, error) { + if params == nil { + params = &DeleteProjectInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteProject", params, optFns, c.addOperationDeleteProjectMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteProjectOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteProjectInput struct { + + // The name or ARN of the project to delete. + // + // This member is required. + Project *string + + noSmithyDocumentSerde +} + +type DeleteProjectOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteProjectMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteProject{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteProject{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteProjectValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteProject(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteProject(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "DeleteProject", + } +} diff --git a/service/evidently/api_op_EvaluateFeature.go b/service/evidently/api_op_EvaluateFeature.go new file mode 100644 index 00000000000..34c57586e8f --- /dev/null +++ b/service/evidently/api_op_EvaluateFeature.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/evidently/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// This operation assigns a feature variation to one given user session. You pass +// in an entityID that represents the user. Evidently then checks the evaluation +// rules and assigns the variation. The first rules that are evaluated are the +// override rules. If the user's entityID matches an override rule, the user is +// served the variation specified by that rule. Next, if there is a launch of the +// feature, the user might be assigned to a variation in the launch. The chance of +// this depends on the percentage of users that are allocated to that launch. If +// the user is enrolled in the launch, the variation they are served depends on the +// allocation of the various feature variations used for the launch. If the user is +// not assigned to a launch, and there is an ongoing experiment for this feature, +// the user might be assigned to a variation in the experiment. The chance of this +// depends on the percentage of users that are allocated to that experiment. If the +// user is enrolled in the experiment, the variation they are served depends on the +// allocation of the various feature variations used for the experiment. If the +// user is not assigned to a launch or experiment, they are served the default +// variation. +func (c *Client) EvaluateFeature(ctx context.Context, params *EvaluateFeatureInput, optFns ...func(*Options)) (*EvaluateFeatureOutput, error) { + if params == nil { + params = &EvaluateFeatureInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "EvaluateFeature", params, optFns, c.addOperationEvaluateFeatureMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*EvaluateFeatureOutput) + out.ResultMetadata = metadata + return out, nil +} + +type EvaluateFeatureInput struct { + + // An internal ID that represents a unique user of the application. This entityID + // is checked against any override rules assigned for this feature. + // + // This member is required. + EntityId *string + + // The name of the feature being evaluated. + // + // This member is required. + Feature *string + + // The name or ARN of the project that contains this feature. + // + // This member is required. + Project *string + + // A JSON block of attributes that you can optionally pass in. This JSON block is + // included in the evaluation events sent to Evidently from the user session. + // + // This value conforms to the media type: application/json + EvaluationContext *string + + noSmithyDocumentSerde +} + +type EvaluateFeatureOutput struct { + + // If this user was assigned to a launch or experiment, this field lists the launch + // or experiment name. + // + // This value conforms to the media type: application/json + Details *string + + // Specifies the reason that the user session was assigned this variation. Possible + // values include DEFAULT, meaning the user was served the default variation; + // LAUNCH_RULE_MATCH, if the user session was enrolled in a launch; + // EXPERIMENT_RULE_MATCH, if the user session was enrolled in an experiment; or + // ENTITY_OVERRIDES_MATCH, if the user's entityId matches an override rule. + Reason *string + + // The value assigned to this variation to differentiate it from the other + // variations of this feature. + Value types.VariableValue + + // The name of the variation that was served to the user session. + Variation *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationEvaluateFeatureMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpEvaluateFeature{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpEvaluateFeature{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpEvaluateFeatureValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEvaluateFeature(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opEvaluateFeature(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "EvaluateFeature", + } +} diff --git a/service/evidently/api_op_GetExperiment.go b/service/evidently/api_op_GetExperiment.go new file mode 100644 index 00000000000..859e69d4c83 --- /dev/null +++ b/service/evidently/api_op_GetExperiment.go @@ -0,0 +1,128 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/evidently/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the details about one experiment. You must already know the experiment +// name. To retrieve a list of experiments in your account, use ListExperiments +// (https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_ListExperiments.html). +func (c *Client) GetExperiment(ctx context.Context, params *GetExperimentInput, optFns ...func(*Options)) (*GetExperimentOutput, error) { + if params == nil { + params = &GetExperimentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetExperiment", params, optFns, c.addOperationGetExperimentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetExperimentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetExperimentInput struct { + + // The name of the experiment that you want to see the details of. + // + // This member is required. + Experiment *string + + // The name or ARN of the project that contains the experiment. + // + // This member is required. + Project *string + + noSmithyDocumentSerde +} + +type GetExperimentOutput struct { + + // A structure containing the configuration details of the experiment. + Experiment *types.Experiment + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetExperimentMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetExperiment{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetExperiment{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetExperimentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetExperiment(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetExperiment(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "GetExperiment", + } +} diff --git a/service/evidently/api_op_GetExperimentResults.go b/service/evidently/api_op_GetExperimentResults.go new file mode 100644 index 00000000000..932e251b124 --- /dev/null +++ b/service/evidently/api_op_GetExperimentResults.go @@ -0,0 +1,186 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/evidently/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Retrieves the results of a running or completed experiment. +func (c *Client) GetExperimentResults(ctx context.Context, params *GetExperimentResultsInput, optFns ...func(*Options)) (*GetExperimentResultsOutput, error) { + if params == nil { + params = &GetExperimentResultsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetExperimentResults", params, optFns, c.addOperationGetExperimentResultsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetExperimentResultsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetExperimentResultsInput struct { + + // The name of the experiment to retrieve the results of. + // + // This member is required. + Experiment *string + + // The names of the experiment metrics that you want to see the results of. + // + // This member is required. + MetricNames []string + + // The name or ARN of the project that contains the experiment that you want to see + // the results of. + // + // This member is required. + Project *string + + // The names of the experiment treatments that you want to see the results for. + // + // This member is required. + TreatmentNames []string + + // The statistic used to calculate experiment results. Currently the only valid + // value is mean, which uses the mean of the collected values as the statistic. + BaseStat types.ExperimentBaseStat + + // The date and time that the experiment ended, if it is completed. + EndTime *time.Time + + // In seconds, the amount of time to aggregate results together. + Period int64 + + // The names of the report types that you want to see. Currently, BayesianInference + // is the only valid value. + ReportNames []types.ExperimentReportName + + // The statistics that you want to see in the returned results. + // + // * PValue specifies + // to use p-values for the results. A p-value is used in hypothesis testing to + // measure how often you are willing to make a mistake in rejecting the null + // hypothesis. A general practice is to reject the null hypothesis and declare that + // the results are statistically significant when the p-value is less than 0.05. + // + // * + // ConfidenceInterval specifies a confidence interval for the results. The + // confidence interval represents the range of values for the chosen metric that is + // likely to contain the true difference between the baseStat of a variation and + // the baseline. Evidently returns the 95% confidence interval. + // + // * TreatmentEffect + // is the difference in the statistic specified by the baseStat parameter between + // each variation and the default variation. + // + // * BaseStat returns the statistical + // values collected for the metric for each variation. The statistic uses the same + // statistic specified in the baseStat parameter. Therefore, if baseStat is mean, + // this returns the mean of the values collected for each variation. + ResultStats []types.ExperimentResultRequestType + + // The date and time that the experiment started. + StartTime *time.Time + + noSmithyDocumentSerde +} + +type GetExperimentResultsOutput struct { + + // An array of structures that include the reports that you requested. + Reports []types.ExperimentReport + + // An array of structures that include experiment results including metric names + // and values. + ResultsData []types.ExperimentResultsData + + // The timestamps of each result returned. + Timestamps []time.Time + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetExperimentResultsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetExperimentResults{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetExperimentResults{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetExperimentResultsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetExperimentResults(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetExperimentResults(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "GetExperimentResults", + } +} diff --git a/service/evidently/api_op_GetFeature.go b/service/evidently/api_op_GetFeature.go new file mode 100644 index 00000000000..789f7b8e188 --- /dev/null +++ b/service/evidently/api_op_GetFeature.go @@ -0,0 +1,130 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/evidently/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the details about one feature. You must already know the feature name. +// To retrieve a list of features in your account, use ListFeatures +// (https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_ListFeatures.html). +func (c *Client) GetFeature(ctx context.Context, params *GetFeatureInput, optFns ...func(*Options)) (*GetFeatureOutput, error) { + if params == nil { + params = &GetFeatureInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetFeature", params, optFns, c.addOperationGetFeatureMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetFeatureOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetFeatureInput struct { + + // The name of the feature that you want to retrieve information for. + // + // This member is required. + Feature *string + + // The name or ARN of the project that contains the feature. + // + // This member is required. + Project *string + + noSmithyDocumentSerde +} + +type GetFeatureOutput struct { + + // A structure containing the configuration details of the feature. + // + // This member is required. + Feature *types.Feature + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetFeatureMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetFeature{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetFeature{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetFeatureValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFeature(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetFeature(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "GetFeature", + } +} diff --git a/service/evidently/api_op_GetLaunch.go b/service/evidently/api_op_GetLaunch.go new file mode 100644 index 00000000000..fb2cc12317a --- /dev/null +++ b/service/evidently/api_op_GetLaunch.go @@ -0,0 +1,128 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/evidently/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the details about one launch. You must already know the launch name. To +// retrieve a list of launches in your account, use ListLaunches +// (https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_ListLaunches.html). +func (c *Client) GetLaunch(ctx context.Context, params *GetLaunchInput, optFns ...func(*Options)) (*GetLaunchOutput, error) { + if params == nil { + params = &GetLaunchInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetLaunch", params, optFns, c.addOperationGetLaunchMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetLaunchOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetLaunchInput struct { + + // The name of the launch that you want to see the details of. + // + // This member is required. + Launch *string + + // The name or ARN of the project that contains the launch. + // + // This member is required. + Project *string + + noSmithyDocumentSerde +} + +type GetLaunchOutput struct { + + // A structure containing the configuration details of the launch. + Launch *types.Launch + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetLaunchMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetLaunch{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetLaunch{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetLaunchValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLaunch(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetLaunch(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "GetLaunch", + } +} diff --git a/service/evidently/api_op_GetProject.go b/service/evidently/api_op_GetProject.go new file mode 100644 index 00000000000..be71630957e --- /dev/null +++ b/service/evidently/api_op_GetProject.go @@ -0,0 +1,125 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/evidently/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the details about one launch. You must already know the project name. To +// retrieve a list of projects in your account, use ListProjects +// (https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_ListProjects.html). +func (c *Client) GetProject(ctx context.Context, params *GetProjectInput, optFns ...func(*Options)) (*GetProjectOutput, error) { + if params == nil { + params = &GetProjectInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetProject", params, optFns, c.addOperationGetProjectMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetProjectOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetProjectInput struct { + + // The name or ARN of the project that you want to see the details of. + // + // This member is required. + Project *string + + noSmithyDocumentSerde +} + +type GetProjectOutput struct { + + // A structure containing the configuration details of the project. + // + // This member is required. + Project *types.Project + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetProjectMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetProject{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetProject{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetProjectValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetProject(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetProject(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "GetProject", + } +} diff --git a/service/evidently/api_op_ListExperiments.go b/service/evidently/api_op_ListExperiments.go new file mode 100644 index 00000000000..89e501cbe1e --- /dev/null +++ b/service/evidently/api_op_ListExperiments.go @@ -0,0 +1,221 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/evidently/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns configuration details about all the experiments in the specified +// project. +func (c *Client) ListExperiments(ctx context.Context, params *ListExperimentsInput, optFns ...func(*Options)) (*ListExperimentsOutput, error) { + if params == nil { + params = &ListExperimentsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListExperiments", params, optFns, c.addOperationListExperimentsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListExperimentsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListExperimentsInput struct { + + // The name or ARN of the project to return the experiment list from. + // + // This member is required. + Project *string + + // The maximum number of results to include in the response. + MaxResults *int32 + + // The token to use when requesting the next set of results. You received this + // token from a previous ListExperiments operation. + NextToken *string + + noSmithyDocumentSerde +} + +type ListExperimentsOutput struct { + + // An array of structures that contain the configuration details of the experiments + // in the specified project. + Experiments []types.Experiment + + // The token to use in a subsequent ListExperiments operation to return the next + // set of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListExperimentsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListExperiments{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListExperiments{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListExperimentsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListExperiments(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListExperimentsAPIClient is a client that implements the ListExperiments +// operation. +type ListExperimentsAPIClient interface { + ListExperiments(context.Context, *ListExperimentsInput, ...func(*Options)) (*ListExperimentsOutput, error) +} + +var _ ListExperimentsAPIClient = (*Client)(nil) + +// ListExperimentsPaginatorOptions is the paginator options for ListExperiments +type ListExperimentsPaginatorOptions struct { + // The maximum number of results to include in the response. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListExperimentsPaginator is a paginator for ListExperiments +type ListExperimentsPaginator struct { + options ListExperimentsPaginatorOptions + client ListExperimentsAPIClient + params *ListExperimentsInput + nextToken *string + firstPage bool +} + +// NewListExperimentsPaginator returns a new ListExperimentsPaginator +func NewListExperimentsPaginator(client ListExperimentsAPIClient, params *ListExperimentsInput, optFns ...func(*ListExperimentsPaginatorOptions)) *ListExperimentsPaginator { + if params == nil { + params = &ListExperimentsInput{} + } + + options := ListExperimentsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListExperimentsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListExperimentsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListExperiments page. +func (p *ListExperimentsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListExperimentsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListExperiments(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListExperiments(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "ListExperiments", + } +} diff --git a/service/evidently/api_op_ListFeatures.go b/service/evidently/api_op_ListFeatures.go new file mode 100644 index 00000000000..aaf32fb7e94 --- /dev/null +++ b/service/evidently/api_op_ListFeatures.go @@ -0,0 +1,219 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/evidently/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns configuration details about all the features in the specified project. +func (c *Client) ListFeatures(ctx context.Context, params *ListFeaturesInput, optFns ...func(*Options)) (*ListFeaturesOutput, error) { + if params == nil { + params = &ListFeaturesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListFeatures", params, optFns, c.addOperationListFeaturesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListFeaturesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListFeaturesInput struct { + + // The name or ARN of the project to return the feature list from. + // + // This member is required. + Project *string + + // The maximum number of results to include in the response. + MaxResults *int32 + + // The token to use when requesting the next set of results. You received this + // token from a previous ListFeatures operation. + NextToken *string + + noSmithyDocumentSerde +} + +type ListFeaturesOutput struct { + + // An array of structures that contain the configuration details of the features in + // the specified project. + Features []types.FeatureSummary + + // The token to use in a subsequent ListFeatures operation to return the next set + // of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListFeaturesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListFeatures{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListFeatures{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListFeaturesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFeatures(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListFeaturesAPIClient is a client that implements the ListFeatures operation. +type ListFeaturesAPIClient interface { + ListFeatures(context.Context, *ListFeaturesInput, ...func(*Options)) (*ListFeaturesOutput, error) +} + +var _ ListFeaturesAPIClient = (*Client)(nil) + +// ListFeaturesPaginatorOptions is the paginator options for ListFeatures +type ListFeaturesPaginatorOptions struct { + // The maximum number of results to include in the response. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListFeaturesPaginator is a paginator for ListFeatures +type ListFeaturesPaginator struct { + options ListFeaturesPaginatorOptions + client ListFeaturesAPIClient + params *ListFeaturesInput + nextToken *string + firstPage bool +} + +// NewListFeaturesPaginator returns a new ListFeaturesPaginator +func NewListFeaturesPaginator(client ListFeaturesAPIClient, params *ListFeaturesInput, optFns ...func(*ListFeaturesPaginatorOptions)) *ListFeaturesPaginator { + if params == nil { + params = &ListFeaturesInput{} + } + + options := ListFeaturesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListFeaturesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListFeaturesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListFeatures page. +func (p *ListFeaturesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListFeaturesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListFeatures(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListFeatures(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "ListFeatures", + } +} diff --git a/service/evidently/api_op_ListLaunches.go b/service/evidently/api_op_ListLaunches.go new file mode 100644 index 00000000000..d1649edd449 --- /dev/null +++ b/service/evidently/api_op_ListLaunches.go @@ -0,0 +1,219 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/evidently/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns configuration details about all the launches in the specified project. +func (c *Client) ListLaunches(ctx context.Context, params *ListLaunchesInput, optFns ...func(*Options)) (*ListLaunchesOutput, error) { + if params == nil { + params = &ListLaunchesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListLaunches", params, optFns, c.addOperationListLaunchesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListLaunchesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListLaunchesInput struct { + + // The name or ARN of the project to return the launch list from. + // + // This member is required. + Project *string + + // The maximum number of results to include in the response. + MaxResults *int32 + + // The token to use when requesting the next set of results. You received this + // token from a previous ListLaunches operation. + NextToken *string + + noSmithyDocumentSerde +} + +type ListLaunchesOutput struct { + + // An array of structures that contain the configuration details of the launches in + // the specified project. + Launches []types.Launch + + // The token to use in a subsequent ListLaunches operation to return the next set + // of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListLaunchesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListLaunches{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListLaunches{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListLaunchesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLaunches(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListLaunchesAPIClient is a client that implements the ListLaunches operation. +type ListLaunchesAPIClient interface { + ListLaunches(context.Context, *ListLaunchesInput, ...func(*Options)) (*ListLaunchesOutput, error) +} + +var _ ListLaunchesAPIClient = (*Client)(nil) + +// ListLaunchesPaginatorOptions is the paginator options for ListLaunches +type ListLaunchesPaginatorOptions struct { + // The maximum number of results to include in the response. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListLaunchesPaginator is a paginator for ListLaunches +type ListLaunchesPaginator struct { + options ListLaunchesPaginatorOptions + client ListLaunchesAPIClient + params *ListLaunchesInput + nextToken *string + firstPage bool +} + +// NewListLaunchesPaginator returns a new ListLaunchesPaginator +func NewListLaunchesPaginator(client ListLaunchesAPIClient, params *ListLaunchesInput, optFns ...func(*ListLaunchesPaginatorOptions)) *ListLaunchesPaginator { + if params == nil { + params = &ListLaunchesInput{} + } + + options := ListLaunchesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListLaunchesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListLaunchesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListLaunches page. +func (p *ListLaunchesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListLaunchesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListLaunches(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListLaunches(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "ListLaunches", + } +} diff --git a/service/evidently/api_op_ListProjects.go b/service/evidently/api_op_ListProjects.go new file mode 100644 index 00000000000..0ba000b89ce --- /dev/null +++ b/service/evidently/api_op_ListProjects.go @@ -0,0 +1,212 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/evidently/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns configuration details about all the projects in the current Region in +// your account. +func (c *Client) ListProjects(ctx context.Context, params *ListProjectsInput, optFns ...func(*Options)) (*ListProjectsOutput, error) { + if params == nil { + params = &ListProjectsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListProjects", params, optFns, c.addOperationListProjectsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListProjectsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListProjectsInput struct { + + // The maximum number of results to include in the response. + MaxResults *int32 + + // The token to use when requesting the next set of results. You received this + // token from a previous ListProjects operation. + NextToken *string + + noSmithyDocumentSerde +} + +type ListProjectsOutput struct { + + // The token to use in a subsequent ListProjects operation to return the next set + // of results. + NextToken *string + + // An array of structures that contain the configuration details of the projects in + // the Region. + Projects []types.ProjectSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListProjectsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListProjects{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListProjects{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProjects(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListProjectsAPIClient is a client that implements the ListProjects operation. +type ListProjectsAPIClient interface { + ListProjects(context.Context, *ListProjectsInput, ...func(*Options)) (*ListProjectsOutput, error) +} + +var _ ListProjectsAPIClient = (*Client)(nil) + +// ListProjectsPaginatorOptions is the paginator options for ListProjects +type ListProjectsPaginatorOptions struct { + // The maximum number of results to include in the response. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListProjectsPaginator is a paginator for ListProjects +type ListProjectsPaginator struct { + options ListProjectsPaginatorOptions + client ListProjectsAPIClient + params *ListProjectsInput + nextToken *string + firstPage bool +} + +// NewListProjectsPaginator returns a new ListProjectsPaginator +func NewListProjectsPaginator(client ListProjectsAPIClient, params *ListProjectsInput, optFns ...func(*ListProjectsPaginatorOptions)) *ListProjectsPaginator { + if params == nil { + params = &ListProjectsInput{} + } + + options := ListProjectsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListProjectsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListProjectsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListProjects page. +func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListProjectsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListProjects(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListProjects(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "ListProjects", + } +} diff --git a/service/evidently/api_op_ListTagsForResource.go b/service/evidently/api_op_ListTagsForResource.go new file mode 100644 index 00000000000..e0c9e6ad042 --- /dev/null +++ b/service/evidently/api_op_ListTagsForResource.go @@ -0,0 +1,120 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Displays the tags associated with an Evidently resource. +func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { + if params == nil { + params = &ListTagsForResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTagsForResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListTagsForResourceInput struct { + + // The ARN of the resource that you want to see the tags of. + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + +type ListTagsForResourceOutput struct { + + // The list of tag keys and values associated with the resource you specified. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "ListTagsForResource", + } +} diff --git a/service/evidently/api_op_PutProjectEvents.go b/service/evidently/api_op_PutProjectEvents.go new file mode 100644 index 00000000000..4e5a1c49f4c --- /dev/null +++ b/service/evidently/api_op_PutProjectEvents.go @@ -0,0 +1,132 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/evidently/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Sends performance events to Evidently. These events can be used to evaluate a +// launch or an experiment. +func (c *Client) PutProjectEvents(ctx context.Context, params *PutProjectEventsInput, optFns ...func(*Options)) (*PutProjectEventsOutput, error) { + if params == nil { + params = &PutProjectEventsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutProjectEvents", params, optFns, c.addOperationPutProjectEventsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutProjectEventsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutProjectEventsInput struct { + + // An array of event structures that contain the performance data that is being + // sent to Evidently. + // + // This member is required. + Events []types.Event + + // The name or ARN of the project to write the events to. + // + // This member is required. + Project *string + + noSmithyDocumentSerde +} + +type PutProjectEventsOutput struct { + + // A structure that contains Evidently's response to the sent events, including an + // event ID and error codes, if any. + EventResults []types.PutProjectEventsResultEntry + + // The number of events in the operation that could not be used by Evidently. + FailedEventCount *int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutProjectEventsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpPutProjectEvents{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutProjectEvents{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpPutProjectEventsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutProjectEvents(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutProjectEvents(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "PutProjectEvents", + } +} diff --git a/service/evidently/api_op_StartExperiment.go b/service/evidently/api_op_StartExperiment.go new file mode 100644 index 00000000000..d538bab4924 --- /dev/null +++ b/service/evidently/api_op_StartExperiment.go @@ -0,0 +1,132 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Starts an existing experiment. To create an experiment, use CreateExperiment +// (https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_CreateExperiment.html). +func (c *Client) StartExperiment(ctx context.Context, params *StartExperimentInput, optFns ...func(*Options)) (*StartExperimentOutput, error) { + if params == nil { + params = &StartExperimentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartExperiment", params, optFns, c.addOperationStartExperimentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartExperimentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartExperimentInput struct { + + // The date and time to end the experiment. + // + // This member is required. + AnalysisCompleteTime *time.Time + + // The name of the experiment to start. + // + // This member is required. + Experiment *string + + // The name or ARN of the project that contains the experiment to start. + // + // This member is required. + Project *string + + noSmithyDocumentSerde +} + +type StartExperimentOutput struct { + + // A timestamp that indicates when the experiment started. + StartedTime *time.Time + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartExperimentMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpStartExperiment{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartExperiment{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpStartExperimentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartExperiment(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStartExperiment(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "StartExperiment", + } +} diff --git a/service/evidently/api_op_StartLaunch.go b/service/evidently/api_op_StartLaunch.go new file mode 100644 index 00000000000..25702d73312 --- /dev/null +++ b/service/evidently/api_op_StartLaunch.go @@ -0,0 +1,129 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/evidently/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Starts an existing launch. To create a launch, use CreateLaunch +// (https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_CreateLaunch.html). +func (c *Client) StartLaunch(ctx context.Context, params *StartLaunchInput, optFns ...func(*Options)) (*StartLaunchOutput, error) { + if params == nil { + params = &StartLaunchInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartLaunch", params, optFns, c.addOperationStartLaunchMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartLaunchOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartLaunchInput struct { + + // The name of the launch to start. + // + // This member is required. + Launch *string + + // The name or ARN of the project that contains the launch to start. + // + // This member is required. + Project *string + + noSmithyDocumentSerde +} + +type StartLaunchOutput struct { + + // A structure that contains information about the launch that was started. + // + // This member is required. + Launch *types.Launch + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartLaunchMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpStartLaunch{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartLaunch{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpStartLaunchValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartLaunch(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStartLaunch(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "StartLaunch", + } +} diff --git a/service/evidently/api_op_StopExperiment.go b/service/evidently/api_op_StopExperiment.go new file mode 100644 index 00000000000..7658c5530e0 --- /dev/null +++ b/service/evidently/api_op_StopExperiment.go @@ -0,0 +1,135 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/evidently/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Stops an experiment that is currently running. If you stop an experiment, you +// can't resume it or restart it. +func (c *Client) StopExperiment(ctx context.Context, params *StopExperimentInput, optFns ...func(*Options)) (*StopExperimentOutput, error) { + if params == nil { + params = &StopExperimentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StopExperiment", params, optFns, c.addOperationStopExperimentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StopExperimentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StopExperimentInput struct { + + // The name of the experiment to stop. + // + // This member is required. + Experiment *string + + // The name or ARN of the project that contains the experiment to stop. + // + // This member is required. + Project *string + + // Specify whether the experiment is to be considered COMPLETED or CANCELLED after + // it stops. + DesiredState types.ExperimentStopDesiredState + + // A string that describes why you are stopping the experiment. + Reason *string + + noSmithyDocumentSerde +} + +type StopExperimentOutput struct { + + // The date and time that the experiment stopped. + EndedTime *time.Time + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStopExperimentMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpStopExperiment{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStopExperiment{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpStopExperimentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStopExperiment(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStopExperiment(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "StopExperiment", + } +} diff --git a/service/evidently/api_op_StopLaunch.go b/service/evidently/api_op_StopLaunch.go new file mode 100644 index 00000000000..cf132c95660 --- /dev/null +++ b/service/evidently/api_op_StopLaunch.go @@ -0,0 +1,137 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/evidently/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Stops a launch that is currently running. After you stop a launch, you will not +// be able to resume it or restart it. Also, it will not be evaluated as a rule for +// traffic allocation, and the traffic that was allocated to the launch will +// instead be available to the feature's experiment, if there is one. Otherwise, +// all traffic will be served the default variation after the launch is stopped. +func (c *Client) StopLaunch(ctx context.Context, params *StopLaunchInput, optFns ...func(*Options)) (*StopLaunchOutput, error) { + if params == nil { + params = &StopLaunchInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StopLaunch", params, optFns, c.addOperationStopLaunchMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StopLaunchOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StopLaunchInput struct { + + // The name of the launch to stop. + // + // This member is required. + Launch *string + + // The name or ARN of the project that contains the launch that you want to stop. + // + // This member is required. + Project *string + + // Specify whether to consider the launch as COMPLETED or CANCELLED after it stops. + DesiredState types.LaunchStopDesiredState + + // A string that describes why you are stopping the launch. + Reason *string + + noSmithyDocumentSerde +} + +type StopLaunchOutput struct { + + // The date and time that the launch stopped. + EndedTime *time.Time + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStopLaunchMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpStopLaunch{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStopLaunch{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpStopLaunchValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStopLaunch(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStopLaunch(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "StopLaunch", + } +} diff --git a/service/evidently/api_op_TagResource.go b/service/evidently/api_op_TagResource.go new file mode 100644 index 00000000000..7ccc6fa5236 --- /dev/null +++ b/service/evidently/api_op_TagResource.go @@ -0,0 +1,133 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Assigns one or more tags (key-value pairs) to the specified CloudWatch Evidently +// resource. Projects, features, launches, and experiments can be tagged. Tags can +// help you organize and categorize your resources. You can also use them to scope +// user permissions by granting a user permission to access or change only +// resources with certain tag values. Tags don't have any semantic meaning to +// Amazon Web Services and are interpreted strictly as strings of characters. You +// can use the TagResource action with a resource that already has tags. If you +// specify a new tag key for the resource, this tag is appended to the list of tags +// associated with the alarm. If you specify a tag key that is already associated +// with the resource, the new tag value that you specify replaces the previous +// value for that tag. You can associate as many as 50 tags with a resource. For +// more information, see Tagging Amazon Web Services resources +// (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html). +func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { + if params == nil { + params = &TagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TagResourceInput struct { + + // The ARN of the CloudWatch Evidently resource that you're adding tags to. + // + // This member is required. + ResourceArn *string + + // The list of key-value pairs to associate with the resource. + // + // This member is required. + Tags map[string]string + + noSmithyDocumentSerde +} + +type TagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpTagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "TagResource", + } +} diff --git a/service/evidently/api_op_UntagResource.go b/service/evidently/api_op_UntagResource.go new file mode 100644 index 00000000000..994e8399aee --- /dev/null +++ b/service/evidently/api_op_UntagResource.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes one or more tags from the specified resource. +func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { + if params == nil { + params = &UntagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UntagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UntagResourceInput struct { + + // The ARN of the CloudWatch Evidently resource that you're removing tags from. + // + // This member is required. + ResourceArn *string + + // The list of tag keys to remove from the resource. + // + // This member is required. + TagKeys []string + + noSmithyDocumentSerde +} + +type UntagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUntagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "UntagResource", + } +} diff --git a/service/evidently/api_op_UpdateExperiment.go b/service/evidently/api_op_UpdateExperiment.go new file mode 100644 index 00000000000..653ed8b50b9 --- /dev/null +++ b/service/evidently/api_op_UpdateExperiment.go @@ -0,0 +1,163 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/evidently/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates an Evidently experiment. Don't use this operation to update an +// experiment's tag. Instead, use TagResource +// (https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_TagResource.html). +func (c *Client) UpdateExperiment(ctx context.Context, params *UpdateExperimentInput, optFns ...func(*Options)) (*UpdateExperimentOutput, error) { + if params == nil { + params = &UpdateExperimentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateExperiment", params, optFns, c.addOperationUpdateExperimentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateExperimentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateExperimentInput struct { + + // The name of the experiment to update. + // + // This member is required. + Experiment *string + + // The name or ARN of the project that contains the experiment that you want to + // update. + // + // This member is required. + Project *string + + // An optional description of the experiment. + Description *string + + // An array of structures that defines the metrics used for the experiment, and + // whether a higher or lower value for each metric is the goal. + MetricGoals []types.MetricGoalConfig + + // A structure that contains the configuration of which variation o use as the + // "control" version. The "control" version is used for comparison with other + // variations. This structure also specifies how much experiment traffic is + // allocated to each variation. + OnlineAbConfig *types.OnlineAbConfig + + // When Evidently assigns a particular user session to an experiment, it must use a + // randomization ID to determine which variation the user session is served. This + // randomization ID is a combination of the entity ID and randomizationSalt. If you + // omit randomizationSalt, Evidently uses the experiment name as the + // randomizationSalt. + RandomizationSalt *string + + // The portion of the available audience that you want to allocate to this + // experiment, in thousandths of a percent. The available audience is the total + // audience minus the audience that you have allocated to overrides or current + // launches of this feature. This is represented in thousandths of a percent. For + // example, specify 20,000 to allocate 20% of the available audience. + SamplingRate int64 + + // An array of structures that define the variations being tested in the + // experiment. + Treatments []types.TreatmentConfig + + noSmithyDocumentSerde +} + +type UpdateExperimentOutput struct { + + // A structure containing the configuration details of the experiment that was + // updated. + // + // This member is required. + Experiment *types.Experiment + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateExperimentMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateExperiment{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateExperiment{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateExperimentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateExperiment(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateExperiment(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "UpdateExperiment", + } +} diff --git a/service/evidently/api_op_UpdateFeature.go b/service/evidently/api_op_UpdateFeature.go new file mode 100644 index 00000000000..6afe2ca870e --- /dev/null +++ b/service/evidently/api_op_UpdateFeature.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/evidently/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates an existing feature. You can't use this operation to update the tags of +// an existing feature. Instead, use TagResource +// (https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_TagResource.html). +func (c *Client) UpdateFeature(ctx context.Context, params *UpdateFeatureInput, optFns ...func(*Options)) (*UpdateFeatureOutput, error) { + if params == nil { + params = &UpdateFeatureInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateFeature", params, optFns, c.addOperationUpdateFeatureMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateFeatureOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateFeatureInput struct { + + // The name of the feature to be updated. + // + // This member is required. + Feature *string + + // The name or ARN of the project that contains the feature to be updated. + // + // This member is required. + Project *string + + // To update variation configurations for this feature, or add new ones, specify + // this structure. In this array, include any variations that you want to add or + // update. If the array includes a variation name that already exists for this + // feature, it is updated. If it includes a new variation name, it is added as a + // new variation. + AddOrUpdateVariations []types.VariationConfig + + // The name of the variation to use as the default variation. The default variation + // is served to users who are not allocated to any ongoing launches or experiments + // of this feature. + DefaultVariation *string + + // An optional description of the feature. + Description *string + + // Specified users that should always be served a specific variation of a feature. + // Each user is specified by a key-value pair . For each key, specify a user by + // entering their user ID, account ID, or some other identifier. For the value, + // specify the name of the variation that they are to be served. + EntityOverrides map[string]string + + // Specify ALL_RULES to activate the traffic allocation specified by any ongoing + // launches or experiments. Specify DEFAULT_VARIATION to serve the default + // variation to all users instead. + EvaluationStrategy types.FeatureEvaluationStrategy + + // Removes a variation from the feature. If the variation you specify doesn't + // exist, then this makes no change and does not report an error. This operation + // fails if you try to remove a variation that is part of an ongoing launch or + // experiment. + RemoveVariations []string + + noSmithyDocumentSerde +} + +type UpdateFeatureOutput struct { + + // A structure that contains information about the updated feature. + // + // This member is required. + Feature *types.Feature + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateFeatureMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateFeature{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateFeature{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateFeatureValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateFeature(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateFeature(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "UpdateFeature", + } +} diff --git a/service/evidently/api_op_UpdateLaunch.go b/service/evidently/api_op_UpdateLaunch.go new file mode 100644 index 00000000000..635c86c1096 --- /dev/null +++ b/service/evidently/api_op_UpdateLaunch.go @@ -0,0 +1,151 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/evidently/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates a launch of a given feature. Don't use this operation to update the tags +// of an existing launch. Instead, use TagResource +// (https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_TagResource.html). +func (c *Client) UpdateLaunch(ctx context.Context, params *UpdateLaunchInput, optFns ...func(*Options)) (*UpdateLaunchOutput, error) { + if params == nil { + params = &UpdateLaunchInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateLaunch", params, optFns, c.addOperationUpdateLaunchMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateLaunchOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateLaunchInput struct { + + // The name of the launch that is to be updated. + // + // This member is required. + Launch *string + + // The name or ARN of the project that contains the launch that you want to update. + // + // This member is required. + Project *string + + // An optional description for the launch. + Description *string + + // An array of structures that contains the feature and variations that are to be + // used for the launch. + Groups []types.LaunchGroupConfig + + // An array of structures that define the metrics that will be used to monitor the + // launch performance. + MetricMonitors []types.MetricMonitorConfig + + // When Evidently assigns a particular user session to a launch, it must use a + // randomization ID to determine which variation the user session is served. This + // randomization ID is a combination of the entity ID and randomizationSalt. If you + // omit randomizationSalt, Evidently uses the launch name as the randomizationSalt. + RandomizationSalt *string + + // An array of structures that define the traffic allocation percentages among the + // feature variations during each step of the launch. + ScheduledSplitsConfig *types.ScheduledSplitsLaunchConfig + + noSmithyDocumentSerde +} + +type UpdateLaunchOutput struct { + + // A structure that contains the new configuration of the launch that was updated. + // + // This member is required. + Launch *types.Launch + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateLaunchMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateLaunch{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateLaunch{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateLaunchValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateLaunch(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateLaunch(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "UpdateLaunch", + } +} diff --git a/service/evidently/api_op_UpdateProject.go b/service/evidently/api_op_UpdateProject.go new file mode 100644 index 00000000000..f2a94de99ab --- /dev/null +++ b/service/evidently/api_op_UpdateProject.go @@ -0,0 +1,134 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/evidently/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the description of an existing project. To create a new project, use +// CreateProject +// (https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_CreateProject.html). +// Don't use this operation to update the data storage options of a project. +// Instead, use UpdateProjectDataDelivery +// (https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_UpdateProjectDataDelivery.html). +// Don't use this operation to update the tags of a project. Instead, use +// TagResource +// (https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_TagResource.html). +func (c *Client) UpdateProject(ctx context.Context, params *UpdateProjectInput, optFns ...func(*Options)) (*UpdateProjectOutput, error) { + if params == nil { + params = &UpdateProjectInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateProject", params, optFns, c.addOperationUpdateProjectMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateProjectOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateProjectInput struct { + + // The name or ARN of the project to update. + // + // This member is required. + Project *string + + // An optional description of the project. + Description *string + + noSmithyDocumentSerde +} + +type UpdateProjectOutput struct { + + // A structure containing information about the updated project. + // + // This member is required. + Project *types.Project + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateProjectMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateProject{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateProject{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateProjectValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateProject(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateProject(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "UpdateProject", + } +} diff --git a/service/evidently/api_op_UpdateProjectDataDelivery.go b/service/evidently/api_op_UpdateProjectDataDelivery.go new file mode 100644 index 00000000000..619b6d0fb93 --- /dev/null +++ b/service/evidently/api_op_UpdateProjectDataDelivery.go @@ -0,0 +1,136 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/evidently/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the data storage options for this project. If you store evaluation +// events, you an keep them and analyze them on your own. If you choose not to +// store evaluation events, Evidently deletes them after using them to produce +// metrics and other experiment results that you can view. You can't specify both +// cloudWatchLogs and s3Destination in the same operation. +func (c *Client) UpdateProjectDataDelivery(ctx context.Context, params *UpdateProjectDataDeliveryInput, optFns ...func(*Options)) (*UpdateProjectDataDeliveryOutput, error) { + if params == nil { + params = &UpdateProjectDataDeliveryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateProjectDataDelivery", params, optFns, c.addOperationUpdateProjectDataDeliveryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateProjectDataDeliveryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateProjectDataDeliveryInput struct { + + // The name or ARN of the project that you want to modify the data storage options + // for. + // + // This member is required. + Project *string + + // A structure containing the CloudWatch Logs log group where you want to store + // evaluation events. + CloudWatchLogs *types.CloudWatchLogsDestinationConfig + + // A structure containing the S3 bucket name and bucket prefix where you want to + // store evaluation events. + S3Destination *types.S3DestinationConfig + + noSmithyDocumentSerde +} + +type UpdateProjectDataDeliveryOutput struct { + + // A structure containing details about the project that you updated. + // + // This member is required. + Project *types.Project + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateProjectDataDeliveryMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateProjectDataDelivery{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateProjectDataDelivery{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateProjectDataDeliveryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateProjectDataDelivery(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateProjectDataDelivery(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "evidently", + OperationName: "UpdateProjectDataDelivery", + } +} diff --git a/service/evidently/deserializers.go b/service/evidently/deserializers.go new file mode 100644 index 00000000000..f8658994ce3 --- /dev/null +++ b/service/evidently/deserializers.go @@ -0,0 +1,8507 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/evidently/types" + smithy "github.com/aws/smithy-go" + smithyio "github.com/aws/smithy-go/io" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" + "math" + "strings" + "time" +) + +type awsRestjson1_deserializeOpBatchEvaluateFeature struct { +} + +func (*awsRestjson1_deserializeOpBatchEvaluateFeature) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpBatchEvaluateFeature) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorBatchEvaluateFeature(response, &metadata) + } + output := &BatchEvaluateFeatureOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentBatchEvaluateFeatureOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorBatchEvaluateFeature(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentBatchEvaluateFeatureOutput(v **BatchEvaluateFeatureOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *BatchEvaluateFeatureOutput + if *v == nil { + sv = &BatchEvaluateFeatureOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "results": + if err := awsRestjson1_deserializeDocumentEvaluationResultsList(&sv.Results, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateExperiment struct { +} + +func (*awsRestjson1_deserializeOpCreateExperiment) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateExperiment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCreateExperiment(response, &metadata) + } + output := &CreateExperimentOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreateExperimentOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateExperiment(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateExperimentOutput(v **CreateExperimentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateExperimentOutput + if *v == nil { + sv = &CreateExperimentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "experiment": + if err := awsRestjson1_deserializeDocumentExperiment(&sv.Experiment, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateFeature struct { +} + +func (*awsRestjson1_deserializeOpCreateFeature) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateFeature) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCreateFeature(response, &metadata) + } + output := &CreateFeatureOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreateFeatureOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateFeature(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateFeatureOutput(v **CreateFeatureOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateFeatureOutput + if *v == nil { + sv = &CreateFeatureOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "feature": + if err := awsRestjson1_deserializeDocumentFeature(&sv.Feature, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateLaunch struct { +} + +func (*awsRestjson1_deserializeOpCreateLaunch) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateLaunch) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCreateLaunch(response, &metadata) + } + output := &CreateLaunchOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreateLaunchOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateLaunch(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateLaunchOutput(v **CreateLaunchOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateLaunchOutput + if *v == nil { + sv = &CreateLaunchOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "launch": + if err := awsRestjson1_deserializeDocumentLaunch(&sv.Launch, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateProject struct { +} + +func (*awsRestjson1_deserializeOpCreateProject) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateProject) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCreateProject(response, &metadata) + } + output := &CreateProjectOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreateProjectOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateProject(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateProjectOutput(v **CreateProjectOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateProjectOutput + if *v == nil { + sv = &CreateProjectOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "project": + if err := awsRestjson1_deserializeDocumentProject(&sv.Project, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteExperiment struct { +} + +func (*awsRestjson1_deserializeOpDeleteExperiment) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteExperiment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteExperiment(response, &metadata) + } + output := &DeleteExperimentOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteExperiment(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteFeature struct { +} + +func (*awsRestjson1_deserializeOpDeleteFeature) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteFeature) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteFeature(response, &metadata) + } + output := &DeleteFeatureOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteFeature(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteLaunch struct { +} + +func (*awsRestjson1_deserializeOpDeleteLaunch) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteLaunch) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteLaunch(response, &metadata) + } + output := &DeleteLaunchOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteLaunch(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteProject struct { +} + +func (*awsRestjson1_deserializeOpDeleteProject) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteProject) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteProject(response, &metadata) + } + output := &DeleteProjectOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteProject(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpEvaluateFeature struct { +} + +func (*awsRestjson1_deserializeOpEvaluateFeature) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpEvaluateFeature) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorEvaluateFeature(response, &metadata) + } + output := &EvaluateFeatureOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentEvaluateFeatureOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorEvaluateFeature(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentEvaluateFeatureOutput(v **EvaluateFeatureOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *EvaluateFeatureOutput + if *v == nil { + sv = &EvaluateFeatureOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "details": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JsonValue to be of type string, got %T instead", value) + } + sv.Details = ptr.String(jtv) + } + + case "reason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Reason = ptr.String(jtv) + } + + case "value": + if err := awsRestjson1_deserializeDocumentVariableValue(&sv.Value, value); err != nil { + return err + } + + case "variation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Variation = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetExperiment struct { +} + +func (*awsRestjson1_deserializeOpGetExperiment) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetExperiment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetExperiment(response, &metadata) + } + output := &GetExperimentOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetExperimentOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetExperiment(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetExperimentOutput(v **GetExperimentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetExperimentOutput + if *v == nil { + sv = &GetExperimentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "experiment": + if err := awsRestjson1_deserializeDocumentExperiment(&sv.Experiment, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetExperimentResults struct { +} + +func (*awsRestjson1_deserializeOpGetExperimentResults) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetExperimentResults) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetExperimentResults(response, &metadata) + } + output := &GetExperimentResultsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetExperimentResultsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetExperimentResults(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetExperimentResultsOutput(v **GetExperimentResultsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetExperimentResultsOutput + if *v == nil { + sv = &GetExperimentResultsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "reports": + if err := awsRestjson1_deserializeDocumentExperimentReportList(&sv.Reports, value); err != nil { + return err + } + + case "resultsData": + if err := awsRestjson1_deserializeDocumentExperimentResultsDataList(&sv.ResultsData, value); err != nil { + return err + } + + case "timestamps": + if err := awsRestjson1_deserializeDocumentTimestampList(&sv.Timestamps, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetFeature struct { +} + +func (*awsRestjson1_deserializeOpGetFeature) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetFeature) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetFeature(response, &metadata) + } + output := &GetFeatureOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetFeatureOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetFeature(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetFeatureOutput(v **GetFeatureOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetFeatureOutput + if *v == nil { + sv = &GetFeatureOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "feature": + if err := awsRestjson1_deserializeDocumentFeature(&sv.Feature, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetLaunch struct { +} + +func (*awsRestjson1_deserializeOpGetLaunch) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetLaunch) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetLaunch(response, &metadata) + } + output := &GetLaunchOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetLaunchOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetLaunch(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetLaunchOutput(v **GetLaunchOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetLaunchOutput + if *v == nil { + sv = &GetLaunchOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "launch": + if err := awsRestjson1_deserializeDocumentLaunch(&sv.Launch, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetProject struct { +} + +func (*awsRestjson1_deserializeOpGetProject) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetProject) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetProject(response, &metadata) + } + output := &GetProjectOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetProjectOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetProject(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetProjectOutput(v **GetProjectOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetProjectOutput + if *v == nil { + sv = &GetProjectOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "project": + if err := awsRestjson1_deserializeDocumentProject(&sv.Project, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListExperiments struct { +} + +func (*awsRestjson1_deserializeOpListExperiments) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListExperiments) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListExperiments(response, &metadata) + } + output := &ListExperimentsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListExperimentsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListExperiments(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListExperimentsOutput(v **ListExperimentsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListExperimentsOutput + if *v == nil { + sv = &ListExperimentsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "experiments": + if err := awsRestjson1_deserializeDocumentExperimentList(&sv.Experiments, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListFeatures struct { +} + +func (*awsRestjson1_deserializeOpListFeatures) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListFeatures) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListFeatures(response, &metadata) + } + output := &ListFeaturesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListFeaturesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListFeatures(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListFeaturesOutput(v **ListFeaturesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListFeaturesOutput + if *v == nil { + sv = &ListFeaturesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "features": + if err := awsRestjson1_deserializeDocumentFeatureSummariesList(&sv.Features, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListLaunches struct { +} + +func (*awsRestjson1_deserializeOpListLaunches) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListLaunches) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListLaunches(response, &metadata) + } + output := &ListLaunchesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListLaunchesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListLaunches(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListLaunchesOutput(v **ListLaunchesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListLaunchesOutput + if *v == nil { + sv = &ListLaunchesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "launches": + if err := awsRestjson1_deserializeDocumentLaunchesList(&sv.Launches, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListProjects struct { +} + +func (*awsRestjson1_deserializeOpListProjects) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListProjects) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListProjects(response, &metadata) + } + output := &ListProjectsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListProjectsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListProjects(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListProjectsOutput(v **ListProjectsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListProjectsOutput + if *v == nil { + sv = &ListProjectsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "projects": + if err := awsRestjson1_deserializeDocumentProjectSummariesList(&sv.Projects, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListTagsForResource struct { +} + +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) + } + output := &ListTagsForResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListTagsForResourceOutput + if *v == nil { + sv = &ListTagsForResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPutProjectEvents struct { +} + +func (*awsRestjson1_deserializeOpPutProjectEvents) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutProjectEvents) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorPutProjectEvents(response, &metadata) + } + output := &PutProjectEventsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentPutProjectEventsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPutProjectEvents(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentPutProjectEventsOutput(v **PutProjectEventsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutProjectEventsOutput + if *v == nil { + sv = &PutProjectEventsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "eventResults": + if err := awsRestjson1_deserializeDocumentPutProjectEventsResultEntryList(&sv.EventResults, value); err != nil { + return err + } + + case "failedEventCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.FailedEventCount = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpStartExperiment struct { +} + +func (*awsRestjson1_deserializeOpStartExperiment) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpStartExperiment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorStartExperiment(response, &metadata) + } + output := &StartExperimentOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentStartExperimentOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorStartExperiment(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentStartExperimentOutput(v **StartExperimentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartExperimentOutput + if *v == nil { + sv = &StartExperimentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "startedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpStartLaunch struct { +} + +func (*awsRestjson1_deserializeOpStartLaunch) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpStartLaunch) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorStartLaunch(response, &metadata) + } + output := &StartLaunchOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentStartLaunchOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorStartLaunch(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentStartLaunchOutput(v **StartLaunchOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartLaunchOutput + if *v == nil { + sv = &StartLaunchOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "launch": + if err := awsRestjson1_deserializeDocumentLaunch(&sv.Launch, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpStopExperiment struct { +} + +func (*awsRestjson1_deserializeOpStopExperiment) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpStopExperiment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorStopExperiment(response, &metadata) + } + output := &StopExperimentOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentStopExperimentOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorStopExperiment(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentStopExperimentOutput(v **StopExperimentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StopExperimentOutput + if *v == nil { + sv = &StopExperimentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "endedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpStopLaunch struct { +} + +func (*awsRestjson1_deserializeOpStopLaunch) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpStopLaunch) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorStopLaunch(response, &metadata) + } + output := &StopLaunchOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentStopLaunchOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorStopLaunch(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentStopLaunchOutput(v **StopLaunchOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StopLaunchOutput + if *v == nil { + sv = &StopLaunchOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "endedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpTagResource struct { +} + +func (*awsRestjson1_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) + } + output := &TagResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUntagResource struct { +} + +func (*awsRestjson1_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) + } + output := &UntagResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUpdateExperiment struct { +} + +func (*awsRestjson1_deserializeOpUpdateExperiment) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateExperiment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateExperiment(response, &metadata) + } + output := &UpdateExperimentOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateExperimentOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateExperiment(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateExperimentOutput(v **UpdateExperimentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateExperimentOutput + if *v == nil { + sv = &UpdateExperimentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "experiment": + if err := awsRestjson1_deserializeDocumentExperiment(&sv.Experiment, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateFeature struct { +} + +func (*awsRestjson1_deserializeOpUpdateFeature) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateFeature) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateFeature(response, &metadata) + } + output := &UpdateFeatureOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateFeatureOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateFeature(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateFeatureOutput(v **UpdateFeatureOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateFeatureOutput + if *v == nil { + sv = &UpdateFeatureOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "feature": + if err := awsRestjson1_deserializeDocumentFeature(&sv.Feature, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateLaunch struct { +} + +func (*awsRestjson1_deserializeOpUpdateLaunch) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateLaunch) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateLaunch(response, &metadata) + } + output := &UpdateLaunchOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateLaunchOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateLaunch(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateLaunchOutput(v **UpdateLaunchOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateLaunchOutput + if *v == nil { + sv = &UpdateLaunchOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "launch": + if err := awsRestjson1_deserializeDocumentLaunch(&sv.Launch, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateProject struct { +} + +func (*awsRestjson1_deserializeOpUpdateProject) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateProject) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateProject(response, &metadata) + } + output := &UpdateProjectOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateProjectOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateProject(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateProjectOutput(v **UpdateProjectOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateProjectOutput + if *v == nil { + sv = &UpdateProjectOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "project": + if err := awsRestjson1_deserializeDocumentProject(&sv.Project, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateProjectDataDelivery struct { +} + +func (*awsRestjson1_deserializeOpUpdateProjectDataDelivery) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateProjectDataDelivery) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateProjectDataDelivery(response, &metadata) + } + output := &UpdateProjectDataDeliveryOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateProjectDataDeliveryOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateProjectDataDelivery(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateProjectDataDeliveryOutput(v **UpdateProjectDataDeliveryOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateProjectDataDeliveryOutput + if *v == nil { + sv = &UpdateProjectDataDeliveryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "project": + if err := awsRestjson1_deserializeDocumentProject(&sv.Project, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDeniedException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ConflictException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentConflictException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalServerException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceNotFoundException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServiceQuotaExceededException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentServiceQuotaExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorServiceUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServiceUnavailableException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentServiceUnavailableException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ThrottlingException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentThrottlingException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ValidationException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentValidationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCloudWatchLogsDestination(v **types.CloudWatchLogsDestination, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CloudWatchLogsDestination + if *v == nil { + sv = &types.CloudWatchLogsDestination{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "logGroup": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CwLogGroupSafeName to be of type string, got %T instead", value) + } + sv.LogGroup = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConflictException + if *v == nil { + sv = &types.ConflictException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "resourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + + case "resourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDoubleValueList(v *[]float64, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []float64 + if *v == nil { + cv = []float64{} + } else { + cv = *v + } + + for _, value := range shape { + var col float64 + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + col = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + col = f64 + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentEntityOverrideMap(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VariationName to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentEvaluationResult(v **types.EvaluationResult, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EvaluationResult + if *v == nil { + sv = &types.EvaluationResult{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "details": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JsonValue to be of type string, got %T instead", value) + } + sv.Details = ptr.String(jtv) + } + + case "entityId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityId to be of type string, got %T instead", value) + } + sv.EntityId = ptr.String(jtv) + } + + case "feature": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FeatureName to be of type string, got %T instead", value) + } + sv.Feature = ptr.String(jtv) + } + + case "project": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Project = ptr.String(jtv) + } + + case "reason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Reason = ptr.String(jtv) + } + + case "value": + if err := awsRestjson1_deserializeDocumentVariableValue(&sv.Value, value); err != nil { + return err + } + + case "variation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Variation = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEvaluationResultsList(v *[]types.EvaluationResult, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.EvaluationResult + if *v == nil { + cv = []types.EvaluationResult{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EvaluationResult + destAddr := &col + if err := awsRestjson1_deserializeDocumentEvaluationResult(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentEvaluationRule(v **types.EvaluationRule, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EvaluationRule + if *v == nil { + sv = &types.EvaluationRule{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleType to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEvaluationRulesList(v *[]types.EvaluationRule, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.EvaluationRule + if *v == nil { + cv = []types.EvaluationRule{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EvaluationRule + destAddr := &col + if err := awsRestjson1_deserializeDocumentEvaluationRule(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentExperiment(v **types.Experiment, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Experiment + if *v == nil { + sv = &types.Experiment{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExperimentArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "execution": + if err := awsRestjson1_deserializeDocumentExperimentExecution(&sv.Execution, value); err != nil { + return err + } + + case "lastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "metricGoals": + if err := awsRestjson1_deserializeDocumentMetricGoalsList(&sv.MetricGoals, value); err != nil { + return err + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExperimentName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "onlineAbDefinition": + if err := awsRestjson1_deserializeDocumentOnlineAbDefinition(&sv.OnlineAbDefinition, value); err != nil { + return err + } + + case "project": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProjectArn to be of type string, got %T instead", value) + } + sv.Project = ptr.String(jtv) + } + + case "randomizationSalt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RandomizationSalt to be of type string, got %T instead", value) + } + sv.RandomizationSalt = ptr.String(jtv) + } + + case "samplingRate": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected SplitWeight to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.SamplingRate = i64 + } + + case "schedule": + if err := awsRestjson1_deserializeDocumentExperimentSchedule(&sv.Schedule, value); err != nil { + return err + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExperimentStatus to be of type string, got %T instead", value) + } + sv.Status = types.ExperimentStatus(jtv) + } + + case "statusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.StatusReason = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "treatments": + if err := awsRestjson1_deserializeDocumentTreatmentList(&sv.Treatments, value); err != nil { + return err + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExperimentType to be of type string, got %T instead", value) + } + sv.Type = types.ExperimentType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentExperimentExecution(v **types.ExperimentExecution, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ExperimentExecution + if *v == nil { + sv = &types.ExperimentExecution{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "endedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "startedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentExperimentList(v *[]types.Experiment, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Experiment + if *v == nil { + cv = []types.Experiment{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Experiment + destAddr := &col + if err := awsRestjson1_deserializeDocumentExperiment(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentExperimentReport(v **types.ExperimentReport, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ExperimentReport + if *v == nil { + sv = &types.ExperimentReport{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "content": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JsonValue to be of type string, got %T instead", value) + } + sv.Content = ptr.String(jtv) + } + + case "metricName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CwDimensionSafeName to be of type string, got %T instead", value) + } + sv.MetricName = ptr.String(jtv) + } + + case "reportName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExperimentReportName to be of type string, got %T instead", value) + } + sv.ReportName = types.ExperimentReportName(jtv) + } + + case "treatmentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TreatmentName to be of type string, got %T instead", value) + } + sv.TreatmentName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentExperimentReportList(v *[]types.ExperimentReport, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ExperimentReport + if *v == nil { + cv = []types.ExperimentReport{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ExperimentReport + destAddr := &col + if err := awsRestjson1_deserializeDocumentExperimentReport(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentExperimentResultsData(v **types.ExperimentResultsData, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ExperimentResultsData + if *v == nil { + sv = &types.ExperimentResultsData{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "metricName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CwDimensionSafeName to be of type string, got %T instead", value) + } + sv.MetricName = ptr.String(jtv) + } + + case "resultStat": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExperimentResultResponseType to be of type string, got %T instead", value) + } + sv.ResultStat = types.ExperimentResultResponseType(jtv) + } + + case "treatmentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TreatmentName to be of type string, got %T instead", value) + } + sv.TreatmentName = ptr.String(jtv) + } + + case "values": + if err := awsRestjson1_deserializeDocumentDoubleValueList(&sv.Values, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentExperimentResultsDataList(v *[]types.ExperimentResultsData, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ExperimentResultsData + if *v == nil { + cv = []types.ExperimentResultsData{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ExperimentResultsData + destAddr := &col + if err := awsRestjson1_deserializeDocumentExperimentResultsData(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentExperimentSchedule(v **types.ExperimentSchedule, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ExperimentSchedule + if *v == nil { + sv = &types.ExperimentSchedule{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "analysisCompleteTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.AnalysisCompleteTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFeature(v **types.Feature, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Feature + if *v == nil { + sv = &types.Feature{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FeatureArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "defaultVariation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VariationName to be of type string, got %T instead", value) + } + sv.DefaultVariation = ptr.String(jtv) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "entityOverrides": + if err := awsRestjson1_deserializeDocumentEntityOverrideMap(&sv.EntityOverrides, value); err != nil { + return err + } + + case "evaluationRules": + if err := awsRestjson1_deserializeDocumentEvaluationRulesList(&sv.EvaluationRules, value); err != nil { + return err + } + + case "evaluationStrategy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FeatureEvaluationStrategy to be of type string, got %T instead", value) + } + sv.EvaluationStrategy = types.FeatureEvaluationStrategy(jtv) + } + + case "lastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FeatureName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "project": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProjectArn to be of type string, got %T instead", value) + } + sv.Project = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FeatureStatus to be of type string, got %T instead", value) + } + sv.Status = types.FeatureStatus(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "valueType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VariationValueType to be of type string, got %T instead", value) + } + sv.ValueType = types.VariationValueType(jtv) + } + + case "variations": + if err := awsRestjson1_deserializeDocumentVariationsList(&sv.Variations, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFeatureSummariesList(v *[]types.FeatureSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.FeatureSummary + if *v == nil { + cv = []types.FeatureSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.FeatureSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentFeatureSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentFeatureSummary(v **types.FeatureSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.FeatureSummary + if *v == nil { + sv = &types.FeatureSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "defaultVariation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VariationName to be of type string, got %T instead", value) + } + sv.DefaultVariation = ptr.String(jtv) + } + + case "evaluationRules": + if err := awsRestjson1_deserializeDocumentEvaluationRulesList(&sv.EvaluationRules, value); err != nil { + return err + } + + case "evaluationStrategy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FeatureEvaluationStrategy to be of type string, got %T instead", value) + } + sv.EvaluationStrategy = types.FeatureEvaluationStrategy(jtv) + } + + case "lastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FeatureName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "project": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProjectRef to be of type string, got %T instead", value) + } + sv.Project = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FeatureStatus to be of type string, got %T instead", value) + } + sv.Status = types.FeatureStatus(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFeatureToVariationMap(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VariationName to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentGroupToWeightMap(v *map[string]int64, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]int64 + if *v == nil { + mv = map[string]int64{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal int64 + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected SplitWeight to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + parsedVal = i64 + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InternalServerException + if *v == nil { + sv = &types.InternalServerException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentLaunch(v **types.Launch, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Launch + if *v == nil { + sv = &types.Launch{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LaunchArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "execution": + if err := awsRestjson1_deserializeDocumentLaunchExecution(&sv.Execution, value); err != nil { + return err + } + + case "groups": + if err := awsRestjson1_deserializeDocumentLaunchGroupList(&sv.Groups, value); err != nil { + return err + } + + case "lastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "metricMonitors": + if err := awsRestjson1_deserializeDocumentMetricMonitorList(&sv.MetricMonitors, value); err != nil { + return err + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LaunchName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "project": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProjectRef to be of type string, got %T instead", value) + } + sv.Project = ptr.String(jtv) + } + + case "randomizationSalt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RandomizationSalt to be of type string, got %T instead", value) + } + sv.RandomizationSalt = ptr.String(jtv) + } + + case "scheduledSplitsDefinition": + if err := awsRestjson1_deserializeDocumentScheduledSplitsLaunchDefinition(&sv.ScheduledSplitsDefinition, value); err != nil { + return err + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LaunchStatus to be of type string, got %T instead", value) + } + sv.Status = types.LaunchStatus(jtv) + } + + case "statusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.StatusReason = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LaunchType to be of type string, got %T instead", value) + } + sv.Type = types.LaunchType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentLaunchesList(v *[]types.Launch, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Launch + if *v == nil { + cv = []types.Launch{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Launch + destAddr := &col + if err := awsRestjson1_deserializeDocumentLaunch(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentLaunchExecution(v **types.LaunchExecution, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LaunchExecution + if *v == nil { + sv = &types.LaunchExecution{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "endedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "startedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentLaunchGroup(v **types.LaunchGroup, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LaunchGroup + if *v == nil { + sv = &types.LaunchGroup{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "featureVariations": + if err := awsRestjson1_deserializeDocumentFeatureToVariationMap(&sv.FeatureVariations, value); err != nil { + return err + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GroupName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentLaunchGroupList(v *[]types.LaunchGroup, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.LaunchGroup + if *v == nil { + cv = []types.LaunchGroup{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.LaunchGroup + destAddr := &col + if err := awsRestjson1_deserializeDocumentLaunchGroup(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentMetricDefinition(v **types.MetricDefinition, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MetricDefinition + if *v == nil { + sv = &types.MetricDefinition{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "entityIdKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JsonPath to be of type string, got %T instead", value) + } + sv.EntityIdKey = ptr.String(jtv) + } + + case "eventPattern": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JsonValue to be of type string, got %T instead", value) + } + sv.EventPattern = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CwDimensionSafeName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "unitLabel": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MetricUnitLabel to be of type string, got %T instead", value) + } + sv.UnitLabel = ptr.String(jtv) + } + + case "valueKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JsonPath to be of type string, got %T instead", value) + } + sv.ValueKey = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMetricGoal(v **types.MetricGoal, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MetricGoal + if *v == nil { + sv = &types.MetricGoal{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "desiredChange": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChangeDirectionEnum to be of type string, got %T instead", value) + } + sv.DesiredChange = types.ChangeDirectionEnum(jtv) + } + + case "metricDefinition": + if err := awsRestjson1_deserializeDocumentMetricDefinition(&sv.MetricDefinition, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMetricGoalsList(v *[]types.MetricGoal, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.MetricGoal + if *v == nil { + cv = []types.MetricGoal{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MetricGoal + destAddr := &col + if err := awsRestjson1_deserializeDocumentMetricGoal(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentMetricMonitor(v **types.MetricMonitor, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MetricMonitor + if *v == nil { + sv = &types.MetricMonitor{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "metricDefinition": + if err := awsRestjson1_deserializeDocumentMetricDefinition(&sv.MetricDefinition, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMetricMonitorList(v *[]types.MetricMonitor, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.MetricMonitor + if *v == nil { + cv = []types.MetricMonitor{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MetricMonitor + destAddr := &col + if err := awsRestjson1_deserializeDocumentMetricMonitor(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentOnlineAbDefinition(v **types.OnlineAbDefinition, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OnlineAbDefinition + if *v == nil { + sv = &types.OnlineAbDefinition{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "controlTreatmentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TreatmentName to be of type string, got %T instead", value) + } + sv.ControlTreatmentName = ptr.String(jtv) + } + + case "treatmentWeights": + if err := awsRestjson1_deserializeDocumentTreatmentToWeightMap(&sv.TreatmentWeights, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentProject(v **types.Project, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Project + if *v == nil { + sv = &types.Project{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "activeExperimentCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ActiveExperimentCount = ptr.Int64(i64) + } + + case "activeLaunchCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ActiveLaunchCount = ptr.Int64(i64) + } + + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProjectArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "dataDelivery": + if err := awsRestjson1_deserializeDocumentProjectDataDelivery(&sv.DataDelivery, value); err != nil { + return err + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "experimentCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ExperimentCount = ptr.Int64(i64) + } + + case "featureCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.FeatureCount = ptr.Int64(i64) + } + + case "lastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "launchCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LaunchCount = ptr.Int64(i64) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProjectName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProjectStatus to be of type string, got %T instead", value) + } + sv.Status = types.ProjectStatus(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentProjectDataDelivery(v **types.ProjectDataDelivery, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ProjectDataDelivery + if *v == nil { + sv = &types.ProjectDataDelivery{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "cloudWatchLogs": + if err := awsRestjson1_deserializeDocumentCloudWatchLogsDestination(&sv.CloudWatchLogs, value); err != nil { + return err + } + + case "s3Destination": + if err := awsRestjson1_deserializeDocumentS3Destination(&sv.S3Destination, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentProjectSummariesList(v *[]types.ProjectSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ProjectSummary + if *v == nil { + cv = []types.ProjectSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ProjectSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentProjectSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentProjectSummary(v **types.ProjectSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ProjectSummary + if *v == nil { + sv = &types.ProjectSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "activeExperimentCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ActiveExperimentCount = ptr.Int64(i64) + } + + case "activeLaunchCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ActiveLaunchCount = ptr.Int64(i64) + } + + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProjectArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "experimentCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ExperimentCount = ptr.Int64(i64) + } + + case "featureCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.FeatureCount = ptr.Int64(i64) + } + + case "lastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "launchCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LaunchCount = ptr.Int64(i64) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProjectName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProjectStatus to be of type string, got %T instead", value) + } + sv.Status = types.ProjectStatus(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPutProjectEventsResultEntry(v **types.PutProjectEventsResultEntry, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.PutProjectEventsResultEntry + if *v == nil { + sv = &types.PutProjectEventsResultEntry{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCodeEnum to be of type string, got %T instead", value) + } + sv.ErrorCode = ptr.String(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "eventId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) + } + sv.EventId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPutProjectEventsResultEntryList(v *[]types.PutProjectEventsResultEntry, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.PutProjectEventsResultEntry + if *v == nil { + cv = []types.PutProjectEventsResultEntry{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PutProjectEventsResultEntry + destAddr := &col + if err := awsRestjson1_deserializeDocumentPutProjectEventsResultEntry(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceNotFoundException + if *v == nil { + sv = &types.ResourceNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "resourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + + case "resourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentS3Destination(v **types.S3Destination, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.S3Destination + if *v == nil { + sv = &types.S3Destination{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "bucket": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3BucketSafeName to be of type string, got %T instead", value) + } + sv.Bucket = ptr.String(jtv) + } + + case "prefix": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3PrefixSafeName to be of type string, got %T instead", value) + } + sv.Prefix = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentScheduledSplit(v **types.ScheduledSplit, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ScheduledSplit + if *v == nil { + sv = &types.ScheduledSplit{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "groupWeights": + if err := awsRestjson1_deserializeDocumentGroupToWeightMap(&sv.GroupWeights, value); err != nil { + return err + } + + case "startTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentScheduledSplitsLaunchDefinition(v **types.ScheduledSplitsLaunchDefinition, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ScheduledSplitsLaunchDefinition + if *v == nil { + sv = &types.ScheduledSplitsLaunchDefinition{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "steps": + if err := awsRestjson1_deserializeDocumentScheduledStepList(&sv.Steps, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentScheduledStepList(v *[]types.ScheduledSplit, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ScheduledSplit + if *v == nil { + cv = []types.ScheduledSplit{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ScheduledSplit + destAddr := &col + if err := awsRestjson1_deserializeDocumentScheduledSplit(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ServiceQuotaExceededException + if *v == nil { + sv = &types.ServiceQuotaExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "quotaCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.QuotaCode = ptr.String(jtv) + } + + case "resourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + + case "resourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + case "serviceCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ServiceCode = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentServiceUnavailableException(v **types.ServiceUnavailableException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ServiceUnavailableException + if *v == nil { + sv = &types.ServiceUnavailableException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTagMap(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ThrottlingException + if *v == nil { + sv = &types.ThrottlingException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "quotaCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.QuotaCode = ptr.String(jtv) + } + + case "serviceCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ServiceCode = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTimestampList(v *[]time.Time, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []time.Time + if *v == nil { + cv = []time.Time{} + } else { + cv = *v + } + + for _, value := range shape { + var col time.Time + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + col = smithytime.ParseEpochSeconds(f64) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentTreatment(v **types.Treatment, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Treatment + if *v == nil { + sv = &types.Treatment{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "featureVariations": + if err := awsRestjson1_deserializeDocumentFeatureToVariationMap(&sv.FeatureVariations, value); err != nil { + return err + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TreatmentName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTreatmentList(v *[]types.Treatment, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Treatment + if *v == nil { + cv = []types.Treatment{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Treatment + destAddr := &col + if err := awsRestjson1_deserializeDocumentTreatment(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentTreatmentToWeightMap(v *map[string]int64, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]int64 + if *v == nil { + mv = map[string]int64{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal int64 + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected SplitWeight to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + parsedVal = i64 + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ValidationException + if *v == nil { + sv = &types.ValidationException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "fieldList": + if err := awsRestjson1_deserializeDocumentValidationExceptionFieldList(&sv.FieldList, value); err != nil { + return err + } + + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "reason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ValidationExceptionReason to be of type string, got %T instead", value) + } + sv.Reason = types.ValidationExceptionReason(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentValidationExceptionField(v **types.ValidationExceptionField, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ValidationExceptionField + if *v == nil { + sv = &types.ValidationExceptionField{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentValidationExceptionFieldList(v *[]types.ValidationExceptionField, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ValidationExceptionField + if *v == nil { + cv = []types.ValidationExceptionField{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ValidationExceptionField + destAddr := &col + if err := awsRestjson1_deserializeDocumentValidationExceptionField(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentVariableValue(v *types.VariableValue, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var uv types.VariableValue +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "boolValue": + var mv bool + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + mv = jtv + } + uv = &types.VariableValueMemberBoolValue{Value: mv} + break loop + + case "doubleValue": + var mv float64 + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + mv = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + mv = f64 + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + uv = &types.VariableValueMemberDoubleValue{Value: mv} + break loop + + case "longValue": + var mv int64 + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + mv = i64 + } + uv = &types.VariableValueMemberLongValue{Value: mv} + break loop + + case "stringValue": + var mv string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + mv = jtv + } + uv = &types.VariableValueMemberStringValue{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsRestjson1_deserializeDocumentVariation(v **types.Variation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Variation + if *v == nil { + sv = &types.Variation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VariationName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "value": + if err := awsRestjson1_deserializeDocumentVariableValue(&sv.Value, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentVariationsList(v *[]types.Variation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Variation + if *v == nil { + cv = []types.Variation{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Variation + destAddr := &col + if err := awsRestjson1_deserializeDocumentVariation(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} diff --git a/service/evidently/doc.go b/service/evidently/doc.go new file mode 100644 index 00000000000..75772314da5 --- /dev/null +++ b/service/evidently/doc.go @@ -0,0 +1,16 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package evidently provides the API client, operations, and parameter types for +// Amazon CloudWatch Evidently. +// +// You can use Amazon CloudWatch Evidently to safely validate new features by +// serving them to a specified percentage of your users while you roll out the +// feature. You can monitor the performance of the new feature to help you decide +// when to ramp up traffic to your users. This helps you reduce risk and identify +// unintended consequences before you fully launch the feature. You can also +// conduct A/B experiments to make feature design decisions based on evidence and +// data. An experiment can test as many as five variations at once. Evidently +// collects experiment data and analyzes it using statistical methods. It also +// provides clear recommendations about which variations perform better. You can +// test both user-facing features and backend features. +package evidently diff --git a/service/evidently/endpoints.go b/service/evidently/endpoints.go new file mode 100644 index 00000000000..04f9f7e211c --- /dev/null +++ b/service/evidently/endpoints.go @@ -0,0 +1,200 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + internalendpoints "github.com/aws/aws-sdk-go-v2/service/evidently/internal/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/url" + "strings" +) + +// EndpointResolverOptions is the service endpoint resolver options +type EndpointResolverOptions = internalendpoints.Options + +// EndpointResolver interface for resolving service endpoints. +type EndpointResolver interface { + ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) +} + +var _ EndpointResolver = &internalendpoints.Resolver{} + +// NewDefaultEndpointResolver constructs a new service endpoint resolver +func NewDefaultEndpointResolver() *internalendpoints.Resolver { + return internalendpoints.New() +} + +// EndpointResolverFunc is a helper utility that wraps a function so it satisfies +// the EndpointResolver interface. This is useful when you want to add additional +// endpoint resolving logic, or stub out specific endpoints with custom values. +type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) + +func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + return fn(region, options) +} + +func resolveDefaultEndpointConfiguration(o *Options) { + if o.EndpointResolver != nil { + return + } + o.EndpointResolver = NewDefaultEndpointResolver() +} + +// EndpointResolverFromURL returns an EndpointResolver configured using the +// provided endpoint url. By default, the resolved endpoint resolver uses the +// client region as signing region, and the endpoint source is set to +// EndpointSourceCustom.You can provide functional options to configure endpoint +// values for the resolved endpoint. +func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { + e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} + for _, fn := range optFns { + fn(&e) + } + + return EndpointResolverFunc( + func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { + if len(e.SigningRegion) == 0 { + e.SigningRegion = region + } + return e, nil + }, + ) +} + +type ResolveEndpoint struct { + Resolver EndpointResolver + Options EndpointResolverOptions +} + +func (*ResolveEndpoint) ID() string { + return "ResolveEndpoint" +} + +func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.Resolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + eo := m.Options + eo.Logger = middleware.GetLogger(ctx) + + var endpoint aws.Endpoint + endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL, err = url.Parse(endpoint.URL) + if err != nil { + return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) + } + + if len(awsmiddleware.GetSigningName(ctx)) == 0 { + signingName := endpoint.SigningName + if len(signingName) == 0 { + signingName = "evidently" + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + } + ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) + ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) + ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) + ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) + return next.HandleSerialize(ctx, in) +} +func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { + return stack.Serialize.Insert(&ResolveEndpoint{ + Resolver: o.EndpointResolver, + Options: o.EndpointOptions, + }, "OperationSerializer", middleware.Before) +} + +func removeResolveEndpointMiddleware(stack *middleware.Stack) error { + _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) + return err +} + +type wrappedEndpointResolver struct { + awsResolver aws.EndpointResolverWithOptions + resolver EndpointResolver +} + +func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + if w.awsResolver == nil { + goto fallback + } + endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options) + if err == nil { + return endpoint, nil + } + + if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) { + return endpoint, err + } + +fallback: + if w.resolver == nil { + return endpoint, fmt.Errorf("default endpoint resolver provided was nil") + } + return w.resolver.ResolveEndpoint(region, options) +} + +type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) + +func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { + return a(service, region) +} + +var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) + +// withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. +// If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided +// fallbackResolver for resolution. +// +// fallbackResolver must not be nil +func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver { + var resolver aws.EndpointResolverWithOptions + + if awsResolverWithOptions != nil { + resolver = awsResolverWithOptions + } else if awsResolver != nil { + resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) + } + + return &wrappedEndpointResolver{ + awsResolver: resolver, + resolver: fallbackResolver, + } +} + +func finalizeClientEndpointResolverOptions(options *Options) { + options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() + + if len(options.EndpointOptions.ResolvedRegion) == 0 { + const fipsInfix = "-fips-" + const fipsPrefix = "fips-" + const fipsSuffix = "-fips" + + if strings.Contains(options.Region, fipsInfix) || + strings.Contains(options.Region, fipsPrefix) || + strings.Contains(options.Region, fipsSuffix) { + options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( + options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") + options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled + } + } + +} diff --git a/service/evidently/generated.json b/service/evidently/generated.json new file mode 100644 index 00000000000..d713c8d92d9 --- /dev/null +++ b/service/evidently/generated.json @@ -0,0 +1,59 @@ +{ + "dependencies": { + "github.com/aws/aws-sdk-go-v2": "v1.4.0", + "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", + "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", + "github.com/aws/smithy-go": "v1.4.0" + }, + "files": [ + "api_client.go", + "api_op_BatchEvaluateFeature.go", + "api_op_CreateExperiment.go", + "api_op_CreateFeature.go", + "api_op_CreateLaunch.go", + "api_op_CreateProject.go", + "api_op_DeleteExperiment.go", + "api_op_DeleteFeature.go", + "api_op_DeleteLaunch.go", + "api_op_DeleteProject.go", + "api_op_EvaluateFeature.go", + "api_op_GetExperiment.go", + "api_op_GetExperimentResults.go", + "api_op_GetFeature.go", + "api_op_GetLaunch.go", + "api_op_GetProject.go", + "api_op_ListExperiments.go", + "api_op_ListFeatures.go", + "api_op_ListLaunches.go", + "api_op_ListProjects.go", + "api_op_ListTagsForResource.go", + "api_op_PutProjectEvents.go", + "api_op_StartExperiment.go", + "api_op_StartLaunch.go", + "api_op_StopExperiment.go", + "api_op_StopLaunch.go", + "api_op_TagResource.go", + "api_op_UntagResource.go", + "api_op_UpdateExperiment.go", + "api_op_UpdateFeature.go", + "api_op_UpdateLaunch.go", + "api_op_UpdateProject.go", + "api_op_UpdateProjectDataDelivery.go", + "deserializers.go", + "doc.go", + "endpoints.go", + "generated.json", + "internal/endpoints/endpoints.go", + "internal/endpoints/endpoints_test.go", + "protocol_test.go", + "serializers.go", + "types/enums.go", + "types/errors.go", + "types/types.go", + "types/types_exported_test.go", + "validators.go" + ], + "go": "1.15", + "module": "github.com/aws/aws-sdk-go-v2/service/evidently", + "unstable": false +} diff --git a/service/evidently/go.mod b/service/evidently/go.mod new file mode 100644 index 00000000000..79055c6aa3c --- /dev/null +++ b/service/evidently/go.mod @@ -0,0 +1,16 @@ +module github.com/aws/aws-sdk-go-v2/service/evidently + +go 1.15 + +require ( + github.com/aws/aws-sdk-go-v2 v1.11.1 + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.1 + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.0.1 + github.com/aws/smithy-go v1.9.0 +) + +replace github.com/aws/aws-sdk-go-v2 => ../../ + +replace github.com/aws/aws-sdk-go-v2/internal/configsources => ../../internal/configsources/ + +replace github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 => ../../internal/endpoints/v2/ diff --git a/service/evidently/go.sum b/service/evidently/go.sum new file mode 100644 index 00000000000..45efc0b1e03 --- /dev/null +++ b/service/evidently/go.sum @@ -0,0 +1,14 @@ +github.com/aws/smithy-go v1.9.0 h1:c7FUdEqrQA1/UVKKCNDFQPNKGp4FQg3YW4Ck5SLTG58= +github.com/aws/smithy-go v1.9.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/service/evidently/go_module_metadata.go b/service/evidently/go_module_metadata.go new file mode 100644 index 00000000000..37a5aed4222 --- /dev/null +++ b/service/evidently/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package evidently + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "tip" diff --git a/service/evidently/internal/endpoints/endpoints.go b/service/evidently/internal/endpoints/endpoints.go new file mode 100644 index 00000000000..48506213592 --- /dev/null +++ b/service/evidently/internal/endpoints/endpoints.go @@ -0,0 +1,250 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "github.com/aws/aws-sdk-go-v2/aws" + endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" + "github.com/aws/smithy-go/logging" + "regexp" +) + +// Options is the endpoint resolver configuration options +type Options struct { + // Logger is a logging implementation that log events should be sent to. + Logger logging.Logger + + // LogDeprecated indicates that deprecated endpoints should be logged to the + // provided logger. + LogDeprecated bool + + // ResolvedRegion is used to override the region to be resolved, rather then the + // using the value passed to the ResolveEndpoint method. This value is used by the + // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative + // name. You must not set this value directly in your application. + ResolvedRegion string + + // DisableHTTPS informs the resolver to return an endpoint that does not use the + // HTTPS scheme. + DisableHTTPS bool + + // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. + UseDualStackEndpoint aws.DualStackEndpointState + + // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. + UseFIPSEndpoint aws.FIPSEndpointState +} + +func (o Options) GetResolvedRegion() string { + return o.ResolvedRegion +} + +func (o Options) GetDisableHTTPS() bool { + return o.DisableHTTPS +} + +func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { + return o.UseDualStackEndpoint +} + +func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { + return o.UseFIPSEndpoint +} + +func transformToSharedOptions(options Options) endpoints.Options { + return endpoints.Options{ + Logger: options.Logger, + LogDeprecated: options.LogDeprecated, + ResolvedRegion: options.ResolvedRegion, + DisableHTTPS: options.DisableHTTPS, + UseDualStackEndpoint: options.UseDualStackEndpoint, + UseFIPSEndpoint: options.UseFIPSEndpoint, + } +} + +// Resolver Evidently endpoint resolver +type Resolver struct { + partitions endpoints.Partitions +} + +// ResolveEndpoint resolves the service endpoint for the given region and options +func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { + if len(region) == 0 { + return endpoint, &aws.MissingRegionError{} + } + + opt := transformToSharedOptions(options) + return r.partitions.ResolveEndpoint(region, opt) +} + +// New returns a new Resolver +func New() *Resolver { + return &Resolver{ + partitions: defaultPartitions, + } +} + +var partitionRegexp = struct { + Aws *regexp.Regexp + AwsCn *regexp.Regexp + AwsIso *regexp.Regexp + AwsIsoB *regexp.Regexp + AwsUsGov *regexp.Regexp +}{ + + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"), + AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), + AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), + AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), + AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), +} + +var defaultPartitions = endpoints.Partitions{ + { + ID: "aws", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "evidently.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "evidently-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "evidently-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "evidently.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: true, + }, + { + ID: "aws-cn", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "evidently.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "evidently-fips.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "evidently-fips.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "evidently.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsCn, + IsRegionalized: true, + }, + { + ID: "aws-iso", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "evidently-fips.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "evidently.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIso, + IsRegionalized: true, + }, + { + ID: "aws-iso-b", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "evidently-fips.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "evidently.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoB, + IsRegionalized: true, + }, + { + ID: "aws-us-gov", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "evidently.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "evidently-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "evidently-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "evidently.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: true, + }, +} diff --git a/service/evidently/internal/endpoints/endpoints_test.go b/service/evidently/internal/endpoints/endpoints_test.go new file mode 100644 index 00000000000..08e5da2d833 --- /dev/null +++ b/service/evidently/internal/endpoints/endpoints_test.go @@ -0,0 +1,11 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "testing" +) + +func TestRegexCompile(t *testing.T) { + _ = defaultPartitions +} diff --git a/service/evidently/protocol_test.go b/service/evidently/protocol_test.go new file mode 100644 index 00000000000..b179a0d368c --- /dev/null +++ b/service/evidently/protocol_test.go @@ -0,0 +1,3 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently diff --git a/service/evidently/serializers.go b/service/evidently/serializers.go new file mode 100644 index 00000000000..30df0d6997e --- /dev/null +++ b/service/evidently/serializers.go @@ -0,0 +1,3240 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "bytes" + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/evidently/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/encoding/httpbinding" + smithyjson "github.com/aws/smithy-go/encoding/json" + "github.com/aws/smithy-go/middleware" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + "math" +) + +type awsRestjson1_serializeOpBatchEvaluateFeature struct { +} + +func (*awsRestjson1_serializeOpBatchEvaluateFeature) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpBatchEvaluateFeature) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*BatchEvaluateFeatureInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/projects/{project}/evaluations") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsBatchEvaluateFeatureInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentBatchEvaluateFeatureInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsBatchEvaluateFeatureInput(v *BatchEvaluateFeatureInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Project == nil || len(*v.Project) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member project must not be empty")} + } + if v.Project != nil { + if err := encoder.SetURI("project").String(*v.Project); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentBatchEvaluateFeatureInput(v *BatchEvaluateFeatureInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Requests != nil { + ok := object.Key("requests") + if err := awsRestjson1_serializeDocumentEvaluationRequestsList(v.Requests, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCreateExperiment struct { +} + +func (*awsRestjson1_serializeOpCreateExperiment) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateExperiment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateExperimentInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/projects/{project}/experiments") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateExperimentInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateExperimentInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateExperimentInput(v *CreateExperimentInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Project == nil || len(*v.Project) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member project must not be empty")} + } + if v.Project != nil { + if err := encoder.SetURI("project").String(*v.Project); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateExperimentInput(v *CreateExperimentInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.MetricGoals != nil { + ok := object.Key("metricGoals") + if err := awsRestjson1_serializeDocumentMetricGoalConfigList(v.MetricGoals, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.OnlineAbConfig != nil { + ok := object.Key("onlineAbConfig") + if err := awsRestjson1_serializeDocumentOnlineAbConfig(v.OnlineAbConfig, ok); err != nil { + return err + } + } + + if v.RandomizationSalt != nil { + ok := object.Key("randomizationSalt") + ok.String(*v.RandomizationSalt) + } + + if v.SamplingRate != 0 { + ok := object.Key("samplingRate") + ok.Long(v.SamplingRate) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + if v.Treatments != nil { + ok := object.Key("treatments") + if err := awsRestjson1_serializeDocumentTreatmentConfigList(v.Treatments, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCreateFeature struct { +} + +func (*awsRestjson1_serializeOpCreateFeature) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateFeature) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateFeatureInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/projects/{project}/features") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateFeatureInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateFeatureInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateFeatureInput(v *CreateFeatureInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Project == nil || len(*v.Project) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member project must not be empty")} + } + if v.Project != nil { + if err := encoder.SetURI("project").String(*v.Project); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateFeatureInput(v *CreateFeatureInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DefaultVariation != nil { + ok := object.Key("defaultVariation") + ok.String(*v.DefaultVariation) + } + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.EntityOverrides != nil { + ok := object.Key("entityOverrides") + if err := awsRestjson1_serializeDocumentEntityOverrideMap(v.EntityOverrides, ok); err != nil { + return err + } + } + + if len(v.EvaluationStrategy) > 0 { + ok := object.Key("evaluationStrategy") + ok.String(string(v.EvaluationStrategy)) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + if v.Variations != nil { + ok := object.Key("variations") + if err := awsRestjson1_serializeDocumentVariationConfigsList(v.Variations, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCreateLaunch struct { +} + +func (*awsRestjson1_serializeOpCreateLaunch) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateLaunch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateLaunchInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/projects/{project}/launches") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateLaunchInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateLaunchInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateLaunchInput(v *CreateLaunchInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Project == nil || len(*v.Project) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member project must not be empty")} + } + if v.Project != nil { + if err := encoder.SetURI("project").String(*v.Project); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateLaunchInput(v *CreateLaunchInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.Groups != nil { + ok := object.Key("groups") + if err := awsRestjson1_serializeDocumentLaunchGroupConfigList(v.Groups, ok); err != nil { + return err + } + } + + if v.MetricMonitors != nil { + ok := object.Key("metricMonitors") + if err := awsRestjson1_serializeDocumentMetricMonitorConfigList(v.MetricMonitors, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.RandomizationSalt != nil { + ok := object.Key("randomizationSalt") + ok.String(*v.RandomizationSalt) + } + + if v.ScheduledSplitsConfig != nil { + ok := object.Key("scheduledSplitsConfig") + if err := awsRestjson1_serializeDocumentScheduledSplitsLaunchConfig(v.ScheduledSplitsConfig, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCreateProject struct { +} + +func (*awsRestjson1_serializeOpCreateProject) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateProject) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateProjectInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/projects") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateProjectInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateProjectInput(v *CreateProjectInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateProjectInput(v *CreateProjectInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DataDelivery != nil { + ok := object.Key("dataDelivery") + if err := awsRestjson1_serializeDocumentProjectDataDeliveryConfig(v.DataDelivery, ok); err != nil { + return err + } + } + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteExperiment struct { +} + +func (*awsRestjson1_serializeOpDeleteExperiment) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteExperiment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteExperimentInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/projects/{project}/experiments/{experiment}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteExperimentInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteExperimentInput(v *DeleteExperimentInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Experiment == nil || len(*v.Experiment) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member experiment must not be empty")} + } + if v.Experiment != nil { + if err := encoder.SetURI("experiment").String(*v.Experiment); err != nil { + return err + } + } + + if v.Project == nil || len(*v.Project) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member project must not be empty")} + } + if v.Project != nil { + if err := encoder.SetURI("project").String(*v.Project); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteFeature struct { +} + +func (*awsRestjson1_serializeOpDeleteFeature) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteFeature) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteFeatureInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/projects/{project}/features/{feature}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteFeatureInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteFeatureInput(v *DeleteFeatureInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Feature == nil || len(*v.Feature) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member feature must not be empty")} + } + if v.Feature != nil { + if err := encoder.SetURI("feature").String(*v.Feature); err != nil { + return err + } + } + + if v.Project == nil || len(*v.Project) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member project must not be empty")} + } + if v.Project != nil { + if err := encoder.SetURI("project").String(*v.Project); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteLaunch struct { +} + +func (*awsRestjson1_serializeOpDeleteLaunch) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteLaunch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteLaunchInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/projects/{project}/launches/{launch}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteLaunchInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteLaunchInput(v *DeleteLaunchInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Launch == nil || len(*v.Launch) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member launch must not be empty")} + } + if v.Launch != nil { + if err := encoder.SetURI("launch").String(*v.Launch); err != nil { + return err + } + } + + if v.Project == nil || len(*v.Project) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member project must not be empty")} + } + if v.Project != nil { + if err := encoder.SetURI("project").String(*v.Project); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteProject struct { +} + +func (*awsRestjson1_serializeOpDeleteProject) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteProject) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteProjectInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/projects/{project}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteProjectInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteProjectInput(v *DeleteProjectInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Project == nil || len(*v.Project) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member project must not be empty")} + } + if v.Project != nil { + if err := encoder.SetURI("project").String(*v.Project); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpEvaluateFeature struct { +} + +func (*awsRestjson1_serializeOpEvaluateFeature) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpEvaluateFeature) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*EvaluateFeatureInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/projects/{project}/evaluations/{feature}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsEvaluateFeatureInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentEvaluateFeatureInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsEvaluateFeatureInput(v *EvaluateFeatureInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Feature == nil || len(*v.Feature) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member feature must not be empty")} + } + if v.Feature != nil { + if err := encoder.SetURI("feature").String(*v.Feature); err != nil { + return err + } + } + + if v.Project == nil || len(*v.Project) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member project must not be empty")} + } + if v.Project != nil { + if err := encoder.SetURI("project").String(*v.Project); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentEvaluateFeatureInput(v *EvaluateFeatureInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EntityId != nil { + ok := object.Key("entityId") + ok.String(*v.EntityId) + } + + if v.EvaluationContext != nil { + ok := object.Key("evaluationContext") + ok.String(*v.EvaluationContext) + } + + return nil +} + +type awsRestjson1_serializeOpGetExperiment struct { +} + +func (*awsRestjson1_serializeOpGetExperiment) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetExperiment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetExperimentInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/projects/{project}/experiments/{experiment}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetExperimentInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetExperimentInput(v *GetExperimentInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Experiment == nil || len(*v.Experiment) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member experiment must not be empty")} + } + if v.Experiment != nil { + if err := encoder.SetURI("experiment").String(*v.Experiment); err != nil { + return err + } + } + + if v.Project == nil || len(*v.Project) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member project must not be empty")} + } + if v.Project != nil { + if err := encoder.SetURI("project").String(*v.Project); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetExperimentResults struct { +} + +func (*awsRestjson1_serializeOpGetExperimentResults) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetExperimentResults) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetExperimentResultsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/projects/{project}/experiments/{experiment}/results") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetExperimentResultsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentGetExperimentResultsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetExperimentResultsInput(v *GetExperimentResultsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Experiment == nil || len(*v.Experiment) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member experiment must not be empty")} + } + if v.Experiment != nil { + if err := encoder.SetURI("experiment").String(*v.Experiment); err != nil { + return err + } + } + + if v.Project == nil || len(*v.Project) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member project must not be empty")} + } + if v.Project != nil { + if err := encoder.SetURI("project").String(*v.Project); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentGetExperimentResultsInput(v *GetExperimentResultsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.BaseStat) > 0 { + ok := object.Key("baseStat") + ok.String(string(v.BaseStat)) + } + + if v.EndTime != nil { + ok := object.Key("endTime") + ok.Double(smithytime.FormatEpochSeconds(*v.EndTime)) + } + + if v.MetricNames != nil { + ok := object.Key("metricNames") + if err := awsRestjson1_serializeDocumentMetricNameList(v.MetricNames, ok); err != nil { + return err + } + } + + if v.Period != 0 { + ok := object.Key("period") + ok.Long(v.Period) + } + + if v.ReportNames != nil { + ok := object.Key("reportNames") + if err := awsRestjson1_serializeDocumentExperimentReportNameList(v.ReportNames, ok); err != nil { + return err + } + } + + if v.ResultStats != nil { + ok := object.Key("resultStats") + if err := awsRestjson1_serializeDocumentExperimentResultRequestTypeList(v.ResultStats, ok); err != nil { + return err + } + } + + if v.StartTime != nil { + ok := object.Key("startTime") + ok.Double(smithytime.FormatEpochSeconds(*v.StartTime)) + } + + if v.TreatmentNames != nil { + ok := object.Key("treatmentNames") + if err := awsRestjson1_serializeDocumentTreatmentNameList(v.TreatmentNames, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetFeature struct { +} + +func (*awsRestjson1_serializeOpGetFeature) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetFeature) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetFeatureInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/projects/{project}/features/{feature}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetFeatureInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetFeatureInput(v *GetFeatureInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Feature == nil || len(*v.Feature) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member feature must not be empty")} + } + if v.Feature != nil { + if err := encoder.SetURI("feature").String(*v.Feature); err != nil { + return err + } + } + + if v.Project == nil || len(*v.Project) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member project must not be empty")} + } + if v.Project != nil { + if err := encoder.SetURI("project").String(*v.Project); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetLaunch struct { +} + +func (*awsRestjson1_serializeOpGetLaunch) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetLaunch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetLaunchInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/projects/{project}/launches/{launch}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetLaunchInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetLaunchInput(v *GetLaunchInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Launch == nil || len(*v.Launch) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member launch must not be empty")} + } + if v.Launch != nil { + if err := encoder.SetURI("launch").String(*v.Launch); err != nil { + return err + } + } + + if v.Project == nil || len(*v.Project) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member project must not be empty")} + } + if v.Project != nil { + if err := encoder.SetURI("project").String(*v.Project); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetProject struct { +} + +func (*awsRestjson1_serializeOpGetProject) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetProject) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetProjectInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/projects/{project}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetProjectInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetProjectInput(v *GetProjectInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Project == nil || len(*v.Project) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member project must not be empty")} + } + if v.Project != nil { + if err := encoder.SetURI("project").String(*v.Project); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpListExperiments struct { +} + +func (*awsRestjson1_serializeOpListExperiments) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListExperiments) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListExperimentsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/projects/{project}/experiments") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListExperimentsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListExperimentsInput(v *ListExperimentsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if v.Project == nil || len(*v.Project) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member project must not be empty")} + } + if v.Project != nil { + if err := encoder.SetURI("project").String(*v.Project); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpListFeatures struct { +} + +func (*awsRestjson1_serializeOpListFeatures) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListFeatures) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListFeaturesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/projects/{project}/features") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListFeaturesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListFeaturesInput(v *ListFeaturesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if v.Project == nil || len(*v.Project) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member project must not be empty")} + } + if v.Project != nil { + if err := encoder.SetURI("project").String(*v.Project); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpListLaunches struct { +} + +func (*awsRestjson1_serializeOpListLaunches) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListLaunches) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListLaunchesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/projects/{project}/launches") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListLaunchesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListLaunchesInput(v *ListLaunchesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if v.Project == nil || len(*v.Project) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member project must not be empty")} + } + if v.Project != nil { + if err := encoder.SetURI("project").String(*v.Project); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpListProjects struct { +} + +func (*awsRestjson1_serializeOpListProjects) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListProjects) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListProjectsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/projects") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListProjectsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListProjectsInput(v *ListProjectsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListTagsForResource struct { +} + +func (*awsRestjson1_serializeOpListTagsForResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListTagsForResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpPutProjectEvents struct { +} + +func (*awsRestjson1_serializeOpPutProjectEvents) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPutProjectEvents) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutProjectEventsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/events/projects/{project}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsPutProjectEventsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPutProjectEventsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsPutProjectEventsInput(v *PutProjectEventsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Project == nil || len(*v.Project) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member project must not be empty")} + } + if v.Project != nil { + if err := encoder.SetURI("project").String(*v.Project); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentPutProjectEventsInput(v *PutProjectEventsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Events != nil { + ok := object.Key("events") + if err := awsRestjson1_serializeDocumentEventList(v.Events, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpStartExperiment struct { +} + +func (*awsRestjson1_serializeOpStartExperiment) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStartExperiment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StartExperimentInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/projects/{project}/experiments/{experiment}/start") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsStartExperimentInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentStartExperimentInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsStartExperimentInput(v *StartExperimentInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Experiment == nil || len(*v.Experiment) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member experiment must not be empty")} + } + if v.Experiment != nil { + if err := encoder.SetURI("experiment").String(*v.Experiment); err != nil { + return err + } + } + + if v.Project == nil || len(*v.Project) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member project must not be empty")} + } + if v.Project != nil { + if err := encoder.SetURI("project").String(*v.Project); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentStartExperimentInput(v *StartExperimentInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AnalysisCompleteTime != nil { + ok := object.Key("analysisCompleteTime") + ok.Double(smithytime.FormatEpochSeconds(*v.AnalysisCompleteTime)) + } + + return nil +} + +type awsRestjson1_serializeOpStartLaunch struct { +} + +func (*awsRestjson1_serializeOpStartLaunch) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStartLaunch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StartLaunchInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/projects/{project}/launches/{launch}/start") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsStartLaunchInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsStartLaunchInput(v *StartLaunchInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Launch == nil || len(*v.Launch) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member launch must not be empty")} + } + if v.Launch != nil { + if err := encoder.SetURI("launch").String(*v.Launch); err != nil { + return err + } + } + + if v.Project == nil || len(*v.Project) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member project must not be empty")} + } + if v.Project != nil { + if err := encoder.SetURI("project").String(*v.Project); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpStopExperiment struct { +} + +func (*awsRestjson1_serializeOpStopExperiment) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStopExperiment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StopExperimentInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/projects/{project}/experiments/{experiment}/cancel") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsStopExperimentInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentStopExperimentInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsStopExperimentInput(v *StopExperimentInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Experiment == nil || len(*v.Experiment) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member experiment must not be empty")} + } + if v.Experiment != nil { + if err := encoder.SetURI("experiment").String(*v.Experiment); err != nil { + return err + } + } + + if v.Project == nil || len(*v.Project) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member project must not be empty")} + } + if v.Project != nil { + if err := encoder.SetURI("project").String(*v.Project); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentStopExperimentInput(v *StopExperimentInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.DesiredState) > 0 { + ok := object.Key("desiredState") + ok.String(string(v.DesiredState)) + } + + if v.Reason != nil { + ok := object.Key("reason") + ok.String(*v.Reason) + } + + return nil +} + +type awsRestjson1_serializeOpStopLaunch struct { +} + +func (*awsRestjson1_serializeOpStopLaunch) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStopLaunch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StopLaunchInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/projects/{project}/launches/{launch}/cancel") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsStopLaunchInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentStopLaunchInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsStopLaunchInput(v *StopLaunchInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Launch == nil || len(*v.Launch) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member launch must not be empty")} + } + if v.Launch != nil { + if err := encoder.SetURI("launch").String(*v.Launch); err != nil { + return err + } + } + + if v.Project == nil || len(*v.Project) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member project must not be empty")} + } + if v.Project != nil { + if err := encoder.SetURI("project").String(*v.Project); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentStopLaunchInput(v *StopLaunchInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.DesiredState) > 0 { + ok := object.Key("desiredState") + ok.String(string(v.DesiredState)) + } + + if v.Reason != nil { + ok := object.Key("reason") + ok.String(*v.Reason) + } + + return nil +} + +type awsRestjson1_serializeOpTagResource struct { +} + +func (*awsRestjson1_serializeOpTagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*TagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUntagResource struct { +} + +func (*awsRestjson1_serializeOpUntagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UntagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + if v.TagKeys != nil { + for i := range v.TagKeys { + encoder.AddQuery("tagKeys").String(v.TagKeys[i]) + } + } + + return nil +} + +type awsRestjson1_serializeOpUpdateExperiment struct { +} + +func (*awsRestjson1_serializeOpUpdateExperiment) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateExperiment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateExperimentInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/projects/{project}/experiments/{experiment}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PATCH" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateExperimentInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateExperimentInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateExperimentInput(v *UpdateExperimentInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Experiment == nil || len(*v.Experiment) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member experiment must not be empty")} + } + if v.Experiment != nil { + if err := encoder.SetURI("experiment").String(*v.Experiment); err != nil { + return err + } + } + + if v.Project == nil || len(*v.Project) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member project must not be empty")} + } + if v.Project != nil { + if err := encoder.SetURI("project").String(*v.Project); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateExperimentInput(v *UpdateExperimentInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.MetricGoals != nil { + ok := object.Key("metricGoals") + if err := awsRestjson1_serializeDocumentMetricGoalConfigList(v.MetricGoals, ok); err != nil { + return err + } + } + + if v.OnlineAbConfig != nil { + ok := object.Key("onlineAbConfig") + if err := awsRestjson1_serializeDocumentOnlineAbConfig(v.OnlineAbConfig, ok); err != nil { + return err + } + } + + if v.RandomizationSalt != nil { + ok := object.Key("randomizationSalt") + ok.String(*v.RandomizationSalt) + } + + if v.SamplingRate != 0 { + ok := object.Key("samplingRate") + ok.Long(v.SamplingRate) + } + + if v.Treatments != nil { + ok := object.Key("treatments") + if err := awsRestjson1_serializeDocumentTreatmentConfigList(v.Treatments, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUpdateFeature struct { +} + +func (*awsRestjson1_serializeOpUpdateFeature) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateFeature) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateFeatureInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/projects/{project}/features/{feature}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PATCH" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateFeatureInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateFeatureInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateFeatureInput(v *UpdateFeatureInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Feature == nil || len(*v.Feature) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member feature must not be empty")} + } + if v.Feature != nil { + if err := encoder.SetURI("feature").String(*v.Feature); err != nil { + return err + } + } + + if v.Project == nil || len(*v.Project) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member project must not be empty")} + } + if v.Project != nil { + if err := encoder.SetURI("project").String(*v.Project); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateFeatureInput(v *UpdateFeatureInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AddOrUpdateVariations != nil { + ok := object.Key("addOrUpdateVariations") + if err := awsRestjson1_serializeDocumentVariationConfigsList(v.AddOrUpdateVariations, ok); err != nil { + return err + } + } + + if v.DefaultVariation != nil { + ok := object.Key("defaultVariation") + ok.String(*v.DefaultVariation) + } + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.EntityOverrides != nil { + ok := object.Key("entityOverrides") + if err := awsRestjson1_serializeDocumentEntityOverrideMap(v.EntityOverrides, ok); err != nil { + return err + } + } + + if len(v.EvaluationStrategy) > 0 { + ok := object.Key("evaluationStrategy") + ok.String(string(v.EvaluationStrategy)) + } + + if v.RemoveVariations != nil { + ok := object.Key("removeVariations") + if err := awsRestjson1_serializeDocumentVariationNameList(v.RemoveVariations, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUpdateLaunch struct { +} + +func (*awsRestjson1_serializeOpUpdateLaunch) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateLaunch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateLaunchInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/projects/{project}/launches/{launch}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PATCH" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateLaunchInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateLaunchInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateLaunchInput(v *UpdateLaunchInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Launch == nil || len(*v.Launch) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member launch must not be empty")} + } + if v.Launch != nil { + if err := encoder.SetURI("launch").String(*v.Launch); err != nil { + return err + } + } + + if v.Project == nil || len(*v.Project) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member project must not be empty")} + } + if v.Project != nil { + if err := encoder.SetURI("project").String(*v.Project); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateLaunchInput(v *UpdateLaunchInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.Groups != nil { + ok := object.Key("groups") + if err := awsRestjson1_serializeDocumentLaunchGroupConfigList(v.Groups, ok); err != nil { + return err + } + } + + if v.MetricMonitors != nil { + ok := object.Key("metricMonitors") + if err := awsRestjson1_serializeDocumentMetricMonitorConfigList(v.MetricMonitors, ok); err != nil { + return err + } + } + + if v.RandomizationSalt != nil { + ok := object.Key("randomizationSalt") + ok.String(*v.RandomizationSalt) + } + + if v.ScheduledSplitsConfig != nil { + ok := object.Key("scheduledSplitsConfig") + if err := awsRestjson1_serializeDocumentScheduledSplitsLaunchConfig(v.ScheduledSplitsConfig, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUpdateProject struct { +} + +func (*awsRestjson1_serializeOpUpdateProject) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateProject) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateProjectInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/projects/{project}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PATCH" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateProjectInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateProjectInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateProjectInput(v *UpdateProjectInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Project == nil || len(*v.Project) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member project must not be empty")} + } + if v.Project != nil { + if err := encoder.SetURI("project").String(*v.Project); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateProjectInput(v *UpdateProjectInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + return nil +} + +type awsRestjson1_serializeOpUpdateProjectDataDelivery struct { +} + +func (*awsRestjson1_serializeOpUpdateProjectDataDelivery) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateProjectDataDelivery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateProjectDataDeliveryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/projects/{project}/data-delivery") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PATCH" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateProjectDataDeliveryInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateProjectDataDeliveryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateProjectDataDeliveryInput(v *UpdateProjectDataDeliveryInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Project == nil || len(*v.Project) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member project must not be empty")} + } + if v.Project != nil { + if err := encoder.SetURI("project").String(*v.Project); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateProjectDataDeliveryInput(v *UpdateProjectDataDeliveryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CloudWatchLogs != nil { + ok := object.Key("cloudWatchLogs") + if err := awsRestjson1_serializeDocumentCloudWatchLogsDestinationConfig(v.CloudWatchLogs, ok); err != nil { + return err + } + } + + if v.S3Destination != nil { + ok := object.Key("s3Destination") + if err := awsRestjson1_serializeDocumentS3DestinationConfig(v.S3Destination, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentCloudWatchLogsDestinationConfig(v *types.CloudWatchLogsDestinationConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogGroup != nil { + ok := object.Key("logGroup") + ok.String(*v.LogGroup) + } + + return nil +} + +func awsRestjson1_serializeDocumentEntityOverrideMap(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + +func awsRestjson1_serializeDocumentEvaluationRequest(v *types.EvaluationRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EntityId != nil { + ok := object.Key("entityId") + ok.String(*v.EntityId) + } + + if v.EvaluationContext != nil { + ok := object.Key("evaluationContext") + ok.String(*v.EvaluationContext) + } + + if v.Feature != nil { + ok := object.Key("feature") + ok.String(*v.Feature) + } + + return nil +} + +func awsRestjson1_serializeDocumentEvaluationRequestsList(v []types.EvaluationRequest, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentEvaluationRequest(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentEvent(v *types.Event, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Data != nil { + ok := object.Key("data") + ok.String(*v.Data) + } + + if v.Timestamp != nil { + ok := object.Key("timestamp") + ok.Double(smithytime.FormatEpochSeconds(*v.Timestamp)) + } + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + return nil +} + +func awsRestjson1_serializeDocumentEventList(v []types.Event, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentEvent(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentExperimentReportNameList(v []types.ExperimentReportName, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsRestjson1_serializeDocumentExperimentResultRequestTypeList(v []types.ExperimentResultRequestType, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsRestjson1_serializeDocumentGroupToWeightMap(v map[string]int64, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.Long(v[key]) + } + return nil +} + +func awsRestjson1_serializeDocumentLaunchGroupConfig(v *types.LaunchGroupConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.Feature != nil { + ok := object.Key("feature") + ok.String(*v.Feature) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Variation != nil { + ok := object.Key("variation") + ok.String(*v.Variation) + } + + return nil +} + +func awsRestjson1_serializeDocumentLaunchGroupConfigList(v []types.LaunchGroupConfig, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentLaunchGroupConfig(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentMetricDefinitionConfig(v *types.MetricDefinitionConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EntityIdKey != nil { + ok := object.Key("entityIdKey") + ok.String(*v.EntityIdKey) + } + + if v.EventPattern != nil { + ok := object.Key("eventPattern") + ok.String(*v.EventPattern) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.UnitLabel != nil { + ok := object.Key("unitLabel") + ok.String(*v.UnitLabel) + } + + if v.ValueKey != nil { + ok := object.Key("valueKey") + ok.String(*v.ValueKey) + } + + return nil +} + +func awsRestjson1_serializeDocumentMetricGoalConfig(v *types.MetricGoalConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.DesiredChange) > 0 { + ok := object.Key("desiredChange") + ok.String(string(v.DesiredChange)) + } + + if v.MetricDefinition != nil { + ok := object.Key("metricDefinition") + if err := awsRestjson1_serializeDocumentMetricDefinitionConfig(v.MetricDefinition, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentMetricGoalConfigList(v []types.MetricGoalConfig, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentMetricGoalConfig(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentMetricMonitorConfig(v *types.MetricMonitorConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MetricDefinition != nil { + ok := object.Key("metricDefinition") + if err := awsRestjson1_serializeDocumentMetricDefinitionConfig(v.MetricDefinition, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentMetricMonitorConfigList(v []types.MetricMonitorConfig, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentMetricMonitorConfig(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentMetricNameList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentOnlineAbConfig(v *types.OnlineAbConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ControlTreatmentName != nil { + ok := object.Key("controlTreatmentName") + ok.String(*v.ControlTreatmentName) + } + + if v.TreatmentWeights != nil { + ok := object.Key("treatmentWeights") + if err := awsRestjson1_serializeDocumentTreatmentToWeightMap(v.TreatmentWeights, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentProjectDataDeliveryConfig(v *types.ProjectDataDeliveryConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CloudWatchLogs != nil { + ok := object.Key("cloudWatchLogs") + if err := awsRestjson1_serializeDocumentCloudWatchLogsDestinationConfig(v.CloudWatchLogs, ok); err != nil { + return err + } + } + + if v.S3Destination != nil { + ok := object.Key("s3Destination") + if err := awsRestjson1_serializeDocumentS3DestinationConfig(v.S3Destination, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentS3DestinationConfig(v *types.S3DestinationConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Bucket != nil { + ok := object.Key("bucket") + ok.String(*v.Bucket) + } + + if v.Prefix != nil { + ok := object.Key("prefix") + ok.String(*v.Prefix) + } + + return nil +} + +func awsRestjson1_serializeDocumentScheduledSplitConfig(v *types.ScheduledSplitConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.GroupWeights != nil { + ok := object.Key("groupWeights") + if err := awsRestjson1_serializeDocumentGroupToWeightMap(v.GroupWeights, ok); err != nil { + return err + } + } + + if v.StartTime != nil { + ok := object.Key("startTime") + ok.Double(smithytime.FormatEpochSeconds(*v.StartTime)) + } + + return nil +} + +func awsRestjson1_serializeDocumentScheduledSplitConfigList(v []types.ScheduledSplitConfig, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentScheduledSplitConfig(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentScheduledSplitsLaunchConfig(v *types.ScheduledSplitsLaunchConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Steps != nil { + ok := object.Key("steps") + if err := awsRestjson1_serializeDocumentScheduledSplitConfigList(v.Steps, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentTagMap(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + +func awsRestjson1_serializeDocumentTreatmentConfig(v *types.TreatmentConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.Feature != nil { + ok := object.Key("feature") + ok.String(*v.Feature) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Variation != nil { + ok := object.Key("variation") + ok.String(*v.Variation) + } + + return nil +} + +func awsRestjson1_serializeDocumentTreatmentConfigList(v []types.TreatmentConfig, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentTreatmentConfig(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentTreatmentNameList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentTreatmentToWeightMap(v map[string]int64, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.Long(v[key]) + } + return nil +} + +func awsRestjson1_serializeDocumentVariableValue(v types.VariableValue, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.VariableValueMemberBoolValue: + av := object.Key("boolValue") + av.Boolean(uv.Value) + + case *types.VariableValueMemberDoubleValue: + av := object.Key("doubleValue") + switch { + case math.IsNaN(uv.Value): + av.String("NaN") + + case math.IsInf(uv.Value, 1): + av.String("Infinity") + + case math.IsInf(uv.Value, -1): + av.String("-Infinity") + + default: + av.Double(uv.Value) + + } + + case *types.VariableValueMemberLongValue: + av := object.Key("longValue") + av.Long(uv.Value) + + case *types.VariableValueMemberStringValue: + av := object.Key("stringValue") + av.String(uv.Value) + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + +func awsRestjson1_serializeDocumentVariationConfig(v *types.VariationConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Value != nil { + ok := object.Key("value") + if err := awsRestjson1_serializeDocumentVariableValue(v.Value, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentVariationConfigsList(v []types.VariationConfig, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentVariationConfig(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentVariationNameList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} diff --git a/service/evidently/types/enums.go b/service/evidently/types/enums.go new file mode 100644 index 00000000000..c1a139820b9 --- /dev/null +++ b/service/evidently/types/enums.go @@ -0,0 +1,331 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type ChangeDirectionEnum string + +// Enum values for ChangeDirectionEnum +const ( + ChangeDirectionEnumIncrease ChangeDirectionEnum = "INCREASE" + ChangeDirectionEnumDecrease ChangeDirectionEnum = "DECREASE" +) + +// Values returns all known values for ChangeDirectionEnum. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ChangeDirectionEnum) Values() []ChangeDirectionEnum { + return []ChangeDirectionEnum{ + "INCREASE", + "DECREASE", + } +} + +type EventType string + +// Enum values for EventType +const ( + EventTypeEvaluation EventType = "aws.evidently.evaluation" + EventTypeCustom EventType = "aws.evidently.custom" +) + +// Values returns all known values for EventType. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (EventType) Values() []EventType { + return []EventType{ + "aws.evidently.evaluation", + "aws.evidently.custom", + } +} + +type ExperimentBaseStat string + +// Enum values for ExperimentBaseStat +const ( + ExperimentBaseStatMean ExperimentBaseStat = "Mean" +) + +// Values returns all known values for ExperimentBaseStat. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ExperimentBaseStat) Values() []ExperimentBaseStat { + return []ExperimentBaseStat{ + "Mean", + } +} + +type ExperimentReportName string + +// Enum values for ExperimentReportName +const ( + ExperimentReportNameBayesianInference ExperimentReportName = "BayesianInference" +) + +// Values returns all known values for ExperimentReportName. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ExperimentReportName) Values() []ExperimentReportName { + return []ExperimentReportName{ + "BayesianInference", + } +} + +type ExperimentResultRequestType string + +// Enum values for ExperimentResultRequestType +const ( + ExperimentResultRequestTypeBaseStat ExperimentResultRequestType = "BaseStat" + ExperimentResultRequestTypeTreatmentEffect ExperimentResultRequestType = "TreatmentEffect" + ExperimentResultRequestTypeConfidenceInterval ExperimentResultRequestType = "ConfidenceInterval" + ExperimentResultRequestTypePValue ExperimentResultRequestType = "PValue" +) + +// Values returns all known values for ExperimentResultRequestType. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// The ordering of this slice is not guaranteed to be stable across updates. +func (ExperimentResultRequestType) Values() []ExperimentResultRequestType { + return []ExperimentResultRequestType{ + "BaseStat", + "TreatmentEffect", + "ConfidenceInterval", + "PValue", + } +} + +type ExperimentResultResponseType string + +// Enum values for ExperimentResultResponseType +const ( + ExperimentResultResponseTypeMean ExperimentResultResponseType = "Mean" + ExperimentResultResponseTypeTreatmentEffect ExperimentResultResponseType = "TreatmentEffect" + ExperimentResultResponseTypeConfidenceIntervalUpperbound ExperimentResultResponseType = "ConfidenceIntervalUpperBound" + ExperimentResultResponseTypeConfidenceIntervalLowerbound ExperimentResultResponseType = "ConfidenceIntervalLowerBound" + ExperimentResultResponseTypePValue ExperimentResultResponseType = "PValue" +) + +// Values returns all known values for ExperimentResultResponseType. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// The ordering of this slice is not guaranteed to be stable across updates. +func (ExperimentResultResponseType) Values() []ExperimentResultResponseType { + return []ExperimentResultResponseType{ + "Mean", + "TreatmentEffect", + "ConfidenceIntervalUpperBound", + "ConfidenceIntervalLowerBound", + "PValue", + } +} + +type ExperimentStatus string + +// Enum values for ExperimentStatus +const ( + ExperimentStatusCreated ExperimentStatus = "CREATED" + ExperimentStatusUpdating ExperimentStatus = "UPDATING" + ExperimentStatusRunning ExperimentStatus = "RUNNING" + ExperimentStatusCompleted ExperimentStatus = "COMPLETED" + ExperimentStatusCancelled ExperimentStatus = "CANCELLED" +) + +// Values returns all known values for ExperimentStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ExperimentStatus) Values() []ExperimentStatus { + return []ExperimentStatus{ + "CREATED", + "UPDATING", + "RUNNING", + "COMPLETED", + "CANCELLED", + } +} + +type ExperimentStopDesiredState string + +// Enum values for ExperimentStopDesiredState +const ( + ExperimentStopDesiredStateCompleted ExperimentStopDesiredState = "COMPLETED" + ExperimentStopDesiredStateCancelled ExperimentStopDesiredState = "CANCELLED" +) + +// Values returns all known values for ExperimentStopDesiredState. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// The ordering of this slice is not guaranteed to be stable across updates. +func (ExperimentStopDesiredState) Values() []ExperimentStopDesiredState { + return []ExperimentStopDesiredState{ + "COMPLETED", + "CANCELLED", + } +} + +type ExperimentType string + +// Enum values for ExperimentType +const ( + ExperimentTypeOnlineAbExperiment ExperimentType = "aws.evidently.onlineab" +) + +// Values returns all known values for ExperimentType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ExperimentType) Values() []ExperimentType { + return []ExperimentType{ + "aws.evidently.onlineab", + } +} + +type FeatureEvaluationStrategy string + +// Enum values for FeatureEvaluationStrategy +const ( + FeatureEvaluationStrategyAllRules FeatureEvaluationStrategy = "ALL_RULES" + FeatureEvaluationStrategyDefaultVariation FeatureEvaluationStrategy = "DEFAULT_VARIATION" +) + +// Values returns all known values for FeatureEvaluationStrategy. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// The ordering of this slice is not guaranteed to be stable across updates. +func (FeatureEvaluationStrategy) Values() []FeatureEvaluationStrategy { + return []FeatureEvaluationStrategy{ + "ALL_RULES", + "DEFAULT_VARIATION", + } +} + +type FeatureStatus string + +// Enum values for FeatureStatus +const ( + FeatureStatusAvailable FeatureStatus = "AVAILABLE" + FeatureStatusUpdating FeatureStatus = "UPDATING" +) + +// Values returns all known values for FeatureStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (FeatureStatus) Values() []FeatureStatus { + return []FeatureStatus{ + "AVAILABLE", + "UPDATING", + } +} + +type LaunchStatus string + +// Enum values for LaunchStatus +const ( + LaunchStatusCreated LaunchStatus = "CREATED" + LaunchStatusUpdating LaunchStatus = "UPDATING" + LaunchStatusRunning LaunchStatus = "RUNNING" + LaunchStatusCompleted LaunchStatus = "COMPLETED" + LaunchStatusCancelled LaunchStatus = "CANCELLED" +) + +// Values returns all known values for LaunchStatus. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (LaunchStatus) Values() []LaunchStatus { + return []LaunchStatus{ + "CREATED", + "UPDATING", + "RUNNING", + "COMPLETED", + "CANCELLED", + } +} + +type LaunchStopDesiredState string + +// Enum values for LaunchStopDesiredState +const ( + LaunchStopDesiredStateCompleted LaunchStopDesiredState = "COMPLETED" + LaunchStopDesiredStateCancelled LaunchStopDesiredState = "CANCELLED" +) + +// Values returns all known values for LaunchStopDesiredState. Note that this can +// be expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (LaunchStopDesiredState) Values() []LaunchStopDesiredState { + return []LaunchStopDesiredState{ + "COMPLETED", + "CANCELLED", + } +} + +type LaunchType string + +// Enum values for LaunchType +const ( + LaunchTypeScheduledSplitsLaunch LaunchType = "aws.evidently.splits" +) + +// Values returns all known values for LaunchType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (LaunchType) Values() []LaunchType { + return []LaunchType{ + "aws.evidently.splits", + } +} + +type ProjectStatus string + +// Enum values for ProjectStatus +const ( + ProjectStatusAvailable ProjectStatus = "AVAILABLE" + ProjectStatusUpdating ProjectStatus = "UPDATING" +) + +// Values returns all known values for ProjectStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ProjectStatus) Values() []ProjectStatus { + return []ProjectStatus{ + "AVAILABLE", + "UPDATING", + } +} + +type ValidationExceptionReason string + +// Enum values for ValidationExceptionReason +const ( + ValidationExceptionReasonUnknownOperation ValidationExceptionReason = "unknownOperation" + ValidationExceptionReasonCannotParse ValidationExceptionReason = "cannotParse" + ValidationExceptionReasonFieldValidationFailed ValidationExceptionReason = "fieldValidationFailed" + ValidationExceptionReasonOther ValidationExceptionReason = "other" +) + +// Values returns all known values for ValidationExceptionReason. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// The ordering of this slice is not guaranteed to be stable across updates. +func (ValidationExceptionReason) Values() []ValidationExceptionReason { + return []ValidationExceptionReason{ + "unknownOperation", + "cannotParse", + "fieldValidationFailed", + "other", + } +} + +type VariationValueType string + +// Enum values for VariationValueType +const ( + VariationValueTypeString VariationValueType = "STRING" + VariationValueTypeLong VariationValueType = "LONG" + VariationValueTypeDouble VariationValueType = "DOUBLE" + VariationValueTypeBoolean VariationValueType = "BOOLEAN" +) + +// Values returns all known values for VariationValueType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (VariationValueType) Values() []VariationValueType { + return []VariationValueType{ + "STRING", + "LONG", + "DOUBLE", + "BOOLEAN", + } +} diff --git a/service/evidently/types/errors.go b/service/evidently/types/errors.go new file mode 100644 index 00000000000..50d0baea40d --- /dev/null +++ b/service/evidently/types/errors.go @@ -0,0 +1,177 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "fmt" + smithy "github.com/aws/smithy-go" +) + +// You do not have sufficient permissions to perform this action. +type AccessDeniedException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *AccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AccessDeniedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AccessDeniedException) ErrorCode() string { return "AccessDeniedException" } +func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A resource was in an inconsistent state during an update or a deletion. +type ConflictException struct { + Message *string + + ResourceId *string + ResourceType *string + + noSmithyDocumentSerde +} + +func (e *ConflictException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ConflictException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ConflictException) ErrorCode() string { return "ConflictException" } +func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Unexpected error while processing the request. Retry the request. +type InternalServerException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *InternalServerException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InternalServerException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InternalServerException) ErrorCode() string { return "InternalServerException" } +func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// The request references a resource that does not exist. +type ResourceNotFoundException struct { + Message *string + + ResourceId *string + ResourceType *string + + noSmithyDocumentSerde +} + +func (e *ResourceNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceNotFoundException) ErrorCode() string { return "ResourceNotFoundException" } +func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request would cause a service quota to be exceeded. +type ServiceQuotaExceededException struct { + Message *string + + ResourceId *string + ResourceType *string + ServiceCode *string + QuotaCode *string + + noSmithyDocumentSerde +} + +func (e *ServiceQuotaExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceQuotaExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceQuotaExceededException) ErrorCode() string { return "ServiceQuotaExceededException" } +func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The service was unavailable. Retry the request. +type ServiceUnavailableException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *ServiceUnavailableException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceUnavailableException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceUnavailableException) ErrorCode() string { return "ServiceUnavailableException" } +func (e *ServiceUnavailableException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// The request was denied because of request throttling. Retry the request. +type ThrottlingException struct { + Message *string + + ServiceCode *string + QuotaCode *string + + noSmithyDocumentSerde +} + +func (e *ThrottlingException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ThrottlingException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ThrottlingException) ErrorCode() string { return "ThrottlingException" } +func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The value of a parameter in the request caused an error. +type ValidationException struct { + Message *string + + Reason ValidationExceptionReason + FieldList []ValidationExceptionField + + noSmithyDocumentSerde +} + +func (e *ValidationException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ValidationException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ValidationException) ErrorCode() string { return "ValidationException" } +func (e *ValidationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/service/evidently/types/types.go b/service/evidently/types/types.go new file mode 100644 index 00000000000..c4a83048a21 --- /dev/null +++ b/service/evidently/types/types.go @@ -0,0 +1,1099 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + smithydocument "github.com/aws/smithy-go/document" + "time" +) + +// A structure containing the CloudWatch Logs log group where the project stores +// evaluation events. +type CloudWatchLogsDestination struct { + + // The name of the log group where the project stores evaluation events. + LogGroup *string + + noSmithyDocumentSerde +} + +// A structure containing the CloudWatch Logs log group where the project stores +// evaluation events. +type CloudWatchLogsDestinationConfig struct { + + // The name of the log group where the project stores evaluation events. + LogGroup *string + + noSmithyDocumentSerde +} + +// This structure assigns a feature variation to one user session. +type EvaluationRequest struct { + + // An internal ID that represents a unique user session of the application. This + // entityID is checked against any override rules assigned for this feature. + // + // This member is required. + EntityId *string + + // The name of the feature being evaluated. + // + // This member is required. + Feature *string + + // A JSON block of attributes that you can optionally pass in. This JSON block is + // included in the evaluation events sent to Evidently from the user session. + // + // This value conforms to the media type: application/json + EvaluationContext *string + + noSmithyDocumentSerde +} + +// This structure displays the results of one feature evaluation assignment to one +// user session. +type EvaluationResult struct { + + // An internal ID that represents a unique user session of the application. + // + // This member is required. + EntityId *string + + // The name of the feature being evaluated. + // + // This member is required. + Feature *string + + // If this user was assigned to a launch or experiment, this field lists the launch + // or experiment name. + // + // This value conforms to the media type: application/json + Details *string + + // The name or ARN of the project that contains the feature being evaluated. + Project *string + + // Specifies the reason that the user session was assigned this variation. Possible + // values include DEFAULT, meaning the user was served the default variation; + // LAUNCH_RULE_MATCH, if the user session was enrolled in a launch; or + // EXPERIMENT_RULE_MATCH, if the user session was enrolled in an experiment. + Reason *string + + // The value assigned to this variation to differentiate it from the other + // variations of this feature. + Value VariableValue + + // The name of the variation that was served to the user session. + Variation *string + + noSmithyDocumentSerde +} + +// A structure that contains the information about an evaluation rule for this +// feature, if it is used in a launch or experiment. +type EvaluationRule struct { + + // This value is aws.evidently.splits if this is an evaluation rule for a launch, + // and it is aws.evidently.onlineab if this is an evaluation rule for an + // experiment. + // + // This member is required. + Type *string + + // The name of the experiment or launch. + Name *string + + noSmithyDocumentSerde +} + +// A structure that contains the information about one evaluation event or custom +// event sent to Evidently. This is a JSON payload. If this event specifies a +// pre-defined event type, the payload must follow the defined event schema. +type Event struct { + + // The event data. + // + // This value conforms to the media type: application/json + // + // This member is required. + Data *string + + // The timestamp of the event. + // + // This member is required. + Timestamp *time.Time + + // aws.evidently.evaluation specifies an evaluation event, which determines which + // feature variation that a user sees. aws.evidently.custom specifies a custom + // event, which generates metrics from user actions such as clicks and checkouts. + // + // This member is required. + Type EventType + + noSmithyDocumentSerde +} + +// A structure containing the configuration details of an experiment. +type Experiment struct { + + // The ARN of the experiment. + // + // This member is required. + Arn *string + + // The date and time that the experiment is first created. + // + // This member is required. + CreatedTime *time.Time + + // The date and time that the experiment was most recently updated. + // + // This member is required. + LastUpdatedTime *time.Time + + // The name of the experiment. + // + // This member is required. + Name *string + + // The current state of the experiment. + // + // This member is required. + Status ExperimentStatus + + // The type of this experiment. Currently, this value must be + // aws.experiment.onlineab. + // + // This member is required. + Type ExperimentType + + // A description of the experiment. + Description *string + + // A structure that contains the date and time that the experiment started and + // ended. + Execution *ExperimentExecution + + // An array of structures that defines the metrics used for the experiment, and + // whether a higher or lower value for each metric is the goal. + MetricGoals []MetricGoal + + // A structure that contains the configuration of which variation to use as the + // "control" version. The "control" version is used for comparison with other + // variations. This structure also specifies how much experiment traffic is + // allocated to each variation. + OnlineAbDefinition *OnlineAbDefinition + + // The name or ARN of the project that contains this experiment. + Project *string + + // This value is used when Evidently assigns a particular user session to the + // experiment. It helps create a randomization ID to determine which variation the + // user session is served. This randomization ID is a combination of the entity ID + // and randomizationSalt. + RandomizationSalt *string + + // In thousandths of a percent, the amount of the available audience that is + // allocated to this experiment. The available audience is the total audience minus + // the audience that you have allocated to overrides or current launches of this + // feature. This is represented in thousandths of a percent, so a value of 10,000 + // is 10% of the available audience. + SamplingRate int64 + + // A structure that contains the time and date that Evidently completed the + // analysis of the experiment. + Schedule *ExperimentSchedule + + // If the experiment was stopped, this is the string that was entered by the person + // who stopped the experiment, to explain why it was stopped. + StatusReason *string + + // The list of tag keys and values associated with this experiment. + Tags map[string]string + + // An array of structures that describe the configuration of each feature variation + // used in the experiment. + Treatments []Treatment + + noSmithyDocumentSerde +} + +// This structure contains the date and time that the experiment started and ended. +type ExperimentExecution struct { + + // The date and time that the experiment ended. + EndedTime *time.Time + + // The date and time that the experiment started. + StartedTime *time.Time + + noSmithyDocumentSerde +} + +// A structure that contains results of an experiment. +type ExperimentReport struct { + + // The content of the report. + // + // This value conforms to the media type: application/json + Content *string + + // The name of the metric that is analyzed in this experiment report. + MetricName *string + + // The type of analysis used for this report. + ReportName ExperimentReportName + + // The name of the variation that this report pertains to. + TreatmentName *string + + noSmithyDocumentSerde +} + +// A structure that contains experiment results for one metric that is monitored in +// the experiment. +type ExperimentResultsData struct { + + // The name of the metric. + MetricName *string + + // The experiment statistic that these results pertain to. + ResultStat ExperimentResultResponseType + + // The treatment, or variation, that returned the values in this structure. + TreatmentName *string + + // The values for the metricName that were recorded in the experiment. + Values []float64 + + noSmithyDocumentSerde +} + +// This structure contains the time and date that Evidently completed the analysis +// of the experiment. +type ExperimentSchedule struct { + + // The time and date that Evidently completed the analysis of the experiment. + AnalysisCompleteTime *time.Time + + noSmithyDocumentSerde +} + +// This structure contains information about one Evidently feature in your account. +type Feature struct { + + // The ARN of the feature. + // + // This member is required. + Arn *string + + // The date and time that the feature is created. + // + // This member is required. + CreatedTime *time.Time + + // If this value is ALL_RULES, the traffic allocation specified by any ongoing + // launches or experiments is being used. If this is DEFAULT_VARIATION, the default + // variation is being served to all users. + // + // This member is required. + EvaluationStrategy FeatureEvaluationStrategy + + // The date and time that the feature was most recently updated. + // + // This member is required. + LastUpdatedTime *time.Time + + // The name of the feature. + // + // This member is required. + Name *string + + // The current state of the feature. + // + // This member is required. + Status FeatureStatus + + // Defines the type of value used to define the different feature variations. For + // more information, see Variation types + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Evidently-variationtypes.html) + // + // This member is required. + ValueType VariationValueType + + // An array of structures that contain the configuration of the feature's different + // variations. + // + // This member is required. + Variations []Variation + + // The name of the variation that is used as the default variation. The default + // variation is served to users who are not allocated to any ongoing launches or + // experiments of this feature. This variation must also be listed in the + // variations structure. If you omit defaultVariation, the first variation listed + // in the variations structure is used as the default variation. + DefaultVariation *string + + // The description of the feature. + Description *string + + // A set of key-value pairs that specify users who should always be served a + // specific variation of a feature. Each key specifies a user using their user ID, + // account ID, or some other identifier. The value specifies the name of the + // variation that the user is to be served. For the override to be successful, the + // value of the key must match the entityId used in the EvaluateFeature + // (https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_EvaluateFeature.html) + // operation. + EntityOverrides map[string]string + + // An array of structures that define the evaluation rules for the feature. + EvaluationRules []EvaluationRule + + // The name or ARN of the project that contains the feature. + Project *string + + // The list of tag keys and values associated with this feature. + Tags map[string]string + + noSmithyDocumentSerde +} + +// This structure contains information about one Evidently feature in your account. +type FeatureSummary struct { + + // The ARN of the feature. + // + // This member is required. + Arn *string + + // The date and time that the feature is created. + // + // This member is required. + CreatedTime *time.Time + + // If this value is ALL_RULES, the traffic allocation specified by any ongoing + // launches or experiments is being used. If this is DEFAULT_VARIATION, the default + // variation is being served to all users. + // + // This member is required. + EvaluationStrategy FeatureEvaluationStrategy + + // The date and time that the feature was most recently updated. + // + // This member is required. + LastUpdatedTime *time.Time + + // The name of the feature. + // + // This member is required. + Name *string + + // The current state of the feature. + // + // This member is required. + Status FeatureStatus + + // The name of the variation that is used as the default variation. The default + // variation is served to users who are not allocated to any ongoing launches or + // experiments of this feature. + DefaultVariation *string + + // An array of structures that define + EvaluationRules []EvaluationRule + + // The name or ARN of the project that contains the feature. + Project *string + + // The list of tag keys and values associated with this feature. + Tags map[string]string + + noSmithyDocumentSerde +} + +// This structure contains the configuration details of one Evidently launch. +type Launch struct { + + // The ARN of the launch. + // + // This member is required. + Arn *string + + // The date and time that the launch is created. + // + // This member is required. + CreatedTime *time.Time + + // The date and time that the launch was most recently updated. + // + // This member is required. + LastUpdatedTime *time.Time + + // The name of the launch. + // + // This member is required. + Name *string + + // The current state of the launch. + // + // This member is required. + Status LaunchStatus + + // The type of launch. + // + // This member is required. + Type LaunchType + + // The description of the launch. + Description *string + + // A structure that contains information about the start and end times of the + // launch. + Execution *LaunchExecution + + // An array of structures that define the feature variations that are being used in + // the launch. + Groups []LaunchGroup + + // An array of structures that define the metrics that are being used to monitor + // the launch performance. + MetricMonitors []MetricMonitor + + // The name or ARN of the project that contains the launch. + Project *string + + // This value is used when Evidently assigns a particular user session to the + // launch, to help create a randomization ID to determine which variation the user + // session is served. This randomization ID is a combination of the entity ID and + // randomizationSalt. + RandomizationSalt *string + + // An array of structures that define the traffic allocation percentages among the + // feature variations during each step of the launch. + ScheduledSplitsDefinition *ScheduledSplitsLaunchDefinition + + // If the launch was stopped, this is the string that was entered by the person who + // stopped the launch, to explain why it was stopped. + StatusReason *string + + // The list of tag keys and values associated with this launch. + Tags map[string]string + + noSmithyDocumentSerde +} + +// This structure contains information about the start and end times of the launch. +type LaunchExecution struct { + + // The date and time that the launch ended. + EndedTime *time.Time + + // The date and time that the launch started. + StartedTime *time.Time + + noSmithyDocumentSerde +} + +// A structure that defines one launch group in a launch. A launch group is a +// variation of the feature that you are including in the launch. +type LaunchGroup struct { + + // The feature variation for this launch group. This is a key-value pair. + // + // This member is required. + FeatureVariations map[string]string + + // The name of the launch group. + // + // This member is required. + Name *string + + // A description of the launch group. + Description *string + + noSmithyDocumentSerde +} + +// A structure that defines one launch group in a launch. A launch group is a +// variation of the feature that you are including in the launch. +type LaunchGroupConfig struct { + + // The feature that this launch is using. + // + // This member is required. + Feature *string + + // A name for this launch group. + // + // This member is required. + Name *string + + // The feature variation to use for this launch group. + // + // This member is required. + Variation *string + + // A description of the launch group. + Description *string + + noSmithyDocumentSerde +} + +// This structure defines a metric that is being used to evaluate the variations +// during a launch or experiment. +type MetricDefinition struct { + + // The entity, such as a user or session, that does an action that causes a metric + // value to be recorded. + EntityIdKey *string + + // The EventBridge event pattern that defines how the metric is recorded. For more + // information about EventBridge event patterns, see Amazon EventBridge event + // patterns + // (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html). + // + // This value conforms to the media type: application/json + EventPattern *string + + // The name of the metric. + Name *string + + // The label for the units that the metric is measuring. + UnitLabel *string + + // The value that is tracked to produce the metric. + ValueKey *string + + noSmithyDocumentSerde +} + +// This structure defines a metric that you want to use to evaluate the variations +// during a launch or experiment. +type MetricDefinitionConfig struct { + + // The entity, such as a user or session, that does an action that causes a metric + // value to be recorded. An example is userDetails.userID. + EntityIdKey *string + + // The EventBridge event pattern that defines how the metric is recorded. For more + // information about EventBridge event patterns, see Amazon EventBridge event + // patterns + // (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html). + // + // This value conforms to the media type: application/json + EventPattern *string + + // A name for the metric. + Name *string + + // A label for the units that the metric is measuring. + UnitLabel *string + + // The value that is tracked to produce the metric. + ValueKey *string + + noSmithyDocumentSerde +} + +// A structure that tells Evidently whether higher or lower values are desired for +// a metric that is used in an experiment. +type MetricGoal struct { + + // A structure that contains details about the metric. + // + // This member is required. + MetricDefinition *MetricDefinition + + // INCREASE means that a variation with a higher number for this metric is + // performing better. DECREASE means that a variation with a lower number for this + // metric is performing better. + DesiredChange ChangeDirectionEnum + + noSmithyDocumentSerde +} + +// Use this structure to tell Evidently whether higher or lower values are desired +// for a metric that is used in an experiment. +type MetricGoalConfig struct { + + // A structure that contains details about the metric. + // + // This member is required. + MetricDefinition *MetricDefinitionConfig + + // INCREASE means that a variation with a higher number for this metric is + // performing better. DECREASE means that a variation with a lower number for this + // metric is performing better. + DesiredChange ChangeDirectionEnum + + noSmithyDocumentSerde +} + +// A structure that defines a metric to be used to monitor performance of the +// variations during a launch. +type MetricMonitor struct { + + // A structure that defines the metric. + // + // This member is required. + MetricDefinition *MetricDefinition + + noSmithyDocumentSerde +} + +// A structure that defines a metric to be used to monitor performance of the +// variations during a launch. +type MetricMonitorConfig struct { + + // A structure that defines the metric. + // + // This member is required. + MetricDefinition *MetricDefinitionConfig + + noSmithyDocumentSerde +} + +// A structure that contains the configuration of which variation to use as the +// "control" version. The "control" version is used for comparison with other +// variations. This structure also specifies how much experiment traffic is +// allocated to each variation. +type OnlineAbConfig struct { + + // The name of the variation that is to be the default variation that the other + // variations are compared to. + ControlTreatmentName *string + + // A set of key-value pairs. The keys are variation names, and the values are the + // portion of experiment traffic to be assigned to that variation. Specify the + // traffic portion in thousandths of a percent, so 20,000 for a variation would + // allocate 20% of the experiment traffic to that variation. + TreatmentWeights map[string]int64 + + noSmithyDocumentSerde +} + +// A structure that contains the configuration of which variation to use as the +// "control" version. The "control" version is used for comparison with other +// variations. This structure also specifies how much experiment traffic is +// allocated to each variation. +type OnlineAbDefinition struct { + + // The name of the variation that is the default variation that the other + // variations are compared to. + ControlTreatmentName *string + + // A set of key-value pairs. The keys are variation names, and the values are the + // portion of experiment traffic to be assigned to that variation. The traffic + // portion is specified in thousandths of a percent, so 20,000 for a variation + // would allocate 20% of the experiment traffic to that variation. + TreatmentWeights map[string]int64 + + noSmithyDocumentSerde +} + +// This structure defines a project, which is the logical object in Evidently that +// can contain features, launches, and experiments. Use projects to group similar +// features together. +type Project struct { + + // The name or ARN of the project. + // + // This member is required. + Arn *string + + // The date and time that the project is created. + // + // This member is required. + CreatedTime *time.Time + + // The date and time that the project was most recently updated. + // + // This member is required. + LastUpdatedTime *time.Time + + // The name of the project. + // + // This member is required. + Name *string + + // The current state of the project. + // + // This member is required. + Status ProjectStatus + + // The number of ongoing experiments currently in the project. + ActiveExperimentCount *int64 + + // The number of ongoing launches currently in the project. + ActiveLaunchCount *int64 + + // A structure that contains information about where Evidently is to store + // evaluation events for longer term storage. + DataDelivery *ProjectDataDelivery + + // The user-entered description of the project. + Description *string + + // The number of experiments currently in the project. This includes all + // experiments that have been created and not deleted, whether they are ongoing or + // not. + ExperimentCount *int64 + + // The number of features currently in the project. + FeatureCount *int64 + + // The number of launches currently in the project. This includes all launches that + // have been created and not deleted, whether they are ongoing or not. + LaunchCount *int64 + + // The list of tag keys and values associated with this project. + Tags map[string]string + + noSmithyDocumentSerde +} + +// A structure that contains information about where Evidently is to store +// evaluation events for longer term storage. +type ProjectDataDelivery struct { + + // If the project stores evaluation events in CloudWatch Logs, this structure + // stores the log group name. + CloudWatchLogs *CloudWatchLogsDestination + + // If the project stores evaluation events in an Amazon S3 bucket, this structure + // stores the bucket name and bucket prefix. + S3Destination *S3Destination + + noSmithyDocumentSerde +} + +// A structure that contains information about where Evidently is to store +// evaluation events for longer term storage. +type ProjectDataDeliveryConfig struct { + + // If the project stores evaluation events in CloudWatch Logs, this structure + // stores the log group name. + CloudWatchLogs *CloudWatchLogsDestinationConfig + + // If the project stores evaluation events in an Amazon S3 bucket, this structure + // stores the bucket name and bucket prefix. + S3Destination *S3DestinationConfig + + noSmithyDocumentSerde +} + +// A structure that contains configuration information about an Evidently project. +type ProjectSummary struct { + + // The name or ARN of the project. + // + // This member is required. + Arn *string + + // The date and time that the project is created. + // + // This member is required. + CreatedTime *time.Time + + // The date and time that the project was most recently updated. + // + // This member is required. + LastUpdatedTime *time.Time + + // The name of the project. + // + // This member is required. + Name *string + + // The current state of the project. + // + // This member is required. + Status ProjectStatus + + // The number of experiments currently in the project. + ActiveExperimentCount *int64 + + // The number of ongoing launches currently in the project. + ActiveLaunchCount *int64 + + // The description of the project. + Description *string + + // The number of experiments currently in the project. + ExperimentCount *int64 + + // The number of features currently in the project. + FeatureCount *int64 + + // The number of launches currently in the project, including launches that are + // ongoing, completed, and not started yet. + LaunchCount *int64 + + // The list of tag keys and values associated with this project. + Tags map[string]string + + noSmithyDocumentSerde +} + +// A structure that contains Evidently's response to the sent events, including an +// event ID and error codes, if any. +type PutProjectEventsResultEntry struct { + + // If the PutProjectEvents operation has an error, the error code is returned here. + ErrorCode *string + + // If the PutProjectEvents operation has an error, the error message is returned + // here. + ErrorMessage *string + + // A unique ID assigned to this PutProjectEvents operation. + EventId *string + + noSmithyDocumentSerde +} + +// If the project stores evaluation events in an Amazon S3 bucket, this structure +// stores the bucket name and bucket prefix. +type S3Destination struct { + + // The name of the bucket in which Evidently stores evaluation events. + Bucket *string + + // The bucket prefix in which Evidently stores evaluation events. + Prefix *string + + noSmithyDocumentSerde +} + +// If the project stores evaluation events in an Amazon S3 bucket, this structure +// stores the bucket name and bucket prefix. +type S3DestinationConfig struct { + + // The name of the bucket in which Evidently stores evaluation events. + Bucket *string + + // The bucket prefix in which Evidently stores evaluation events. + Prefix *string + + noSmithyDocumentSerde +} + +// This structure defines the traffic allocation percentages among the feature +// variations during one step of a launch, and the start time of that step. +type ScheduledSplit struct { + + // The date and time that this step of the launch starts. + // + // This member is required. + StartTime *time.Time + + // The traffic allocation percentages among the feature variations during one step + // of a launch. This is a set of key-value pairs. The keys are variation names. The + // values represent the percentage of traffic to allocate to that variation during + // this step. + GroupWeights map[string]int64 + + noSmithyDocumentSerde +} + +// This structure defines the traffic allocation percentages among the feature +// variations during one step of a launch, and the start time of that step. +type ScheduledSplitConfig struct { + + // The traffic allocation percentages among the feature variations during one step + // of a launch. This is a set of key-value pairs. The keys are variation names. The + // values represent the percentage of traffic to allocate to that variation during + // this step. + // + // This member is required. + GroupWeights map[string]int64 + + // The date and time that this step of the launch starts. + // + // This member is required. + StartTime *time.Time + + noSmithyDocumentSerde +} + +// An array of structures that define the traffic allocation percentages among the +// feature variations during each step of a launch. This also defines the start +// time of each step. +type ScheduledSplitsLaunchConfig struct { + + // An array of structures that define the traffic allocation percentages among the + // feature variations during each step of the launch. This also defines the start + // time of each step. + // + // This member is required. + Steps []ScheduledSplitConfig + + noSmithyDocumentSerde +} + +// An array of structures that define the traffic allocation percentages among the +// feature variations during each step of a launch. This also defines the start +// time of each step. +type ScheduledSplitsLaunchDefinition struct { + + // An array of structures that define the traffic allocation percentages among the + // feature variations during each step of the launch. This also defines the start + // time of each step. + Steps []ScheduledSplit + + noSmithyDocumentSerde +} + +// A structure that defines one treatment in an experiment. A treatment is a +// variation of the feature that you are including in the experiment. +type Treatment struct { + + // The name of this treatment. + // + // This member is required. + Name *string + + // The description of the treatment. + Description *string + + // The feature variation used for this treatment. This is a key-value pair. The key + // is the feature name, and the value is the variation name. + FeatureVariations map[string]string + + noSmithyDocumentSerde +} + +// A structure that defines one treatment in an experiment. A treatment is a +// variation of the feature that you are including in the experiment. +type TreatmentConfig struct { + + // The feature that this experiment is testing. + // + // This member is required. + Feature *string + + // A name for this treatment. + // + // This member is required. + Name *string + + // The name of the variation to use as this treatment in the experiment. + // + // This member is required. + Variation *string + + // A description for this treatment. + Description *string + + noSmithyDocumentSerde +} + +// A structure containing an error name and message. +type ValidationExceptionField struct { + + // The error message. + // + // This member is required. + Message *string + + // The error name. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +// The value assigned to a feature variation. This structure must contain exactly +// one field. It can be boolValue, doubleValue, longValue, or stringValue. +// +// The following types satisfy this interface: +// VariableValueMemberBoolValue +// VariableValueMemberDoubleValue +// VariableValueMemberLongValue +// VariableValueMemberStringValue +type VariableValue interface { + isVariableValue() +} + +// If this feature uses the Boolean variation type, this field contains the Boolean +// value of this variation. +type VariableValueMemberBoolValue struct { + Value bool + + noSmithyDocumentSerde +} + +func (*VariableValueMemberBoolValue) isVariableValue() {} + +// If this feature uses the double integer variation type, this field contains the +// double integer value of this variation. +type VariableValueMemberDoubleValue struct { + Value float64 + + noSmithyDocumentSerde +} + +func (*VariableValueMemberDoubleValue) isVariableValue() {} + +// If this feature uses the long variation type, this field contains the long value +// of this variation. +type VariableValueMemberLongValue struct { + Value int64 + + noSmithyDocumentSerde +} + +func (*VariableValueMemberLongValue) isVariableValue() {} + +// If this feature uses the string variation type, this field contains the string +// value of this variation. +type VariableValueMemberStringValue struct { + Value string + + noSmithyDocumentSerde +} + +func (*VariableValueMemberStringValue) isVariableValue() {} + +// This structure contains the name and variation value of one variation of a +// feature. +type Variation struct { + + // The name of the variation. + Name *string + + // The value assigned to this variation. + Value VariableValue + + noSmithyDocumentSerde +} + +// This structure contains the name and variation value of one variation of a +// feature. +type VariationConfig struct { + + // The name of the variation. + // + // This member is required. + Name *string + + // The value assigned to this variation. + // + // This member is required. + Value VariableValue + + noSmithyDocumentSerde +} + +type noSmithyDocumentSerde = smithydocument.NoSerde + +// UnknownUnionMember is returned when a union member is returned over the wire, +// but has an unknown tag. +type UnknownUnionMember struct { + Tag string + Value []byte + + noSmithyDocumentSerde +} + +func (*UnknownUnionMember) isVariableValue() {} diff --git a/service/evidently/types/types_exported_test.go b/service/evidently/types/types_exported_test.go new file mode 100644 index 00000000000..ca2f8c2b190 --- /dev/null +++ b/service/evidently/types/types_exported_test.go @@ -0,0 +1,38 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types_test + +import ( + "fmt" + "github.com/aws/aws-sdk-go-v2/service/evidently/types" +) + +func ExampleVariableValue_outputUsage() { + var union types.VariableValue + // type switches can be used to check the union value + switch v := union.(type) { + case *types.VariableValueMemberBoolValue: + _ = v.Value // Value is bool + + case *types.VariableValueMemberDoubleValue: + _ = v.Value // Value is float64 + + case *types.VariableValueMemberLongValue: + _ = v.Value // Value is int64 + + case *types.VariableValueMemberStringValue: + _ = v.Value // Value is string + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *string +var _ *bool +var _ *int64 +var _ *float64 diff --git a/service/evidently/validators.go b/service/evidently/validators.go new file mode 100644 index 00000000000..8644986c0b6 --- /dev/null +++ b/service/evidently/validators.go @@ -0,0 +1,1676 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package evidently + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/evidently/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpBatchEvaluateFeature struct { +} + +func (*validateOpBatchEvaluateFeature) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchEvaluateFeature) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchEvaluateFeatureInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchEvaluateFeatureInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateExperiment struct { +} + +func (*validateOpCreateExperiment) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateExperiment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateExperimentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateExperimentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateFeature struct { +} + +func (*validateOpCreateFeature) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateFeature) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateFeatureInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateFeatureInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateLaunch struct { +} + +func (*validateOpCreateLaunch) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateLaunch) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateLaunchInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateLaunchInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateProject struct { +} + +func (*validateOpCreateProject) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateProject) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateProjectInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateProjectInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteExperiment struct { +} + +func (*validateOpDeleteExperiment) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteExperiment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteExperimentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteExperimentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteFeature struct { +} + +func (*validateOpDeleteFeature) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteFeature) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteFeatureInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteFeatureInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteLaunch struct { +} + +func (*validateOpDeleteLaunch) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteLaunch) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteLaunchInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteLaunchInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteProject struct { +} + +func (*validateOpDeleteProject) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteProject) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteProjectInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteProjectInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpEvaluateFeature struct { +} + +func (*validateOpEvaluateFeature) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpEvaluateFeature) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*EvaluateFeatureInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpEvaluateFeatureInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetExperiment struct { +} + +func (*validateOpGetExperiment) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetExperiment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetExperimentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetExperimentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetExperimentResults struct { +} + +func (*validateOpGetExperimentResults) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetExperimentResults) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetExperimentResultsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetExperimentResultsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetFeature struct { +} + +func (*validateOpGetFeature) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetFeature) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetFeatureInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetFeatureInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetLaunch struct { +} + +func (*validateOpGetLaunch) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetLaunch) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetLaunchInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetLaunchInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetProject struct { +} + +func (*validateOpGetProject) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetProject) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetProjectInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetProjectInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListExperiments struct { +} + +func (*validateOpListExperiments) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListExperiments) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListExperimentsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListExperimentsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListFeatures struct { +} + +func (*validateOpListFeatures) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListFeatures) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListFeaturesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListFeaturesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListLaunches struct { +} + +func (*validateOpListLaunches) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListLaunches) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListLaunchesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListLaunchesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListTagsForResource struct { +} + +func (*validateOpListTagsForResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListTagsForResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListTagsForResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutProjectEvents struct { +} + +func (*validateOpPutProjectEvents) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutProjectEvents) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutProjectEventsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutProjectEventsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStartExperiment struct { +} + +func (*validateOpStartExperiment) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartExperiment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartExperimentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartExperimentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStartLaunch struct { +} + +func (*validateOpStartLaunch) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartLaunch) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartLaunchInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartLaunchInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStopExperiment struct { +} + +func (*validateOpStopExperiment) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStopExperiment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StopExperimentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStopExperimentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStopLaunch struct { +} + +func (*validateOpStopLaunch) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStopLaunch) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StopLaunchInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStopLaunchInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpTagResource struct { +} + +func (*validateOpTagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUntagResource struct { +} + +func (*validateOpUntagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UntagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUntagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateExperiment struct { +} + +func (*validateOpUpdateExperiment) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateExperiment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateExperimentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateExperimentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateFeature struct { +} + +func (*validateOpUpdateFeature) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateFeature) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateFeatureInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateFeatureInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateLaunch struct { +} + +func (*validateOpUpdateLaunch) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateLaunch) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateLaunchInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateLaunchInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateProjectDataDelivery struct { +} + +func (*validateOpUpdateProjectDataDelivery) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateProjectDataDelivery) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateProjectDataDeliveryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateProjectDataDeliveryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateProject struct { +} + +func (*validateOpUpdateProject) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateProject) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateProjectInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateProjectInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpBatchEvaluateFeatureValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchEvaluateFeature{}, middleware.After) +} + +func addOpCreateExperimentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateExperiment{}, middleware.After) +} + +func addOpCreateFeatureValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateFeature{}, middleware.After) +} + +func addOpCreateLaunchValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateLaunch{}, middleware.After) +} + +func addOpCreateProjectValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateProject{}, middleware.After) +} + +func addOpDeleteExperimentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteExperiment{}, middleware.After) +} + +func addOpDeleteFeatureValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteFeature{}, middleware.After) +} + +func addOpDeleteLaunchValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteLaunch{}, middleware.After) +} + +func addOpDeleteProjectValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteProject{}, middleware.After) +} + +func addOpEvaluateFeatureValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpEvaluateFeature{}, middleware.After) +} + +func addOpGetExperimentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetExperiment{}, middleware.After) +} + +func addOpGetExperimentResultsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetExperimentResults{}, middleware.After) +} + +func addOpGetFeatureValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetFeature{}, middleware.After) +} + +func addOpGetLaunchValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetLaunch{}, middleware.After) +} + +func addOpGetProjectValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetProject{}, middleware.After) +} + +func addOpListExperimentsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListExperiments{}, middleware.After) +} + +func addOpListFeaturesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListFeatures{}, middleware.After) +} + +func addOpListLaunchesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListLaunches{}, middleware.After) +} + +func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) +} + +func addOpPutProjectEventsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutProjectEvents{}, middleware.After) +} + +func addOpStartExperimentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartExperiment{}, middleware.After) +} + +func addOpStartLaunchValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartLaunch{}, middleware.After) +} + +func addOpStopExperimentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStopExperiment{}, middleware.After) +} + +func addOpStopLaunchValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStopLaunch{}, middleware.After) +} + +func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) +} + +func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) +} + +func addOpUpdateExperimentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateExperiment{}, middleware.After) +} + +func addOpUpdateFeatureValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateFeature{}, middleware.After) +} + +func addOpUpdateLaunchValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateLaunch{}, middleware.After) +} + +func addOpUpdateProjectDataDeliveryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateProjectDataDelivery{}, middleware.After) +} + +func addOpUpdateProjectValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateProject{}, middleware.After) +} + +func validateEvaluationRequest(v *types.EvaluationRequest) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EvaluationRequest"} + if v.Feature == nil { + invalidParams.Add(smithy.NewErrParamRequired("Feature")) + } + if v.EntityId == nil { + invalidParams.Add(smithy.NewErrParamRequired("EntityId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateEvaluationRequestsList(v []types.EvaluationRequest) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EvaluationRequestsList"} + for i := range v { + if err := validateEvaluationRequest(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateEvent(v *types.Event) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Event"} + if v.Timestamp == nil { + invalidParams.Add(smithy.NewErrParamRequired("Timestamp")) + } + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if v.Data == nil { + invalidParams.Add(smithy.NewErrParamRequired("Data")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateEventList(v []types.Event) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EventList"} + for i := range v { + if err := validateEvent(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLaunchGroupConfig(v *types.LaunchGroupConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LaunchGroupConfig"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Feature == nil { + invalidParams.Add(smithy.NewErrParamRequired("Feature")) + } + if v.Variation == nil { + invalidParams.Add(smithy.NewErrParamRequired("Variation")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLaunchGroupConfigList(v []types.LaunchGroupConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LaunchGroupConfigList"} + for i := range v { + if err := validateLaunchGroupConfig(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMetricGoalConfig(v *types.MetricGoalConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MetricGoalConfig"} + if v.MetricDefinition == nil { + invalidParams.Add(smithy.NewErrParamRequired("MetricDefinition")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMetricGoalConfigList(v []types.MetricGoalConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MetricGoalConfigList"} + for i := range v { + if err := validateMetricGoalConfig(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMetricMonitorConfig(v *types.MetricMonitorConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MetricMonitorConfig"} + if v.MetricDefinition == nil { + invalidParams.Add(smithy.NewErrParamRequired("MetricDefinition")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMetricMonitorConfigList(v []types.MetricMonitorConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MetricMonitorConfigList"} + for i := range v { + if err := validateMetricMonitorConfig(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateScheduledSplitConfig(v *types.ScheduledSplitConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ScheduledSplitConfig"} + if v.StartTime == nil { + invalidParams.Add(smithy.NewErrParamRequired("StartTime")) + } + if v.GroupWeights == nil { + invalidParams.Add(smithy.NewErrParamRequired("GroupWeights")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateScheduledSplitConfigList(v []types.ScheduledSplitConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ScheduledSplitConfigList"} + for i := range v { + if err := validateScheduledSplitConfig(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateScheduledSplitsLaunchConfig(v *types.ScheduledSplitsLaunchConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ScheduledSplitsLaunchConfig"} + if v.Steps == nil { + invalidParams.Add(smithy.NewErrParamRequired("Steps")) + } else if v.Steps != nil { + if err := validateScheduledSplitConfigList(v.Steps); err != nil { + invalidParams.AddNested("Steps", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTreatmentConfig(v *types.TreatmentConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TreatmentConfig"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Feature == nil { + invalidParams.Add(smithy.NewErrParamRequired("Feature")) + } + if v.Variation == nil { + invalidParams.Add(smithy.NewErrParamRequired("Variation")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTreatmentConfigList(v []types.TreatmentConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TreatmentConfigList"} + for i := range v { + if err := validateTreatmentConfig(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateVariationConfig(v *types.VariationConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "VariationConfig"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateVariationConfigsList(v []types.VariationConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "VariationConfigsList"} + for i := range v { + if err := validateVariationConfig(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpBatchEvaluateFeatureInput(v *BatchEvaluateFeatureInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchEvaluateFeatureInput"} + if v.Project == nil { + invalidParams.Add(smithy.NewErrParamRequired("Project")) + } + if v.Requests == nil { + invalidParams.Add(smithy.NewErrParamRequired("Requests")) + } else if v.Requests != nil { + if err := validateEvaluationRequestsList(v.Requests); err != nil { + invalidParams.AddNested("Requests", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateExperimentInput(v *CreateExperimentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateExperimentInput"} + if v.Project == nil { + invalidParams.Add(smithy.NewErrParamRequired("Project")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Treatments == nil { + invalidParams.Add(smithy.NewErrParamRequired("Treatments")) + } else if v.Treatments != nil { + if err := validateTreatmentConfigList(v.Treatments); err != nil { + invalidParams.AddNested("Treatments", err.(smithy.InvalidParamsError)) + } + } + if v.MetricGoals == nil { + invalidParams.Add(smithy.NewErrParamRequired("MetricGoals")) + } else if v.MetricGoals != nil { + if err := validateMetricGoalConfigList(v.MetricGoals); err != nil { + invalidParams.AddNested("MetricGoals", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateFeatureInput(v *CreateFeatureInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateFeatureInput"} + if v.Project == nil { + invalidParams.Add(smithy.NewErrParamRequired("Project")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Variations == nil { + invalidParams.Add(smithy.NewErrParamRequired("Variations")) + } else if v.Variations != nil { + if err := validateVariationConfigsList(v.Variations); err != nil { + invalidParams.AddNested("Variations", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateLaunchInput(v *CreateLaunchInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateLaunchInput"} + if v.Project == nil { + invalidParams.Add(smithy.NewErrParamRequired("Project")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.ScheduledSplitsConfig != nil { + if err := validateScheduledSplitsLaunchConfig(v.ScheduledSplitsConfig); err != nil { + invalidParams.AddNested("ScheduledSplitsConfig", err.(smithy.InvalidParamsError)) + } + } + if v.MetricMonitors != nil { + if err := validateMetricMonitorConfigList(v.MetricMonitors); err != nil { + invalidParams.AddNested("MetricMonitors", err.(smithy.InvalidParamsError)) + } + } + if v.Groups == nil { + invalidParams.Add(smithy.NewErrParamRequired("Groups")) + } else if v.Groups != nil { + if err := validateLaunchGroupConfigList(v.Groups); err != nil { + invalidParams.AddNested("Groups", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateProjectInput(v *CreateProjectInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateProjectInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteExperimentInput(v *DeleteExperimentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteExperimentInput"} + if v.Project == nil { + invalidParams.Add(smithy.NewErrParamRequired("Project")) + } + if v.Experiment == nil { + invalidParams.Add(smithy.NewErrParamRequired("Experiment")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteFeatureInput(v *DeleteFeatureInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteFeatureInput"} + if v.Project == nil { + invalidParams.Add(smithy.NewErrParamRequired("Project")) + } + if v.Feature == nil { + invalidParams.Add(smithy.NewErrParamRequired("Feature")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteLaunchInput(v *DeleteLaunchInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteLaunchInput"} + if v.Project == nil { + invalidParams.Add(smithy.NewErrParamRequired("Project")) + } + if v.Launch == nil { + invalidParams.Add(smithy.NewErrParamRequired("Launch")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteProjectInput(v *DeleteProjectInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteProjectInput"} + if v.Project == nil { + invalidParams.Add(smithy.NewErrParamRequired("Project")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpEvaluateFeatureInput(v *EvaluateFeatureInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EvaluateFeatureInput"} + if v.Project == nil { + invalidParams.Add(smithy.NewErrParamRequired("Project")) + } + if v.Feature == nil { + invalidParams.Add(smithy.NewErrParamRequired("Feature")) + } + if v.EntityId == nil { + invalidParams.Add(smithy.NewErrParamRequired("EntityId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetExperimentInput(v *GetExperimentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetExperimentInput"} + if v.Project == nil { + invalidParams.Add(smithy.NewErrParamRequired("Project")) + } + if v.Experiment == nil { + invalidParams.Add(smithy.NewErrParamRequired("Experiment")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetExperimentResultsInput(v *GetExperimentResultsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetExperimentResultsInput"} + if v.Project == nil { + invalidParams.Add(smithy.NewErrParamRequired("Project")) + } + if v.Experiment == nil { + invalidParams.Add(smithy.NewErrParamRequired("Experiment")) + } + if v.MetricNames == nil { + invalidParams.Add(smithy.NewErrParamRequired("MetricNames")) + } + if v.TreatmentNames == nil { + invalidParams.Add(smithy.NewErrParamRequired("TreatmentNames")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetFeatureInput(v *GetFeatureInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetFeatureInput"} + if v.Project == nil { + invalidParams.Add(smithy.NewErrParamRequired("Project")) + } + if v.Feature == nil { + invalidParams.Add(smithy.NewErrParamRequired("Feature")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetLaunchInput(v *GetLaunchInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetLaunchInput"} + if v.Project == nil { + invalidParams.Add(smithy.NewErrParamRequired("Project")) + } + if v.Launch == nil { + invalidParams.Add(smithy.NewErrParamRequired("Launch")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetProjectInput(v *GetProjectInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetProjectInput"} + if v.Project == nil { + invalidParams.Add(smithy.NewErrParamRequired("Project")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListExperimentsInput(v *ListExperimentsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListExperimentsInput"} + if v.Project == nil { + invalidParams.Add(smithy.NewErrParamRequired("Project")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListFeaturesInput(v *ListFeaturesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListFeaturesInput"} + if v.Project == nil { + invalidParams.Add(smithy.NewErrParamRequired("Project")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListLaunchesInput(v *ListLaunchesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListLaunchesInput"} + if v.Project == nil { + invalidParams.Add(smithy.NewErrParamRequired("Project")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutProjectEventsInput(v *PutProjectEventsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutProjectEventsInput"} + if v.Project == nil { + invalidParams.Add(smithy.NewErrParamRequired("Project")) + } + if v.Events == nil { + invalidParams.Add(smithy.NewErrParamRequired("Events")) + } else if v.Events != nil { + if err := validateEventList(v.Events); err != nil { + invalidParams.AddNested("Events", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStartExperimentInput(v *StartExperimentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartExperimentInput"} + if v.Project == nil { + invalidParams.Add(smithy.NewErrParamRequired("Project")) + } + if v.Experiment == nil { + invalidParams.Add(smithy.NewErrParamRequired("Experiment")) + } + if v.AnalysisCompleteTime == nil { + invalidParams.Add(smithy.NewErrParamRequired("AnalysisCompleteTime")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStartLaunchInput(v *StartLaunchInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartLaunchInput"} + if v.Project == nil { + invalidParams.Add(smithy.NewErrParamRequired("Project")) + } + if v.Launch == nil { + invalidParams.Add(smithy.NewErrParamRequired("Launch")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStopExperimentInput(v *StopExperimentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StopExperimentInput"} + if v.Project == nil { + invalidParams.Add(smithy.NewErrParamRequired("Project")) + } + if v.Experiment == nil { + invalidParams.Add(smithy.NewErrParamRequired("Experiment")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStopLaunchInput(v *StopLaunchInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StopLaunchInput"} + if v.Project == nil { + invalidParams.Add(smithy.NewErrParamRequired("Project")) + } + if v.Launch == nil { + invalidParams.Add(smithy.NewErrParamRequired("Launch")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpTagResourceInput(v *TagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.Tags == nil { + invalidParams.Add(smithy.NewErrParamRequired("Tags")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUntagResourceInput(v *UntagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.TagKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateExperimentInput(v *UpdateExperimentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateExperimentInput"} + if v.Project == nil { + invalidParams.Add(smithy.NewErrParamRequired("Project")) + } + if v.Experiment == nil { + invalidParams.Add(smithy.NewErrParamRequired("Experiment")) + } + if v.Treatments != nil { + if err := validateTreatmentConfigList(v.Treatments); err != nil { + invalidParams.AddNested("Treatments", err.(smithy.InvalidParamsError)) + } + } + if v.MetricGoals != nil { + if err := validateMetricGoalConfigList(v.MetricGoals); err != nil { + invalidParams.AddNested("MetricGoals", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateFeatureInput(v *UpdateFeatureInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateFeatureInput"} + if v.Project == nil { + invalidParams.Add(smithy.NewErrParamRequired("Project")) + } + if v.Feature == nil { + invalidParams.Add(smithy.NewErrParamRequired("Feature")) + } + if v.AddOrUpdateVariations != nil { + if err := validateVariationConfigsList(v.AddOrUpdateVariations); err != nil { + invalidParams.AddNested("AddOrUpdateVariations", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateLaunchInput(v *UpdateLaunchInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateLaunchInput"} + if v.Project == nil { + invalidParams.Add(smithy.NewErrParamRequired("Project")) + } + if v.Launch == nil { + invalidParams.Add(smithy.NewErrParamRequired("Launch")) + } + if v.Groups != nil { + if err := validateLaunchGroupConfigList(v.Groups); err != nil { + invalidParams.AddNested("Groups", err.(smithy.InvalidParamsError)) + } + } + if v.MetricMonitors != nil { + if err := validateMetricMonitorConfigList(v.MetricMonitors); err != nil { + invalidParams.AddNested("MetricMonitors", err.(smithy.InvalidParamsError)) + } + } + if v.ScheduledSplitsConfig != nil { + if err := validateScheduledSplitsLaunchConfig(v.ScheduledSplitsConfig); err != nil { + invalidParams.AddNested("ScheduledSplitsConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateProjectDataDeliveryInput(v *UpdateProjectDataDeliveryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateProjectDataDeliveryInput"} + if v.Project == nil { + invalidParams.Add(smithy.NewErrParamRequired("Project")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateProjectInput(v *UpdateProjectInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateProjectInput"} + if v.Project == nil { + invalidParams.Add(smithy.NewErrParamRequired("Project")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/finspacedata/api_client.go b/service/finspacedata/api_client.go index e8b17a7daf6..262fd3466e9 100644 --- a/service/finspacedata/api_client.go +++ b/service/finspacedata/api_client.go @@ -4,6 +4,7 @@ package finspacedata import ( "context" + cryptorand "crypto/rand" "fmt" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" @@ -15,6 +16,7 @@ import ( smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" + smithyrand "github.com/aws/smithy-go/rand" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" "strings" @@ -45,6 +47,8 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveDefaultEndpointConfiguration(&options) + resolveIdempotencyTokenProvider(&options) + for _, fn := range optFns { fn(&options) } @@ -77,6 +81,10 @@ type Options struct { // Signature Version 4 (SigV4) Signer HTTPSignerV4 HTTPSignerV4 + // Provides idempotency tokens values that will be automatically populated into + // idempotent API operations. + IdempotencyTokenProvider IdempotencyTokenProvider + // The logger writer interface to write logging messages to. Logger logging.Logger @@ -242,6 +250,13 @@ func newDefaultV4Signer(o Options) *v4.Signer { }) } +func resolveIdempotencyTokenProvider(o *Options) { + if o.IdempotencyTokenProvider != nil { + return + } + o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) +} + func addRetryMiddlewares(stack *middleware.Stack, o Options) error { mo := retry.AddRetryMiddlewaresOptions{ Retryer: o.Retryer, @@ -310,6 +325,11 @@ func addRestJsonContentTypeCustomization(stack *middleware.Stack) error { return stack.Serialize.Insert(&customizeRestJsonContentType{}, "OperationSerializer", middleware.After) } +// IdempotencyTokenProvider interface for providing idempotency token +type IdempotencyTokenProvider interface { + GetIdempotencyToken() (string, error) +} + func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) } diff --git a/service/finspacedata/api_op_CreateChangeset.go b/service/finspacedata/api_op_CreateChangeset.go index d1676187403..af5c1cd0d05 100644 --- a/service/finspacedata/api_op_CreateChangeset.go +++ b/service/finspacedata/api_op_CreateChangeset.go @@ -4,6 +4,7 @@ package finspacedata import ( "context" + "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/finspacedata/types" @@ -11,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates a new changeset in a FinSpace dataset. +// Creates a new Changeset in a FinSpace Dataset. func (c *Client) CreateChangeset(ctx context.Context, params *CreateChangesetInput, optFns ...func(*Options)) (*CreateChangesetOutput, error) { if params == nil { params = &CreateChangesetInput{} @@ -27,55 +28,71 @@ func (c *Client) CreateChangeset(ctx context.Context, params *CreateChangesetInp return out, nil } +// The request for a CreateChangeset operation. type CreateChangesetInput struct { - // Option to indicate how a changeset will be applied to a dataset. + // Option to indicate how a Changeset will be applied to a Dataset. // // * REPLACE - - // Changeset will be considered as a replacement to all prior loaded changesets. + // Changeset will be considered as a replacement to all prior loaded Changesets. // // * // APPEND - Changeset will be considered as an addition to the end of all prior - // loaded changesets. + // loaded Changesets. + // + // * MODIFY - Changeset is considered as a replacement to a + // specific prior ingested Changeset. // // This member is required. ChangeType types.ChangeType - // The unique identifier for the FinSpace dataset in which the changeset will be + // The unique identifier for the FinSpace Dataset where the Changeset will be // created. // // This member is required. DatasetId *string - // Source path from which the files to create the changeset will be sourced. + // Options that define the structure of the source file(s) including the format + // type (formatType), header row (withHeader), data separation character + // (separator) and the type of compression (compression). formatType is a required + // attribute and can have the following values: // - // This member is required. - SourceParams map[string]string - - // Type of the data source from which the files to create the changeset will be - // sourced. + // * PARQUET - Parquet source file + // format. + // + // * CSV - CSV source file format. + // + // * JSON - JSON source file format. + // + // * + // XML - XML source file format. // - // * S3 - Amazon S3. + // For example, you could specify the following for + // formatParams: "formatParams": { "formatType": "CSV", "withHeader": "true", + // "separator": ",", "compression":"None" } // // This member is required. - SourceType types.SourceType - - // Options that define the structure of the source file(s). FormatParams map[string]string - // Format type of the input files being loaded into the changeset. - FormatType types.FormatType + // Options that define the location of the data being ingested. + // + // This member is required. + SourceParams map[string]string - // Metadata tags to apply to this changeset. - Tags map[string]string + // A token used to ensure idempotency. + ClientToken *string noSmithyDocumentSerde } +// The response from a CreateChangeset operation. type CreateChangesetOutput struct { - // Returns the changeset details. - Changeset *types.ChangesetInfo + // The unique identifier of the Changeset that is created. + ChangesetId *string + + // The unique identifier for the FinSpace Dataset where the Changeset is created. + DatasetId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata @@ -131,6 +148,9 @@ func (c *Client) addOperationCreateChangesetMiddlewares(stack *middleware.Stack, if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } + if err = addIdempotencyToken_opCreateChangesetMiddleware(stack, options); err != nil { + return err + } if err = addOpCreateChangesetValidationMiddleware(stack); err != nil { return err } @@ -149,6 +169,39 @@ func (c *Client) addOperationCreateChangesetMiddlewares(stack *middleware.Stack, return nil } +type idempotencyToken_initializeOpCreateChangeset struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateChangeset) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateChangeset) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*CreateChangesetInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateChangesetInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateChangesetMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateChangeset{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + func newServiceMetadataMiddleware_opCreateChangeset(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/finspacedata/api_op_CreateDataView.go b/service/finspacedata/api_op_CreateDataView.go new file mode 100644 index 00000000000..dd6154a2d22 --- /dev/null +++ b/service/finspacedata/api_op_CreateDataView.go @@ -0,0 +1,188 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspacedata + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/finspacedata/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a Dataview for a Dataset. +func (c *Client) CreateDataView(ctx context.Context, params *CreateDataViewInput, optFns ...func(*Options)) (*CreateDataViewOutput, error) { + if params == nil { + params = &CreateDataViewInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateDataView", params, optFns, c.addOperationCreateDataViewMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateDataViewOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Request for creating a data view. +type CreateDataViewInput struct { + + // The unique Dataset identifier that is used to create a Dataview. + // + // This member is required. + DatasetId *string + + // Options that define the destination type for the Dataview. + // + // This member is required. + DestinationTypeParams *types.DataViewDestinationTypeParams + + // Beginning time to use for the Dataview. The value is determined as Epoch time in + // milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM + // UTC is specified as 1635768000000. + AsOfTimestamp int64 + + // Flag to indicate Dataview should be updated automatically. + AutoUpdate bool + + // A token used to ensure idempotency. + ClientToken *string + + // Ordered set of column names used to partition data. + PartitionColumns []string + + // Columns to be used for sorting the data. + SortColumns []string + + noSmithyDocumentSerde +} + +// Response for creating a data view. +type CreateDataViewOutput struct { + + // The unique identifier for the created Dataview. + DataViewId *string + + // The unique identifier of the Dataset used for the Dataview. + DatasetId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateDataViewMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateDataView{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateDataView{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = addRestJsonContentTypeCustomization(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opCreateDataViewMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateDataViewValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateDataView(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateDataView struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateDataView) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateDataView) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*CreateDataViewInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateDataViewInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateDataViewMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateDataView{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateDataView(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "finspace-api", + OperationName: "CreateDataView", + } +} diff --git a/service/finspacedata/api_op_CreateDataset.go b/service/finspacedata/api_op_CreateDataset.go new file mode 100644 index 00000000000..ef6d2676814 --- /dev/null +++ b/service/finspacedata/api_op_CreateDataset.go @@ -0,0 +1,198 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspacedata + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/finspacedata/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new FinSpace Dataset. +func (c *Client) CreateDataset(ctx context.Context, params *CreateDatasetInput, optFns ...func(*Options)) (*CreateDatasetOutput, error) { + if params == nil { + params = &CreateDatasetInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateDataset", params, optFns, c.addOperationCreateDatasetMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateDatasetOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The request for a CreateDataset operation +type CreateDatasetInput struct { + + // The unique resource identifier for a Dataset. + // + // This member is required. + Alias *string + + // Description of a Dataset. + // + // This member is required. + DatasetDescription *string + + // Display title for a FinSpace Dataset. + // + // This member is required. + DatasetTitle *string + + // The format in which Dataset data is structured. + // + // * TABULAR - Data is structured + // in a tabular format. + // + // * NON_TABULAR - Data is structured in a non-tabular + // format. + // + // This member is required. + Kind types.DatasetKind + + // Permission group parameters for Dataset permissions. + // + // This member is required. + PermissionGroupParams *types.PermissionGroupParams + + // A token used to ensure idempotency. + ClientToken *string + + // Contact information for a Dataset owner. + OwnerInfo *types.DatasetOwnerInfo + + // Definition for a schema on a tabular Dataset. + SchemaDefinition *types.SchemaUnion + + noSmithyDocumentSerde +} + +// The response from a CreateDataset operation +type CreateDatasetOutput struct { + + // The unique identifier for the created Dataset. + DatasetId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateDatasetMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateDataset{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateDataset{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = addRestJsonContentTypeCustomization(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opCreateDatasetMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateDatasetValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateDataset(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateDataset struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateDataset) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateDataset) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*CreateDatasetInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateDatasetInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateDatasetMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateDataset{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateDataset(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "finspace-api", + OperationName: "CreateDataset", + } +} diff --git a/service/finspacedata/api_op_DeleteDataset.go b/service/finspacedata/api_op_DeleteDataset.go new file mode 100644 index 00000000000..2ad7be283f9 --- /dev/null +++ b/service/finspacedata/api_op_DeleteDataset.go @@ -0,0 +1,165 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspacedata + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a FinSpace Dataset. +func (c *Client) DeleteDataset(ctx context.Context, params *DeleteDatasetInput, optFns ...func(*Options)) (*DeleteDatasetOutput, error) { + if params == nil { + params = &DeleteDatasetInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteDataset", params, optFns, c.addOperationDeleteDatasetMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteDatasetOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The request for a DeleteDataset operation. +type DeleteDatasetInput struct { + + // The unique identifier of the Dataset to be deleted. + // + // This member is required. + DatasetId *string + + // A token used to ensure idempotency. + ClientToken *string + + noSmithyDocumentSerde +} + +// The response from an DeleteDataset operation +type DeleteDatasetOutput struct { + + // The unique identifier for the deleted Dataset. + DatasetId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteDatasetMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteDataset{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteDataset{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = addRestJsonContentTypeCustomization(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opDeleteDatasetMiddleware(stack, options); err != nil { + return err + } + if err = addOpDeleteDatasetValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteDataset(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpDeleteDataset struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpDeleteDataset) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpDeleteDataset) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*DeleteDatasetInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *DeleteDatasetInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opDeleteDatasetMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteDataset{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opDeleteDataset(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "finspace-api", + OperationName: "DeleteDataset", + } +} diff --git a/service/finspacedata/api_op_GetChangeset.go b/service/finspacedata/api_op_GetChangeset.go new file mode 100644 index 00000000000..84a558d8730 --- /dev/null +++ b/service/finspacedata/api_op_GetChangeset.go @@ -0,0 +1,178 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspacedata + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/finspacedata/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Get information about a Changeset. +func (c *Client) GetChangeset(ctx context.Context, params *GetChangesetInput, optFns ...func(*Options)) (*GetChangesetOutput, error) { + if params == nil { + params = &GetChangesetInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetChangeset", params, optFns, c.addOperationGetChangesetMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetChangesetOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Request to describe a changeset. +type GetChangesetInput struct { + + // The unique identifier of the Changeset for which to get data. + // + // This member is required. + ChangesetId *string + + // The unique identifier for the FinSpace Dataset where the Changeset is created. + // + // This member is required. + DatasetId *string + + noSmithyDocumentSerde +} + +// The response from a describe changeset operation +type GetChangesetOutput struct { + + // Time until which the Changeset is active. The value is determined as Epoch time + // in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM + // UTC is specified as 1635768000000. + ActiveUntilTimestamp int64 + + // Type that indicates how a Changeset is applied to a Dataset. + // + // * REPLACE - + // Changeset is considered as a replacement to all prior loaded Changesets. + // + // * + // APPEND - Changeset is considered as an addition to the end of all prior loaded + // Changesets. + // + // * MODIFY - Changeset is considered as a replacement to a specific + // prior ingested Changeset. + ChangeType types.ChangeType + + // The ARN identifier of the Changeset. + ChangesetArn *string + + // The unique identifier for a Changeset. + ChangesetId *string + + // The timestamp at which the Changeset was created in FinSpace. The value is + // determined as Epoch time in milliseconds. For example, the value for Monday, + // November 1, 2021 12:00:00 PM UTC is specified as 1635768000000. + CreateTime int64 + + // The unique identifier for the FinSpace Dataset where the Changeset is created. + DatasetId *string + + // The structure with error messages. + ErrorInfo *types.ChangesetErrorInfo + + // Structure of the source file(s). + FormatParams map[string]string + + // Options that define the location of the data being ingested. + SourceParams map[string]string + + // The status of Changeset creation operation. + Status types.IngestionStatus + + // The unique identifier of the updated Changeset. + UpdatedByChangesetId *string + + // The unique identifier of the Changeset that is being updated. + UpdatesChangesetId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetChangesetMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetChangeset{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetChangeset{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = addRestJsonContentTypeCustomization(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetChangesetValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetChangeset(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetChangeset(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "finspace-api", + OperationName: "GetChangeset", + } +} diff --git a/service/finspacedata/api_op_GetDataView.go b/service/finspacedata/api_op_GetDataView.go new file mode 100644 index 00000000000..8793ef7db7e --- /dev/null +++ b/service/finspacedata/api_op_GetDataView.go @@ -0,0 +1,193 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspacedata + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/finspacedata/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets information about a Dataview. +func (c *Client) GetDataView(ctx context.Context, params *GetDataViewInput, optFns ...func(*Options)) (*GetDataViewOutput, error) { + if params == nil { + params = &GetDataViewInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetDataView", params, optFns, c.addOperationGetDataViewMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetDataViewOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Request for retrieving a data view detail. Grouped / accessible within a dataset +// by its dataset id. +type GetDataViewInput struct { + + // The unique identifier for the Dataview. + // + // This member is required. + DataViewId *string + + // The unique identifier for the Dataset used in the Dataview. + // + // This member is required. + DatasetId *string + + noSmithyDocumentSerde +} + +// Response from retrieving a dataview, which includes details on the target +// database and table name +type GetDataViewOutput struct { + + // Time range to use for the Dataview. The value is determined as Epoch time in + // milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM + // UTC is specified as 1635768000000. + AsOfTimestamp int64 + + // Flag to indicate Dataview should be updated automatically. + AutoUpdate bool + + // The timestamp at which the Dataview was created in FinSpace. The value is + // determined as Epoch time in milliseconds. For example, the value for Monday, + // November 1, 2021 12:00:00 PM UTC is specified as 1635768000000. + CreateTime int64 + + // The ARN identifier of the Dataview. + DataViewArn *string + + // The unique identifier for the Dataview. + DataViewId *string + + // The unique identifier for the Dataset used in the Dataview. + DatasetId *string + + // Options that define the destination type for the Dataview. + DestinationTypeParams *types.DataViewDestinationTypeParams + + // Information about an error that occurred for the Dataview. + ErrorInfo *types.DataViewErrorInfo + + // The last time that a Dataview was modified. The value is determined as Epoch + // time in milliseconds. For example, the value for Monday, November 1, 2021 + // 12:00:00 PM UTC is specified as 1635768000000. + LastModifiedTime int64 + + // Ordered set of column names used to partition data. + PartitionColumns []string + + // Columns to be used for sorting the data. + SortColumns []string + + // The status of a Dataview creation. + // + // * RUNNING - Dataview creation is running. + // + // * + // STARTING - Dataview creation is starting. + // + // * FAILED - Dataview creation has + // failed. + // + // * CANCELLED - Dataview creation has been cancelled. + // + // * TIMEOUT - + // Dataview creation has timed out. + // + // * SUCCESS - Dataview creation has + // succeeded. + // + // * PENDING - Dataview creation is pending. + // + // * FAILED_CLEANUP_FAILED - + // Dataview creation failed and resource cleanup failed. + Status types.DataViewStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetDataViewMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetDataView{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetDataView{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = addRestJsonContentTypeCustomization(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetDataViewValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDataView(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetDataView(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "finspace-api", + OperationName: "GetDataView", + } +} diff --git a/service/finspacedata/api_op_GetDataset.go b/service/finspacedata/api_op_GetDataset.go new file mode 100644 index 00000000000..ce8fb0a70b4 --- /dev/null +++ b/service/finspacedata/api_op_GetDataset.go @@ -0,0 +1,173 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspacedata + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/finspacedata/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns information about a Dataset. +func (c *Client) GetDataset(ctx context.Context, params *GetDatasetInput, optFns ...func(*Options)) (*GetDatasetOutput, error) { + if params == nil { + params = &GetDatasetInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetDataset", params, optFns, c.addOperationGetDatasetMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetDatasetOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Request for the GetDataset operation. +type GetDatasetInput struct { + + // The unique identifier for a Dataset. + // + // This member is required. + DatasetId *string + + noSmithyDocumentSerde +} + +// Response for the GetDataset operation +type GetDatasetOutput struct { + + // The unique resource identifier for a Dataset. + Alias *string + + // The timestamp at which the Dataset was created in FinSpace. The value is + // determined as Epoch time in milliseconds. For example, the value for Monday, + // November 1, 2021 12:00:00 PM UTC is specified as 1635768000000. + CreateTime int64 + + // The ARN identifier of the Dataset. + DatasetArn *string + + // A description of the Dataset. + DatasetDescription *string + + // The unique identifier for a Dataset. + DatasetId *string + + // Display title for a Dataset. + DatasetTitle *string + + // The format in which Dataset data is structured. + // + // * TABULAR - Data is structured + // in a tabular format. + // + // * NON_TABULAR - Data is structured in a non-tabular + // format. + Kind types.DatasetKind + + // The last time that the Dataset was modified. The value is determined as Epoch + // time in milliseconds. For example, the value for Monday, November 1, 2021 + // 12:00:00 PM UTC is specified as 1635768000000. + LastModifiedTime int64 + + // Definition for a schema on a tabular Dataset. + SchemaDefinition *types.SchemaUnion + + // Status of the Dataset creation. + // + // * PENDING - Dataset is pending creation. + // + // * + // FAILED - Dataset creation has failed. + // + // * SUCCESS - Dataset creation has + // succeeded. + // + // * RUNNING - Dataset creation is running. + Status types.DatasetStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetDatasetMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetDataset{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetDataset{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = addRestJsonContentTypeCustomization(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetDatasetValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDataset(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetDataset(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "finspace-api", + OperationName: "GetDataset", + } +} diff --git a/service/finspacedata/api_op_GetProgrammaticAccessCredentials.go b/service/finspacedata/api_op_GetProgrammaticAccessCredentials.go index 7e8b310dc3f..6f6cc4f8158 100644 --- a/service/finspacedata/api_op_GetProgrammaticAccessCredentials.go +++ b/service/finspacedata/api_op_GetProgrammaticAccessCredentials.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Request programmatic credentials to use with Habanero SDK. +// Request programmatic credentials to use with FinSpace SDK. func (c *Client) GetProgrammaticAccessCredentials(ctx context.Context, params *GetProgrammaticAccessCredentialsInput, optFns ...func(*Options)) (*GetProgrammaticAccessCredentialsOutput, error) { if params == nil { params = &GetProgrammaticAccessCredentialsInput{} @@ -27,9 +27,10 @@ func (c *Client) GetProgrammaticAccessCredentials(ctx context.Context, params *G return out, nil } +// Request for GetProgrammaticAccessCredentials operation type GetProgrammaticAccessCredentialsInput struct { - // The habanero environment identifier. + // The FinSpace environment identifier. // // This member is required. EnvironmentId *string @@ -40,6 +41,7 @@ type GetProgrammaticAccessCredentialsInput struct { noSmithyDocumentSerde } +// Response for GetProgrammaticAccessCredentials operation type GetProgrammaticAccessCredentialsOutput struct { // Returns the programmatic credentials. diff --git a/service/finspacedata/api_op_GetWorkingLocation.go b/service/finspacedata/api_op_GetWorkingLocation.go index 8eb6243265c..7196b37bab1 100644 --- a/service/finspacedata/api_op_GetWorkingLocation.go +++ b/service/finspacedata/api_op_GetWorkingLocation.go @@ -11,8 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// A temporary Amazon S3 location to copy your files from a source location to -// stage or use as a scratch space in Habanero notebook. +// A temporary Amazon S3 location, where you can copy your files from a source +// location to stage or use as a scratch space in FinSpace notebook. func (c *Client) GetWorkingLocation(ctx context.Context, params *GetWorkingLocationInput, optFns ...func(*Options)) (*GetWorkingLocationOutput, error) { if params == nil { params = &GetWorkingLocationInput{} @@ -38,7 +38,7 @@ type GetWorkingLocationInput struct { // // * INGESTION - Use the Amazon // S3 location as a staging location to copy your data content and then use the - // location with the changeset creation operation. + // location with the Changeset creation operation. LocationType types.LocationType noSmithyDocumentSerde diff --git a/service/finspacedata/api_op_ListChangesets.go b/service/finspacedata/api_op_ListChangesets.go new file mode 100644 index 00000000000..125f961639b --- /dev/null +++ b/service/finspacedata/api_op_ListChangesets.go @@ -0,0 +1,219 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspacedata + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/finspacedata/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the FinSpace Changesets for a Dataset. +func (c *Client) ListChangesets(ctx context.Context, params *ListChangesetsInput, optFns ...func(*Options)) (*ListChangesetsOutput, error) { + if params == nil { + params = &ListChangesetsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListChangesets", params, optFns, c.addOperationListChangesetsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListChangesetsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Request to ListChangesetsRequest. It exposes minimal query filters. +type ListChangesetsInput struct { + + // The unique identifier for the FinSpace Dataset to which the Changeset belongs. + // + // This member is required. + DatasetId *string + + // The maximum number of results per page. + MaxResults int32 + + // A token indicating where a results page should begin. + NextToken *string + + noSmithyDocumentSerde +} + +// Response to ListChangesetsResponse. This returns a list of dataset changesets +// that match the query criteria. +type ListChangesetsOutput struct { + + // List of Changesets found. + Changesets []types.ChangesetSummary + + // A token indicating where a results page should begin. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListChangesetsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListChangesets{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListChangesets{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = addRestJsonContentTypeCustomization(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListChangesetsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChangesets(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListChangesetsAPIClient is a client that implements the ListChangesets +// operation. +type ListChangesetsAPIClient interface { + ListChangesets(context.Context, *ListChangesetsInput, ...func(*Options)) (*ListChangesetsOutput, error) +} + +var _ ListChangesetsAPIClient = (*Client)(nil) + +// ListChangesetsPaginatorOptions is the paginator options for ListChangesets +type ListChangesetsPaginatorOptions struct { + // The maximum number of results per page. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListChangesetsPaginator is a paginator for ListChangesets +type ListChangesetsPaginator struct { + options ListChangesetsPaginatorOptions + client ListChangesetsAPIClient + params *ListChangesetsInput + nextToken *string + firstPage bool +} + +// NewListChangesetsPaginator returns a new ListChangesetsPaginator +func NewListChangesetsPaginator(client ListChangesetsAPIClient, params *ListChangesetsInput, optFns ...func(*ListChangesetsPaginatorOptions)) *ListChangesetsPaginator { + if params == nil { + params = &ListChangesetsInput{} + } + + options := ListChangesetsPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListChangesetsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListChangesetsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListChangesets page. +func (p *ListChangesetsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListChangesetsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.MaxResults = p.options.Limit + + result, err := p.client.ListChangesets(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListChangesets(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "finspace-api", + OperationName: "ListChangesets", + } +} diff --git a/service/finspacedata/api_op_ListDataViews.go b/service/finspacedata/api_op_ListDataViews.go new file mode 100644 index 00000000000..e5d93b89889 --- /dev/null +++ b/service/finspacedata/api_op_ListDataViews.go @@ -0,0 +1,216 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspacedata + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/finspacedata/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all available Dataviews for a Dataset. +func (c *Client) ListDataViews(ctx context.Context, params *ListDataViewsInput, optFns ...func(*Options)) (*ListDataViewsOutput, error) { + if params == nil { + params = &ListDataViewsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListDataViews", params, optFns, c.addOperationListDataViewsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListDataViewsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Request for a list data views. +type ListDataViewsInput struct { + + // The unique identifier of the Dataset for which to retrieve Dataviews. + // + // This member is required. + DatasetId *string + + // The maximum number of results per page. + MaxResults int32 + + // A token indicating where a results page should begin. + NextToken *string + + noSmithyDocumentSerde +} + +type ListDataViewsOutput struct { + + // A list of Dataviews. + DataViews []types.DataViewSummary + + // A token indicating where a results page should begin. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListDataViewsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListDataViews{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListDataViews{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = addRestJsonContentTypeCustomization(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListDataViewsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDataViews(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListDataViewsAPIClient is a client that implements the ListDataViews operation. +type ListDataViewsAPIClient interface { + ListDataViews(context.Context, *ListDataViewsInput, ...func(*Options)) (*ListDataViewsOutput, error) +} + +var _ ListDataViewsAPIClient = (*Client)(nil) + +// ListDataViewsPaginatorOptions is the paginator options for ListDataViews +type ListDataViewsPaginatorOptions struct { + // The maximum number of results per page. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListDataViewsPaginator is a paginator for ListDataViews +type ListDataViewsPaginator struct { + options ListDataViewsPaginatorOptions + client ListDataViewsAPIClient + params *ListDataViewsInput + nextToken *string + firstPage bool +} + +// NewListDataViewsPaginator returns a new ListDataViewsPaginator +func NewListDataViewsPaginator(client ListDataViewsAPIClient, params *ListDataViewsInput, optFns ...func(*ListDataViewsPaginatorOptions)) *ListDataViewsPaginator { + if params == nil { + params = &ListDataViewsInput{} + } + + options := ListDataViewsPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListDataViewsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListDataViewsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListDataViews page. +func (p *ListDataViewsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListDataViewsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.MaxResults = p.options.Limit + + result, err := p.client.ListDataViews(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListDataViews(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "finspace-api", + OperationName: "ListDataViews", + } +} diff --git a/service/finspacedata/api_op_ListDatasets.go b/service/finspacedata/api_op_ListDatasets.go new file mode 100644 index 00000000000..a6d37cdcd63 --- /dev/null +++ b/service/finspacedata/api_op_ListDatasets.go @@ -0,0 +1,209 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspacedata + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/finspacedata/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all of the active Datasets that a user has access to. +func (c *Client) ListDatasets(ctx context.Context, params *ListDatasetsInput, optFns ...func(*Options)) (*ListDatasetsOutput, error) { + if params == nil { + params = &ListDatasetsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListDatasets", params, optFns, c.addOperationListDatasetsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListDatasetsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Request for the ListDatasets operation. +type ListDatasetsInput struct { + + // The maximum number of results per page. + MaxResults int32 + + // A token indicating where a results page should begin. + NextToken *string + + noSmithyDocumentSerde +} + +// Response for the ListDatasets operation +type ListDatasetsOutput struct { + + // List of Datasets. + Datasets []types.Dataset + + // A token indicating where a results page should begin. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListDatasetsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListDatasets{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListDatasets{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = addRestJsonContentTypeCustomization(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDatasets(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListDatasetsAPIClient is a client that implements the ListDatasets operation. +type ListDatasetsAPIClient interface { + ListDatasets(context.Context, *ListDatasetsInput, ...func(*Options)) (*ListDatasetsOutput, error) +} + +var _ ListDatasetsAPIClient = (*Client)(nil) + +// ListDatasetsPaginatorOptions is the paginator options for ListDatasets +type ListDatasetsPaginatorOptions struct { + // The maximum number of results per page. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListDatasetsPaginator is a paginator for ListDatasets +type ListDatasetsPaginator struct { + options ListDatasetsPaginatorOptions + client ListDatasetsAPIClient + params *ListDatasetsInput + nextToken *string + firstPage bool +} + +// NewListDatasetsPaginator returns a new ListDatasetsPaginator +func NewListDatasetsPaginator(client ListDatasetsAPIClient, params *ListDatasetsInput, optFns ...func(*ListDatasetsPaginatorOptions)) *ListDatasetsPaginator { + if params == nil { + params = &ListDatasetsInput{} + } + + options := ListDatasetsPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListDatasetsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListDatasetsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListDatasets page. +func (p *ListDatasetsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListDatasetsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.MaxResults = p.options.Limit + + result, err := p.client.ListDatasets(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListDatasets(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "finspace-api", + OperationName: "ListDatasets", + } +} diff --git a/service/finspacedata/api_op_UpdateChangeset.go b/service/finspacedata/api_op_UpdateChangeset.go new file mode 100644 index 00000000000..3c9775d7ded --- /dev/null +++ b/service/finspacedata/api_op_UpdateChangeset.go @@ -0,0 +1,185 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspacedata + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates a FinSpace Changeset. +func (c *Client) UpdateChangeset(ctx context.Context, params *UpdateChangesetInput, optFns ...func(*Options)) (*UpdateChangesetOutput, error) { + if params == nil { + params = &UpdateChangesetInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateChangeset", params, optFns, c.addOperationUpdateChangesetMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateChangesetOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Request to update an existing changeset. +type UpdateChangesetInput struct { + + // The unique identifier for the Changeset to update. + // + // This member is required. + ChangesetId *string + + // The unique identifier for the FinSpace Dataset in which the Changeset is + // created. + // + // This member is required. + DatasetId *string + + // Options that define the structure of the source file(s). + // + // This member is required. + FormatParams map[string]string + + // Options that define the location of the data being ingested. + // + // This member is required. + SourceParams map[string]string + + // A token used to ensure idempotency. + ClientToken *string + + noSmithyDocumentSerde +} + +// The response from a update changeset operation. +type UpdateChangesetOutput struct { + + // The unique identifier for the Changeset to update. + ChangesetId *string + + // The unique identifier for the FinSpace Dataset in which the Changeset is + // created. + DatasetId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateChangesetMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateChangeset{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateChangeset{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = addRestJsonContentTypeCustomization(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opUpdateChangesetMiddleware(stack, options); err != nil { + return err + } + if err = addOpUpdateChangesetValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateChangeset(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpUpdateChangeset struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpUpdateChangeset) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpUpdateChangeset) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*UpdateChangesetInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateChangesetInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opUpdateChangesetMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateChangeset{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opUpdateChangeset(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "finspace-api", + OperationName: "UpdateChangeset", + } +} diff --git a/service/finspacedata/api_op_UpdateDataset.go b/service/finspacedata/api_op_UpdateDataset.go new file mode 100644 index 00000000000..d4693205566 --- /dev/null +++ b/service/finspacedata/api_op_UpdateDataset.go @@ -0,0 +1,193 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspacedata + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/finspacedata/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates a FinSpace Dataset. +func (c *Client) UpdateDataset(ctx context.Context, params *UpdateDatasetInput, optFns ...func(*Options)) (*UpdateDatasetOutput, error) { + if params == nil { + params = &UpdateDatasetInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateDataset", params, optFns, c.addOperationUpdateDatasetMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateDatasetOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The request for an UpdateDataset operation +type UpdateDatasetInput struct { + + // The unique resource identifier for a Dataset. + // + // This member is required. + Alias *string + + // The unique identifier for the Dataset to update. + // + // This member is required. + DatasetId *string + + // A display title for the Dataset. + // + // This member is required. + DatasetTitle *string + + // The format in which the Dataset data is structured. + // + // * TABULAR - Data is + // structured in a tabular format. + // + // * NON_TABULAR - Data is structured in a + // non-tabular format. + // + // This member is required. + Kind types.DatasetKind + + // A token used to ensure idempotency. + ClientToken *string + + // A description for the Dataset. + DatasetDescription *string + + // Definition for a schema on a tabular Dataset. + SchemaDefinition *types.SchemaUnion + + noSmithyDocumentSerde +} + +// The response from an UpdateDataset operation +type UpdateDatasetOutput struct { + + // The unique identifier for updated Dataset. + DatasetId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateDatasetMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateDataset{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateDataset{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = addRestJsonContentTypeCustomization(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opUpdateDatasetMiddleware(stack, options); err != nil { + return err + } + if err = addOpUpdateDatasetValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateDataset(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpUpdateDataset struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpUpdateDataset) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpUpdateDataset) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*UpdateDatasetInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateDatasetInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opUpdateDatasetMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateDataset{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opUpdateDataset(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "finspace-api", + OperationName: "UpdateDataset", + } +} diff --git a/service/finspacedata/deserializers.go b/service/finspacedata/deserializers.go index 98ef1d4bd6e..788e42d8ad4 100644 --- a/service/finspacedata/deserializers.go +++ b/service/finspacedata/deserializers.go @@ -13,7 +13,6 @@ import ( smithyio "github.com/aws/smithy-go/io" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" - smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "strings" @@ -120,9 +119,15 @@ func awsRestjson1_deserializeOpErrorCreateChangeset(response *smithyhttp.Respons case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -164,9 +169,22 @@ func awsRestjson1_deserializeOpDocumentCreateChangesetOutput(v **CreateChangeset for key, value := range shape { switch key { - case "changeset": - if err := awsRestjson1_deserializeDocumentChangesetInfo(&sv.Changeset, value); err != nil { - return err + case "changesetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChangesetId to be of type string, got %T instead", value) + } + sv.ChangesetId = ptr.String(jtv) + } + + case "datasetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DatasetId to be of type string, got %T instead", value) + } + sv.DatasetId = ptr.String(jtv) } default: @@ -178,14 +196,14 @@ func awsRestjson1_deserializeOpDocumentCreateChangesetOutput(v **CreateChangeset return nil } -type awsRestjson1_deserializeOpGetProgrammaticAccessCredentials struct { +type awsRestjson1_deserializeOpCreateDataset struct { } -func (*awsRestjson1_deserializeOpGetProgrammaticAccessCredentials) ID() string { +func (*awsRestjson1_deserializeOpCreateDataset) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetProgrammaticAccessCredentials) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateDataset) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -199,9 +217,9 @@ func (m *awsRestjson1_deserializeOpGetProgrammaticAccessCredentials) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetProgrammaticAccessCredentials(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateDataset(response, &metadata) } - output := &GetProgrammaticAccessCredentialsOutput{} + output := &CreateDatasetOutput{} out.Result = output var buff [1024]byte @@ -222,7 +240,7 @@ func (m *awsRestjson1_deserializeOpGetProgrammaticAccessCredentials) HandleDeser return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetProgrammaticAccessCredentialsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateDatasetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -235,7 +253,7 @@ func (m *awsRestjson1_deserializeOpGetProgrammaticAccessCredentials) HandleDeser return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetProgrammaticAccessCredentials(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateDataset(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -279,12 +297,24 @@ func awsRestjson1_deserializeOpErrorGetProgrammaticAccessCredentials(response *s case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -295,7 +325,7 @@ func awsRestjson1_deserializeOpErrorGetProgrammaticAccessCredentials(response *s } } -func awsRestjson1_deserializeOpDocumentGetProgrammaticAccessCredentialsOutput(v **GetProgrammaticAccessCredentialsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateDatasetOutput(v **CreateDatasetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -308,31 +338,22 @@ func awsRestjson1_deserializeOpDocumentGetProgrammaticAccessCredentialsOutput(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetProgrammaticAccessCredentialsOutput + var sv *CreateDatasetOutput if *v == nil { - sv = &GetProgrammaticAccessCredentialsOutput{} + sv = &CreateDatasetOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "credentials": - if err := awsRestjson1_deserializeDocumentCredentials(&sv.Credentials, value); err != nil { - return err - } - - case "durationInMinutes": + case "datasetId": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SessionDuration to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected DatasetId to be of type string, got %T instead", value) } - sv.DurationInMinutes = i64 + sv.DatasetId = ptr.String(jtv) } default: @@ -344,14 +365,14 @@ func awsRestjson1_deserializeOpDocumentGetProgrammaticAccessCredentialsOutput(v return nil } -type awsRestjson1_deserializeOpGetWorkingLocation struct { +type awsRestjson1_deserializeOpCreateDataView struct { } -func (*awsRestjson1_deserializeOpGetWorkingLocation) ID() string { +func (*awsRestjson1_deserializeOpCreateDataView) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetWorkingLocation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateDataView) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -365,9 +386,9 @@ func (m *awsRestjson1_deserializeOpGetWorkingLocation) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetWorkingLocation(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateDataView(response, &metadata) } - output := &GetWorkingLocationOutput{} + output := &CreateDataViewOutput{} out.Result = output var buff [1024]byte @@ -388,7 +409,7 @@ func (m *awsRestjson1_deserializeOpGetWorkingLocation) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetWorkingLocationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateDataViewOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -401,7 +422,7 @@ func (m *awsRestjson1_deserializeOpGetWorkingLocation) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetWorkingLocation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateDataView(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -442,12 +463,18 @@ func awsRestjson1_deserializeOpErrorGetWorkingLocation(response *smithyhttp.Resp } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -464,7 +491,7 @@ func awsRestjson1_deserializeOpErrorGetWorkingLocation(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpDocumentGetWorkingLocationOutput(v **GetWorkingLocationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateDataViewOutput(v **CreateDataViewOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -477,40 +504,31 @@ func awsRestjson1_deserializeOpDocumentGetWorkingLocationOutput(v **GetWorkingLo return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetWorkingLocationOutput + var sv *CreateDataViewOutput if *v == nil { - sv = &GetWorkingLocationOutput{} + sv = &CreateDataViewOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "s3Bucket": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected stringValueLength1to63 to be of type string, got %T instead", value) - } - sv.S3Bucket = ptr.String(jtv) - } - - case "s3Path": + case "datasetId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected stringValueLength1to1024 to be of type string, got %T instead", value) + return fmt.Errorf("expected DatasetId to be of type string, got %T instead", value) } - sv.S3Path = ptr.String(jtv) + sv.DatasetId = ptr.String(jtv) } - case "s3Uri": + case "dataViewId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected stringValueLength1to1024 to be of type string, got %T instead", value) + return fmt.Errorf("expected DataViewId to be of type string, got %T instead", value) } - sv.S3Uri = ptr.String(jtv) + sv.DataViewId = ptr.String(jtv) } default: @@ -522,48 +540,37 @@ func awsRestjson1_deserializeOpDocumentGetWorkingLocationOutput(v **GetWorkingLo return nil } -func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.AccessDeniedException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } +type awsRestjson1_deserializeOpDeleteDataset struct { +} - err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) +func (*awsRestjson1_deserializeOpDeleteDataset) ID() string { + return "OperationDeserializer" +} +func (m *awsRestjson1_deserializeOpDeleteDataset) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } - return output -} + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteDataset(response, &metadata) + } + output := &DeleteDatasetOutput{} + out.Result = output -func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InternalServerException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -574,47 +581,44 @@ func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.R Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) - + err = awsRestjson1_deserializeOpDocumentDeleteDatasetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } - return err } - errorBody.Seek(0, io.SeekStart) - - return output + return out, metadata, err } -func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ResourceNotFoundException{} +func awsRestjson1_deserializeOpErrorDeleteDataset(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) - + code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -626,52 +630,46 @@ func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp } errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } - return output -} + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) -func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ThrottlingException{} - return output -} + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) -func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ValidationException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - err := awsRestjson1_deserializeDocumentValidationException(&output, shape) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - errorBody.Seek(0, io.SeekStart) + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) - return output + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } } -func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteDatasetOutput(v **DeleteDatasetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -684,22 +682,22 @@ func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDenie return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AccessDeniedException + var sv *DeleteDatasetOutput if *v == nil { - sv = &types.AccessDeniedException{} + sv = &DeleteDatasetOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "datasetId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected DatasetId to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.DatasetId = ptr.String(jtv) } default: @@ -711,143 +709,3136 @@ func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDenie return nil } -func awsRestjson1_deserializeDocumentChangesetInfo(v **types.ChangesetInfo, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } +type awsRestjson1_deserializeOpGetChangeset struct { +} - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } +func (*awsRestjson1_deserializeOpGetChangeset) ID() string { + return "OperationDeserializer" +} - var sv *types.ChangesetInfo - if *v == nil { - sv = &types.ChangesetInfo{} - } else { - sv = *v +func (m *awsRestjson1_deserializeOpGetChangeset) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetChangeset(response, &metadata) + } + output := &GetChangesetOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetChangesetOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetChangeset(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetChangesetOutput(v **GetChangesetOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetChangesetOutput + if *v == nil { + sv = &GetChangesetOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "activeUntilTimestamp": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TimestampEpoch to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ActiveUntilTimestamp = i64 + } + + case "changesetArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChangesetArn to be of type string, got %T instead", value) + } + sv.ChangesetArn = ptr.String(jtv) + } + + case "changesetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChangesetId to be of type string, got %T instead", value) + } + sv.ChangesetId = ptr.String(jtv) + } + + case "changeType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChangeType to be of type string, got %T instead", value) + } + sv.ChangeType = types.ChangeType(jtv) + } + + case "createTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TimestampEpoch to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CreateTime = i64 + } + + case "datasetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DatasetId to be of type string, got %T instead", value) + } + sv.DatasetId = ptr.String(jtv) + } + + case "errorInfo": + if err := awsRestjson1_deserializeDocumentChangesetErrorInfo(&sv.ErrorInfo, value); err != nil { + return err + } + + case "formatParams": + if err := awsRestjson1_deserializeDocumentFormatParams(&sv.FormatParams, value); err != nil { + return err + } + + case "sourceParams": + if err := awsRestjson1_deserializeDocumentSourceParams(&sv.SourceParams, value); err != nil { + return err + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IngestionStatus to be of type string, got %T instead", value) + } + sv.Status = types.IngestionStatus(jtv) + } + + case "updatedByChangesetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChangesetId to be of type string, got %T instead", value) + } + sv.UpdatedByChangesetId = ptr.String(jtv) + } + + case "updatesChangesetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChangesetId to be of type string, got %T instead", value) + } + sv.UpdatesChangesetId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetDataset struct { +} + +func (*awsRestjson1_deserializeOpGetDataset) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetDataset) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetDataset(response, &metadata) + } + output := &GetDatasetOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetDatasetOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetDataset(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetDatasetOutput(v **GetDatasetOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetDatasetOutput + if *v == nil { + sv = &GetDatasetOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "alias": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AliasString to be of type string, got %T instead", value) + } + sv.Alias = ptr.String(jtv) + } + + case "createTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TimestampEpoch to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CreateTime = i64 + } + + case "datasetArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DatasetArn to be of type string, got %T instead", value) + } + sv.DatasetArn = ptr.String(jtv) + } + + case "datasetDescription": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DatasetDescription to be of type string, got %T instead", value) + } + sv.DatasetDescription = ptr.String(jtv) + } + + case "datasetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DatasetId to be of type string, got %T instead", value) + } + sv.DatasetId = ptr.String(jtv) + } + + case "datasetTitle": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DatasetTitle to be of type string, got %T instead", value) + } + sv.DatasetTitle = ptr.String(jtv) + } + + case "kind": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DatasetKind to be of type string, got %T instead", value) + } + sv.Kind = types.DatasetKind(jtv) + } + + case "lastModifiedTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TimestampEpoch to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastModifiedTime = i64 + } + + case "schemaDefinition": + if err := awsRestjson1_deserializeDocumentSchemaUnion(&sv.SchemaDefinition, value); err != nil { + return err + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DatasetStatus to be of type string, got %T instead", value) + } + sv.Status = types.DatasetStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetDataView struct { +} + +func (*awsRestjson1_deserializeOpGetDataView) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetDataView) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetDataView(response, &metadata) + } + output := &GetDataViewOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetDataViewOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetDataView(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetDataViewOutput(v **GetDataViewOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetDataViewOutput + if *v == nil { + sv = &GetDataViewOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "asOfTimestamp": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TimestampEpoch to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AsOfTimestamp = i64 + } + + case "autoUpdate": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.AutoUpdate = jtv + } + + case "createTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TimestampEpoch to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CreateTime = i64 + } + + case "datasetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DatasetId to be of type string, got %T instead", value) + } + sv.DatasetId = ptr.String(jtv) + } + + case "dataViewArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DataViewArn to be of type string, got %T instead", value) + } + sv.DataViewArn = ptr.String(jtv) + } + + case "dataViewId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DataViewId to be of type string, got %T instead", value) + } + sv.DataViewId = ptr.String(jtv) + } + + case "destinationTypeParams": + if err := awsRestjson1_deserializeDocumentDataViewDestinationTypeParams(&sv.DestinationTypeParams, value); err != nil { + return err + } + + case "errorInfo": + if err := awsRestjson1_deserializeDocumentDataViewErrorInfo(&sv.ErrorInfo, value); err != nil { + return err + } + + case "lastModifiedTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TimestampEpoch to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastModifiedTime = i64 + } + + case "partitionColumns": + if err := awsRestjson1_deserializeDocumentPartitionColumnList(&sv.PartitionColumns, value); err != nil { + return err + } + + case "sortColumns": + if err := awsRestjson1_deserializeDocumentSortColumnList(&sv.SortColumns, value); err != nil { + return err + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DataViewStatus to be of type string, got %T instead", value) + } + sv.Status = types.DataViewStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetProgrammaticAccessCredentials struct { +} + +func (*awsRestjson1_deserializeOpGetProgrammaticAccessCredentials) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetProgrammaticAccessCredentials) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetProgrammaticAccessCredentials(response, &metadata) + } + output := &GetProgrammaticAccessCredentialsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetProgrammaticAccessCredentialsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetProgrammaticAccessCredentials(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetProgrammaticAccessCredentialsOutput(v **GetProgrammaticAccessCredentialsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetProgrammaticAccessCredentialsOutput + if *v == nil { + sv = &GetProgrammaticAccessCredentialsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "credentials": + if err := awsRestjson1_deserializeDocumentCredentials(&sv.Credentials, value); err != nil { + return err + } + + case "durationInMinutes": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected SessionDuration to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DurationInMinutes = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetWorkingLocation struct { +} + +func (*awsRestjson1_deserializeOpGetWorkingLocation) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetWorkingLocation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetWorkingLocation(response, &metadata) + } + output := &GetWorkingLocationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetWorkingLocationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetWorkingLocation(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetWorkingLocationOutput(v **GetWorkingLocationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetWorkingLocationOutput + if *v == nil { + sv = &GetWorkingLocationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "s3Bucket": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected stringValueLength1to63 to be of type string, got %T instead", value) + } + sv.S3Bucket = ptr.String(jtv) + } + + case "s3Path": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected stringValueLength1to1024 to be of type string, got %T instead", value) + } + sv.S3Path = ptr.String(jtv) + } + + case "s3Uri": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected stringValueLength1to1024 to be of type string, got %T instead", value) + } + sv.S3Uri = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListChangesets struct { +} + +func (*awsRestjson1_deserializeOpListChangesets) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListChangesets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListChangesets(response, &metadata) + } + output := &ListChangesetsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListChangesetsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListChangesets(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListChangesetsOutput(v **ListChangesetsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListChangesetsOutput + if *v == nil { + sv = &ListChangesetsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "changesets": + if err := awsRestjson1_deserializeDocumentChangesetList(&sv.Changesets, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListDatasets struct { +} + +func (*awsRestjson1_deserializeOpListDatasets) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListDatasets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListDatasets(response, &metadata) + } + output := &ListDatasetsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListDatasetsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListDatasets(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListDatasetsOutput(v **ListDatasetsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListDatasetsOutput + if *v == nil { + sv = &ListDatasetsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "datasets": + if err := awsRestjson1_deserializeDocumentDatasetList(&sv.Datasets, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListDataViews struct { +} + +func (*awsRestjson1_deserializeOpListDataViews) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListDataViews) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListDataViews(response, &metadata) + } + output := &ListDataViewsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListDataViewsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListDataViews(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListDataViewsOutput(v **ListDataViewsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListDataViewsOutput + if *v == nil { + sv = &ListDataViewsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "dataViews": + if err := awsRestjson1_deserializeDocumentDataViewList(&sv.DataViews, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateChangeset struct { +} + +func (*awsRestjson1_deserializeOpUpdateChangeset) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateChangeset) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateChangeset(response, &metadata) + } + output := &UpdateChangesetOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateChangesetOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateChangeset(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateChangesetOutput(v **UpdateChangesetOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateChangesetOutput + if *v == nil { + sv = &UpdateChangesetOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "changesetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChangesetId to be of type string, got %T instead", value) + } + sv.ChangesetId = ptr.String(jtv) + } + + case "datasetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DatasetId to be of type string, got %T instead", value) + } + sv.DatasetId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateDataset struct { +} + +func (*awsRestjson1_deserializeOpUpdateDataset) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateDataset) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateDataset(response, &metadata) + } + output := &UpdateDatasetOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateDatasetOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateDataset(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateDatasetOutput(v **UpdateDatasetOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateDatasetOutput + if *v == nil { + sv = &UpdateDatasetOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "datasetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DatasetId to be of type string, got %T instead", value) + } + sv.DatasetId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDeniedException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ConflictException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentConflictException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalServerException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.LimitExceededException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentLimitExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceNotFoundException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ThrottlingException{} + return output +} + +func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ValidationException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentValidationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage2 to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentChangesetErrorInfo(v **types.ChangesetErrorInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ChangesetErrorInfo + if *v == nil { + sv = &types.ChangesetErrorInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errorCategory": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCategory to be of type string, got %T instead", value) + } + sv.ErrorCategory = types.ErrorCategory(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentChangesetList(v *[]types.ChangesetSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ChangesetSummary + if *v == nil { + cv = []types.ChangesetSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ChangesetSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentChangesetSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentChangesetSummary(v **types.ChangesetSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ChangesetSummary + if *v == nil { + sv = &types.ChangesetSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "activeUntilTimestamp": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TimestampEpoch to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ActiveUntilTimestamp = i64 + } + + case "changesetArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChangesetArn to be of type string, got %T instead", value) + } + sv.ChangesetArn = ptr.String(jtv) + } + + case "changesetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChangesetId to be of type string, got %T instead", value) + } + sv.ChangesetId = ptr.String(jtv) + } + + case "changeType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChangeType to be of type string, got %T instead", value) + } + sv.ChangeType = types.ChangeType(jtv) + } + + case "createTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TimestampEpoch to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CreateTime = i64 + } + + case "datasetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DatasetId to be of type string, got %T instead", value) + } + sv.DatasetId = ptr.String(jtv) + } + + case "errorInfo": + if err := awsRestjson1_deserializeDocumentChangesetErrorInfo(&sv.ErrorInfo, value); err != nil { + return err + } + + case "formatParams": + if err := awsRestjson1_deserializeDocumentFormatParams(&sv.FormatParams, value); err != nil { + return err + } + + case "sourceParams": + if err := awsRestjson1_deserializeDocumentSourceParams(&sv.SourceParams, value); err != nil { + return err + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IngestionStatus to be of type string, got %T instead", value) + } + sv.Status = types.IngestionStatus(jtv) + } + + case "updatedByChangesetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChangesetId to be of type string, got %T instead", value) + } + sv.UpdatedByChangesetId = ptr.String(jtv) + } + + case "updatesChangesetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChangesetId to be of type string, got %T instead", value) + } + sv.UpdatesChangesetId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentColumnDefinition(v **types.ColumnDefinition, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ColumnDefinition + if *v == nil { + sv = &types.ColumnDefinition{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "columnDescription": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ColumnDescription to be of type string, got %T instead", value) + } + sv.ColumnDescription = ptr.String(jtv) + } + + case "columnName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ColumnName to be of type string, got %T instead", value) + } + sv.ColumnName = ptr.String(jtv) + } + + case "dataType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ColumnDataType to be of type string, got %T instead", value) + } + sv.DataType = types.ColumnDataType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentColumnList(v *[]types.ColumnDefinition, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ColumnDefinition + if *v == nil { + cv = []types.ColumnDefinition{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ColumnDefinition + destAddr := &col + if err := awsRestjson1_deserializeDocumentColumnDefinition(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentColumnNameList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ColumnName to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConflictException + if *v == nil { + sv = &types.ConflictException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage2 to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCredentials(v **types.Credentials, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Credentials + if *v == nil { + sv = &types.Credentials{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accessKeyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringValueLength1to2552 to be of type string, got %T instead", value) + } + sv.AccessKeyId = ptr.String(jtv) + } + + case "secretAccessKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected stringValueMaxLength1000 to be of type string, got %T instead", value) + } + sv.SecretAccessKey = ptr.String(jtv) + } + + case "sessionToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected stringValueMaxLength1000 to be of type string, got %T instead", value) + } + sv.SessionToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDataset(v **types.Dataset, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Dataset + if *v == nil { + sv = &types.Dataset{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "alias": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AliasString to be of type string, got %T instead", value) + } + sv.Alias = ptr.String(jtv) + } + + case "createTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TimestampEpoch to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CreateTime = i64 + } + + case "datasetArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DatasetArn to be of type string, got %T instead", value) + } + sv.DatasetArn = ptr.String(jtv) + } + + case "datasetDescription": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DatasetDescription to be of type string, got %T instead", value) + } + sv.DatasetDescription = ptr.String(jtv) + } + + case "datasetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DatasetId to be of type string, got %T instead", value) + } + sv.DatasetId = ptr.String(jtv) + } + + case "datasetTitle": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DatasetTitle to be of type string, got %T instead", value) + } + sv.DatasetTitle = ptr.String(jtv) + } + + case "kind": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DatasetKind to be of type string, got %T instead", value) + } + sv.Kind = types.DatasetKind(jtv) + } + + case "lastModifiedTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TimestampEpoch to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastModifiedTime = i64 + } + + case "ownerInfo": + if err := awsRestjson1_deserializeDocumentDatasetOwnerInfo(&sv.OwnerInfo, value); err != nil { + return err + } + + case "schemaDefinition": + if err := awsRestjson1_deserializeDocumentSchemaUnion(&sv.SchemaDefinition, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDatasetList(v *[]types.Dataset, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Dataset + if *v == nil { + cv = []types.Dataset{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Dataset + destAddr := &col + if err := awsRestjson1_deserializeDocumentDataset(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentDatasetOwnerInfo(v **types.DatasetOwnerInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DatasetOwnerInfo + if *v == nil { + sv = &types.DatasetOwnerInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "email": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Email to be of type string, got %T instead", value) + } + sv.Email = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OwnerName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "phoneNumber": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PhoneNumber to be of type string, got %T instead", value) + } + sv.PhoneNumber = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDataViewDestinationTypeParams(v **types.DataViewDestinationTypeParams, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DataViewDestinationTypeParams + if *v == nil { + sv = &types.DataViewDestinationTypeParams{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "destinationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DataViewDestinationType to be of type string, got %T instead", value) + } + sv.DestinationType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDataViewErrorInfo(v **types.DataViewErrorInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DataViewErrorInfo + if *v == nil { + sv = &types.DataViewErrorInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errorCategory": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCategory to be of type string, got %T instead", value) + } + sv.ErrorCategory = types.ErrorCategory(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDataViewList(v *[]types.DataViewSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.DataViewSummary + if *v == nil { + cv = []types.DataViewSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DataViewSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentDataViewSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentDataViewSummary(v **types.DataViewSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DataViewSummary + if *v == nil { + sv = &types.DataViewSummary{} + } else { + sv = *v } for key, value := range shape { switch key { - case "changesetArn": + case "asOfTimestamp": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected arn to be of type string, got %T instead", value) + return fmt.Errorf("expected TimestampEpoch to be json.Number, got %T instead", value) } - sv.ChangesetArn = ptr.String(jtv) - } - - case "changesetLabels": - if err := awsRestjson1_deserializeDocumentStringMap(&sv.ChangesetLabels, value); err != nil { - return err + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AsOfTimestamp = i64 } - case "changeType": + case "autoUpdate": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected ChangeType to be of type string, got %T instead", value) + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } - sv.ChangeType = types.ChangeType(jtv) + sv.AutoUpdate = jtv } - case "createTimestamp": + case "createTime": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreateTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TimestampEpoch to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err } + sv.CreateTime = i64 } case "datasetId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected IdType to be of type string, got %T instead", value) + return fmt.Errorf("expected DatasetId to be of type string, got %T instead", value) } sv.DatasetId = ptr.String(jtv) } - case "errorInfo": - if err := awsRestjson1_deserializeDocumentErrorInfo(&sv.ErrorInfo, value); err != nil { - return err - } - - case "formatParams": - if err := awsRestjson1_deserializeDocumentStringMap(&sv.FormatParams, value); err != nil { - return err - } - - case "formatType": + case "dataViewArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected FormatType to be of type string, got %T instead", value) + return fmt.Errorf("expected DataViewArn to be of type string, got %T instead", value) } - sv.FormatType = types.FormatType(jtv) + sv.DataViewArn = ptr.String(jtv) } - case "id": + case "dataViewId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected IdType to be of type string, got %T instead", value) + return fmt.Errorf("expected DataViewId to be of type string, got %T instead", value) } - sv.Id = ptr.String(jtv) + sv.DataViewId = ptr.String(jtv) } - case "sourceParams": - if err := awsRestjson1_deserializeDocumentStringMap(&sv.SourceParams, value); err != nil { + case "destinationTypeProperties": + if err := awsRestjson1_deserializeDocumentDataViewDestinationTypeParams(&sv.DestinationTypeProperties, value); err != nil { return err } - case "sourceType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SourceType to be of type string, got %T instead", value) - } - sv.SourceType = types.SourceType(jtv) + case "errorInfo": + if err := awsRestjson1_deserializeDocumentDataViewErrorInfo(&sv.ErrorInfo, value); err != nil { + return err } - case "status": + case "lastModifiedTime": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected ChangesetStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected TimestampEpoch to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err } - sv.Status = types.ChangesetStatus(jtv) + sv.LastModifiedTime = i64 } - case "updatedByChangesetId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected stringValue to be of type string, got %T instead", value) - } - sv.UpdatedByChangesetId = ptr.String(jtv) + case "partitionColumns": + if err := awsRestjson1_deserializeDocumentPartitionColumnList(&sv.PartitionColumns, value); err != nil { + return err } - case "updatesChangesetId": + case "sortColumns": + if err := awsRestjson1_deserializeDocumentSortColumnList(&sv.SortColumns, value); err != nil { + return err + } + + case "status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected stringValue to be of type string, got %T instead", value) + return fmt.Errorf("expected DataViewStatus to be of type string, got %T instead", value) } - sv.UpdatesChangesetId = ptr.String(jtv) + sv.Status = types.DataViewStatus(jtv) } default: @@ -859,7 +3850,7 @@ func awsRestjson1_deserializeDocumentChangesetInfo(v **types.ChangesetInfo, valu return nil } -func awsRestjson1_deserializeDocumentCredentials(v **types.Credentials, value interface{}) error { +func awsRestjson1_deserializeDocumentFormatParams(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -872,40 +3863,58 @@ func awsRestjson1_deserializeDocumentCredentials(v **types.Credentials, value in return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Credentials + var mv map[string]string if *v == nil { - sv = &types.Credentials{} + mv = map[string]string{} } else { - sv = *v + mv = *v } for key, value := range shape { - switch key { - case "accessKeyId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected stringValueLength1to255 to be of type string, got %T instead", value) - } - sv.AccessKeyId = ptr.String(jtv) + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringMapValue to be of type string, got %T instead", value) } + parsedVal = jtv + } + mv[key] = parsedVal - case "secretAccessKey": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected stringValueMaxLength1000 to be of type string, got %T instead", value) - } - sv.SecretAccessKey = ptr.String(jtv) - } + } + *v = mv + return nil +} - case "sessionToken": +func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InternalServerException + if *v == nil { + sv = &types.InternalServerException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected stringValueMaxLength1000 to be of type string, got %T instead", value) + return fmt.Errorf("expected ErrorMessage2 to be of type string, got %T instead", value) } - sv.SessionToken = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -917,7 +3926,7 @@ func awsRestjson1_deserializeDocumentCredentials(v **types.Credentials, value in return nil } -func awsRestjson1_deserializeDocumentErrorInfo(v **types.ErrorInfo, value interface{}) error { +func awsRestjson1_deserializeDocumentLimitExceededException(v **types.LimitExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -930,31 +3939,22 @@ func awsRestjson1_deserializeDocumentErrorInfo(v **types.ErrorInfo, value interf return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ErrorInfo + var sv *types.LimitExceededException if *v == nil { - sv = &types.ErrorInfo{} + sv = &types.LimitExceededException{} } else { sv = *v } for key, value := range shape { switch key { - case "errorCategory": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorCategory to be of type string, got %T instead", value) - } - sv.ErrorCategory = types.ErrorCategory(jtv) - } - - case "errorMessage": + case "message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected stringValueMaxLength1000 to be of type string, got %T instead", value) + return fmt.Errorf("expected ErrorMessage2 to be of type string, got %T instead", value) } - sv.ErrorMessage = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -966,7 +3966,43 @@ func awsRestjson1_deserializeDocumentErrorInfo(v **types.ErrorInfo, value interf return nil } -func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { +func awsRestjson1_deserializeDocumentPartitionColumnList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringValueLength1to255 to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -979,9 +4015,9 @@ func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalS return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InternalServerException + var sv *types.ResourceNotFoundException if *v == nil { - sv = &types.InternalServerException{} + sv = &types.ResourceNotFoundException{} } else { sv = *v } @@ -992,7 +4028,7 @@ func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalS if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected ErrorMessage2 to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } @@ -1006,7 +4042,7 @@ func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalS return nil } -func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { +func awsRestjson1_deserializeDocumentSchemaDefinition(v **types.SchemaDefinition, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1019,22 +4055,59 @@ func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.Resourc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ResourceNotFoundException + var sv *types.SchemaDefinition if *v == nil { - sv = &types.ResourceNotFoundException{} + sv = &types.SchemaDefinition{} } else { sv = *v } for key, value := range shape { switch key { - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) + case "columns": + if err := awsRestjson1_deserializeDocumentColumnList(&sv.Columns, value); err != nil { + return err + } + + case "primaryKeyColumns": + if err := awsRestjson1_deserializeDocumentColumnNameList(&sv.PrimaryKeyColumns, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSchemaUnion(v **types.SchemaUnion, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SchemaUnion + if *v == nil { + sv = &types.SchemaUnion{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "tabularSchemaConfig": + if err := awsRestjson1_deserializeDocumentSchemaDefinition(&sv.TabularSchemaConfig, value); err != nil { + return err } default: @@ -1046,7 +4119,43 @@ func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.Resourc return nil } -func awsRestjson1_deserializeDocumentStringMap(v *map[string]string, value interface{}) error { +func awsRestjson1_deserializeDocumentSortColumnList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringValueLength1to255 to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentSourceParams(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1071,7 +4180,7 @@ func awsRestjson1_deserializeDocumentStringMap(v *map[string]string, value inter if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected stringMapValue to be of type string, got %T instead", value) + return fmt.Errorf("expected StringMapValue to be of type string, got %T instead", value) } parsedVal = jtv } @@ -1139,7 +4248,7 @@ func awsRestjson1_deserializeDocumentValidationException(v **types.ValidationExc if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected ErrorMessage2 to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } diff --git a/service/finspacedata/doc.go b/service/finspacedata/doc.go index fa6e74a9e7a..4c1b4e268b4 100644 --- a/service/finspacedata/doc.go +++ b/service/finspacedata/doc.go @@ -3,5 +3,5 @@ // Package finspacedata provides the API client, operations, and parameter types // for FinSpace Public API. // -// The FinSpace APIs let you take actions inside the FinSpace environment. +// The FinSpace APIs let you take actions inside the FinSpace. package finspacedata diff --git a/service/finspacedata/generated.json b/service/finspacedata/generated.json index 0efab1eba04..18509c42767 100644 --- a/service/finspacedata/generated.json +++ b/service/finspacedata/generated.json @@ -8,8 +8,19 @@ "files": [ "api_client.go", "api_op_CreateChangeset.go", + "api_op_CreateDataView.go", + "api_op_CreateDataset.go", + "api_op_DeleteDataset.go", + "api_op_GetChangeset.go", + "api_op_GetDataView.go", + "api_op_GetDataset.go", "api_op_GetProgrammaticAccessCredentials.go", "api_op_GetWorkingLocation.go", + "api_op_ListChangesets.go", + "api_op_ListDataViews.go", + "api_op_ListDatasets.go", + "api_op_UpdateChangeset.go", + "api_op_UpdateDataset.go", "deserializers.go", "doc.go", "endpoints.go", diff --git a/service/finspacedata/serializers.go b/service/finspacedata/serializers.go index 69d5f63bbc9..51e9864f6be 100644 --- a/service/finspacedata/serializers.go +++ b/service/finspacedata/serializers.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/aws/aws-sdk-go-v2/service/finspacedata/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" smithyjson "github.com/aws/smithy-go/encoding/json" @@ -34,7 +35,7 @@ func (m *awsRestjson1_serializeOpCreateChangeset) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/datasets/{datasetId}/changesets") + opPath, opQuery := httpbinding.SplitURI("/datasets/{datasetId}/changesetsv2") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -91,33 +92,21 @@ func awsRestjson1_serializeOpDocumentCreateChangesetInput(v *CreateChangesetInpu ok.String(string(v.ChangeType)) } + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + if v.FormatParams != nil { ok := object.Key("formatParams") - if err := awsRestjson1_serializeDocumentStringMap(v.FormatParams, ok); err != nil { + if err := awsRestjson1_serializeDocumentFormatParams(v.FormatParams, ok); err != nil { return err } } - if len(v.FormatType) > 0 { - ok := object.Key("formatType") - ok.String(string(v.FormatType)) - } - if v.SourceParams != nil { ok := object.Key("sourceParams") - if err := awsRestjson1_serializeDocumentStringMap(v.SourceParams, ok); err != nil { - return err - } - } - - if len(v.SourceType) > 0 { - ok := object.Key("sourceType") - ok.String(string(v.SourceType)) - } - - if v.Tags != nil { - ok := object.Key("tags") - if err := awsRestjson1_serializeDocumentStringMap(v.Tags, ok); err != nil { + if err := awsRestjson1_serializeDocumentSourceParams(v.SourceParams, ok); err != nil { return err } } @@ -125,14 +114,14 @@ func awsRestjson1_serializeOpDocumentCreateChangesetInput(v *CreateChangesetInpu return nil } -type awsRestjson1_serializeOpGetProgrammaticAccessCredentials struct { +type awsRestjson1_serializeOpCreateDataset struct { } -func (*awsRestjson1_serializeOpGetProgrammaticAccessCredentials) ID() string { +func (*awsRestjson1_serializeOpCreateDataset) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetProgrammaticAccessCredentials) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreateDataset) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -140,22 +129,29 @@ func (m *awsRestjson1_serializeOpGetProgrammaticAccessCredentials) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetProgrammaticAccessCredentialsInput) + input, ok := in.Parameters.(*CreateDatasetInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/credentials/programmatic") + opPath, opQuery := httpbinding.SplitURI("/datasetsv2") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" + request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetProgrammaticAccessCredentialsInput(input, restEncoder); err != nil { + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateDatasetInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -166,30 +162,75 @@ func (m *awsRestjson1_serializeOpGetProgrammaticAccessCredentials) HandleSeriali return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetProgrammaticAccessCredentialsInput(v *GetProgrammaticAccessCredentialsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreateDatasetInput(v *CreateDatasetInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.DurationInMinutes != 0 { - encoder.SetQuery("durationInMinutes").Long(v.DurationInMinutes) + return nil +} + +func awsRestjson1_serializeOpDocumentCreateDatasetInput(v *CreateDatasetInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Alias != nil { + ok := object.Key("alias") + ok.String(*v.Alias) } - if v.EnvironmentId != nil { - encoder.SetQuery("environmentId").String(*v.EnvironmentId) + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.DatasetDescription != nil { + ok := object.Key("datasetDescription") + ok.String(*v.DatasetDescription) + } + + if v.DatasetTitle != nil { + ok := object.Key("datasetTitle") + ok.String(*v.DatasetTitle) + } + + if len(v.Kind) > 0 { + ok := object.Key("kind") + ok.String(string(v.Kind)) + } + + if v.OwnerInfo != nil { + ok := object.Key("ownerInfo") + if err := awsRestjson1_serializeDocumentDatasetOwnerInfo(v.OwnerInfo, ok); err != nil { + return err + } + } + + if v.PermissionGroupParams != nil { + ok := object.Key("permissionGroupParams") + if err := awsRestjson1_serializeDocumentPermissionGroupParams(v.PermissionGroupParams, ok); err != nil { + return err + } + } + + if v.SchemaDefinition != nil { + ok := object.Key("schemaDefinition") + if err := awsRestjson1_serializeDocumentSchemaUnion(v.SchemaDefinition, ok); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpGetWorkingLocation struct { +type awsRestjson1_serializeOpCreateDataView struct { } -func (*awsRestjson1_serializeOpGetWorkingLocation) ID() string { +func (*awsRestjson1_serializeOpCreateDataView) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetWorkingLocation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreateDataView) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -197,13 +238,13 @@ func (m *awsRestjson1_serializeOpGetWorkingLocation) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetWorkingLocationInput) + input, ok := in.Parameters.(*CreateDataViewInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/workingLocationV1") + opPath, opQuery := httpbinding.SplitURI("/datasets/{datasetId}/dataviewsv2") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -212,10 +253,14 @@ func (m *awsRestjson1_serializeOpGetWorkingLocation) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } + if err := awsRestjson1_serializeOpHttpBindingsCreateDataViewInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentGetWorkingLocationInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentCreateDataViewInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -230,27 +275,1039 @@ func (m *awsRestjson1_serializeOpGetWorkingLocation) HandleSerialize(ctx context return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetWorkingLocationInput(v *GetWorkingLocationInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreateDataViewInput(v *CreateDataViewInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } + if v.DatasetId == nil || len(*v.DatasetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member datasetId must not be empty")} + } + if v.DatasetId != nil { + if err := encoder.SetURI("datasetId").String(*v.DatasetId); err != nil { + return err + } + } + return nil } -func awsRestjson1_serializeOpDocumentGetWorkingLocationInput(v *GetWorkingLocationInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentCreateDataViewInput(v *CreateDataViewInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if len(v.LocationType) > 0 { - ok := object.Key("locationType") - ok.String(string(v.LocationType)) + if v.AsOfTimestamp != 0 { + ok := object.Key("asOfTimestamp") + ok.Long(v.AsOfTimestamp) + } + + if v.AutoUpdate { + ok := object.Key("autoUpdate") + ok.Boolean(v.AutoUpdate) + } + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.DestinationTypeParams != nil { + ok := object.Key("destinationTypeParams") + if err := awsRestjson1_serializeDocumentDataViewDestinationTypeParams(v.DestinationTypeParams, ok); err != nil { + return err + } + } + + if v.PartitionColumns != nil { + ok := object.Key("partitionColumns") + if err := awsRestjson1_serializeDocumentPartitionColumnList(v.PartitionColumns, ok); err != nil { + return err + } + } + + if v.SortColumns != nil { + ok := object.Key("sortColumns") + if err := awsRestjson1_serializeDocumentSortColumnList(v.SortColumns, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteDataset struct { +} + +func (*awsRestjson1_serializeOpDeleteDataset) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteDataset) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteDatasetInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/datasetsv2/{datasetId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteDatasetInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteDatasetInput(v *DeleteDatasetInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ClientToken != nil { + encoder.SetQuery("clientToken").String(*v.ClientToken) + } + + if v.DatasetId == nil || len(*v.DatasetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member datasetId must not be empty")} + } + if v.DatasetId != nil { + if err := encoder.SetURI("datasetId").String(*v.DatasetId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetChangeset struct { +} + +func (*awsRestjson1_serializeOpGetChangeset) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetChangeset) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetChangesetInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/datasets/{datasetId}/changesetsv2/{changesetId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetChangesetInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetChangesetInput(v *GetChangesetInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChangesetId == nil || len(*v.ChangesetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member changesetId must not be empty")} + } + if v.ChangesetId != nil { + if err := encoder.SetURI("changesetId").String(*v.ChangesetId); err != nil { + return err + } } + if v.DatasetId == nil || len(*v.DatasetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member datasetId must not be empty")} + } + if v.DatasetId != nil { + if err := encoder.SetURI("datasetId").String(*v.DatasetId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetDataset struct { +} + +func (*awsRestjson1_serializeOpGetDataset) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetDataset) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetDatasetInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/datasetsv2/{datasetId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetDatasetInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetDatasetInput(v *GetDatasetInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DatasetId == nil || len(*v.DatasetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member datasetId must not be empty")} + } + if v.DatasetId != nil { + if err := encoder.SetURI("datasetId").String(*v.DatasetId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetDataView struct { +} + +func (*awsRestjson1_serializeOpGetDataView) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetDataView) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetDataViewInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/datasets/{datasetId}/dataviewsv2/{dataViewId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetDataViewInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetDataViewInput(v *GetDataViewInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DatasetId == nil || len(*v.DatasetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member datasetId must not be empty")} + } + if v.DatasetId != nil { + if err := encoder.SetURI("datasetId").String(*v.DatasetId); err != nil { + return err + } + } + + if v.DataViewId == nil || len(*v.DataViewId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member dataViewId must not be empty")} + } + if v.DataViewId != nil { + if err := encoder.SetURI("dataViewId").String(*v.DataViewId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetProgrammaticAccessCredentials struct { +} + +func (*awsRestjson1_serializeOpGetProgrammaticAccessCredentials) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetProgrammaticAccessCredentials) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetProgrammaticAccessCredentialsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/credentials/programmatic") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetProgrammaticAccessCredentialsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetProgrammaticAccessCredentialsInput(v *GetProgrammaticAccessCredentialsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DurationInMinutes != 0 { + encoder.SetQuery("durationInMinutes").Long(v.DurationInMinutes) + } + + if v.EnvironmentId != nil { + encoder.SetQuery("environmentId").String(*v.EnvironmentId) + } + + return nil +} + +type awsRestjson1_serializeOpGetWorkingLocation struct { +} + +func (*awsRestjson1_serializeOpGetWorkingLocation) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetWorkingLocation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetWorkingLocationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/workingLocationV1") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentGetWorkingLocationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetWorkingLocationInput(v *GetWorkingLocationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentGetWorkingLocationInput(v *GetWorkingLocationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.LocationType) > 0 { + ok := object.Key("locationType") + ok.String(string(v.LocationType)) + } + + return nil +} + +type awsRestjson1_serializeOpListChangesets struct { +} + +func (*awsRestjson1_serializeOpListChangesets) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListChangesets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListChangesetsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/datasets/{datasetId}/changesetsv2") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListChangesetsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListChangesetsInput(v *ListChangesetsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DatasetId == nil || len(*v.DatasetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member datasetId must not be empty")} + } + if v.DatasetId != nil { + if err := encoder.SetURI("datasetId").String(*v.DatasetId); err != nil { + return err + } + } + + if v.MaxResults != 0 { + encoder.SetQuery("maxResults").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListDatasets struct { +} + +func (*awsRestjson1_serializeOpListDatasets) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListDatasets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListDatasetsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/datasetsv2") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListDatasetsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListDatasetsInput(v *ListDatasetsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != 0 { + encoder.SetQuery("maxResults").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListDataViews struct { +} + +func (*awsRestjson1_serializeOpListDataViews) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListDataViews) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListDataViewsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/datasets/{datasetId}/dataviewsv2") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListDataViewsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListDataViewsInput(v *ListDataViewsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DatasetId == nil || len(*v.DatasetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member datasetId must not be empty")} + } + if v.DatasetId != nil { + if err := encoder.SetURI("datasetId").String(*v.DatasetId); err != nil { + return err + } + } + + if v.MaxResults != 0 { + encoder.SetQuery("maxResults").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpUpdateChangeset struct { +} + +func (*awsRestjson1_serializeOpUpdateChangeset) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateChangeset) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateChangesetInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/datasets/{datasetId}/changesetsv2/{changesetId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateChangesetInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateChangesetInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateChangesetInput(v *UpdateChangesetInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChangesetId == nil || len(*v.ChangesetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member changesetId must not be empty")} + } + if v.ChangesetId != nil { + if err := encoder.SetURI("changesetId").String(*v.ChangesetId); err != nil { + return err + } + } + + if v.DatasetId == nil || len(*v.DatasetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member datasetId must not be empty")} + } + if v.DatasetId != nil { + if err := encoder.SetURI("datasetId").String(*v.DatasetId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateChangesetInput(v *UpdateChangesetInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.FormatParams != nil { + ok := object.Key("formatParams") + if err := awsRestjson1_serializeDocumentFormatParams(v.FormatParams, ok); err != nil { + return err + } + } + + if v.SourceParams != nil { + ok := object.Key("sourceParams") + if err := awsRestjson1_serializeDocumentSourceParams(v.SourceParams, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUpdateDataset struct { +} + +func (*awsRestjson1_serializeOpUpdateDataset) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateDataset) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateDatasetInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/datasetsv2/{datasetId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateDatasetInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateDatasetInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateDatasetInput(v *UpdateDatasetInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DatasetId == nil || len(*v.DatasetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member datasetId must not be empty")} + } + if v.DatasetId != nil { + if err := encoder.SetURI("datasetId").String(*v.DatasetId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateDatasetInput(v *UpdateDatasetInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Alias != nil { + ok := object.Key("alias") + ok.String(*v.Alias) + } + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.DatasetDescription != nil { + ok := object.Key("datasetDescription") + ok.String(*v.DatasetDescription) + } + + if v.DatasetTitle != nil { + ok := object.Key("datasetTitle") + ok.String(*v.DatasetTitle) + } + + if len(v.Kind) > 0 { + ok := object.Key("kind") + ok.String(string(v.Kind)) + } + + if v.SchemaDefinition != nil { + ok := object.Key("schemaDefinition") + if err := awsRestjson1_serializeDocumentSchemaUnion(v.SchemaDefinition, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentColumnDefinition(v *types.ColumnDefinition, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ColumnDescription != nil { + ok := object.Key("columnDescription") + ok.String(*v.ColumnDescription) + } + + if v.ColumnName != nil { + ok := object.Key("columnName") + ok.String(*v.ColumnName) + } + + if len(v.DataType) > 0 { + ok := object.Key("dataType") + ok.String(string(v.DataType)) + } + + return nil +} + +func awsRestjson1_serializeDocumentColumnList(v []types.ColumnDefinition, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentColumnDefinition(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentColumnNameList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentDatasetOwnerInfo(v *types.DatasetOwnerInfo, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Email != nil { + ok := object.Key("email") + ok.String(*v.Email) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.PhoneNumber != nil { + ok := object.Key("phoneNumber") + ok.String(*v.PhoneNumber) + } + + return nil +} + +func awsRestjson1_serializeDocumentDataViewDestinationTypeParams(v *types.DataViewDestinationTypeParams, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DestinationType != nil { + ok := object.Key("destinationType") + ok.String(*v.DestinationType) + } + + return nil +} + +func awsRestjson1_serializeDocumentFormatParams(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + +func awsRestjson1_serializeDocumentPartitionColumnList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentPermissionGroupParams(v *types.PermissionGroupParams, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DatasetPermissions != nil { + ok := object.Key("datasetPermissions") + if err := awsRestjson1_serializeDocumentResourcePermissionsList(v.DatasetPermissions, ok); err != nil { + return err + } + } + + if v.PermissionGroupId != nil { + ok := object.Key("permissionGroupId") + ok.String(*v.PermissionGroupId) + } + + return nil +} + +func awsRestjson1_serializeDocumentResourcePermission(v *types.ResourcePermission, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Permission != nil { + ok := object.Key("permission") + ok.String(*v.Permission) + } + + return nil +} + +func awsRestjson1_serializeDocumentResourcePermissionsList(v []types.ResourcePermission, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentResourcePermission(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentSchemaDefinition(v *types.SchemaDefinition, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Columns != nil { + ok := object.Key("columns") + if err := awsRestjson1_serializeDocumentColumnList(v.Columns, ok); err != nil { + return err + } + } + + if v.PrimaryKeyColumns != nil { + ok := object.Key("primaryKeyColumns") + if err := awsRestjson1_serializeDocumentColumnNameList(v.PrimaryKeyColumns, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentSchemaUnion(v *types.SchemaUnion, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TabularSchemaConfig != nil { + ok := object.Key("tabularSchemaConfig") + if err := awsRestjson1_serializeDocumentSchemaDefinition(v.TabularSchemaConfig, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentSortColumnList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } return nil } -func awsRestjson1_serializeDocumentStringMap(v map[string]string, value smithyjson.Value) error { +func awsRestjson1_serializeDocumentSourceParams(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/finspacedata/types/enums.go b/service/finspacedata/types/enums.go index d3372dbe0f8..e1c49c2d73f 100644 --- a/service/finspacedata/types/enums.go +++ b/service/finspacedata/types/enums.go @@ -2,30 +2,6 @@ package types -type ChangesetStatus string - -// Enum values for ChangesetStatus -const ( - ChangesetStatusPending ChangesetStatus = "PENDING" - ChangesetStatusFailed ChangesetStatus = "FAILED" - ChangesetStatusSuccess ChangesetStatus = "SUCCESS" - ChangesetStatusRunning ChangesetStatus = "RUNNING" - ChangesetStatusStopRequested ChangesetStatus = "STOP_REQUESTED" -) - -// Values returns all known values for ChangesetStatus. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (ChangesetStatus) Values() []ChangesetStatus { - return []ChangesetStatus{ - "PENDING", - "FAILED", - "SUCCESS", - "RUNNING", - "STOP_REQUESTED", - } -} - type ChangeType string // Enum values for ChangeType @@ -46,18 +22,126 @@ func (ChangeType) Values() []ChangeType { } } +type ColumnDataType string + +// Enum values for ColumnDataType +const ( + ColumnDataTypeString ColumnDataType = "STRING" + ColumnDataTypeChar ColumnDataType = "CHAR" + ColumnDataTypeInteger ColumnDataType = "INTEGER" + ColumnDataTypeTinyint ColumnDataType = "TINYINT" + ColumnDataTypeSmallint ColumnDataType = "SMALLINT" + ColumnDataTypeBigint ColumnDataType = "BIGINT" + ColumnDataTypeFloat ColumnDataType = "FLOAT" + ColumnDataTypeDouble ColumnDataType = "DOUBLE" + ColumnDataTypeDate ColumnDataType = "DATE" + ColumnDataTypeDatetime ColumnDataType = "DATETIME" + ColumnDataTypeBoolean ColumnDataType = "BOOLEAN" + ColumnDataTypeBinary ColumnDataType = "BINARY" +) + +// Values returns all known values for ColumnDataType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ColumnDataType) Values() []ColumnDataType { + return []ColumnDataType{ + "STRING", + "CHAR", + "INTEGER", + "TINYINT", + "SMALLINT", + "BIGINT", + "FLOAT", + "DOUBLE", + "DATE", + "DATETIME", + "BOOLEAN", + "BINARY", + } +} + +type DatasetKind string + +// Enum values for DatasetKind +const ( + DatasetKindTabular DatasetKind = "TABULAR" + DatasetKindNonTabular DatasetKind = "NON_TABULAR" +) + +// Values returns all known values for DatasetKind. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (DatasetKind) Values() []DatasetKind { + return []DatasetKind{ + "TABULAR", + "NON_TABULAR", + } +} + +type DatasetStatus string + +// Enum values for DatasetStatus +const ( + DatasetStatusPending DatasetStatus = "PENDING" + DatasetStatusFailed DatasetStatus = "FAILED" + DatasetStatusSuccess DatasetStatus = "SUCCESS" + DatasetStatusRunning DatasetStatus = "RUNNING" +) + +// Values returns all known values for DatasetStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (DatasetStatus) Values() []DatasetStatus { + return []DatasetStatus{ + "PENDING", + "FAILED", + "SUCCESS", + "RUNNING", + } +} + +type DataViewStatus string + +// Enum values for DataViewStatus +const ( + DataViewStatusRunning DataViewStatus = "RUNNING" + DataViewStatusStarting DataViewStatus = "STARTING" + DataViewStatusFailed DataViewStatus = "FAILED" + DataViewStatusCancelled DataViewStatus = "CANCELLED" + DataViewStatusTimeout DataViewStatus = "TIMEOUT" + DataViewStatusSuccess DataViewStatus = "SUCCESS" + DataViewStatusPending DataViewStatus = "PENDING" + DataViewStatusFailedCleanupFailed DataViewStatus = "FAILED_CLEANUP_FAILED" +) + +// Values returns all known values for DataViewStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (DataViewStatus) Values() []DataViewStatus { + return []DataViewStatus{ + "RUNNING", + "STARTING", + "FAILED", + "CANCELLED", + "TIMEOUT", + "SUCCESS", + "PENDING", + "FAILED_CLEANUP_FAILED", + } +} + type ErrorCategory string // Enum values for ErrorCategory const ( - ErrorCategoryValidation ErrorCategory = "The_inputs_to_this_request_are_invalid" - ErrorCategoryServiceQuotaExceeded ErrorCategory = "Service_limits_have_been_exceeded" - ErrorCategoryAccessDenied ErrorCategory = "Missing_required_permission_to_perform_this_request" - ErrorCategoryResourceNotFound ErrorCategory = "One_or_more_inputs_to_this_request_were_not_found" - ErrorCategoryThrottling ErrorCategory = "The_system_temporarily_lacks_sufficient_resources_to_process_the_request" - ErrorCategoryInternalServiceException ErrorCategory = "An_internal_error_has_occurred" - ErrorCategoryCancelled ErrorCategory = "Cancelled" - ErrorCategoryUserRecoverable ErrorCategory = "A_user_recoverable_error_has_occurred" + ErrorCategoryValidation ErrorCategory = "VALIDATION" + ErrorCategoryServiceQuotaExceeded ErrorCategory = "SERVICE_QUOTA_EXCEEDED" + ErrorCategoryAccessDenied ErrorCategory = "ACCESS_DENIED" + ErrorCategoryResourceNotFound ErrorCategory = "RESOURCE_NOT_FOUND" + ErrorCategoryThrottling ErrorCategory = "THROTTLING" + ErrorCategoryInternalServiceException ErrorCategory = "INTERNAL_SERVICE_EXCEPTION" + ErrorCategoryCancelled ErrorCategory = "CANCELLED" + ErrorCategoryUserRecoverable ErrorCategory = "USER_RECOVERABLE" ) // Values returns all known values for ErrorCategory. Note that this can be @@ -65,36 +149,38 @@ const ( // ordering of this slice is not guaranteed to be stable across updates. func (ErrorCategory) Values() []ErrorCategory { return []ErrorCategory{ - "The_inputs_to_this_request_are_invalid", - "Service_limits_have_been_exceeded", - "Missing_required_permission_to_perform_this_request", - "One_or_more_inputs_to_this_request_were_not_found", - "The_system_temporarily_lacks_sufficient_resources_to_process_the_request", - "An_internal_error_has_occurred", - "Cancelled", - "A_user_recoverable_error_has_occurred", + "VALIDATION", + "SERVICE_QUOTA_EXCEEDED", + "ACCESS_DENIED", + "RESOURCE_NOT_FOUND", + "THROTTLING", + "INTERNAL_SERVICE_EXCEPTION", + "CANCELLED", + "USER_RECOVERABLE", } } -type FormatType string +type IngestionStatus string -// Enum values for FormatType +// Enum values for IngestionStatus const ( - FormatTypeCsv FormatType = "CSV" - FormatTypeJson FormatType = "JSON" - FormatTypeParquet FormatType = "PARQUET" - FormatTypeXml FormatType = "XML" + IngestionStatusPending IngestionStatus = "PENDING" + IngestionStatusFailed IngestionStatus = "FAILED" + IngestionStatusSuccess IngestionStatus = "SUCCESS" + IngestionStatusRunning IngestionStatus = "RUNNING" + IngestionStatusStopRequested IngestionStatus = "STOP_REQUESTED" ) -// Values returns all known values for FormatType. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (FormatType) Values() []FormatType { - return []FormatType{ - "CSV", - "JSON", - "PARQUET", - "XML", +// Values returns all known values for IngestionStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (IngestionStatus) Values() []IngestionStatus { + return []IngestionStatus{ + "PENDING", + "FAILED", + "SUCCESS", + "RUNNING", + "STOP_REQUESTED", } } @@ -115,19 +201,3 @@ func (LocationType) Values() []LocationType { "SAGEMAKER", } } - -type SourceType string - -// Enum values for SourceType -const ( - SourceTypeS3 SourceType = "S3" -) - -// Values returns all known values for SourceType. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (SourceType) Values() []SourceType { - return []SourceType{ - "S3", - } -} diff --git a/service/finspacedata/types/errors.go b/service/finspacedata/types/errors.go index 2a58ef64442..7acaeaf87c0 100644 --- a/service/finspacedata/types/errors.go +++ b/service/finspacedata/types/errors.go @@ -26,6 +26,25 @@ func (e *AccessDeniedException) ErrorMessage() string { func (e *AccessDeniedException) ErrorCode() string { return "AccessDeniedException" } func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The request conflicts with an existing resource. +type ConflictException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *ConflictException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ConflictException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ConflictException) ErrorCode() string { return "ConflictException" } +func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The request processing has failed because of an unknown error, exception or // failure. type InternalServerException struct { @@ -46,6 +65,25 @@ func (e *InternalServerException) ErrorMessage() string { func (e *InternalServerException) ErrorCode() string { return "InternalServerException" } func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } +// A limit has exceeded. +type LimitExceededException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *LimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *LimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *LimitExceededException) ErrorCode() string { return "LimitExceededException" } +func (e *LimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // One or more resources can't be found. type ResourceNotFoundException struct { Message *string diff --git a/service/finspacedata/types/types.go b/service/finspacedata/types/types.go index b927c63fb38..6c22b2e13df 100644 --- a/service/finspacedata/types/types.go +++ b/service/finspacedata/types/types.go @@ -4,72 +4,135 @@ package types import ( smithydocument "github.com/aws/smithy-go/document" - "time" ) -// A changeset is unit of data in a dataset. -type ChangesetInfo struct { +// The structure with error messages. +type ChangesetErrorInfo struct { - // Change type indicates how a changeset is applied to a dataset. + // The category of the error. + // + // * VALIDATION -The inputs to this request are + // invalid. + // + // * SERVICE_QUOTA_EXCEEDED - Service quotas have been exceeded. Please + // contact AWS support to increase quotas. + // + // * ACCESS_DENIED - Missing required + // permission to perform this request. + // + // * RESOURCE_NOT_FOUND - One or more inputs + // to this request were not found. + // + // * THROTTLING - The system temporarily lacks + // sufficient resources to process the request. + // + // * INTERNAL_SERVICE_EXCEPTION - An + // internal service error has occurred. + // + // * CANCELLED - Cancelled. + // + // * + // USER_RECOVERABLE - A user recoverable error has occurred. + ErrorCategory ErrorCategory + + // The text of the error message. + ErrorMessage *string + + noSmithyDocumentSerde +} + +// A Changeset is unit of data in a Dataset. +type ChangesetSummary struct { + + // Time until which the Changeset is active. The value is determined as Epoch time + // in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM + // UTC is specified as 1635768000000. + ActiveUntilTimestamp int64 + + // Type that indicates how a Changeset is applied to a Dataset. // // * REPLACE - - // Changeset is considered as a replacement to all prior loaded changesets. + // Changeset is considered as a replacement to all prior loaded Changesets. // // * // APPEND - Changeset is considered as an addition to the end of all prior loaded - // changesets. + // Changesets. // // * MODIFY - Changeset is considered as a replacement to a specific - // prior ingested changeset. + // prior ingested Changeset. ChangeType ChangeType - // The ARN identifier of the changeset. + // The ARN identifier of the Changeset. ChangesetArn *string - // Tags associated with the changeset. - ChangesetLabels map[string]string + // The unique identifier for a Changeset. + ChangesetId *string - // The timestamp at which the changeset was created in FinSpace. - CreateTimestamp *time.Time + // The timestamp at which the Changeset was created in FinSpace. The value is + // determined as Epoch time in milliseconds. For example, the value for Monday, + // November 1, 2021 12:00:00 PM UTC is specified as 1635768000000. + CreateTime int64 - // The unique identifier for the FinSpace dataset in which the changeset is + // The unique identifier for the FinSpace Dataset in which the Changeset is // created. DatasetId *string // The structure with error messages. - ErrorInfo *ErrorInfo + ErrorInfo *ChangesetErrorInfo - // Structure of the source file(s). + // Options that define the structure of the source file(s). FormatParams map[string]string - // Format type of the input files loaded into the changeset. - FormatType FormatType - - // Unique identifier for a changeset. - Id *string - - // Source path from which the files to create the changeset are sourced. + // Options that define the location of the data being ingested. SourceParams map[string]string - // Type of the data source from which the files to create the changeset are - // sourced. + // Status of the Changeset ingestion. // - // * S3 - Amazon S3. - SourceType SourceType - - // The status of changeset creation operation. - Status ChangesetStatus + // * PENDING - Changeset is pending + // creation. + // + // * FAILED - Changeset creation has failed. + // + // * SUCCESS - Changeset + // creation has succeeded. + // + // * RUNNING - Changeset creation is running. + // + // * + // STOP_REQUESTED - User requested Changeset creation to stop. + Status IngestionStatus - // Unique identifier of the changeset that is updated a changeset. + // The unique identifier of the updated Changeset. UpdatedByChangesetId *string - // Unique identifier of the changeset that is updated. + // The unique identifier of the Changeset that is updated. UpdatesChangesetId *string noSmithyDocumentSerde } -// Set short term API credentials. +// The definition of a column in a tabular Dataset. +type ColumnDefinition struct { + + // Description for a column. + ColumnDescription *string + + // Name for a column. + ColumnName *string + + // Data type of a column. + // + // * STRING - A String data type. CHAR - A char data type. + // INTEGER - An integer data type. TINYINT - A tinyint data type. SMALLINT - A + // smallint data type. BIGINT - A bigint data type. FLOAT - A float data type. + // DOUBLE - A double data type. DATE - A date data type. DATETIME - A datetime data + // type. BOOLEAN - A boolean data type. BINARY - A binary data type. + DataType ColumnDataType + + noSmithyDocumentSerde +} + +// Short term API credentials. type Credentials struct { // The access key identifier. @@ -84,8 +147,82 @@ type Credentials struct { noSmithyDocumentSerde } -// Error message. -type ErrorInfo struct { +// The structure for a Dataset. +type Dataset struct { + + // The unique resource identifier for a Dataset. + Alias *string + + // The timestamp at which the Dataset was created in FinSpace. The value is + // determined as Epoch time in milliseconds. For example, the value for Monday, + // November 1, 2021 12:00:00 PM UTC is specified as 1635768000000. + CreateTime int64 + + // The ARN identifier of the Dataset. + DatasetArn *string + + // Description for a Dataset. + DatasetDescription *string + + // An identifier for a Dataset. + DatasetId *string + + // Display title for a Dataset. + DatasetTitle *string + + // The format in which Dataset data is structured. + // + // * TABULAR - Data is structured + // in a tabular format. + // + // * NON_TABULAR - Data is structured in a non-tabular + // format. + Kind DatasetKind + + // The last time that the Dataset was modified. The value is determined as Epoch + // time in milliseconds. For example, the value for Monday, November 1, 2021 + // 12:00:00 PM UTC is specified as 1635768000000. + LastModifiedTime int64 + + // Contact information for a Dataset owner. + OwnerInfo *DatasetOwnerInfo + + // Definition for a schema on a tabular Dataset. + SchemaDefinition *SchemaUnion + + noSmithyDocumentSerde +} + +// A structure for Dataset owner info. +type DatasetOwnerInfo struct { + + // Email address for the Dataset owner. + Email *string + + // Name of the Dataset owner. + Name *string + + // Phone number for the Dataset owner. + PhoneNumber *string + + noSmithyDocumentSerde +} + +// Structure for the Dataview destination type parameters. +type DataViewDestinationTypeParams struct { + + // Destination type for a Dataview. + // + // * GLUE_TABLE - Glue table destination type. + // + // This member is required. + DestinationType *string + + noSmithyDocumentSerde +} + +// The structure with error messages. +type DataViewErrorInfo struct { // The category of the error. // @@ -107,8 +244,10 @@ type ErrorInfo struct { // * INTERNAL_SERVICE_EXCEPTION - An // internal service error has occurred. // - // * CANCELLED - A user recoverable error has - // occurred. + // * CANCELLED - Cancelled. + // + // * + // USER_RECOVERABLE - A user recoverable error has occurred. ErrorCategory ErrorCategory // The text of the error message. @@ -117,4 +256,115 @@ type ErrorInfo struct { noSmithyDocumentSerde } +// Structure for the summary of a Dataview. +type DataViewSummary struct { + + // Time range to use for the Dataview. The value is determined as Epoch time in + // milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM + // UTC is specified as 1635768000000. + AsOfTimestamp int64 + + // The flag to indicate Dataview should be updated automatically. + AutoUpdate bool + + // The timestamp at which the Dataview was created in FinSpace. The value is + // determined as Epoch time in milliseconds. For example, the value for Monday, + // November 1, 2021 12:00:00 PM UTC is specified as 1635768000000. + CreateTime int64 + + // The ARN identifier of the Dataview. + DataViewArn *string + + // The unique identifier for the Dataview. + DataViewId *string + + // Th unique identifier for the Dataview Dataset. + DatasetId *string + + // Information about the Dataview destination. + DestinationTypeProperties *DataViewDestinationTypeParams + + // The structure with error messages. + ErrorInfo *DataViewErrorInfo + + // The last time that a Dataview was modified. The value is determined as Epoch + // time in milliseconds. For example, the value for Monday, November 1, 2021 + // 12:00:00 PM UTC is specified as 1635768000000. + LastModifiedTime int64 + + // Ordered set of column names used to partition data. + PartitionColumns []string + + // Columns to be used for sorting the data. + SortColumns []string + + // The status of a Dataview creation. + // + // * RUNNING - Dataview creation is running. + // + // * + // STARTING - Dataview creation is starting. + // + // * FAILED - Dataview creation has + // failed. + // + // * CANCELLED - Dataview creation has been cancelled. + // + // * TIMEOUT - + // Dataview creation has timed out. + // + // * SUCCESS - Dataview creation has + // succeeded. + // + // * PENDING - Dataview creation is pending. + // + // * FAILED_CLEANUP_FAILED - + // Dataview creation failed and resource cleanup failed. + Status DataViewStatus + + noSmithyDocumentSerde +} + +// Permission group parameters for Dataset permissions. +type PermissionGroupParams struct { + + // List of resource permissions. + DatasetPermissions []ResourcePermission + + // The unique identifier of the PermissionGroup. + PermissionGroupId *string + + noSmithyDocumentSerde +} + +// Resource permission for a Dataset. +type ResourcePermission struct { + + // Permission for a resource. + Permission *string + + noSmithyDocumentSerde +} + +// Definition for a schema on a tabular Dataset. +type SchemaDefinition struct { + + // List of column definitions. + Columns []ColumnDefinition + + // List of column names used for primary key. + PrimaryKeyColumns []string + + noSmithyDocumentSerde +} + +// A union of schema types. +type SchemaUnion struct { + + // The configuration for a schema on a tabular Dataset. + TabularSchemaConfig *SchemaDefinition + + noSmithyDocumentSerde +} + type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/finspacedata/validators.go b/service/finspacedata/validators.go index 30c845d4562..e3229671b63 100644 --- a/service/finspacedata/validators.go +++ b/service/finspacedata/validators.go @@ -5,6 +5,7 @@ package finspacedata import ( "context" "fmt" + "github.com/aws/aws-sdk-go-v2/service/finspacedata/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" ) @@ -29,6 +30,126 @@ func (m *validateOpCreateChangeset) HandleInitialize(ctx context.Context, in mid return next.HandleInitialize(ctx, in) } +type validateOpCreateDataset struct { +} + +func (*validateOpCreateDataset) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateDataset) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateDatasetInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateDatasetInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateDataView struct { +} + +func (*validateOpCreateDataView) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateDataView) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateDataViewInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateDataViewInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteDataset struct { +} + +func (*validateOpDeleteDataset) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteDataset) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteDatasetInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteDatasetInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetChangeset struct { +} + +func (*validateOpGetChangeset) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetChangeset) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetChangesetInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetChangesetInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetDataset struct { +} + +func (*validateOpGetDataset) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetDataset) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetDatasetInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetDatasetInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetDataView struct { +} + +func (*validateOpGetDataView) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetDataView) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetDataViewInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetDataViewInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetProgrammaticAccessCredentials struct { } @@ -49,14 +170,149 @@ func (m *validateOpGetProgrammaticAccessCredentials) HandleInitialize(ctx contex return next.HandleInitialize(ctx, in) } +type validateOpListChangesets struct { +} + +func (*validateOpListChangesets) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListChangesets) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListChangesetsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListChangesetsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListDataViews struct { +} + +func (*validateOpListDataViews) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListDataViews) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListDataViewsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListDataViewsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateChangeset struct { +} + +func (*validateOpUpdateChangeset) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateChangeset) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateChangesetInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateChangesetInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateDataset struct { +} + +func (*validateOpUpdateDataset) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateDataset) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateDatasetInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateDatasetInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + func addOpCreateChangesetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateChangeset{}, middleware.After) } +func addOpCreateDatasetValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateDataset{}, middleware.After) +} + +func addOpCreateDataViewValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateDataView{}, middleware.After) +} + +func addOpDeleteDatasetValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteDataset{}, middleware.After) +} + +func addOpGetChangesetValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetChangeset{}, middleware.After) +} + +func addOpGetDatasetValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetDataset{}, middleware.After) +} + +func addOpGetDataViewValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetDataView{}, middleware.After) +} + func addOpGetProgrammaticAccessCredentialsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetProgrammaticAccessCredentials{}, middleware.After) } +func addOpListChangesetsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListChangesets{}, middleware.After) +} + +func addOpListDataViewsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListDataViews{}, middleware.After) +} + +func addOpUpdateChangesetValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateChangeset{}, middleware.After) +} + +func addOpUpdateDatasetValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateDataset{}, middleware.After) +} + +func validateDataViewDestinationTypeParams(v *types.DataViewDestinationTypeParams) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DataViewDestinationTypeParams"} + if v.DestinationType == nil { + invalidParams.Add(smithy.NewErrParamRequired("DestinationType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateChangesetInput(v *CreateChangesetInput) error { if v == nil { return nil @@ -68,12 +324,127 @@ func validateOpCreateChangesetInput(v *CreateChangesetInput) error { if len(v.ChangeType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("ChangeType")) } - if len(v.SourceType) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("SourceType")) - } if v.SourceParams == nil { invalidParams.Add(smithy.NewErrParamRequired("SourceParams")) } + if v.FormatParams == nil { + invalidParams.Add(smithy.NewErrParamRequired("FormatParams")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateDatasetInput(v *CreateDatasetInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateDatasetInput"} + if v.DatasetTitle == nil { + invalidParams.Add(smithy.NewErrParamRequired("DatasetTitle")) + } + if len(v.Kind) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Kind")) + } + if v.DatasetDescription == nil { + invalidParams.Add(smithy.NewErrParamRequired("DatasetDescription")) + } + if v.PermissionGroupParams == nil { + invalidParams.Add(smithy.NewErrParamRequired("PermissionGroupParams")) + } + if v.Alias == nil { + invalidParams.Add(smithy.NewErrParamRequired("Alias")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateDataViewInput(v *CreateDataViewInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateDataViewInput"} + if v.DatasetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DatasetId")) + } + if v.DestinationTypeParams == nil { + invalidParams.Add(smithy.NewErrParamRequired("DestinationTypeParams")) + } else if v.DestinationTypeParams != nil { + if err := validateDataViewDestinationTypeParams(v.DestinationTypeParams); err != nil { + invalidParams.AddNested("DestinationTypeParams", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteDatasetInput(v *DeleteDatasetInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteDatasetInput"} + if v.DatasetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DatasetId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetChangesetInput(v *GetChangesetInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetChangesetInput"} + if v.DatasetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DatasetId")) + } + if v.ChangesetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChangesetId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetDatasetInput(v *GetDatasetInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetDatasetInput"} + if v.DatasetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DatasetId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetDataViewInput(v *GetDataViewInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetDataViewInput"} + if v.DataViewId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DataViewId")) + } + if v.DatasetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DatasetId")) + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -95,3 +466,81 @@ func validateOpGetProgrammaticAccessCredentialsInput(v *GetProgrammaticAccessCre return nil } } + +func validateOpListChangesetsInput(v *ListChangesetsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListChangesetsInput"} + if v.DatasetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DatasetId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListDataViewsInput(v *ListDataViewsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListDataViewsInput"} + if v.DatasetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DatasetId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateChangesetInput(v *UpdateChangesetInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateChangesetInput"} + if v.DatasetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DatasetId")) + } + if v.ChangesetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChangesetId")) + } + if v.SourceParams == nil { + invalidParams.Add(smithy.NewErrParamRequired("SourceParams")) + } + if v.FormatParams == nil { + invalidParams.Add(smithy.NewErrParamRequired("FormatParams")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateDatasetInput(v *UpdateDatasetInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateDatasetInput"} + if v.DatasetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DatasetId")) + } + if v.DatasetTitle == nil { + invalidParams.Add(smithy.NewErrParamRequired("DatasetTitle")) + } + if len(v.Kind) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Kind")) + } + if v.Alias == nil { + invalidParams.Add(smithy.NewErrParamRequired("Alias")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/imagebuilder/api_op_DeleteImage.go b/service/imagebuilder/api_op_DeleteImage.go index c0056445293..4a7589910a2 100644 --- a/service/imagebuilder/api_op_DeleteImage.go +++ b/service/imagebuilder/api_op_DeleteImage.go @@ -27,8 +27,8 @@ import ( // // * To delete a container image from Amazon ECR, // see Deleting an image -// (https://docs.aws.amazon.com/https:/docs.aws.amazon.comAmazonECR/latest/userguide/delete_image.html) -// in the Amazon ECR User Guide. +// (https://docs.aws.amazon.com/AmazonECR/latest/userguide/delete_image.html) in +// the Amazon ECR User Guide. func (c *Client) DeleteImage(ctx context.Context, params *DeleteImageInput, optFns ...func(*Options)) (*DeleteImageOutput, error) { if params == nil { params = &DeleteImageInput{} diff --git a/service/imagebuilder/api_op_PutContainerRecipePolicy.go b/service/imagebuilder/api_op_PutContainerRecipePolicy.go index d06cc146afd..a5021ba55d7 100644 --- a/service/imagebuilder/api_op_PutContainerRecipePolicy.go +++ b/service/imagebuilder/api_op_PutContainerRecipePolicy.go @@ -12,10 +12,10 @@ import ( // Applies a policy to a container image. We recommend that you call the RAM API // CreateResourceShare -// (https://docs.aws.amazon.com/ram/latest/APIReference/API_CreateResourceShare.html) +// (https://docs.aws.amazon.com//ram/latest/APIReference/API_CreateResourceShare.html) // to share resources. If you call the Image Builder API PutContainerImagePolicy, // you must also call the RAM API PromoteResourceShareCreatedFromPolicy -// (https://docs.aws.amazon.com/ram/latest/APIReference/API_PromoteResourceShareCreatedFromPolicy.html) +// (https://docs.aws.amazon.com//ram/latest/APIReference/API_PromoteResourceShareCreatedFromPolicy.html) // in order for the resource to be visible to all principals with whom the resource // is shared. func (c *Client) PutContainerRecipePolicy(ctx context.Context, params *PutContainerRecipePolicyInput, optFns ...func(*Options)) (*PutContainerRecipePolicyOutput, error) { diff --git a/service/imagebuilder/deserializers.go b/service/imagebuilder/deserializers.go index 9058e31b4d0..fab8a979df6 100644 --- a/service/imagebuilder/deserializers.go +++ b/service/imagebuilder/deserializers.go @@ -13353,6 +13353,16 @@ func awsRestjson1_deserializeDocumentLaunchPermissionConfiguration(v **types.Lau for key, value := range shape { switch key { + case "organizationalUnitArns": + if err := awsRestjson1_deserializeDocumentOrganizationalUnitArnList(&sv.OrganizationalUnitArns, value); err != nil { + return err + } + + case "organizationArns": + if err := awsRestjson1_deserializeDocumentOrganizationArnList(&sv.OrganizationArns, value); err != nil { + return err + } + case "userGroups": if err := awsRestjson1_deserializeDocumentStringList(&sv.UserGroups, value); err != nil { return err @@ -13536,6 +13546,78 @@ func awsRestjson1_deserializeDocumentLogging(v **types.Logging, value interface{ return nil } +func awsRestjson1_deserializeDocumentOrganizationalUnitArnList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OrganizationalUnitArn to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentOrganizationArnList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OrganizationArn to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentOsVersionList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/imagebuilder/serializers.go b/service/imagebuilder/serializers.go index 71ccb2d629d..379dbc08451 100644 --- a/service/imagebuilder/serializers.go +++ b/service/imagebuilder/serializers.go @@ -4296,6 +4296,20 @@ func awsRestjson1_serializeDocumentLaunchPermissionConfiguration(v *types.Launch object := value.Object() defer object.Close() + if v.OrganizationalUnitArns != nil { + ok := object.Key("organizationalUnitArns") + if err := awsRestjson1_serializeDocumentOrganizationalUnitArnList(v.OrganizationalUnitArns, ok); err != nil { + return err + } + } + + if v.OrganizationArns != nil { + ok := object.Key("organizationArns") + if err := awsRestjson1_serializeDocumentOrganizationArnList(v.OrganizationArns, ok); err != nil { + return err + } + } + if v.UserGroups != nil { ok := object.Key("userGroups") if err := awsRestjson1_serializeDocumentStringList(v.UserGroups, ok); err != nil { @@ -4373,6 +4387,28 @@ func awsRestjson1_serializeDocumentLogging(v *types.Logging, value smithyjson.Va return nil } +func awsRestjson1_serializeDocumentOrganizationalUnitArnList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentOrganizationArnList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsRestjson1_serializeDocumentOsVersionList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() diff --git a/service/imagebuilder/types/types.go b/service/imagebuilder/types/types.go index aee9e62d08c..374960b8377 100644 --- a/service/imagebuilder/types/types.go +++ b/service/imagebuilder/types/types.go @@ -58,8 +58,8 @@ type AmiDistributionConfiguration struct { // The tags to apply to AMIs distributed to this Region. AmiTags map[string]string - // The description of the distribution configuration. Minimum and maximum length - // are in characters. + // The description of the AMI distribution configuration. Minimum and maximum + // length are in characters. Description *string // The KMS key identifier used to encrypt the distributed image. @@ -1111,6 +1111,17 @@ type InstanceMetadataOptions struct { // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyImageAttribute.html). type LaunchPermissionConfiguration struct { + // The ARN for an Amazon Web Services Organization that you want to share your AMI + // with. For more information, see What is Organizations? + // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html). + OrganizationArns []string + + // The ARN for an Organizations organizational unit (OU) that you want to share + // your AMI with. For more information about key concepts for Organizations, see + // Organizations terminology and concepts + // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html). + OrganizationalUnitArns []string + // The name of the group. UserGroups []string diff --git a/service/inspector2/LICENSE.txt b/service/inspector2/LICENSE.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/service/inspector2/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/service/inspector2/api_client.go b/service/inspector2/api_client.go new file mode 100644 index 00000000000..c97dddabc09 --- /dev/null +++ b/service/inspector2/api_client.go @@ -0,0 +1,316 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + cryptorand "crypto/rand" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/retry" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" + smithy "github.com/aws/smithy-go" + smithydocument "github.com/aws/smithy-go/document" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/middleware" + smithyrand "github.com/aws/smithy-go/rand" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/http" + "time" +) + +const ServiceID = "Inspector2" +const ServiceAPIVersion = "2020-06-08" + +// Client provides the API client to make operations call for Inspector2. +type Client struct { + options Options +} + +// New returns an initialized Client based on the functional options. Provide +// additional functional options to further configure the behavior of the client, +// such as changing the client's endpoint or adding custom middleware behavior. +func New(options Options, optFns ...func(*Options)) *Client { + options = options.Copy() + + resolveDefaultLogger(&options) + + resolveRetryer(&options) + + resolveHTTPClient(&options) + + resolveHTTPSignerV4(&options) + + resolveDefaultEndpointConfiguration(&options) + + resolveIdempotencyTokenProvider(&options) + + for _, fn := range optFns { + fn(&options) + } + + client := &Client{ + options: options, + } + + return client +} + +type Options struct { + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + APIOptions []func(*middleware.Stack) error + + // Configures the events that will be sent to the configured logger. + ClientLogMode aws.ClientLogMode + + // The credentials object to use when signing requests. + Credentials aws.CredentialsProvider + + // The endpoint options to be used when attempting to resolve an endpoint. + EndpointOptions EndpointResolverOptions + + // The service endpoint resolver. + EndpointResolver EndpointResolver + + // Signature Version 4 (SigV4) Signer + HTTPSignerV4 HTTPSignerV4 + + // Provides idempotency tokens values that will be automatically populated into + // idempotent API operations. + IdempotencyTokenProvider IdempotencyTokenProvider + + // The logger writer interface to write logging messages to. + Logger logging.Logger + + // The region to send requests to. (Required) + Region string + + // Retryer guides how HTTP requests should be retried in case of recoverable + // failures. When nil the API client will use a default retryer. + Retryer aws.Retryer + + // The HTTP client to invoke API calls with. Defaults to client's default HTTP + // implementation if nil. + HTTPClient HTTPClient +} + +// WithAPIOptions returns a functional option for setting the Client's APIOptions +// option. +func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { + return func(o *Options) { + o.APIOptions = append(o.APIOptions, optFns...) + } +} + +// WithEndpointResolver returns a functional option for setting the Client's +// EndpointResolver option. +func WithEndpointResolver(v EndpointResolver) func(*Options) { + return func(o *Options) { + o.EndpointResolver = v + } +} + +type HTTPClient interface { + Do(*http.Request) (*http.Response, error) +} + +// Copy creates a clone where the APIOptions list is deep copied. +func (o Options) Copy() Options { + to := o + to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) + copy(to.APIOptions, o.APIOptions) + return to +} +func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { + ctx = middleware.ClearStackValues(ctx) + stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) + options := c.options.Copy() + for _, fn := range optFns { + fn(&options) + } + + finalizeClientEndpointResolverOptions(&options) + + for _, fn := range stackFns { + if err := fn(stack, options); err != nil { + return nil, metadata, err + } + } + + for _, fn := range options.APIOptions { + if err := fn(stack); err != nil { + return nil, metadata, err + } + } + + handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) + result, metadata, err = handler.Handle(ctx, params) + if err != nil { + err = &smithy.OperationError{ + ServiceID: ServiceID, + OperationName: opID, + Err: err, + } + } + return result, metadata, err +} + +type noSmithyDocumentSerde = smithydocument.NoSerde + +func resolveDefaultLogger(o *Options) { + if o.Logger != nil { + return + } + o.Logger = logging.Nop{} +} + +func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { + return middleware.AddSetLoggerMiddleware(stack, o.Logger) +} + +// NewFromConfig returns a new client from the provided config. +func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { + opts := Options{ + Region: cfg.Region, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + } + resolveAWSRetryerProvider(cfg, &opts) + resolveAWSEndpointResolver(cfg, &opts) + resolveUseDualStackEndpoint(cfg, &opts) + resolveUseFIPSEndpoint(cfg, &opts) + return New(opts, optFns...) +} + +func resolveHTTPClient(o *Options) { + if o.HTTPClient != nil { + return + } + o.HTTPClient = awshttp.NewBuildableClient() +} + +func resolveRetryer(o *Options) { + if o.Retryer != nil { + return + } + o.Retryer = retry.NewStandard() +} + +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + +func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { + if cfg.EndpointResolver == nil { + return + } + o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver()) +} + +func addClientUserAgent(stack *middleware.Stack) error { + return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "inspector2", goModuleVersion)(stack) +} + +func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error { + mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{ + CredentialsProvider: o.Credentials, + Signer: o.HTTPSignerV4, + LogSigning: o.ClientLogMode.IsSigning(), + }) + return stack.Finalize.Add(mw, middleware.After) +} + +type HTTPSignerV4 interface { + SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error +} + +func resolveHTTPSignerV4(o *Options) { + if o.HTTPSignerV4 != nil { + return + } + o.HTTPSignerV4 = newDefaultV4Signer(*o) +} + +func newDefaultV4Signer(o Options) *v4.Signer { + return v4.NewSigner(func(so *v4.SignerOptions) { + so.Logger = o.Logger + so.LogSigning = o.ClientLogMode.IsSigning() + }) +} + +func resolveIdempotencyTokenProvider(o *Options) { + if o.IdempotencyTokenProvider != nil { + return + } + o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) +} + +func addRetryMiddlewares(stack *middleware.Stack, o Options) error { + mo := retry.AddRetryMiddlewaresOptions{ + Retryer: o.Retryer, + LogRetryAttempts: o.ClientLogMode.IsRetries(), + } + return retry.AddRetryMiddlewares(stack, mo) +} + +// resolves dual-stack endpoint configuration +func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseDualStackEndpoint = value + } + return nil +} + +// resolves FIPS endpoint configuration +func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseFIPSEndpoint = value + } + return nil +} + +// IdempotencyTokenProvider interface for providing idempotency token +type IdempotencyTokenProvider interface { + GetIdempotencyToken() (string, error) +} + +func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { + return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) +} + +func addResponseErrorMiddleware(stack *middleware.Stack) error { + return awshttp.AddResponseErrorMiddleware(stack) +} + +func addRequestResponseLogging(stack *middleware.Stack, o Options) error { + return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ + LogRequest: o.ClientLogMode.IsRequest(), + LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), + LogResponse: o.ClientLogMode.IsResponse(), + LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), + }, middleware.After) +} diff --git a/service/inspector2/api_op_AssociateMember.go b/service/inspector2/api_op_AssociateMember.go new file mode 100644 index 00000000000..031da0b0e61 --- /dev/null +++ b/service/inspector2/api_op_AssociateMember.go @@ -0,0 +1,124 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Associates an Amazon Web Services account with an Amazon Inspector delegated +// administrator. +func (c *Client) AssociateMember(ctx context.Context, params *AssociateMemberInput, optFns ...func(*Options)) (*AssociateMemberOutput, error) { + if params == nil { + params = &AssociateMemberInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AssociateMember", params, optFns, c.addOperationAssociateMemberMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AssociateMemberOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AssociateMemberInput struct { + + // The Amazon Web Services account ID of the member account to be associated. + // + // This member is required. + AccountId *string + + noSmithyDocumentSerde +} + +type AssociateMemberOutput struct { + + // The Amazon Web Services account ID of the successfully associated member + // account. + // + // This member is required. + AccountId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAssociateMemberMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpAssociateMember{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAssociateMember{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpAssociateMemberValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateMember(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opAssociateMember(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "AssociateMember", + } +} diff --git a/service/inspector2/api_op_BatchGetAccountStatus.go b/service/inspector2/api_op_BatchGetAccountStatus.go new file mode 100644 index 00000000000..d52264a47e4 --- /dev/null +++ b/service/inspector2/api_op_BatchGetAccountStatus.go @@ -0,0 +1,125 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/inspector2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the Amazon Inspector status of multiple Amazon Web Services accounts +// within your environment. +func (c *Client) BatchGetAccountStatus(ctx context.Context, params *BatchGetAccountStatusInput, optFns ...func(*Options)) (*BatchGetAccountStatusOutput, error) { + if params == nil { + params = &BatchGetAccountStatusInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchGetAccountStatus", params, optFns, c.addOperationBatchGetAccountStatusMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchGetAccountStatusOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchGetAccountStatusInput struct { + + // The 12-digit Amazon Web Services account IDs of the accounts to retrieve Amazon + // Inspector status for. + AccountIds []string + + noSmithyDocumentSerde +} + +type BatchGetAccountStatusOutput struct { + + // An array of objects that provide details on the status of Amazon Inspector for + // each of the requested accounts. + // + // This member is required. + Accounts []types.AccountState + + // An array of objects detailing any accounts that failed to enable Amazon + // Inspector and why. + FailedAccounts []types.FailedAccount + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchGetAccountStatusMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpBatchGetAccountStatus{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpBatchGetAccountStatus{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetAccountStatus(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opBatchGetAccountStatus(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "BatchGetAccountStatus", + } +} diff --git a/service/inspector2/api_op_BatchGetFreeTrialInfo.go b/service/inspector2/api_op_BatchGetFreeTrialInfo.go new file mode 100644 index 00000000000..98ae8a0162f --- /dev/null +++ b/service/inspector2/api_op_BatchGetFreeTrialInfo.go @@ -0,0 +1,130 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/inspector2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets free trial status for multiple Amazon Web Services accounts. +func (c *Client) BatchGetFreeTrialInfo(ctx context.Context, params *BatchGetFreeTrialInfoInput, optFns ...func(*Options)) (*BatchGetFreeTrialInfoOutput, error) { + if params == nil { + params = &BatchGetFreeTrialInfoInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchGetFreeTrialInfo", params, optFns, c.addOperationBatchGetFreeTrialInfoMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchGetFreeTrialInfoOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchGetFreeTrialInfoInput struct { + + // The account IDs to get free trial status for. + // + // This member is required. + AccountIds []string + + noSmithyDocumentSerde +} + +type BatchGetFreeTrialInfoOutput struct { + + // An array of objects that provide Amazon Inspector free trial details for each of + // the requested accounts. + // + // This member is required. + Accounts []types.FreeTrialAccountInfo + + // An array of objects detailing any accounts that free trial data could not be + // returned for. + // + // This member is required. + FailedAccounts []types.FreeTrialInfoError + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchGetFreeTrialInfoMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpBatchGetFreeTrialInfo{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpBatchGetFreeTrialInfo{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpBatchGetFreeTrialInfoValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetFreeTrialInfo(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opBatchGetFreeTrialInfo(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "BatchGetFreeTrialInfo", + } +} diff --git a/service/lambda/api_op_GetFunctionUrlConfig.go b/service/inspector2/api_op_CancelFindingsReport.go similarity index 60% rename from service/lambda/api_op_GetFunctionUrlConfig.go rename to service/inspector2/api_op_CancelFindingsReport.go index 586318ded4c..2d454f8d888 100644 --- a/service/lambda/api_op_GetFunctionUrlConfig.go +++ b/service/inspector2/api_op_CancelFindingsReport.go @@ -1,59 +1,47 @@ // Code generated by smithy-go-codegen DO NOT EDIT. -package lambda +package inspector2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" - "github.com/aws/aws-sdk-go-v2/service/lambda/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -func (c *Client) GetFunctionUrlConfig(ctx context.Context, params *GetFunctionUrlConfigInput, optFns ...func(*Options)) (*GetFunctionUrlConfigOutput, error) { +// Cancels the given findings report. +func (c *Client) CancelFindingsReport(ctx context.Context, params *CancelFindingsReportInput, optFns ...func(*Options)) (*CancelFindingsReportOutput, error) { if params == nil { - params = &GetFunctionUrlConfigInput{} + params = &CancelFindingsReportInput{} } - result, metadata, err := c.invokeOperation(ctx, "GetFunctionUrlConfig", params, optFns, c.addOperationGetFunctionUrlConfigMiddlewares) + result, metadata, err := c.invokeOperation(ctx, "CancelFindingsReport", params, optFns, c.addOperationCancelFindingsReportMiddlewares) if err != nil { return nil, err } - out := result.(*GetFunctionUrlConfigOutput) + out := result.(*CancelFindingsReportOutput) out.ResultMetadata = metadata return out, nil } -type GetFunctionUrlConfigInput struct { +type CancelFindingsReportInput struct { + // The ID of the report to be canceled. + // // This member is required. - FunctionName *string - - Qualifier *string + ReportId *string noSmithyDocumentSerde } -type GetFunctionUrlConfigOutput struct { - - // This member is required. - AuthorizationType types.AuthorizationType - - // This member is required. - CreationTime *string - - // This member is required. - FunctionArn *string +type CancelFindingsReportOutput struct { + // The ID of the canceled report. + // // This member is required. - FunctionUrl *string - - // This member is required. - LastModifiedTime *string - - Cors *types.Cors + ReportId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata @@ -61,12 +49,12 @@ type GetFunctionUrlConfigOutput struct { noSmithyDocumentSerde } -func (c *Client) addOperationGetFunctionUrlConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetFunctionUrlConfig{}, middleware.After) +func (c *Client) addOperationCancelFindingsReportMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCancelFindingsReport{}, middleware.After) if err != nil { return err } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetFunctionUrlConfig{}, middleware.After) + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCancelFindingsReport{}, middleware.After) if err != nil { return err } @@ -106,10 +94,10 @@ func (c *Client) addOperationGetFunctionUrlConfigMiddlewares(stack *middleware.S if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addOpGetFunctionUrlConfigValidationMiddleware(stack); err != nil { + if err = addOpCancelFindingsReportValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFunctionUrlConfig(options.Region), middleware.Before); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelFindingsReport(options.Region), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -124,11 +112,11 @@ func (c *Client) addOperationGetFunctionUrlConfigMiddlewares(stack *middleware.S return nil } -func newServiceMetadataMiddleware_opGetFunctionUrlConfig(region string) *awsmiddleware.RegisterServiceMetadata { +func newServiceMetadataMiddleware_opCancelFindingsReport(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, - SigningName: "lambda", - OperationName: "GetFunctionUrlConfig", + SigningName: "inspector2", + OperationName: "CancelFindingsReport", } } diff --git a/service/inspector2/api_op_CreateFilter.go b/service/inspector2/api_op_CreateFilter.go new file mode 100644 index 00000000000..ce246df5955 --- /dev/null +++ b/service/inspector2/api_op_CreateFilter.go @@ -0,0 +1,141 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/inspector2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a filter resource using specified filter criteria. +func (c *Client) CreateFilter(ctx context.Context, params *CreateFilterInput, optFns ...func(*Options)) (*CreateFilterOutput, error) { + if params == nil { + params = &CreateFilterInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateFilter", params, optFns, c.addOperationCreateFilterMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateFilterOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateFilterInput struct { + + // Defines the action that is to be applied to the findings that match the filter. + // + // This member is required. + Action types.FilterAction + + // Defines the criteria to be used in the filter for querying findings. + // + // This member is required. + FilterCriteria *types.FilterCriteria + + // The name of the filter. Minimum length of 3. Maximum length of 64. Valid + // characters include alphanumeric characters, dot (.), underscore (_), and dash + // (-). Spaces are not allowed. + // + // This member is required. + Name *string + + // A description of the filter. + Description *string + + // A list of tags for the filter. + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateFilterOutput struct { + + // The Amazon Resource Number (ARN) of the successfully created filter. + // + // This member is required. + Arn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateFilterMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateFilter{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateFilter{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateFilterValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateFilter(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateFilter(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "CreateFilter", + } +} diff --git a/service/inspector2/api_op_CreateFindingsReport.go b/service/inspector2/api_op_CreateFindingsReport.go new file mode 100644 index 00000000000..29c15d9cf3e --- /dev/null +++ b/service/inspector2/api_op_CreateFindingsReport.go @@ -0,0 +1,129 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/inspector2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a finding report. +func (c *Client) CreateFindingsReport(ctx context.Context, params *CreateFindingsReportInput, optFns ...func(*Options)) (*CreateFindingsReportOutput, error) { + if params == nil { + params = &CreateFindingsReportInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateFindingsReport", params, optFns, c.addOperationCreateFindingsReportMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateFindingsReportOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateFindingsReportInput struct { + + // The format to generate the report in. + // + // This member is required. + ReportFormat types.ReportFormat + + // The Amazon S3 export destination for the report. + // + // This member is required. + S3Destination *types.Destination + + // The filter criteria to apply to the results of the finding report. + FilterCriteria *types.FilterCriteria + + noSmithyDocumentSerde +} + +type CreateFindingsReportOutput struct { + + // The ID of the report. + ReportId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateFindingsReportMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateFindingsReport{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateFindingsReport{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateFindingsReportValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateFindingsReport(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateFindingsReport(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "CreateFindingsReport", + } +} diff --git a/service/inspector2/api_op_DeleteFilter.go b/service/inspector2/api_op_DeleteFilter.go new file mode 100644 index 00000000000..43ea1f82cd9 --- /dev/null +++ b/service/inspector2/api_op_DeleteFilter.go @@ -0,0 +1,122 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a filter resource. +func (c *Client) DeleteFilter(ctx context.Context, params *DeleteFilterInput, optFns ...func(*Options)) (*DeleteFilterOutput, error) { + if params == nil { + params = &DeleteFilterInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteFilter", params, optFns, c.addOperationDeleteFilterMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteFilterOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteFilterInput struct { + + // The Amazon Resource Number (ARN) of the filter to be deleted. + // + // This member is required. + Arn *string + + noSmithyDocumentSerde +} + +type DeleteFilterOutput struct { + + // The Amazon Resource Number (ARN) of the filter that has been deleted. + // + // This member is required. + Arn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteFilterMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteFilter{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteFilter{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteFilterValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteFilter(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteFilter(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "DeleteFilter", + } +} diff --git a/service/inspector2/api_op_DescribeOrganizationConfiguration.go b/service/inspector2/api_op_DescribeOrganizationConfiguration.go new file mode 100644 index 00000000000..9d4d8d17089 --- /dev/null +++ b/service/inspector2/api_op_DescribeOrganizationConfiguration.go @@ -0,0 +1,117 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/inspector2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Describe Amazon Inspector configuration settings for an Amazon Web Services +// organization +func (c *Client) DescribeOrganizationConfiguration(ctx context.Context, params *DescribeOrganizationConfigurationInput, optFns ...func(*Options)) (*DescribeOrganizationConfigurationOutput, error) { + if params == nil { + params = &DescribeOrganizationConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeOrganizationConfiguration", params, optFns, c.addOperationDescribeOrganizationConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeOrganizationConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeOrganizationConfigurationInput struct { + noSmithyDocumentSerde +} + +type DescribeOrganizationConfigurationOutput struct { + + // The scan types are automatically enabled for new members of your organization. + AutoEnable *types.AutoEnable + + // Represents whether your organization has reached the maximum Amazon Web Services + // account limit for Amazon Inspector. + MaxAccountLimitReached *bool + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeOrganizationConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeOrganizationConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeOrganizationConfiguration{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOrganizationConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeOrganizationConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "DescribeOrganizationConfiguration", + } +} diff --git a/service/inspector2/api_op_Disable.go b/service/inspector2/api_op_Disable.go new file mode 100644 index 00000000000..98af0ba6d59 --- /dev/null +++ b/service/inspector2/api_op_Disable.go @@ -0,0 +1,127 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/inspector2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Disables Amazon Inspector scans for one or more Amazon Web Services accounts. +// Disabling all scan types in an account disables the Amazon Inspector service. +func (c *Client) Disable(ctx context.Context, params *DisableInput, optFns ...func(*Options)) (*DisableOutput, error) { + if params == nil { + params = &DisableInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "Disable", params, optFns, c.addOperationDisableMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DisableOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DisableInput struct { + + // An array of account IDs you want to disable Amazon Inspector scans for. + AccountIds []string + + // The resource scan types you want to disable. + ResourceTypes []types.ResourceScanType + + noSmithyDocumentSerde +} + +type DisableOutput struct { + + // Information on the accounts that have had Amazon Inspector scans successfully + // disabled. Details are provided for each account. + // + // This member is required. + Accounts []types.Account + + // Information on any accounts for which Amazon Inspector scans could not be + // disabled. Details are provided for each account. + FailedAccounts []types.FailedAccount + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDisableMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDisable{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDisable{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisable(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDisable(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "Disable", + } +} diff --git a/service/inspector2/api_op_DisableDelegatedAdminAccount.go b/service/inspector2/api_op_DisableDelegatedAdminAccount.go new file mode 100644 index 00000000000..4b3562bb5ce --- /dev/null +++ b/service/inspector2/api_op_DisableDelegatedAdminAccount.go @@ -0,0 +1,124 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Disables the Amazon Inspector delegated administrator for your organization. +func (c *Client) DisableDelegatedAdminAccount(ctx context.Context, params *DisableDelegatedAdminAccountInput, optFns ...func(*Options)) (*DisableDelegatedAdminAccountOutput, error) { + if params == nil { + params = &DisableDelegatedAdminAccountInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DisableDelegatedAdminAccount", params, optFns, c.addOperationDisableDelegatedAdminAccountMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DisableDelegatedAdminAccountOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DisableDelegatedAdminAccountInput struct { + + // The Amazon Web Services account ID of the current Amazon Inspector delegated + // administrator. + // + // This member is required. + DelegatedAdminAccountId *string + + noSmithyDocumentSerde +} + +type DisableDelegatedAdminAccountOutput struct { + + // The Amazon Web Services account ID of the successfully disabled delegated + // administrator. + // + // This member is required. + DelegatedAdminAccountId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDisableDelegatedAdminAccountMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDisableDelegatedAdminAccount{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDisableDelegatedAdminAccount{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDisableDelegatedAdminAccountValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableDelegatedAdminAccount(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDisableDelegatedAdminAccount(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "DisableDelegatedAdminAccount", + } +} diff --git a/service/inspector2/api_op_DisassociateMember.go b/service/inspector2/api_op_DisassociateMember.go new file mode 100644 index 00000000000..893b518abb6 --- /dev/null +++ b/service/inspector2/api_op_DisassociateMember.go @@ -0,0 +1,122 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Disassociates a member account from an Amazon Inspector delegated administrator. +func (c *Client) DisassociateMember(ctx context.Context, params *DisassociateMemberInput, optFns ...func(*Options)) (*DisassociateMemberOutput, error) { + if params == nil { + params = &DisassociateMemberInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DisassociateMember", params, optFns, c.addOperationDisassociateMemberMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DisassociateMemberOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DisassociateMemberInput struct { + + // The Amazon Web Services account ID of the member account to disassociate. + // + // This member is required. + AccountId *string + + noSmithyDocumentSerde +} + +type DisassociateMemberOutput struct { + + // The Amazon Web Services account ID of the successfully disassociated member. + // + // This member is required. + AccountId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDisassociateMemberMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDisassociateMember{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDisassociateMember{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDisassociateMemberValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateMember(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDisassociateMember(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "DisassociateMember", + } +} diff --git a/service/inspector2/api_op_Enable.go b/service/inspector2/api_op_Enable.go new file mode 100644 index 00000000000..14d58121694 --- /dev/null +++ b/service/inspector2/api_op_Enable.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/inspector2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Enables Amazon Inspector scans for one or more Amazon Web Services accounts. +func (c *Client) Enable(ctx context.Context, params *EnableInput, optFns ...func(*Options)) (*EnableOutput, error) { + if params == nil { + params = &EnableInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "Enable", params, optFns, c.addOperationEnableMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*EnableOutput) + out.ResultMetadata = metadata + return out, nil +} + +type EnableInput struct { + + // The resource scan types you want to enable. + // + // This member is required. + ResourceTypes []types.ResourceScanType + + // A list of account IDs you want to enable Amazon Inspector scans for. + AccountIds []string + + // The idempotency token for the request. + ClientToken *string + + noSmithyDocumentSerde +} + +type EnableOutput struct { + + // Information on the accounts that have had Amazon Inspector scans successfully + // enabled. Details are provided for each account. + // + // This member is required. + Accounts []types.Account + + // Information on any accounts for which Amazon Inspector scans could not be + // enabled. Details are provided for each account. + FailedAccounts []types.FailedAccount + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationEnableMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpEnable{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpEnable{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opEnableMiddleware(stack, options); err != nil { + return err + } + if err = addOpEnableValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnable(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpEnable struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpEnable) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpEnable) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*EnableInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *EnableInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opEnableMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpEnable{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opEnable(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "Enable", + } +} diff --git a/service/inspector2/api_op_EnableDelegatedAdminAccount.go b/service/inspector2/api_op_EnableDelegatedAdminAccount.go new file mode 100644 index 00000000000..5daf159e5da --- /dev/null +++ b/service/inspector2/api_op_EnableDelegatedAdminAccount.go @@ -0,0 +1,165 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Enables the Amazon Inspector delegated administrator for your Organizations +// organization. +func (c *Client) EnableDelegatedAdminAccount(ctx context.Context, params *EnableDelegatedAdminAccountInput, optFns ...func(*Options)) (*EnableDelegatedAdminAccountOutput, error) { + if params == nil { + params = &EnableDelegatedAdminAccountInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "EnableDelegatedAdminAccount", params, optFns, c.addOperationEnableDelegatedAdminAccountMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*EnableDelegatedAdminAccountOutput) + out.ResultMetadata = metadata + return out, nil +} + +type EnableDelegatedAdminAccountInput struct { + + // The Amazon Web Services account ID of the Amazon Inspector delegated + // administrator. + // + // This member is required. + DelegatedAdminAccountId *string + + // The idempotency token for the request. + ClientToken *string + + noSmithyDocumentSerde +} + +type EnableDelegatedAdminAccountOutput struct { + + // The Amazon Web Services account ID of the successfully Amazon Inspector + // delegated administrator. + // + // This member is required. + DelegatedAdminAccountId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationEnableDelegatedAdminAccountMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpEnableDelegatedAdminAccount{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpEnableDelegatedAdminAccount{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opEnableDelegatedAdminAccountMiddleware(stack, options); err != nil { + return err + } + if err = addOpEnableDelegatedAdminAccountValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableDelegatedAdminAccount(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpEnableDelegatedAdminAccount struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpEnableDelegatedAdminAccount) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpEnableDelegatedAdminAccount) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*EnableDelegatedAdminAccountInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *EnableDelegatedAdminAccountInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opEnableDelegatedAdminAccountMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpEnableDelegatedAdminAccount{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opEnableDelegatedAdminAccount(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "EnableDelegatedAdminAccount", + } +} diff --git a/service/inspector2/api_op_GetDelegatedAdminAccount.go b/service/inspector2/api_op_GetDelegatedAdminAccount.go new file mode 100644 index 00000000000..e9931d24242 --- /dev/null +++ b/service/inspector2/api_op_GetDelegatedAdminAccount.go @@ -0,0 +1,114 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/inspector2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves information about the Amazon Inspector delegated administrator for +// your organization. +func (c *Client) GetDelegatedAdminAccount(ctx context.Context, params *GetDelegatedAdminAccountInput, optFns ...func(*Options)) (*GetDelegatedAdminAccountOutput, error) { + if params == nil { + params = &GetDelegatedAdminAccountInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetDelegatedAdminAccount", params, optFns, c.addOperationGetDelegatedAdminAccountMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetDelegatedAdminAccountOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetDelegatedAdminAccountInput struct { + noSmithyDocumentSerde +} + +type GetDelegatedAdminAccountOutput struct { + + // The Amazon Web Services account ID of the Amazon Inspector delegated + // administrator. + DelegatedAdmin *types.DelegatedAdmin + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetDelegatedAdminAccountMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetDelegatedAdminAccount{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetDelegatedAdminAccount{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDelegatedAdminAccount(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetDelegatedAdminAccount(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "GetDelegatedAdminAccount", + } +} diff --git a/service/inspector2/api_op_GetFindingsReportStatus.go b/service/inspector2/api_op_GetFindingsReportStatus.go new file mode 100644 index 00000000000..53bfdf9ec84 --- /dev/null +++ b/service/inspector2/api_op_GetFindingsReportStatus.go @@ -0,0 +1,131 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/inspector2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets the status of a findings report. +func (c *Client) GetFindingsReportStatus(ctx context.Context, params *GetFindingsReportStatusInput, optFns ...func(*Options)) (*GetFindingsReportStatusOutput, error) { + if params == nil { + params = &GetFindingsReportStatusInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetFindingsReportStatus", params, optFns, c.addOperationGetFindingsReportStatusMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetFindingsReportStatusOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetFindingsReportStatusInput struct { + + // The ID of the report to retrieve the status of. + ReportId *string + + noSmithyDocumentSerde +} + +type GetFindingsReportStatusOutput struct { + + // The destination of the report. + Destination *types.Destination + + // The error code of the report. + ErrorCode types.ReportingErrorCode + + // The error message of the report. + ErrorMessage *string + + // The filter criteria associated with the report. + FilterCriteria *types.FilterCriteria + + // The ID of the report. + ReportId *string + + // The status of the report. + Status types.ExternalReportStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetFindingsReportStatusMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetFindingsReportStatus{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetFindingsReportStatus{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFindingsReportStatus(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetFindingsReportStatus(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "GetFindingsReportStatus", + } +} diff --git a/service/inspector2/api_op_GetMember.go b/service/inspector2/api_op_GetMember.go new file mode 100644 index 00000000000..09e11acdacf --- /dev/null +++ b/service/inspector2/api_op_GetMember.go @@ -0,0 +1,122 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/inspector2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets member information for your organization. +func (c *Client) GetMember(ctx context.Context, params *GetMemberInput, optFns ...func(*Options)) (*GetMemberOutput, error) { + if params == nil { + params = &GetMemberInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetMember", params, optFns, c.addOperationGetMemberMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetMemberOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetMemberInput struct { + + // The Amazon Web Services account ID of the member account to retrieve information + // on. + // + // This member is required. + AccountId *string + + noSmithyDocumentSerde +} + +type GetMemberOutput struct { + + // Details of the retrieved member account. + Member *types.Member + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetMemberMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetMember{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetMember{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetMemberValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMember(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetMember(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "GetMember", + } +} diff --git a/service/inspector2/api_op_ListAccountPermissions.go b/service/inspector2/api_op_ListAccountPermissions.go new file mode 100644 index 00000000000..7907dda909e --- /dev/null +++ b/service/inspector2/api_op_ListAccountPermissions.go @@ -0,0 +1,222 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/inspector2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the permissions an account has to configure Amazon Inspector. +func (c *Client) ListAccountPermissions(ctx context.Context, params *ListAccountPermissionsInput, optFns ...func(*Options)) (*ListAccountPermissionsOutput, error) { + if params == nil { + params = &ListAccountPermissionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAccountPermissions", params, optFns, c.addOperationListAccountPermissionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAccountPermissionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAccountPermissionsInput struct { + + // The maximum number of results to return in the response. + MaxResults *int32 + + // A token to use for paginating results that are returned in the response. Set the + // value of this parameter to null for the first request to a list action. For + // subsequent calls, use the NextToken value returned from the previous request to + // continue listing results after the first page. + NextToken *string + + // The service scan type to check permissions for. + Service types.Service + + noSmithyDocumentSerde +} + +type ListAccountPermissionsOutput struct { + + // Contains details on the permissions an account has to configure Amazon + // Inspector. + // + // This member is required. + Permissions []types.Permission + + // A token to use for paginating results that are returned in the response. Set the + // value of this parameter to null for the first request to a list action. For + // subsequent calls, use the NextToken value returned from the previous request to + // continue listing results after the first page. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListAccountPermissionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListAccountPermissions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAccountPermissions{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccountPermissions(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListAccountPermissionsAPIClient is a client that implements the +// ListAccountPermissions operation. +type ListAccountPermissionsAPIClient interface { + ListAccountPermissions(context.Context, *ListAccountPermissionsInput, ...func(*Options)) (*ListAccountPermissionsOutput, error) +} + +var _ ListAccountPermissionsAPIClient = (*Client)(nil) + +// ListAccountPermissionsPaginatorOptions is the paginator options for +// ListAccountPermissions +type ListAccountPermissionsPaginatorOptions struct { + // The maximum number of results to return in the response. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListAccountPermissionsPaginator is a paginator for ListAccountPermissions +type ListAccountPermissionsPaginator struct { + options ListAccountPermissionsPaginatorOptions + client ListAccountPermissionsAPIClient + params *ListAccountPermissionsInput + nextToken *string + firstPage bool +} + +// NewListAccountPermissionsPaginator returns a new ListAccountPermissionsPaginator +func NewListAccountPermissionsPaginator(client ListAccountPermissionsAPIClient, params *ListAccountPermissionsInput, optFns ...func(*ListAccountPermissionsPaginatorOptions)) *ListAccountPermissionsPaginator { + if params == nil { + params = &ListAccountPermissionsInput{} + } + + options := ListAccountPermissionsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListAccountPermissionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListAccountPermissionsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListAccountPermissions page. +func (p *ListAccountPermissionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAccountPermissionsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListAccountPermissions(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListAccountPermissions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "ListAccountPermissions", + } +} diff --git a/service/inspector2/api_op_ListCoverage.go b/service/inspector2/api_op_ListCoverage.go new file mode 100644 index 00000000000..3adca99a8ba --- /dev/null +++ b/service/inspector2/api_op_ListCoverage.go @@ -0,0 +1,221 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/inspector2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists coverage details for you environment. +func (c *Client) ListCoverage(ctx context.Context, params *ListCoverageInput, optFns ...func(*Options)) (*ListCoverageOutput, error) { + if params == nil { + params = &ListCoverageInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListCoverage", params, optFns, c.addOperationListCoverageMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListCoverageOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListCoverageInput struct { + + // An object that contains details on the filters to apply to the coverage data for + // your environment. + FilterCriteria *types.CoverageFilterCriteria + + // The maximum number of results to return in the response. + MaxResults *int32 + + // A token to use for paginating results that are returned in the response. Set the + // value of this parameter to null for the first request to a list action. For + // subsequent calls, use the NextToken value returned from the previous request to + // continue listing results after the first page. + NextToken *string + + noSmithyDocumentSerde +} + +type ListCoverageOutput struct { + + // An object that contains details on the covered resources in your environment. + CoveredResources []types.CoveredResource + + // A token to use for paginating results that are returned in the response. Set the + // value of this parameter to null for the first request to a list action. For + // subsequent calls, use the NextToken value returned from the previous request to + // continue listing results after the first page. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListCoverageMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListCoverage{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListCoverage{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListCoverageValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCoverage(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListCoverageAPIClient is a client that implements the ListCoverage operation. +type ListCoverageAPIClient interface { + ListCoverage(context.Context, *ListCoverageInput, ...func(*Options)) (*ListCoverageOutput, error) +} + +var _ ListCoverageAPIClient = (*Client)(nil) + +// ListCoveragePaginatorOptions is the paginator options for ListCoverage +type ListCoveragePaginatorOptions struct { + // The maximum number of results to return in the response. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListCoveragePaginator is a paginator for ListCoverage +type ListCoveragePaginator struct { + options ListCoveragePaginatorOptions + client ListCoverageAPIClient + params *ListCoverageInput + nextToken *string + firstPage bool +} + +// NewListCoveragePaginator returns a new ListCoveragePaginator +func NewListCoveragePaginator(client ListCoverageAPIClient, params *ListCoverageInput, optFns ...func(*ListCoveragePaginatorOptions)) *ListCoveragePaginator { + if params == nil { + params = &ListCoverageInput{} + } + + options := ListCoveragePaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListCoveragePaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListCoveragePaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListCoverage page. +func (p *ListCoveragePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCoverageOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListCoverage(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListCoverage(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "ListCoverage", + } +} diff --git a/service/inspector2/api_op_ListCoverageStatistics.go b/service/inspector2/api_op_ListCoverageStatistics.go new file mode 100644 index 00000000000..b7c0eb623ad --- /dev/null +++ b/service/inspector2/api_op_ListCoverageStatistics.go @@ -0,0 +1,216 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/inspector2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists Amazon Inspector coverage statistics for your environment. +func (c *Client) ListCoverageStatistics(ctx context.Context, params *ListCoverageStatisticsInput, optFns ...func(*Options)) (*ListCoverageStatisticsOutput, error) { + if params == nil { + params = &ListCoverageStatisticsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListCoverageStatistics", params, optFns, c.addOperationListCoverageStatisticsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListCoverageStatisticsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListCoverageStatisticsInput struct { + + // An object that contains details on the filters to apply to the coverage data for + // your environment. + FilterCriteria *types.CoverageFilterCriteria + + // The value to group the results by. + GroupBy types.GroupKey + + // A token to use for paginating results that are returned in the response. Set the + // value of this parameter to null for the first request to a list action. For + // subsequent calls, use the NextToken value returned from the previous request to + // continue listing results after the first page. + NextToken *string + + noSmithyDocumentSerde +} + +type ListCoverageStatisticsOutput struct { + + // The total number for all groups. + // + // This member is required. + TotalCounts *int64 + + // An array with the number for each group. + CountsByGroup []types.Counts + + // A token to use for paginating results that are returned in the response. Set the + // value of this parameter to null for the first request to a list action. For + // subsequent calls, use the NextToken value returned from the previous request to + // continue listing results after the first page. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListCoverageStatisticsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListCoverageStatistics{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListCoverageStatistics{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListCoverageStatisticsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCoverageStatistics(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListCoverageStatisticsAPIClient is a client that implements the +// ListCoverageStatistics operation. +type ListCoverageStatisticsAPIClient interface { + ListCoverageStatistics(context.Context, *ListCoverageStatisticsInput, ...func(*Options)) (*ListCoverageStatisticsOutput, error) +} + +var _ ListCoverageStatisticsAPIClient = (*Client)(nil) + +// ListCoverageStatisticsPaginatorOptions is the paginator options for +// ListCoverageStatistics +type ListCoverageStatisticsPaginatorOptions struct { + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListCoverageStatisticsPaginator is a paginator for ListCoverageStatistics +type ListCoverageStatisticsPaginator struct { + options ListCoverageStatisticsPaginatorOptions + client ListCoverageStatisticsAPIClient + params *ListCoverageStatisticsInput + nextToken *string + firstPage bool +} + +// NewListCoverageStatisticsPaginator returns a new ListCoverageStatisticsPaginator +func NewListCoverageStatisticsPaginator(client ListCoverageStatisticsAPIClient, params *ListCoverageStatisticsInput, optFns ...func(*ListCoverageStatisticsPaginatorOptions)) *ListCoverageStatisticsPaginator { + if params == nil { + params = &ListCoverageStatisticsInput{} + } + + options := ListCoverageStatisticsPaginatorOptions{} + + for _, fn := range optFns { + fn(&options) + } + + return &ListCoverageStatisticsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListCoverageStatisticsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListCoverageStatistics page. +func (p *ListCoverageStatisticsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCoverageStatisticsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + result, err := p.client.ListCoverageStatistics(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListCoverageStatistics(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "ListCoverageStatistics", + } +} diff --git a/service/inspector2/api_op_ListDelegatedAdminAccounts.go b/service/inspector2/api_op_ListDelegatedAdminAccounts.go new file mode 100644 index 00000000000..6295587a2d5 --- /dev/null +++ b/service/inspector2/api_op_ListDelegatedAdminAccounts.go @@ -0,0 +1,219 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/inspector2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists information about the Amazon Inspector delegated administrator of your +// organization. +func (c *Client) ListDelegatedAdminAccounts(ctx context.Context, params *ListDelegatedAdminAccountsInput, optFns ...func(*Options)) (*ListDelegatedAdminAccountsOutput, error) { + if params == nil { + params = &ListDelegatedAdminAccountsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListDelegatedAdminAccounts", params, optFns, c.addOperationListDelegatedAdminAccountsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListDelegatedAdminAccountsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListDelegatedAdminAccountsInput struct { + + // The maximum number of results to return in the response. + MaxResults *int32 + + // A token to use for paginating results that are returned in the response. Set the + // value of this parameter to null for the first request to a list action. For + // subsequent calls, use the NextToken value returned from the previous request to + // continue listing results after the first page. + NextToken *string + + noSmithyDocumentSerde +} + +type ListDelegatedAdminAccountsOutput struct { + + // Details of the Amazon Inspector delegated administrator of your organization. + DelegatedAdminAccounts []types.DelegatedAdminAccount + + // A token to use for paginating results that are returned in the response. Set the + // value of this parameter to null for the first request to a list action. For + // subsequent calls, use the NextToken value returned from the previous request to + // continue listing results after the first page. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListDelegatedAdminAccountsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListDelegatedAdminAccounts{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListDelegatedAdminAccounts{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDelegatedAdminAccounts(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListDelegatedAdminAccountsAPIClient is a client that implements the +// ListDelegatedAdminAccounts operation. +type ListDelegatedAdminAccountsAPIClient interface { + ListDelegatedAdminAccounts(context.Context, *ListDelegatedAdminAccountsInput, ...func(*Options)) (*ListDelegatedAdminAccountsOutput, error) +} + +var _ ListDelegatedAdminAccountsAPIClient = (*Client)(nil) + +// ListDelegatedAdminAccountsPaginatorOptions is the paginator options for +// ListDelegatedAdminAccounts +type ListDelegatedAdminAccountsPaginatorOptions struct { + // The maximum number of results to return in the response. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListDelegatedAdminAccountsPaginator is a paginator for +// ListDelegatedAdminAccounts +type ListDelegatedAdminAccountsPaginator struct { + options ListDelegatedAdminAccountsPaginatorOptions + client ListDelegatedAdminAccountsAPIClient + params *ListDelegatedAdminAccountsInput + nextToken *string + firstPage bool +} + +// NewListDelegatedAdminAccountsPaginator returns a new +// ListDelegatedAdminAccountsPaginator +func NewListDelegatedAdminAccountsPaginator(client ListDelegatedAdminAccountsAPIClient, params *ListDelegatedAdminAccountsInput, optFns ...func(*ListDelegatedAdminAccountsPaginatorOptions)) *ListDelegatedAdminAccountsPaginator { + if params == nil { + params = &ListDelegatedAdminAccountsInput{} + } + + options := ListDelegatedAdminAccountsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListDelegatedAdminAccountsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListDelegatedAdminAccountsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListDelegatedAdminAccounts page. +func (p *ListDelegatedAdminAccountsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListDelegatedAdminAccountsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListDelegatedAdminAccounts(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListDelegatedAdminAccounts(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "ListDelegatedAdminAccounts", + } +} diff --git a/service/inspector2/api_op_ListFilters.go b/service/inspector2/api_op_ListFilters.go new file mode 100644 index 00000000000..b8af694141c --- /dev/null +++ b/service/inspector2/api_op_ListFilters.go @@ -0,0 +1,222 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/inspector2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the filters associated with your account. +func (c *Client) ListFilters(ctx context.Context, params *ListFiltersInput, optFns ...func(*Options)) (*ListFiltersOutput, error) { + if params == nil { + params = &ListFiltersInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListFilters", params, optFns, c.addOperationListFiltersMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListFiltersOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListFiltersInput struct { + + // The action the filter applies to matched findings. + Action types.FilterAction + + // The Amazon resource number (ARN) of the filter. + Arns []string + + // The maximum number of results to return in the response. + MaxResults *int32 + + // A token to use for paginating results that are returned in the response. Set the + // value of this parameter to null for the first request to a list action. For + // subsequent calls, use the NextToken value returned from the previous request to + // continue listing results after the first page. + NextToken *string + + noSmithyDocumentSerde +} + +type ListFiltersOutput struct { + + // Contains details on the filters associated with your account. + // + // This member is required. + Filters []types.Filter + + // A token to use for paginating results that are returned in the response. Set the + // value of this parameter to null for the first request to a list action. For + // subsequent calls, use the NextToken value returned from the previous request to + // continue listing results after the first page. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListFiltersMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListFilters{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListFilters{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFilters(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListFiltersAPIClient is a client that implements the ListFilters operation. +type ListFiltersAPIClient interface { + ListFilters(context.Context, *ListFiltersInput, ...func(*Options)) (*ListFiltersOutput, error) +} + +var _ ListFiltersAPIClient = (*Client)(nil) + +// ListFiltersPaginatorOptions is the paginator options for ListFilters +type ListFiltersPaginatorOptions struct { + // The maximum number of results to return in the response. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListFiltersPaginator is a paginator for ListFilters +type ListFiltersPaginator struct { + options ListFiltersPaginatorOptions + client ListFiltersAPIClient + params *ListFiltersInput + nextToken *string + firstPage bool +} + +// NewListFiltersPaginator returns a new ListFiltersPaginator +func NewListFiltersPaginator(client ListFiltersAPIClient, params *ListFiltersInput, optFns ...func(*ListFiltersPaginatorOptions)) *ListFiltersPaginator { + if params == nil { + params = &ListFiltersInput{} + } + + options := ListFiltersPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListFiltersPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListFiltersPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListFilters page. +func (p *ListFiltersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListFiltersOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListFilters(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListFilters(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "ListFilters", + } +} diff --git a/service/inspector2/api_op_ListFindingAggregations.go b/service/inspector2/api_op_ListFindingAggregations.go new file mode 100644 index 00000000000..c077f392c7a --- /dev/null +++ b/service/inspector2/api_op_ListFindingAggregations.go @@ -0,0 +1,237 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/inspector2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists aggregated finding data for your environment based on specific criteria. +func (c *Client) ListFindingAggregations(ctx context.Context, params *ListFindingAggregationsInput, optFns ...func(*Options)) (*ListFindingAggregationsOutput, error) { + if params == nil { + params = &ListFindingAggregationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListFindingAggregations", params, optFns, c.addOperationListFindingAggregationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListFindingAggregationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListFindingAggregationsInput struct { + + // The type of the aggregation request. + // + // This member is required. + AggregationType types.AggregationType + + // The Amazon Web Services account IDs to retrieve finding aggregation data for. + AccountIds []types.StringFilter + + // Details of the aggregation request that is used to filter your aggregation + // results. + AggregationRequest types.AggregationRequest + + // The maximum number of results to return in the response. + MaxResults *int32 + + // A token to use for paginating results that are returned in the response. Set the + // value of this parameter to null for the first request to a list action. For + // subsequent calls, use the NextToken value returned from the previous request to + // continue listing results after the first page. + NextToken *string + + noSmithyDocumentSerde +} + +type ListFindingAggregationsOutput struct { + + // The type of aggregation to perform. + // + // This member is required. + AggregationType types.AggregationType + + // A token to use for paginating results that are returned in the response. Set the + // value of this parameter to null for the first request to a list action. For + // subsequent calls, use the NextToken value returned from the previous request to + // continue listing results after the first page. + NextToken *string + + // Objects that contain the results of an aggregation operation. + Responses []types.AggregationResponse + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListFindingAggregationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListFindingAggregations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListFindingAggregations{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListFindingAggregationsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFindingAggregations(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListFindingAggregationsAPIClient is a client that implements the +// ListFindingAggregations operation. +type ListFindingAggregationsAPIClient interface { + ListFindingAggregations(context.Context, *ListFindingAggregationsInput, ...func(*Options)) (*ListFindingAggregationsOutput, error) +} + +var _ ListFindingAggregationsAPIClient = (*Client)(nil) + +// ListFindingAggregationsPaginatorOptions is the paginator options for +// ListFindingAggregations +type ListFindingAggregationsPaginatorOptions struct { + // The maximum number of results to return in the response. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListFindingAggregationsPaginator is a paginator for ListFindingAggregations +type ListFindingAggregationsPaginator struct { + options ListFindingAggregationsPaginatorOptions + client ListFindingAggregationsAPIClient + params *ListFindingAggregationsInput + nextToken *string + firstPage bool +} + +// NewListFindingAggregationsPaginator returns a new +// ListFindingAggregationsPaginator +func NewListFindingAggregationsPaginator(client ListFindingAggregationsAPIClient, params *ListFindingAggregationsInput, optFns ...func(*ListFindingAggregationsPaginatorOptions)) *ListFindingAggregationsPaginator { + if params == nil { + params = &ListFindingAggregationsInput{} + } + + options := ListFindingAggregationsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListFindingAggregationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListFindingAggregationsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListFindingAggregations page. +func (p *ListFindingAggregationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListFindingAggregationsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListFindingAggregations(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListFindingAggregations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "ListFindingAggregations", + } +} diff --git a/service/inspector2/api_op_ListFindings.go b/service/inspector2/api_op_ListFindings.go new file mode 100644 index 00000000000..8e43aced5e8 --- /dev/null +++ b/service/inspector2/api_op_ListFindings.go @@ -0,0 +1,223 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/inspector2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists findings for your environment. +func (c *Client) ListFindings(ctx context.Context, params *ListFindingsInput, optFns ...func(*Options)) (*ListFindingsOutput, error) { + if params == nil { + params = &ListFindingsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListFindings", params, optFns, c.addOperationListFindingsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListFindingsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListFindingsInput struct { + + // Details on the filters to apply to your finding results. + FilterCriteria *types.FilterCriteria + + // The maximum number of results to return in the response. + MaxResults *int32 + + // A token to use for paginating results that are returned in the response. Set the + // value of this parameter to null for the first request to a list action. For + // subsequent calls, use the NextToken value returned from the previous request to + // continue listing results after the first page. + NextToken *string + + // Details on the sort criteria to apply to your finding results. + SortCriteria *types.SortCriteria + + noSmithyDocumentSerde +} + +type ListFindingsOutput struct { + + // Contains details on the findings in your environment. + Findings []types.Finding + + // A token to use for paginating results that are returned in the response. Set the + // value of this parameter to null for the first request to a list action. For + // subsequent calls, use the NextToken value returned from the previous request to + // continue listing results after the first page. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListFindingsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListFindings{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListFindings{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListFindingsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFindings(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListFindingsAPIClient is a client that implements the ListFindings operation. +type ListFindingsAPIClient interface { + ListFindings(context.Context, *ListFindingsInput, ...func(*Options)) (*ListFindingsOutput, error) +} + +var _ ListFindingsAPIClient = (*Client)(nil) + +// ListFindingsPaginatorOptions is the paginator options for ListFindings +type ListFindingsPaginatorOptions struct { + // The maximum number of results to return in the response. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListFindingsPaginator is a paginator for ListFindings +type ListFindingsPaginator struct { + options ListFindingsPaginatorOptions + client ListFindingsAPIClient + params *ListFindingsInput + nextToken *string + firstPage bool +} + +// NewListFindingsPaginator returns a new ListFindingsPaginator +func NewListFindingsPaginator(client ListFindingsAPIClient, params *ListFindingsInput, optFns ...func(*ListFindingsPaginatorOptions)) *ListFindingsPaginator { + if params == nil { + params = &ListFindingsInput{} + } + + options := ListFindingsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListFindingsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListFindingsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListFindings page. +func (p *ListFindingsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListFindingsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListFindings(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListFindings(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "ListFindings", + } +} diff --git a/service/inspector2/api_op_ListMembers.go b/service/inspector2/api_op_ListMembers.go new file mode 100644 index 00000000000..d1c16c5ea83 --- /dev/null +++ b/service/inspector2/api_op_ListMembers.go @@ -0,0 +1,217 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/inspector2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List members associated with the Amazon Inspector delegated administrator for +// your organization. +func (c *Client) ListMembers(ctx context.Context, params *ListMembersInput, optFns ...func(*Options)) (*ListMembersOutput, error) { + if params == nil { + params = &ListMembersInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListMembers", params, optFns, c.addOperationListMembersMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListMembersOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListMembersInput struct { + + // The maximum number of results to return in the response. + MaxResults *int32 + + // A token to use for paginating results that are returned in the response. Set the + // value of this parameter to null for the first request to a list action. For + // subsequent calls, use the NextToken value returned from the previous request to + // continue listing results after the first page. + NextToken *string + + // Specifies whether to list only currently associated members if True or to list + // all members within the organization if False. + OnlyAssociated *bool + + noSmithyDocumentSerde +} + +type ListMembersOutput struct { + + // An object that contains details for each member account. + Members []types.Member + + // The pagination parameter to be used on the next list operation to retrieve more + // items. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListMembersMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListMembers{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListMembers{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMembers(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListMembersAPIClient is a client that implements the ListMembers operation. +type ListMembersAPIClient interface { + ListMembers(context.Context, *ListMembersInput, ...func(*Options)) (*ListMembersOutput, error) +} + +var _ ListMembersAPIClient = (*Client)(nil) + +// ListMembersPaginatorOptions is the paginator options for ListMembers +type ListMembersPaginatorOptions struct { + // The maximum number of results to return in the response. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListMembersPaginator is a paginator for ListMembers +type ListMembersPaginator struct { + options ListMembersPaginatorOptions + client ListMembersAPIClient + params *ListMembersInput + nextToken *string + firstPage bool +} + +// NewListMembersPaginator returns a new ListMembersPaginator +func NewListMembersPaginator(client ListMembersAPIClient, params *ListMembersInput, optFns ...func(*ListMembersPaginatorOptions)) *ListMembersPaginator { + if params == nil { + params = &ListMembersInput{} + } + + options := ListMembersPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListMembersPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListMembersPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListMembers page. +func (p *ListMembersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListMembersOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListMembers(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListMembers(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "ListMembers", + } +} diff --git a/service/inspector2/api_op_ListTagsForResource.go b/service/inspector2/api_op_ListTagsForResource.go new file mode 100644 index 00000000000..a85c9d13fc6 --- /dev/null +++ b/service/inspector2/api_op_ListTagsForResource.go @@ -0,0 +1,120 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all tags attached to a given resource. +func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { + if params == nil { + params = &ListTagsForResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTagsForResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListTagsForResourceInput struct { + + // The Amazon resource number (ARN) of the resource to list tags of. + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + +type ListTagsForResourceOutput struct { + + // The tags associated with the resource. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "ListTagsForResource", + } +} diff --git a/service/inspector2/api_op_ListUsageTotals.go b/service/inspector2/api_op_ListUsageTotals.go new file mode 100644 index 00000000000..b70c38ce075 --- /dev/null +++ b/service/inspector2/api_op_ListUsageTotals.go @@ -0,0 +1,216 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/inspector2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the Amazon Inspector usage totals over the last 30 days. +func (c *Client) ListUsageTotals(ctx context.Context, params *ListUsageTotalsInput, optFns ...func(*Options)) (*ListUsageTotalsOutput, error) { + if params == nil { + params = &ListUsageTotalsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListUsageTotals", params, optFns, c.addOperationListUsageTotalsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListUsageTotalsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListUsageTotalsInput struct { + + // The Amazon Web Services account IDs to retrieve usage totals for. + AccountIds []string + + // The maximum number of results to return in the response. + MaxResults *int32 + + // A token to use for paginating results that are returned in the response. Set the + // value of this parameter to null for the first request to a list action. For + // subsequent calls, use the NextToken value returned from the previous request to + // continue listing results after the first page. + NextToken *string + + noSmithyDocumentSerde +} + +type ListUsageTotalsOutput struct { + + // The pagination parameter to be used on the next list operation to retrieve more + // items. + NextToken *string + + // An object with details on the total usage for the requested account. + Totals []types.UsageTotal + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListUsageTotalsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListUsageTotals{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListUsageTotals{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListUsageTotals(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListUsageTotalsAPIClient is a client that implements the ListUsageTotals +// operation. +type ListUsageTotalsAPIClient interface { + ListUsageTotals(context.Context, *ListUsageTotalsInput, ...func(*Options)) (*ListUsageTotalsOutput, error) +} + +var _ ListUsageTotalsAPIClient = (*Client)(nil) + +// ListUsageTotalsPaginatorOptions is the paginator options for ListUsageTotals +type ListUsageTotalsPaginatorOptions struct { + // The maximum number of results to return in the response. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListUsageTotalsPaginator is a paginator for ListUsageTotals +type ListUsageTotalsPaginator struct { + options ListUsageTotalsPaginatorOptions + client ListUsageTotalsAPIClient + params *ListUsageTotalsInput + nextToken *string + firstPage bool +} + +// NewListUsageTotalsPaginator returns a new ListUsageTotalsPaginator +func NewListUsageTotalsPaginator(client ListUsageTotalsAPIClient, params *ListUsageTotalsInput, optFns ...func(*ListUsageTotalsPaginatorOptions)) *ListUsageTotalsPaginator { + if params == nil { + params = &ListUsageTotalsInput{} + } + + options := ListUsageTotalsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListUsageTotalsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListUsageTotalsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListUsageTotals page. +func (p *ListUsageTotalsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListUsageTotalsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListUsageTotals(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListUsageTotals(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "ListUsageTotals", + } +} diff --git a/service/inspector2/api_op_TagResource.go b/service/inspector2/api_op_TagResource.go new file mode 100644 index 00000000000..56aeb6a5e2b --- /dev/null +++ b/service/inspector2/api_op_TagResource.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds tags to a resource. +func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { + if params == nil { + params = &TagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TagResourceInput struct { + + // The Amazon Resource Name (ARN) of the resource to apply a tag to. + // + // This member is required. + ResourceArn *string + + // The tags to be added to a resource. + // + // This member is required. + Tags map[string]string + + noSmithyDocumentSerde +} + +type TagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpTagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "TagResource", + } +} diff --git a/service/inspector2/api_op_UntagResource.go b/service/inspector2/api_op_UntagResource.go new file mode 100644 index 00000000000..4ebd4152817 --- /dev/null +++ b/service/inspector2/api_op_UntagResource.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes tags from a resource. +func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { + if params == nil { + params = &UntagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UntagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UntagResourceInput struct { + + // The Amazon Resource Name (ARN) for the resource to remove tags from. + // + // This member is required. + ResourceArn *string + + // The tag keys to remove from the resource. + // + // This member is required. + TagKeys []string + + noSmithyDocumentSerde +} + +type UntagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUntagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "UntagResource", + } +} diff --git a/service/inspector2/api_op_UpdateFilter.go b/service/inspector2/api_op_UpdateFilter.go new file mode 100644 index 00000000000..09bd39a9405 --- /dev/null +++ b/service/inspector2/api_op_UpdateFilter.go @@ -0,0 +1,137 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/inspector2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Specifies the action that is to be applied to the findings that match the +// filter. +func (c *Client) UpdateFilter(ctx context.Context, params *UpdateFilterInput, optFns ...func(*Options)) (*UpdateFilterOutput, error) { + if params == nil { + params = &UpdateFilterInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateFilter", params, optFns, c.addOperationUpdateFilterMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateFilterOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateFilterInput struct { + + // The Amazon Resource Number (ARN) of the filter to update. + // + // This member is required. + FilterArn *string + + // Specifies the action that is to be applied to the findings that match the + // filter. + Action types.FilterAction + + // A description of the filter. + Description *string + + // Defines the criteria to be update in the filter. + FilterCriteria *types.FilterCriteria + + // The name of the filter. + Name *string + + noSmithyDocumentSerde +} + +type UpdateFilterOutput struct { + + // The Amazon Resource Number (ARN) of the successfully updated filter. + // + // This member is required. + Arn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateFilterMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateFilter{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateFilter{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateFilterValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateFilter(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateFilter(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "UpdateFilter", + } +} diff --git a/service/inspector2/api_op_UpdateOrganizationConfiguration.go b/service/inspector2/api_op_UpdateOrganizationConfiguration.go new file mode 100644 index 00000000000..c88b182db9b --- /dev/null +++ b/service/inspector2/api_op_UpdateOrganizationConfiguration.go @@ -0,0 +1,125 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/inspector2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the configurations for your Amazon Inspector organization. +func (c *Client) UpdateOrganizationConfiguration(ctx context.Context, params *UpdateOrganizationConfigurationInput, optFns ...func(*Options)) (*UpdateOrganizationConfigurationOutput, error) { + if params == nil { + params = &UpdateOrganizationConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateOrganizationConfiguration", params, optFns, c.addOperationUpdateOrganizationConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateOrganizationConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateOrganizationConfigurationInput struct { + + // Defines which scan types are enabled automatically for new members of your + // Amazon Inspector organization. + // + // This member is required. + AutoEnable *types.AutoEnable + + noSmithyDocumentSerde +} + +type UpdateOrganizationConfigurationOutput struct { + + // The updated status of scan types automatically enabled for new members of your + // Amazon Inspector organization. + // + // This member is required. + AutoEnable *types.AutoEnable + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateOrganizationConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateOrganizationConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateOrganizationConfiguration{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateOrganizationConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateOrganizationConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateOrganizationConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "UpdateOrganizationConfiguration", + } +} diff --git a/service/inspector2/deserializers.go b/service/inspector2/deserializers.go new file mode 100644 index 00000000000..ca1f4d51f1e --- /dev/null +++ b/service/inspector2/deserializers.go @@ -0,0 +1,10985 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/inspector2/types" + smithy "github.com/aws/smithy-go" + smithyio "github.com/aws/smithy-go/io" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" + "math" + "strconv" + "strings" +) + +type awsRestjson1_deserializeOpAssociateMember struct { +} + +func (*awsRestjson1_deserializeOpAssociateMember) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpAssociateMember) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorAssociateMember(response, &metadata) + } + output := &AssociateMemberOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentAssociateMemberOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorAssociateMember(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentAssociateMemberOutput(v **AssociateMemberOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *AssociateMemberOutput + if *v == nil { + sv = &AssociateMemberOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpBatchGetAccountStatus struct { +} + +func (*awsRestjson1_deserializeOpBatchGetAccountStatus) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpBatchGetAccountStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorBatchGetAccountStatus(response, &metadata) + } + output := &BatchGetAccountStatusOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentBatchGetAccountStatusOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorBatchGetAccountStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentBatchGetAccountStatusOutput(v **BatchGetAccountStatusOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *BatchGetAccountStatusOutput + if *v == nil { + sv = &BatchGetAccountStatusOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accounts": + if err := awsRestjson1_deserializeDocumentAccountStateList(&sv.Accounts, value); err != nil { + return err + } + + case "failedAccounts": + if err := awsRestjson1_deserializeDocumentFailedAccountList(&sv.FailedAccounts, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpBatchGetFreeTrialInfo struct { +} + +func (*awsRestjson1_deserializeOpBatchGetFreeTrialInfo) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpBatchGetFreeTrialInfo) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorBatchGetFreeTrialInfo(response, &metadata) + } + output := &BatchGetFreeTrialInfoOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentBatchGetFreeTrialInfoOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorBatchGetFreeTrialInfo(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentBatchGetFreeTrialInfoOutput(v **BatchGetFreeTrialInfoOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *BatchGetFreeTrialInfoOutput + if *v == nil { + sv = &BatchGetFreeTrialInfoOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accounts": + if err := awsRestjson1_deserializeDocumentFreeTrialAccountInfoList(&sv.Accounts, value); err != nil { + return err + } + + case "failedAccounts": + if err := awsRestjson1_deserializeDocumentFreeTrialInfoErrorList(&sv.FailedAccounts, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCancelFindingsReport struct { +} + +func (*awsRestjson1_deserializeOpCancelFindingsReport) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCancelFindingsReport) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCancelFindingsReport(response, &metadata) + } + output := &CancelFindingsReportOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCancelFindingsReportOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCancelFindingsReport(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCancelFindingsReportOutput(v **CancelFindingsReportOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CancelFindingsReportOutput + if *v == nil { + sv = &CancelFindingsReportOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "reportId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReportId to be of type string, got %T instead", value) + } + sv.ReportId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateFilter struct { +} + +func (*awsRestjson1_deserializeOpCreateFilter) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateFilter) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCreateFilter(response, &metadata) + } + output := &CreateFilterOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreateFilterOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateFilter(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateFilterOutput(v **CreateFilterOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateFilterOutput + if *v == nil { + sv = &CreateFilterOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FilterArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateFindingsReport struct { +} + +func (*awsRestjson1_deserializeOpCreateFindingsReport) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateFindingsReport) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCreateFindingsReport(response, &metadata) + } + output := &CreateFindingsReportOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreateFindingsReportOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateFindingsReport(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateFindingsReportOutput(v **CreateFindingsReportOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateFindingsReportOutput + if *v == nil { + sv = &CreateFindingsReportOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "reportId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReportId to be of type string, got %T instead", value) + } + sv.ReportId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteFilter struct { +} + +func (*awsRestjson1_deserializeOpDeleteFilter) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteFilter) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteFilter(response, &metadata) + } + output := &DeleteFilterOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDeleteFilterOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteFilter(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDeleteFilterOutput(v **DeleteFilterOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteFilterOutput + if *v == nil { + sv = &DeleteFilterOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FilterArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeOrganizationConfiguration struct { +} + +func (*awsRestjson1_deserializeOpDescribeOrganizationConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeOrganizationConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDescribeOrganizationConfiguration(response, &metadata) + } + output := &DescribeOrganizationConfigurationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDescribeOrganizationConfigurationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeOrganizationConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeOrganizationConfigurationOutput(v **DescribeOrganizationConfigurationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeOrganizationConfigurationOutput + if *v == nil { + sv = &DescribeOrganizationConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "autoEnable": + if err := awsRestjson1_deserializeDocumentAutoEnable(&sv.AutoEnable, value); err != nil { + return err + } + + case "maxAccountLimitReached": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.MaxAccountLimitReached = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDisable struct { +} + +func (*awsRestjson1_deserializeOpDisable) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDisable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDisable(response, &metadata) + } + output := &DisableOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDisableOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDisable(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDisableOutput(v **DisableOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DisableOutput + if *v == nil { + sv = &DisableOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accounts": + if err := awsRestjson1_deserializeDocumentAccountList(&sv.Accounts, value); err != nil { + return err + } + + case "failedAccounts": + if err := awsRestjson1_deserializeDocumentFailedAccountList(&sv.FailedAccounts, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDisableDelegatedAdminAccount struct { +} + +func (*awsRestjson1_deserializeOpDisableDelegatedAdminAccount) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDisableDelegatedAdminAccount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDisableDelegatedAdminAccount(response, &metadata) + } + output := &DisableDelegatedAdminAccountOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDisableDelegatedAdminAccountOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDisableDelegatedAdminAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDisableDelegatedAdminAccountOutput(v **DisableDelegatedAdminAccountOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DisableDelegatedAdminAccountOutput + if *v == nil { + sv = &DisableDelegatedAdminAccountOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "delegatedAdminAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.DelegatedAdminAccountId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDisassociateMember struct { +} + +func (*awsRestjson1_deserializeOpDisassociateMember) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDisassociateMember) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDisassociateMember(response, &metadata) + } + output := &DisassociateMemberOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDisassociateMemberOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDisassociateMember(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDisassociateMemberOutput(v **DisassociateMemberOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DisassociateMemberOutput + if *v == nil { + sv = &DisassociateMemberOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpEnable struct { +} + +func (*awsRestjson1_deserializeOpEnable) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpEnable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorEnable(response, &metadata) + } + output := &EnableOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentEnableOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorEnable(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentEnableOutput(v **EnableOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *EnableOutput + if *v == nil { + sv = &EnableOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accounts": + if err := awsRestjson1_deserializeDocumentAccountList(&sv.Accounts, value); err != nil { + return err + } + + case "failedAccounts": + if err := awsRestjson1_deserializeDocumentFailedAccountList(&sv.FailedAccounts, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpEnableDelegatedAdminAccount struct { +} + +func (*awsRestjson1_deserializeOpEnableDelegatedAdminAccount) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpEnableDelegatedAdminAccount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorEnableDelegatedAdminAccount(response, &metadata) + } + output := &EnableDelegatedAdminAccountOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentEnableDelegatedAdminAccountOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorEnableDelegatedAdminAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentEnableDelegatedAdminAccountOutput(v **EnableDelegatedAdminAccountOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *EnableDelegatedAdminAccountOutput + if *v == nil { + sv = &EnableDelegatedAdminAccountOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "delegatedAdminAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.DelegatedAdminAccountId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetDelegatedAdminAccount struct { +} + +func (*awsRestjson1_deserializeOpGetDelegatedAdminAccount) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetDelegatedAdminAccount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetDelegatedAdminAccount(response, &metadata) + } + output := &GetDelegatedAdminAccountOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetDelegatedAdminAccountOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetDelegatedAdminAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetDelegatedAdminAccountOutput(v **GetDelegatedAdminAccountOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetDelegatedAdminAccountOutput + if *v == nil { + sv = &GetDelegatedAdminAccountOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "delegatedAdmin": + if err := awsRestjson1_deserializeDocumentDelegatedAdmin(&sv.DelegatedAdmin, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetFindingsReportStatus struct { +} + +func (*awsRestjson1_deserializeOpGetFindingsReportStatus) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetFindingsReportStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetFindingsReportStatus(response, &metadata) + } + output := &GetFindingsReportStatusOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetFindingsReportStatusOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetFindingsReportStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetFindingsReportStatusOutput(v **GetFindingsReportStatusOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetFindingsReportStatusOutput + if *v == nil { + sv = &GetFindingsReportStatusOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "destination": + if err := awsRestjson1_deserializeDocumentDestination(&sv.Destination, value); err != nil { + return err + } + + case "errorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReportingErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode = types.ReportingErrorCode(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "filterCriteria": + if err := awsRestjson1_deserializeDocumentFilterCriteria(&sv.FilterCriteria, value); err != nil { + return err + } + + case "reportId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReportId to be of type string, got %T instead", value) + } + sv.ReportId = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExternalReportStatus to be of type string, got %T instead", value) + } + sv.Status = types.ExternalReportStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetMember struct { +} + +func (*awsRestjson1_deserializeOpGetMember) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetMember) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetMember(response, &metadata) + } + output := &GetMemberOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetMemberOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetMember(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetMemberOutput(v **GetMemberOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetMemberOutput + if *v == nil { + sv = &GetMemberOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "member": + if err := awsRestjson1_deserializeDocumentMember(&sv.Member, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListAccountPermissions struct { +} + +func (*awsRestjson1_deserializeOpListAccountPermissions) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListAccountPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListAccountPermissions(response, &metadata) + } + output := &ListAccountPermissionsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListAccountPermissionsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListAccountPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListAccountPermissionsOutput(v **ListAccountPermissionsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListAccountPermissionsOutput + if *v == nil { + sv = &ListAccountPermissionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "permissions": + if err := awsRestjson1_deserializeDocumentPermissions(&sv.Permissions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListCoverage struct { +} + +func (*awsRestjson1_deserializeOpListCoverage) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListCoverage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListCoverage(response, &metadata) + } + output := &ListCoverageOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListCoverageOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListCoverage(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListCoverageOutput(v **ListCoverageOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListCoverageOutput + if *v == nil { + sv = &ListCoverageOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "coveredResources": + if err := awsRestjson1_deserializeDocumentCoveredResources(&sv.CoveredResources, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListCoverageStatistics struct { +} + +func (*awsRestjson1_deserializeOpListCoverageStatistics) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListCoverageStatistics) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListCoverageStatistics(response, &metadata) + } + output := &ListCoverageStatisticsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListCoverageStatisticsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListCoverageStatistics(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListCoverageStatisticsOutput(v **ListCoverageStatisticsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListCoverageStatisticsOutput + if *v == nil { + sv = &ListCoverageStatisticsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "countsByGroup": + if err := awsRestjson1_deserializeDocumentCountsList(&sv.CountsByGroup, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "totalCounts": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TotalCounts = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListDelegatedAdminAccounts struct { +} + +func (*awsRestjson1_deserializeOpListDelegatedAdminAccounts) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListDelegatedAdminAccounts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListDelegatedAdminAccounts(response, &metadata) + } + output := &ListDelegatedAdminAccountsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListDelegatedAdminAccountsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListDelegatedAdminAccounts(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListDelegatedAdminAccountsOutput(v **ListDelegatedAdminAccountsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListDelegatedAdminAccountsOutput + if *v == nil { + sv = &ListDelegatedAdminAccountsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "delegatedAdminAccounts": + if err := awsRestjson1_deserializeDocumentDelegatedAdminAccountList(&sv.DelegatedAdminAccounts, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListFilters struct { +} + +func (*awsRestjson1_deserializeOpListFilters) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListFilters) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListFilters(response, &metadata) + } + output := &ListFiltersOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListFiltersOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListFilters(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListFiltersOutput(v **ListFiltersOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListFiltersOutput + if *v == nil { + sv = &ListFiltersOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "filters": + if err := awsRestjson1_deserializeDocumentFilterList(&sv.Filters, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListFindingAggregations struct { +} + +func (*awsRestjson1_deserializeOpListFindingAggregations) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListFindingAggregations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListFindingAggregations(response, &metadata) + } + output := &ListFindingAggregationsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListFindingAggregationsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListFindingAggregations(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListFindingAggregationsOutput(v **ListFindingAggregationsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListFindingAggregationsOutput + if *v == nil { + sv = &ListFindingAggregationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "aggregationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AggregationType to be of type string, got %T instead", value) + } + sv.AggregationType = types.AggregationType(jtv) + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "responses": + if err := awsRestjson1_deserializeDocumentAggregationResponseList(&sv.Responses, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListFindings struct { +} + +func (*awsRestjson1_deserializeOpListFindings) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListFindings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListFindings(response, &metadata) + } + output := &ListFindingsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListFindingsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListFindings(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListFindingsOutput(v **ListFindingsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListFindingsOutput + if *v == nil { + sv = &ListFindingsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "findings": + if err := awsRestjson1_deserializeDocumentFindingList(&sv.Findings, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListMembers struct { +} + +func (*awsRestjson1_deserializeOpListMembers) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListMembers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListMembers(response, &metadata) + } + output := &ListMembersOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListMembersOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListMembers(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListMembersOutput(v **ListMembersOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListMembersOutput + if *v == nil { + sv = &ListMembersOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "members": + if err := awsRestjson1_deserializeDocumentMemberList(&sv.Members, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListTagsForResource struct { +} + +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) + } + output := &ListTagsForResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListTagsForResourceOutput + if *v == nil { + sv = &ListTagsForResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListUsageTotals struct { +} + +func (*awsRestjson1_deserializeOpListUsageTotals) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListUsageTotals) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListUsageTotals(response, &metadata) + } + output := &ListUsageTotalsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListUsageTotalsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListUsageTotals(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListUsageTotalsOutput(v **ListUsageTotalsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListUsageTotalsOutput + if *v == nil { + sv = &ListUsageTotalsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ListUsageTotalsNextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "totals": + if err := awsRestjson1_deserializeDocumentUsageTotalList(&sv.Totals, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpTagResource struct { +} + +func (*awsRestjson1_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) + } + output := &TagResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUntagResource struct { +} + +func (*awsRestjson1_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) + } + output := &UntagResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUpdateFilter struct { +} + +func (*awsRestjson1_deserializeOpUpdateFilter) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateFilter) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateFilter(response, &metadata) + } + output := &UpdateFilterOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateFilterOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateFilter(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateFilterOutput(v **UpdateFilterOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateFilterOutput + if *v == nil { + sv = &UpdateFilterOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FilterArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateOrganizationConfiguration struct { +} + +func (*awsRestjson1_deserializeOpUpdateOrganizationConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateOrganizationConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateOrganizationConfiguration(response, &metadata) + } + output := &UpdateOrganizationConfigurationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateOrganizationConfigurationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateOrganizationConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateOrganizationConfigurationOutput(v **UpdateOrganizationConfigurationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateOrganizationConfigurationOutput + if *v == nil { + sv = &UpdateOrganizationConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "autoEnable": + if err := awsRestjson1_deserializeDocumentAutoEnable(&sv.AutoEnable, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeOpHttpBindingsInternalServerException(v *types.InternalServerException, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("Retry-After"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + vv, err := strconv.ParseInt(headerValues[0], 0, 32) + if err != nil { + return err + } + v.RetryAfterSeconds = ptr.Int32(int32(vv)) + } + + return nil +} +func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDeniedException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorBadRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.BadRequestException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentBadRequestException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ConflictException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentConflictException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalServerException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + if err := awsRestjson1_deserializeOpHttpBindingsInternalServerException(output, response); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response error with invalid HTTP bindings, %w", err)} + } + + return output +} + +func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceNotFoundException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServiceQuotaExceededException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentServiceQuotaExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ThrottlingException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentThrottlingException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ValidationException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentValidationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAccount(v **types.Account, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Account + if *v == nil { + sv = &types.Account{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "resourceStatus": + if err := awsRestjson1_deserializeDocumentResourceStatus(&sv.ResourceStatus, value); err != nil { + return err + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Status to be of type string, got %T instead", value) + } + sv.Status = types.Status(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAccountAggregationResponse(v **types.AccountAggregationResponse, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccountAggregationResponse + if *v == nil { + sv = &types.AccountAggregationResponse{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "severityCounts": + if err := awsRestjson1_deserializeDocumentSeverityCounts(&sv.SeverityCounts, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAccountList(v *[]types.Account, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Account + if *v == nil { + cv = []types.Account{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Account + destAddr := &col + if err := awsRestjson1_deserializeDocumentAccount(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAccountState(v **types.AccountState, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccountState + if *v == nil { + sv = &types.AccountState{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "resourceState": + if err := awsRestjson1_deserializeDocumentResourceState(&sv.ResourceState, value); err != nil { + return err + } + + case "state": + if err := awsRestjson1_deserializeDocumentState(&sv.State, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAccountStateList(v *[]types.AccountState, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.AccountState + if *v == nil { + cv = []types.AccountState{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AccountState + destAddr := &col + if err := awsRestjson1_deserializeDocumentAccountState(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAggregationResponse(v *types.AggregationResponse, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var uv types.AggregationResponse +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "accountAggregation": + var mv types.AccountAggregationResponse + destAddr := &mv + if err := awsRestjson1_deserializeDocumentAccountAggregationResponse(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.AggregationResponseMemberAccountAggregation{Value: mv} + break loop + + case "amiAggregation": + var mv types.AmiAggregationResponse + destAddr := &mv + if err := awsRestjson1_deserializeDocumentAmiAggregationResponse(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.AggregationResponseMemberAmiAggregation{Value: mv} + break loop + + case "awsEcrContainerAggregation": + var mv types.AwsEcrContainerAggregationResponse + destAddr := &mv + if err := awsRestjson1_deserializeDocumentAwsEcrContainerAggregationResponse(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.AggregationResponseMemberAwsEcrContainerAggregation{Value: mv} + break loop + + case "ec2InstanceAggregation": + var mv types.Ec2InstanceAggregationResponse + destAddr := &mv + if err := awsRestjson1_deserializeDocumentEc2InstanceAggregationResponse(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.AggregationResponseMemberEc2InstanceAggregation{Value: mv} + break loop + + case "findingTypeAggregation": + var mv types.FindingTypeAggregationResponse + destAddr := &mv + if err := awsRestjson1_deserializeDocumentFindingTypeAggregationResponse(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.AggregationResponseMemberFindingTypeAggregation{Value: mv} + break loop + + case "imageLayerAggregation": + var mv types.ImageLayerAggregationResponse + destAddr := &mv + if err := awsRestjson1_deserializeDocumentImageLayerAggregationResponse(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.AggregationResponseMemberImageLayerAggregation{Value: mv} + break loop + + case "packageAggregation": + var mv types.PackageAggregationResponse + destAddr := &mv + if err := awsRestjson1_deserializeDocumentPackageAggregationResponse(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.AggregationResponseMemberPackageAggregation{Value: mv} + break loop + + case "repositoryAggregation": + var mv types.RepositoryAggregationResponse + destAddr := &mv + if err := awsRestjson1_deserializeDocumentRepositoryAggregationResponse(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.AggregationResponseMemberRepositoryAggregation{Value: mv} + break loop + + case "titleAggregation": + var mv types.TitleAggregationResponse + destAddr := &mv + if err := awsRestjson1_deserializeDocumentTitleAggregationResponse(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.AggregationResponseMemberTitleAggregation{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsRestjson1_deserializeDocumentAggregationResponseList(v *[]types.AggregationResponse, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.AggregationResponse + if *v == nil { + cv = []types.AggregationResponse{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AggregationResponse + if err := awsRestjson1_deserializeDocumentAggregationResponse(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAmiAggregationResponse(v **types.AmiAggregationResponse, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AmiAggregationResponse + if *v == nil { + sv = &types.AmiAggregationResponse{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "affectedInstances": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AffectedInstances = ptr.Int64(i64) + } + + case "ami": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AmiId to be of type string, got %T instead", value) + } + sv.Ami = ptr.String(jtv) + } + + case "severityCounts": + if err := awsRestjson1_deserializeDocumentSeverityCounts(&sv.SeverityCounts, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAutoEnable(v **types.AutoEnable, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AutoEnable + if *v == nil { + sv = &types.AutoEnable{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ec2": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Ec2 = ptr.Bool(jtv) + } + + case "ecr": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Ecr = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAwsEc2InstanceDetails(v **types.AwsEc2InstanceDetails, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AwsEc2InstanceDetails + if *v == nil { + sv = &types.AwsEc2InstanceDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "iamInstanceProfileArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.IamInstanceProfileArn = ptr.String(jtv) + } + + case "imageId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ImageId = ptr.String(jtv) + } + + case "ipV4Addresses": + if err := awsRestjson1_deserializeDocumentIpV4AddressList(&sv.IpV4Addresses, value); err != nil { + return err + } + + case "ipV6Addresses": + if err := awsRestjson1_deserializeDocumentIpV6AddressList(&sv.IpV6Addresses, value); err != nil { + return err + } + + case "keyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.KeyName = ptr.String(jtv) + } + + case "launchedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LaunchedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTimeTimestamp to be a JSON Number, got %T instead", value) + + } + } + + case "platform": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Platform to be of type string, got %T instead", value) + } + sv.Platform = ptr.String(jtv) + } + + case "subnetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.SubnetId = ptr.String(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + case "vpcId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.VpcId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAwsEcrContainerAggregationResponse(v **types.AwsEcrContainerAggregationResponse, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AwsEcrContainerAggregationResponse + if *v == nil { + sv = &types.AwsEcrContainerAggregationResponse{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "architecture": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Architecture = ptr.String(jtv) + } + + case "imageSha": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ImageSha = ptr.String(jtv) + } + + case "imageTags": + if err := awsRestjson1_deserializeDocumentStringList(&sv.ImageTags, value); err != nil { + return err + } + + case "repository": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Repository = ptr.String(jtv) + } + + case "resourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + + case "severityCounts": + if err := awsRestjson1_deserializeDocumentSeverityCounts(&sv.SeverityCounts, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAwsEcrContainerImageDetails(v **types.AwsEcrContainerImageDetails, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AwsEcrContainerImageDetails + if *v == nil { + sv = &types.AwsEcrContainerImageDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "architecture": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Architecture = ptr.String(jtv) + } + + case "author": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Author = ptr.String(jtv) + } + + case "imageHash": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImageHash to be of type string, got %T instead", value) + } + sv.ImageHash = ptr.String(jtv) + } + + case "imageTags": + if err := awsRestjson1_deserializeDocumentImageTagList(&sv.ImageTags, value); err != nil { + return err + } + + case "platform": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Platform to be of type string, got %T instead", value) + } + sv.Platform = ptr.String(jtv) + } + + case "pushedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.PushedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTimeTimestamp to be a JSON Number, got %T instead", value) + + } + } + + case "registry": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Registry = ptr.String(jtv) + } + + case "repositoryName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.RepositoryName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentBadRequestException(v **types.BadRequestException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.BadRequestException + if *v == nil { + sv = &types.BadRequestException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConflictException + if *v == nil { + sv = &types.ConflictException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "resourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + + case "resourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCounts(v **types.Counts, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Counts + if *v == nil { + sv = &types.Counts{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "count": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected AggCounts to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Count = i64 + } + + case "groupKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GroupKey to be of type string, got %T instead", value) + } + sv.GroupKey = types.GroupKey(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCountsList(v *[]types.Counts, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Counts + if *v == nil { + cv = []types.Counts{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Counts + destAddr := &col + if err := awsRestjson1_deserializeDocumentCounts(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentCoveredResource(v **types.CoveredResource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CoveredResource + if *v == nil { + sv = &types.CoveredResource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "resourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + + case "resourceMetadata": + if err := awsRestjson1_deserializeDocumentResourceScanMetadata(&sv.ResourceMetadata, value); err != nil { + return err + } + + case "resourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CoverageResourceType to be of type string, got %T instead", value) + } + sv.ResourceType = types.CoverageResourceType(jtv) + } + + case "scanStatus": + if err := awsRestjson1_deserializeDocumentScanStatus(&sv.ScanStatus, value); err != nil { + return err + } + + case "scanType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScanType to be of type string, got %T instead", value) + } + sv.ScanType = types.ScanType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCoveredResources(v *[]types.CoveredResource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.CoveredResource + if *v == nil { + cv = []types.CoveredResource{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CoveredResource + destAddr := &col + if err := awsRestjson1_deserializeDocumentCoveredResource(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentCvssScore(v **types.CvssScore, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CvssScore + if *v == nil { + sv = &types.CvssScore{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "baseScore": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.BaseScore = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.BaseScore = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + case "scoringVector": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ScoringVector = ptr.String(jtv) + } + + case "source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Source = ptr.String(jtv) + } + + case "version": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Version = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCvssScoreAdjustment(v **types.CvssScoreAdjustment, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CvssScoreAdjustment + if *v == nil { + sv = &types.CvssScoreAdjustment{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "metric": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Metric = ptr.String(jtv) + } + + case "reason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Reason = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCvssScoreAdjustmentList(v *[]types.CvssScoreAdjustment, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.CvssScoreAdjustment + if *v == nil { + cv = []types.CvssScoreAdjustment{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CvssScoreAdjustment + destAddr := &col + if err := awsRestjson1_deserializeDocumentCvssScoreAdjustment(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentCvssScoreDetails(v **types.CvssScoreDetails, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CvssScoreDetails + if *v == nil { + sv = &types.CvssScoreDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "adjustments": + if err := awsRestjson1_deserializeDocumentCvssScoreAdjustmentList(&sv.Adjustments, value); err != nil { + return err + } + + case "cvssSource": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.CvssSource = ptr.String(jtv) + } + + case "score": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Score = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Score = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + case "scoreSource": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ScoreSource = ptr.String(jtv) + } + + case "scoringVector": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ScoringVector = ptr.String(jtv) + } + + case "version": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Version = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCvssScoreList(v *[]types.CvssScore, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.CvssScore + if *v == nil { + cv = []types.CvssScore{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CvssScore + destAddr := &col + if err := awsRestjson1_deserializeDocumentCvssScore(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentDateFilter(v **types.DateFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DateFilter + if *v == nil { + sv = &types.DateFilter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "endInclusive": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndInclusive = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "startInclusive": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartInclusive = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDateFilterList(v *[]types.DateFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.DateFilter + if *v == nil { + cv = []types.DateFilter{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DateFilter + destAddr := &col + if err := awsRestjson1_deserializeDocumentDateFilter(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentDelegatedAdmin(v **types.DelegatedAdmin, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DelegatedAdmin + if *v == nil { + sv = &types.DelegatedAdmin{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "relationshipStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RelationshipStatus to be of type string, got %T instead", value) + } + sv.RelationshipStatus = types.RelationshipStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDelegatedAdminAccount(v **types.DelegatedAdminAccount, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DelegatedAdminAccount + if *v == nil { + sv = &types.DelegatedAdminAccount{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DelegatedAdminStatus to be of type string, got %T instead", value) + } + sv.Status = types.DelegatedAdminStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDelegatedAdminAccountList(v *[]types.DelegatedAdminAccount, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.DelegatedAdminAccount + if *v == nil { + cv = []types.DelegatedAdminAccount{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DelegatedAdminAccount + destAddr := &col + if err := awsRestjson1_deserializeDocumentDelegatedAdminAccount(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentDestination(v **types.Destination, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Destination + if *v == nil { + sv = &types.Destination{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "bucketName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.BucketName = ptr.String(jtv) + } + + case "keyPrefix": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.KeyPrefix = ptr.String(jtv) + } + + case "kmsKeyArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.KmsKeyArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEc2InstanceAggregationResponse(v **types.Ec2InstanceAggregationResponse, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Ec2InstanceAggregationResponse + if *v == nil { + sv = &types.Ec2InstanceAggregationResponse{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "ami": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AmiId to be of type string, got %T instead", value) + } + sv.Ami = ptr.String(jtv) + } + + case "instanceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.InstanceId = ptr.String(jtv) + } + + case "instanceTags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.InstanceTags, value); err != nil { + return err + } + + case "networkFindings": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.NetworkFindings = ptr.Int64(i64) + } + + case "operatingSystem": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.OperatingSystem = ptr.String(jtv) + } + + case "severityCounts": + if err := awsRestjson1_deserializeDocumentSeverityCounts(&sv.SeverityCounts, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEc2Metadata(v **types.Ec2Metadata, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Ec2Metadata + if *v == nil { + sv = &types.Ec2Metadata{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "amiId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AmiId to be of type string, got %T instead", value) + } + sv.AmiId = ptr.String(jtv) + } + + case "platform": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Ec2Platform to be of type string, got %T instead", value) + } + sv.Platform = types.Ec2Platform(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEcrContainerImageMetadata(v **types.EcrContainerImageMetadata, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EcrContainerImageMetadata + if *v == nil { + sv = &types.EcrContainerImageMetadata{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "tags": + if err := awsRestjson1_deserializeDocumentTagList(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEcrRepositoryMetadata(v **types.EcrRepositoryMetadata, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EcrRepositoryMetadata + if *v == nil { + sv = &types.EcrRepositoryMetadata{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "scanFrequency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EcrScanFrequency to be of type string, got %T instead", value) + } + sv.ScanFrequency = types.EcrScanFrequency(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFailedAccount(v **types.FailedAccount, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.FailedAccount + if *v == nil { + sv = &types.FailedAccount{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "errorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode = types.ErrorCode(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "resourceStatus": + if err := awsRestjson1_deserializeDocumentResourceStatus(&sv.ResourceStatus, value); err != nil { + return err + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Status to be of type string, got %T instead", value) + } + sv.Status = types.Status(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFailedAccountList(v *[]types.FailedAccount, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.FailedAccount + if *v == nil { + cv = []types.FailedAccount{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.FailedAccount + destAddr := &col + if err := awsRestjson1_deserializeDocumentFailedAccount(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentFilter(v **types.Filter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Filter + if *v == nil { + sv = &types.Filter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "action": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FilterAction to be of type string, got %T instead", value) + } + sv.Action = types.FilterAction(jtv) + } + + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FilterArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTimeTimestamp to be a JSON Number, got %T instead", value) + + } + } + + case "criteria": + if err := awsRestjson1_deserializeDocumentFilterCriteria(&sv.Criteria, value); err != nil { + return err + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FilterDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FilterName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "ownerId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OwnerId to be of type string, got %T instead", value) + } + sv.OwnerId = ptr.String(jtv) + } + + case "reason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FilterReason to be of type string, got %T instead", value) + } + sv.Reason = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "updatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTimeTimestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFilterCriteria(v **types.FilterCriteria, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.FilterCriteria + if *v == nil { + sv = &types.FilterCriteria{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "awsAccountId": + if err := awsRestjson1_deserializeDocumentStringFilterList(&sv.AwsAccountId, value); err != nil { + return err + } + + case "componentId": + if err := awsRestjson1_deserializeDocumentStringFilterList(&sv.ComponentId, value); err != nil { + return err + } + + case "componentType": + if err := awsRestjson1_deserializeDocumentStringFilterList(&sv.ComponentType, value); err != nil { + return err + } + + case "ec2InstanceImageId": + if err := awsRestjson1_deserializeDocumentStringFilterList(&sv.Ec2InstanceImageId, value); err != nil { + return err + } + + case "ec2InstanceSubnetId": + if err := awsRestjson1_deserializeDocumentStringFilterList(&sv.Ec2InstanceSubnetId, value); err != nil { + return err + } + + case "ec2InstanceVpcId": + if err := awsRestjson1_deserializeDocumentStringFilterList(&sv.Ec2InstanceVpcId, value); err != nil { + return err + } + + case "ecrImageArchitecture": + if err := awsRestjson1_deserializeDocumentStringFilterList(&sv.EcrImageArchitecture, value); err != nil { + return err + } + + case "ecrImageHash": + if err := awsRestjson1_deserializeDocumentStringFilterList(&sv.EcrImageHash, value); err != nil { + return err + } + + case "ecrImagePushedAt": + if err := awsRestjson1_deserializeDocumentDateFilterList(&sv.EcrImagePushedAt, value); err != nil { + return err + } + + case "ecrImageRegistry": + if err := awsRestjson1_deserializeDocumentStringFilterList(&sv.EcrImageRegistry, value); err != nil { + return err + } + + case "ecrImageRepositoryName": + if err := awsRestjson1_deserializeDocumentStringFilterList(&sv.EcrImageRepositoryName, value); err != nil { + return err + } + + case "ecrImageTags": + if err := awsRestjson1_deserializeDocumentStringFilterList(&sv.EcrImageTags, value); err != nil { + return err + } + + case "findingArn": + if err := awsRestjson1_deserializeDocumentStringFilterList(&sv.FindingArn, value); err != nil { + return err + } + + case "findingStatus": + if err := awsRestjson1_deserializeDocumentStringFilterList(&sv.FindingStatus, value); err != nil { + return err + } + + case "findingType": + if err := awsRestjson1_deserializeDocumentStringFilterList(&sv.FindingType, value); err != nil { + return err + } + + case "firstObservedAt": + if err := awsRestjson1_deserializeDocumentDateFilterList(&sv.FirstObservedAt, value); err != nil { + return err + } + + case "inspectorScore": + if err := awsRestjson1_deserializeDocumentNumberFilterList(&sv.InspectorScore, value); err != nil { + return err + } + + case "lastObservedAt": + if err := awsRestjson1_deserializeDocumentDateFilterList(&sv.LastObservedAt, value); err != nil { + return err + } + + case "networkProtocol": + if err := awsRestjson1_deserializeDocumentStringFilterList(&sv.NetworkProtocol, value); err != nil { + return err + } + + case "portRange": + if err := awsRestjson1_deserializeDocumentPortRangeFilterList(&sv.PortRange, value); err != nil { + return err + } + + case "relatedVulnerabilities": + if err := awsRestjson1_deserializeDocumentStringFilterList(&sv.RelatedVulnerabilities, value); err != nil { + return err + } + + case "resourceId": + if err := awsRestjson1_deserializeDocumentStringFilterList(&sv.ResourceId, value); err != nil { + return err + } + + case "resourceTags": + if err := awsRestjson1_deserializeDocumentMapFilterList(&sv.ResourceTags, value); err != nil { + return err + } + + case "resourceType": + if err := awsRestjson1_deserializeDocumentStringFilterList(&sv.ResourceType, value); err != nil { + return err + } + + case "severity": + if err := awsRestjson1_deserializeDocumentStringFilterList(&sv.Severity, value); err != nil { + return err + } + + case "title": + if err := awsRestjson1_deserializeDocumentStringFilterList(&sv.Title, value); err != nil { + return err + } + + case "updatedAt": + if err := awsRestjson1_deserializeDocumentDateFilterList(&sv.UpdatedAt, value); err != nil { + return err + } + + case "vendorSeverity": + if err := awsRestjson1_deserializeDocumentStringFilterList(&sv.VendorSeverity, value); err != nil { + return err + } + + case "vulnerabilityId": + if err := awsRestjson1_deserializeDocumentStringFilterList(&sv.VulnerabilityId, value); err != nil { + return err + } + + case "vulnerabilitySource": + if err := awsRestjson1_deserializeDocumentStringFilterList(&sv.VulnerabilitySource, value); err != nil { + return err + } + + case "vulnerablePackages": + if err := awsRestjson1_deserializeDocumentPackageFilterList(&sv.VulnerablePackages, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFilterList(v *[]types.Filter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Filter + if *v == nil { + cv = []types.Filter{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Filter + destAddr := &col + if err := awsRestjson1_deserializeDocumentFilter(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentFinding(v **types.Finding, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Finding + if *v == nil { + sv = &types.Finding{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "awsAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AwsAccountId = ptr.String(jtv) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FindingDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "findingArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FindingArn to be of type string, got %T instead", value) + } + sv.FindingArn = ptr.String(jtv) + } + + case "firstObservedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.FirstObservedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTimeTimestamp to be a JSON Number, got %T instead", value) + + } + } + + case "inspectorScore": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.InspectorScore = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.InspectorScore = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + case "inspectorScoreDetails": + if err := awsRestjson1_deserializeDocumentInspectorScoreDetails(&sv.InspectorScoreDetails, value); err != nil { + return err + } + + case "lastObservedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastObservedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTimeTimestamp to be a JSON Number, got %T instead", value) + + } + } + + case "networkReachabilityDetails": + if err := awsRestjson1_deserializeDocumentNetworkReachabilityDetails(&sv.NetworkReachabilityDetails, value); err != nil { + return err + } + + case "packageVulnerabilityDetails": + if err := awsRestjson1_deserializeDocumentPackageVulnerabilityDetails(&sv.PackageVulnerabilityDetails, value); err != nil { + return err + } + + case "remediation": + if err := awsRestjson1_deserializeDocumentRemediation(&sv.Remediation, value); err != nil { + return err + } + + case "resources": + if err := awsRestjson1_deserializeDocumentResourceList(&sv.Resources, value); err != nil { + return err + } + + case "severity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Severity to be of type string, got %T instead", value) + } + sv.Severity = types.Severity(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FindingStatus to be of type string, got %T instead", value) + } + sv.Status = types.FindingStatus(jtv) + } + + case "title": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FindingTitle to be of type string, got %T instead", value) + } + sv.Title = ptr.String(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FindingType to be of type string, got %T instead", value) + } + sv.Type = types.FindingType(jtv) + } + + case "updatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTimeTimestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFindingList(v *[]types.Finding, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Finding + if *v == nil { + cv = []types.Finding{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Finding + destAddr := &col + if err := awsRestjson1_deserializeDocumentFinding(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentFindingTypeAggregationResponse(v **types.FindingTypeAggregationResponse, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.FindingTypeAggregationResponse + if *v == nil { + sv = &types.FindingTypeAggregationResponse{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "severityCounts": + if err := awsRestjson1_deserializeDocumentSeverityCounts(&sv.SeverityCounts, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFreeTrialAccountInfo(v **types.FreeTrialAccountInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.FreeTrialAccountInfo + if *v == nil { + sv = &types.FreeTrialAccountInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MeteringAccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "freeTrialInfo": + if err := awsRestjson1_deserializeDocumentFreeTrialInfoList(&sv.FreeTrialInfo, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFreeTrialAccountInfoList(v *[]types.FreeTrialAccountInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.FreeTrialAccountInfo + if *v == nil { + cv = []types.FreeTrialAccountInfo{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.FreeTrialAccountInfo + destAddr := &col + if err := awsRestjson1_deserializeDocumentFreeTrialAccountInfo(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentFreeTrialInfo(v **types.FreeTrialInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.FreeTrialInfo + if *v == nil { + sv = &types.FreeTrialInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "end": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.End = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "start": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Start = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FreeTrialStatus to be of type string, got %T instead", value) + } + sv.Status = types.FreeTrialStatus(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FreeTrialType to be of type string, got %T instead", value) + } + sv.Type = types.FreeTrialType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFreeTrialInfoError(v **types.FreeTrialInfoError, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.FreeTrialInfoError + if *v == nil { + sv = &types.FreeTrialInfoError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MeteringAccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FreeTrialInfoErrorCode to be of type string, got %T instead", value) + } + sv.Code = types.FreeTrialInfoErrorCode(jtv) + } + + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFreeTrialInfoErrorList(v *[]types.FreeTrialInfoError, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.FreeTrialInfoError + if *v == nil { + cv = []types.FreeTrialInfoError{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.FreeTrialInfoError + destAddr := &col + if err := awsRestjson1_deserializeDocumentFreeTrialInfoError(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentFreeTrialInfoList(v *[]types.FreeTrialInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.FreeTrialInfo + if *v == nil { + cv = []types.FreeTrialInfo{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.FreeTrialInfo + destAddr := &col + if err := awsRestjson1_deserializeDocumentFreeTrialInfo(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentImageLayerAggregationResponse(v **types.ImageLayerAggregationResponse, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ImageLayerAggregationResponse + if *v == nil { + sv = &types.ImageLayerAggregationResponse{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "layerHash": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.LayerHash = ptr.String(jtv) + } + + case "repository": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Repository = ptr.String(jtv) + } + + case "resourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + + case "severityCounts": + if err := awsRestjson1_deserializeDocumentSeverityCounts(&sv.SeverityCounts, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentImageTagList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentInspectorScoreDetails(v **types.InspectorScoreDetails, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InspectorScoreDetails + if *v == nil { + sv = &types.InspectorScoreDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "adjustedCvss": + if err := awsRestjson1_deserializeDocumentCvssScoreDetails(&sv.AdjustedCvss, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InternalServerException + if *v == nil { + sv = &types.InternalServerException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "retryAfterSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RetryAfterSeconds = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentIpV4AddressList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IpV4Address to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentIpV6AddressList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IpV6Address to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentMapFilter(v **types.MapFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MapFilter + if *v == nil { + sv = &types.MapFilter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "comparison": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MapComparison to be of type string, got %T instead", value) + } + sv.Comparison = types.MapComparison(jtv) + } + + case "key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MapKey to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + case "value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MapValue to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMapFilterList(v *[]types.MapFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.MapFilter + if *v == nil { + cv = []types.MapFilter{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MapFilter + destAddr := &col + if err := awsRestjson1_deserializeDocumentMapFilter(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentMember(v **types.Member, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Member + if *v == nil { + sv = &types.Member{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "delegatedAdminAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.DelegatedAdminAccountId = ptr.String(jtv) + } + + case "relationshipStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RelationshipStatus to be of type string, got %T instead", value) + } + sv.RelationshipStatus = types.RelationshipStatus(jtv) + } + + case "updatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTimeTimestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMemberList(v *[]types.Member, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Member + if *v == nil { + cv = []types.Member{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Member + destAddr := &col + if err := awsRestjson1_deserializeDocumentMember(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentNetworkPath(v **types.NetworkPath, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.NetworkPath + if *v == nil { + sv = &types.NetworkPath{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "steps": + if err := awsRestjson1_deserializeDocumentStepList(&sv.Steps, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentNetworkReachabilityDetails(v **types.NetworkReachabilityDetails, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.NetworkReachabilityDetails + if *v == nil { + sv = &types.NetworkReachabilityDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "networkPath": + if err := awsRestjson1_deserializeDocumentNetworkPath(&sv.NetworkPath, value); err != nil { + return err + } + + case "openPortRange": + if err := awsRestjson1_deserializeDocumentPortRange(&sv.OpenPortRange, value); err != nil { + return err + } + + case "protocol": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NetworkProtocol to be of type string, got %T instead", value) + } + sv.Protocol = types.NetworkProtocol(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentNonEmptyStringList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentNumberFilter(v **types.NumberFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.NumberFilter + if *v == nil { + sv = &types.NumberFilter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "lowerInclusive": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LowerInclusive = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.LowerInclusive = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + case "upperInclusive": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpperInclusive = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.UpperInclusive = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentNumberFilterList(v *[]types.NumberFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.NumberFilter + if *v == nil { + cv = []types.NumberFilter{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.NumberFilter + destAddr := &col + if err := awsRestjson1_deserializeDocumentNumberFilter(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentPackageAggregationResponse(v **types.PackageAggregationResponse, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.PackageAggregationResponse + if *v == nil { + sv = &types.PackageAggregationResponse{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "packageName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.PackageName = ptr.String(jtv) + } + + case "severityCounts": + if err := awsRestjson1_deserializeDocumentSeverityCounts(&sv.SeverityCounts, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPackageFilter(v **types.PackageFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.PackageFilter + if *v == nil { + sv = &types.PackageFilter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "architecture": + if err := awsRestjson1_deserializeDocumentStringFilter(&sv.Architecture, value); err != nil { + return err + } + + case "epoch": + if err := awsRestjson1_deserializeDocumentNumberFilter(&sv.Epoch, value); err != nil { + return err + } + + case "name": + if err := awsRestjson1_deserializeDocumentStringFilter(&sv.Name, value); err != nil { + return err + } + + case "release": + if err := awsRestjson1_deserializeDocumentStringFilter(&sv.Release, value); err != nil { + return err + } + + case "sourceLayerHash": + if err := awsRestjson1_deserializeDocumentStringFilter(&sv.SourceLayerHash, value); err != nil { + return err + } + + case "version": + if err := awsRestjson1_deserializeDocumentStringFilter(&sv.Version, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPackageFilterList(v *[]types.PackageFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.PackageFilter + if *v == nil { + cv = []types.PackageFilter{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PackageFilter + destAddr := &col + if err := awsRestjson1_deserializeDocumentPackageFilter(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentPackageVulnerabilityDetails(v **types.PackageVulnerabilityDetails, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.PackageVulnerabilityDetails + if *v == nil { + sv = &types.PackageVulnerabilityDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "cvss": + if err := awsRestjson1_deserializeDocumentCvssScoreList(&sv.Cvss, value); err != nil { + return err + } + + case "referenceUrls": + if err := awsRestjson1_deserializeDocumentNonEmptyStringList(&sv.ReferenceUrls, value); err != nil { + return err + } + + case "relatedVulnerabilities": + if err := awsRestjson1_deserializeDocumentVulnerabilityIdList(&sv.RelatedVulnerabilities, value); err != nil { + return err + } + + case "source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Source = ptr.String(jtv) + } + + case "sourceUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.SourceUrl = ptr.String(jtv) + } + + case "vendorCreatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.VendorCreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTimeTimestamp to be a JSON Number, got %T instead", value) + + } + } + + case "vendorSeverity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.VendorSeverity = ptr.String(jtv) + } + + case "vendorUpdatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.VendorUpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTimeTimestamp to be a JSON Number, got %T instead", value) + + } + } + + case "vulnerabilityId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VulnerabilityId to be of type string, got %T instead", value) + } + sv.VulnerabilityId = ptr.String(jtv) + } + + case "vulnerablePackages": + if err := awsRestjson1_deserializeDocumentVulnerablePackageList(&sv.VulnerablePackages, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPermission(v **types.Permission, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Permission + if *v == nil { + sv = &types.Permission{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "operation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Operation to be of type string, got %T instead", value) + } + sv.Operation = types.Operation(jtv) + } + + case "service": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Service to be of type string, got %T instead", value) + } + sv.Service = types.Service(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPermissions(v *[]types.Permission, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Permission + if *v == nil { + cv = []types.Permission{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Permission + destAddr := &col + if err := awsRestjson1_deserializeDocumentPermission(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentPortRange(v **types.PortRange, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.PortRange + if *v == nil { + sv = &types.PortRange{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "begin": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Port to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Begin = ptr.Int32(int32(i64)) + } + + case "end": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Port to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.End = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPortRangeFilter(v **types.PortRangeFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.PortRangeFilter + if *v == nil { + sv = &types.PortRangeFilter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "beginInclusive": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Port to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BeginInclusive = ptr.Int32(int32(i64)) + } + + case "endInclusive": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Port to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.EndInclusive = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPortRangeFilterList(v *[]types.PortRangeFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.PortRangeFilter + if *v == nil { + cv = []types.PortRangeFilter{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PortRangeFilter + destAddr := &col + if err := awsRestjson1_deserializeDocumentPortRangeFilter(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRecommendation(v **types.Recommendation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Recommendation + if *v == nil { + sv = &types.Recommendation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "text": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Text = ptr.String(jtv) + } + + case "Url": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Url = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRemediation(v **types.Remediation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Remediation + if *v == nil { + sv = &types.Remediation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "recommendation": + if err := awsRestjson1_deserializeDocumentRecommendation(&sv.Recommendation, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRepositoryAggregationResponse(v **types.RepositoryAggregationResponse, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RepositoryAggregationResponse + if *v == nil { + sv = &types.RepositoryAggregationResponse{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "affectedImages": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AffectedImages = ptr.Int64(i64) + } + + case "repository": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Repository = ptr.String(jtv) + } + + case "severityCounts": + if err := awsRestjson1_deserializeDocumentSeverityCounts(&sv.SeverityCounts, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentResource(v **types.Resource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Resource + if *v == nil { + sv = &types.Resource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "details": + if err := awsRestjson1_deserializeDocumentResourceDetails(&sv.Details, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "partition": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Partition = ptr.String(jtv) + } + + case "region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Region = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value) + } + sv.Type = types.ResourceType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentResourceDetails(v **types.ResourceDetails, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceDetails + if *v == nil { + sv = &types.ResourceDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "awsEc2Instance": + if err := awsRestjson1_deserializeDocumentAwsEc2InstanceDetails(&sv.AwsEc2Instance, value); err != nil { + return err + } + + case "awsEcrContainerImage": + if err := awsRestjson1_deserializeDocumentAwsEcrContainerImageDetails(&sv.AwsEcrContainerImage, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentResourceList(v *[]types.Resource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Resource + if *v == nil { + cv = []types.Resource{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Resource + destAddr := &col + if err := awsRestjson1_deserializeDocumentResource(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceNotFoundException + if *v == nil { + sv = &types.ResourceNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentResourceScanMetadata(v **types.ResourceScanMetadata, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceScanMetadata + if *v == nil { + sv = &types.ResourceScanMetadata{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ec2": + if err := awsRestjson1_deserializeDocumentEc2Metadata(&sv.Ec2, value); err != nil { + return err + } + + case "ecrImage": + if err := awsRestjson1_deserializeDocumentEcrContainerImageMetadata(&sv.EcrImage, value); err != nil { + return err + } + + case "ecrRepository": + if err := awsRestjson1_deserializeDocumentEcrRepositoryMetadata(&sv.EcrRepository, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentResourceState(v **types.ResourceState, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceState + if *v == nil { + sv = &types.ResourceState{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ec2": + if err := awsRestjson1_deserializeDocumentState(&sv.Ec2, value); err != nil { + return err + } + + case "ecr": + if err := awsRestjson1_deserializeDocumentState(&sv.Ecr, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentResourceStatus(v **types.ResourceStatus, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceStatus + if *v == nil { + sv = &types.ResourceStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ec2": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Status to be of type string, got %T instead", value) + } + sv.Ec2 = types.Status(jtv) + } + + case "ecr": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Status to be of type string, got %T instead", value) + } + sv.Ecr = types.Status(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentScanStatus(v **types.ScanStatus, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ScanStatus + if *v == nil { + sv = &types.ScanStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "reason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScanStatusReason to be of type string, got %T instead", value) + } + sv.Reason = types.ScanStatusReason(jtv) + } + + case "statusCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScanStatusCode to be of type string, got %T instead", value) + } + sv.StatusCode = types.ScanStatusCode(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ServiceQuotaExceededException + if *v == nil { + sv = &types.ServiceQuotaExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "resourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSeverityCounts(v **types.SeverityCounts, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SeverityCounts + if *v == nil { + sv = &types.SeverityCounts{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "all": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.All = ptr.Int64(i64) + } + + case "critical": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Critical = ptr.Int64(i64) + } + + case "high": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.High = ptr.Int64(i64) + } + + case "medium": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Medium = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentState(v **types.State, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.State + if *v == nil { + sv = &types.State{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode = types.ErrorCode(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Status to be of type string, got %T instead", value) + } + sv.Status = types.Status(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentStep(v **types.Step, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Step + if *v == nil { + sv = &types.Step{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "componentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Component to be of type string, got %T instead", value) + } + sv.ComponentId = ptr.String(jtv) + } + + case "componentType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComponentType to be of type string, got %T instead", value) + } + sv.ComponentType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentStepList(v *[]types.Step, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Step + if *v == nil { + cv = []types.Step{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Step + destAddr := &col + if err := awsRestjson1_deserializeDocumentStep(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentStringFilter(v **types.StringFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.StringFilter + if *v == nil { + sv = &types.StringFilter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "comparison": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringComparison to be of type string, got %T instead", value) + } + sv.Comparison = types.StringComparison(jtv) + } + + case "value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringInput to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentStringFilterList(v *[]types.StringFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.StringFilter + if *v == nil { + cv = []types.StringFilter{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.StringFilter + destAddr := &col + if err := awsRestjson1_deserializeDocumentStringFilter(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentStringList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentTagList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentTagMap(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MapValue to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ThrottlingException + if *v == nil { + sv = &types.ThrottlingException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTitleAggregationResponse(v **types.TitleAggregationResponse, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.TitleAggregationResponse + if *v == nil { + sv = &types.TitleAggregationResponse{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "severityCounts": + if err := awsRestjson1_deserializeDocumentSeverityCounts(&sv.SeverityCounts, value); err != nil { + return err + } + + case "title": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Title = ptr.String(jtv) + } + + case "vulnerabilityId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.VulnerabilityId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentUsage(v **types.Usage, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Usage + if *v == nil { + sv = &types.Usage{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "currency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Currency to be of type string, got %T instead", value) + } + sv.Currency = types.Currency(jtv) + } + + case "estimatedMonthlyCost": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EstimatedMonthlyCost = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.EstimatedMonthlyCost = f64 + + default: + return fmt.Errorf("expected MonthlyCostEstimate to be a JSON Number, got %T instead", value) + + } + } + + case "total": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Total = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Total = f64 + + default: + return fmt.Errorf("expected UsageValue to be a JSON Number, got %T instead", value) + + } + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UsageType to be of type string, got %T instead", value) + } + sv.Type = types.UsageType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentUsageList(v *[]types.Usage, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Usage + if *v == nil { + cv = []types.Usage{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Usage + destAddr := &col + if err := awsRestjson1_deserializeDocumentUsage(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentUsageTotal(v **types.UsageTotal, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.UsageTotal + if *v == nil { + sv = &types.UsageTotal{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MeteringAccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "usage": + if err := awsRestjson1_deserializeDocumentUsageList(&sv.Usage, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentUsageTotalList(v *[]types.UsageTotal, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.UsageTotal + if *v == nil { + cv = []types.UsageTotal{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.UsageTotal + destAddr := &col + if err := awsRestjson1_deserializeDocumentUsageTotal(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ValidationException + if *v == nil { + sv = &types.ValidationException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "fields": + if err := awsRestjson1_deserializeDocumentValidationExceptionFields(&sv.Fields, value); err != nil { + return err + } + + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "reason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ValidationExceptionReason to be of type string, got %T instead", value) + } + sv.Reason = types.ValidationExceptionReason(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentValidationExceptionField(v **types.ValidationExceptionField, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ValidationExceptionField + if *v == nil { + sv = &types.ValidationExceptionField{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentValidationExceptionFields(v *[]types.ValidationExceptionField, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ValidationExceptionField + if *v == nil { + cv = []types.ValidationExceptionField{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ValidationExceptionField + destAddr := &col + if err := awsRestjson1_deserializeDocumentValidationExceptionField(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentVulnerabilityIdList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VulnerabilityId to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentVulnerablePackage(v **types.VulnerablePackage, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.VulnerablePackage + if *v == nil { + sv = &types.VulnerablePackage{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arch": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageArchitecture to be of type string, got %T instead", value) + } + sv.Arch = ptr.String(jtv) + } + + case "epoch": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PackageEpoch to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Epoch = int32(i64) + } + + case "filePath": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FilePath to be of type string, got %T instead", value) + } + sv.FilePath = ptr.String(jtv) + } + + case "fixedInVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageVersion to be of type string, got %T instead", value) + } + sv.FixedInVersion = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "packageManager": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageManager to be of type string, got %T instead", value) + } + sv.PackageManager = types.PackageManager(jtv) + } + + case "release": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageRelease to be of type string, got %T instead", value) + } + sv.Release = ptr.String(jtv) + } + + case "sourceLayerHash": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SourceLayerHash to be of type string, got %T instead", value) + } + sv.SourceLayerHash = ptr.String(jtv) + } + + case "version": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageVersion to be of type string, got %T instead", value) + } + sv.Version = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentVulnerablePackageList(v *[]types.VulnerablePackage, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.VulnerablePackage + if *v == nil { + cv = []types.VulnerablePackage{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.VulnerablePackage + destAddr := &col + if err := awsRestjson1_deserializeDocumentVulnerablePackage(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} diff --git a/service/inspector2/doc.go b/service/inspector2/doc.go new file mode 100644 index 00000000000..4ae387099e5 --- /dev/null +++ b/service/inspector2/doc.go @@ -0,0 +1,9 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package inspector2 provides the API client, operations, and parameter types for +// Inspector2. +// +// Amazon Inspector is a vulnerability discovery service that automates continuous +// scanning for security vulnerabilities within your Amazon EC2 and Amazon ECR +// environments. +package inspector2 diff --git a/service/inspector2/endpoints.go b/service/inspector2/endpoints.go new file mode 100644 index 00000000000..0080105722c --- /dev/null +++ b/service/inspector2/endpoints.go @@ -0,0 +1,200 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + internalendpoints "github.com/aws/aws-sdk-go-v2/service/inspector2/internal/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/url" + "strings" +) + +// EndpointResolverOptions is the service endpoint resolver options +type EndpointResolverOptions = internalendpoints.Options + +// EndpointResolver interface for resolving service endpoints. +type EndpointResolver interface { + ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) +} + +var _ EndpointResolver = &internalendpoints.Resolver{} + +// NewDefaultEndpointResolver constructs a new service endpoint resolver +func NewDefaultEndpointResolver() *internalendpoints.Resolver { + return internalendpoints.New() +} + +// EndpointResolverFunc is a helper utility that wraps a function so it satisfies +// the EndpointResolver interface. This is useful when you want to add additional +// endpoint resolving logic, or stub out specific endpoints with custom values. +type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) + +func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + return fn(region, options) +} + +func resolveDefaultEndpointConfiguration(o *Options) { + if o.EndpointResolver != nil { + return + } + o.EndpointResolver = NewDefaultEndpointResolver() +} + +// EndpointResolverFromURL returns an EndpointResolver configured using the +// provided endpoint url. By default, the resolved endpoint resolver uses the +// client region as signing region, and the endpoint source is set to +// EndpointSourceCustom.You can provide functional options to configure endpoint +// values for the resolved endpoint. +func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { + e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} + for _, fn := range optFns { + fn(&e) + } + + return EndpointResolverFunc( + func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { + if len(e.SigningRegion) == 0 { + e.SigningRegion = region + } + return e, nil + }, + ) +} + +type ResolveEndpoint struct { + Resolver EndpointResolver + Options EndpointResolverOptions +} + +func (*ResolveEndpoint) ID() string { + return "ResolveEndpoint" +} + +func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.Resolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + eo := m.Options + eo.Logger = middleware.GetLogger(ctx) + + var endpoint aws.Endpoint + endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL, err = url.Parse(endpoint.URL) + if err != nil { + return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) + } + + if len(awsmiddleware.GetSigningName(ctx)) == 0 { + signingName := endpoint.SigningName + if len(signingName) == 0 { + signingName = "inspector2" + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + } + ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) + ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) + ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) + ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) + return next.HandleSerialize(ctx, in) +} +func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { + return stack.Serialize.Insert(&ResolveEndpoint{ + Resolver: o.EndpointResolver, + Options: o.EndpointOptions, + }, "OperationSerializer", middleware.Before) +} + +func removeResolveEndpointMiddleware(stack *middleware.Stack) error { + _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) + return err +} + +type wrappedEndpointResolver struct { + awsResolver aws.EndpointResolverWithOptions + resolver EndpointResolver +} + +func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + if w.awsResolver == nil { + goto fallback + } + endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options) + if err == nil { + return endpoint, nil + } + + if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) { + return endpoint, err + } + +fallback: + if w.resolver == nil { + return endpoint, fmt.Errorf("default endpoint resolver provided was nil") + } + return w.resolver.ResolveEndpoint(region, options) +} + +type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) + +func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { + return a(service, region) +} + +var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) + +// withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. +// If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided +// fallbackResolver for resolution. +// +// fallbackResolver must not be nil +func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver { + var resolver aws.EndpointResolverWithOptions + + if awsResolverWithOptions != nil { + resolver = awsResolverWithOptions + } else if awsResolver != nil { + resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) + } + + return &wrappedEndpointResolver{ + awsResolver: resolver, + resolver: fallbackResolver, + } +} + +func finalizeClientEndpointResolverOptions(options *Options) { + options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() + + if len(options.EndpointOptions.ResolvedRegion) == 0 { + const fipsInfix = "-fips-" + const fipsPrefix = "fips-" + const fipsSuffix = "-fips" + + if strings.Contains(options.Region, fipsInfix) || + strings.Contains(options.Region, fipsPrefix) || + strings.Contains(options.Region, fipsSuffix) { + options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( + options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") + options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled + } + } + +} diff --git a/service/inspector2/generated.json b/service/inspector2/generated.json new file mode 100644 index 00000000000..bb7b021e3f7 --- /dev/null +++ b/service/inspector2/generated.json @@ -0,0 +1,57 @@ +{ + "dependencies": { + "github.com/aws/aws-sdk-go-v2": "v1.4.0", + "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", + "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", + "github.com/aws/smithy-go": "v1.4.0" + }, + "files": [ + "api_client.go", + "api_op_AssociateMember.go", + "api_op_BatchGetAccountStatus.go", + "api_op_BatchGetFreeTrialInfo.go", + "api_op_CancelFindingsReport.go", + "api_op_CreateFilter.go", + "api_op_CreateFindingsReport.go", + "api_op_DeleteFilter.go", + "api_op_DescribeOrganizationConfiguration.go", + "api_op_Disable.go", + "api_op_DisableDelegatedAdminAccount.go", + "api_op_DisassociateMember.go", + "api_op_Enable.go", + "api_op_EnableDelegatedAdminAccount.go", + "api_op_GetDelegatedAdminAccount.go", + "api_op_GetFindingsReportStatus.go", + "api_op_GetMember.go", + "api_op_ListAccountPermissions.go", + "api_op_ListCoverage.go", + "api_op_ListCoverageStatistics.go", + "api_op_ListDelegatedAdminAccounts.go", + "api_op_ListFilters.go", + "api_op_ListFindingAggregations.go", + "api_op_ListFindings.go", + "api_op_ListMembers.go", + "api_op_ListTagsForResource.go", + "api_op_ListUsageTotals.go", + "api_op_TagResource.go", + "api_op_UntagResource.go", + "api_op_UpdateFilter.go", + "api_op_UpdateOrganizationConfiguration.go", + "deserializers.go", + "doc.go", + "endpoints.go", + "generated.json", + "internal/endpoints/endpoints.go", + "internal/endpoints/endpoints_test.go", + "protocol_test.go", + "serializers.go", + "types/enums.go", + "types/errors.go", + "types/types.go", + "types/types_exported_test.go", + "validators.go" + ], + "go": "1.15", + "module": "github.com/aws/aws-sdk-go-v2/service/inspector2", + "unstable": false +} diff --git a/service/inspector2/go.mod b/service/inspector2/go.mod new file mode 100644 index 00000000000..6ad27b0811a --- /dev/null +++ b/service/inspector2/go.mod @@ -0,0 +1,16 @@ +module github.com/aws/aws-sdk-go-v2/service/inspector2 + +go 1.15 + +require ( + github.com/aws/aws-sdk-go-v2 v1.11.1 + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.1 + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.0.1 + github.com/aws/smithy-go v1.9.0 +) + +replace github.com/aws/aws-sdk-go-v2 => ../../ + +replace github.com/aws/aws-sdk-go-v2/internal/configsources => ../../internal/configsources/ + +replace github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 => ../../internal/endpoints/v2/ diff --git a/service/inspector2/go.sum b/service/inspector2/go.sum new file mode 100644 index 00000000000..45efc0b1e03 --- /dev/null +++ b/service/inspector2/go.sum @@ -0,0 +1,14 @@ +github.com/aws/smithy-go v1.9.0 h1:c7FUdEqrQA1/UVKKCNDFQPNKGp4FQg3YW4Ck5SLTG58= +github.com/aws/smithy-go v1.9.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/service/inspector2/go_module_metadata.go b/service/inspector2/go_module_metadata.go new file mode 100644 index 00000000000..4b384d9f101 --- /dev/null +++ b/service/inspector2/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package inspector2 + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "tip" diff --git a/service/inspector2/internal/endpoints/endpoints.go b/service/inspector2/internal/endpoints/endpoints.go new file mode 100644 index 00000000000..c261cd6a488 --- /dev/null +++ b/service/inspector2/internal/endpoints/endpoints.go @@ -0,0 +1,250 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "github.com/aws/aws-sdk-go-v2/aws" + endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" + "github.com/aws/smithy-go/logging" + "regexp" +) + +// Options is the endpoint resolver configuration options +type Options struct { + // Logger is a logging implementation that log events should be sent to. + Logger logging.Logger + + // LogDeprecated indicates that deprecated endpoints should be logged to the + // provided logger. + LogDeprecated bool + + // ResolvedRegion is used to override the region to be resolved, rather then the + // using the value passed to the ResolveEndpoint method. This value is used by the + // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative + // name. You must not set this value directly in your application. + ResolvedRegion string + + // DisableHTTPS informs the resolver to return an endpoint that does not use the + // HTTPS scheme. + DisableHTTPS bool + + // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. + UseDualStackEndpoint aws.DualStackEndpointState + + // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. + UseFIPSEndpoint aws.FIPSEndpointState +} + +func (o Options) GetResolvedRegion() string { + return o.ResolvedRegion +} + +func (o Options) GetDisableHTTPS() bool { + return o.DisableHTTPS +} + +func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { + return o.UseDualStackEndpoint +} + +func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { + return o.UseFIPSEndpoint +} + +func transformToSharedOptions(options Options) endpoints.Options { + return endpoints.Options{ + Logger: options.Logger, + LogDeprecated: options.LogDeprecated, + ResolvedRegion: options.ResolvedRegion, + DisableHTTPS: options.DisableHTTPS, + UseDualStackEndpoint: options.UseDualStackEndpoint, + UseFIPSEndpoint: options.UseFIPSEndpoint, + } +} + +// Resolver Inspector2 endpoint resolver +type Resolver struct { + partitions endpoints.Partitions +} + +// ResolveEndpoint resolves the service endpoint for the given region and options +func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { + if len(region) == 0 { + return endpoint, &aws.MissingRegionError{} + } + + opt := transformToSharedOptions(options) + return r.partitions.ResolveEndpoint(region, opt) +} + +// New returns a new Resolver +func New() *Resolver { + return &Resolver{ + partitions: defaultPartitions, + } +} + +var partitionRegexp = struct { + Aws *regexp.Regexp + AwsCn *regexp.Regexp + AwsIso *regexp.Regexp + AwsIsoB *regexp.Regexp + AwsUsGov *regexp.Regexp +}{ + + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"), + AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), + AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), + AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), + AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), +} + +var defaultPartitions = endpoints.Partitions{ + { + ID: "aws", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "inspector2.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "inspector2-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "inspector2-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "inspector2.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: true, + }, + { + ID: "aws-cn", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "inspector2.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "inspector2-fips.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "inspector2-fips.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "inspector2.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsCn, + IsRegionalized: true, + }, + { + ID: "aws-iso", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "inspector2-fips.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "inspector2.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIso, + IsRegionalized: true, + }, + { + ID: "aws-iso-b", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "inspector2-fips.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "inspector2.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoB, + IsRegionalized: true, + }, + { + ID: "aws-us-gov", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "inspector2.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "inspector2-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "inspector2-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "inspector2.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: true, + }, +} diff --git a/service/inspector2/internal/endpoints/endpoints_test.go b/service/inspector2/internal/endpoints/endpoints_test.go new file mode 100644 index 00000000000..08e5da2d833 --- /dev/null +++ b/service/inspector2/internal/endpoints/endpoints_test.go @@ -0,0 +1,11 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "testing" +) + +func TestRegexCompile(t *testing.T) { + _ = defaultPartitions +} diff --git a/service/inspector2/protocol_test.go b/service/inspector2/protocol_test.go new file mode 100644 index 00000000000..fed5ff24da4 --- /dev/null +++ b/service/inspector2/protocol_test.go @@ -0,0 +1,3 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 diff --git a/service/inspector2/serializers.go b/service/inspector2/serializers.go new file mode 100644 index 00000000000..106b007383a --- /dev/null +++ b/service/inspector2/serializers.go @@ -0,0 +1,3325 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "bytes" + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/inspector2/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/encoding/httpbinding" + smithyjson "github.com/aws/smithy-go/encoding/json" + "github.com/aws/smithy-go/middleware" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + "math" +) + +type awsRestjson1_serializeOpAssociateMember struct { +} + +func (*awsRestjson1_serializeOpAssociateMember) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpAssociateMember) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*AssociateMemberInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/members/associate") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentAssociateMemberInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsAssociateMemberInput(v *AssociateMemberInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentAssociateMemberInput(v *AssociateMemberInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountId != nil { + ok := object.Key("accountId") + ok.String(*v.AccountId) + } + + return nil +} + +type awsRestjson1_serializeOpBatchGetAccountStatus struct { +} + +func (*awsRestjson1_serializeOpBatchGetAccountStatus) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpBatchGetAccountStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*BatchGetAccountStatusInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/status/batch/get") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentBatchGetAccountStatusInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsBatchGetAccountStatusInput(v *BatchGetAccountStatusInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentBatchGetAccountStatusInput(v *BatchGetAccountStatusInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountIds != nil { + ok := object.Key("accountIds") + if err := awsRestjson1_serializeDocumentAccountIdSet(v.AccountIds, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpBatchGetFreeTrialInfo struct { +} + +func (*awsRestjson1_serializeOpBatchGetFreeTrialInfo) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpBatchGetFreeTrialInfo) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*BatchGetFreeTrialInfoInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/freetrialinfo/batchget") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentBatchGetFreeTrialInfoInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsBatchGetFreeTrialInfoInput(v *BatchGetFreeTrialInfoInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentBatchGetFreeTrialInfoInput(v *BatchGetFreeTrialInfoInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountIds != nil { + ok := object.Key("accountIds") + if err := awsRestjson1_serializeDocumentMeteringAccountIdList(v.AccountIds, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCancelFindingsReport struct { +} + +func (*awsRestjson1_serializeOpCancelFindingsReport) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCancelFindingsReport) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CancelFindingsReportInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/reporting/cancel") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCancelFindingsReportInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCancelFindingsReportInput(v *CancelFindingsReportInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCancelFindingsReportInput(v *CancelFindingsReportInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ReportId != nil { + ok := object.Key("reportId") + ok.String(*v.ReportId) + } + + return nil +} + +type awsRestjson1_serializeOpCreateFilter struct { +} + +func (*awsRestjson1_serializeOpCreateFilter) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateFilter) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateFilterInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/filters/create") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateFilterInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateFilterInput(v *CreateFilterInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateFilterInput(v *CreateFilterInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Action) > 0 { + ok := object.Key("action") + ok.String(string(v.Action)) + } + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.FilterCriteria != nil { + ok := object.Key("filterCriteria") + if err := awsRestjson1_serializeDocumentFilterCriteria(v.FilterCriteria, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCreateFindingsReport struct { +} + +func (*awsRestjson1_serializeOpCreateFindingsReport) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateFindingsReport) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateFindingsReportInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/reporting/create") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateFindingsReportInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateFindingsReportInput(v *CreateFindingsReportInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateFindingsReportInput(v *CreateFindingsReportInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FilterCriteria != nil { + ok := object.Key("filterCriteria") + if err := awsRestjson1_serializeDocumentFilterCriteria(v.FilterCriteria, ok); err != nil { + return err + } + } + + if len(v.ReportFormat) > 0 { + ok := object.Key("reportFormat") + ok.String(string(v.ReportFormat)) + } + + if v.S3Destination != nil { + ok := object.Key("s3Destination") + if err := awsRestjson1_serializeDocumentDestination(v.S3Destination, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteFilter struct { +} + +func (*awsRestjson1_serializeOpDeleteFilter) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteFilter) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteFilterInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/filters/delete") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentDeleteFilterInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteFilterInput(v *DeleteFilterInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDeleteFilterInput(v *DeleteFilterInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Arn != nil { + ok := object.Key("arn") + ok.String(*v.Arn) + } + + return nil +} + +type awsRestjson1_serializeOpDescribeOrganizationConfiguration struct { +} + +func (*awsRestjson1_serializeOpDescribeOrganizationConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeOrganizationConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeOrganizationConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/organizationconfiguration/describe") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeOrganizationConfigurationInput(v *DescribeOrganizationConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestjson1_serializeOpDisable struct { +} + +func (*awsRestjson1_serializeOpDisable) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDisable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DisableInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/disable") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentDisableInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDisableInput(v *DisableInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDisableInput(v *DisableInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountIds != nil { + ok := object.Key("accountIds") + if err := awsRestjson1_serializeDocumentAccountIdSet(v.AccountIds, ok); err != nil { + return err + } + } + + if v.ResourceTypes != nil { + ok := object.Key("resourceTypes") + if err := awsRestjson1_serializeDocumentDisableResourceTypeList(v.ResourceTypes, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDisableDelegatedAdminAccount struct { +} + +func (*awsRestjson1_serializeOpDisableDelegatedAdminAccount) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDisableDelegatedAdminAccount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DisableDelegatedAdminAccountInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/delegatedadminaccounts/disable") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentDisableDelegatedAdminAccountInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDisableDelegatedAdminAccountInput(v *DisableDelegatedAdminAccountInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDisableDelegatedAdminAccountInput(v *DisableDelegatedAdminAccountInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DelegatedAdminAccountId != nil { + ok := object.Key("delegatedAdminAccountId") + ok.String(*v.DelegatedAdminAccountId) + } + + return nil +} + +type awsRestjson1_serializeOpDisassociateMember struct { +} + +func (*awsRestjson1_serializeOpDisassociateMember) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDisassociateMember) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DisassociateMemberInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/members/disassociate") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentDisassociateMemberInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDisassociateMemberInput(v *DisassociateMemberInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDisassociateMemberInput(v *DisassociateMemberInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountId != nil { + ok := object.Key("accountId") + ok.String(*v.AccountId) + } + + return nil +} + +type awsRestjson1_serializeOpEnable struct { +} + +func (*awsRestjson1_serializeOpEnable) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpEnable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*EnableInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/enable") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentEnableInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsEnableInput(v *EnableInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentEnableInput(v *EnableInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountIds != nil { + ok := object.Key("accountIds") + if err := awsRestjson1_serializeDocumentAccountIdSet(v.AccountIds, ok); err != nil { + return err + } + } + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.ResourceTypes != nil { + ok := object.Key("resourceTypes") + if err := awsRestjson1_serializeDocumentEnableResourceTypeList(v.ResourceTypes, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpEnableDelegatedAdminAccount struct { +} + +func (*awsRestjson1_serializeOpEnableDelegatedAdminAccount) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpEnableDelegatedAdminAccount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*EnableDelegatedAdminAccountInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/delegatedadminaccounts/enable") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentEnableDelegatedAdminAccountInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsEnableDelegatedAdminAccountInput(v *EnableDelegatedAdminAccountInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentEnableDelegatedAdminAccountInput(v *EnableDelegatedAdminAccountInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.DelegatedAdminAccountId != nil { + ok := object.Key("delegatedAdminAccountId") + ok.String(*v.DelegatedAdminAccountId) + } + + return nil +} + +type awsRestjson1_serializeOpGetDelegatedAdminAccount struct { +} + +func (*awsRestjson1_serializeOpGetDelegatedAdminAccount) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetDelegatedAdminAccount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetDelegatedAdminAccountInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/delegatedadminaccounts/get") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetDelegatedAdminAccountInput(v *GetDelegatedAdminAccountInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestjson1_serializeOpGetFindingsReportStatus struct { +} + +func (*awsRestjson1_serializeOpGetFindingsReportStatus) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetFindingsReportStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetFindingsReportStatusInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/reporting/status/get") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentGetFindingsReportStatusInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetFindingsReportStatusInput(v *GetFindingsReportStatusInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentGetFindingsReportStatusInput(v *GetFindingsReportStatusInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ReportId != nil { + ok := object.Key("reportId") + ok.String(*v.ReportId) + } + + return nil +} + +type awsRestjson1_serializeOpGetMember struct { +} + +func (*awsRestjson1_serializeOpGetMember) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetMember) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetMemberInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/members/get") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentGetMemberInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetMemberInput(v *GetMemberInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentGetMemberInput(v *GetMemberInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountId != nil { + ok := object.Key("accountId") + ok.String(*v.AccountId) + } + + return nil +} + +type awsRestjson1_serializeOpListAccountPermissions struct { +} + +func (*awsRestjson1_serializeOpListAccountPermissions) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListAccountPermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListAccountPermissionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accountpermissions/list") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentListAccountPermissionsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListAccountPermissionsInput(v *ListAccountPermissionsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListAccountPermissionsInput(v *ListAccountPermissionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if len(v.Service) > 0 { + ok := object.Key("service") + ok.String(string(v.Service)) + } + + return nil +} + +type awsRestjson1_serializeOpListCoverage struct { +} + +func (*awsRestjson1_serializeOpListCoverage) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListCoverage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListCoverageInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/coverage/list") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentListCoverageInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListCoverageInput(v *ListCoverageInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListCoverageInput(v *ListCoverageInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FilterCriteria != nil { + ok := object.Key("filterCriteria") + if err := awsRestjson1_serializeDocumentCoverageFilterCriteria(v.FilterCriteria, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListCoverageStatistics struct { +} + +func (*awsRestjson1_serializeOpListCoverageStatistics) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListCoverageStatistics) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListCoverageStatisticsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/coverage/statistics/list") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentListCoverageStatisticsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListCoverageStatisticsInput(v *ListCoverageStatisticsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListCoverageStatisticsInput(v *ListCoverageStatisticsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FilterCriteria != nil { + ok := object.Key("filterCriteria") + if err := awsRestjson1_serializeDocumentCoverageFilterCriteria(v.FilterCriteria, ok); err != nil { + return err + } + } + + if len(v.GroupBy) > 0 { + ok := object.Key("groupBy") + ok.String(string(v.GroupBy)) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListDelegatedAdminAccounts struct { +} + +func (*awsRestjson1_serializeOpListDelegatedAdminAccounts) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListDelegatedAdminAccounts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListDelegatedAdminAccountsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/delegatedadminaccounts/list") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentListDelegatedAdminAccountsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListDelegatedAdminAccountsInput(v *ListDelegatedAdminAccountsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListDelegatedAdminAccountsInput(v *ListDelegatedAdminAccountsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListFilters struct { +} + +func (*awsRestjson1_serializeOpListFilters) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListFilters) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListFiltersInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/filters/list") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentListFiltersInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListFiltersInput(v *ListFiltersInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListFiltersInput(v *ListFiltersInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Action) > 0 { + ok := object.Key("action") + ok.String(string(v.Action)) + } + + if v.Arns != nil { + ok := object.Key("arns") + if err := awsRestjson1_serializeDocumentFilterArnList(v.Arns, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListFindingAggregations struct { +} + +func (*awsRestjson1_serializeOpListFindingAggregations) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListFindingAggregations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListFindingAggregationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/findings/aggregation/list") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentListFindingAggregationsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListFindingAggregationsInput(v *ListFindingAggregationsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListFindingAggregationsInput(v *ListFindingAggregationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountIds != nil { + ok := object.Key("accountIds") + if err := awsRestjson1_serializeDocumentStringFilterList(v.AccountIds, ok); err != nil { + return err + } + } + + if v.AggregationRequest != nil { + ok := object.Key("aggregationRequest") + if err := awsRestjson1_serializeDocumentAggregationRequest(v.AggregationRequest, ok); err != nil { + return err + } + } + + if len(v.AggregationType) > 0 { + ok := object.Key("aggregationType") + ok.String(string(v.AggregationType)) + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListFindings struct { +} + +func (*awsRestjson1_serializeOpListFindings) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListFindings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListFindingsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/findings/list") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentListFindingsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListFindingsInput(v *ListFindingsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListFindingsInput(v *ListFindingsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FilterCriteria != nil { + ok := object.Key("filterCriteria") + if err := awsRestjson1_serializeDocumentFilterCriteria(v.FilterCriteria, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.SortCriteria != nil { + ok := object.Key("sortCriteria") + if err := awsRestjson1_serializeDocumentSortCriteria(v.SortCriteria, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpListMembers struct { +} + +func (*awsRestjson1_serializeOpListMembers) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListMembers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListMembersInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/members/list") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentListMembersInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListMembersInput(v *ListMembersInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListMembersInput(v *ListMembersInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.OnlyAssociated != nil { + ok := object.Key("onlyAssociated") + ok.Boolean(*v.OnlyAssociated) + } + + return nil +} + +type awsRestjson1_serializeOpListTagsForResource struct { +} + +func (*awsRestjson1_serializeOpListTagsForResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListTagsForResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpListUsageTotals struct { +} + +func (*awsRestjson1_serializeOpListUsageTotals) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListUsageTotals) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListUsageTotalsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/usage/list") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentListUsageTotalsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListUsageTotalsInput(v *ListUsageTotalsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListUsageTotalsInput(v *ListUsageTotalsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountIds != nil { + ok := object.Key("accountIds") + if err := awsRestjson1_serializeDocumentUsageAccountIdList(v.AccountIds, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpTagResource struct { +} + +func (*awsRestjson1_serializeOpTagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*TagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUntagResource struct { +} + +func (*awsRestjson1_serializeOpUntagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UntagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + if v.TagKeys != nil { + for i := range v.TagKeys { + encoder.AddQuery("tagKeys").String(v.TagKeys[i]) + } + } + + return nil +} + +type awsRestjson1_serializeOpUpdateFilter struct { +} + +func (*awsRestjson1_serializeOpUpdateFilter) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateFilter) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateFilterInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/filters/update") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateFilterInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateFilterInput(v *UpdateFilterInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateFilterInput(v *UpdateFilterInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Action) > 0 { + ok := object.Key("action") + ok.String(string(v.Action)) + } + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.FilterArn != nil { + ok := object.Key("filterArn") + ok.String(*v.FilterArn) + } + + if v.FilterCriteria != nil { + ok := object.Key("filterCriteria") + if err := awsRestjson1_serializeDocumentFilterCriteria(v.FilterCriteria, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + return nil +} + +type awsRestjson1_serializeOpUpdateOrganizationConfiguration struct { +} + +func (*awsRestjson1_serializeOpUpdateOrganizationConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateOrganizationConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateOrganizationConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/organizationconfiguration/update") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateOrganizationConfigurationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateOrganizationConfigurationInput(v *UpdateOrganizationConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateOrganizationConfigurationInput(v *UpdateOrganizationConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AutoEnable != nil { + ok := object.Key("autoEnable") + if err := awsRestjson1_serializeDocumentAutoEnable(v.AutoEnable, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentAccountAggregation(v *types.AccountAggregation, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.FindingType) > 0 { + ok := object.Key("findingType") + ok.String(string(v.FindingType)) + } + + if len(v.ResourceType) > 0 { + ok := object.Key("resourceType") + ok.String(string(v.ResourceType)) + } + + if len(v.SortBy) > 0 { + ok := object.Key("sortBy") + ok.String(string(v.SortBy)) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("sortOrder") + ok.String(string(v.SortOrder)) + } + + return nil +} + +func awsRestjson1_serializeDocumentAccountIdSet(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentAggregationRequest(v types.AggregationRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.AggregationRequestMemberAccountAggregation: + av := object.Key("accountAggregation") + if err := awsRestjson1_serializeDocumentAccountAggregation(&uv.Value, av); err != nil { + return err + } + + case *types.AggregationRequestMemberAmiAggregation: + av := object.Key("amiAggregation") + if err := awsRestjson1_serializeDocumentAmiAggregation(&uv.Value, av); err != nil { + return err + } + + case *types.AggregationRequestMemberAwsEcrContainerAggregation: + av := object.Key("awsEcrContainerAggregation") + if err := awsRestjson1_serializeDocumentAwsEcrContainerAggregation(&uv.Value, av); err != nil { + return err + } + + case *types.AggregationRequestMemberEc2InstanceAggregation: + av := object.Key("ec2InstanceAggregation") + if err := awsRestjson1_serializeDocumentEc2InstanceAggregation(&uv.Value, av); err != nil { + return err + } + + case *types.AggregationRequestMemberFindingTypeAggregation: + av := object.Key("findingTypeAggregation") + if err := awsRestjson1_serializeDocumentFindingTypeAggregation(&uv.Value, av); err != nil { + return err + } + + case *types.AggregationRequestMemberImageLayerAggregation: + av := object.Key("imageLayerAggregation") + if err := awsRestjson1_serializeDocumentImageLayerAggregation(&uv.Value, av); err != nil { + return err + } + + case *types.AggregationRequestMemberPackageAggregation: + av := object.Key("packageAggregation") + if err := awsRestjson1_serializeDocumentPackageAggregation(&uv.Value, av); err != nil { + return err + } + + case *types.AggregationRequestMemberRepositoryAggregation: + av := object.Key("repositoryAggregation") + if err := awsRestjson1_serializeDocumentRepositoryAggregation(&uv.Value, av); err != nil { + return err + } + + case *types.AggregationRequestMemberTitleAggregation: + av := object.Key("titleAggregation") + if err := awsRestjson1_serializeDocumentTitleAggregation(&uv.Value, av); err != nil { + return err + } + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + +func awsRestjson1_serializeDocumentAmiAggregation(v *types.AmiAggregation, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Amis != nil { + ok := object.Key("amis") + if err := awsRestjson1_serializeDocumentStringFilterList(v.Amis, ok); err != nil { + return err + } + } + + if len(v.SortBy) > 0 { + ok := object.Key("sortBy") + ok.String(string(v.SortBy)) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("sortOrder") + ok.String(string(v.SortOrder)) + } + + return nil +} + +func awsRestjson1_serializeDocumentAutoEnable(v *types.AutoEnable, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Ec2 != nil { + ok := object.Key("ec2") + ok.Boolean(*v.Ec2) + } + + if v.Ecr != nil { + ok := object.Key("ecr") + ok.Boolean(*v.Ecr) + } + + return nil +} + +func awsRestjson1_serializeDocumentAwsEcrContainerAggregation(v *types.AwsEcrContainerAggregation, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Architectures != nil { + ok := object.Key("architectures") + if err := awsRestjson1_serializeDocumentStringFilterList(v.Architectures, ok); err != nil { + return err + } + } + + if v.ImageShas != nil { + ok := object.Key("imageShas") + if err := awsRestjson1_serializeDocumentStringFilterList(v.ImageShas, ok); err != nil { + return err + } + } + + if v.ImageTags != nil { + ok := object.Key("imageTags") + if err := awsRestjson1_serializeDocumentStringFilterList(v.ImageTags, ok); err != nil { + return err + } + } + + if v.Repositories != nil { + ok := object.Key("repositories") + if err := awsRestjson1_serializeDocumentStringFilterList(v.Repositories, ok); err != nil { + return err + } + } + + if v.ResourceIds != nil { + ok := object.Key("resourceIds") + if err := awsRestjson1_serializeDocumentStringFilterList(v.ResourceIds, ok); err != nil { + return err + } + } + + if len(v.SortBy) > 0 { + ok := object.Key("sortBy") + ok.String(string(v.SortBy)) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("sortOrder") + ok.String(string(v.SortOrder)) + } + + return nil +} + +func awsRestjson1_serializeDocumentCoverageFilterCriteria(v *types.CoverageFilterCriteria, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountId != nil { + ok := object.Key("accountId") + if err := awsRestjson1_serializeDocumentCoverageStringFilterList(v.AccountId, ok); err != nil { + return err + } + } + + if v.Ec2InstanceTags != nil { + ok := object.Key("ec2InstanceTags") + if err := awsRestjson1_serializeDocumentCoverageMapFilterList(v.Ec2InstanceTags, ok); err != nil { + return err + } + } + + if v.EcrImageTags != nil { + ok := object.Key("ecrImageTags") + if err := awsRestjson1_serializeDocumentCoverageStringFilterList(v.EcrImageTags, ok); err != nil { + return err + } + } + + if v.EcrRepositoryName != nil { + ok := object.Key("ecrRepositoryName") + if err := awsRestjson1_serializeDocumentCoverageStringFilterList(v.EcrRepositoryName, ok); err != nil { + return err + } + } + + if v.ResourceId != nil { + ok := object.Key("resourceId") + if err := awsRestjson1_serializeDocumentCoverageStringFilterList(v.ResourceId, ok); err != nil { + return err + } + } + + if v.ResourceType != nil { + ok := object.Key("resourceType") + if err := awsRestjson1_serializeDocumentCoverageStringFilterList(v.ResourceType, ok); err != nil { + return err + } + } + + if v.ScanStatusCode != nil { + ok := object.Key("scanStatusCode") + if err := awsRestjson1_serializeDocumentCoverageStringFilterList(v.ScanStatusCode, ok); err != nil { + return err + } + } + + if v.ScanStatusReason != nil { + ok := object.Key("scanStatusReason") + if err := awsRestjson1_serializeDocumentCoverageStringFilterList(v.ScanStatusReason, ok); err != nil { + return err + } + } + + if v.ScanType != nil { + ok := object.Key("scanType") + if err := awsRestjson1_serializeDocumentCoverageStringFilterList(v.ScanType, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentCoverageMapFilter(v *types.CoverageMapFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Comparison) > 0 { + ok := object.Key("comparison") + ok.String(string(v.Comparison)) + } + + if v.Key != nil { + ok := object.Key("key") + ok.String(*v.Key) + } + + if v.Value != nil { + ok := object.Key("value") + ok.String(*v.Value) + } + + return nil +} + +func awsRestjson1_serializeDocumentCoverageMapFilterList(v []types.CoverageMapFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentCoverageMapFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentCoverageStringFilter(v *types.CoverageStringFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Comparison) > 0 { + ok := object.Key("comparison") + ok.String(string(v.Comparison)) + } + + if v.Value != nil { + ok := object.Key("value") + ok.String(*v.Value) + } + + return nil +} + +func awsRestjson1_serializeDocumentCoverageStringFilterList(v []types.CoverageStringFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentCoverageStringFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentDateFilter(v *types.DateFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EndInclusive != nil { + ok := object.Key("endInclusive") + ok.Double(smithytime.FormatEpochSeconds(*v.EndInclusive)) + } + + if v.StartInclusive != nil { + ok := object.Key("startInclusive") + ok.Double(smithytime.FormatEpochSeconds(*v.StartInclusive)) + } + + return nil +} + +func awsRestjson1_serializeDocumentDateFilterList(v []types.DateFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentDateFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentDestination(v *types.Destination, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BucketName != nil { + ok := object.Key("bucketName") + ok.String(*v.BucketName) + } + + if v.KeyPrefix != nil { + ok := object.Key("keyPrefix") + ok.String(*v.KeyPrefix) + } + + if v.KmsKeyArn != nil { + ok := object.Key("kmsKeyArn") + ok.String(*v.KmsKeyArn) + } + + return nil +} + +func awsRestjson1_serializeDocumentDisableResourceTypeList(v []types.ResourceScanType, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsRestjson1_serializeDocumentEc2InstanceAggregation(v *types.Ec2InstanceAggregation, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Amis != nil { + ok := object.Key("amis") + if err := awsRestjson1_serializeDocumentStringFilterList(v.Amis, ok); err != nil { + return err + } + } + + if v.InstanceIds != nil { + ok := object.Key("instanceIds") + if err := awsRestjson1_serializeDocumentStringFilterList(v.InstanceIds, ok); err != nil { + return err + } + } + + if v.InstanceTags != nil { + ok := object.Key("instanceTags") + if err := awsRestjson1_serializeDocumentMapFilterList(v.InstanceTags, ok); err != nil { + return err + } + } + + if v.OperatingSystems != nil { + ok := object.Key("operatingSystems") + if err := awsRestjson1_serializeDocumentStringFilterList(v.OperatingSystems, ok); err != nil { + return err + } + } + + if len(v.SortBy) > 0 { + ok := object.Key("sortBy") + ok.String(string(v.SortBy)) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("sortOrder") + ok.String(string(v.SortOrder)) + } + + return nil +} + +func awsRestjson1_serializeDocumentEnableResourceTypeList(v []types.ResourceScanType, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsRestjson1_serializeDocumentFilterArnList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentFilterCriteria(v *types.FilterCriteria, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AwsAccountId != nil { + ok := object.Key("awsAccountId") + if err := awsRestjson1_serializeDocumentStringFilterList(v.AwsAccountId, ok); err != nil { + return err + } + } + + if v.ComponentId != nil { + ok := object.Key("componentId") + if err := awsRestjson1_serializeDocumentStringFilterList(v.ComponentId, ok); err != nil { + return err + } + } + + if v.ComponentType != nil { + ok := object.Key("componentType") + if err := awsRestjson1_serializeDocumentStringFilterList(v.ComponentType, ok); err != nil { + return err + } + } + + if v.Ec2InstanceImageId != nil { + ok := object.Key("ec2InstanceImageId") + if err := awsRestjson1_serializeDocumentStringFilterList(v.Ec2InstanceImageId, ok); err != nil { + return err + } + } + + if v.Ec2InstanceSubnetId != nil { + ok := object.Key("ec2InstanceSubnetId") + if err := awsRestjson1_serializeDocumentStringFilterList(v.Ec2InstanceSubnetId, ok); err != nil { + return err + } + } + + if v.Ec2InstanceVpcId != nil { + ok := object.Key("ec2InstanceVpcId") + if err := awsRestjson1_serializeDocumentStringFilterList(v.Ec2InstanceVpcId, ok); err != nil { + return err + } + } + + if v.EcrImageArchitecture != nil { + ok := object.Key("ecrImageArchitecture") + if err := awsRestjson1_serializeDocumentStringFilterList(v.EcrImageArchitecture, ok); err != nil { + return err + } + } + + if v.EcrImageHash != nil { + ok := object.Key("ecrImageHash") + if err := awsRestjson1_serializeDocumentStringFilterList(v.EcrImageHash, ok); err != nil { + return err + } + } + + if v.EcrImagePushedAt != nil { + ok := object.Key("ecrImagePushedAt") + if err := awsRestjson1_serializeDocumentDateFilterList(v.EcrImagePushedAt, ok); err != nil { + return err + } + } + + if v.EcrImageRegistry != nil { + ok := object.Key("ecrImageRegistry") + if err := awsRestjson1_serializeDocumentStringFilterList(v.EcrImageRegistry, ok); err != nil { + return err + } + } + + if v.EcrImageRepositoryName != nil { + ok := object.Key("ecrImageRepositoryName") + if err := awsRestjson1_serializeDocumentStringFilterList(v.EcrImageRepositoryName, ok); err != nil { + return err + } + } + + if v.EcrImageTags != nil { + ok := object.Key("ecrImageTags") + if err := awsRestjson1_serializeDocumentStringFilterList(v.EcrImageTags, ok); err != nil { + return err + } + } + + if v.FindingArn != nil { + ok := object.Key("findingArn") + if err := awsRestjson1_serializeDocumentStringFilterList(v.FindingArn, ok); err != nil { + return err + } + } + + if v.FindingStatus != nil { + ok := object.Key("findingStatus") + if err := awsRestjson1_serializeDocumentStringFilterList(v.FindingStatus, ok); err != nil { + return err + } + } + + if v.FindingType != nil { + ok := object.Key("findingType") + if err := awsRestjson1_serializeDocumentStringFilterList(v.FindingType, ok); err != nil { + return err + } + } + + if v.FirstObservedAt != nil { + ok := object.Key("firstObservedAt") + if err := awsRestjson1_serializeDocumentDateFilterList(v.FirstObservedAt, ok); err != nil { + return err + } + } + + if v.InspectorScore != nil { + ok := object.Key("inspectorScore") + if err := awsRestjson1_serializeDocumentNumberFilterList(v.InspectorScore, ok); err != nil { + return err + } + } + + if v.LastObservedAt != nil { + ok := object.Key("lastObservedAt") + if err := awsRestjson1_serializeDocumentDateFilterList(v.LastObservedAt, ok); err != nil { + return err + } + } + + if v.NetworkProtocol != nil { + ok := object.Key("networkProtocol") + if err := awsRestjson1_serializeDocumentStringFilterList(v.NetworkProtocol, ok); err != nil { + return err + } + } + + if v.PortRange != nil { + ok := object.Key("portRange") + if err := awsRestjson1_serializeDocumentPortRangeFilterList(v.PortRange, ok); err != nil { + return err + } + } + + if v.RelatedVulnerabilities != nil { + ok := object.Key("relatedVulnerabilities") + if err := awsRestjson1_serializeDocumentStringFilterList(v.RelatedVulnerabilities, ok); err != nil { + return err + } + } + + if v.ResourceId != nil { + ok := object.Key("resourceId") + if err := awsRestjson1_serializeDocumentStringFilterList(v.ResourceId, ok); err != nil { + return err + } + } + + if v.ResourceTags != nil { + ok := object.Key("resourceTags") + if err := awsRestjson1_serializeDocumentMapFilterList(v.ResourceTags, ok); err != nil { + return err + } + } + + if v.ResourceType != nil { + ok := object.Key("resourceType") + if err := awsRestjson1_serializeDocumentStringFilterList(v.ResourceType, ok); err != nil { + return err + } + } + + if v.Severity != nil { + ok := object.Key("severity") + if err := awsRestjson1_serializeDocumentStringFilterList(v.Severity, ok); err != nil { + return err + } + } + + if v.Title != nil { + ok := object.Key("title") + if err := awsRestjson1_serializeDocumentStringFilterList(v.Title, ok); err != nil { + return err + } + } + + if v.UpdatedAt != nil { + ok := object.Key("updatedAt") + if err := awsRestjson1_serializeDocumentDateFilterList(v.UpdatedAt, ok); err != nil { + return err + } + } + + if v.VendorSeverity != nil { + ok := object.Key("vendorSeverity") + if err := awsRestjson1_serializeDocumentStringFilterList(v.VendorSeverity, ok); err != nil { + return err + } + } + + if v.VulnerabilityId != nil { + ok := object.Key("vulnerabilityId") + if err := awsRestjson1_serializeDocumentStringFilterList(v.VulnerabilityId, ok); err != nil { + return err + } + } + + if v.VulnerabilitySource != nil { + ok := object.Key("vulnerabilitySource") + if err := awsRestjson1_serializeDocumentStringFilterList(v.VulnerabilitySource, ok); err != nil { + return err + } + } + + if v.VulnerablePackages != nil { + ok := object.Key("vulnerablePackages") + if err := awsRestjson1_serializeDocumentPackageFilterList(v.VulnerablePackages, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentFindingTypeAggregation(v *types.FindingTypeAggregation, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.FindingType) > 0 { + ok := object.Key("findingType") + ok.String(string(v.FindingType)) + } + + if len(v.ResourceType) > 0 { + ok := object.Key("resourceType") + ok.String(string(v.ResourceType)) + } + + if len(v.SortBy) > 0 { + ok := object.Key("sortBy") + ok.String(string(v.SortBy)) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("sortOrder") + ok.String(string(v.SortOrder)) + } + + return nil +} + +func awsRestjson1_serializeDocumentImageLayerAggregation(v *types.ImageLayerAggregation, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LayerHashes != nil { + ok := object.Key("layerHashes") + if err := awsRestjson1_serializeDocumentStringFilterList(v.LayerHashes, ok); err != nil { + return err + } + } + + if v.Repositories != nil { + ok := object.Key("repositories") + if err := awsRestjson1_serializeDocumentStringFilterList(v.Repositories, ok); err != nil { + return err + } + } + + if v.ResourceIds != nil { + ok := object.Key("resourceIds") + if err := awsRestjson1_serializeDocumentStringFilterList(v.ResourceIds, ok); err != nil { + return err + } + } + + if len(v.SortBy) > 0 { + ok := object.Key("sortBy") + ok.String(string(v.SortBy)) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("sortOrder") + ok.String(string(v.SortOrder)) + } + + return nil +} + +func awsRestjson1_serializeDocumentMapFilter(v *types.MapFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Comparison) > 0 { + ok := object.Key("comparison") + ok.String(string(v.Comparison)) + } + + if v.Key != nil { + ok := object.Key("key") + ok.String(*v.Key) + } + + if v.Value != nil { + ok := object.Key("value") + ok.String(*v.Value) + } + + return nil +} + +func awsRestjson1_serializeDocumentMapFilterList(v []types.MapFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentMapFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentMeteringAccountIdList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentNumberFilter(v *types.NumberFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LowerInclusive != nil { + ok := object.Key("lowerInclusive") + switch { + case math.IsNaN(*v.LowerInclusive): + ok.String("NaN") + + case math.IsInf(*v.LowerInclusive, 1): + ok.String("Infinity") + + case math.IsInf(*v.LowerInclusive, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.LowerInclusive) + + } + } + + if v.UpperInclusive != nil { + ok := object.Key("upperInclusive") + switch { + case math.IsNaN(*v.UpperInclusive): + ok.String("NaN") + + case math.IsInf(*v.UpperInclusive, 1): + ok.String("Infinity") + + case math.IsInf(*v.UpperInclusive, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.UpperInclusive) + + } + } + + return nil +} + +func awsRestjson1_serializeDocumentNumberFilterList(v []types.NumberFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentNumberFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentPackageAggregation(v *types.PackageAggregation, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.PackageNames != nil { + ok := object.Key("packageNames") + if err := awsRestjson1_serializeDocumentStringFilterList(v.PackageNames, ok); err != nil { + return err + } + } + + if len(v.SortBy) > 0 { + ok := object.Key("sortBy") + ok.String(string(v.SortBy)) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("sortOrder") + ok.String(string(v.SortOrder)) + } + + return nil +} + +func awsRestjson1_serializeDocumentPackageFilter(v *types.PackageFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Architecture != nil { + ok := object.Key("architecture") + if err := awsRestjson1_serializeDocumentStringFilter(v.Architecture, ok); err != nil { + return err + } + } + + if v.Epoch != nil { + ok := object.Key("epoch") + if err := awsRestjson1_serializeDocumentNumberFilter(v.Epoch, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("name") + if err := awsRestjson1_serializeDocumentStringFilter(v.Name, ok); err != nil { + return err + } + } + + if v.Release != nil { + ok := object.Key("release") + if err := awsRestjson1_serializeDocumentStringFilter(v.Release, ok); err != nil { + return err + } + } + + if v.SourceLayerHash != nil { + ok := object.Key("sourceLayerHash") + if err := awsRestjson1_serializeDocumentStringFilter(v.SourceLayerHash, ok); err != nil { + return err + } + } + + if v.Version != nil { + ok := object.Key("version") + if err := awsRestjson1_serializeDocumentStringFilter(v.Version, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentPackageFilterList(v []types.PackageFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentPackageFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentPortRangeFilter(v *types.PortRangeFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BeginInclusive != nil { + ok := object.Key("beginInclusive") + ok.Integer(*v.BeginInclusive) + } + + if v.EndInclusive != nil { + ok := object.Key("endInclusive") + ok.Integer(*v.EndInclusive) + } + + return nil +} + +func awsRestjson1_serializeDocumentPortRangeFilterList(v []types.PortRangeFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentPortRangeFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentRepositoryAggregation(v *types.RepositoryAggregation, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Repositories != nil { + ok := object.Key("repositories") + if err := awsRestjson1_serializeDocumentStringFilterList(v.Repositories, ok); err != nil { + return err + } + } + + if len(v.SortBy) > 0 { + ok := object.Key("sortBy") + ok.String(string(v.SortBy)) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("sortOrder") + ok.String(string(v.SortOrder)) + } + + return nil +} + +func awsRestjson1_serializeDocumentSortCriteria(v *types.SortCriteria, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Field) > 0 { + ok := object.Key("field") + ok.String(string(v.Field)) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("sortOrder") + ok.String(string(v.SortOrder)) + } + + return nil +} + +func awsRestjson1_serializeDocumentStringFilter(v *types.StringFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Comparison) > 0 { + ok := object.Key("comparison") + ok.String(string(v.Comparison)) + } + + if v.Value != nil { + ok := object.Key("value") + ok.String(*v.Value) + } + + return nil +} + +func awsRestjson1_serializeDocumentStringFilterList(v []types.StringFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentStringFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentTagMap(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + +func awsRestjson1_serializeDocumentTitleAggregation(v *types.TitleAggregation, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.ResourceType) > 0 { + ok := object.Key("resourceType") + ok.String(string(v.ResourceType)) + } + + if len(v.SortBy) > 0 { + ok := object.Key("sortBy") + ok.String(string(v.SortBy)) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("sortOrder") + ok.String(string(v.SortOrder)) + } + + if v.Titles != nil { + ok := object.Key("titles") + if err := awsRestjson1_serializeDocumentStringFilterList(v.Titles, ok); err != nil { + return err + } + } + + if v.VulnerabilityIds != nil { + ok := object.Key("vulnerabilityIds") + if err := awsRestjson1_serializeDocumentStringFilterList(v.VulnerabilityIds, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentUsageAccountIdList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} diff --git a/service/inspector2/types/enums.go b/service/inspector2/types/enums.go new file mode 100644 index 00000000000..ed8547e7364 --- /dev/null +++ b/service/inspector2/types/enums.go @@ -0,0 +1,1057 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type AccountSortBy string + +// Enum values for AccountSortBy +const ( + AccountSortByCritical AccountSortBy = "CRITICAL" + AccountSortByHigh AccountSortBy = "HIGH" + AccountSortByAll AccountSortBy = "ALL" +) + +// Values returns all known values for AccountSortBy. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (AccountSortBy) Values() []AccountSortBy { + return []AccountSortBy{ + "CRITICAL", + "HIGH", + "ALL", + } +} + +type AggregationFindingType string + +// Enum values for AggregationFindingType +const ( + AggregationFindingTypeNetworkReachability AggregationFindingType = "NETWORK_REACHABILITY" + AggregationFindingTypePackageVulnerability AggregationFindingType = "PACKAGE_VULNERABILITY" +) + +// Values returns all known values for AggregationFindingType. Note that this can +// be expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (AggregationFindingType) Values() []AggregationFindingType { + return []AggregationFindingType{ + "NETWORK_REACHABILITY", + "PACKAGE_VULNERABILITY", + } +} + +type AggregationResourceType string + +// Enum values for AggregationResourceType +const ( + AggregationResourceTypeAwsEc2Instance AggregationResourceType = "AWS_EC2_INSTANCE" + AggregationResourceTypeAwsEcrContainerImage AggregationResourceType = "AWS_ECR_CONTAINER_IMAGE" +) + +// Values returns all known values for AggregationResourceType. Note that this can +// be expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (AggregationResourceType) Values() []AggregationResourceType { + return []AggregationResourceType{ + "AWS_EC2_INSTANCE", + "AWS_ECR_CONTAINER_IMAGE", + } +} + +type AggregationType string + +// Enum values for AggregationType +const ( + AggregationTypeFindingType AggregationType = "FINDING_TYPE" + AggregationTypePackage AggregationType = "PACKAGE" + AggregationTypeTitle AggregationType = "TITLE" + AggregationTypeRepository AggregationType = "REPOSITORY" + AggregationTypeAmi AggregationType = "AMI" + AggregationTypeAwsEc2Instance AggregationType = "AWS_EC2_INSTANCE" + AggregationTypeAwsEcrContainer AggregationType = "AWS_ECR_CONTAINER" + AggregationTypeImageLayer AggregationType = "IMAGE_LAYER" + AggregationTypeAccount AggregationType = "ACCOUNT" +) + +// Values returns all known values for AggregationType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (AggregationType) Values() []AggregationType { + return []AggregationType{ + "FINDING_TYPE", + "PACKAGE", + "TITLE", + "REPOSITORY", + "AMI", + "AWS_EC2_INSTANCE", + "AWS_ECR_CONTAINER", + "IMAGE_LAYER", + "ACCOUNT", + } +} + +type AmiSortBy string + +// Enum values for AmiSortBy +const ( + AmiSortByCritical AmiSortBy = "CRITICAL" + AmiSortByHigh AmiSortBy = "HIGH" + AmiSortByAll AmiSortBy = "ALL" + AmiSortByAffectedInstances AmiSortBy = "AFFECTED_INSTANCES" +) + +// Values returns all known values for AmiSortBy. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (AmiSortBy) Values() []AmiSortBy { + return []AmiSortBy{ + "CRITICAL", + "HIGH", + "ALL", + "AFFECTED_INSTANCES", + } +} + +type AwsEcrContainerSortBy string + +// Enum values for AwsEcrContainerSortBy +const ( + AwsEcrContainerSortByCritical AwsEcrContainerSortBy = "CRITICAL" + AwsEcrContainerSortByHigh AwsEcrContainerSortBy = "HIGH" + AwsEcrContainerSortByAll AwsEcrContainerSortBy = "ALL" +) + +// Values returns all known values for AwsEcrContainerSortBy. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (AwsEcrContainerSortBy) Values() []AwsEcrContainerSortBy { + return []AwsEcrContainerSortBy{ + "CRITICAL", + "HIGH", + "ALL", + } +} + +type CoverageMapComparison string + +// Enum values for CoverageMapComparison +const ( + CoverageMapComparisonEquals CoverageMapComparison = "EQUALS" +) + +// Values returns all known values for CoverageMapComparison. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (CoverageMapComparison) Values() []CoverageMapComparison { + return []CoverageMapComparison{ + "EQUALS", + } +} + +type CoverageResourceType string + +// Enum values for CoverageResourceType +const ( + CoverageResourceTypeAwsEc2Instance CoverageResourceType = "AWS_EC2_INSTANCE" + CoverageResourceTypeAwsEcrContainerImage CoverageResourceType = "AWS_ECR_CONTAINER_IMAGE" + CoverageResourceTypeAwsEcrRepository CoverageResourceType = "AWS_ECR_REPOSITORY" +) + +// Values returns all known values for CoverageResourceType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (CoverageResourceType) Values() []CoverageResourceType { + return []CoverageResourceType{ + "AWS_EC2_INSTANCE", + "AWS_ECR_CONTAINER_IMAGE", + "AWS_ECR_REPOSITORY", + } +} + +type CoverageStringComparison string + +// Enum values for CoverageStringComparison +const ( + CoverageStringComparisonEquals CoverageStringComparison = "EQUALS" + CoverageStringComparisonNotEquals CoverageStringComparison = "NOT_EQUALS" +) + +// Values returns all known values for CoverageStringComparison. Note that this can +// be expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (CoverageStringComparison) Values() []CoverageStringComparison { + return []CoverageStringComparison{ + "EQUALS", + "NOT_EQUALS", + } +} + +type Currency string + +// Enum values for Currency +const ( + CurrencyUsd Currency = "USD" +) + +// Values returns all known values for Currency. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (Currency) Values() []Currency { + return []Currency{ + "USD", + } +} + +type DelegatedAdminStatus string + +// Enum values for DelegatedAdminStatus +const ( + DelegatedAdminStatusEnabled DelegatedAdminStatus = "ENABLED" + DelegatedAdminStatusDisableInProgress DelegatedAdminStatus = "DISABLE_IN_PROGRESS" +) + +// Values returns all known values for DelegatedAdminStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (DelegatedAdminStatus) Values() []DelegatedAdminStatus { + return []DelegatedAdminStatus{ + "ENABLED", + "DISABLE_IN_PROGRESS", + } +} + +type Ec2InstanceSortBy string + +// Enum values for Ec2InstanceSortBy +const ( + Ec2InstanceSortByNetworkFindings Ec2InstanceSortBy = "NETWORK_FINDINGS" + Ec2InstanceSortByCritical Ec2InstanceSortBy = "CRITICAL" + Ec2InstanceSortByHigh Ec2InstanceSortBy = "HIGH" + Ec2InstanceSortByAll Ec2InstanceSortBy = "ALL" +) + +// Values returns all known values for Ec2InstanceSortBy. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (Ec2InstanceSortBy) Values() []Ec2InstanceSortBy { + return []Ec2InstanceSortBy{ + "NETWORK_FINDINGS", + "CRITICAL", + "HIGH", + "ALL", + } +} + +type Ec2Platform string + +// Enum values for Ec2Platform +const ( + Ec2PlatformWindows Ec2Platform = "WINDOWS" + Ec2PlatformLinux Ec2Platform = "LINUX" + Ec2PlatformUnknown Ec2Platform = "UNKNOWN" +) + +// Values returns all known values for Ec2Platform. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (Ec2Platform) Values() []Ec2Platform { + return []Ec2Platform{ + "WINDOWS", + "LINUX", + "UNKNOWN", + } +} + +type EcrScanFrequency string + +// Enum values for EcrScanFrequency +const ( + EcrScanFrequencyManual EcrScanFrequency = "MANUAL" + EcrScanFrequencyScanOnPush EcrScanFrequency = "SCAN_ON_PUSH" + EcrScanFrequencyContinuousScan EcrScanFrequency = "CONTINUOUS_SCAN" +) + +// Values returns all known values for EcrScanFrequency. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (EcrScanFrequency) Values() []EcrScanFrequency { + return []EcrScanFrequency{ + "MANUAL", + "SCAN_ON_PUSH", + "CONTINUOUS_SCAN", + } +} + +type ErrorCode string + +// Enum values for ErrorCode +const ( + ErrorCodeAlreadyEnabled ErrorCode = "ALREADY_ENABLED" + ErrorCodeEnableInProgress ErrorCode = "ENABLE_IN_PROGRESS" + ErrorCodeDisableInProgress ErrorCode = "DISABLE_IN_PROGRESS" + ErrorCodeSuspendInProgress ErrorCode = "SUSPEND_IN_PROGRESS" + ErrorCodeResourceNotFound ErrorCode = "RESOURCE_NOT_FOUND" + ErrorCodeAccessDenied ErrorCode = "ACCESS_DENIED" + ErrorCodeInternalError ErrorCode = "INTERNAL_ERROR" + ErrorCodeSsmUnavailable ErrorCode = "SSM_UNAVAILABLE" + ErrorCodeSsmThrottled ErrorCode = "SSM_THROTTLED" + ErrorCodeEventbridgeUnavailable ErrorCode = "EVENTBRIDGE_UNAVAILABLE" + ErrorCodeEventbridgeThrottled ErrorCode = "EVENTBRIDGE_THROTTLED" + ErrorCodeResourceScanNotDisabled ErrorCode = "RESOURCE_SCAN_NOT_DISABLED" + ErrorCodeDisassociateAllMembers ErrorCode = "DISASSOCIATE_ALL_MEMBERS" +) + +// Values returns all known values for ErrorCode. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (ErrorCode) Values() []ErrorCode { + return []ErrorCode{ + "ALREADY_ENABLED", + "ENABLE_IN_PROGRESS", + "DISABLE_IN_PROGRESS", + "SUSPEND_IN_PROGRESS", + "RESOURCE_NOT_FOUND", + "ACCESS_DENIED", + "INTERNAL_ERROR", + "SSM_UNAVAILABLE", + "SSM_THROTTLED", + "EVENTBRIDGE_UNAVAILABLE", + "EVENTBRIDGE_THROTTLED", + "RESOURCE_SCAN_NOT_DISABLED", + "DISASSOCIATE_ALL_MEMBERS", + } +} + +type ExternalReportStatus string + +// Enum values for ExternalReportStatus +const ( + ExternalReportStatusSucceeded ExternalReportStatus = "SUCCEEDED" + ExternalReportStatusInProgress ExternalReportStatus = "IN_PROGRESS" + ExternalReportStatusCancelled ExternalReportStatus = "CANCELLED" + ExternalReportStatusFailed ExternalReportStatus = "FAILED" +) + +// Values returns all known values for ExternalReportStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ExternalReportStatus) Values() []ExternalReportStatus { + return []ExternalReportStatus{ + "SUCCEEDED", + "IN_PROGRESS", + "CANCELLED", + "FAILED", + } +} + +type FilterAction string + +// Enum values for FilterAction +const ( + FilterActionNone FilterAction = "NONE" + FilterActionSuppress FilterAction = "SUPPRESS" +) + +// Values returns all known values for FilterAction. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (FilterAction) Values() []FilterAction { + return []FilterAction{ + "NONE", + "SUPPRESS", + } +} + +type FindingStatus string + +// Enum values for FindingStatus +const ( + FindingStatusActive FindingStatus = "ACTIVE" + FindingStatusSuppressed FindingStatus = "SUPPRESSED" + FindingStatusClosed FindingStatus = "CLOSED" +) + +// Values returns all known values for FindingStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (FindingStatus) Values() []FindingStatus { + return []FindingStatus{ + "ACTIVE", + "SUPPRESSED", + "CLOSED", + } +} + +type FindingType string + +// Enum values for FindingType +const ( + FindingTypeNetworkReachability FindingType = "NETWORK_REACHABILITY" + FindingTypePackageVulnerability FindingType = "PACKAGE_VULNERABILITY" +) + +// Values returns all known values for FindingType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (FindingType) Values() []FindingType { + return []FindingType{ + "NETWORK_REACHABILITY", + "PACKAGE_VULNERABILITY", + } +} + +type FindingTypeSortBy string + +// Enum values for FindingTypeSortBy +const ( + FindingTypeSortByCritical FindingTypeSortBy = "CRITICAL" + FindingTypeSortByHigh FindingTypeSortBy = "HIGH" + FindingTypeSortByAll FindingTypeSortBy = "ALL" +) + +// Values returns all known values for FindingTypeSortBy. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (FindingTypeSortBy) Values() []FindingTypeSortBy { + return []FindingTypeSortBy{ + "CRITICAL", + "HIGH", + "ALL", + } +} + +type FreeTrialInfoErrorCode string + +// Enum values for FreeTrialInfoErrorCode +const ( + FreeTrialInfoErrorCodeAccessDenied FreeTrialInfoErrorCode = "ACCESS_DENIED" + FreeTrialInfoErrorCodeInternalError FreeTrialInfoErrorCode = "INTERNAL_ERROR" +) + +// Values returns all known values for FreeTrialInfoErrorCode. Note that this can +// be expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (FreeTrialInfoErrorCode) Values() []FreeTrialInfoErrorCode { + return []FreeTrialInfoErrorCode{ + "ACCESS_DENIED", + "INTERNAL_ERROR", + } +} + +type FreeTrialStatus string + +// Enum values for FreeTrialStatus +const ( + FreeTrialStatusActive FreeTrialStatus = "ACTIVE" + FreeTrialStatusInactive FreeTrialStatus = "INACTIVE" +) + +// Values returns all known values for FreeTrialStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (FreeTrialStatus) Values() []FreeTrialStatus { + return []FreeTrialStatus{ + "ACTIVE", + "INACTIVE", + } +} + +type FreeTrialType string + +// Enum values for FreeTrialType +const ( + FreeTrialTypeEc2 FreeTrialType = "EC2" + FreeTrialTypeEcr FreeTrialType = "ECR" +) + +// Values returns all known values for FreeTrialType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (FreeTrialType) Values() []FreeTrialType { + return []FreeTrialType{ + "EC2", + "ECR", + } +} + +type GroupKey string + +// Enum values for GroupKey +const ( + GroupKeyScanStatusCode GroupKey = "SCAN_STATUS_CODE" + GroupKeyScanStatusReason GroupKey = "SCAN_STATUS_REASON" + GroupKeyAccountId GroupKey = "ACCOUNT_ID" + GroupKeyResourceType GroupKey = "RESOURCE_TYPE" + GroupKeyEcrRepositoryName GroupKey = "ECR_REPOSITORY_NAME" +) + +// Values returns all known values for GroupKey. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (GroupKey) Values() []GroupKey { + return []GroupKey{ + "SCAN_STATUS_CODE", + "SCAN_STATUS_REASON", + "ACCOUNT_ID", + "RESOURCE_TYPE", + "ECR_REPOSITORY_NAME", + } +} + +type ImageLayerSortBy string + +// Enum values for ImageLayerSortBy +const ( + ImageLayerSortByCritical ImageLayerSortBy = "CRITICAL" + ImageLayerSortByHigh ImageLayerSortBy = "HIGH" + ImageLayerSortByAll ImageLayerSortBy = "ALL" +) + +// Values returns all known values for ImageLayerSortBy. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ImageLayerSortBy) Values() []ImageLayerSortBy { + return []ImageLayerSortBy{ + "CRITICAL", + "HIGH", + "ALL", + } +} + +type MapComparison string + +// Enum values for MapComparison +const ( + MapComparisonEquals MapComparison = "EQUALS" +) + +// Values returns all known values for MapComparison. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (MapComparison) Values() []MapComparison { + return []MapComparison{ + "EQUALS", + } +} + +type NetworkProtocol string + +// Enum values for NetworkProtocol +const ( + NetworkProtocolTcp NetworkProtocol = "TCP" + NetworkProtocolUdp NetworkProtocol = "UDP" +) + +// Values returns all known values for NetworkProtocol. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (NetworkProtocol) Values() []NetworkProtocol { + return []NetworkProtocol{ + "TCP", + "UDP", + } +} + +type Operation string + +// Enum values for Operation +const ( + OperationEnableScanning Operation = "ENABLE_SCANNING" + OperationDisableScanning Operation = "DISABLE_SCANNING" + OperationEnableRepository Operation = "ENABLE_REPOSITORY" + OperationDisableRepository Operation = "DISABLE_REPOSITORY" +) + +// Values returns all known values for Operation. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (Operation) Values() []Operation { + return []Operation{ + "ENABLE_SCANNING", + "DISABLE_SCANNING", + "ENABLE_REPOSITORY", + "DISABLE_REPOSITORY", + } +} + +type PackageManager string + +// Enum values for PackageManager +const ( + PackageManagerBundler PackageManager = "BUNDLER" + PackageManagerCargo PackageManager = "CARGO" + PackageManagerComposer PackageManager = "COMPOSER" + PackageManagerNpm PackageManager = "NPM" + PackageManagerNuget PackageManager = "NUGET" + PackageManagerPipenv PackageManager = "PIPENV" + PackageManagerPoetry PackageManager = "POETRY" + PackageManagerYarn PackageManager = "YARN" + PackageManagerGobinary PackageManager = "GOBINARY" + PackageManagerGomod PackageManager = "GOMOD" + PackageManagerJar PackageManager = "JAR" + PackageManagerOs PackageManager = "OS" +) + +// Values returns all known values for PackageManager. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (PackageManager) Values() []PackageManager { + return []PackageManager{ + "BUNDLER", + "CARGO", + "COMPOSER", + "NPM", + "NUGET", + "PIPENV", + "POETRY", + "YARN", + "GOBINARY", + "GOMOD", + "JAR", + "OS", + } +} + +type PackageSortBy string + +// Enum values for PackageSortBy +const ( + PackageSortByCritical PackageSortBy = "CRITICAL" + PackageSortByHigh PackageSortBy = "HIGH" + PackageSortByAll PackageSortBy = "ALL" +) + +// Values returns all known values for PackageSortBy. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (PackageSortBy) Values() []PackageSortBy { + return []PackageSortBy{ + "CRITICAL", + "HIGH", + "ALL", + } +} + +type RelationshipStatus string + +// Enum values for RelationshipStatus +const ( + RelationshipStatusCreated RelationshipStatus = "CREATED" + RelationshipStatusInvited RelationshipStatus = "INVITED" + RelationshipStatusDisabled RelationshipStatus = "DISABLED" + RelationshipStatusEnabled RelationshipStatus = "ENABLED" + RelationshipStatusRemoved RelationshipStatus = "REMOVED" + RelationshipStatusResigned RelationshipStatus = "RESIGNED" + RelationshipStatusDeleted RelationshipStatus = "DELETED" + RelationshipStatusEmailVerificationInProgress RelationshipStatus = "EMAIL_VERIFICATION_IN_PROGRESS" + RelationshipStatusEmailVerificationFailed RelationshipStatus = "EMAIL_VERIFICATION_FAILED" + RelationshipStatusRegionDisabled RelationshipStatus = "REGION_DISABLED" + RelationshipStatusAccountSuspended RelationshipStatus = "ACCOUNT_SUSPENDED" + RelationshipStatusCannotCreateDetectorInOrgMaster RelationshipStatus = "CANNOT_CREATE_DETECTOR_IN_ORG_MASTER" +) + +// Values returns all known values for RelationshipStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (RelationshipStatus) Values() []RelationshipStatus { + return []RelationshipStatus{ + "CREATED", + "INVITED", + "DISABLED", + "ENABLED", + "REMOVED", + "RESIGNED", + "DELETED", + "EMAIL_VERIFICATION_IN_PROGRESS", + "EMAIL_VERIFICATION_FAILED", + "REGION_DISABLED", + "ACCOUNT_SUSPENDED", + "CANNOT_CREATE_DETECTOR_IN_ORG_MASTER", + } +} + +type ReportFormat string + +// Enum values for ReportFormat +const ( + ReportFormatCsv ReportFormat = "CSV" + ReportFormatJson ReportFormat = "JSON" +) + +// Values returns all known values for ReportFormat. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (ReportFormat) Values() []ReportFormat { + return []ReportFormat{ + "CSV", + "JSON", + } +} + +type ReportingErrorCode string + +// Enum values for ReportingErrorCode +const ( + ReportingErrorCodeInternalError ReportingErrorCode = "INTERNAL_ERROR" + ReportingErrorCodeInvalidPermissions ReportingErrorCode = "INVALID_PERMISSIONS" +) + +// Values returns all known values for ReportingErrorCode. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ReportingErrorCode) Values() []ReportingErrorCode { + return []ReportingErrorCode{ + "INTERNAL_ERROR", + "INVALID_PERMISSIONS", + } +} + +type RepositorySortBy string + +// Enum values for RepositorySortBy +const ( + RepositorySortByCritical RepositorySortBy = "CRITICAL" + RepositorySortByHigh RepositorySortBy = "HIGH" + RepositorySortByAll RepositorySortBy = "ALL" + RepositorySortByAffectedImages RepositorySortBy = "AFFECTED_IMAGES" +) + +// Values returns all known values for RepositorySortBy. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (RepositorySortBy) Values() []RepositorySortBy { + return []RepositorySortBy{ + "CRITICAL", + "HIGH", + "ALL", + "AFFECTED_IMAGES", + } +} + +type ResourceScanType string + +// Enum values for ResourceScanType +const ( + ResourceScanTypeEc2 ResourceScanType = "EC2" + ResourceScanTypeEcr ResourceScanType = "ECR" +) + +// Values returns all known values for ResourceScanType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ResourceScanType) Values() []ResourceScanType { + return []ResourceScanType{ + "EC2", + "ECR", + } +} + +type ResourceType string + +// Enum values for ResourceType +const ( + ResourceTypeAwsEc2Instance ResourceType = "AWS_EC2_INSTANCE" + ResourceTypeAwsEcrContainerImage ResourceType = "AWS_ECR_CONTAINER_IMAGE" + ResourceTypeAwsEcrRepository ResourceType = "AWS_ECR_REPOSITORY" +) + +// Values returns all known values for ResourceType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (ResourceType) Values() []ResourceType { + return []ResourceType{ + "AWS_EC2_INSTANCE", + "AWS_ECR_CONTAINER_IMAGE", + "AWS_ECR_REPOSITORY", + } +} + +type ScanStatusCode string + +// Enum values for ScanStatusCode +const ( + ScanStatusCodeActive ScanStatusCode = "ACTIVE" + ScanStatusCodeInactive ScanStatusCode = "INACTIVE" +) + +// Values returns all known values for ScanStatusCode. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ScanStatusCode) Values() []ScanStatusCode { + return []ScanStatusCode{ + "ACTIVE", + "INACTIVE", + } +} + +type ScanStatusReason string + +// Enum values for ScanStatusReason +const ( + ScanStatusReasonPendingInitialScan ScanStatusReason = "PENDING_INITIAL_SCAN" + ScanStatusReasonAccessDenied ScanStatusReason = "ACCESS_DENIED" + ScanStatusReasonInternalError ScanStatusReason = "INTERNAL_ERROR" + ScanStatusReasonUnmanagedEc2Instance ScanStatusReason = "UNMANAGED_EC2_INSTANCE" + ScanStatusReasonUnsupportedOs ScanStatusReason = "UNSUPPORTED_OS" + ScanStatusReasonScanEligibilityExpired ScanStatusReason = "SCAN_ELIGIBILITY_EXPIRED" + ScanStatusReasonResourceTerminated ScanStatusReason = "RESOURCE_TERMINATED" + ScanStatusReasonSuccessful ScanStatusReason = "SUCCESSFUL" + ScanStatusReasonNoResourcesFound ScanStatusReason = "NO_RESOURCES_FOUND" + ScanStatusReasonImageSizeExceeded ScanStatusReason = "IMAGE_SIZE_EXCEEDED" + ScanStatusReasonScanFrequencyManual ScanStatusReason = "SCAN_FREQUENCY_MANUAL" + ScanStatusReasonScanFrequencyScanOnPush ScanStatusReason = "SCAN_FREQUENCY_SCAN_ON_PUSH" + ScanStatusReasonEc2InstanceStopped ScanStatusReason = "EC2_INSTANCE_STOPPED" +) + +// Values returns all known values for ScanStatusReason. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ScanStatusReason) Values() []ScanStatusReason { + return []ScanStatusReason{ + "PENDING_INITIAL_SCAN", + "ACCESS_DENIED", + "INTERNAL_ERROR", + "UNMANAGED_EC2_INSTANCE", + "UNSUPPORTED_OS", + "SCAN_ELIGIBILITY_EXPIRED", + "RESOURCE_TERMINATED", + "SUCCESSFUL", + "NO_RESOURCES_FOUND", + "IMAGE_SIZE_EXCEEDED", + "SCAN_FREQUENCY_MANUAL", + "SCAN_FREQUENCY_SCAN_ON_PUSH", + "EC2_INSTANCE_STOPPED", + } +} + +type ScanType string + +// Enum values for ScanType +const ( + ScanTypeNetwork ScanType = "NETWORK" + ScanTypePackage ScanType = "PACKAGE" +) + +// Values returns all known values for ScanType. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (ScanType) Values() []ScanType { + return []ScanType{ + "NETWORK", + "PACKAGE", + } +} + +type Service string + +// Enum values for Service +const ( + ServiceEc2 Service = "EC2" + ServiceEcr Service = "ECR" +) + +// Values returns all known values for Service. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (Service) Values() []Service { + return []Service{ + "EC2", + "ECR", + } +} + +type Severity string + +// Enum values for Severity +const ( + SeverityInformational Severity = "INFORMATIONAL" + SeverityLow Severity = "LOW" + SeverityMedium Severity = "MEDIUM" + SeverityHigh Severity = "HIGH" + SeverityCritical Severity = "CRITICAL" + SeverityUntriaged Severity = "UNTRIAGED" +) + +// Values returns all known values for Severity. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (Severity) Values() []Severity { + return []Severity{ + "INFORMATIONAL", + "LOW", + "MEDIUM", + "HIGH", + "CRITICAL", + "UNTRIAGED", + } +} + +type SortField string + +// Enum values for SortField +const ( + SortFieldAwsAccountId SortField = "AWS_ACCOUNT_ID" + SortFieldFindingType SortField = "FINDING_TYPE" + SortFieldSeverity SortField = "SEVERITY" + SortFieldFirstObservedAt SortField = "FIRST_OBSERVED_AT" + SortFieldLastObservedAt SortField = "LAST_OBSERVED_AT" + SortFieldFindingStatus SortField = "FINDING_STATUS" + SortFieldResourceType SortField = "RESOURCE_TYPE" + SortFieldEcrImagePushedAt SortField = "ECR_IMAGE_PUSHED_AT" + SortFieldEcrImageRepositoryName SortField = "ECR_IMAGE_REPOSITORY_NAME" + SortFieldEcrImageRegistry SortField = "ECR_IMAGE_REGISTRY" + SortFieldNetworkProtocol SortField = "NETWORK_PROTOCOL" + SortFieldComponentType SortField = "COMPONENT_TYPE" + SortFieldVulnerabilityId SortField = "VULNERABILITY_ID" + SortFieldVulnerabilitySource SortField = "VULNERABILITY_SOURCE" + SortFieldInspectorScore SortField = "INSPECTOR_SCORE" + SortFieldVendorSeverity SortField = "VENDOR_SEVERITY" +) + +// Values returns all known values for SortField. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (SortField) Values() []SortField { + return []SortField{ + "AWS_ACCOUNT_ID", + "FINDING_TYPE", + "SEVERITY", + "FIRST_OBSERVED_AT", + "LAST_OBSERVED_AT", + "FINDING_STATUS", + "RESOURCE_TYPE", + "ECR_IMAGE_PUSHED_AT", + "ECR_IMAGE_REPOSITORY_NAME", + "ECR_IMAGE_REGISTRY", + "NETWORK_PROTOCOL", + "COMPONENT_TYPE", + "VULNERABILITY_ID", + "VULNERABILITY_SOURCE", + "INSPECTOR_SCORE", + "VENDOR_SEVERITY", + } +} + +type SortOrder string + +// Enum values for SortOrder +const ( + SortOrderAsc SortOrder = "ASC" + SortOrderDesc SortOrder = "DESC" +) + +// Values returns all known values for SortOrder. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (SortOrder) Values() []SortOrder { + return []SortOrder{ + "ASC", + "DESC", + } +} + +type Status string + +// Enum values for Status +const ( + StatusEnabling Status = "ENABLING" + StatusEnabled Status = "ENABLED" + StatusDisabling Status = "DISABLING" + StatusDisabled Status = "DISABLED" + StatusSuspending Status = "SUSPENDING" + StatusSuspended Status = "SUSPENDED" +) + +// Values returns all known values for Status. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (Status) Values() []Status { + return []Status{ + "ENABLING", + "ENABLED", + "DISABLING", + "DISABLED", + "SUSPENDING", + "SUSPENDED", + } +} + +type StringComparison string + +// Enum values for StringComparison +const ( + StringComparisonEquals StringComparison = "EQUALS" + StringComparisonPrefix StringComparison = "PREFIX" + StringComparisonNotEquals StringComparison = "NOT_EQUALS" +) + +// Values returns all known values for StringComparison. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (StringComparison) Values() []StringComparison { + return []StringComparison{ + "EQUALS", + "PREFIX", + "NOT_EQUALS", + } +} + +type TitleSortBy string + +// Enum values for TitleSortBy +const ( + TitleSortByCritical TitleSortBy = "CRITICAL" + TitleSortByHigh TitleSortBy = "HIGH" + TitleSortByAll TitleSortBy = "ALL" +) + +// Values returns all known values for TitleSortBy. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (TitleSortBy) Values() []TitleSortBy { + return []TitleSortBy{ + "CRITICAL", + "HIGH", + "ALL", + } +} + +type UsageType string + +// Enum values for UsageType +const ( + UsageTypeEc2InstanceHours UsageType = "EC2_INSTANCE_HOURS" + UsageTypeEcrInitialScan UsageType = "ECR_INITIAL_SCAN" + UsageTypeEcrRescan UsageType = "ECR_RESCAN" +) + +// Values returns all known values for UsageType. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (UsageType) Values() []UsageType { + return []UsageType{ + "EC2_INSTANCE_HOURS", + "ECR_INITIAL_SCAN", + "ECR_RESCAN", + } +} + +type ValidationExceptionReason string + +// Enum values for ValidationExceptionReason +const ( + ValidationExceptionReasonCannotParse ValidationExceptionReason = "CANNOT_PARSE" + ValidationExceptionReasonFieldValidationFailed ValidationExceptionReason = "FIELD_VALIDATION_FAILED" + ValidationExceptionReasonOther ValidationExceptionReason = "OTHER" +) + +// Values returns all known values for ValidationExceptionReason. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// The ordering of this slice is not guaranteed to be stable across updates. +func (ValidationExceptionReason) Values() []ValidationExceptionReason { + return []ValidationExceptionReason{ + "CANNOT_PARSE", + "FIELD_VALIDATION_FAILED", + "OTHER", + } +} diff --git a/service/inspector2/types/errors.go b/service/inspector2/types/errors.go new file mode 100644 index 00000000000..42b5449fec2 --- /dev/null +++ b/service/inspector2/types/errors.go @@ -0,0 +1,175 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "fmt" + smithy "github.com/aws/smithy-go" +) + +// You do not have sufficient access to perform this action. +type AccessDeniedException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *AccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AccessDeniedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AccessDeniedException) ErrorCode() string { return "AccessDeniedException" } +func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// One or more tags submitted as part of the request is not valid. +type BadRequestException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *BadRequestException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *BadRequestException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *BadRequestException) ErrorCode() string { return "BadRequestException" } +func (e *BadRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A conflict occurred. +type ConflictException struct { + Message *string + + ResourceId *string + ResourceType *string + + noSmithyDocumentSerde +} + +func (e *ConflictException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ConflictException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ConflictException) ErrorCode() string { return "ConflictException" } +func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request has failed due to an internal failure of the Amazon Inspector +// service. +type InternalServerException struct { + Message *string + + RetryAfterSeconds *int32 + + noSmithyDocumentSerde +} + +func (e *InternalServerException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InternalServerException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InternalServerException) ErrorCode() string { return "InternalServerException" } +func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// The operation tried to access an invalid resource. Make sure the resource is +// specified correctly. +type ResourceNotFoundException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *ResourceNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceNotFoundException) ErrorCode() string { return "ResourceNotFoundException" } +func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You have exceeded your service quota. To perform the requested action, remove +// some of the relevant resources, or use Service Quotas to request a service quota +// increase. +type ServiceQuotaExceededException struct { + Message *string + + ResourceId *string + + noSmithyDocumentSerde +} + +func (e *ServiceQuotaExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceQuotaExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceQuotaExceededException) ErrorCode() string { return "ServiceQuotaExceededException" } +func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The limit on the number of requests per second was exceeded. +type ThrottlingException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *ThrottlingException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ThrottlingException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ThrottlingException) ErrorCode() string { return "ThrottlingException" } +func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request has failed validation due to missing required fields or having +// invalid inputs. +type ValidationException struct { + Message *string + + Reason ValidationExceptionReason + Fields []ValidationExceptionField + + noSmithyDocumentSerde +} + +func (e *ValidationException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ValidationException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ValidationException) ErrorCode() string { return "ValidationException" } +func (e *ValidationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/service/inspector2/types/types.go b/service/inspector2/types/types.go new file mode 100644 index 00000000000..117f3beb9c3 --- /dev/null +++ b/service/inspector2/types/types.go @@ -0,0 +1,1843 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + smithydocument "github.com/aws/smithy-go/document" + "time" +) + +// An Amazon Web Services account within your environment that Amazon Inspector has +// been enabled for. +type Account struct { + + // The ID of the Amazon Web Services account. + // + // This member is required. + AccountId *string + + // Details of the status of Amazon Inspector scans by resource type. + // + // This member is required. + ResourceStatus *ResourceStatus + + // The status of Amazon Inspector for the account. + // + // This member is required. + Status Status + + noSmithyDocumentSerde +} + +// An object that contains details about an aggregation response based on Amazon +// Web Services accounts. +type AccountAggregation struct { + + // The type of finding. + FindingType AggregationFindingType + + // The type of resource. + ResourceType AggregationResourceType + + // The value to sort by. + SortBy AccountSortBy + + // The sort order (ascending or descending). + SortOrder SortOrder + + noSmithyDocumentSerde +} + +// An aggregation of findings by Amazon Web Services account ID. +type AccountAggregationResponse struct { + + // The Amazon Web Services account ID. + AccountId *string + + // The number of findings by severity. + SeverityCounts *SeverityCounts + + noSmithyDocumentSerde +} + +// An object with details the status of an Amazon Web Services account within your +// Amazon Inspector environment +type AccountState struct { + + // The Amazon Web Services account ID. + // + // This member is required. + AccountId *string + + // An object detailing which resources Amazon Inspector is enabled to scan for the + // account. + // + // This member is required. + ResourceState *ResourceState + + // An object detailing the status of Amazon Inspector for the account. + // + // This member is required. + State *State + + noSmithyDocumentSerde +} + +// Contains details about an aggregation request. +// +// The following types satisfy this interface: +// AggregationRequestMemberAccountAggregation +// AggregationRequestMemberAmiAggregation +// AggregationRequestMemberAwsEcrContainerAggregation +// AggregationRequestMemberEc2InstanceAggregation +// AggregationRequestMemberFindingTypeAggregation +// AggregationRequestMemberImageLayerAggregation +// AggregationRequestMemberPackageAggregation +// AggregationRequestMemberRepositoryAggregation +// AggregationRequestMemberTitleAggregation +type AggregationRequest interface { + isAggregationRequest() +} + +// An object that contains details about an aggregation request based on Amazon Web +// Services account IDs. +type AggregationRequestMemberAccountAggregation struct { + Value AccountAggregation + + noSmithyDocumentSerde +} + +func (*AggregationRequestMemberAccountAggregation) isAggregationRequest() {} + +// An object that contains details about an aggregation request based on Amazon +// Machine Images (AMIs). +type AggregationRequestMemberAmiAggregation struct { + Value AmiAggregation + + noSmithyDocumentSerde +} + +func (*AggregationRequestMemberAmiAggregation) isAggregationRequest() {} + +// An object that contains details about an aggregation request based on Amazon ECR +// container images. +type AggregationRequestMemberAwsEcrContainerAggregation struct { + Value AwsEcrContainerAggregation + + noSmithyDocumentSerde +} + +func (*AggregationRequestMemberAwsEcrContainerAggregation) isAggregationRequest() {} + +// An object that contains details about an aggregation request based on Amazon EC2 +// instances. +type AggregationRequestMemberEc2InstanceAggregation struct { + Value Ec2InstanceAggregation + + noSmithyDocumentSerde +} + +func (*AggregationRequestMemberEc2InstanceAggregation) isAggregationRequest() {} + +// An object that contains details about an aggregation request based on finding +// types. +type AggregationRequestMemberFindingTypeAggregation struct { + Value FindingTypeAggregation + + noSmithyDocumentSerde +} + +func (*AggregationRequestMemberFindingTypeAggregation) isAggregationRequest() {} + +// An object that contains details about an aggregation request based on container +// image layers. +type AggregationRequestMemberImageLayerAggregation struct { + Value ImageLayerAggregation + + noSmithyDocumentSerde +} + +func (*AggregationRequestMemberImageLayerAggregation) isAggregationRequest() {} + +// An object that contains details about an aggregation request based on operating +// system package type. +type AggregationRequestMemberPackageAggregation struct { + Value PackageAggregation + + noSmithyDocumentSerde +} + +func (*AggregationRequestMemberPackageAggregation) isAggregationRequest() {} + +// An object that contains details about an aggregation request based on Amazon ECR +// repositories. +type AggregationRequestMemberRepositoryAggregation struct { + Value RepositoryAggregation + + noSmithyDocumentSerde +} + +func (*AggregationRequestMemberRepositoryAggregation) isAggregationRequest() {} + +// An object that contains details about an aggregation request based on finding +// title. +type AggregationRequestMemberTitleAggregation struct { + Value TitleAggregation + + noSmithyDocumentSerde +} + +func (*AggregationRequestMemberTitleAggregation) isAggregationRequest() {} + +// A structure that contains details about the results of an aggregation type. +// +// The following types satisfy this interface: +// AggregationResponseMemberAccountAggregation +// AggregationResponseMemberAmiAggregation +// AggregationResponseMemberAwsEcrContainerAggregation +// AggregationResponseMemberEc2InstanceAggregation +// AggregationResponseMemberFindingTypeAggregation +// AggregationResponseMemberImageLayerAggregation +// AggregationResponseMemberPackageAggregation +// AggregationResponseMemberRepositoryAggregation +// AggregationResponseMemberTitleAggregation +type AggregationResponse interface { + isAggregationResponse() +} + +// An object that contains details about an aggregation response based on Amazon +// Web Services account IDs. +type AggregationResponseMemberAccountAggregation struct { + Value AccountAggregationResponse + + noSmithyDocumentSerde +} + +func (*AggregationResponseMemberAccountAggregation) isAggregationResponse() {} + +// An object that contains details about an aggregation response based on Amazon +// Machine Images (AMIs). +type AggregationResponseMemberAmiAggregation struct { + Value AmiAggregationResponse + + noSmithyDocumentSerde +} + +func (*AggregationResponseMemberAmiAggregation) isAggregationResponse() {} + +// An object that contains details about an aggregation response based on Amazon +// ECR container images. +type AggregationResponseMemberAwsEcrContainerAggregation struct { + Value AwsEcrContainerAggregationResponse + + noSmithyDocumentSerde +} + +func (*AggregationResponseMemberAwsEcrContainerAggregation) isAggregationResponse() {} + +// An object that contains details about an aggregation response based on Amazon +// EC2 instances. +type AggregationResponseMemberEc2InstanceAggregation struct { + Value Ec2InstanceAggregationResponse + + noSmithyDocumentSerde +} + +func (*AggregationResponseMemberEc2InstanceAggregation) isAggregationResponse() {} + +// An object that contains details about an aggregation response based on finding +// types. +type AggregationResponseMemberFindingTypeAggregation struct { + Value FindingTypeAggregationResponse + + noSmithyDocumentSerde +} + +func (*AggregationResponseMemberFindingTypeAggregation) isAggregationResponse() {} + +// An object that contains details about an aggregation response based on container +// image layers. +type AggregationResponseMemberImageLayerAggregation struct { + Value ImageLayerAggregationResponse + + noSmithyDocumentSerde +} + +func (*AggregationResponseMemberImageLayerAggregation) isAggregationResponse() {} + +// An object that contains details about an aggregation response based on operating +// system package type. +type AggregationResponseMemberPackageAggregation struct { + Value PackageAggregationResponse + + noSmithyDocumentSerde +} + +func (*AggregationResponseMemberPackageAggregation) isAggregationResponse() {} + +// An object that contains details about an aggregation response based on Amazon +// ECR repositories. +type AggregationResponseMemberRepositoryAggregation struct { + Value RepositoryAggregationResponse + + noSmithyDocumentSerde +} + +func (*AggregationResponseMemberRepositoryAggregation) isAggregationResponse() {} + +// An object that contains details about an aggregation response based on finding +// title. +type AggregationResponseMemberTitleAggregation struct { + Value TitleAggregationResponse + + noSmithyDocumentSerde +} + +func (*AggregationResponseMemberTitleAggregation) isAggregationResponse() {} + +// The details that define an aggregation based on Amazon machine images (AMIs). +type AmiAggregation struct { + + // The IDs of AMIs to aggregate findings for. + Amis []StringFilter + + // The value to sort results by. + SortBy AmiSortBy + + // The order to sort results by. + SortOrder SortOrder + + noSmithyDocumentSerde +} + +// A response that contains the results of a finding aggregation by AMI. +type AmiAggregationResponse struct { + + // The ID of the AMI that findings were aggregated for. + // + // This member is required. + Ami *string + + // The Amazon Web Services account ID that the AMI belongs. + AccountId *string + + // The IDs of Amazon EC2 instances using this AMI. + AffectedInstances *int64 + + // An object that contains the count of matched findings per severity. + SeverityCounts *SeverityCounts + + noSmithyDocumentSerde +} + +// Represents which scan types are automatically enabled for new members of your +// Amazon Inspector organization. +type AutoEnable struct { + + // Represents whether Amazon EC2 scans are automatically enabled for new members of + // your Amazon Inspector organization. + // + // This member is required. + Ec2 *bool + + // Represents whether Amazon ECR scans are automatically enabled for new members of + // your Amazon Inspector organization. + // + // This member is required. + Ecr *bool + + noSmithyDocumentSerde +} + +// Details of the Amazon EC2 instance involved in a finding. +type AwsEc2InstanceDetails struct { + + // The IAM instance profile ARN of the Amazon EC2 instance. + IamInstanceProfileArn *string + + // The image ID of the Amazon EC2 instance. + ImageId *string + + // The IPv4 addresses of the Amazon EC2 instance. + IpV4Addresses []string + + // The IPv6 addresses of the Amazon EC2 instance. + IpV6Addresses []string + + // The name of the key pair used to launch the Amazon EC2 instance. + KeyName *string + + // The date and time the Amazon EC2 instance was launched at. + LaunchedAt *time.Time + + // The platform of the Amazon EC2 instance. + Platform *string + + // The subnet ID of the Amazon EC2 instance. + SubnetId *string + + // The type of the Amazon EC2 instance. + Type *string + + // The VPC ID of the Amazon EC2 instance. + VpcId *string + + noSmithyDocumentSerde +} + +// An aggregation of information about Amazon ECR containers. +type AwsEcrContainerAggregation struct { + + // The architecture of the containers. + Architectures []StringFilter + + // The image SHA values. + ImageShas []StringFilter + + // The image tags. + ImageTags []StringFilter + + // The container repositories. + Repositories []StringFilter + + // The container resource IDs. + ResourceIds []StringFilter + + // The value to sort by. + SortBy AwsEcrContainerSortBy + + // The sort order (ascending or descending). + SortOrder SortOrder + + noSmithyDocumentSerde +} + +// An aggregation of information about Amazon ECR containers. +type AwsEcrContainerAggregationResponse struct { + + // The resource ID of the container. + // + // This member is required. + ResourceId *string + + // The Amazon Web Services account ID of the account that owns the container. + AccountId *string + + // The architecture of the container. + Architecture *string + + // The SHA value of the container image. + ImageSha *string + + // The container image stags. + ImageTags []string + + // The container repository. + Repository *string + + // The number of finding by severity. + SeverityCounts *SeverityCounts + + noSmithyDocumentSerde +} + +// The image details of the Amazon ECR container image. +type AwsEcrContainerImageDetails struct { + + // The image hash of the Amazon ECR container image. + // + // This member is required. + ImageHash *string + + // The registry the Amazon ECR container image belongs to. + // + // This member is required. + Registry *string + + // The name of the repository the Amazon ECR container image resides in. + // + // This member is required. + RepositoryName *string + + // The architecture of the Amazon ECR container image. + Architecture *string + + // The image author of the Amazon ECR container image. + Author *string + + // The image tags attached to the Amazon ECR container image. + ImageTags []string + + // The platform of the Amazon ECR container image. + Platform *string + + // The date and time the Amazon ECR container image was pushed. + PushedAt *time.Time + + noSmithyDocumentSerde +} + +// a structure that contains information on the count of resources within a group. +type Counts struct { + + // The number of resources. + Count int64 + + // The key associated with this group + GroupKey GroupKey + + noSmithyDocumentSerde +} + +// A structure that identifies filter criteria for GetCoverageStatistics. +type CoverageFilterCriteria struct { + + // An array of Amazon Web Services account IDs to return coverage statistics for. + AccountId []CoverageStringFilter + + // The Amazon EC2 instance tags to filter on. + Ec2InstanceTags []CoverageMapFilter + + // The Amazon ECR image tags to filter on. + EcrImageTags []CoverageStringFilter + + // The Amazon ECR repository name to filter on. + EcrRepositoryName []CoverageStringFilter + + // An array of Amazon Web Services resource IDs to return coverage statistics for. + ResourceId []CoverageStringFilter + + // An array of Amazon Web Services resource types to return coverage statistics + // for. + ResourceType []CoverageStringFilter + + // The scan status code to filter on. + ScanStatusCode []CoverageStringFilter + + // The scan status reason to filter on. + ScanStatusReason []CoverageStringFilter + + // An array of Amazon Inspector scan types to return coverage statistics for. + ScanType []CoverageStringFilter + + noSmithyDocumentSerde +} + +// Contains details of a coverage map filter. +type CoverageMapFilter struct { + + // The operator to compare coverage on. + // + // This member is required. + Comparison CoverageMapComparison + + // The tag key associated with the coverage map filter. + // + // This member is required. + Key *string + + // The tag value associated with the coverage map filter. + Value *string + + noSmithyDocumentSerde +} + +// Contains details of a coverage string filter. +type CoverageStringFilter struct { + + // The operator to compare strings on. + // + // This member is required. + Comparison CoverageStringComparison + + // The value to compare strings on. + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + +// An object that contains details about a resource covered by Amazon Inspector. +type CoveredResource struct { + + // The Amazon Web Services account ID of the covered resource. + // + // This member is required. + AccountId *string + + // The ID of the covered resource. + // + // This member is required. + ResourceId *string + + // The type of the covered resource. + // + // This member is required. + ResourceType CoverageResourceType + + // The Amazon Inspector scan type covering the resource. + // + // This member is required. + ScanType ScanType + + // An object that contains details about the metadata. + ResourceMetadata *ResourceScanMetadata + + // The status of the scan covering the resource. + ScanStatus *ScanStatus + + noSmithyDocumentSerde +} + +// The CVSS score for a finding. +type CvssScore struct { + + // The base CVSS score used for the finding. + // + // This member is required. + BaseScore *float64 + + // The vector string of the CVSS score. + // + // This member is required. + ScoringVector *string + + // The source of the CVSS score. + // + // This member is required. + Source *string + + // The version of CVSS used for the score. + // + // This member is required. + Version *string + + noSmithyDocumentSerde +} + +// Details on adjustments Amazon Inspector made to the CVSS score for a finding. +type CvssScoreAdjustment struct { + + // The metric used to adjust the CVSS score. + // + // This member is required. + Metric *string + + // The reason the CVSS score has been adjustment. + // + // This member is required. + Reason *string + + noSmithyDocumentSerde +} + +// Information about the CVSS score. +type CvssScoreDetails struct { + + // The CVSS score. + // + // This member is required. + Score *float64 + + // The source for the CVSS score. + // + // This member is required. + ScoreSource *string + + // The vector for the CVSS score. + // + // This member is required. + ScoringVector *string + + // The CVSS version used in scoring. + // + // This member is required. + Version *string + + // An object that contains details about adjustment Amazon Inspector made to the + // CVSS score. + Adjustments []CvssScoreAdjustment + + // The source of the CVSS data. + CvssSource *string + + noSmithyDocumentSerde +} + +// Contains details on the time range used to filter findings. +type DateFilter struct { + + // A timestamp representing the end of the time period filtered on. + EndInclusive *time.Time + + // A timestamp representing the start of the time period filtered on. + StartInclusive *time.Time + + noSmithyDocumentSerde +} + +// Details of the Amazon Inspector delegated administrator for your organization. +type DelegatedAdmin struct { + + // The Amazon Web Services account ID of the Amazon Inspector delegated + // administrator for your organization. + AccountId *string + + // The status of the Amazon Inspector delegated administrator. + RelationshipStatus RelationshipStatus + + noSmithyDocumentSerde +} + +// Details of the Amazon Inspector delegated administrator for your organization. +type DelegatedAdminAccount struct { + + // The Amazon Web Services account ID of the Amazon Inspector delegated + // administrator for your organization. + AccountId *string + + // The status of the Amazon Inspector delegated administrator. + Status DelegatedAdminStatus + + noSmithyDocumentSerde +} + +// Contains details of the Amazon S3 bucket and KMS key used to export findings. +type Destination struct { + + // The name of the Amazon S3 bucket to export findings to. + // + // This member is required. + BucketName *string + + // The ARN of the KMS key used to encrypt data when exporting findings. + // + // This member is required. + KmsKeyArn *string + + // The prefix of the KMS key used to export findings. + KeyPrefix *string + + noSmithyDocumentSerde +} + +// The details that define an aggregation based on Amazon EC2 instances. +type Ec2InstanceAggregation struct { + + // The AMI IDs associated with the Amazon EC2 instances to aggregate findings for. + Amis []StringFilter + + // The Amazon EC2 instance IDs to aggregate findings for. + InstanceIds []StringFilter + + // The Amazon EC2 instance tags to aggregate findings for. + InstanceTags []MapFilter + + // The operating system types to aggregate findings for. Valid values must be + // uppercase and underscore separated, examples are ORACLE_LINUX_7 and + // ALPINE_LINUX_3_8. + OperatingSystems []StringFilter + + // The value to sort results by. + SortBy Ec2InstanceSortBy + + // The order to sort results by. + SortOrder SortOrder + + noSmithyDocumentSerde +} + +// A response that contains the results of a finding aggregation by Amazon EC2 +// instance. +type Ec2InstanceAggregationResponse struct { + + // The Amazon EC2 instance ID. + // + // This member is required. + InstanceId *string + + // The Amazon Web Services account the Amazon EC2 instance belongs to. + AccountId *string + + // The Amazon Machine Image (AMI) of the Amazon EC2 instance. + Ami *string + + // The tags attached to the instance. + InstanceTags map[string]string + + // The number of network findings for the Amazon EC2 instance. + NetworkFindings *int64 + + // The operating system of the Amazon EC2 instance. + OperatingSystem *string + + // An object that contains the count of matched findings per severity. + SeverityCounts *SeverityCounts + + noSmithyDocumentSerde +} + +// Meta data details of an Amazon EC2 instance. +type Ec2Metadata struct { + + // The ID of the Amazon Machine Image (AMI) used to launch the instance. + AmiId *string + + // The platform of the instance. + Platform Ec2Platform + + // The tags attached to the instance. + Tags map[string]string + + noSmithyDocumentSerde +} + +// Information on the Amazon ECR image metadata associated with a finding. +type EcrContainerImageMetadata struct { + + // Tags associated with the Amazon ECR image metadata. + Tags []string + + noSmithyDocumentSerde +} + +// Information on the Amazon ECR repository metadata associated with a finding. +type EcrRepositoryMetadata struct { + + // The name of the Amazon ECR repository. + Name *string + + // The frequency of scans. + ScanFrequency EcrScanFrequency + + noSmithyDocumentSerde +} + +// An object with details on why an account failed to enable Amazon Inspector. +type FailedAccount struct { + + // The Amazon Web Services account ID. + // + // This member is required. + AccountId *string + + // The error code explaining why the account failed to enable Amazon Inspector. + // + // This member is required. + ErrorCode ErrorCode + + // The error message received when the account failed to enable Amazon Inspector. + // + // This member is required. + ErrorMessage *string + + // An object detailing which resources Amazon Inspector is enabled to scan for the + // account. + ResourceStatus *ResourceStatus + + // The status of Amazon Inspector for the account. + Status Status + + noSmithyDocumentSerde +} + +// Details about a filter. +type Filter struct { + + // The action that is to be applied to the findings that match the filter. + // + // This member is required. + Action FilterAction + + // The Amazon Resource Number (ARN) associated with this filter. + // + // This member is required. + Arn *string + + // The date and time this filter was created at. + // + // This member is required. + CreatedAt *time.Time + + // Details on the filter criteria associated with this filter. + // + // This member is required. + Criteria *FilterCriteria + + // The name of the filter. + // + // This member is required. + Name *string + + // The Amazon Web Services account ID of the account that created the filter. + // + // This member is required. + OwnerId *string + + // The date and time the filter was last updated at. + // + // This member is required. + UpdatedAt *time.Time + + // A description of the filter. + Description *string + + // The reason for the filter. + Reason *string + + // The tags attached to the filter. + Tags map[string]string + + noSmithyDocumentSerde +} + +// Details on the criteria used to define the filter. +type FilterCriteria struct { + + // Details of the Amazon Web Services account IDs used to filter findings. + AwsAccountId []StringFilter + + // Details of the component IDs used to filter findings. + ComponentId []StringFilter + + // Details of the component types used to filter findings. + ComponentType []StringFilter + + // Details of the Amazon EC2 instance image IDs used to filter findings. + Ec2InstanceImageId []StringFilter + + // Details of the Amazon EC2 instance subnet IDs used to filter findings. + Ec2InstanceSubnetId []StringFilter + + // Details of the Amazon EC2 instance VPC IDs used to filter findings. + Ec2InstanceVpcId []StringFilter + + // Details of the Amazon ECR image architecture types used to filter findings. + EcrImageArchitecture []StringFilter + + // Details of the Amazon ECR image hashes used to filter findings. + EcrImageHash []StringFilter + + // Details on the Amazon ECR image push date and time used to filter findings. + EcrImagePushedAt []DateFilter + + // Details on the Amazon ECR registry used to filter findings. + EcrImageRegistry []StringFilter + + // Details on the name of the Amazon ECR repository used to filter findings. + EcrImageRepositoryName []StringFilter + + // The tags attached to the Amazon ECR container image. + EcrImageTags []StringFilter + + // Details on the finding ARNs used to filter findings. + FindingArn []StringFilter + + // Details on the finding status types used to filter findings. + FindingStatus []StringFilter + + // Details on the finding types used to filter findings. + FindingType []StringFilter + + // Details on the date and time a finding was first seen used to filter findings. + FirstObservedAt []DateFilter + + // The Amazon Inspector score to filter on. + InspectorScore []NumberFilter + + // Details on the date and time a finding was last seen used to filter findings. + LastObservedAt []DateFilter + + // Details on the ingress source addresses used to filter findings. + NetworkProtocol []StringFilter + + // Details on the port ranges used to filter findings. + PortRange []PortRangeFilter + + // Details on the related vulnerabilities used to filter findings. + RelatedVulnerabilities []StringFilter + + // Details on the resource IDs used to filter findings. + ResourceId []StringFilter + + // Details on the resource tags used to filter findings. + ResourceTags []MapFilter + + // Details on the resource types used to filter findings. + ResourceType []StringFilter + + // Details on the severity used to filter findings. + Severity []StringFilter + + // Details on the finding title used to filter findings. + Title []StringFilter + + // Details on the date and time a finding was last updated at used to filter + // findings. + UpdatedAt []DateFilter + + // Details on the vendor severity used to filter findings. + VendorSeverity []StringFilter + + // Details on the vulnerability ID used to filter findings. + VulnerabilityId []StringFilter + + // Details on the vulnerability type used to filter findings. + VulnerabilitySource []StringFilter + + // Details on the vulnerable packages used to filter findings. + VulnerablePackages []PackageFilter + + noSmithyDocumentSerde +} + +// Details about an Amazon Inspector finding. +type Finding struct { + + // The Amazon Web Services account ID associated with the finding. + // + // This member is required. + AwsAccountId *string + + // The description of the finding. + // + // This member is required. + Description *string + + // The Amazon Resource Number (ARN) of the finding. + // + // This member is required. + FindingArn *string + + // The date and time that the finding was first observed. + // + // This member is required. + FirstObservedAt *time.Time + + // The date and time that the finding was last observed. + // + // This member is required. + LastObservedAt *time.Time + + // An object that contains the details about how to remediate a finding. + // + // This member is required. + Remediation *Remediation + + // Contains information on the resources involved in a finding. + // + // This member is required. + Resources []Resource + + // The severity of the finding. + // + // This member is required. + Severity Severity + + // The status of the finding. + // + // This member is required. + Status FindingStatus + + // The type of the finding. + // + // This member is required. + Type FindingType + + // The Amazon Inspector score given to the finding. + InspectorScore *float64 + + // An object that contains details of the Amazon Inspector score. + InspectorScoreDetails *InspectorScoreDetails + + // An object that contains the details of a network reachability finding. + NetworkReachabilityDetails *NetworkReachabilityDetails + + // An object that contains the details of a package vulnerability finding. + PackageVulnerabilityDetails *PackageVulnerabilityDetails + + // The title of the finding. + Title *string + + // The date and time the finding was last updated at. + UpdatedAt *time.Time + + noSmithyDocumentSerde +} + +// The details that define an aggregation based on finding type. +type FindingTypeAggregation struct { + + // The finding type to aggregate. + FindingType AggregationFindingType + + // The resource type to aggregate. + ResourceType AggregationResourceType + + // The value to sort results by. + SortBy FindingTypeSortBy + + // The order to sort results by. + SortOrder SortOrder + + noSmithyDocumentSerde +} + +// A response that contains the results of a finding type aggregation. +type FindingTypeAggregationResponse struct { + + // The ID of the Amazon Web Services account associated with the findings. + AccountId *string + + // The value to sort results by. + SeverityCounts *SeverityCounts + + noSmithyDocumentSerde +} + +// Information about the Amazon Inspector free trial for an account. +type FreeTrialAccountInfo struct { + + // The account associated with the Amazon Inspector free trial information. + // + // This member is required. + AccountId *string + + // Contains information about the Amazon Inspector free trial for an account. + // + // This member is required. + FreeTrialInfo []FreeTrialInfo + + noSmithyDocumentSerde +} + +// An object that contains information about the Amazon Inspector free trial for an +// account. +type FreeTrialInfo struct { + + // The date and time that the Amazon Inspector free trail ends for a given account. + // + // This member is required. + End *time.Time + + // The date and time that the Amazon Inspector free trail started for a given + // account. + // + // This member is required. + Start *time.Time + + // The order to sort results by. + // + // This member is required. + Status FreeTrialStatus + + // The type of scan covered by the Amazon Inspector free trail. + // + // This member is required. + Type FreeTrialType + + noSmithyDocumentSerde +} + +// Information about an error received while accessing free trail data for an +// account. +type FreeTrialInfoError struct { + + // The account associated with the Amazon Inspector free trial information. + // + // This member is required. + AccountId *string + + // The error code. + // + // This member is required. + Code FreeTrialInfoErrorCode + + // The error message returned. + // + // This member is required. + Message *string + + noSmithyDocumentSerde +} + +// The details that define an aggregation based on container image layers. +type ImageLayerAggregation struct { + + // The hashes associated with the layers. + LayerHashes []StringFilter + + // The repository associated with the container image hosting the layers. + Repositories []StringFilter + + // The ID of the container image layer. + ResourceIds []StringFilter + + // The value to sort results by. + SortBy ImageLayerSortBy + + // The order to sort results by. + SortOrder SortOrder + + noSmithyDocumentSerde +} + +// A response that contains the results of a finding aggregation by image layer. +type ImageLayerAggregationResponse struct { + + // The ID of the Amazon Web Services account that owns the container image hosting + // the layer image. + // + // This member is required. + AccountId *string + + // The layer hash. + // + // This member is required. + LayerHash *string + + // The repository the layer resides in. + // + // This member is required. + Repository *string + + // The resource ID of the container image layer. + // + // This member is required. + ResourceId *string + + // An object that represents the count of matched findings per severity. + SeverityCounts *SeverityCounts + + noSmithyDocumentSerde +} + +// Information about the Amazon Inspector score given to a finding. +type InspectorScoreDetails struct { + + // An object that contains details about the CVSS score given to a finding. + AdjustedCvss *CvssScoreDetails + + noSmithyDocumentSerde +} + +// An object that describes details of a map filter. +type MapFilter struct { + + // The operator to use when comparing values in the filter. + // + // This member is required. + Comparison MapComparison + + // The tag key used in the filter. + // + // This member is required. + Key *string + + // The tag value used in the filter. + Value *string + + noSmithyDocumentSerde +} + +// Details on a member account in your organization. +type Member struct { + + // The Amazon Web Services account ID of the member account. + AccountId *string + + // The Amazon Web Services account ID of the Amazon Inspector delegated + // administrator for this member account. + DelegatedAdminAccountId *string + + // The status of the member account. + RelationshipStatus RelationshipStatus + + // A timestamp showing when the status of this member was last updated. + UpdatedAt *time.Time + + noSmithyDocumentSerde +} + +// Information on the network path associated with a finding. +type NetworkPath struct { + + // The details on the steps in the network path. + Steps []Step + + noSmithyDocumentSerde +} + +// Contains the details of a network reachability finding. +type NetworkReachabilityDetails struct { + + // An object that contains details about a network path associated with a finding. + // + // This member is required. + NetworkPath *NetworkPath + + // An object that contains details about the open port range associated with a + // finding. + // + // This member is required. + OpenPortRange *PortRange + + // The protocol associated with a finding. + // + // This member is required. + Protocol NetworkProtocol + + noSmithyDocumentSerde +} + +// An object that describes the details of a number filter. +type NumberFilter struct { + + // The lowest number to be included in the filter. + LowerInclusive *float64 + + // The highest number to be included in the filter. + UpperInclusive *float64 + + noSmithyDocumentSerde +} + +// The details that define an aggregation based on operating system package type. +type PackageAggregation struct { + + // The names of packages to aggregate findings on. + PackageNames []StringFilter + + // The value to sort results by. + SortBy PackageSortBy + + // The order to sort results by. + SortOrder SortOrder + + noSmithyDocumentSerde +} + +// A response that contains the results of a finding aggregation by image layer. +type PackageAggregationResponse struct { + + // The name of the operating system package. + // + // This member is required. + PackageName *string + + // The ID of the Amazon Web Services account associated with the findings. + AccountId *string + + // An object that contains the count of matched findings per severity. + SeverityCounts *SeverityCounts + + noSmithyDocumentSerde +} + +// Contains information on the details of a package filter. +type PackageFilter struct { + + // An object that contains details on the package architecture type to filter on. + Architecture *StringFilter + + // An object that contains details on the package epoch to filter on. + Epoch *NumberFilter + + // An object that contains details on the name of the package to filter on. + Name *StringFilter + + // An object that contains details on the package release to filter on. + Release *StringFilter + + // An object that contains details on the source layer hash to filter on. + SourceLayerHash *StringFilter + + // The package version to filter on. + Version *StringFilter + + noSmithyDocumentSerde +} + +// Information about a package vulnerability finding. +type PackageVulnerabilityDetails struct { + + // The source of the vulnerability information. + // + // This member is required. + Source *string + + // The ID given to this vulnerability. + // + // This member is required. + VulnerabilityId *string + + // The packages impacted by this vulnerability. + // + // This member is required. + VulnerablePackages []VulnerablePackage + + // An object that contains details about the CVSS score of a finding. + Cvss []CvssScore + + // One or more URLs that contain details about this vulnerability type. + ReferenceUrls []string + + // One or more vulnerabilities related to the one identified in this finding. + RelatedVulnerabilities []string + + // A URL to the source of the vulnerability information. + SourceUrl *string + + // The date and time that this vulnerability was first added to the vendor's + // database. + VendorCreatedAt *time.Time + + // The severity the vendor has given to this vulnerability type. + VendorSeverity *string + + // The date and time the vendor last updated this vulnerability in their database. + VendorUpdatedAt *time.Time + + noSmithyDocumentSerde +} + +// Contains information on the permissions an account has within Amazon Inspector. +type Permission struct { + + // The operations that can be performed with the given permissions. + // + // This member is required. + Operation Operation + + // The services that the permissions allow an account to perform the given + // operations for. + // + // This member is required. + Service Service + + noSmithyDocumentSerde +} + +// Details about the port range associated with a finding. +type PortRange struct { + + // The beginning port in a port range. + // + // This member is required. + Begin *int32 + + // The ending port in a port range. + // + // This member is required. + End *int32 + + noSmithyDocumentSerde +} + +// An object that describes the details of a port range filter. +type PortRangeFilter struct { + + // The port number the port range begins at. + BeginInclusive *int32 + + // The port number the port range ends at. + EndInclusive *int32 + + noSmithyDocumentSerde +} + +// Details about the recommended course of action to remediate the finding. +type Recommendation struct { + + // The recommended course of action to remediate the finding. + Text *string + + // The URL address to the CVE remediation recommendations. + Url *string + + noSmithyDocumentSerde +} + +// Information on how to remediate a finding. +type Remediation struct { + + // An object that contains information about the recommended course of action to + // remediate the finding. + Recommendation *Recommendation + + noSmithyDocumentSerde +} + +// The details that define an aggregation based on repository. +type RepositoryAggregation struct { + + // The names of repositories to aggregate findings on. + Repositories []StringFilter + + // The value to sort results by. + SortBy RepositorySortBy + + // The order to sort results by. + SortOrder SortOrder + + noSmithyDocumentSerde +} + +// A response that contains details on the results of a finding aggregation by +// repository. +type RepositoryAggregationResponse struct { + + // The name of the repository associated with the findings. + // + // This member is required. + Repository *string + + // The ID of the Amazon Web Services account associated with the findings. + AccountId *string + + // The number of container images impacted by the findings. + AffectedImages *int64 + + // An object that represent the count of matched findings per severity. + SeverityCounts *SeverityCounts + + noSmithyDocumentSerde +} + +// Details about the resource involved in a finding. +type Resource struct { + + // The ID of the resource. + // + // This member is required. + Id *string + + // The type of resource. + // + // This member is required. + Type ResourceType + + // An object that contains details about the resource involved in a finding. + Details *ResourceDetails + + // The partition of the resource. + Partition *string + + // The Amazon Web Services Region the impacted resource is located in. + Region *string + + // The tags attached to the resource. + Tags map[string]string + + noSmithyDocumentSerde +} + +// Contains details about the resource involved in the finding. +type ResourceDetails struct { + + // An object that contains details about the Amazon EC2 instance involved in the + // finding. + AwsEc2Instance *AwsEc2InstanceDetails + + // An object that contains details about the Amazon ECR container image involved in + // the finding. + AwsEcrContainerImage *AwsEcrContainerImageDetails + + noSmithyDocumentSerde +} + +// An object that contains details about the metadata for an Amazon ECR resource. +type ResourceScanMetadata struct { + + // An object that contains metadata details for an Amazon EC2 instance. + Ec2 *Ec2Metadata + + // An object that contains details about the container metadata for an Amazon ECR + // image. + EcrImage *EcrContainerImageMetadata + + // An object that contains details about the repository an Amazon ECR image resides + // in. + EcrRepository *EcrRepositoryMetadata + + noSmithyDocumentSerde +} + +// Details the state of Amazon Inspector for each resource type Amazon Inspector +// scans. +type ResourceState struct { + + // An object detailing the state of Amazon Inspector scanning for Amazon EC2 + // resources. + // + // This member is required. + Ec2 *State + + // An object detailing the state of Amazon Inspector scanning for Amazon ECR + // resources. + // + // This member is required. + Ecr *State + + noSmithyDocumentSerde +} + +// Details the status of Amazon Inspector for each resource type Amazon Inspector +// scans. +type ResourceStatus struct { + + // The status of Amazon Inspector scanning for Amazon EC2 resources. + // + // This member is required. + Ec2 Status + + // The status of Amazon Inspector scanning for Amazon ECR resources. + // + // This member is required. + Ecr Status + + noSmithyDocumentSerde +} + +// The status of the scan. +type ScanStatus struct { + + // The reason for the scan. + // + // This member is required. + Reason ScanStatusReason + + // The status code of the scan. + // + // This member is required. + StatusCode ScanStatusCode + + noSmithyDocumentSerde +} + +// An object that contains the counts of aggregated finding per severity. +type SeverityCounts struct { + + // The total count of findings from all severities. + All *int64 + + // The total count of critical severity findings. + Critical *int64 + + // The total count of high severity findings. + High *int64 + + // The total count of medium severity findings. + Medium *int64 + + noSmithyDocumentSerde +} + +// Details about the criteria used to sort finding results. +type SortCriteria struct { + + // The finding detail field by which results are sorted. + // + // This member is required. + Field SortField + + // The order by which findings are sorted. + // + // This member is required. + SortOrder SortOrder + + noSmithyDocumentSerde +} + +// An object that described the state of Amazon Inspector scans for an account. +type State struct { + + // The error code explaining why the account failed to enable Amazon Inspector. + // + // This member is required. + ErrorCode ErrorCode + + // The error message received when the account failed to enable Amazon Inspector. + // + // This member is required. + ErrorMessage *string + + // The status of Amazon Inspector for the account. + // + // This member is required. + Status Status + + noSmithyDocumentSerde +} + +// Details about the step associated with a finding. +type Step struct { + + // The component ID. + // + // This member is required. + ComponentId *string + + // The component type. + // + // This member is required. + ComponentType *string + + noSmithyDocumentSerde +} + +// An object that describes the details of a string filter. +type StringFilter struct { + + // The operator to use when comparing values in the filter + // + // This member is required. + Comparison StringComparison + + // The value to filter on. + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + +// The details that define an aggregation based on finding title. +type TitleAggregation struct { + + // The resource type to aggregate on. + ResourceType AggregationResourceType + + // The value to sort results by. + SortBy TitleSortBy + + // The order to sort results by. + SortOrder SortOrder + + // The finding titles to aggregate on. + Titles []StringFilter + + // The vulnerability IDs of the findings. + VulnerabilityIds []StringFilter + + noSmithyDocumentSerde +} + +// A response that contains details on the results of a finding aggregation by +// title. +type TitleAggregationResponse struct { + + // The title that the findings were aggregated on. + // + // This member is required. + Title *string + + // The ID of the Amazon Web Services account associated with the findings. + AccountId *string + + // An object that represent the count of matched findings per severity. + SeverityCounts *SeverityCounts + + // The vulnerability ID of the finding. + VulnerabilityId *string + + noSmithyDocumentSerde +} + +// Contains usage information about the cost of Amazon Inspector operation. +type Usage struct { + + // The currency type used when calculating usage data. + Currency Currency + + // The estimated monthly cost of Amazon Inspector. + EstimatedMonthlyCost float64 + + // The total of usage. + Total float64 + + // The type scan. + Type UsageType + + noSmithyDocumentSerde +} + +// The total of usage for an account ID. +type UsageTotal struct { + + // The account ID of the account that usage data was retrieved for. + AccountId *string + + // An object representing the total usage for an account. + Usage []Usage + + noSmithyDocumentSerde +} + +// An object that describes a validation exception. +type ValidationExceptionField struct { + + // The validation exception message. + // + // This member is required. + Message *string + + // The name of the validation exception. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +// Information on the vulnerable package identified by a finding. +type VulnerablePackage struct { + + // The name of the vulnerable package. + // + // This member is required. + Name *string + + // The version of the vulnerable package. + // + // This member is required. + Version *string + + // The architecture of the vulnerable package. + Arch *string + + // The epoch of the vulnerable package. + Epoch int32 + + // The file path of the vulnerable package. + FilePath *string + + // The version of the package that contains the vulnerability fix. + FixedInVersion *string + + // The package manager of the vulnerable package. + PackageManager PackageManager + + // The release of the vulnerable package. + Release *string + + // The source layer hash of the vulnerable package. + SourceLayerHash *string + + noSmithyDocumentSerde +} + +type noSmithyDocumentSerde = smithydocument.NoSerde + +// UnknownUnionMember is returned when a union member is returned over the wire, +// but has an unknown tag. +type UnknownUnionMember struct { + Tag string + Value []byte + + noSmithyDocumentSerde +} + +func (*UnknownUnionMember) isAggregationRequest() {} +func (*UnknownUnionMember) isAggregationResponse() {} diff --git a/service/inspector2/types/types_exported_test.go b/service/inspector2/types/types_exported_test.go new file mode 100644 index 00000000000..82ce5129cc4 --- /dev/null +++ b/service/inspector2/types/types_exported_test.go @@ -0,0 +1,108 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types_test + +import ( + "fmt" + "github.com/aws/aws-sdk-go-v2/service/inspector2/types" +) + +func ExampleAggregationRequest_outputUsage() { + var union types.AggregationRequest + // type switches can be used to check the union value + switch v := union.(type) { + case *types.AggregationRequestMemberAccountAggregation: + _ = v.Value // Value is types.AccountAggregation + + case *types.AggregationRequestMemberAmiAggregation: + _ = v.Value // Value is types.AmiAggregation + + case *types.AggregationRequestMemberAwsEcrContainerAggregation: + _ = v.Value // Value is types.AwsEcrContainerAggregation + + case *types.AggregationRequestMemberEc2InstanceAggregation: + _ = v.Value // Value is types.Ec2InstanceAggregation + + case *types.AggregationRequestMemberFindingTypeAggregation: + _ = v.Value // Value is types.FindingTypeAggregation + + case *types.AggregationRequestMemberImageLayerAggregation: + _ = v.Value // Value is types.ImageLayerAggregation + + case *types.AggregationRequestMemberPackageAggregation: + _ = v.Value // Value is types.PackageAggregation + + case *types.AggregationRequestMemberRepositoryAggregation: + _ = v.Value // Value is types.RepositoryAggregation + + case *types.AggregationRequestMemberTitleAggregation: + _ = v.Value // Value is types.TitleAggregation + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.AwsEcrContainerAggregation +var _ *types.TitleAggregation +var _ *types.ImageLayerAggregation +var _ *types.AmiAggregation +var _ *types.FindingTypeAggregation +var _ *types.AccountAggregation +var _ *types.Ec2InstanceAggregation +var _ *types.PackageAggregation +var _ *types.RepositoryAggregation + +func ExampleAggregationResponse_outputUsage() { + var union types.AggregationResponse + // type switches can be used to check the union value + switch v := union.(type) { + case *types.AggregationResponseMemberAccountAggregation: + _ = v.Value // Value is types.AccountAggregationResponse + + case *types.AggregationResponseMemberAmiAggregation: + _ = v.Value // Value is types.AmiAggregationResponse + + case *types.AggregationResponseMemberAwsEcrContainerAggregation: + _ = v.Value // Value is types.AwsEcrContainerAggregationResponse + + case *types.AggregationResponseMemberEc2InstanceAggregation: + _ = v.Value // Value is types.Ec2InstanceAggregationResponse + + case *types.AggregationResponseMemberFindingTypeAggregation: + _ = v.Value // Value is types.FindingTypeAggregationResponse + + case *types.AggregationResponseMemberImageLayerAggregation: + _ = v.Value // Value is types.ImageLayerAggregationResponse + + case *types.AggregationResponseMemberPackageAggregation: + _ = v.Value // Value is types.PackageAggregationResponse + + case *types.AggregationResponseMemberRepositoryAggregation: + _ = v.Value // Value is types.RepositoryAggregationResponse + + case *types.AggregationResponseMemberTitleAggregation: + _ = v.Value // Value is types.TitleAggregationResponse + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.AccountAggregationResponse +var _ *types.AmiAggregationResponse +var _ *types.PackageAggregationResponse +var _ *types.RepositoryAggregationResponse +var _ *types.ImageLayerAggregationResponse +var _ *types.TitleAggregationResponse +var _ *types.FindingTypeAggregationResponse +var _ *types.AwsEcrContainerAggregationResponse +var _ *types.Ec2InstanceAggregationResponse diff --git a/service/inspector2/validators.go b/service/inspector2/validators.go new file mode 100644 index 00000000000..f3cdc432d55 --- /dev/null +++ b/service/inspector2/validators.go @@ -0,0 +1,1509 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/inspector2/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpAssociateMember struct { +} + +func (*validateOpAssociateMember) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAssociateMember) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AssociateMemberInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAssociateMemberInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpBatchGetFreeTrialInfo struct { +} + +func (*validateOpBatchGetFreeTrialInfo) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchGetFreeTrialInfo) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchGetFreeTrialInfoInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchGetFreeTrialInfoInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCancelFindingsReport struct { +} + +func (*validateOpCancelFindingsReport) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCancelFindingsReport) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CancelFindingsReportInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCancelFindingsReportInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateFilter struct { +} + +func (*validateOpCreateFilter) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateFilter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateFilterInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateFilterInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateFindingsReport struct { +} + +func (*validateOpCreateFindingsReport) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateFindingsReport) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateFindingsReportInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateFindingsReportInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteFilter struct { +} + +func (*validateOpDeleteFilter) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteFilter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteFilterInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteFilterInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDisableDelegatedAdminAccount struct { +} + +func (*validateOpDisableDelegatedAdminAccount) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDisableDelegatedAdminAccount) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DisableDelegatedAdminAccountInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDisableDelegatedAdminAccountInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDisassociateMember struct { +} + +func (*validateOpDisassociateMember) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDisassociateMember) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DisassociateMemberInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDisassociateMemberInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpEnableDelegatedAdminAccount struct { +} + +func (*validateOpEnableDelegatedAdminAccount) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpEnableDelegatedAdminAccount) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*EnableDelegatedAdminAccountInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpEnableDelegatedAdminAccountInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpEnable struct { +} + +func (*validateOpEnable) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpEnable) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*EnableInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpEnableInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetMember struct { +} + +func (*validateOpGetMember) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetMember) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetMemberInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetMemberInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListCoverage struct { +} + +func (*validateOpListCoverage) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListCoverage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListCoverageInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListCoverageInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListCoverageStatistics struct { +} + +func (*validateOpListCoverageStatistics) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListCoverageStatistics) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListCoverageStatisticsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListCoverageStatisticsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListFindingAggregations struct { +} + +func (*validateOpListFindingAggregations) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListFindingAggregations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListFindingAggregationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListFindingAggregationsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListFindings struct { +} + +func (*validateOpListFindings) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListFindings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListFindingsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListFindingsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListTagsForResource struct { +} + +func (*validateOpListTagsForResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListTagsForResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListTagsForResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpTagResource struct { +} + +func (*validateOpTagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUntagResource struct { +} + +func (*validateOpUntagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UntagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUntagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateFilter struct { +} + +func (*validateOpUpdateFilter) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateFilter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateFilterInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateFilterInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateOrganizationConfiguration struct { +} + +func (*validateOpUpdateOrganizationConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateOrganizationConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateOrganizationConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateOrganizationConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpAssociateMemberValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssociateMember{}, middleware.After) +} + +func addOpBatchGetFreeTrialInfoValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchGetFreeTrialInfo{}, middleware.After) +} + +func addOpCancelFindingsReportValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCancelFindingsReport{}, middleware.After) +} + +func addOpCreateFilterValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateFilter{}, middleware.After) +} + +func addOpCreateFindingsReportValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateFindingsReport{}, middleware.After) +} + +func addOpDeleteFilterValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteFilter{}, middleware.After) +} + +func addOpDisableDelegatedAdminAccountValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDisableDelegatedAdminAccount{}, middleware.After) +} + +func addOpDisassociateMemberValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDisassociateMember{}, middleware.After) +} + +func addOpEnableDelegatedAdminAccountValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpEnableDelegatedAdminAccount{}, middleware.After) +} + +func addOpEnableValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpEnable{}, middleware.After) +} + +func addOpGetMemberValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetMember{}, middleware.After) +} + +func addOpListCoverageValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListCoverage{}, middleware.After) +} + +func addOpListCoverageStatisticsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListCoverageStatistics{}, middleware.After) +} + +func addOpListFindingAggregationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListFindingAggregations{}, middleware.After) +} + +func addOpListFindingsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListFindings{}, middleware.After) +} + +func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) +} + +func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) +} + +func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) +} + +func addOpUpdateFilterValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateFilter{}, middleware.After) +} + +func addOpUpdateOrganizationConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateOrganizationConfiguration{}, middleware.After) +} + +func validateAggregationRequest(v types.AggregationRequest) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AggregationRequest"} + switch uv := v.(type) { + case *types.AggregationRequestMemberAmiAggregation: + if err := validateAmiAggregation(&uv.Value); err != nil { + invalidParams.AddNested("[amiAggregation]", err.(smithy.InvalidParamsError)) + } + + case *types.AggregationRequestMemberAwsEcrContainerAggregation: + if err := validateAwsEcrContainerAggregation(&uv.Value); err != nil { + invalidParams.AddNested("[awsEcrContainerAggregation]", err.(smithy.InvalidParamsError)) + } + + case *types.AggregationRequestMemberEc2InstanceAggregation: + if err := validateEc2InstanceAggregation(&uv.Value); err != nil { + invalidParams.AddNested("[ec2InstanceAggregation]", err.(smithy.InvalidParamsError)) + } + + case *types.AggregationRequestMemberImageLayerAggregation: + if err := validateImageLayerAggregation(&uv.Value); err != nil { + invalidParams.AddNested("[imageLayerAggregation]", err.(smithy.InvalidParamsError)) + } + + case *types.AggregationRequestMemberPackageAggregation: + if err := validatePackageAggregation(&uv.Value); err != nil { + invalidParams.AddNested("[packageAggregation]", err.(smithy.InvalidParamsError)) + } + + case *types.AggregationRequestMemberRepositoryAggregation: + if err := validateRepositoryAggregation(&uv.Value); err != nil { + invalidParams.AddNested("[repositoryAggregation]", err.(smithy.InvalidParamsError)) + } + + case *types.AggregationRequestMemberTitleAggregation: + if err := validateTitleAggregation(&uv.Value); err != nil { + invalidParams.AddNested("[titleAggregation]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAmiAggregation(v *types.AmiAggregation) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AmiAggregation"} + if v.Amis != nil { + if err := validateStringFilterList(v.Amis); err != nil { + invalidParams.AddNested("Amis", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAutoEnable(v *types.AutoEnable) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AutoEnable"} + if v.Ec2 == nil { + invalidParams.Add(smithy.NewErrParamRequired("Ec2")) + } + if v.Ecr == nil { + invalidParams.Add(smithy.NewErrParamRequired("Ecr")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAwsEcrContainerAggregation(v *types.AwsEcrContainerAggregation) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AwsEcrContainerAggregation"} + if v.ResourceIds != nil { + if err := validateStringFilterList(v.ResourceIds); err != nil { + invalidParams.AddNested("ResourceIds", err.(smithy.InvalidParamsError)) + } + } + if v.ImageShas != nil { + if err := validateStringFilterList(v.ImageShas); err != nil { + invalidParams.AddNested("ImageShas", err.(smithy.InvalidParamsError)) + } + } + if v.Repositories != nil { + if err := validateStringFilterList(v.Repositories); err != nil { + invalidParams.AddNested("Repositories", err.(smithy.InvalidParamsError)) + } + } + if v.Architectures != nil { + if err := validateStringFilterList(v.Architectures); err != nil { + invalidParams.AddNested("Architectures", err.(smithy.InvalidParamsError)) + } + } + if v.ImageTags != nil { + if err := validateStringFilterList(v.ImageTags); err != nil { + invalidParams.AddNested("ImageTags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCoverageFilterCriteria(v *types.CoverageFilterCriteria) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CoverageFilterCriteria"} + if v.ScanStatusCode != nil { + if err := validateCoverageStringFilterList(v.ScanStatusCode); err != nil { + invalidParams.AddNested("ScanStatusCode", err.(smithy.InvalidParamsError)) + } + } + if v.ScanStatusReason != nil { + if err := validateCoverageStringFilterList(v.ScanStatusReason); err != nil { + invalidParams.AddNested("ScanStatusReason", err.(smithy.InvalidParamsError)) + } + } + if v.AccountId != nil { + if err := validateCoverageStringFilterList(v.AccountId); err != nil { + invalidParams.AddNested("AccountId", err.(smithy.InvalidParamsError)) + } + } + if v.ResourceId != nil { + if err := validateCoverageStringFilterList(v.ResourceId); err != nil { + invalidParams.AddNested("ResourceId", err.(smithy.InvalidParamsError)) + } + } + if v.ResourceType != nil { + if err := validateCoverageStringFilterList(v.ResourceType); err != nil { + invalidParams.AddNested("ResourceType", err.(smithy.InvalidParamsError)) + } + } + if v.ScanType != nil { + if err := validateCoverageStringFilterList(v.ScanType); err != nil { + invalidParams.AddNested("ScanType", err.(smithy.InvalidParamsError)) + } + } + if v.EcrRepositoryName != nil { + if err := validateCoverageStringFilterList(v.EcrRepositoryName); err != nil { + invalidParams.AddNested("EcrRepositoryName", err.(smithy.InvalidParamsError)) + } + } + if v.EcrImageTags != nil { + if err := validateCoverageStringFilterList(v.EcrImageTags); err != nil { + invalidParams.AddNested("EcrImageTags", err.(smithy.InvalidParamsError)) + } + } + if v.Ec2InstanceTags != nil { + if err := validateCoverageMapFilterList(v.Ec2InstanceTags); err != nil { + invalidParams.AddNested("Ec2InstanceTags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCoverageMapFilter(v *types.CoverageMapFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CoverageMapFilter"} + if len(v.Comparison) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Comparison")) + } + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCoverageMapFilterList(v []types.CoverageMapFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CoverageMapFilterList"} + for i := range v { + if err := validateCoverageMapFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCoverageStringFilter(v *types.CoverageStringFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CoverageStringFilter"} + if len(v.Comparison) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Comparison")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCoverageStringFilterList(v []types.CoverageStringFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CoverageStringFilterList"} + for i := range v { + if err := validateCoverageStringFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDestination(v *types.Destination) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Destination"} + if v.BucketName == nil { + invalidParams.Add(smithy.NewErrParamRequired("BucketName")) + } + if v.KmsKeyArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("KmsKeyArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateEc2InstanceAggregation(v *types.Ec2InstanceAggregation) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Ec2InstanceAggregation"} + if v.Amis != nil { + if err := validateStringFilterList(v.Amis); err != nil { + invalidParams.AddNested("Amis", err.(smithy.InvalidParamsError)) + } + } + if v.OperatingSystems != nil { + if err := validateStringFilterList(v.OperatingSystems); err != nil { + invalidParams.AddNested("OperatingSystems", err.(smithy.InvalidParamsError)) + } + } + if v.InstanceIds != nil { + if err := validateStringFilterList(v.InstanceIds); err != nil { + invalidParams.AddNested("InstanceIds", err.(smithy.InvalidParamsError)) + } + } + if v.InstanceTags != nil { + if err := validateMapFilterList(v.InstanceTags); err != nil { + invalidParams.AddNested("InstanceTags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateFilterCriteria(v *types.FilterCriteria) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FilterCriteria"} + if v.FindingArn != nil { + if err := validateStringFilterList(v.FindingArn); err != nil { + invalidParams.AddNested("FindingArn", err.(smithy.InvalidParamsError)) + } + } + if v.AwsAccountId != nil { + if err := validateStringFilterList(v.AwsAccountId); err != nil { + invalidParams.AddNested("AwsAccountId", err.(smithy.InvalidParamsError)) + } + } + if v.FindingType != nil { + if err := validateStringFilterList(v.FindingType); err != nil { + invalidParams.AddNested("FindingType", err.(smithy.InvalidParamsError)) + } + } + if v.Severity != nil { + if err := validateStringFilterList(v.Severity); err != nil { + invalidParams.AddNested("Severity", err.(smithy.InvalidParamsError)) + } + } + if v.FindingStatus != nil { + if err := validateStringFilterList(v.FindingStatus); err != nil { + invalidParams.AddNested("FindingStatus", err.(smithy.InvalidParamsError)) + } + } + if v.Title != nil { + if err := validateStringFilterList(v.Title); err != nil { + invalidParams.AddNested("Title", err.(smithy.InvalidParamsError)) + } + } + if v.ResourceType != nil { + if err := validateStringFilterList(v.ResourceType); err != nil { + invalidParams.AddNested("ResourceType", err.(smithy.InvalidParamsError)) + } + } + if v.ResourceId != nil { + if err := validateStringFilterList(v.ResourceId); err != nil { + invalidParams.AddNested("ResourceId", err.(smithy.InvalidParamsError)) + } + } + if v.ResourceTags != nil { + if err := validateMapFilterList(v.ResourceTags); err != nil { + invalidParams.AddNested("ResourceTags", err.(smithy.InvalidParamsError)) + } + } + if v.Ec2InstanceImageId != nil { + if err := validateStringFilterList(v.Ec2InstanceImageId); err != nil { + invalidParams.AddNested("Ec2InstanceImageId", err.(smithy.InvalidParamsError)) + } + } + if v.Ec2InstanceVpcId != nil { + if err := validateStringFilterList(v.Ec2InstanceVpcId); err != nil { + invalidParams.AddNested("Ec2InstanceVpcId", err.(smithy.InvalidParamsError)) + } + } + if v.Ec2InstanceSubnetId != nil { + if err := validateStringFilterList(v.Ec2InstanceSubnetId); err != nil { + invalidParams.AddNested("Ec2InstanceSubnetId", err.(smithy.InvalidParamsError)) + } + } + if v.EcrImageArchitecture != nil { + if err := validateStringFilterList(v.EcrImageArchitecture); err != nil { + invalidParams.AddNested("EcrImageArchitecture", err.(smithy.InvalidParamsError)) + } + } + if v.EcrImageRegistry != nil { + if err := validateStringFilterList(v.EcrImageRegistry); err != nil { + invalidParams.AddNested("EcrImageRegistry", err.(smithy.InvalidParamsError)) + } + } + if v.EcrImageRepositoryName != nil { + if err := validateStringFilterList(v.EcrImageRepositoryName); err != nil { + invalidParams.AddNested("EcrImageRepositoryName", err.(smithy.InvalidParamsError)) + } + } + if v.EcrImageTags != nil { + if err := validateStringFilterList(v.EcrImageTags); err != nil { + invalidParams.AddNested("EcrImageTags", err.(smithy.InvalidParamsError)) + } + } + if v.EcrImageHash != nil { + if err := validateStringFilterList(v.EcrImageHash); err != nil { + invalidParams.AddNested("EcrImageHash", err.(smithy.InvalidParamsError)) + } + } + if v.NetworkProtocol != nil { + if err := validateStringFilterList(v.NetworkProtocol); err != nil { + invalidParams.AddNested("NetworkProtocol", err.(smithy.InvalidParamsError)) + } + } + if v.ComponentId != nil { + if err := validateStringFilterList(v.ComponentId); err != nil { + invalidParams.AddNested("ComponentId", err.(smithy.InvalidParamsError)) + } + } + if v.ComponentType != nil { + if err := validateStringFilterList(v.ComponentType); err != nil { + invalidParams.AddNested("ComponentType", err.(smithy.InvalidParamsError)) + } + } + if v.VulnerabilityId != nil { + if err := validateStringFilterList(v.VulnerabilityId); err != nil { + invalidParams.AddNested("VulnerabilityId", err.(smithy.InvalidParamsError)) + } + } + if v.VulnerabilitySource != nil { + if err := validateStringFilterList(v.VulnerabilitySource); err != nil { + invalidParams.AddNested("VulnerabilitySource", err.(smithy.InvalidParamsError)) + } + } + if v.VendorSeverity != nil { + if err := validateStringFilterList(v.VendorSeverity); err != nil { + invalidParams.AddNested("VendorSeverity", err.(smithy.InvalidParamsError)) + } + } + if v.VulnerablePackages != nil { + if err := validatePackageFilterList(v.VulnerablePackages); err != nil { + invalidParams.AddNested("VulnerablePackages", err.(smithy.InvalidParamsError)) + } + } + if v.RelatedVulnerabilities != nil { + if err := validateStringFilterList(v.RelatedVulnerabilities); err != nil { + invalidParams.AddNested("RelatedVulnerabilities", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateImageLayerAggregation(v *types.ImageLayerAggregation) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ImageLayerAggregation"} + if v.Repositories != nil { + if err := validateStringFilterList(v.Repositories); err != nil { + invalidParams.AddNested("Repositories", err.(smithy.InvalidParamsError)) + } + } + if v.ResourceIds != nil { + if err := validateStringFilterList(v.ResourceIds); err != nil { + invalidParams.AddNested("ResourceIds", err.(smithy.InvalidParamsError)) + } + } + if v.LayerHashes != nil { + if err := validateStringFilterList(v.LayerHashes); err != nil { + invalidParams.AddNested("LayerHashes", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMapFilter(v *types.MapFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MapFilter"} + if len(v.Comparison) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Comparison")) + } + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMapFilterList(v []types.MapFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MapFilterList"} + for i := range v { + if err := validateMapFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePackageAggregation(v *types.PackageAggregation) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PackageAggregation"} + if v.PackageNames != nil { + if err := validateStringFilterList(v.PackageNames); err != nil { + invalidParams.AddNested("PackageNames", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePackageFilter(v *types.PackageFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PackageFilter"} + if v.Name != nil { + if err := validateStringFilter(v.Name); err != nil { + invalidParams.AddNested("Name", err.(smithy.InvalidParamsError)) + } + } + if v.Version != nil { + if err := validateStringFilter(v.Version); err != nil { + invalidParams.AddNested("Version", err.(smithy.InvalidParamsError)) + } + } + if v.Release != nil { + if err := validateStringFilter(v.Release); err != nil { + invalidParams.AddNested("Release", err.(smithy.InvalidParamsError)) + } + } + if v.Architecture != nil { + if err := validateStringFilter(v.Architecture); err != nil { + invalidParams.AddNested("Architecture", err.(smithy.InvalidParamsError)) + } + } + if v.SourceLayerHash != nil { + if err := validateStringFilter(v.SourceLayerHash); err != nil { + invalidParams.AddNested("SourceLayerHash", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePackageFilterList(v []types.PackageFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PackageFilterList"} + for i := range v { + if err := validatePackageFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRepositoryAggregation(v *types.RepositoryAggregation) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RepositoryAggregation"} + if v.Repositories != nil { + if err := validateStringFilterList(v.Repositories); err != nil { + invalidParams.AddNested("Repositories", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSortCriteria(v *types.SortCriteria) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SortCriteria"} + if len(v.Field) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Field")) + } + if len(v.SortOrder) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SortOrder")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateStringFilter(v *types.StringFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StringFilter"} + if len(v.Comparison) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Comparison")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateStringFilterList(v []types.StringFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StringFilterList"} + for i := range v { + if err := validateStringFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTitleAggregation(v *types.TitleAggregation) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TitleAggregation"} + if v.Titles != nil { + if err := validateStringFilterList(v.Titles); err != nil { + invalidParams.AddNested("Titles", err.(smithy.InvalidParamsError)) + } + } + if v.VulnerabilityIds != nil { + if err := validateStringFilterList(v.VulnerabilityIds); err != nil { + invalidParams.AddNested("VulnerabilityIds", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpAssociateMemberInput(v *AssociateMemberInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociateMemberInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpBatchGetFreeTrialInfoInput(v *BatchGetFreeTrialInfoInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchGetFreeTrialInfoInput"} + if v.AccountIds == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountIds")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCancelFindingsReportInput(v *CancelFindingsReportInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CancelFindingsReportInput"} + if v.ReportId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ReportId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateFilterInput(v *CreateFilterInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateFilterInput"} + if len(v.Action) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Action")) + } + if v.FilterCriteria == nil { + invalidParams.Add(smithy.NewErrParamRequired("FilterCriteria")) + } else if v.FilterCriteria != nil { + if err := validateFilterCriteria(v.FilterCriteria); err != nil { + invalidParams.AddNested("FilterCriteria", err.(smithy.InvalidParamsError)) + } + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateFindingsReportInput(v *CreateFindingsReportInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateFindingsReportInput"} + if v.FilterCriteria != nil { + if err := validateFilterCriteria(v.FilterCriteria); err != nil { + invalidParams.AddNested("FilterCriteria", err.(smithy.InvalidParamsError)) + } + } + if len(v.ReportFormat) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ReportFormat")) + } + if v.S3Destination == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3Destination")) + } else if v.S3Destination != nil { + if err := validateDestination(v.S3Destination); err != nil { + invalidParams.AddNested("S3Destination", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteFilterInput(v *DeleteFilterInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteFilterInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDisableDelegatedAdminAccountInput(v *DisableDelegatedAdminAccountInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DisableDelegatedAdminAccountInput"} + if v.DelegatedAdminAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DelegatedAdminAccountId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDisassociateMemberInput(v *DisassociateMemberInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DisassociateMemberInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpEnableDelegatedAdminAccountInput(v *EnableDelegatedAdminAccountInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EnableDelegatedAdminAccountInput"} + if v.DelegatedAdminAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DelegatedAdminAccountId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpEnableInput(v *EnableInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EnableInput"} + if v.ResourceTypes == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceTypes")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetMemberInput(v *GetMemberInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetMemberInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListCoverageInput(v *ListCoverageInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListCoverageInput"} + if v.FilterCriteria != nil { + if err := validateCoverageFilterCriteria(v.FilterCriteria); err != nil { + invalidParams.AddNested("FilterCriteria", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListCoverageStatisticsInput(v *ListCoverageStatisticsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListCoverageStatisticsInput"} + if v.FilterCriteria != nil { + if err := validateCoverageFilterCriteria(v.FilterCriteria); err != nil { + invalidParams.AddNested("FilterCriteria", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListFindingAggregationsInput(v *ListFindingAggregationsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListFindingAggregationsInput"} + if len(v.AggregationType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("AggregationType")) + } + if v.AccountIds != nil { + if err := validateStringFilterList(v.AccountIds); err != nil { + invalidParams.AddNested("AccountIds", err.(smithy.InvalidParamsError)) + } + } + if v.AggregationRequest != nil { + if err := validateAggregationRequest(v.AggregationRequest); err != nil { + invalidParams.AddNested("AggregationRequest", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListFindingsInput(v *ListFindingsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListFindingsInput"} + if v.FilterCriteria != nil { + if err := validateFilterCriteria(v.FilterCriteria); err != nil { + invalidParams.AddNested("FilterCriteria", err.(smithy.InvalidParamsError)) + } + } + if v.SortCriteria != nil { + if err := validateSortCriteria(v.SortCriteria); err != nil { + invalidParams.AddNested("SortCriteria", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpTagResourceInput(v *TagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.Tags == nil { + invalidParams.Add(smithy.NewErrParamRequired("Tags")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUntagResourceInput(v *UntagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.TagKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateFilterInput(v *UpdateFilterInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateFilterInput"} + if v.FilterCriteria != nil { + if err := validateFilterCriteria(v.FilterCriteria); err != nil { + invalidParams.AddNested("FilterCriteria", err.(smithy.InvalidParamsError)) + } + } + if v.FilterArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("FilterArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateOrganizationConfigurationInput(v *UpdateOrganizationConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateOrganizationConfigurationInput"} + if v.AutoEnable == nil { + invalidParams.Add(smithy.NewErrParamRequired("AutoEnable")) + } else if v.AutoEnable != nil { + if err := validateAutoEnable(v.AutoEnable); err != nil { + invalidParams.AddNested("AutoEnable", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/iot/api_op_AddThingToBillingGroup.go b/service/iot/api_op_AddThingToBillingGroup.go index 67bc03a04e6..3ebd45b26d5 100644 --- a/service/iot/api_op_AddThingToBillingGroup.go +++ b/service/iot/api_op_AddThingToBillingGroup.go @@ -34,7 +34,8 @@ type AddThingToBillingGroupInput struct { // The ARN of the billing group. BillingGroupArn *string - // The name of the billing group. + // The name of the billing group. This call is asynchronous. It might take several + // seconds for the detachment to propagate. BillingGroupName *string // The ARN of the thing to be added to the billing group. diff --git a/service/iot/api_op_CreateCertificateFromCsr.go b/service/iot/api_op_CreateCertificateFromCsr.go index e276329c2f1..e221bf2f42d 100644 --- a/service/iot/api_op_CreateCertificateFromCsr.go +++ b/service/iot/api_op_CreateCertificateFromCsr.go @@ -12,8 +12,11 @@ import ( // Creates an X.509 certificate using the specified certificate signing request. // Note: The CSR must include a public key that is either an RSA key with a length -// of at least 2048 bits or an ECC key from NIST P-256 or NIST P-384 curves. Note: -// Reusing the same certificate signing request (CSR) results in a distinct +// of at least 2048 bits or an ECC key from NIST P-256, NIST P-384, or NIST P-512 +// curves. For supported certificates, consult Certificate signing algorithms +// supported by IoT +// (https://docs.aws.amazon.com/iot/latest/developerguide/x509-client-certs.html#x509-cert-algorithms). +// Note: Reusing the same certificate signing request (CSR) results in a distinct // certificate. Requires permission to access the CreateCertificateFromCsr // (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) // action. You can create multiple certificates in a batch by creating a directory, diff --git a/service/iot/api_op_CreateJob.go b/service/iot/api_op_CreateJob.go index 136e7e532b8..0a237d6f34d 100644 --- a/service/iot/api_op_CreateJob.go +++ b/service/iot/api_op_CreateJob.go @@ -52,6 +52,10 @@ type CreateJobInput struct { // The job document. Required if you don't specify a value for documentSource. Document *string + // Parameters of a managed template that you can specify to create the job + // document. + DocumentParameters map[string]string + // An S3 link to the job document. Required if you don't specify a value for // document. If the job document resides in an S3 bucket, you must use a // placeholder link when specifying the document. The placeholder link is of the diff --git a/service/iot/api_op_CreateStream.go b/service/iot/api_op_CreateStream.go index 5fd46cc39c4..59f871898fe 100644 --- a/service/iot/api_op_CreateStream.go +++ b/service/iot/api_op_CreateStream.go @@ -39,8 +39,7 @@ type CreateStreamInput struct { // This member is required. Files []types.StreamFile - // An IAM role that allows the IoT service principal assumes to access your S3 - // files. + // An IAM role that allows the IoT service principal to access your S3 files. // // This member is required. RoleArn *string diff --git a/service/iot/api_op_DescribeManagedJobTemplate.go b/service/iot/api_op_DescribeManagedJobTemplate.go new file mode 100644 index 00000000000..9557d11f8ef --- /dev/null +++ b/service/iot/api_op_DescribeManagedJobTemplate.go @@ -0,0 +1,144 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iot + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/iot/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// View details of a managed job template. +func (c *Client) DescribeManagedJobTemplate(ctx context.Context, params *DescribeManagedJobTemplateInput, optFns ...func(*Options)) (*DescribeManagedJobTemplateOutput, error) { + if params == nil { + params = &DescribeManagedJobTemplateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeManagedJobTemplate", params, optFns, c.addOperationDescribeManagedJobTemplateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeManagedJobTemplateOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeManagedJobTemplateInput struct { + + // The unique name of a managed job template, which is required. + // + // This member is required. + TemplateName *string + + // An optional parameter to specify version of a managed template. If not + // specified, the pre-defined default version is returned. + TemplateVersion *string + + noSmithyDocumentSerde +} + +type DescribeManagedJobTemplateOutput struct { + + // The unique description of a managed template. + Description *string + + // The document schema for a managed job template. + Document *string + + // A map of key-value pairs that you can use as guidance to specify the inputs for + // creating a job from a managed template. + DocumentParameters []types.DocumentParameter + + // A list of environments that are supported with the managed job template. + Environments []string + + // The unique Amazon Resource Name (ARN) of the managed template. + TemplateArn *string + + // The unique name of a managed template, such as AWS-Reboot. + TemplateName *string + + // The version for a managed template. + TemplateVersion *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeManagedJobTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeManagedJobTemplate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeManagedJobTemplate{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDescribeManagedJobTemplateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeManagedJobTemplate(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeManagedJobTemplate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "execute-api", + OperationName: "DescribeManagedJobTemplate", + } +} diff --git a/service/iot/api_op_GetBucketsAggregation.go b/service/iot/api_op_GetBucketsAggregation.go index 9b6d2e88647..8869b6dc228 100644 --- a/service/iot/api_op_GetBucketsAggregation.go +++ b/service/iot/api_op_GetBucketsAggregation.go @@ -64,8 +64,7 @@ type GetBucketsAggregationOutput struct { // particular bucket. count: The number of documents that have that value. Buckets []types.Bucket - // The total number of documents that fit the query string criteria and contain a - // value for the Aggregation field targeted in the request. + // The total number of things that fit the query string criteria. TotalCount int32 // Metadata pertaining to the operation's result. diff --git a/service/iot/api_op_ListManagedJobTemplates.go b/service/iot/api_op_ListManagedJobTemplates.go new file mode 100644 index 00000000000..edf580449c3 --- /dev/null +++ b/service/iot/api_op_ListManagedJobTemplates.go @@ -0,0 +1,126 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iot + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/iot/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of managed job templates. +func (c *Client) ListManagedJobTemplates(ctx context.Context, params *ListManagedJobTemplatesInput, optFns ...func(*Options)) (*ListManagedJobTemplatesOutput, error) { + if params == nil { + params = &ListManagedJobTemplatesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListManagedJobTemplates", params, optFns, c.addOperationListManagedJobTemplatesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListManagedJobTemplatesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListManagedJobTemplatesInput struct { + + // Maximum number of entries that can be returned. + MaxResults *int32 + + // The token to retrieve the next set of results. + NextToken *string + + // An optional parameter for template name. If specified, only the versions of the + // managed job templates that have the specified template name will be returned. + TemplateName *string + + noSmithyDocumentSerde +} + +type ListManagedJobTemplatesOutput struct { + + // A list of managed job templates that are returned. + ManagedJobTemplates []types.ManagedJobTemplateSummary + + // The token to retrieve the next set of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListManagedJobTemplatesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListManagedJobTemplates{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListManagedJobTemplates{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListManagedJobTemplates(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListManagedJobTemplates(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "execute-api", + OperationName: "ListManagedJobTemplates", + } +} diff --git a/service/iot/api_op_RegisterCertificateWithoutCA.go b/service/iot/api_op_RegisterCertificateWithoutCA.go index 72efae6baa3..f388a585019 100644 --- a/service/iot/api_op_RegisterCertificateWithoutCA.go +++ b/service/iot/api_op_RegisterCertificateWithoutCA.go @@ -11,7 +11,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Register a certificate that does not have a certificate authority (CA). +// Register a certificate that does not have a certificate authority (CA). For +// supported certificates, consult Certificate signing algorithms supported by IoT +// (https://docs.aws.amazon.com/iot/latest/developerguide/x509-client-certs.html#x509-cert-algorithms). func (c *Client) RegisterCertificateWithoutCA(ctx context.Context, params *RegisterCertificateWithoutCAInput, optFns ...func(*Options)) (*RegisterCertificateWithoutCAOutput, error) { if params == nil { params = &RegisterCertificateWithoutCAInput{} diff --git a/service/iot/api_op_RemoveThingFromBillingGroup.go b/service/iot/api_op_RemoveThingFromBillingGroup.go index ff93d019c4f..fb998f587d0 100644 --- a/service/iot/api_op_RemoveThingFromBillingGroup.go +++ b/service/iot/api_op_RemoveThingFromBillingGroup.go @@ -13,7 +13,8 @@ import ( // Removes the given thing from the billing group. Requires permission to access // the RemoveThingFromBillingGroup // (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) -// action. +// action. This call is asynchronous. It might take several seconds for the +// detachment to propagate. func (c *Client) RemoveThingFromBillingGroup(ctx context.Context, params *RemoveThingFromBillingGroupInput, optFns ...func(*Options)) (*RemoveThingFromBillingGroupOutput, error) { if params == nil { params = &RemoveThingFromBillingGroupInput{} diff --git a/service/iot/deserializers.go b/service/iot/deserializers.go index ce302dae6d8..c705f0e84dc 100644 --- a/service/iot/deserializers.go +++ b/service/iot/deserializers.go @@ -13866,6 +13866,212 @@ func awsRestjson1_deserializeOpDocumentDescribeJobTemplateOutput(v **DescribeJob return nil } +type awsRestjson1_deserializeOpDescribeManagedJobTemplate struct { +} + +func (*awsRestjson1_deserializeOpDescribeManagedJobTemplate) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeManagedJobTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDescribeManagedJobTemplate(response, &metadata) + } + output := &DescribeManagedJobTemplateOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDescribeManagedJobTemplateOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeManagedJobTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeManagedJobTemplateOutput(v **DescribeManagedJobTemplateOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeManagedJobTemplateOutput + if *v == nil { + sv = &DescribeManagedJobTemplateOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "document": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobDocument to be of type string, got %T instead", value) + } + sv.Document = ptr.String(jtv) + } + + case "documentParameters": + if err := awsRestjson1_deserializeDocumentDocumentParameters(&sv.DocumentParameters, value); err != nil { + return err + } + + case "environments": + if err := awsRestjson1_deserializeDocumentEnvironments(&sv.Environments, value); err != nil { + return err + } + + case "templateArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobTemplateArn to be of type string, got %T instead", value) + } + sv.TemplateArn = ptr.String(jtv) + } + + case "templateName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ManagedJobTemplateName to be of type string, got %T instead", value) + } + sv.TemplateName = ptr.String(jtv) + } + + case "templateVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ManagedTemplateVersion to be of type string, got %T instead", value) + } + sv.TemplateVersion = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpDescribeMitigationAction struct { } @@ -23492,6 +23698,171 @@ func awsRestjson1_deserializeOpDocumentListJobTemplatesOutput(v **ListJobTemplat return nil } +type awsRestjson1_deserializeOpListManagedJobTemplates struct { +} + +func (*awsRestjson1_deserializeOpListManagedJobTemplates) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListManagedJobTemplates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListManagedJobTemplates(response, &metadata) + } + output := &ListManagedJobTemplatesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListManagedJobTemplatesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListManagedJobTemplates(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListManagedJobTemplatesOutput(v **ListManagedJobTemplatesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListManagedJobTemplatesOutput + if *v == nil { + sv = &ListManagedJobTemplatesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "managedJobTemplates": + if err := awsRestjson1_deserializeDocumentManagedJobTemplatesSummaryList(&sv.ManagedJobTemplates, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpListMitigationActions struct { } @@ -35994,6 +36365,42 @@ func awsRestjson1_deserializeErrorInternalFailureException(response *smithyhttp. return output } +func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalServerException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + func awsRestjson1_deserializeErrorInvalidAggregationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.InvalidAggregationException{} var buff [1024]byte @@ -42141,7 +42548,43 @@ func awsRestjson1_deserializeDocumentDimensionNames(v *[]string, value interface if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DimensionName to be of type string, got %T instead", value) + return fmt.Errorf("expected DimensionName to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentDimensionStringValues(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DimensionStringValue to be of type string, got %T instead", value) } col = jtv } @@ -42152,7 +42595,83 @@ func awsRestjson1_deserializeDocumentDimensionNames(v *[]string, value interface return nil } -func awsRestjson1_deserializeDocumentDimensionStringValues(v *[]string, value interface{}) error { +func awsRestjson1_deserializeDocumentDocumentParameter(v **types.DocumentParameter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DocumentParameter + if *v == nil { + sv = &types.DocumentParameter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "example": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Example to be of type string, got %T instead", value) + } + sv.Example = ptr.String(jtv) + } + + case "key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParameterKey to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + case "optional": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Optional to be of type *bool, got %T instead", value) + } + sv.Optional = jtv + } + + case "regex": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Regex to be of type string, got %T instead", value) + } + sv.Regex = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDocumentParameters(v *[]types.DocumentParameter, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -42165,22 +42684,20 @@ func awsRestjson1_deserializeDocumentDimensionStringValues(v *[]string, value in return fmt.Errorf("unexpected JSON type %v", value) } - var cv []string + var cv []types.DocumentParameter if *v == nil { - cv = []string{} + cv = []types.DocumentParameter{} } else { cv = *v } for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DimensionStringValue to be of type string, got %T instead", value) - } - col = jtv + var col types.DocumentParameter + destAddr := &col + if err := awsRestjson1_deserializeDocumentDocumentParameter(&destAddr, value); err != nil { + return err } + col = *destAddr cv = append(cv, col) } @@ -42663,6 +43180,42 @@ func awsRestjson1_deserializeDocumentEnableIoTLoggingParams(v **types.EnableIoTL return nil } +func awsRestjson1_deserializeDocumentEnvironments(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Environment to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentErrorInfo(v **types.ErrorInfo, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -43675,6 +44228,46 @@ func awsRestjson1_deserializeDocumentInternalFailureException(v **types.Internal return nil } +func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InternalServerException + if *v == nil { + sv = &types.InternalServerException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage2 to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentInvalidAggregationException(v **types.InvalidAggregationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -44131,6 +44724,11 @@ func awsRestjson1_deserializeDocumentJob(v **types.Job, value interface{}) error sv.Description = ptr.String(jtv) } + case "documentParameters": + if err := awsRestjson1_deserializeDocumentParameterMap(&sv.DocumentParameters, value); err != nil { + return err + } + case "forceCanceled": if value != nil { jtv, ok := value.(bool) @@ -45665,6 +46263,112 @@ func awsRestjson1_deserializeDocumentMalformedPolicyException(v **types.Malforme return nil } +func awsRestjson1_deserializeDocumentManagedJobTemplatesSummaryList(v *[]types.ManagedJobTemplateSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ManagedJobTemplateSummary + if *v == nil { + cv = []types.ManagedJobTemplateSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ManagedJobTemplateSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentManagedJobTemplateSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentManagedJobTemplateSummary(v **types.ManagedJobTemplateSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ManagedJobTemplateSummary + if *v == nil { + sv = &types.ManagedJobTemplateSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "environments": + if err := awsRestjson1_deserializeDocumentEnvironments(&sv.Environments, value); err != nil { + return err + } + + case "templateArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobTemplateArn to be of type string, got %T instead", value) + } + sv.TemplateArn = ptr.String(jtv) + } + + case "templateName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ManagedJobTemplateName to be of type string, got %T instead", value) + } + sv.TemplateName = ptr.String(jtv) + } + + case "templateVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ManagedTemplateVersion to be of type string, got %T instead", value) + } + sv.TemplateVersion = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentMetricDimension(v **types.MetricDimension, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -46953,6 +47657,42 @@ func awsRestjson1_deserializeDocumentOutgoingCertificates(v *[]types.OutgoingCer return nil } +func awsRestjson1_deserializeDocumentParameterMap(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParameterValue to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + func awsRestjson1_deserializeDocumentPercentiles(v *[]types.PercentPair, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/iot/generated.json b/service/iot/generated.json index 47c9e817ba0..15087a2fbe1 100644 --- a/service/iot/generated.json +++ b/service/iot/generated.json @@ -104,6 +104,7 @@ "api_op_DescribeJob.go", "api_op_DescribeJobExecution.go", "api_op_DescribeJobTemplate.go", + "api_op_DescribeManagedJobTemplate.go", "api_op_DescribeMitigationAction.go", "api_op_DescribeProvisioningTemplate.go", "api_op_DescribeProvisioningTemplateVersion.go", @@ -160,6 +161,7 @@ "api_op_ListJobExecutionsForThing.go", "api_op_ListJobTemplates.go", "api_op_ListJobs.go", + "api_op_ListManagedJobTemplates.go", "api_op_ListMitigationActions.go", "api_op_ListOTAUpdates.go", "api_op_ListOutgoingCertificates.go", diff --git a/service/iot/serializers.go b/service/iot/serializers.go index 997deb8ee55..83f11bf4ce0 100644 --- a/service/iot/serializers.go +++ b/service/iot/serializers.go @@ -2137,6 +2137,13 @@ func awsRestjson1_serializeOpDocumentCreateJobInput(v *CreateJobInput, value smi ok.String(*v.Document) } + if v.DocumentParameters != nil { + ok := object.Key("documentParameters") + if err := awsRestjson1_serializeDocumentParameterMap(v.DocumentParameters, ok); err != nil { + return err + } + } + if v.DocumentSource != nil { ok := object.Key("documentSource") ok.String(*v.DocumentSource) @@ -7063,6 +7070,68 @@ func awsRestjson1_serializeOpHttpBindingsDescribeJobTemplateInput(v *DescribeJob return nil } +type awsRestjson1_serializeOpDescribeManagedJobTemplate struct { +} + +func (*awsRestjson1_serializeOpDescribeManagedJobTemplate) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeManagedJobTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeManagedJobTemplateInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/managed-job-templates/{templateName}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeManagedJobTemplateInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeManagedJobTemplateInput(v *DescribeManagedJobTemplateInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.TemplateName == nil || len(*v.TemplateName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member templateName must not be empty")} + } + if v.TemplateName != nil { + if err := encoder.SetURI("templateName").String(*v.TemplateName); err != nil { + return err + } + } + + if v.TemplateVersion != nil { + encoder.SetQuery("templateVersion").String(*v.TemplateVersion) + } + + return nil +} + type awsRestjson1_serializeOpDescribeMitigationAction struct { } @@ -10708,6 +10777,67 @@ func awsRestjson1_serializeOpHttpBindingsListJobTemplatesInput(v *ListJobTemplat return nil } +type awsRestjson1_serializeOpListManagedJobTemplates struct { +} + +func (*awsRestjson1_serializeOpListManagedJobTemplates) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListManagedJobTemplates) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListManagedJobTemplatesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/managed-job-templates") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListManagedJobTemplatesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListManagedJobTemplatesInput(v *ListManagedJobTemplatesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if v.TemplateName != nil { + encoder.SetQuery("templateName").String(*v.TemplateName) + } + + return nil +} + type awsRestjson1_serializeOpListMitigationActions struct { } @@ -19120,6 +19250,17 @@ func awsRestjson1_serializeDocumentOTAUpdateFiles(v []types.OTAUpdateFile, value return nil } +func awsRestjson1_serializeDocumentParameterMap(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + func awsRestjson1_serializeDocumentParameters(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/iot/types/errors.go b/service/iot/types/errors.go index 29ba6543ccd..fe6cdc3f95e 100644 --- a/service/iot/types/errors.go +++ b/service/iot/types/errors.go @@ -185,6 +185,26 @@ func (e *InternalFailureException) ErrorMessage() string { func (e *InternalFailureException) ErrorCode() string { return "InternalFailureException" } func (e *InternalFailureException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } +// Internal error from the service that indicates an unexpected error or that the +// service is unavailable. +type InternalServerException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *InternalServerException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InternalServerException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InternalServerException) ErrorCode() string { return "InternalServerException" } +func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + // The aggregation is invalid. type InvalidAggregationException struct { Message *string diff --git a/service/iot/types/types.go b/service/iot/types/types.go index da71967658d..1a4aed2b615 100644 --- a/service/iot/types/types.go +++ b/service/iot/types/types.go @@ -1307,6 +1307,34 @@ type DetectMitigationActionsTaskTarget struct { noSmithyDocumentSerde } +// A map of key-value pairs containing the patterns that need to be replaced in a +// managed template job document schema. You can use the description of each key as +// a guidance to specify the inputs during runtime when creating a job. +type DocumentParameter struct { + + // Description of the map field containing the patterns that need to be replaced in + // a managed template job document schema. + Description *string + + // An example illustrating a pattern that need to be replaced in a managed template + // job document schema. + Example *string + + // Key of the map field containing the patterns that need to be replaced in a + // managed template job document schema. + Key *string + + // Specifies whether a pattern that needs to be replaced in a managed template job + // document schema is optional or required. + Optional bool + + // A regular expression of the patterns that need to be replaced in a managed + // template job document schema. + Regex *string + + noSmithyDocumentSerde +} + // The summary of a domain configuration. A domain configuration specifies custom // IoT-specific information about a domain. A domain configuration can be // associated with an Amazon Web Services-managed domain (for example, @@ -1799,6 +1827,11 @@ type Job struct { // A short text description of the job. Description *string + // A key-value map that pairs the patterns that need to be replaced in a managed + // template job document schema. You can use the description of each key as a + // guidance to specify the inputs during runtime when creating a job. + DocumentParameters map[string]string + // Will be true if the job was canceled with the optional force parameter set to // true. ForceCanceled *bool @@ -2188,6 +2221,27 @@ type MachineLearningDetectionConfig struct { noSmithyDocumentSerde } +// An object that contains information about the managed template. +type ManagedJobTemplateSummary struct { + + // The description for a managed template. + Description *string + + // A list of environments that are supported with the managed job template. + Environments []string + + // The Amazon Resource Name (ARN) for a managed template. + TemplateArn *string + + // The unique Name for a managed template. + TemplateName *string + + // The version for a managed template. + TemplateVersion *string + + noSmithyDocumentSerde +} + // The dimension of a metric. type MetricDimension struct { @@ -3078,14 +3132,16 @@ type StatisticalThreshold struct { noSmithyDocumentSerde } -// A map of key-value pairs for all supported statistics. Currently, only count is -// supported. +// A map of key-value pairs for all supported statistics. For issues with missing +// or unexpected values for this API, consult Fleet indexing troubleshooting guide +// (https://docs.aws.amazon.com/iot/latest/developerguide/fleet-indexing-troubleshooting.html). type Statistics struct { // The average of the aggregated field values. Average float64 - // The count of things that match the query. + // The count of things that match the query string criteria and contain a valid + // aggregation field value. Count int32 // The maximum aggregated field value. diff --git a/service/iot/validators.go b/service/iot/validators.go index 97c8f924763..306c3942d7c 100644 --- a/service/iot/validators.go +++ b/service/iot/validators.go @@ -1750,6 +1750,26 @@ func (m *validateOpDescribeJobTemplate) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpDescribeManagedJobTemplate struct { +} + +func (*validateOpDescribeManagedJobTemplate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeManagedJobTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeManagedJobTemplateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeManagedJobTemplateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeMitigationAction struct { } @@ -3978,6 +3998,10 @@ func addOpDescribeJobTemplateValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpDescribeJobTemplate{}, middleware.After) } +func addOpDescribeManagedJobTemplateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeManagedJobTemplate{}, middleware.After) +} + func addOpDescribeMitigationActionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeMitigationAction{}, middleware.After) } @@ -7514,6 +7538,21 @@ func validateOpDescribeJobTemplateInput(v *DescribeJobTemplateInput) error { } } +func validateOpDescribeManagedJobTemplateInput(v *DescribeManagedJobTemplateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeManagedJobTemplateInput"} + if v.TemplateName == nil { + invalidParams.Add(smithy.NewErrParamRequired("TemplateName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeMitigationActionInput(v *DescribeMitigationActionInput) error { if v == nil { return nil diff --git a/service/iotdeviceadvisor/api_op_CreateSuiteDefinition.go b/service/iotdeviceadvisor/api_op_CreateSuiteDefinition.go index fffe3b3a1af..d11c4ef0b84 100644 --- a/service/iotdeviceadvisor/api_op_CreateSuiteDefinition.go +++ b/service/iotdeviceadvisor/api_op_CreateSuiteDefinition.go @@ -12,7 +12,10 @@ import ( "time" ) -// Creates a Device Advisor test suite. +// Creates a Device Advisor test suite. Requires permission to access the +// CreateSuiteDefinition +// (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) +// action. func (c *Client) CreateSuiteDefinition(ctx context.Context, params *CreateSuiteDefinitionInput, optFns ...func(*Options)) (*CreateSuiteDefinitionOutput, error) { if params == nil { params = &CreateSuiteDefinitionInput{} @@ -44,7 +47,7 @@ type CreateSuiteDefinitionOutput struct { // Creates a Device Advisor test suite with TimeStamp of when it was created. CreatedAt *time.Time - // Creates a Device Advisor test suite with Amazon Resource name. + // Creates a Device Advisor test suite with Amazon Resource Name (ARN). SuiteDefinitionArn *string // Creates a Device Advisor test suite with suite UUID. diff --git a/service/iotdeviceadvisor/api_op_DeleteSuiteDefinition.go b/service/iotdeviceadvisor/api_op_DeleteSuiteDefinition.go index 8f51a28d228..246bf208582 100644 --- a/service/iotdeviceadvisor/api_op_DeleteSuiteDefinition.go +++ b/service/iotdeviceadvisor/api_op_DeleteSuiteDefinition.go @@ -10,7 +10,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes a Device Advisor test suite. +// Deletes a Device Advisor test suite. Requires permission to access the +// DeleteSuiteDefinition +// (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) +// action. func (c *Client) DeleteSuiteDefinition(ctx context.Context, params *DeleteSuiteDefinitionInput, optFns ...func(*Options)) (*DeleteSuiteDefinitionOutput, error) { if params == nil { params = &DeleteSuiteDefinitionInput{} @@ -28,7 +31,7 @@ func (c *Client) DeleteSuiteDefinition(ctx context.Context, params *DeleteSuiteD type DeleteSuiteDefinitionInput struct { - // Suite definition Id of the test suite to be deleted. + // Suite definition ID of the test suite to be deleted. // // This member is required. SuiteDefinitionId *string diff --git a/service/iotdeviceadvisor/api_op_GetEndpoint.go b/service/iotdeviceadvisor/api_op_GetEndpoint.go new file mode 100644 index 00000000000..4c33a5a4fb8 --- /dev/null +++ b/service/iotdeviceadvisor/api_op_GetEndpoint.go @@ -0,0 +1,118 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iotdeviceadvisor + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets information about an Device Advisor endpoint. +func (c *Client) GetEndpoint(ctx context.Context, params *GetEndpointInput, optFns ...func(*Options)) (*GetEndpointOutput, error) { + if params == nil { + params = &GetEndpointInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetEndpoint", params, optFns, c.addOperationGetEndpointMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetEndpointOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetEndpointInput struct { + + // The certificate ARN of the device. This is an optional parameter. + CertificateArn *string + + // The thing ARN of the device. This is an optional parameter. + ThingArn *string + + noSmithyDocumentSerde +} + +type GetEndpointOutput struct { + + // The response of an Device Advisor endpoint. + Endpoint *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetEndpoint{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetEndpoint{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEndpoint(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "iotdeviceadvisor", + OperationName: "GetEndpoint", + } +} diff --git a/service/iotdeviceadvisor/api_op_GetSuiteDefinition.go b/service/iotdeviceadvisor/api_op_GetSuiteDefinition.go index aead06e5720..003ae32b38c 100644 --- a/service/iotdeviceadvisor/api_op_GetSuiteDefinition.go +++ b/service/iotdeviceadvisor/api_op_GetSuiteDefinition.go @@ -12,7 +12,10 @@ import ( "time" ) -// Gets information about a Device Advisor test suite. +// Gets information about a Device Advisor test suite. Requires permission to +// access the GetSuiteDefinition +// (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) +// action. func (c *Client) GetSuiteDefinition(ctx context.Context, params *GetSuiteDefinitionInput, optFns ...func(*Options)) (*GetSuiteDefinitionOutput, error) { if params == nil { params = &GetSuiteDefinitionInput{} @@ -30,7 +33,7 @@ func (c *Client) GetSuiteDefinition(ctx context.Context, params *GetSuiteDefinit type GetSuiteDefinitionInput struct { - // Suite definition Id of the test suite to get. + // Suite definition ID of the test suite to get. // // This member is required. SuiteDefinitionId *string @@ -58,7 +61,7 @@ type GetSuiteDefinitionOutput struct { // Suite configuration of the suite definition. SuiteDefinitionConfiguration *types.SuiteDefinitionConfiguration - // Suite definition Id of the suite definition. + // Suite definition ID of the suite definition. SuiteDefinitionId *string // Suite definition version of the suite definition. diff --git a/service/iotdeviceadvisor/api_op_GetSuiteRun.go b/service/iotdeviceadvisor/api_op_GetSuiteRun.go index cdf84f67415..c8fe135bdd3 100644 --- a/service/iotdeviceadvisor/api_op_GetSuiteRun.go +++ b/service/iotdeviceadvisor/api_op_GetSuiteRun.go @@ -12,7 +12,10 @@ import ( "time" ) -// Gets information about a Device Advisor test suite run. +// Gets information about a Device Advisor test suite run. Requires permission to +// access the GetSuiteRun +// (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) +// action. func (c *Client) GetSuiteRun(ctx context.Context, params *GetSuiteRunInput, optFns ...func(*Options)) (*GetSuiteRunOutput, error) { if params == nil { params = &GetSuiteRunInput{} @@ -30,12 +33,12 @@ func (c *Client) GetSuiteRun(ctx context.Context, params *GetSuiteRunInput, optF type GetSuiteRunInput struct { - // Suite definition Id for the test suite run. + // Suite definition ID for the test suite run. // // This member is required. SuiteDefinitionId *string - // Suite run Id for the test suite run. + // Suite run ID for the test suite run. // // This member is required. SuiteRunId *string @@ -51,13 +54,13 @@ type GetSuiteRunOutput struct { // Error reason for any test suite run failure. ErrorReason *string - // Date (in Unix epoch time) when the test suite run was started. + // Date (in Unix epoch time) when the test suite run started. StartTime *time.Time // Status for the test suite run. Status types.SuiteRunStatus - // Suite definition Id for the test suite run. + // Suite definition ID for the test suite run. SuiteDefinitionId *string // Suite definition version for the test suite run. @@ -69,7 +72,7 @@ type GetSuiteRunOutput struct { // Suite run configuration for the test suite run. SuiteRunConfiguration *types.SuiteRunConfiguration - // Suite run Id for the test suite run. + // Suite run ID for the test suite run. SuiteRunId *string // The tags attached to the suite run. diff --git a/service/iotdeviceadvisor/api_op_GetSuiteRunReport.go b/service/iotdeviceadvisor/api_op_GetSuiteRunReport.go index facf2615540..856e2ad4bbb 100644 --- a/service/iotdeviceadvisor/api_op_GetSuiteRunReport.go +++ b/service/iotdeviceadvisor/api_op_GetSuiteRunReport.go @@ -11,7 +11,9 @@ import ( ) // Gets a report download link for a successful Device Advisor qualifying test -// suite run. +// suite run. Requires permission to access the GetSuiteRunReport +// (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) +// action. func (c *Client) GetSuiteRunReport(ctx context.Context, params *GetSuiteRunReportInput, optFns ...func(*Options)) (*GetSuiteRunReportOutput, error) { if params == nil { params = &GetSuiteRunReportInput{} @@ -29,12 +31,12 @@ func (c *Client) GetSuiteRunReport(ctx context.Context, params *GetSuiteRunRepor type GetSuiteRunReportInput struct { - // Suite definition Id of the test suite. + // Suite definition ID of the test suite. // // This member is required. SuiteDefinitionId *string - // Suite run Id of the test suite run. + // Suite run ID of the test suite run. // // This member is required. SuiteRunId *string diff --git a/service/iotdeviceadvisor/api_op_ListSuiteDefinitions.go b/service/iotdeviceadvisor/api_op_ListSuiteDefinitions.go index 1b93ed938ee..06da430c244 100644 --- a/service/iotdeviceadvisor/api_op_ListSuiteDefinitions.go +++ b/service/iotdeviceadvisor/api_op_ListSuiteDefinitions.go @@ -12,7 +12,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists the Device Advisor test suites you have created. +// Lists the Device Advisor test suites you have created. Requires permission to +// access the ListSuiteDefinitions +// (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) +// action. func (c *Client) ListSuiteDefinitions(ctx context.Context, params *ListSuiteDefinitionsInput, optFns ...func(*Options)) (*ListSuiteDefinitionsOutput, error) { if params == nil { params = &ListSuiteDefinitionsInput{} diff --git a/service/iotdeviceadvisor/api_op_ListSuiteRuns.go b/service/iotdeviceadvisor/api_op_ListSuiteRuns.go index de5e614efaf..4cf2f2fd31b 100644 --- a/service/iotdeviceadvisor/api_op_ListSuiteRuns.go +++ b/service/iotdeviceadvisor/api_op_ListSuiteRuns.go @@ -12,8 +12,11 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists the runs of the specified Device Advisor test suite. You can list all runs -// of the test suite, or the runs of a specific version of the test suite. +// Lists runs of the specified Device Advisor test suite. You can list all runs of +// the test suite, or the runs of a specific version of the test suite. Requires +// permission to access the ListSuiteRuns +// (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) +// action. func (c *Client) ListSuiteRuns(ctx context.Context, params *ListSuiteRunsInput, optFns ...func(*Options)) (*ListSuiteRunsOutput, error) { if params == nil { params = &ListSuiteRunsInput{} @@ -38,7 +41,7 @@ type ListSuiteRunsInput struct { NextToken *string // Lists the test suite runs of the specified test suite based on suite definition - // Id. + // ID. SuiteDefinitionId *string // Must be passed along with suiteDefinitionId. Lists the test suite runs of the diff --git a/service/iotdeviceadvisor/api_op_ListTagsForResource.go b/service/iotdeviceadvisor/api_op_ListTagsForResource.go index 2403d7909ac..2620b4a21f9 100644 --- a/service/iotdeviceadvisor/api_op_ListTagsForResource.go +++ b/service/iotdeviceadvisor/api_op_ListTagsForResource.go @@ -10,7 +10,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists the tags attached to an IoT Device Advisor resource. +// Lists the tags attached to an IoT Device Advisor resource. Requires permission +// to access the ListTagsForResource +// (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) +// action. func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { if params == nil { params = &ListTagsForResourceInput{} diff --git a/service/iotdeviceadvisor/api_op_StartSuiteRun.go b/service/iotdeviceadvisor/api_op_StartSuiteRun.go index f2bbf7e98d5..c84b3414fe6 100644 --- a/service/iotdeviceadvisor/api_op_StartSuiteRun.go +++ b/service/iotdeviceadvisor/api_op_StartSuiteRun.go @@ -12,7 +12,10 @@ import ( "time" ) -// Starts a Device Advisor test suite run. +// Starts a Device Advisor test suite run. Requires permission to access the +// StartSuiteRun +// (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) +// action. func (c *Client) StartSuiteRun(ctx context.Context, params *StartSuiteRunInput, optFns ...func(*Options)) (*StartSuiteRunOutput, error) { if params == nil { params = &StartSuiteRunInput{} @@ -30,7 +33,7 @@ func (c *Client) StartSuiteRun(ctx context.Context, params *StartSuiteRunInput, type StartSuiteRunInput struct { - // Suite definition Id of the test suite. + // Suite definition ID of the test suite. // // This member is required. SuiteDefinitionId *string @@ -49,13 +52,13 @@ type StartSuiteRunInput struct { type StartSuiteRunOutput struct { - // Date (in Unix epoch time) when the suite run was created. + // Starts a Device Advisor test suite run based on suite create time. CreatedAt *time.Time - // Amazon resource name of the started suite run. + // Amazon Resource Name (ARN) of the started suite run. SuiteRunArn *string - // Suite Run Id of the started suite run. + // Suite Run ID of the started suite run. SuiteRunId *string // Metadata pertaining to the operation's result. diff --git a/service/iotdeviceadvisor/api_op_StopSuiteRun.go b/service/iotdeviceadvisor/api_op_StopSuiteRun.go index f5b092a404d..9723ac8c945 100644 --- a/service/iotdeviceadvisor/api_op_StopSuiteRun.go +++ b/service/iotdeviceadvisor/api_op_StopSuiteRun.go @@ -10,7 +10,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Stops a Device Advisor test suite run that is currently running. +// Stops a Device Advisor test suite run that is currently running. Requires +// permission to access the StopSuiteRun +// (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) +// action. func (c *Client) StopSuiteRun(ctx context.Context, params *StopSuiteRunInput, optFns ...func(*Options)) (*StopSuiteRunOutput, error) { if params == nil { params = &StopSuiteRunInput{} @@ -28,12 +31,12 @@ func (c *Client) StopSuiteRun(ctx context.Context, params *StopSuiteRunInput, op type StopSuiteRunInput struct { - // Suite definition Id of the test suite run to be stopped. + // Suite definition ID of the test suite run to be stopped. // // This member is required. SuiteDefinitionId *string - // Suite run Id of the test suite run to be stopped. + // Suite run ID of the test suite run to be stopped. // // This member is required. SuiteRunId *string diff --git a/service/iotdeviceadvisor/api_op_TagResource.go b/service/iotdeviceadvisor/api_op_TagResource.go index c5e885b7b95..868402f46e3 100644 --- a/service/iotdeviceadvisor/api_op_TagResource.go +++ b/service/iotdeviceadvisor/api_op_TagResource.go @@ -10,7 +10,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Adds to and modifies existing tags of an IoT Device Advisor resource. +// Adds to and modifies existing tags of an IoT Device Advisor resource. Requires +// permission to access the TagResource +// (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) +// action. func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { if params == nil { params = &TagResourceInput{} diff --git a/service/iotdeviceadvisor/api_op_UntagResource.go b/service/iotdeviceadvisor/api_op_UntagResource.go index cd2913c236d..8abeebc0786 100644 --- a/service/iotdeviceadvisor/api_op_UntagResource.go +++ b/service/iotdeviceadvisor/api_op_UntagResource.go @@ -10,7 +10,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Removes tags from an IoT Device Advisor resource. +// Removes tags from an IoT Device Advisor resource. Requires permission to access +// the UntagResource +// (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) +// action. func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { if params == nil { params = &UntagResourceInput{} diff --git a/service/iotdeviceadvisor/api_op_UpdateSuiteDefinition.go b/service/iotdeviceadvisor/api_op_UpdateSuiteDefinition.go index 5a6bdcc2eeb..b844366e67b 100644 --- a/service/iotdeviceadvisor/api_op_UpdateSuiteDefinition.go +++ b/service/iotdeviceadvisor/api_op_UpdateSuiteDefinition.go @@ -12,7 +12,10 @@ import ( "time" ) -// Updates a Device Advisor test suite. +// Updates a Device Advisor test suite. Requires permission to access the +// UpdateSuiteDefinition +// (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) +// action. func (c *Client) UpdateSuiteDefinition(ctx context.Context, params *UpdateSuiteDefinitionInput, optFns ...func(*Options)) (*UpdateSuiteDefinitionOutput, error) { if params == nil { params = &UpdateSuiteDefinitionInput{} @@ -30,7 +33,7 @@ func (c *Client) UpdateSuiteDefinition(ctx context.Context, params *UpdateSuiteD type UpdateSuiteDefinitionInput struct { - // Suite definition Id of the test suite to be updated. + // Suite definition ID of the test suite to be updated. // // This member is required. SuiteDefinitionId *string @@ -49,10 +52,10 @@ type UpdateSuiteDefinitionOutput struct { // Timestamp of when the test suite was updated. LastUpdatedAt *time.Time - // Amazon Resource name of the updated test suite. + // Amazon Resource Name (ARN) of the updated test suite. SuiteDefinitionArn *string - // Suite definition Id of the updated test suite. + // Suite definition ID of the updated test suite. SuiteDefinitionId *string // Suite definition name of the updated test suite. diff --git a/service/iotdeviceadvisor/deserializers.go b/service/iotdeviceadvisor/deserializers.go index 8cf7d067317..c4b2d1c7645 100644 --- a/service/iotdeviceadvisor/deserializers.go +++ b/service/iotdeviceadvisor/deserializers.go @@ -293,6 +293,163 @@ func awsRestjson1_deserializeOpErrorDeleteSuiteDefinition(response *smithyhttp.R } } +type awsRestjson1_deserializeOpGetEndpoint struct { +} + +func (*awsRestjson1_deserializeOpGetEndpoint) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetEndpoint(response, &metadata) + } + output := &GetEndpointOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetEndpointOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetEndpointOutput(v **GetEndpointOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetEndpointOutput + if *v == nil { + sv = &GetEndpointOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "endpoint": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Endpoint to be of type string, got %T instead", value) + } + sv.Endpoint = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpGetSuiteDefinition struct { } @@ -2736,6 +2893,15 @@ func awsRestjson1_deserializeDocumentSuiteRunConfiguration(v **types.SuiteRunCon for key, value := range shape { switch key { + case "parallelRun": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected ParallelRun to be of type *bool, got %T instead", value) + } + sv.ParallelRun = jtv + } + case "primaryDevice": if err := awsRestjson1_deserializeDocumentDeviceUnderTest(&sv.PrimaryDevice, value); err != nil { return err diff --git a/service/iotdeviceadvisor/doc.go b/service/iotdeviceadvisor/doc.go index 43b28ae0de8..c24f2e441ff 100644 --- a/service/iotdeviceadvisor/doc.go +++ b/service/iotdeviceadvisor/doc.go @@ -3,14 +3,15 @@ // Package iotdeviceadvisor provides the API client, operations, and parameter // types for AWS IoT Core Device Advisor. // -// AWS IoT Core Device Advisor is a cloud-based, fully managed test capability for -// validating IoT devices during device software development. Device Advisor -// provides pre-built tests that you can use to validate IoT devices for reliable -// and secure connectivity with AWS IoT Core before deploying devices to -// production. By using Device Advisor, you can confirm that your devices can -// connect to AWS IoT Core, follow security best practices and, if applicable, -// receive software updates from IoT Device Management. You can also download -// signed qualification reports to submit to the AWS Partner Network to get your -// device qualified for the AWS Partner Device Catalog without the need to send -// your device in and wait for it to be tested. +// Amazon Web Services IoT Core Device Advisor is a cloud-based, fully managed test +// capability for validating IoT devices during device software development. Device +// Advisor provides pre-built tests that you can use to validate IoT devices for +// reliable and secure connectivity with Amazon Web Services IoT Core before +// deploying devices to production. By using Device Advisor, you can confirm that +// your devices can connect to Amazon Web Services IoT Core, follow security best +// practices and, if applicable, receive software updates from IoT Device +// Management. You can also download signed qualification reports to submit to the +// Amazon Web Services Partner Network to get your device qualified for the Amazon +// Web Services Partner Device Catalog without the need to send your device in and +// wait for it to be tested. package iotdeviceadvisor diff --git a/service/iotdeviceadvisor/generated.json b/service/iotdeviceadvisor/generated.json index d44d29ae3c2..d8e744420cf 100644 --- a/service/iotdeviceadvisor/generated.json +++ b/service/iotdeviceadvisor/generated.json @@ -9,6 +9,7 @@ "api_client.go", "api_op_CreateSuiteDefinition.go", "api_op_DeleteSuiteDefinition.go", + "api_op_GetEndpoint.go", "api_op_GetSuiteDefinition.go", "api_op_GetSuiteRun.go", "api_op_GetSuiteRunReport.go", diff --git a/service/iotdeviceadvisor/serializers.go b/service/iotdeviceadvisor/serializers.go index de43e7586c3..eec842a5621 100644 --- a/service/iotdeviceadvisor/serializers.go +++ b/service/iotdeviceadvisor/serializers.go @@ -149,6 +149,63 @@ func awsRestjson1_serializeOpHttpBindingsDeleteSuiteDefinitionInput(v *DeleteSui return nil } +type awsRestjson1_serializeOpGetEndpoint struct { +} + +func (*awsRestjson1_serializeOpGetEndpoint) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetEndpointInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/endpoint") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetEndpointInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetEndpointInput(v *GetEndpointInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.CertificateArn != nil { + encoder.SetQuery("certificateArn").String(*v.CertificateArn) + } + + if v.ThingArn != nil { + encoder.SetQuery("thingArn").String(*v.ThingArn) + } + + return nil +} + type awsRestjson1_serializeOpGetSuiteDefinition struct { } @@ -996,6 +1053,11 @@ func awsRestjson1_serializeDocumentSuiteRunConfiguration(v *types.SuiteRunConfig object := value.Object() defer object.Close() + if v.ParallelRun { + ok := object.Key("parallelRun") + ok.Boolean(v.ParallelRun) + } + if v.PrimaryDevice != nil { ok := object.Key("primaryDevice") if err := awsRestjson1_serializeDocumentDeviceUnderTest(v.PrimaryDevice, ok); err != nil { diff --git a/service/iotdeviceadvisor/types/errors.go b/service/iotdeviceadvisor/types/errors.go index bc0b08141c8..ce6243a3093 100644 --- a/service/iotdeviceadvisor/types/errors.go +++ b/service/iotdeviceadvisor/types/errors.go @@ -7,7 +7,7 @@ import ( smithy "github.com/aws/smithy-go" ) -// Sends Conflict Exception. +// Sends a Conflict Exception. type ConflictException struct { Message *string @@ -26,7 +26,7 @@ func (e *ConflictException) ErrorMessage() string { func (e *ConflictException) ErrorCode() string { return "ConflictException" } func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// Sends Internal Failure Exception. +// Sends an Internal Failure exception. type InternalServerException struct { Message *string @@ -45,7 +45,7 @@ func (e *InternalServerException) ErrorMessage() string { func (e *InternalServerException) ErrorCode() string { return "InternalServerException" } func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } -// Sends Resource Not Found Exception. +// Sends a Resource Not Found exception. type ResourceNotFoundException struct { Message *string @@ -64,7 +64,7 @@ func (e *ResourceNotFoundException) ErrorMessage() string { func (e *ResourceNotFoundException) ErrorCode() string { return "ResourceNotFoundException" } func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// Sends invalid request exception. +// Sends a validation exception. type ValidationException struct { Message *string diff --git a/service/iotdeviceadvisor/types/types.go b/service/iotdeviceadvisor/types/types.go index 7adfd7b7bbe..96f38572fa5 100644 --- a/service/iotdeviceadvisor/types/types.go +++ b/service/iotdeviceadvisor/types/types.go @@ -7,13 +7,13 @@ import ( "time" ) -// Lists all the devices under test +// Information of a test device. A thing ARN or a certificate ARN is required. type DeviceUnderTest struct { - // Lists devices certificate arn + // Lists devices certificate ARN. CertificateArn *string - // Lists devices thing arn + // Lists devices thing ARN. ThingArn *string noSmithyDocumentSerde @@ -22,7 +22,7 @@ type DeviceUnderTest struct { // Show Group Result. type GroupResult struct { - // Group result Id. + // Group result ID. GroupId *string // Group Result Name. @@ -37,7 +37,7 @@ type GroupResult struct { // Gets Suite Definition Configuration. type SuiteDefinitionConfiguration struct { - // Gets device permission arn. + // Gets the device permission ARN. DevicePermissionRoleArn *string // Gets the devices configured. @@ -61,13 +61,13 @@ type SuiteDefinitionInformation struct { // Date (in Unix epoch time) when the test suite was created. CreatedAt *time.Time - // Specifies the devices under test for the test suite. + // Specifies the devices that are under test for the test suite. DefaultDevices []DeviceUnderTest // Specifies if the test suite is intended for qualification. IntendedForQualification bool - // Suite definition Id of the test suite. + // Suite definition ID of the test suite. SuiteDefinitionId *string // Suite name of the test suite. @@ -79,6 +79,9 @@ type SuiteDefinitionInformation struct { // Gets suite run configuration. type SuiteRunConfiguration struct { + // TRUE if multiple test suites run in parallel. + ParallelRun bool + // Gets the primary device for suite run. PrimaryDevice *DeviceUnderTest @@ -88,7 +91,10 @@ type SuiteRunConfiguration struct { noSmithyDocumentSerde } -// Information about the suite run. +// Information about the suite run. Requires permission to access the +// SuiteRunInformation +// (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) +// action. type SuiteRunInformation struct { // Date (in Unix epoch time) when the suite run was created. @@ -109,7 +115,7 @@ type SuiteRunInformation struct { // Status of the suite run. Status SuiteRunStatus - // Suite definition Id of the suite run. + // Suite definition ID of the suite run. SuiteDefinitionId *string // Suite definition name of the suite run. @@ -118,13 +124,13 @@ type SuiteRunInformation struct { // Suite definition version of the suite run. SuiteDefinitionVersion *string - // Suite run Id of the suite run. + // Suite run ID of the suite run. SuiteRunId *string noSmithyDocumentSerde } -// Provides test case run. +// Provides the test case run. type TestCaseRun struct { // Provides test case run end time. @@ -133,22 +139,44 @@ type TestCaseRun struct { // Provides test case run failure result. Failure *string - // Provides test case run log Url. + // Provides test case run log URL. LogUrl *string // Provides test case run start time. StartTime *time.Time - // Provides test case run status. + // Provides the test case run status. Status is one of the following: + // + // * PASS: Test + // passed. + // + // * FAIL: Test failed. + // + // * PENDING: Test has not started running but is + // scheduled. + // + // * RUNNING: Test is running. + // + // * STOPPING: Test is performing cleanup + // steps. You will see this status only if you stop a suite run. + // + // * STOPPED Test is + // stopped. You will see this status only if you stop a suite run. + // + // * + // PASS_WITH_WARNINGS: Test passed with warnings. + // + // * ERORR: Test faced an error + // when running due to an internal issue. Status Status - // Provides test case run definition Id. + // Provides the test case run definition ID. TestCaseDefinitionId *string - // Provides test case run definition Name. + // Provides the test case run definition name. TestCaseDefinitionName *string - // Provides test case run Id. + // Provides the test case run ID. TestCaseRunId *string // Provides test case run warnings. diff --git a/service/iotsitewise/api_op_AssociateTimeSeriesToAssetProperty.go b/service/iotsitewise/api_op_AssociateTimeSeriesToAssetProperty.go new file mode 100644 index 00000000000..0564d9726ce --- /dev/null +++ b/service/iotsitewise/api_op_AssociateTimeSeriesToAssetProperty.go @@ -0,0 +1,198 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iotsitewise + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Associates a time series (data stream) with an asset property. +func (c *Client) AssociateTimeSeriesToAssetProperty(ctx context.Context, params *AssociateTimeSeriesToAssetPropertyInput, optFns ...func(*Options)) (*AssociateTimeSeriesToAssetPropertyOutput, error) { + if params == nil { + params = &AssociateTimeSeriesToAssetPropertyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AssociateTimeSeriesToAssetProperty", params, optFns, c.addOperationAssociateTimeSeriesToAssetPropertyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AssociateTimeSeriesToAssetPropertyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AssociateTimeSeriesToAssetPropertyInput struct { + + // The alias that identifies the time series. + // + // This member is required. + Alias *string + + // The ID of the asset in which the asset property was created. + // + // This member is required. + AssetId *string + + // The ID of the asset property. + // + // This member is required. + PropertyId *string + + // A unique case-sensitive identifier that you can provide to ensure the + // idempotency of the request. Don't reuse this client token if a new idempotent + // request is required. + ClientToken *string + + noSmithyDocumentSerde +} + +type AssociateTimeSeriesToAssetPropertyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAssociateTimeSeriesToAssetPropertyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpAssociateTimeSeriesToAssetProperty{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAssociateTimeSeriesToAssetProperty{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addEndpointPrefix_opAssociateTimeSeriesToAssetPropertyMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opAssociateTimeSeriesToAssetPropertyMiddleware(stack, options); err != nil { + return err + } + if err = addOpAssociateTimeSeriesToAssetPropertyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateTimeSeriesToAssetProperty(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type endpointPrefix_opAssociateTimeSeriesToAssetPropertyMiddleware struct { +} + +func (*endpointPrefix_opAssociateTimeSeriesToAssetPropertyMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opAssociateTimeSeriesToAssetPropertyMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleSerialize(ctx, in) +} +func addEndpointPrefix_opAssociateTimeSeriesToAssetPropertyMiddleware(stack *middleware.Stack) error { + return stack.Serialize.Insert(&endpointPrefix_opAssociateTimeSeriesToAssetPropertyMiddleware{}, `OperationSerializer`, middleware.After) +} + +type idempotencyToken_initializeOpAssociateTimeSeriesToAssetProperty struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpAssociateTimeSeriesToAssetProperty) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpAssociateTimeSeriesToAssetProperty) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*AssociateTimeSeriesToAssetPropertyInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *AssociateTimeSeriesToAssetPropertyInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opAssociateTimeSeriesToAssetPropertyMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpAssociateTimeSeriesToAssetProperty{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opAssociateTimeSeriesToAssetProperty(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "iotsitewise", + OperationName: "AssociateTimeSeriesToAssetProperty", + } +} diff --git a/service/iotsitewise/api_op_CreatePortal.go b/service/iotsitewise/api_op_CreatePortal.go index ec23076e3e8..fb8bea81292 100644 --- a/service/iotsitewise/api_op_CreatePortal.go +++ b/service/iotsitewise/api_op_CreatePortal.go @@ -89,11 +89,10 @@ type CreatePortalInput struct { // Services Regions other than the China Regions. // // * IAM – The portal uses Identity - // and Access Management to authenticate users and manage user permissions. This - // option is only available in the China Regions. + // and Access Management to authenticate users and manage user permissions. // - // You can't change this value - // after you create a portal. Default: SSO + // You + // can't change this value after you create a portal. Default: SSO PortalAuthMode types.AuthMode // A description for the portal. diff --git a/service/iotsitewise/api_op_CreateProject.go b/service/iotsitewise/api_op_CreateProject.go index 3c184303489..f8d37fc7a68 100644 --- a/service/iotsitewise/api_op_CreateProject.go +++ b/service/iotsitewise/api_op_CreateProject.go @@ -11,7 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates a project in the specified portal. +// Creates a project in the specified portal. Make sure that the project name and +// description don't contain confidential information. func (c *Client) CreateProject(ctx context.Context, params *CreateProjectInput, optFns ...func(*Options)) (*CreateProjectOutput, error) { if params == nil { params = &CreateProjectInput{} diff --git a/service/iotsitewise/api_op_DeleteTimeSeries.go b/service/iotsitewise/api_op_DeleteTimeSeries.go new file mode 100644 index 00000000000..dbb9845c047 --- /dev/null +++ b/service/iotsitewise/api_op_DeleteTimeSeries.go @@ -0,0 +1,204 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iotsitewise + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a time series (data stream). If you delete a time series that's +// associated with an asset property, the asset property still exists, but the time +// series will no longer be associated with this asset property. To identify a time +// series, do one of the following: +// +// * If the time series isn't associated with an +// asset property, specify the alias of the time series. +// +// * If the time series is +// associated with an asset property, specify one of the following: +// +// * The alias of +// the time series. +// +// * The assetId and propertyId that identifies the asset +// property. +func (c *Client) DeleteTimeSeries(ctx context.Context, params *DeleteTimeSeriesInput, optFns ...func(*Options)) (*DeleteTimeSeriesOutput, error) { + if params == nil { + params = &DeleteTimeSeriesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteTimeSeries", params, optFns, c.addOperationDeleteTimeSeriesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteTimeSeriesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteTimeSeriesInput struct { + + // The alias that identifies the time series. + Alias *string + + // The ID of the asset in which the asset property was created. + AssetId *string + + // A unique case-sensitive identifier that you can provide to ensure the + // idempotency of the request. Don't reuse this client token if a new idempotent + // request is required. + ClientToken *string + + // The ID of the asset property. + PropertyId *string + + noSmithyDocumentSerde +} + +type DeleteTimeSeriesOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteTimeSeriesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteTimeSeries{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteTimeSeries{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addEndpointPrefix_opDeleteTimeSeriesMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opDeleteTimeSeriesMiddleware(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTimeSeries(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type endpointPrefix_opDeleteTimeSeriesMiddleware struct { +} + +func (*endpointPrefix_opDeleteTimeSeriesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opDeleteTimeSeriesMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleSerialize(ctx, in) +} +func addEndpointPrefix_opDeleteTimeSeriesMiddleware(stack *middleware.Stack) error { + return stack.Serialize.Insert(&endpointPrefix_opDeleteTimeSeriesMiddleware{}, `OperationSerializer`, middleware.After) +} + +type idempotencyToken_initializeOpDeleteTimeSeries struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpDeleteTimeSeries) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpDeleteTimeSeries) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*DeleteTimeSeriesInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *DeleteTimeSeriesInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opDeleteTimeSeriesMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteTimeSeries{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opDeleteTimeSeries(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "iotsitewise", + OperationName: "DeleteTimeSeries", + } +} diff --git a/service/iotsitewise/api_op_DescribeDefaultEncryptionConfiguration.go b/service/iotsitewise/api_op_DescribeDefaultEncryptionConfiguration.go index 8e62cd9a500..f41ac772dca 100644 --- a/service/iotsitewise/api_op_DescribeDefaultEncryptionConfiguration.go +++ b/service/iotsitewise/api_op_DescribeDefaultEncryptionConfiguration.go @@ -49,8 +49,8 @@ type DescribeDefaultEncryptionConfigurationOutput struct { // This member is required. EncryptionType types.EncryptionType - // The key ARN of the customer managed customer master key (CMK) used for KMS - // encryption if you use KMS_BASED_ENCRYPTION. + // The key ARN of the customer managed key used for KMS encryption if you use + // KMS_BASED_ENCRYPTION. KmsKeyArn *string // Metadata pertaining to the operation's result. diff --git a/service/iotsitewise/api_op_DescribeStorageConfiguration.go b/service/iotsitewise/api_op_DescribeStorageConfiguration.go index d37dc26f014..70e9c1cb005 100644 --- a/service/iotsitewise/api_op_DescribeStorageConfiguration.go +++ b/service/iotsitewise/api_op_DescribeStorageConfiguration.go @@ -40,25 +40,46 @@ type DescribeStorageConfigurationOutput struct { // This member is required. ConfigurationStatus *types.ConfigurationStatus - // The type of storage that you specified for your data. The storage type can be - // one of the following values: + // The storage tier that you specified for your data. The storageType parameter can + // be one of the following values: // - // * SITEWISE_DEFAULT_STORAGE – IoT SiteWise - // replicates your data into a service managed database. + // * SITEWISE_DEFAULT_STORAGE – IoT SiteWise saves + // your data into the hot tier. The hot tier is a service-managed database. // - // * MULTI_LAYER_STORAGE – - // IoT SiteWise replicates your data into a service managed database and saves a - // copy of your raw data and metadata in an Amazon S3 object that you specified. + // * + // MULTI_LAYER_STORAGE – IoT SiteWise saves your data in both the cold tier and the + // cold tier. The cold tier is a customer-managed Amazon S3 bucket. // // This member is required. StorageType types.StorageType + // Contains the storage configuration for time series (data streams) that aren't + // associated with asset properties. The disassociatedDataStorage can be one of the + // following values: + // + // * ENABLED – IoT SiteWise accepts time series that aren't + // associated with asset properties. After the disassociatedDataStorage is enabled, + // you can't disable it. + // + // * DISABLED – IoT SiteWise doesn't accept time series + // (data streams) that aren't associated with asset properties. + // + // For more + // information, see Data streams + // (https://docs.aws.amazon.com/iot-sitewise/latest/userguide/data-streams.html) in + // the IoT SiteWise User Guide. + DisassociatedDataStorage types.DisassociatedDataStorageState + // The date the storage configuration was last updated, in Unix epoch time. LastUpdateDate *time.Time // Contains information about the storage destination. MultiLayerStorage *types.MultiLayerStorage + // How many days your data is kept in the hot tier. By default, your data is kept + // indefinitely in the hot tier. + RetentionPeriod *types.RetentionPeriod + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/iotsitewise/api_op_DescribeTimeSeries.go b/service/iotsitewise/api_op_DescribeTimeSeries.go new file mode 100644 index 00000000000..31573dde531 --- /dev/null +++ b/service/iotsitewise/api_op_DescribeTimeSeries.go @@ -0,0 +1,201 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iotsitewise + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/iotsitewise/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Retrieves information about a time series (data stream). To identify a time +// series, do one of the following: +// +// * If the time series isn't associated with an +// asset property, specify the alias of the time series. +// +// * If the time series is +// associated with an asset property, specify one of the following: +// +// * The alias of +// the time series. +// +// * The assetId and propertyId that identifies the asset +// property. +func (c *Client) DescribeTimeSeries(ctx context.Context, params *DescribeTimeSeriesInput, optFns ...func(*Options)) (*DescribeTimeSeriesOutput, error) { + if params == nil { + params = &DescribeTimeSeriesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeTimeSeries", params, optFns, c.addOperationDescribeTimeSeriesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeTimeSeriesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeTimeSeriesInput struct { + + // The alias that identifies the time series. + Alias *string + + // The ID of the asset in which the asset property was created. + AssetId *string + + // The ID of the asset property. + PropertyId *string + + noSmithyDocumentSerde +} + +type DescribeTimeSeriesOutput struct { + + // The data type of the time series. If you specify STRUCT, you must also specify + // dataTypeSpec to identify the type of the structure for this time series. + // + // This member is required. + DataType types.PropertyDataType + + // The date that the time series was created, in Unix epoch time. + // + // This member is required. + TimeSeriesCreationDate *time.Time + + // The ID of the time series. + // + // This member is required. + TimeSeriesId *string + + // The date that the time series was last updated, in Unix epoch time. + // + // This member is required. + TimeSeriesLastUpdateDate *time.Time + + // The alias that identifies the time series. + Alias *string + + // The ID of the asset in which the asset property was created. + AssetId *string + + // The data type of the structure for this time series. This parameter is required + // for time series that have the STRUCT data type. The options for this parameter + // depend on the type of the composite model in which you created the asset + // property that is associated with your time series. Use AWS/ALARM_STATE for alarm + // state in alarm composite models. + DataTypeSpec *string + + // The ID of the asset property. + PropertyId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeTimeSeriesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeTimeSeries{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeTimeSeries{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addEndpointPrefix_opDescribeTimeSeriesMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTimeSeries(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type endpointPrefix_opDescribeTimeSeriesMiddleware struct { +} + +func (*endpointPrefix_opDescribeTimeSeriesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opDescribeTimeSeriesMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleSerialize(ctx, in) +} +func addEndpointPrefix_opDescribeTimeSeriesMiddleware(stack *middleware.Stack) error { + return stack.Serialize.Insert(&endpointPrefix_opDescribeTimeSeriesMiddleware{}, `OperationSerializer`, middleware.After) +} + +func newServiceMetadataMiddleware_opDescribeTimeSeries(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "iotsitewise", + OperationName: "DescribeTimeSeries", + } +} diff --git a/service/iotsitewise/api_op_DisassociateTimeSeriesFromAssetProperty.go b/service/iotsitewise/api_op_DisassociateTimeSeriesFromAssetProperty.go new file mode 100644 index 00000000000..7bedd9c5c4b --- /dev/null +++ b/service/iotsitewise/api_op_DisassociateTimeSeriesFromAssetProperty.go @@ -0,0 +1,198 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iotsitewise + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Disassociates a time series (data stream) from an asset property. +func (c *Client) DisassociateTimeSeriesFromAssetProperty(ctx context.Context, params *DisassociateTimeSeriesFromAssetPropertyInput, optFns ...func(*Options)) (*DisassociateTimeSeriesFromAssetPropertyOutput, error) { + if params == nil { + params = &DisassociateTimeSeriesFromAssetPropertyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DisassociateTimeSeriesFromAssetProperty", params, optFns, c.addOperationDisassociateTimeSeriesFromAssetPropertyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DisassociateTimeSeriesFromAssetPropertyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DisassociateTimeSeriesFromAssetPropertyInput struct { + + // The alias that identifies the time series. + // + // This member is required. + Alias *string + + // The ID of the asset in which the asset property was created. + // + // This member is required. + AssetId *string + + // The ID of the asset property. + // + // This member is required. + PropertyId *string + + // A unique case-sensitive identifier that you can provide to ensure the + // idempotency of the request. Don't reuse this client token if a new idempotent + // request is required. + ClientToken *string + + noSmithyDocumentSerde +} + +type DisassociateTimeSeriesFromAssetPropertyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDisassociateTimeSeriesFromAssetPropertyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDisassociateTimeSeriesFromAssetProperty{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDisassociateTimeSeriesFromAssetProperty{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addEndpointPrefix_opDisassociateTimeSeriesFromAssetPropertyMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opDisassociateTimeSeriesFromAssetPropertyMiddleware(stack, options); err != nil { + return err + } + if err = addOpDisassociateTimeSeriesFromAssetPropertyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateTimeSeriesFromAssetProperty(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type endpointPrefix_opDisassociateTimeSeriesFromAssetPropertyMiddleware struct { +} + +func (*endpointPrefix_opDisassociateTimeSeriesFromAssetPropertyMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opDisassociateTimeSeriesFromAssetPropertyMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleSerialize(ctx, in) +} +func addEndpointPrefix_opDisassociateTimeSeriesFromAssetPropertyMiddleware(stack *middleware.Stack) error { + return stack.Serialize.Insert(&endpointPrefix_opDisassociateTimeSeriesFromAssetPropertyMiddleware{}, `OperationSerializer`, middleware.After) +} + +type idempotencyToken_initializeOpDisassociateTimeSeriesFromAssetProperty struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpDisassociateTimeSeriesFromAssetProperty) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpDisassociateTimeSeriesFromAssetProperty) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*DisassociateTimeSeriesFromAssetPropertyInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *DisassociateTimeSeriesFromAssetPropertyInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opDisassociateTimeSeriesFromAssetPropertyMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpDisassociateTimeSeriesFromAssetProperty{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opDisassociateTimeSeriesFromAssetProperty(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "iotsitewise", + OperationName: "DisassociateTimeSeriesFromAssetProperty", + } +} diff --git a/service/iotsitewise/api_op_GetInterpolatedAssetPropertyValues.go b/service/iotsitewise/api_op_GetInterpolatedAssetPropertyValues.go index 95ba393c69f..6b873462ac2 100644 --- a/service/iotsitewise/api_op_GetInterpolatedAssetPropertyValues.go +++ b/service/iotsitewise/api_op_GetInterpolatedAssetPropertyValues.go @@ -74,20 +74,20 @@ type GetInterpolatedAssetPropertyValuesInput struct { // interpolation (https://en.wikipedia.org/wiki/Linear_interpolation). For example, // you can use this operation to return the interpolated temperature values for a // wind turbine every 24 hours over a duration of 7 days. If the interpolation - // starts on July 1, 2021, at 9 AM, IoT SiteWise returns the first interpolated - // value on July 2, 2021, at 9 AM, the second interpolated value on July 3, 2021, - // at 9 AM, and so on. + // starts July 1, 2021, at 9 AM, IoT SiteWise returns the first interpolated value + // on July 2, 2021, at 9 AM, the second interpolated value on July 3, 2021, at 9 + // AM, and so on. // // * LOCF_INTERPOLATION – Estimates missing data using last // observation carried forward interpolation If no data point is found for an // interval, IoT SiteWise returns the last observed data point for the previous // interval and carries forward this interpolated value until a new data point is // found. For example, you can get the state of an on-off valve every 24 hours over - // a duration of 7 days. If the interpolation starts on July 1, 2021, at 9 AM, IoT + // a duration of 7 days. If the interpolation starts July 1, 2021, at 9 AM, IoT // SiteWise returns the last observed data point between July 1, 2021, at 9 AM and - // July 2, 2021, at 9 AM as the first interpolated value. If no data point is found - // after 9 AM on July 2, 2021, IoT SiteWise uses the same interpolated value for - // the rest of the days. + // July 2, 2021, at 9 AM as the first interpolated value. If a data point isn't + // found after 9 AM on July 2, 2021, IoT SiteWise uses the same interpolated value + // for the rest of the days. // // This member is required. Type *string @@ -98,27 +98,28 @@ type GetInterpolatedAssetPropertyValuesInput struct { // The nanosecond offset converted from endTimeInSeconds. EndTimeOffsetInNanos *int32 - // The query interval for the window in seconds. IoT SiteWise computes each - // interpolated value by using data points from the timestamp of each interval + // The query interval for the window, in seconds. IoT SiteWise computes each + // interpolated value by using data points from the timestamp of each interval, // minus the window to the timestamp of each interval plus the window. If not - // specified, the window is between the start time minus the interval and the end - // time plus the interval. + // specified, the window ranges between the start time minus the interval and the + // end time plus the interval. // // * If you specify a value for the - // intervalWindowInSeconds parameter, the type parameter must be + // intervalWindowInSeconds parameter, the value for the type parameter must be // LINEAR_INTERPOLATION. // - // * If no data point is found during the specified query + // * If a data point isn't found during the specified query // window, IoT SiteWise won't return an interpolated value for the interval. This // indicates that there's a gap in the ingested data points. // // For example, you can // get the interpolated temperature values for a wind turbine every 24 hours over a // duration of 7 days. If the interpolation starts on July 1, 2021, at 9 AM with a - // window of 2 hours, IoT SiteWise uses the data points from 7 AM (9 AM - 2 hours) - // to 11 AM (9 AM + 2 hours) on July 2, 2021 to compute the first interpolated - // value, uses the data points from 7 AM (9 AM - 2 hours) to 11 AM (9 AM + 2 hours) - // on July 3, 2021 to compute the second interpolated value, and so on. + // window of 2 hours, IoT SiteWise uses the data points from 7 AM (9 AM minus 2 + // hours) to 11 AM (9 AM plus 2 hours) on July 2, 2021 to compute the first + // interpolated value. Next, IoT SiteWise uses the data points from 7 AM (9 AM + // minus 2 hours) to 11 AM (9 AM plus 2 hours) on July 3, 2021 to compute the + // second interpolated value, and so on. IntervalWindowInSeconds *int64 // The maximum number of results to return for each paginated request. If not diff --git a/service/iotsitewise/api_op_ListTimeSeries.go b/service/iotsitewise/api_op_ListTimeSeries.go new file mode 100644 index 00000000000..c3cb86be5a1 --- /dev/null +++ b/service/iotsitewise/api_op_ListTimeSeries.go @@ -0,0 +1,257 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iotsitewise + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/iotsitewise/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves a paginated list of time series (data streams). +func (c *Client) ListTimeSeries(ctx context.Context, params *ListTimeSeriesInput, optFns ...func(*Options)) (*ListTimeSeriesOutput, error) { + if params == nil { + params = &ListTimeSeriesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTimeSeries", params, optFns, c.addOperationListTimeSeriesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTimeSeriesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListTimeSeriesInput struct { + + // The alias prefix of the time series. + AliasPrefix *string + + // The ID of the asset in which the asset property was created. + AssetId *string + + // The maximum number of results to return for each paginated request. + MaxResults *int32 + + // The token to be used for the next set of paginated results. + NextToken *string + + // The type of the time series. The time series type can be one of the following + // values: + // + // * ASSOCIATED – The time series is associated with an asset property. + // + // * + // DISASSOCIATED – The time series isn't associated with any asset property. + TimeSeriesType types.ListTimeSeriesType + + noSmithyDocumentSerde +} + +type ListTimeSeriesOutput struct { + + // One or more time series summaries to list. + // + // This member is required. + TimeSeriesSummaries []types.TimeSeriesSummary + + // The token for the next set of results, or null if there are no additional + // results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTimeSeriesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListTimeSeries{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTimeSeries{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addEndpointPrefix_opListTimeSeriesMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTimeSeries(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type endpointPrefix_opListTimeSeriesMiddleware struct { +} + +func (*endpointPrefix_opListTimeSeriesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListTimeSeriesMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleSerialize(ctx, in) +} +func addEndpointPrefix_opListTimeSeriesMiddleware(stack *middleware.Stack) error { + return stack.Serialize.Insert(&endpointPrefix_opListTimeSeriesMiddleware{}, `OperationSerializer`, middleware.After) +} + +// ListTimeSeriesAPIClient is a client that implements the ListTimeSeries +// operation. +type ListTimeSeriesAPIClient interface { + ListTimeSeries(context.Context, *ListTimeSeriesInput, ...func(*Options)) (*ListTimeSeriesOutput, error) +} + +var _ ListTimeSeriesAPIClient = (*Client)(nil) + +// ListTimeSeriesPaginatorOptions is the paginator options for ListTimeSeries +type ListTimeSeriesPaginatorOptions struct { + // The maximum number of results to return for each paginated request. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListTimeSeriesPaginator is a paginator for ListTimeSeries +type ListTimeSeriesPaginator struct { + options ListTimeSeriesPaginatorOptions + client ListTimeSeriesAPIClient + params *ListTimeSeriesInput + nextToken *string + firstPage bool +} + +// NewListTimeSeriesPaginator returns a new ListTimeSeriesPaginator +func NewListTimeSeriesPaginator(client ListTimeSeriesAPIClient, params *ListTimeSeriesInput, optFns ...func(*ListTimeSeriesPaginatorOptions)) *ListTimeSeriesPaginator { + if params == nil { + params = &ListTimeSeriesInput{} + } + + options := ListTimeSeriesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListTimeSeriesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListTimeSeriesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListTimeSeries page. +func (p *ListTimeSeriesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListTimeSeriesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListTimeSeries(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListTimeSeries(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "iotsitewise", + OperationName: "ListTimeSeries", + } +} diff --git a/service/iotsitewise/api_op_PutDefaultEncryptionConfiguration.go b/service/iotsitewise/api_op_PutDefaultEncryptionConfiguration.go index e2bf60b6e79..274ab71c67b 100644 --- a/service/iotsitewise/api_op_PutDefaultEncryptionConfiguration.go +++ b/service/iotsitewise/api_op_PutDefaultEncryptionConfiguration.go @@ -38,8 +38,8 @@ type PutDefaultEncryptionConfigurationInput struct { // This member is required. EncryptionType types.EncryptionType - // The Key ID of the customer managed customer master key (CMK) used for KMS - // encryption. This is required if you use KMS_BASED_ENCRYPTION. + // The Key ID of the customer managed key used for KMS encryption. This is required + // if you use KMS_BASED_ENCRYPTION. KmsKeyId *string noSmithyDocumentSerde @@ -58,7 +58,7 @@ type PutDefaultEncryptionConfigurationOutput struct { // This member is required. EncryptionType types.EncryptionType - // The Key ARN of the KMS CMK used for KMS encryption if you use + // The Key ARN of the KMS key used for KMS encryption if you use // KMS_BASED_ENCRYPTION. KmsKeyArn *string diff --git a/service/iotsitewise/api_op_PutStorageConfiguration.go b/service/iotsitewise/api_op_PutStorageConfiguration.go index d3d57e4b324..6a29c9aff00 100644 --- a/service/iotsitewise/api_op_PutStorageConfiguration.go +++ b/service/iotsitewise/api_op_PutStorageConfiguration.go @@ -30,23 +30,44 @@ func (c *Client) PutStorageConfiguration(ctx context.Context, params *PutStorage type PutStorageConfigurationInput struct { - // The type of storage that you specified for your data. The storage type can be - // one of the following values: + // The storage tier that you specified for your data. The storageType parameter can + // be one of the following values: // - // * SITEWISE_DEFAULT_STORAGE – IoT SiteWise - // replicates your data into a service managed database. + // * SITEWISE_DEFAULT_STORAGE – IoT SiteWise saves + // your data into the hot tier. The hot tier is a service-managed database. // - // * MULTI_LAYER_STORAGE – - // IoT SiteWise replicates your data into a service managed database and saves a - // copy of your raw data and metadata in an Amazon S3 object that you specified. + // * + // MULTI_LAYER_STORAGE – IoT SiteWise saves your data in both the cold tier and the + // cold tier. The cold tier is a customer-managed Amazon S3 bucket. // // This member is required. StorageType types.StorageType + // Contains the storage configuration for time series (data streams) that aren't + // associated with asset properties. The disassociatedDataStorage can be one of the + // following values: + // + // * ENABLED – IoT SiteWise accepts time series that aren't + // associated with asset properties. After the disassociatedDataStorage is enabled, + // you can't disable it. + // + // * DISABLED – IoT SiteWise doesn't accept time series + // (data streams) that aren't associated with asset properties. + // + // For more + // information, see Data streams + // (https://docs.aws.amazon.com/iot-sitewise/latest/userguide/data-streams.html) in + // the IoT SiteWise User Guide. + DisassociatedDataStorage types.DisassociatedDataStorageState + // Identifies a storage destination. If you specified MULTI_LAYER_STORAGE for the // storage type, you must specify a MultiLayerStorage object. MultiLayerStorage *types.MultiLayerStorage + // How many days your data is kept in the hot tier. By default, your data is kept + // indefinitely in the hot tier. + RetentionPeriod *types.RetentionPeriod + noSmithyDocumentSerde } @@ -57,22 +78,43 @@ type PutStorageConfigurationOutput struct { // This member is required. ConfigurationStatus *types.ConfigurationStatus - // The type of storage that you specified for your data. The storage type can be - // one of the following values: + // The storage tier that you specified for your data. The storageType parameter can + // be one of the following values: // - // * SITEWISE_DEFAULT_STORAGE – IoT SiteWise - // replicates your data into a service managed database. + // * SITEWISE_DEFAULT_STORAGE – IoT SiteWise saves + // your data into the hot tier. The hot tier is a service-managed database. // - // * MULTI_LAYER_STORAGE – - // IoT SiteWise replicates your data into a service managed database and saves a - // copy of your raw data and metadata in an Amazon S3 object that you specified. + // * + // MULTI_LAYER_STORAGE – IoT SiteWise saves your data in both the cold tier and the + // cold tier. The cold tier is a customer-managed Amazon S3 bucket. // // This member is required. StorageType types.StorageType + // Contains the storage configuration for time series (data streams) that aren't + // associated with asset properties. The disassociatedDataStorage can be one of the + // following values: + // + // * ENABLED – IoT SiteWise accepts time series that aren't + // associated with asset properties. After the disassociatedDataStorage is enabled, + // you can't disable it. + // + // * DISABLED – IoT SiteWise doesn't accept time series + // (data streams) that aren't associated with asset properties. + // + // For more + // information, see Data streams + // (https://docs.aws.amazon.com/iot-sitewise/latest/userguide/data-streams.html) in + // the IoT SiteWise User Guide. + DisassociatedDataStorage types.DisassociatedDataStorageState + // Contains information about the storage destination. MultiLayerStorage *types.MultiLayerStorage + // How many days your data is kept in the hot tier. By default, your data is kept + // indefinitely in the hot tier. + RetentionPeriod *types.RetentionPeriod + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/iotsitewise/deserializers.go b/service/iotsitewise/deserializers.go index 942999c2c4e..864e08fca1f 100644 --- a/service/iotsitewise/deserializers.go +++ b/service/iotsitewise/deserializers.go @@ -125,6 +125,107 @@ func awsRestjson1_deserializeOpErrorAssociateAssets(response *smithyhttp.Respons } } +type awsRestjson1_deserializeOpAssociateTimeSeriesToAssetProperty struct { +} + +func (*awsRestjson1_deserializeOpAssociateTimeSeriesToAssetProperty) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpAssociateTimeSeriesToAssetProperty) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorAssociateTimeSeriesToAssetProperty(response, &metadata) + } + output := &AssociateTimeSeriesToAssetPropertyOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorAssociateTimeSeriesToAssetProperty(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ConflictingOperationException", errorCode): + return awsRestjson1_deserializeErrorConflictingOperationException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpBatchAssociateProjectAssets struct { } @@ -2705,6 +2806,107 @@ func awsRestjson1_deserializeOpErrorDeleteProject(response *smithyhttp.Response, } } +type awsRestjson1_deserializeOpDeleteTimeSeries struct { +} + +func (*awsRestjson1_deserializeOpDeleteTimeSeries) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteTimeSeries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteTimeSeries(response, &metadata) + } + output := &DeleteTimeSeriesOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteTimeSeries(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ConflictingOperationException", errorCode): + return awsRestjson1_deserializeErrorConflictingOperationException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpDescribeAccessPolicy struct { } @@ -5231,6 +5433,15 @@ func awsRestjson1_deserializeOpDocumentDescribeStorageConfigurationOutput(v **De return err } + case "disassociatedDataStorage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DisassociatedDataStorageState to be of type string, got %T instead", value) + } + sv.DisassociatedDataStorage = types.DisassociatedDataStorageState(jtv) + } + case "lastUpdateDate": if value != nil { switch jtv := value.(type) { @@ -5252,6 +5463,11 @@ func awsRestjson1_deserializeOpDocumentDescribeStorageConfigurationOutput(v **De return err } + case "retentionPeriod": + if err := awsRestjson1_deserializeDocumentRetentionPeriod(&sv.RetentionPeriod, value); err != nil { + return err + } + case "storageType": if value != nil { jtv, ok := value.(string) @@ -5270,14 +5486,14 @@ func awsRestjson1_deserializeOpDocumentDescribeStorageConfigurationOutput(v **De return nil } -type awsRestjson1_deserializeOpDisassociateAssets struct { +type awsRestjson1_deserializeOpDescribeTimeSeries struct { } -func (*awsRestjson1_deserializeOpDisassociateAssets) ID() string { +func (*awsRestjson1_deserializeOpDescribeTimeSeries) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDisassociateAssets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeTimeSeries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5291,21 +5507,43 @@ func (m *awsRestjson1_deserializeOpDisassociateAssets) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDisassociateAssets(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeTimeSeries(response, &metadata) } - output := &DisassociateAssetsOutput{} + output := &DescribeTimeSeriesOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDescribeTimeSeriesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } return out, metadata, err } -func awsRestjson1_deserializeOpErrorDisassociateAssets(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeTimeSeries(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5346,9 +5584,6 @@ func awsRestjson1_deserializeOpErrorDisassociateAssets(response *smithyhttp.Resp } switch { - case strings.EqualFold("ConflictingOperationException", errorCode): - return awsRestjson1_deserializeErrorConflictingOperationException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -5371,27 +5606,346 @@ func awsRestjson1_deserializeOpErrorDisassociateAssets(response *smithyhttp.Resp } } -type awsRestjson1_deserializeOpGetAssetPropertyAggregates struct { -} - -func (*awsRestjson1_deserializeOpGetAssetPropertyAggregates) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetAssetPropertyAggregates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err +func awsRestjson1_deserializeOpDocumentDescribeTimeSeriesOutput(v **DescribeTimeSeriesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil } - response, ok := out.RawResponse.(*smithyhttp.Response) + shape, ok := value.(map[string]interface{}) if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + return fmt.Errorf("unexpected JSON type %v", value) } - if response.StatusCode < 200 || response.StatusCode >= 300 { + var sv *DescribeTimeSeriesOutput + if *v == nil { + sv = &DescribeTimeSeriesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "alias": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PropertyAlias to be of type string, got %T instead", value) + } + sv.Alias = ptr.String(jtv) + } + + case "assetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ID to be of type string, got %T instead", value) + } + sv.AssetId = ptr.String(jtv) + } + + case "dataType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PropertyDataType to be of type string, got %T instead", value) + } + sv.DataType = types.PropertyDataType(jtv) + } + + case "dataTypeSpec": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.DataTypeSpec = ptr.String(jtv) + } + + case "propertyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ID to be of type string, got %T instead", value) + } + sv.PropertyId = ptr.String(jtv) + } + + case "timeSeriesCreationDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.TimeSeriesCreationDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "timeSeriesId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TimeSeriesId to be of type string, got %T instead", value) + } + sv.TimeSeriesId = ptr.String(jtv) + } + + case "timeSeriesLastUpdateDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.TimeSeriesLastUpdateDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDisassociateAssets struct { +} + +func (*awsRestjson1_deserializeOpDisassociateAssets) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDisassociateAssets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDisassociateAssets(response, &metadata) + } + output := &DisassociateAssetsOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDisassociateAssets(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ConflictingOperationException", errorCode): + return awsRestjson1_deserializeErrorConflictingOperationException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDisassociateTimeSeriesFromAssetProperty struct { +} + +func (*awsRestjson1_deserializeOpDisassociateTimeSeriesFromAssetProperty) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDisassociateTimeSeriesFromAssetProperty) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDisassociateTimeSeriesFromAssetProperty(response, &metadata) + } + output := &DisassociateTimeSeriesFromAssetPropertyOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDisassociateTimeSeriesFromAssetProperty(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ConflictingOperationException", errorCode): + return awsRestjson1_deserializeErrorConflictingOperationException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpGetAssetPropertyAggregates struct { +} + +func (*awsRestjson1_deserializeOpGetAssetPropertyAggregates) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetAssetPropertyAggregates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorGetAssetPropertyAggregates(response, &metadata) } output := &GetAssetPropertyAggregatesOutput{} @@ -7524,7 +8078,169 @@ func (m *awsRestjson1_deserializeOpListProjects) HandleDeserialize(ctx context.C if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorListProjects(response, &metadata) } - output := &ListProjectsOutput{} + output := &ListProjectsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListProjectsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListProjects(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListProjectsOutput(v **ListProjectsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListProjectsOutput + if *v == nil { + sv = &ListProjectsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "projectSummaries": + if err := awsRestjson1_deserializeDocumentProjectSummaries(&sv.ProjectSummaries, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListTagsForResource struct { +} + +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) + } + output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte @@ -7545,7 +8261,7 @@ func (m *awsRestjson1_deserializeOpListProjects) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListProjectsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7558,7 +8274,7 @@ func (m *awsRestjson1_deserializeOpListProjects) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorListProjects(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7599,15 +8315,27 @@ func awsRestjson1_deserializeOpErrorListProjects(response *smithyhttp.Response, } switch { + case strings.EqualFold("ConflictingOperationException", errorCode): + return awsRestjson1_deserializeErrorConflictingOperationException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7618,7 +8346,7 @@ func awsRestjson1_deserializeOpErrorListProjects(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentListProjectsOutput(v **ListProjectsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7631,26 +8359,17 @@ func awsRestjson1_deserializeOpDocumentListProjectsOutput(v **ListProjectsOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListProjectsOutput + var sv *ListTagsForResourceOutput if *v == nil { - sv = &ListProjectsOutput{} + sv = &ListTagsForResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "nextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "projectSummaries": - if err := awsRestjson1_deserializeDocumentProjectSummaries(&sv.ProjectSummaries, value); err != nil { + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err } @@ -7663,14 +8382,14 @@ func awsRestjson1_deserializeOpDocumentListProjectsOutput(v **ListProjectsOutput return nil } -type awsRestjson1_deserializeOpListTagsForResource struct { +type awsRestjson1_deserializeOpListTimeSeries struct { } -func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { +func (*awsRestjson1_deserializeOpListTimeSeries) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListTimeSeries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7684,9 +8403,9 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListTimeSeries(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &ListTimeSeriesOutput{} out.Result = output var buff [1024]byte @@ -7707,7 +8426,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListTimeSeriesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7720,7 +8439,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListTimeSeries(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7761,27 +8480,18 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } switch { - case strings.EqualFold("ConflictingOperationException", errorCode): - return awsRestjson1_deserializeErrorConflictingOperationException(response, errorBody) - case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnauthorizedException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7792,7 +8502,7 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListTimeSeriesOutput(v **ListTimeSeriesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7805,17 +8515,26 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTagsForResourceOutput + var sv *ListTimeSeriesOutput if *v == nil { - sv = &ListTagsForResourceOutput{} + sv = &ListTimeSeriesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "tags": - if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "TimeSeriesSummaries": + if err := awsRestjson1_deserializeDocumentTimeSeriesSummaries(&sv.TimeSeriesSummaries, value); err != nil { return err } @@ -8256,11 +8975,25 @@ func awsRestjson1_deserializeOpDocumentPutStorageConfigurationOutput(v **PutStor return err } + case "disassociatedDataStorage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DisassociatedDataStorageState to be of type string, got %T instead", value) + } + sv.DisassociatedDataStorage = types.DisassociatedDataStorageState(jtv) + } + case "multiLayerStorage": if err := awsRestjson1_deserializeDocumentMultiLayerStorage(&sv.MultiLayerStorage, value); err != nil { return err } + case "retentionPeriod": + if err := awsRestjson1_deserializeDocumentRetentionPeriod(&sv.RetentionPeriod, value); err != nil { + return err + } + case "storageType": if value != nil { jtv, ok := value.(string) @@ -14618,6 +15351,59 @@ func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.Resourc return nil } +func awsRestjson1_deserializeDocumentRetentionPeriod(v **types.RetentionPeriod, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RetentionPeriod + if *v == nil { + sv = &types.RetentionPeriod{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "numberOfDays": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected NumberOfDays to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.NumberOfDays = ptr.Int32(int32(i64)) + } + + case "unlimited": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Unlimited to be of type *bool, got %T instead", value) + } + sv.Unlimited = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentServiceUnavailableException(v **types.ServiceUnavailableException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -14791,6 +15577,157 @@ func awsRestjson1_deserializeDocumentTimeInNanos(v **types.TimeInNanos, value in return nil } +func awsRestjson1_deserializeDocumentTimeSeriesSummaries(v *[]types.TimeSeriesSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.TimeSeriesSummary + if *v == nil { + cv = []types.TimeSeriesSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.TimeSeriesSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentTimeSeriesSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentTimeSeriesSummary(v **types.TimeSeriesSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.TimeSeriesSummary + if *v == nil { + sv = &types.TimeSeriesSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "alias": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PropertyAlias to be of type string, got %T instead", value) + } + sv.Alias = ptr.String(jtv) + } + + case "assetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ID to be of type string, got %T instead", value) + } + sv.AssetId = ptr.String(jtv) + } + + case "dataType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PropertyDataType to be of type string, got %T instead", value) + } + sv.DataType = types.PropertyDataType(jtv) + } + + case "dataTypeSpec": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.DataTypeSpec = ptr.String(jtv) + } + + case "propertyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ID to be of type string, got %T instead", value) + } + sv.PropertyId = ptr.String(jtv) + } + + case "timeSeriesCreationDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.TimeSeriesCreationDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "timeSeriesId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TimeSeriesId to be of type string, got %T instead", value) + } + sv.TimeSeriesId = ptr.String(jtv) + } + + case "timeSeriesLastUpdateDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.TimeSeriesLastUpdateDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentTimestamps(v *[]types.TimeInNanos, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/iotsitewise/generated.json b/service/iotsitewise/generated.json index bc6f75e85f1..6d9a8409abb 100644 --- a/service/iotsitewise/generated.json +++ b/service/iotsitewise/generated.json @@ -9,6 +9,7 @@ "files": [ "api_client.go", "api_op_AssociateAssets.go", + "api_op_AssociateTimeSeriesToAssetProperty.go", "api_op_BatchAssociateProjectAssets.go", "api_op_BatchDisassociateProjectAssets.go", "api_op_BatchPutAssetPropertyValue.go", @@ -26,6 +27,7 @@ "api_op_DeleteGateway.go", "api_op_DeletePortal.go", "api_op_DeleteProject.go", + "api_op_DeleteTimeSeries.go", "api_op_DescribeAccessPolicy.go", "api_op_DescribeAsset.go", "api_op_DescribeAssetModel.go", @@ -38,7 +40,9 @@ "api_op_DescribePortal.go", "api_op_DescribeProject.go", "api_op_DescribeStorageConfiguration.go", + "api_op_DescribeTimeSeries.go", "api_op_DisassociateAssets.go", + "api_op_DisassociateTimeSeriesFromAssetProperty.go", "api_op_GetAssetPropertyAggregates.go", "api_op_GetAssetPropertyValue.go", "api_op_GetAssetPropertyValueHistory.go", @@ -54,6 +58,7 @@ "api_op_ListProjectAssets.go", "api_op_ListProjects.go", "api_op_ListTagsForResource.go", + "api_op_ListTimeSeries.go", "api_op_PutDefaultEncryptionConfiguration.go", "api_op_PutLoggingOptions.go", "api_op_PutStorageConfiguration.go", diff --git a/service/iotsitewise/serializers.go b/service/iotsitewise/serializers.go index a5387f4cc72..5c818b3d8e8 100644 --- a/service/iotsitewise/serializers.go +++ b/service/iotsitewise/serializers.go @@ -107,6 +107,90 @@ func awsRestjson1_serializeOpDocumentAssociateAssetsInput(v *AssociateAssetsInpu return nil } +type awsRestjson1_serializeOpAssociateTimeSeriesToAssetProperty struct { +} + +func (*awsRestjson1_serializeOpAssociateTimeSeriesToAssetProperty) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpAssociateTimeSeriesToAssetProperty) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*AssociateTimeSeriesToAssetPropertyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/timeseries/associate") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsAssociateTimeSeriesToAssetPropertyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentAssociateTimeSeriesToAssetPropertyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsAssociateTimeSeriesToAssetPropertyInput(v *AssociateTimeSeriesToAssetPropertyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Alias != nil { + encoder.SetQuery("alias").String(*v.Alias) + } + + if v.AssetId != nil { + encoder.SetQuery("assetId").String(*v.AssetId) + } + + if v.PropertyId != nil { + encoder.SetQuery("propertyId").String(*v.PropertyId) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentAssociateTimeSeriesToAssetPropertyInput(v *AssociateTimeSeriesToAssetPropertyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + return nil +} + type awsRestjson1_serializeOpBatchAssociateProjectAssets struct { } @@ -1454,6 +1538,90 @@ func awsRestjson1_serializeOpHttpBindingsDeleteProjectInput(v *DeleteProjectInpu return nil } +type awsRestjson1_serializeOpDeleteTimeSeries struct { +} + +func (*awsRestjson1_serializeOpDeleteTimeSeries) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteTimeSeries) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteTimeSeriesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/timeseries/delete") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteTimeSeriesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentDeleteTimeSeriesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteTimeSeriesInput(v *DeleteTimeSeriesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Alias != nil { + encoder.SetQuery("alias").String(*v.Alias) + } + + if v.AssetId != nil { + encoder.SetQuery("assetId").String(*v.AssetId) + } + + if v.PropertyId != nil { + encoder.SetQuery("propertyId").String(*v.PropertyId) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDeleteTimeSeriesInput(v *DeleteTimeSeriesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + return nil +} + type awsRestjson1_serializeOpDescribeAccessPolicy struct { } @@ -2129,6 +2297,67 @@ func awsRestjson1_serializeOpHttpBindingsDescribeStorageConfigurationInput(v *De return nil } +type awsRestjson1_serializeOpDescribeTimeSeries struct { +} + +func (*awsRestjson1_serializeOpDescribeTimeSeries) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeTimeSeries) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeTimeSeriesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/timeseries/describe") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeTimeSeriesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeTimeSeriesInput(v *DescribeTimeSeriesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Alias != nil { + encoder.SetQuery("alias").String(*v.Alias) + } + + if v.AssetId != nil { + encoder.SetQuery("assetId").String(*v.AssetId) + } + + if v.PropertyId != nil { + encoder.SetQuery("propertyId").String(*v.PropertyId) + } + + return nil +} + type awsRestjson1_serializeOpDisassociateAssets struct { } @@ -2220,6 +2449,90 @@ func awsRestjson1_serializeOpDocumentDisassociateAssetsInput(v *DisassociateAsse return nil } +type awsRestjson1_serializeOpDisassociateTimeSeriesFromAssetProperty struct { +} + +func (*awsRestjson1_serializeOpDisassociateTimeSeriesFromAssetProperty) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDisassociateTimeSeriesFromAssetProperty) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DisassociateTimeSeriesFromAssetPropertyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/timeseries/disassociate") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDisassociateTimeSeriesFromAssetPropertyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentDisassociateTimeSeriesFromAssetPropertyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDisassociateTimeSeriesFromAssetPropertyInput(v *DisassociateTimeSeriesFromAssetPropertyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Alias != nil { + encoder.SetQuery("alias").String(*v.Alias) + } + + if v.AssetId != nil { + encoder.SetQuery("assetId").String(*v.AssetId) + } + + if v.PropertyId != nil { + encoder.SetQuery("propertyId").String(*v.PropertyId) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDisassociateTimeSeriesFromAssetPropertyInput(v *DisassociateTimeSeriesFromAssetPropertyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + return nil +} + type awsRestjson1_serializeOpGetAssetPropertyAggregates struct { } @@ -3264,6 +3577,75 @@ func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsFor return nil } +type awsRestjson1_serializeOpListTimeSeries struct { +} + +func (*awsRestjson1_serializeOpListTimeSeries) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListTimeSeries) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListTimeSeriesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/timeseries") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListTimeSeriesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListTimeSeriesInput(v *ListTimeSeriesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AliasPrefix != nil { + encoder.SetQuery("aliasPrefix").String(*v.AliasPrefix) + } + + if v.AssetId != nil { + encoder.SetQuery("assetId").String(*v.AssetId) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if len(v.TimeSeriesType) > 0 { + encoder.SetQuery("timeSeriesType").String(string(v.TimeSeriesType)) + } + + return nil +} + type awsRestjson1_serializeOpPutDefaultEncryptionConfiguration struct { } @@ -3467,6 +3849,11 @@ func awsRestjson1_serializeOpDocumentPutStorageConfigurationInput(v *PutStorageC object := value.Object() defer object.Close() + if len(v.DisassociatedDataStorage) > 0 { + ok := object.Key("disassociatedDataStorage") + ok.String(string(v.DisassociatedDataStorage)) + } + if v.MultiLayerStorage != nil { ok := object.Key("multiLayerStorage") if err := awsRestjson1_serializeDocumentMultiLayerStorage(v.MultiLayerStorage, ok); err != nil { @@ -3474,6 +3861,13 @@ func awsRestjson1_serializeOpDocumentPutStorageConfigurationInput(v *PutStorageC } } + if v.RetentionPeriod != nil { + ok := object.Key("retentionPeriod") + if err := awsRestjson1_serializeDocumentRetentionPeriod(v.RetentionPeriod, ok); err != nil { + return err + } + } + if len(v.StorageType) > 0 { ok := object.Key("storageType") ok.String(string(v.StorageType)) @@ -5271,6 +5665,23 @@ func awsRestjson1_serializeDocumentResource(v *types.Resource, value smithyjson. return nil } +func awsRestjson1_serializeDocumentRetentionPeriod(v *types.RetentionPeriod, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.NumberOfDays != nil { + ok := object.Key("numberOfDays") + ok.Integer(*v.NumberOfDays) + } + + if v.Unlimited != nil { + ok := object.Key("unlimited") + ok.Boolean(*v.Unlimited) + } + + return nil +} + func awsRestjson1_serializeDocumentTagMap(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/iotsitewise/types/enums.go b/service/iotsitewise/types/enums.go index e42c2410f42..9f258be4f8f 100644 --- a/service/iotsitewise/types/enums.go +++ b/service/iotsitewise/types/enums.go @@ -239,6 +239,25 @@ func (DetailedErrorCode) Values() []DetailedErrorCode { } } +type DisassociatedDataStorageState string + +// Enum values for DisassociatedDataStorageState +const ( + DisassociatedDataStorageStateEnabled DisassociatedDataStorageState = "ENABLED" + DisassociatedDataStorageStateDisabled DisassociatedDataStorageState = "DISABLED" +) + +// Values returns all known values for DisassociatedDataStorageState. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. The ordering of this slice is not guaranteed to be stable across +// updates. +func (DisassociatedDataStorageState) Values() []DisassociatedDataStorageState { + return []DisassociatedDataStorageState{ + "ENABLED", + "DISABLED", + } +} + type EncryptionType string // Enum values for EncryptionType @@ -347,6 +366,24 @@ func (ListAssetsFilter) Values() []ListAssetsFilter { } } +type ListTimeSeriesType string + +// Enum values for ListTimeSeriesType +const ( + ListTimeSeriesTypeAssociated ListTimeSeriesType = "ASSOCIATED" + ListTimeSeriesTypeDisassociated ListTimeSeriesType = "DISASSOCIATED" +) + +// Values returns all known values for ListTimeSeriesType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ListTimeSeriesType) Values() []ListTimeSeriesType { + return []ListTimeSeriesType{ + "ASSOCIATED", + "DISASSOCIATED", + } +} + type LoggingLevel string // Enum values for LoggingLevel diff --git a/service/iotsitewise/types/types.go b/service/iotsitewise/types/types.go index f67436e6da4..d4e171999a0 100644 --- a/service/iotsitewise/types/types.go +++ b/service/iotsitewise/types/types.go @@ -1443,6 +1443,21 @@ type Resource struct { noSmithyDocumentSerde } +// How many days your data is kept in the hot tier. By default, your data is kept +// indefinitely in the hot tier. +type RetentionPeriod struct { + + // The number of days that your data is kept. If you specified a value for this + // parameter, the unlimited parameter must be false. + NumberOfDays *int32 + + // If true, your data is kept indefinitely. If configured to true, you must not + // specify a value for the numberOfDays parameter. + Unlimited *bool + + noSmithyDocumentSerde +} + // Contains a timestamp with optional nanosecond granularity. type TimeInNanos struct { @@ -1458,6 +1473,49 @@ type TimeInNanos struct { noSmithyDocumentSerde } +// Contains a summary of a time series (data stream). +type TimeSeriesSummary struct { + + // The data type of the time series. If you specify STRUCT, you must also specify + // dataTypeSpec to identify the type of the structure for this time series. + // + // This member is required. + DataType PropertyDataType + + // The date that the time series was created, in Unix epoch time. + // + // This member is required. + TimeSeriesCreationDate *time.Time + + // The ID of the time series. + // + // This member is required. + TimeSeriesId *string + + // The date that the time series was last updated, in Unix epoch time. + // + // This member is required. + TimeSeriesLastUpdateDate *time.Time + + // The alias that identifies the time series. + Alias *string + + // The ID of the asset in which the asset property was created. + AssetId *string + + // The data type of the structure for this time series. This parameter is required + // for time series that have the STRUCT data type. The options for this parameter + // depend on the type of the composite model in which you created the asset + // property that is associated with your time series. Use AWS/ALARM_STATE for alarm + // state in alarm composite models. + DataTypeSpec *string + + // The ID of the asset property. + PropertyId *string + + noSmithyDocumentSerde +} + // Contains an asset transform property. A transform is a one-to-one mapping of a // property's data points from one form to another. For example, you can use a // transform to convert a Celsius data stream to Fahrenheit by applying the @@ -1507,13 +1565,13 @@ type TransformProcessingConfig struct { } // Contains a tumbling window, which is a repeating fixed-sized, non-overlapping, -// and contiguous time window. You use this window in metrics to aggregate data +// and contiguous time window. You can use this window in metrics to aggregate data // from properties and other assets. You can use m, h, d, and w when you specify an -// interval or offset. Note that m represents minutes, and w represents weeks. You -// can also use s to represent seconds in offset. The interval and offset -// parameters support the ISO 8601 format (https://en.wikipedia.org/wiki/ISO_8601). -// For example, PT5S represents five seconds, PT5M represents five minutes, and -// PT5H represents five hours. +// interval or offset. Note that m represents minutes, h represents hours, d +// represents days, and w represents weeks. You can also use s to represent seconds +// in offset. The interval and offset parameters support the ISO 8601 format +// (https://en.wikipedia.org/wiki/ISO_8601). For example, PT5S represents 5 +// seconds, PT5M represents 5 minutes, and PT5H represents 5 hours. type TumblingWindow struct { // The time interval for the tumbling window. The interval time must be between 1 @@ -1534,27 +1592,27 @@ type TumblingWindow struct { // for interval, IoT SiteWise aggregates data in one of the following ways: // // * If - // you create the metric before or at 6:00 PM (UTC), you get the first aggregation + // you create the metric before or at 6 PM (UTC), you get the first aggregation // result at 6 PM (UTC) on the day when you create the metric. // // * If you create the - // metric after 6:00 PM (UTC), you get the first aggregation result at 6 PM (UTC) - // the next day. + // metric after 6 PM (UTC), you get the first aggregation result at 6 PM (UTC) the + // next day. // - // * The ISO 8601 format. For example, if you specify PT18H for - // offset and 1d for interval, IoT SiteWise aggregates data in one of the following + // * The ISO 8601 format. For example, if you specify PT18H for offset + // and 1d for interval, IoT SiteWise aggregates data in one of the following // ways: // - // * If you create the metric before or at 6:00 PM (UTC), you get the first + // * If you create the metric before or at 6 PM (UTC), you get the first // aggregation result at 6 PM (UTC) on the day when you create the metric. // // * If - // you create the metric after 6:00 PM (UTC), you get the first aggregation result - // at 6 PM (UTC) the next day. + // you create the metric after 6 PM (UTC), you get the first aggregation result at + // 6 PM (UTC) the next day. // // * The 24-hour clock. For example, if you specify - // 00:03:00 for offset and 5m for interval, and you create the metric at 2 PM - // (UTC), you get the first aggregation result at 2:03 PM (UTC). You get the second + // 00:03:00 for offset, 5m for interval, and you create the metric at 2 PM (UTC), + // you get the first aggregation result at 2:03 PM (UTC). You get the second // aggregation result at 2:08 PM (UTC). // // * The offset time zone. For example, if @@ -1562,11 +1620,11 @@ type TumblingWindow struct { // aggregates data in one of the following ways: // // * If you create the metric before - // or at 6:00 PM (PST), you get the first aggregation result at 6 PM (PST) on the - // day when you create the metric. + // or at 6 PM (PST), you get the first aggregation result at 6 PM (PST) on the day + // when you create the metric. // - // * If you create the metric after 6:00 PM (PST), - // you get the first aggregation result at 6 PM (PST) the next day. + // * If you create the metric after 6 PM (PST), you + // get the first aggregation result at 6 PM (PST) the next day. Offset *string noSmithyDocumentSerde diff --git a/service/iotsitewise/validators.go b/service/iotsitewise/validators.go index 4f4e3c9cd98..ceee4bf73b8 100644 --- a/service/iotsitewise/validators.go +++ b/service/iotsitewise/validators.go @@ -30,6 +30,26 @@ func (m *validateOpAssociateAssets) HandleInitialize(ctx context.Context, in mid return next.HandleInitialize(ctx, in) } +type validateOpAssociateTimeSeriesToAssetProperty struct { +} + +func (*validateOpAssociateTimeSeriesToAssetProperty) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAssociateTimeSeriesToAssetProperty) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AssociateTimeSeriesToAssetPropertyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAssociateTimeSeriesToAssetPropertyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpBatchAssociateProjectAssets struct { } @@ -570,6 +590,26 @@ func (m *validateOpDisassociateAssets) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpDisassociateTimeSeriesFromAssetProperty struct { +} + +func (*validateOpDisassociateTimeSeriesFromAssetProperty) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDisassociateTimeSeriesFromAssetProperty) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DisassociateTimeSeriesFromAssetPropertyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDisassociateTimeSeriesFromAssetPropertyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetAssetPropertyAggregates struct { } @@ -1014,6 +1054,10 @@ func addOpAssociateAssetsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAssociateAssets{}, middleware.After) } +func addOpAssociateTimeSeriesToAssetPropertyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssociateTimeSeriesToAssetProperty{}, middleware.After) +} + func addOpBatchAssociateProjectAssetsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpBatchAssociateProjectAssets{}, middleware.After) } @@ -1122,6 +1166,10 @@ func addOpDisassociateAssetsValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpDisassociateAssets{}, middleware.After) } +func addOpDisassociateTimeSeriesFromAssetPropertyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDisassociateTimeSeriesFromAssetProperty{}, middleware.After) +} + func addOpGetAssetPropertyAggregatesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetAssetPropertyAggregates{}, middleware.After) } @@ -2116,6 +2164,27 @@ func validateOpAssociateAssetsInput(v *AssociateAssetsInput) error { } } +func validateOpAssociateTimeSeriesToAssetPropertyInput(v *AssociateTimeSeriesToAssetPropertyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociateTimeSeriesToAssetPropertyInput"} + if v.Alias == nil { + invalidParams.Add(smithy.NewErrParamRequired("Alias")) + } + if v.AssetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AssetId")) + } + if v.PropertyId == nil { + invalidParams.Add(smithy.NewErrParamRequired("PropertyId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpBatchAssociateProjectAssetsInput(v *BatchAssociateProjectAssetsInput) error { if v == nil { return nil @@ -2607,6 +2676,27 @@ func validateOpDisassociateAssetsInput(v *DisassociateAssetsInput) error { } } +func validateOpDisassociateTimeSeriesFromAssetPropertyInput(v *DisassociateTimeSeriesFromAssetPropertyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DisassociateTimeSeriesFromAssetPropertyInput"} + if v.Alias == nil { + invalidParams.Add(smithy.NewErrParamRequired("Alias")) + } + if v.AssetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AssetId")) + } + if v.PropertyId == nil { + invalidParams.Add(smithy.NewErrParamRequired("PropertyId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetAssetPropertyAggregatesInput(v *GetAssetPropertyAggregatesInput) error { if v == nil { return nil diff --git a/service/iotwireless/api_op_GetNetworkAnalyzerConfiguration.go b/service/iotwireless/api_op_GetNetworkAnalyzerConfiguration.go new file mode 100644 index 00000000000..9e5b919a832 --- /dev/null +++ b/service/iotwireless/api_op_GetNetworkAnalyzerConfiguration.go @@ -0,0 +1,127 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iotwireless + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/iotwireless/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Get NetworkAnalyzer configuration. +func (c *Client) GetNetworkAnalyzerConfiguration(ctx context.Context, params *GetNetworkAnalyzerConfigurationInput, optFns ...func(*Options)) (*GetNetworkAnalyzerConfigurationOutput, error) { + if params == nil { + params = &GetNetworkAnalyzerConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetNetworkAnalyzerConfiguration", params, optFns, c.addOperationGetNetworkAnalyzerConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetNetworkAnalyzerConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetNetworkAnalyzerConfigurationInput struct { + + // NetworkAnalyzer configuration name. + // + // This member is required. + ConfigurationName *string + + noSmithyDocumentSerde +} + +type GetNetworkAnalyzerConfigurationOutput struct { + + // Trace Content for resources. + TraceContent *types.TraceContent + + // List of WirelessDevices in the NetworkAnalyzerConfiguration. + WirelessDevices []string + + // List of WirelessGateways in the NetworkAnalyzerConfiguration. + WirelessGateways []string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetNetworkAnalyzerConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetNetworkAnalyzerConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetNetworkAnalyzerConfiguration{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetNetworkAnalyzerConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetNetworkAnalyzerConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetNetworkAnalyzerConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "iotwireless", + OperationName: "GetNetworkAnalyzerConfiguration", + } +} diff --git a/service/iotwireless/api_op_UpdateNetworkAnalyzerConfiguration.go b/service/iotwireless/api_op_UpdateNetworkAnalyzerConfiguration.go new file mode 100644 index 00000000000..b0541833aaa --- /dev/null +++ b/service/iotwireless/api_op_UpdateNetworkAnalyzerConfiguration.go @@ -0,0 +1,132 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package iotwireless + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/iotwireless/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Update NetworkAnalyzer configuration. +func (c *Client) UpdateNetworkAnalyzerConfiguration(ctx context.Context, params *UpdateNetworkAnalyzerConfigurationInput, optFns ...func(*Options)) (*UpdateNetworkAnalyzerConfigurationOutput, error) { + if params == nil { + params = &UpdateNetworkAnalyzerConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateNetworkAnalyzerConfiguration", params, optFns, c.addOperationUpdateNetworkAnalyzerConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateNetworkAnalyzerConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateNetworkAnalyzerConfigurationInput struct { + + // NetworkAnalyzer configuration name. + // + // This member is required. + ConfigurationName *string + + // Trace Content for resources. + TraceContent *types.TraceContent + + // WirelessDevices to add into NetworkAnalyzerConfiguration. + WirelessDevicesToAdd []string + + // WirelessDevices to remove from NetworkAnalyzerConfiguration. + WirelessDevicesToRemove []string + + // WirelessGateways to add into NetworkAnalyzerConfiguration. + WirelessGatewaysToAdd []string + + // WirelessGateways to remove from NetworkAnalyzerConfiguration. + WirelessGatewaysToRemove []string + + noSmithyDocumentSerde +} + +type UpdateNetworkAnalyzerConfigurationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateNetworkAnalyzerConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateNetworkAnalyzerConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateNetworkAnalyzerConfiguration{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateNetworkAnalyzerConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateNetworkAnalyzerConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateNetworkAnalyzerConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "iotwireless", + OperationName: "UpdateNetworkAnalyzerConfiguration", + } +} diff --git a/service/iotwireless/deserializers.go b/service/iotwireless/deserializers.go index 01c0f928e68..67e70aa1bf1 100644 --- a/service/iotwireless/deserializers.go +++ b/service/iotwireless/deserializers.go @@ -5233,6 +5233,175 @@ func awsRestjson1_deserializeOpDocumentGetMulticastGroupSessionOutput(v **GetMul return nil } +type awsRestjson1_deserializeOpGetNetworkAnalyzerConfiguration struct { +} + +func (*awsRestjson1_deserializeOpGetNetworkAnalyzerConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetNetworkAnalyzerConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetNetworkAnalyzerConfiguration(response, &metadata) + } + output := &GetNetworkAnalyzerConfigurationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetNetworkAnalyzerConfigurationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetNetworkAnalyzerConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetNetworkAnalyzerConfigurationOutput(v **GetNetworkAnalyzerConfigurationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetNetworkAnalyzerConfigurationOutput + if *v == nil { + sv = &GetNetworkAnalyzerConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "TraceContent": + if err := awsRestjson1_deserializeDocumentTraceContent(&sv.TraceContent, value); err != nil { + return err + } + + case "WirelessDevices": + if err := awsRestjson1_deserializeDocumentWirelessDeviceList(&sv.WirelessDevices, value); err != nil { + return err + } + + case "WirelessGateways": + if err := awsRestjson1_deserializeDocumentWirelessGatewayList(&sv.WirelessGateways, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpGetPartnerAccount struct { } @@ -11168,6 +11337,101 @@ func awsRestjson1_deserializeOpErrorUpdateMulticastGroup(response *smithyhttp.Re } } +type awsRestjson1_deserializeOpUpdateNetworkAnalyzerConfiguration struct { +} + +func (*awsRestjson1_deserializeOpUpdateNetworkAnalyzerConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateNetworkAnalyzerConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateNetworkAnalyzerConfiguration(response, &metadata) + } + output := &UpdateNetworkAnalyzerConfigurationOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateNetworkAnalyzerConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpUpdatePartnerAccount struct { } @@ -15149,6 +15413,55 @@ func awsRestjson1_deserializeDocumentTooManyTagsException(v **types.TooManyTagsE return nil } +func awsRestjson1_deserializeDocumentTraceContent(v **types.TraceContent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.TraceContent + if *v == nil { + sv = &types.TraceContent{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LogLevel": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogLevel to be of type string, got %T instead", value) + } + sv.LogLevel = types.LogLevel(jtv) + } + + case "WirelessDeviceFrameInfo": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WirelessDeviceFrameInfo to be of type string, got %T instead", value) + } + sv.WirelessDeviceFrameInfo = types.WirelessDeviceFrameInfo(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentUpdateWirelessGatewayTaskCreate(v **types.UpdateWirelessGatewayTaskCreate, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -15380,6 +15693,42 @@ func awsRestjson1_deserializeDocumentWirelessDeviceEventLogOptionList(v *[]types return nil } +func awsRestjson1_deserializeDocumentWirelessDeviceList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WirelessDeviceId to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentWirelessDeviceLogOption(v **types.WirelessDeviceLogOption, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -15711,6 +16060,42 @@ func awsRestjson1_deserializeDocumentWirelessGatewayEventLogOptionList(v *[]type return nil } +func awsRestjson1_deserializeDocumentWirelessGatewayList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WirelessGatewayId to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentWirelessGatewayLogOption(v **types.WirelessGatewayLogOption, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/iotwireless/generated.json b/service/iotwireless/generated.json index 3904a307e68..34bbcc2ed5f 100644 --- a/service/iotwireless/generated.json +++ b/service/iotwireless/generated.json @@ -46,6 +46,7 @@ "api_op_GetLogLevelsByResourceTypes.go", "api_op_GetMulticastGroup.go", "api_op_GetMulticastGroupSession.go", + "api_op_GetNetworkAnalyzerConfiguration.go", "api_op_GetPartnerAccount.go", "api_op_GetResourceEventConfiguration.go", "api_op_GetResourceLogLevel.go", @@ -86,6 +87,7 @@ "api_op_UpdateFuotaTask.go", "api_op_UpdateLogLevelsByResourceTypes.go", "api_op_UpdateMulticastGroup.go", + "api_op_UpdateNetworkAnalyzerConfiguration.go", "api_op_UpdatePartnerAccount.go", "api_op_UpdateResourceEventConfiguration.go", "api_op_UpdateWirelessDevice.go", diff --git a/service/iotwireless/internal/endpoints/endpoints.go b/service/iotwireless/internal/endpoints/endpoints.go index a112dcf862c..13b7ac1700a 100644 --- a/service/iotwireless/internal/endpoints/endpoints.go +++ b/service/iotwireless/internal/endpoints/endpoints.go @@ -134,6 +134,48 @@ var defaultPartitions = endpoints.Partitions{ }, RegionRegex: partitionRegexp.Aws, IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "ap-northeast-1", + }: endpoints.Endpoint{ + Hostname: "api.iotwireless.ap-northeast-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ap-northeast-1", + }, + }, + endpoints.EndpointKey{ + Region: "ap-southeast-2", + }: endpoints.Endpoint{ + Hostname: "api.iotwireless.ap-southeast-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ap-southeast-2", + }, + }, + endpoints.EndpointKey{ + Region: "eu-west-1", + }: endpoints.Endpoint{ + Hostname: "api.iotwireless.eu-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "eu-west-1", + }, + }, + endpoints.EndpointKey{ + Region: "us-east-1", + }: endpoints.Endpoint{ + Hostname: "api.iotwireless.us-east-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-1", + }, + }, + endpoints.EndpointKey{ + Region: "us-west-2", + }: endpoints.Endpoint{ + Hostname: "api.iotwireless.us-west-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-west-2", + }, + }, + }, }, { ID: "aws-cn", diff --git a/service/iotwireless/serializers.go b/service/iotwireless/serializers.go index ebd669f11f5..eb95e507fa7 100644 --- a/service/iotwireless/serializers.go +++ b/service/iotwireless/serializers.go @@ -2770,6 +2770,64 @@ func awsRestjson1_serializeOpHttpBindingsGetMulticastGroupSessionInput(v *GetMul return nil } +type awsRestjson1_serializeOpGetNetworkAnalyzerConfiguration struct { +} + +func (*awsRestjson1_serializeOpGetNetworkAnalyzerConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetNetworkAnalyzerConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetNetworkAnalyzerConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/network-analyzer-configurations/{ConfigurationName}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetNetworkAnalyzerConfigurationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetNetworkAnalyzerConfigurationInput(v *GetNetworkAnalyzerConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ConfigurationName == nil || len(*v.ConfigurationName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ConfigurationName must not be empty")} + } + if v.ConfigurationName != nil { + if err := encoder.SetURI("ConfigurationName").String(*v.ConfigurationName); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpGetPartnerAccount struct { } @@ -5487,6 +5545,117 @@ func awsRestjson1_serializeOpDocumentUpdateMulticastGroupInput(v *UpdateMulticas return nil } +type awsRestjson1_serializeOpUpdateNetworkAnalyzerConfiguration struct { +} + +func (*awsRestjson1_serializeOpUpdateNetworkAnalyzerConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateNetworkAnalyzerConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateNetworkAnalyzerConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/network-analyzer-configurations/{ConfigurationName}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PATCH" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateNetworkAnalyzerConfigurationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateNetworkAnalyzerConfigurationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateNetworkAnalyzerConfigurationInput(v *UpdateNetworkAnalyzerConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ConfigurationName == nil || len(*v.ConfigurationName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ConfigurationName must not be empty")} + } + if v.ConfigurationName != nil { + if err := encoder.SetURI("ConfigurationName").String(*v.ConfigurationName); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateNetworkAnalyzerConfigurationInput(v *UpdateNetworkAnalyzerConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TraceContent != nil { + ok := object.Key("TraceContent") + if err := awsRestjson1_serializeDocumentTraceContent(v.TraceContent, ok); err != nil { + return err + } + } + + if v.WirelessDevicesToAdd != nil { + ok := object.Key("WirelessDevicesToAdd") + if err := awsRestjson1_serializeDocumentWirelessDeviceList(v.WirelessDevicesToAdd, ok); err != nil { + return err + } + } + + if v.WirelessDevicesToRemove != nil { + ok := object.Key("WirelessDevicesToRemove") + if err := awsRestjson1_serializeDocumentWirelessDeviceList(v.WirelessDevicesToRemove, ok); err != nil { + return err + } + } + + if v.WirelessGatewaysToAdd != nil { + ok := object.Key("WirelessGatewaysToAdd") + if err := awsRestjson1_serializeDocumentWirelessGatewayList(v.WirelessGatewaysToAdd, ok); err != nil { + return err + } + } + + if v.WirelessGatewaysToRemove != nil { + ok := object.Key("WirelessGatewaysToRemove") + if err := awsRestjson1_serializeDocumentWirelessGatewayList(v.WirelessGatewaysToRemove, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpUpdatePartnerAccount struct { } @@ -6581,6 +6750,23 @@ func awsRestjson1_serializeDocumentTagList(v []types.Tag, value smithyjson.Value return nil } +func awsRestjson1_serializeDocumentTraceContent(v *types.TraceContent, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.LogLevel) > 0 { + ok := object.Key("LogLevel") + ok.String(string(v.LogLevel)) + } + + if len(v.WirelessDeviceFrameInfo) > 0 { + ok := object.Key("WirelessDeviceFrameInfo") + ok.String(string(v.WirelessDeviceFrameInfo)) + } + + return nil +} + func awsRestjson1_serializeDocumentUpdateWirelessGatewayTaskCreate(v *types.UpdateWirelessGatewayTaskCreate, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -6635,6 +6821,17 @@ func awsRestjson1_serializeDocumentWirelessDeviceEventLogOptionList(v []types.Wi return nil } +func awsRestjson1_serializeDocumentWirelessDeviceList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsRestjson1_serializeDocumentWirelessDeviceLogOption(v *types.WirelessDeviceLogOption, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -6702,6 +6899,17 @@ func awsRestjson1_serializeDocumentWirelessGatewayEventLogOptionList(v []types.W return nil } +func awsRestjson1_serializeDocumentWirelessGatewayList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsRestjson1_serializeDocumentWirelessGatewayLogOption(v *types.WirelessGatewayLogOption, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/iotwireless/types/enums.go b/service/iotwireless/types/enums.go index 5f09a54aa2e..3243efd4d00 100644 --- a/service/iotwireless/types/enums.go +++ b/service/iotwireless/types/enums.go @@ -354,6 +354,24 @@ func (WirelessDeviceEvent) Values() []WirelessDeviceEvent { } } +type WirelessDeviceFrameInfo string + +// Enum values for WirelessDeviceFrameInfo +const ( + WirelessDeviceFrameInfoEnabled WirelessDeviceFrameInfo = "ENABLED" + WirelessDeviceFrameInfoDisabled WirelessDeviceFrameInfo = "DISABLED" +) + +// Values returns all known values for WirelessDeviceFrameInfo. Note that this can +// be expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (WirelessDeviceFrameInfo) Values() []WirelessDeviceFrameInfo { + return []WirelessDeviceFrameInfo{ + "ENABLED", + "DISABLED", + } +} + type WirelessDeviceIdType string // Enum values for WirelessDeviceIdType diff --git a/service/iotwireless/types/types.go b/service/iotwireless/types/types.go index 3d6195d85df..6dbec49b4e2 100644 --- a/service/iotwireless/types/types.go +++ b/service/iotwireless/types/types.go @@ -772,6 +772,18 @@ type Tag struct { noSmithyDocumentSerde } +// Trace Content for resources. +type TraceContent struct { + + // The log level for a log message. + LogLevel LogLevel + + // WirelessDevice FrameInfo for trace content. + WirelessDeviceFrameInfo WirelessDeviceFrameInfo + + noSmithyDocumentSerde +} + // UpdateWirelessGatewayTaskCreate object. type UpdateWirelessGatewayTaskCreate struct { diff --git a/service/iotwireless/validators.go b/service/iotwireless/validators.go index 9361df75db4..4b967194f55 100644 --- a/service/iotwireless/validators.go +++ b/service/iotwireless/validators.go @@ -770,6 +770,26 @@ func (m *validateOpGetMulticastGroupSession) HandleInitialize(ctx context.Contex return next.HandleInitialize(ctx, in) } +type validateOpGetNetworkAnalyzerConfiguration struct { +} + +func (*validateOpGetNetworkAnalyzerConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetNetworkAnalyzerConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetNetworkAnalyzerConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetNetworkAnalyzerConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetPartnerAccount struct { } @@ -1350,6 +1370,26 @@ func (m *validateOpUpdateMulticastGroup) HandleInitialize(ctx context.Context, i return next.HandleInitialize(ctx, in) } +type validateOpUpdateNetworkAnalyzerConfiguration struct { +} + +func (*validateOpUpdateNetworkAnalyzerConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateNetworkAnalyzerConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateNetworkAnalyzerConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateNetworkAnalyzerConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdatePartnerAccount struct { } @@ -1582,6 +1622,10 @@ func addOpGetMulticastGroupSessionValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpGetMulticastGroupSession{}, middleware.After) } +func addOpGetNetworkAnalyzerConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetNetworkAnalyzerConfiguration{}, middleware.After) +} + func addOpGetPartnerAccountValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetPartnerAccount{}, middleware.After) } @@ -1698,6 +1742,10 @@ func addOpUpdateMulticastGroupValidationMiddleware(stack *middleware.Stack) erro return stack.Initialize.Add(&validateOpUpdateMulticastGroup{}, middleware.After) } +func addOpUpdateNetworkAnalyzerConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateNetworkAnalyzerConfiguration{}, middleware.After) +} + func addOpUpdatePartnerAccountValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdatePartnerAccount{}, middleware.After) } @@ -2553,6 +2601,21 @@ func validateOpGetMulticastGroupSessionInput(v *GetMulticastGroupSessionInput) e } } +func validateOpGetNetworkAnalyzerConfigurationInput(v *GetNetworkAnalyzerConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetNetworkAnalyzerConfigurationInput"} + if v.ConfigurationName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConfigurationName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetPartnerAccountInput(v *GetPartnerAccountInput) error { if v == nil { return nil @@ -3054,6 +3117,21 @@ func validateOpUpdateMulticastGroupInput(v *UpdateMulticastGroupInput) error { } } +func validateOpUpdateNetworkAnalyzerConfigurationInput(v *UpdateNetworkAnalyzerConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateNetworkAnalyzerConfigurationInput"} + if v.ConfigurationName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConfigurationName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdatePartnerAccountInput(v *UpdatePartnerAccountInput) error { if v == nil { return nil diff --git a/service/lambda/api_op_CreateEventSourceMapping.go b/service/lambda/api_op_CreateEventSourceMapping.go index 1ff68526531..82eb996df39 100644 --- a/service/lambda/api_op_CreateEventSourceMapping.go +++ b/service/lambda/api_op_CreateEventSourceMapping.go @@ -142,6 +142,9 @@ type CreateEventSourceMappingInput struct { // // * // Self-Managed Apache Kafka - Default 100. Max 10,000. + // + // * Amazon MQ (ActiveMQ and + // RabbitMQ) - Default 100. Max 10,000. BatchSize *int32 // (Streams only) If the function returns an error, split the batch in two and @@ -170,8 +173,14 @@ type CreateEventSourceMappingInput struct { // Managed Streaming for Apache Kafka - The ARN of the cluster. EventSourceArn *string - // (Streams only) A list of current response type enums applied to the event source - // mapping. + // (Streams and Amazon SQS) An object that defines the filter criteria that + // determine whether Lambda should process an event. For more information, see + // Lambda event filtering + // (https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html). + FilterCriteria *types.FilterCriteria + + // (Streams and Amazon SQS) A list of current response type enums applied to the + // event source mapping. FunctionResponseTypes []types.FunctionResponseType // (Streams and Amazon SQS standard queues) The maximum amount of time, in seconds, @@ -244,6 +253,12 @@ type CreateEventSourceMappingOutput struct { // The Amazon Resource Name (ARN) of the event source. EventSourceArn *string + // (Streams and Amazon SQS) An object that defines the filter criteria that + // determine whether Lambda should process an event. For more information, see + // Lambda event filtering + // (https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html). + FilterCriteria *types.FilterCriteria + // The ARN of the Lambda function. FunctionArn *string diff --git a/service/lambda/api_op_CreateFunction.go b/service/lambda/api_op_CreateFunction.go index ca73a1ed5ef..bfe15386fa6 100644 --- a/service/lambda/api_op_CreateFunction.go +++ b/service/lambda/api_op_CreateFunction.go @@ -107,7 +107,8 @@ type CreateFunctionInput struct { Role *string // The instruction set architecture that the function supports. Enter a string - // array with one of the valid values. The default value is x86_64. + // array with one of the valid values (arm64 or x86_64). The default value is + // x86_64. Architectures []types.Architecture // To enable code signing for this function, specify the ARN of a code-signing @@ -131,10 +132,10 @@ type CreateFunctionInput struct { FileSystemConfigs []types.FileSystemConfig // The name of the method within your code that Lambda calls to execute your - // function. The format includes the file name. It can also include namespaces and - // other qualifiers, depending on the runtime. For more information, see - // Programming Model - // (https://docs.aws.amazon.com/lambda/latest/dg/programming-model-v2.html). + // function. Handler is required if the deployment package is a .zip file archive. + // The format includes the file name. It can also include namespaces and other + // qualifiers, depending on the runtime. For more information, see Programming + // Model (https://docs.aws.amazon.com/lambda/latest/dg/programming-model-v2.html). Handler *string // Container image configuration values @@ -167,7 +168,8 @@ type CreateFunctionInput struct { Publish bool // The identifier of the function's runtime - // (https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html). + // (https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html). Runtime is + // required if the deployment package is a .zip file archive. Runtime types.Runtime // A list of tags (https://docs.aws.amazon.com/lambda/latest/dg/tagging.html) to diff --git a/service/lambda/api_op_DeleteEventSourceMapping.go b/service/lambda/api_op_DeleteEventSourceMapping.go index 23eda5c7f44..b0bc7446c13 100644 --- a/service/lambda/api_op_DeleteEventSourceMapping.go +++ b/service/lambda/api_op_DeleteEventSourceMapping.go @@ -66,6 +66,12 @@ type DeleteEventSourceMappingOutput struct { // The Amazon Resource Name (ARN) of the event source. EventSourceArn *string + // (Streams and Amazon SQS) An object that defines the filter criteria that + // determine whether Lambda should process an event. For more information, see + // Lambda event filtering + // (https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html). + FilterCriteria *types.FilterCriteria + // The ARN of the Lambda function. FunctionArn *string diff --git a/service/lambda/api_op_GetEventSourceMapping.go b/service/lambda/api_op_GetEventSourceMapping.go index ed4886e8a73..a4ae7934aa6 100644 --- a/service/lambda/api_op_GetEventSourceMapping.go +++ b/service/lambda/api_op_GetEventSourceMapping.go @@ -63,6 +63,12 @@ type GetEventSourceMappingOutput struct { // The Amazon Resource Name (ARN) of the event source. EventSourceArn *string + // (Streams and Amazon SQS) An object that defines the filter criteria that + // determine whether Lambda should process an event. For more information, see + // Lambda event filtering + // (https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html). + FilterCriteria *types.FilterCriteria + // The ARN of the Lambda function. FunctionArn *string diff --git a/service/lambda/api_op_Invoke.go b/service/lambda/api_op_Invoke.go index d7b155225d2..4249e560412 100644 --- a/service/lambda/api_op_Invoke.go +++ b/service/lambda/api_op_Invoke.go @@ -105,7 +105,9 @@ type InvokeInput struct { // synchronously invoked functions only. LogType types.LogType - // The JSON that you want to provide to your Lambda function as input. + // The JSON that you want to provide to your Lambda function as input. You can + // enter the JSON directly. For example, --payload '{ "key": "value" }'. You can + // also specify a file path. For example, --payload file://payload.json. Payload []byte // Specify a version or alias to invoke a published version of the function. diff --git a/service/lambda/api_op_ListFunctionUrlConfigs.go b/service/lambda/api_op_ListFunctionUrlConfigs.go deleted file mode 100644 index 77b4b16884d..00000000000 --- a/service/lambda/api_op_ListFunctionUrlConfigs.go +++ /dev/null @@ -1,211 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package lambda - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" - "github.com/aws/aws-sdk-go-v2/service/lambda/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -func (c *Client) ListFunctionUrlConfigs(ctx context.Context, params *ListFunctionUrlConfigsInput, optFns ...func(*Options)) (*ListFunctionUrlConfigsOutput, error) { - if params == nil { - params = &ListFunctionUrlConfigsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListFunctionUrlConfigs", params, optFns, c.addOperationListFunctionUrlConfigsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListFunctionUrlConfigsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListFunctionUrlConfigsInput struct { - - // This member is required. - FunctionName *string - - Marker *string - - MaxItems *int32 - - noSmithyDocumentSerde -} - -type ListFunctionUrlConfigsOutput struct { - - // This member is required. - FunctionUrlConfigs []types.FunctionUrlConfig - - NextMarker *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListFunctionUrlConfigsMiddlewares(stack *middleware.Stack, options Options) (err error) { - err = stack.Serialize.Add(&awsRestjson1_serializeOpListFunctionUrlConfigs{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListFunctionUrlConfigs{}, middleware.After) - if err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { - return err - } - if err = addRetryMiddlewares(stack, options); err != nil { - return err - } - if err = addHTTPSignerV4Middleware(stack, options); err != nil { - return err - } - if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { - return err - } - if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addOpListFunctionUrlConfigsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFunctionUrlConfigs(options.Region), middleware.Before); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - return nil -} - -// ListFunctionUrlConfigsAPIClient is a client that implements the -// ListFunctionUrlConfigs operation. -type ListFunctionUrlConfigsAPIClient interface { - ListFunctionUrlConfigs(context.Context, *ListFunctionUrlConfigsInput, ...func(*Options)) (*ListFunctionUrlConfigsOutput, error) -} - -var _ ListFunctionUrlConfigsAPIClient = (*Client)(nil) - -// ListFunctionUrlConfigsPaginatorOptions is the paginator options for -// ListFunctionUrlConfigs -type ListFunctionUrlConfigsPaginatorOptions struct { - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListFunctionUrlConfigsPaginator is a paginator for ListFunctionUrlConfigs -type ListFunctionUrlConfigsPaginator struct { - options ListFunctionUrlConfigsPaginatorOptions - client ListFunctionUrlConfigsAPIClient - params *ListFunctionUrlConfigsInput - nextToken *string - firstPage bool -} - -// NewListFunctionUrlConfigsPaginator returns a new ListFunctionUrlConfigsPaginator -func NewListFunctionUrlConfigsPaginator(client ListFunctionUrlConfigsAPIClient, params *ListFunctionUrlConfigsInput, optFns ...func(*ListFunctionUrlConfigsPaginatorOptions)) *ListFunctionUrlConfigsPaginator { - if params == nil { - params = &ListFunctionUrlConfigsInput{} - } - - options := ListFunctionUrlConfigsPaginatorOptions{} - if params.MaxItems != nil { - options.Limit = *params.MaxItems - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListFunctionUrlConfigsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListFunctionUrlConfigsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil -} - -// NextPage retrieves the next ListFunctionUrlConfigs page. -func (p *ListFunctionUrlConfigsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListFunctionUrlConfigsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.Marker = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxItems = limit - - result, err := p.client.ListFunctionUrlConfigs(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextMarker - - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opListFunctionUrlConfigs(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - SigningName: "lambda", - OperationName: "ListFunctionUrlConfigs", - } -} diff --git a/service/lambda/api_op_UpdateEventSourceMapping.go b/service/lambda/api_op_UpdateEventSourceMapping.go index d75d8a1b19c..5c9056957e2 100644 --- a/service/lambda/api_op_UpdateEventSourceMapping.go +++ b/service/lambda/api_op_UpdateEventSourceMapping.go @@ -126,6 +126,9 @@ type UpdateEventSourceMappingInput struct { // // * // Self-Managed Apache Kafka - Default 100. Max 10,000. + // + // * Amazon MQ (ActiveMQ and + // RabbitMQ) - Default 100. Max 10,000. BatchSize *int32 // (Streams only) If the function returns an error, split the batch in two and @@ -140,6 +143,12 @@ type UpdateEventSourceMappingInput struct { // and invocation. Default: True Enabled *bool + // (Streams and Amazon SQS) An object that defines the filter criteria that + // determine whether Lambda should process an event. For more information, see + // Lambda event filtering + // (https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html). + FilterCriteria *types.FilterCriteria + // The name of the Lambda function. Name formats // // * Function name - MyFunction. @@ -159,8 +168,8 @@ type UpdateEventSourceMappingInput struct { // in length. FunctionName *string - // (Streams only) A list of current response type enums applied to the event source - // mapping. + // (Streams and Amazon SQS) A list of current response type enums applied to the + // event source mapping. FunctionResponseTypes []types.FunctionResponseType // (Streams and Amazon SQS standard queues) The maximum amount of time, in seconds, @@ -216,6 +225,12 @@ type UpdateEventSourceMappingOutput struct { // The Amazon Resource Name (ARN) of the event source. EventSourceArn *string + // (Streams and Amazon SQS) An object that defines the filter criteria that + // determine whether Lambda should process an event. For more information, see + // Lambda event filtering + // (https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html). + FilterCriteria *types.FilterCriteria + // The ARN of the Lambda function. FunctionArn *string diff --git a/service/lambda/api_op_UpdateFunctionCode.go b/service/lambda/api_op_UpdateFunctionCode.go index 35851f6926f..b1edede7ace 100644 --- a/service/lambda/api_op_UpdateFunctionCode.go +++ b/service/lambda/api_op_UpdateFunctionCode.go @@ -55,7 +55,8 @@ type UpdateFunctionCodeInput struct { FunctionName *string // The instruction set architecture that the function supports. Enter a string - // array with one of the valid values. The default value is x86_64. + // array with one of the valid values (arm64 or x86_64). The default value is + // x86_64. Architectures []types.Architecture // Set to true to validate the request parameters and access permissions without diff --git a/service/lambda/api_op_UpdateFunctionConfiguration.go b/service/lambda/api_op_UpdateFunctionConfiguration.go index 295b799a012..e60f9fca408 100644 --- a/service/lambda/api_op_UpdateFunctionConfiguration.go +++ b/service/lambda/api_op_UpdateFunctionConfiguration.go @@ -75,10 +75,10 @@ type UpdateFunctionConfigurationInput struct { FileSystemConfigs []types.FileSystemConfig // The name of the method within your code that Lambda calls to execute your - // function. The format includes the file name. It can also include namespaces and - // other qualifiers, depending on the runtime. For more information, see - // Programming Model - // (https://docs.aws.amazon.com/lambda/latest/dg/programming-model-v2.html). + // function. Handler is required if the deployment package is a .zip file archive. + // The format includes the file name. It can also include namespaces and other + // qualifiers, depending on the runtime. For more information, see Programming + // Model (https://docs.aws.amazon.com/lambda/latest/dg/programming-model-v2.html). Handler *string // Container image configuration values @@ -112,7 +112,8 @@ type UpdateFunctionConfigurationInput struct { Role *string // The identifier of the function's runtime - // (https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html). + // (https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html). Runtime is + // required if the deployment package is a .zip file archive. Runtime types.Runtime // The amount of time (in seconds) that Lambda allows a function to run before diff --git a/service/lambda/deserializers.go b/service/lambda/deserializers.go index 53d13ac45b7..b70115a0771 100644 --- a/service/lambda/deserializers.go +++ b/service/lambda/deserializers.go @@ -903,6 +903,11 @@ func awsRestjson1_deserializeOpDocumentCreateEventSourceMappingOutput(v **Create sv.EventSourceArn = ptr.String(jtv) } + case "FilterCriteria": + if err := awsRestjson1_deserializeDocumentFilterCriteria(&sv.FilterCriteria, value); err != nil { + return err + } + case "FunctionArn": if value != nil { jtv, ok := value.(string) @@ -1522,201 +1527,6 @@ func awsRestjson1_deserializeOpDocumentCreateFunctionOutput(v **CreateFunctionOu return nil } -type awsRestjson1_deserializeOpCreateFunctionUrlConfig struct { -} - -func (*awsRestjson1_deserializeOpCreateFunctionUrlConfig) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpCreateFunctionUrlConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateFunctionUrlConfig(response, &metadata) - } - output := &CreateFunctionUrlConfigOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentCreateFunctionUrlConfigOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorCreateFunctionUrlConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - code := response.Header.Get("X-Amzn-ErrorType") - if len(code) != 0 { - errorCode = restjson.SanitizeErrorCode(code) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - code, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(code) != 0 { - errorCode = restjson.SanitizeErrorCode(code) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("InvalidParameterValueException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - - case strings.EqualFold("ResourceConflictException", errorCode): - return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceException", errorCode): - return awsRestjson1_deserializeErrorServiceException(response, errorBody) - - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentCreateFunctionUrlConfigOutput(v **CreateFunctionUrlConfigOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *CreateFunctionUrlConfigOutput - if *v == nil { - sv = &CreateFunctionUrlConfigOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AuthorizationType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AuthorizationType to be of type string, got %T instead", value) - } - sv.AuthorizationType = types.AuthorizationType(jtv) - } - - case "Cors": - if err := awsRestjson1_deserializeDocumentCors(&sv.Cors, value); err != nil { - return err - } - - case "CreationTime": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - sv.CreationTime = ptr.String(jtv) - } - - case "FunctionArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) - } - sv.FunctionArn = ptr.String(jtv) - } - - case "FunctionUrl": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected FunctionUrl to be of type string, got %T instead", value) - } - sv.FunctionUrl = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - type awsRestjson1_deserializeOpDeleteAlias struct { } @@ -2088,6 +1898,11 @@ func awsRestjson1_deserializeOpDocumentDeleteEventSourceMappingOutput(v **Delete sv.EventSourceArn = ptr.String(jtv) } + case "FilterCriteria": + if err := awsRestjson1_deserializeDocumentFilterCriteria(&sv.FilterCriteria, value); err != nil { + return err + } + case "FunctionArn": if value != nil { jtv, ok := value.(string) @@ -2680,14 +2495,14 @@ func awsRestjson1_deserializeOpErrorDeleteFunctionEventInvokeConfig(response *sm } } -type awsRestjson1_deserializeOpDeleteFunctionUrlConfig struct { +type awsRestjson1_deserializeOpDeleteLayerVersion struct { } -func (*awsRestjson1_deserializeOpDeleteFunctionUrlConfig) ID() string { +func (*awsRestjson1_deserializeOpDeleteLayerVersion) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteFunctionUrlConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteLayerVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2701,9 +2516,9 @@ func (m *awsRestjson1_deserializeOpDeleteFunctionUrlConfig) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteFunctionUrlConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteLayerVersion(response, &metadata) } - output := &DeleteFunctionUrlConfigOutput{} + output := &DeleteLayerVersionOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -2715,7 +2530,7 @@ func (m *awsRestjson1_deserializeOpDeleteFunctionUrlConfig) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteFunctionUrlConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteLayerVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2756,12 +2571,6 @@ func awsRestjson1_deserializeOpErrorDeleteFunctionUrlConfig(response *smithyhttp } switch { - case strings.EqualFold("ResourceConflictException", errorCode): - return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceException", errorCode): return awsRestjson1_deserializeErrorServiceException(response, errorBody) @@ -2778,14 +2587,14 @@ func awsRestjson1_deserializeOpErrorDeleteFunctionUrlConfig(response *smithyhttp } } -type awsRestjson1_deserializeOpDeleteLayerVersion struct { +type awsRestjson1_deserializeOpDeleteProvisionedConcurrencyConfig struct { } -func (*awsRestjson1_deserializeOpDeleteLayerVersion) ID() string { +func (*awsRestjson1_deserializeOpDeleteProvisionedConcurrencyConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteLayerVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteProvisionedConcurrencyConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2799,9 +2608,9 @@ func (m *awsRestjson1_deserializeOpDeleteLayerVersion) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteLayerVersion(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteProvisionedConcurrencyConfig(response, &metadata) } - output := &DeleteLayerVersionOutput{} + output := &DeleteProvisionedConcurrencyConfigOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -2813,7 +2622,7 @@ func (m *awsRestjson1_deserializeOpDeleteLayerVersion) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteLayerVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteProvisionedConcurrencyConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2854,6 +2663,15 @@ func awsRestjson1_deserializeOpErrorDeleteLayerVersion(response *smithyhttp.Resp } switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceException", errorCode): return awsRestjson1_deserializeErrorServiceException(response, errorBody) @@ -2870,14 +2688,14 @@ func awsRestjson1_deserializeOpErrorDeleteLayerVersion(response *smithyhttp.Resp } } -type awsRestjson1_deserializeOpDeleteProvisionedConcurrencyConfig struct { +type awsRestjson1_deserializeOpGetAccountSettings struct { } -func (*awsRestjson1_deserializeOpDeleteProvisionedConcurrencyConfig) ID() string { +func (*awsRestjson1_deserializeOpGetAccountSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteProvisionedConcurrencyConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetAccountSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2891,21 +2709,43 @@ func (m *awsRestjson1_deserializeOpDeleteProvisionedConcurrencyConfig) HandleDes } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteProvisionedConcurrencyConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetAccountSettings(response, &metadata) } - output := &DeleteProvisionedConcurrencyConfigOutput{} + output := &GetAccountSettingsOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetAccountSettingsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteProvisionedConcurrencyConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetAccountSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2946,131 +2786,8 @@ func awsRestjson1_deserializeOpErrorDeleteProvisionedConcurrencyConfig(response } switch { - case strings.EqualFold("InvalidParameterValueException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - - case strings.EqualFold("ResourceConflictException", errorCode): - return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceException", errorCode): - return awsRestjson1_deserializeErrorServiceException(response, errorBody) - - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestjson1_deserializeOpGetAccountSettings struct { -} - -func (*awsRestjson1_deserializeOpGetAccountSettings) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetAccountSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetAccountSettings(response, &metadata) - } - output := &GetAccountSettingsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetAccountSettingsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetAccountSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - code := response.Header.Get("X-Amzn-ErrorType") - if len(code) != 0 { - errorCode = restjson.SanitizeErrorCode(code) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - code, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(code) != 0 { - errorCode = restjson.SanitizeErrorCode(code) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("ServiceException", errorCode): - return awsRestjson1_deserializeErrorServiceException(response, errorBody) + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -3658,6 +3375,11 @@ func awsRestjson1_deserializeOpDocumentGetEventSourceMappingOutput(v **GetEventS sv.EventSourceArn = ptr.String(jtv) } + case "FilterCriteria": + if err := awsRestjson1_deserializeDocumentFilterCriteria(&sv.FilterCriteria, value); err != nil { + return err + } + case "FunctionArn": if value != nil { jtv, ok := value.(string) @@ -4973,14 +4695,14 @@ func awsRestjson1_deserializeOpDocumentGetFunctionEventInvokeConfigOutput(v **Ge return nil } -type awsRestjson1_deserializeOpGetFunctionUrlConfig struct { +type awsRestjson1_deserializeOpGetLayerVersion struct { } -func (*awsRestjson1_deserializeOpGetFunctionUrlConfig) ID() string { +func (*awsRestjson1_deserializeOpGetLayerVersion) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetFunctionUrlConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetLayerVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4994,9 +4716,9 @@ func (m *awsRestjson1_deserializeOpGetFunctionUrlConfig) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetFunctionUrlConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetLayerVersion(response, &metadata) } - output := &GetFunctionUrlConfigOutput{} + output := &GetLayerVersionOutput{} out.Result = output var buff [1024]byte @@ -5017,7 +4739,7 @@ func (m *awsRestjson1_deserializeOpGetFunctionUrlConfig) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetFunctionUrlConfigOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetLayerVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5030,7 +4752,7 @@ func (m *awsRestjson1_deserializeOpGetFunctionUrlConfig) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetFunctionUrlConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetLayerVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5093,7 +4815,7 @@ func awsRestjson1_deserializeOpErrorGetFunctionUrlConfig(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentGetFunctionUrlConfigOutput(v **GetFunctionUrlConfigOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetLayerVersionOutput(v **GetLayerVersionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5106,63 +4828,86 @@ func awsRestjson1_deserializeOpDocumentGetFunctionUrlConfigOutput(v **GetFunctio return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetFunctionUrlConfigOutput + var sv *GetLayerVersionOutput if *v == nil { - sv = &GetFunctionUrlConfigOutput{} + sv = &GetLayerVersionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AuthorizationType": + case "CompatibleArchitectures": + if err := awsRestjson1_deserializeDocumentCompatibleArchitectures(&sv.CompatibleArchitectures, value); err != nil { + return err + } + + case "CompatibleRuntimes": + if err := awsRestjson1_deserializeDocumentCompatibleRuntimes(&sv.CompatibleRuntimes, value); err != nil { + return err + } + + case "Content": + if err := awsRestjson1_deserializeDocumentLayerVersionContentOutput(&sv.Content, value); err != nil { + return err + } + + case "CreatedDate": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AuthorizationType to be of type string, got %T instead", value) + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) } - sv.AuthorizationType = types.AuthorizationType(jtv) + sv.CreatedDate = ptr.String(jtv) } - case "Cors": - if err := awsRestjson1_deserializeDocumentCors(&sv.Cors, value); err != nil { - return err + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) } - case "CreationTime": + case "LayerArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + return fmt.Errorf("expected LayerArn to be of type string, got %T instead", value) } - sv.CreationTime = ptr.String(jtv) + sv.LayerArn = ptr.String(jtv) } - case "FunctionArn": + case "LayerVersionArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) + return fmt.Errorf("expected LayerVersionArn to be of type string, got %T instead", value) } - sv.FunctionArn = ptr.String(jtv) + sv.LayerVersionArn = ptr.String(jtv) } - case "FunctionUrl": + case "LicenseInfo": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected FunctionUrl to be of type string, got %T instead", value) + return fmt.Errorf("expected LicenseInfo to be of type string, got %T instead", value) } - sv.FunctionUrl = ptr.String(jtv) + sv.LicenseInfo = ptr.String(jtv) } - case "LastModifiedTime": + case "Version": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + return fmt.Errorf("expected LayerVersionNumber to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err } - sv.LastModifiedTime = ptr.String(jtv) + sv.Version = i64 } default: @@ -5174,14 +4919,14 @@ func awsRestjson1_deserializeOpDocumentGetFunctionUrlConfigOutput(v **GetFunctio return nil } -type awsRestjson1_deserializeOpGetLayerVersion struct { +type awsRestjson1_deserializeOpGetLayerVersionByArn struct { } -func (*awsRestjson1_deserializeOpGetLayerVersion) ID() string { +func (*awsRestjson1_deserializeOpGetLayerVersionByArn) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetLayerVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetLayerVersionByArn) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5195,9 +4940,9 @@ func (m *awsRestjson1_deserializeOpGetLayerVersion) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetLayerVersion(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetLayerVersionByArn(response, &metadata) } - output := &GetLayerVersionOutput{} + output := &GetLayerVersionByArnOutput{} out.Result = output var buff [1024]byte @@ -5218,7 +4963,7 @@ func (m *awsRestjson1_deserializeOpGetLayerVersion) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetLayerVersionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetLayerVersionByArnOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5231,7 +4976,7 @@ func (m *awsRestjson1_deserializeOpGetLayerVersion) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetLayerVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetLayerVersionByArn(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5294,7 +5039,7 @@ func awsRestjson1_deserializeOpErrorGetLayerVersion(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpDocumentGetLayerVersionOutput(v **GetLayerVersionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetLayerVersionByArnOutput(v **GetLayerVersionByArnOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5307,9 +5052,9 @@ func awsRestjson1_deserializeOpDocumentGetLayerVersionOutput(v **GetLayerVersion return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetLayerVersionOutput + var sv *GetLayerVersionByArnOutput if *v == nil { - sv = &GetLayerVersionOutput{} + sv = &GetLayerVersionByArnOutput{} } else { sv = *v } @@ -5398,14 +5143,14 @@ func awsRestjson1_deserializeOpDocumentGetLayerVersionOutput(v **GetLayerVersion return nil } -type awsRestjson1_deserializeOpGetLayerVersionByArn struct { +type awsRestjson1_deserializeOpGetLayerVersionPolicy struct { } -func (*awsRestjson1_deserializeOpGetLayerVersionByArn) ID() string { +func (*awsRestjson1_deserializeOpGetLayerVersionPolicy) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetLayerVersionByArn) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetLayerVersionPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5419,9 +5164,9 @@ func (m *awsRestjson1_deserializeOpGetLayerVersionByArn) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetLayerVersionByArn(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetLayerVersionPolicy(response, &metadata) } - output := &GetLayerVersionByArnOutput{} + output := &GetLayerVersionPolicyOutput{} out.Result = output var buff [1024]byte @@ -5442,7 +5187,7 @@ func (m *awsRestjson1_deserializeOpGetLayerVersionByArn) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetLayerVersionByArnOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetLayerVersionPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5455,7 +5200,7 @@ func (m *awsRestjson1_deserializeOpGetLayerVersionByArn) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetLayerVersionByArn(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetLayerVersionPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5518,7 +5263,7 @@ func awsRestjson1_deserializeOpErrorGetLayerVersionByArn(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentGetLayerVersionByArnOutput(v **GetLayerVersionByArnOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetLayerVersionPolicyOutput(v **GetLayerVersionPolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5531,255 +5276,31 @@ func awsRestjson1_deserializeOpDocumentGetLayerVersionByArnOutput(v **GetLayerVe return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetLayerVersionByArnOutput + var sv *GetLayerVersionPolicyOutput if *v == nil { - sv = &GetLayerVersionByArnOutput{} + sv = &GetLayerVersionPolicyOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "CompatibleArchitectures": - if err := awsRestjson1_deserializeDocumentCompatibleArchitectures(&sv.CompatibleArchitectures, value); err != nil { - return err - } - - case "CompatibleRuntimes": - if err := awsRestjson1_deserializeDocumentCompatibleRuntimes(&sv.CompatibleRuntimes, value); err != nil { - return err - } - - case "Content": - if err := awsRestjson1_deserializeDocumentLayerVersionContentOutput(&sv.Content, value); err != nil { - return err - } - - case "CreatedDate": + case "Policy": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.CreatedDate = ptr.String(jtv) + sv.Policy = ptr.String(jtv) } - case "Description": + case "RevisionId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Description to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Description = ptr.String(jtv) - } - - case "LayerArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LayerArn to be of type string, got %T instead", value) - } - sv.LayerArn = ptr.String(jtv) - } - - case "LayerVersionArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LayerVersionArn to be of type string, got %T instead", value) - } - sv.LayerVersionArn = ptr.String(jtv) - } - - case "LicenseInfo": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LicenseInfo to be of type string, got %T instead", value) - } - sv.LicenseInfo = ptr.String(jtv) - } - - case "Version": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected LayerVersionNumber to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.Version = i64 - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetLayerVersionPolicy struct { -} - -func (*awsRestjson1_deserializeOpGetLayerVersionPolicy) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetLayerVersionPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetLayerVersionPolicy(response, &metadata) - } - output := &GetLayerVersionPolicyOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetLayerVersionPolicyOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetLayerVersionPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - code := response.Header.Get("X-Amzn-ErrorType") - if len(code) != 0 { - errorCode = restjson.SanitizeErrorCode(code) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - code, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(code) != 0 { - errorCode = restjson.SanitizeErrorCode(code) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("InvalidParameterValueException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceException", errorCode): - return awsRestjson1_deserializeErrorServiceException(response, errorBody) - - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetLayerVersionPolicyOutput(v **GetLayerVersionPolicyOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetLayerVersionPolicyOutput - if *v == nil { - sv = &GetLayerVersionPolicyOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Policy": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Policy = ptr.String(jtv) - } - - case "RevisionId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.RevisionId = ptr.String(jtv) + sv.RevisionId = ptr.String(jtv) } default: @@ -7475,14 +6996,14 @@ func awsRestjson1_deserializeOpDocumentListFunctionsByCodeSigningConfigOutput(v return nil } -type awsRestjson1_deserializeOpListFunctionUrlConfigs struct { +type awsRestjson1_deserializeOpListLayers struct { } -func (*awsRestjson1_deserializeOpListFunctionUrlConfigs) ID() string { +func (*awsRestjson1_deserializeOpListLayers) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListFunctionUrlConfigs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListLayers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7496,9 +7017,9 @@ func (m *awsRestjson1_deserializeOpListFunctionUrlConfigs) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListFunctionUrlConfigs(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListLayers(response, &metadata) } - output := &ListFunctionUrlConfigsOutput{} + output := &ListLayersOutput{} out.Result = output var buff [1024]byte @@ -7519,7 +7040,7 @@ func (m *awsRestjson1_deserializeOpListFunctionUrlConfigs) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListFunctionUrlConfigsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListLayersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7532,7 +7053,7 @@ func (m *awsRestjson1_deserializeOpListFunctionUrlConfigs) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListFunctionUrlConfigs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListLayers(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7576,9 +7097,6 @@ func awsRestjson1_deserializeOpErrorListFunctionUrlConfigs(response *smithyhttp. case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceException", errorCode): return awsRestjson1_deserializeErrorServiceException(response, errorBody) @@ -7595,7 +7113,7 @@ func awsRestjson1_deserializeOpErrorListFunctionUrlConfigs(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentListFunctionUrlConfigsOutput(v **ListFunctionUrlConfigsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListLayersOutput(v **ListLayersOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7608,17 +7126,17 @@ func awsRestjson1_deserializeOpDocumentListFunctionUrlConfigsOutput(v **ListFunc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListFunctionUrlConfigsOutput + var sv *ListLayersOutput if *v == nil { - sv = &ListFunctionUrlConfigsOutput{} + sv = &ListLayersOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "FunctionUrlConfigs": - if err := awsRestjson1_deserializeDocumentFunctionUrlConfigList(&sv.FunctionUrlConfigs, value); err != nil { + case "Layers": + if err := awsRestjson1_deserializeDocumentLayersList(&sv.Layers, value); err != nil { return err } @@ -7640,14 +7158,14 @@ func awsRestjson1_deserializeOpDocumentListFunctionUrlConfigsOutput(v **ListFunc return nil } -type awsRestjson1_deserializeOpListLayers struct { +type awsRestjson1_deserializeOpListLayerVersions struct { } -func (*awsRestjson1_deserializeOpListLayers) ID() string { +func (*awsRestjson1_deserializeOpListLayerVersions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListLayers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListLayerVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7661,9 +7179,9 @@ func (m *awsRestjson1_deserializeOpListLayers) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListLayers(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListLayerVersions(response, &metadata) } - output := &ListLayersOutput{} + output := &ListLayerVersionsOutput{} out.Result = output var buff [1024]byte @@ -7684,7 +7202,7 @@ func (m *awsRestjson1_deserializeOpListLayers) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListLayersOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListLayerVersionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7697,7 +7215,7 @@ func (m *awsRestjson1_deserializeOpListLayers) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorListLayers(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListLayerVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7741,6 +7259,9 @@ func awsRestjson1_deserializeOpErrorListLayers(response *smithyhttp.Response, me case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceException", errorCode): return awsRestjson1_deserializeErrorServiceException(response, errorBody) @@ -7757,7 +7278,7 @@ func awsRestjson1_deserializeOpErrorListLayers(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentListLayersOutput(v **ListLayersOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListLayerVersionsOutput(v **ListLayerVersionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7770,17 +7291,17 @@ func awsRestjson1_deserializeOpDocumentListLayersOutput(v **ListLayersOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListLayersOutput + var sv *ListLayerVersionsOutput if *v == nil { - sv = &ListLayersOutput{} + sv = &ListLayerVersionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Layers": - if err := awsRestjson1_deserializeDocumentLayersList(&sv.Layers, value); err != nil { + case "LayerVersions": + if err := awsRestjson1_deserializeDocumentLayerVersionsList(&sv.LayerVersions, value); err != nil { return err } @@ -7802,14 +7323,14 @@ func awsRestjson1_deserializeOpDocumentListLayersOutput(v **ListLayersOutput, va return nil } -type awsRestjson1_deserializeOpListLayerVersions struct { +type awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs struct { } -func (*awsRestjson1_deserializeOpListLayerVersions) ID() string { +func (*awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListLayerVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7823,172 +7344,7 @@ func (m *awsRestjson1_deserializeOpListLayerVersions) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListLayerVersions(response, &metadata) - } - output := &ListLayerVersionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListLayerVersionsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListLayerVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - code := response.Header.Get("X-Amzn-ErrorType") - if len(code) != 0 { - errorCode = restjson.SanitizeErrorCode(code) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - code, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(code) != 0 { - errorCode = restjson.SanitizeErrorCode(code) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("InvalidParameterValueException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceException", errorCode): - return awsRestjson1_deserializeErrorServiceException(response, errorBody) - - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListLayerVersionsOutput(v **ListLayerVersionsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListLayerVersionsOutput - if *v == nil { - sv = &ListLayerVersionsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "LayerVersions": - if err := awsRestjson1_deserializeDocumentLayerVersionsList(&sv.LayerVersions, value); err != nil { - return err - } - - case "NextMarker": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextMarker = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs struct { -} - -func (*awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListProvisionedConcurrencyConfigs(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListProvisionedConcurrencyConfigs(response, &metadata) } output := &ListProvisionedConcurrencyConfigsOutput{} out.Result = output @@ -10828,6 +10184,11 @@ func awsRestjson1_deserializeOpDocumentUpdateEventSourceMappingOutput(v **Update sv.EventSourceArn = ptr.String(jtv) } + case "FilterCriteria": + if err := awsRestjson1_deserializeDocumentFilterCriteria(&sv.FilterCriteria, value); err != nil { + return err + } + case "FunctionArn": if value != nil { jtv, ok := value.(string) @@ -12094,37 +11455,24 @@ func awsRestjson1_deserializeOpDocumentUpdateFunctionEventInvokeConfigOutput(v * return nil } -type awsRestjson1_deserializeOpUpdateFunctionUrlConfig struct { -} - -func (*awsRestjson1_deserializeOpUpdateFunctionUrlConfig) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateFunctionUrlConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} +func awsRestjson1_deserializeOpHttpBindingsTooManyRequestsException(v *types.TooManyRequestsException, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) } - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateFunctionUrlConfig(response, &metadata) + if headerValues := response.Header.Values("Retry-After"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.RetryAfterSeconds = ptr.String(headerValues[0]) } - output := &UpdateFunctionUrlConfigOutput{} - out.Result = output + return nil +} +func awsRestjson1_deserializeErrorCodeSigningConfigNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CodeSigningConfigNotFoundException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - + body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -12135,263 +11483,72 @@ func (m *awsRestjson1_deserializeOpUpdateFunctionUrlConfig) HandleDeserialize(ct Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return out, metadata, err + return err } - err = awsRestjson1_deserializeOpDocumentUpdateFunctionUrlConfigOutput(&output, shape) + err := awsRestjson1_deserializeDocumentCodeSigningConfigNotFoundException(&output, shape) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } + return err } - return out, metadata, err + errorBody.Seek(0, io.SeekStart) + + return output } -func awsRestjson1_deserializeOpErrorUpdateFunctionUrlConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} +func awsRestjson1_deserializeErrorCodeStorageExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CodeStorageExceededException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - errorCode := "UnknownError" - errorMessage := errorCode + err := awsRestjson1_deserializeDocumentCodeStorageExceededException(&output, shape) - code := response.Header.Get("X-Amzn-ErrorType") - if len(code) != 0 { - errorCode = restjson.SanitizeErrorCode(code) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err } + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorCodeVerificationFailedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CodeVerificationFailedException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - code, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(code) != 0 { - errorCode = restjson.SanitizeErrorCode(code) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("InvalidParameterValueException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - - case strings.EqualFold("ResourceConflictException", errorCode): - return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceException", errorCode): - return awsRestjson1_deserializeErrorServiceException(response, errorBody) - - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentUpdateFunctionUrlConfigOutput(v **UpdateFunctionUrlConfigOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdateFunctionUrlConfigOutput - if *v == nil { - sv = &UpdateFunctionUrlConfigOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AuthorizationType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AuthorizationType to be of type string, got %T instead", value) - } - sv.AuthorizationType = types.AuthorizationType(jtv) - } - - case "Cors": - if err := awsRestjson1_deserializeDocumentCors(&sv.Cors, value); err != nil { - return err - } - - case "CreationTime": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - sv.CreationTime = ptr.String(jtv) - } - - case "FunctionArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) - } - sv.FunctionArn = ptr.String(jtv) - } - - case "FunctionUrl": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected FunctionUrl to be of type string, got %T instead", value) - } - sv.FunctionUrl = ptr.String(jtv) - } - - case "LastModifiedTime": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - sv.LastModifiedTime = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeOpHttpBindingsTooManyRequestsException(v *types.TooManyRequestsException, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - if headerValues := response.Header.Values("Retry-After"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.RetryAfterSeconds = ptr.String(headerValues[0]) - } - - return nil -} -func awsRestjson1_deserializeErrorCodeSigningConfigNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.CodeSigningConfigNotFoundException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentCodeSigningConfigNotFoundException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorCodeStorageExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.CodeStorageExceededException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentCodeStorageExceededException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorCodeVerificationFailedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.CodeVerificationFailedException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -13939,78 +13096,6 @@ func awsRestjson1_deserializeDocumentAllowedPublishers(v **types.AllowedPublishe return nil } -func awsRestjson1_deserializeDocumentAllowMethodsList(v *[]string, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []string - if *v == nil { - cv = []string{} - } else { - cv = *v - } - - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Method to be of type string, got %T instead", value) - } - col = jtv - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentAllowOriginsList(v *[]string, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []string - if *v == nil { - cv = []string{} - } else { - cv = *v - } - - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Origin to be of type string, got %T instead", value) - } - col = jtv - } - cv = append(cv, col) - - } - *v = cv - return nil -} - func awsRestjson1_deserializeDocumentArchitecturesList(v *[]types.Architecture, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -14407,61 +13492,17 @@ func awsRestjson1_deserializeDocumentCompatibleRuntimes(v *[]types.Runtime, valu jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Runtime to be of type string, got %T instead", value) - } - col = types.Runtime(jtv) - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentConcurrency(v **types.Concurrency, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.Concurrency - if *v == nil { - sv = &types.Concurrency{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ReservedConcurrentExecutions": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected ReservedConcurrentExecutions to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.ReservedConcurrentExecutions = ptr.Int32(int32(i64)) - } - - default: - _, _ = key, value - + } + col = types.Runtime(jtv) } + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsRestjson1_deserializeDocumentCors(v **types.Cors, value interface{}) error { +func awsRestjson1_deserializeDocumentConcurrency(v **types.Concurrency, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -14474,55 +13515,26 @@ func awsRestjson1_deserializeDocumentCors(v **types.Cors, value interface{}) err return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Cors + var sv *types.Concurrency if *v == nil { - sv = &types.Cors{} + sv = &types.Concurrency{} } else { sv = *v } for key, value := range shape { switch key { - case "AllowCredentials": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected AllowCredentials to be of type *bool, got %T instead", value) - } - sv.AllowCredentials = ptr.Bool(jtv) - } - - case "AllowHeaders": - if err := awsRestjson1_deserializeDocumentHeadersList(&sv.AllowHeaders, value); err != nil { - return err - } - - case "AllowMethods": - if err := awsRestjson1_deserializeDocumentAllowMethodsList(&sv.AllowMethods, value); err != nil { - return err - } - - case "AllowOrigins": - if err := awsRestjson1_deserializeDocumentAllowOriginsList(&sv.AllowOrigins, value); err != nil { - return err - } - - case "ExposeHeaders": - if err := awsRestjson1_deserializeDocumentHeadersList(&sv.ExposeHeaders, value); err != nil { - return err - } - - case "MaxAge": + case "ReservedConcurrentExecutions": if value != nil { jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected MaxAge to be json.Number, got %T instead", value) + return fmt.Errorf("expected ReservedConcurrentExecutions to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } - sv.MaxAge = ptr.Int32(int32(i64)) + sv.ReservedConcurrentExecutions = ptr.Int32(int32(i64)) } default: @@ -15270,6 +14282,11 @@ func awsRestjson1_deserializeDocumentEventSourceMappingConfiguration(v **types.E sv.EventSourceArn = ptr.String(jtv) } + case "FilterCriteria": + if err := awsRestjson1_deserializeDocumentFilterCriteria(&sv.FilterCriteria, value); err != nil { + return err + } + case "FunctionArn": if value != nil { jtv, ok := value.(string) @@ -15572,6 +14589,116 @@ func awsRestjson1_deserializeDocumentFileSystemConfigList(v *[]types.FileSystemC return nil } +func awsRestjson1_deserializeDocumentFilter(v **types.Filter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Filter + if *v == nil { + sv = &types.Filter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Pattern": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Pattern to be of type string, got %T instead", value) + } + sv.Pattern = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFilterCriteria(v **types.FilterCriteria, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.FilterCriteria + if *v == nil { + sv = &types.FilterCriteria{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Filters": + if err := awsRestjson1_deserializeDocumentFilterList(&sv.Filters, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFilterList(v *[]types.Filter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Filter + if *v == nil { + cv = []types.Filter{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Filter + destAddr := &col + if err := awsRestjson1_deserializeDocumentFilter(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentFunctionArnList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -16165,157 +15292,6 @@ func awsRestjson1_deserializeDocumentFunctionResponseTypeList(v *[]types.Functio return nil } -func awsRestjson1_deserializeDocumentFunctionUrlConfig(v **types.FunctionUrlConfig, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.FunctionUrlConfig - if *v == nil { - sv = &types.FunctionUrlConfig{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AuthorizationType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AuthorizationType to be of type string, got %T instead", value) - } - sv.AuthorizationType = types.AuthorizationType(jtv) - } - - case "Cors": - if err := awsRestjson1_deserializeDocumentCors(&sv.Cors, value); err != nil { - return err - } - - case "CreationTime": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - sv.CreationTime = ptr.String(jtv) - } - - case "FunctionArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) - } - sv.FunctionArn = ptr.String(jtv) - } - - case "FunctionUrl": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected FunctionUrl to be of type string, got %T instead", value) - } - sv.FunctionUrl = ptr.String(jtv) - } - - case "LastModifiedTime": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - sv.LastModifiedTime = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentFunctionUrlConfigList(v *[]types.FunctionUrlConfig, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.FunctionUrlConfig - if *v == nil { - cv = []types.FunctionUrlConfig{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.FunctionUrlConfig - destAddr := &col - if err := awsRestjson1_deserializeDocumentFunctionUrlConfig(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentHeadersList(v *[]string, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []string - if *v == nil { - cv = []string{} - } else { - cv = *v - } - - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Header to be of type string, got %T instead", value) - } - col = jtv - } - cv = append(cv, col) - - } - *v = cv - return nil -} - func awsRestjson1_deserializeDocumentImageConfig(v **types.ImageConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/lambda/doc.go b/service/lambda/doc.go index c730deb0959..6ae9fe14668 100644 --- a/service/lambda/doc.go +++ b/service/lambda/doc.go @@ -19,5 +19,54 @@ // (http://aws.amazon.com/tools/). For a list of Region-specific endpoints that // Lambda supports, see Lambda endpoints and quotas // (https://docs.aws.amazon.com/general/latest/gr/lambda-service.html/) in the -// Amazon Web Services General Reference. +// Amazon Web Services General Reference.. +// +// When making the API calls, you will +// need to authenticate your request by providing a signature. Lambda supports +// signature version 4. For more information, see Signature Version 4 signing +// process (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html) +// in the Amazon Web Services General Reference.. CA certificates Because Amazon +// Web Services SDKs use the CA certificates from your computer, changes to the +// certificates on the Amazon Web Services servers can cause connection failures +// when you attempt to use an SDK. You can prevent these failures by keeping your +// computer's CA certificates and operating system up-to-date. If you encounter +// this issue in a corporate environment and do not manage your own computer, you +// might need to ask an administrator to assist with the update process. The +// following list shows minimum operating system and Java versions: +// +// * Microsoft +// Windows versions that have updates from January 2005 or later installed contain +// at least one of the required CAs in their trust list. +// +// * Mac OS X 10.4 with Java +// for Mac OS X 10.4 Release 5 (February 2007), Mac OS X 10.5 (October 2007), and +// later versions contain at least one of the required CAs in their trust list. +// +// * +// Red Hat Enterprise Linux 5 (March 2007), 6, and 7 and CentOS 5, 6, and 7 all +// contain at least one of the required CAs in their default trusted CA list. +// +// * +// Java 1.4.2_12 (May 2006), 5 Update 2 (March 2005), and all later versions, +// including Java 6 (December 2006), 7, and 8, contain at least one of the required +// CAs in their default trusted CA list. +// +// When accessing the Lambda management +// console or Lambda API endpoints, whether through browsers or programmatically, +// you will need to ensure your client machines support any of the following +// CAs: +// +// * Amazon Root CA 1 +// +// * Starfield Services Root Certificate Authority - +// G2 +// +// * Starfield Class 2 Certification Authority +// +// Root certificates from the +// first two authorities are available from Amazon trust services +// (https://www.amazontrust.com/repository/), but keeping your computer up-to-date +// is the more straightforward solution. To learn more about ACM-provided +// certificates, see Amazon Web Services Certificate Manager FAQs. +// (http://aws.amazon.com/certificate-manager/faqs/#certificates) package lambda diff --git a/service/lambda/generated.json b/service/lambda/generated.json index 1c722f168a0..570b86993ae 100644 --- a/service/lambda/generated.json +++ b/service/lambda/generated.json @@ -14,7 +14,6 @@ "api_op_CreateCodeSigningConfig.go", "api_op_CreateEventSourceMapping.go", "api_op_CreateFunction.go", - "api_op_CreateFunctionUrlConfig.go", "api_op_DeleteAlias.go", "api_op_DeleteCodeSigningConfig.go", "api_op_DeleteEventSourceMapping.go", @@ -22,7 +21,6 @@ "api_op_DeleteFunctionCodeSigningConfig.go", "api_op_DeleteFunctionConcurrency.go", "api_op_DeleteFunctionEventInvokeConfig.go", - "api_op_DeleteFunctionUrlConfig.go", "api_op_DeleteLayerVersion.go", "api_op_DeleteProvisionedConcurrencyConfig.go", "api_op_GetAccountSettings.go", @@ -34,7 +32,6 @@ "api_op_GetFunctionConcurrency.go", "api_op_GetFunctionConfiguration.go", "api_op_GetFunctionEventInvokeConfig.go", - "api_op_GetFunctionUrlConfig.go", "api_op_GetLayerVersion.go", "api_op_GetLayerVersionByArn.go", "api_op_GetLayerVersionPolicy.go", @@ -46,7 +43,6 @@ "api_op_ListCodeSigningConfigs.go", "api_op_ListEventSourceMappings.go", "api_op_ListFunctionEventInvokeConfigs.go", - "api_op_ListFunctionUrlConfigs.go", "api_op_ListFunctions.go", "api_op_ListFunctionsByCodeSigningConfig.go", "api_op_ListLayerVersions.go", @@ -70,7 +66,6 @@ "api_op_UpdateFunctionCode.go", "api_op_UpdateFunctionConfiguration.go", "api_op_UpdateFunctionEventInvokeConfig.go", - "api_op_UpdateFunctionUrlConfig.go", "deserializers.go", "doc.go", "endpoints.go", diff --git a/service/lambda/serializers.go b/service/lambda/serializers.go index 2e4eaacb591..39ce375ec51 100644 --- a/service/lambda/serializers.go +++ b/service/lambda/serializers.go @@ -504,6 +504,13 @@ func awsRestjson1_serializeOpDocumentCreateEventSourceMappingInput(v *CreateEven ok.String(*v.EventSourceArn) } + if v.FilterCriteria != nil { + ok := object.Key("FilterCriteria") + if err := awsRestjson1_serializeDocumentFilterCriteria(v.FilterCriteria, ok); err != nil { + return err + } + } + if v.FunctionName != nil { ok := object.Key("FunctionName") ok.String(*v.FunctionName) @@ -770,98 +777,6 @@ func awsRestjson1_serializeOpDocumentCreateFunctionInput(v *CreateFunctionInput, return nil } -type awsRestjson1_serializeOpCreateFunctionUrlConfig struct { -} - -func (*awsRestjson1_serializeOpCreateFunctionUrlConfig) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpCreateFunctionUrlConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateFunctionUrlConfigInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2021-10-31/functions/{FunctionName}/url") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsCreateFunctionUrlConfigInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateFunctionUrlConfigInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsCreateFunctionUrlConfigInput(v *CreateFunctionUrlConfigInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.FunctionName == nil || len(*v.FunctionName) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} - } - if v.FunctionName != nil { - if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { - return err - } - } - - if v.Qualifier != nil { - encoder.SetQuery("Qualifier").String(*v.Qualifier) - } - - return nil -} - -func awsRestjson1_serializeOpDocumentCreateFunctionUrlConfigInput(v *CreateFunctionUrlConfigInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if len(v.AuthorizationType) > 0 { - ok := object.Key("AuthorizationType") - ok.String(string(v.AuthorizationType)) - } - - if v.Cors != nil { - ok := object.Key("Cors") - if err := awsRestjson1_serializeDocumentCors(v.Cors, ok); err != nil { - return err - } - } - - return nil -} - type awsRestjson1_serializeOpDeleteAlias struct { } @@ -1285,68 +1200,6 @@ func awsRestjson1_serializeOpHttpBindingsDeleteFunctionEventInvokeConfigInput(v return nil } -type awsRestjson1_serializeOpDeleteFunctionUrlConfig struct { -} - -func (*awsRestjson1_serializeOpDeleteFunctionUrlConfig) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpDeleteFunctionUrlConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteFunctionUrlConfigInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2021-10-31/functions/{FunctionName}/url") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" - restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsDeleteFunctionUrlConfigInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsDeleteFunctionUrlConfigInput(v *DeleteFunctionUrlConfigInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.FunctionName == nil || len(*v.FunctionName) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} - } - if v.FunctionName != nil { - if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { - return err - } - } - - if v.Qualifier != nil { - encoder.SetQuery("Qualifier").String(*v.Qualifier) - } - - return nil -} - type awsRestjson1_serializeOpDeleteLayerVersion struct { } @@ -2003,68 +1856,6 @@ func awsRestjson1_serializeOpHttpBindingsGetFunctionEventInvokeConfigInput(v *Ge return nil } -type awsRestjson1_serializeOpGetFunctionUrlConfig struct { -} - -func (*awsRestjson1_serializeOpGetFunctionUrlConfig) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetFunctionUrlConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetFunctionUrlConfigInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2021-10-31/functions/{FunctionName}/url") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetFunctionUrlConfigInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetFunctionUrlConfigInput(v *GetFunctionUrlConfigInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.FunctionName == nil || len(*v.FunctionName) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} - } - if v.FunctionName != nil { - if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { - return err - } - } - - if v.Qualifier != nil { - encoder.SetQuery("Qualifier").String(*v.Qualifier) - } - - return nil -} - type awsRestjson1_serializeOpGetLayerVersion struct { } @@ -2916,72 +2707,6 @@ func awsRestjson1_serializeOpHttpBindingsListFunctionsByCodeSigningConfigInput(v return nil } -type awsRestjson1_serializeOpListFunctionUrlConfigs struct { -} - -func (*awsRestjson1_serializeOpListFunctionUrlConfigs) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListFunctionUrlConfigs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListFunctionUrlConfigsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2021-10-31/functions/{FunctionName}/urls") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListFunctionUrlConfigsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListFunctionUrlConfigsInput(v *ListFunctionUrlConfigsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.FunctionName == nil || len(*v.FunctionName) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} - } - if v.FunctionName != nil { - if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { - return err - } - } - - if v.Marker != nil { - encoder.SetQuery("Marker").String(*v.Marker) - } - - if v.MaxItems != nil { - encoder.SetQuery("MaxItems").Integer(*v.MaxItems) - } - - return nil -} - type awsRestjson1_serializeOpListLayers struct { } @@ -4449,6 +4174,13 @@ func awsRestjson1_serializeOpDocumentUpdateEventSourceMappingInput(v *UpdateEven ok.Boolean(*v.Enabled) } + if v.FilterCriteria != nil { + ok := object.Key("FilterCriteria") + if err := awsRestjson1_serializeDocumentFilterCriteria(v.FilterCriteria, ok); err != nil { + return err + } + } + if v.FunctionName != nil { ok := object.Key("FunctionName") ok.String(*v.FunctionName) @@ -4881,98 +4613,6 @@ func awsRestjson1_serializeOpDocumentUpdateFunctionEventInvokeConfigInput(v *Upd return nil } -type awsRestjson1_serializeOpUpdateFunctionUrlConfig struct { -} - -func (*awsRestjson1_serializeOpUpdateFunctionUrlConfig) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUpdateFunctionUrlConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdateFunctionUrlConfigInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2021-10-31/functions/{FunctionName}/url") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" - restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUpdateFunctionUrlConfigInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateFunctionUrlConfigInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUpdateFunctionUrlConfigInput(v *UpdateFunctionUrlConfigInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.FunctionName == nil || len(*v.FunctionName) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} - } - if v.FunctionName != nil { - if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { - return err - } - } - - if v.Qualifier != nil { - encoder.SetQuery("Qualifier").String(*v.Qualifier) - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUpdateFunctionUrlConfigInput(v *UpdateFunctionUrlConfigInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if len(v.AuthorizationType) > 0 { - ok := object.Key("AuthorizationType") - ok.String(string(v.AuthorizationType)) - } - - if v.Cors != nil { - ok := object.Key("Cors") - if err := awsRestjson1_serializeDocumentCors(v.Cors, ok); err != nil { - return err - } - } - - return nil -} - func awsRestjson1_serializeDocumentAdditionalVersionWeights(v map[string]float64, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5025,28 +4665,6 @@ func awsRestjson1_serializeDocumentAllowedPublishers(v *types.AllowedPublishers, return nil } -func awsRestjson1_serializeDocumentAllowMethodsList(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsRestjson1_serializeDocumentAllowOriginsList(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - func awsRestjson1_serializeDocumentArchitecturesList(v []types.Architecture, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -5092,51 +4710,6 @@ func awsRestjson1_serializeDocumentCompatibleRuntimes(v []types.Runtime, value s return nil } -func awsRestjson1_serializeDocumentCors(v *types.Cors, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.AllowCredentials != nil { - ok := object.Key("AllowCredentials") - ok.Boolean(*v.AllowCredentials) - } - - if v.AllowHeaders != nil { - ok := object.Key("AllowHeaders") - if err := awsRestjson1_serializeDocumentHeadersList(v.AllowHeaders, ok); err != nil { - return err - } - } - - if v.AllowMethods != nil { - ok := object.Key("AllowMethods") - if err := awsRestjson1_serializeDocumentAllowMethodsList(v.AllowMethods, ok); err != nil { - return err - } - } - - if v.AllowOrigins != nil { - ok := object.Key("AllowOrigins") - if err := awsRestjson1_serializeDocumentAllowOriginsList(v.AllowOrigins, ok); err != nil { - return err - } - } - - if v.ExposeHeaders != nil { - ok := object.Key("ExposeHeaders") - if err := awsRestjson1_serializeDocumentHeadersList(v.ExposeHeaders, ok); err != nil { - return err - } - } - - if v.MaxAge != nil { - ok := object.Key("MaxAge") - ok.Integer(*v.MaxAge) - } - - return nil -} - func awsRestjson1_serializeDocumentDeadLetterConfig(v *types.DeadLetterConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5252,6 +4825,45 @@ func awsRestjson1_serializeDocumentFileSystemConfigList(v []types.FileSystemConf return nil } +func awsRestjson1_serializeDocumentFilter(v *types.Filter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Pattern != nil { + ok := object.Key("Pattern") + ok.String(*v.Pattern) + } + + return nil +} + +func awsRestjson1_serializeDocumentFilterCriteria(v *types.FilterCriteria, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsRestjson1_serializeDocumentFilterList(v.Filters, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentFilterList(v []types.Filter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentFunctionCode(v *types.FunctionCode, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5295,17 +4907,6 @@ func awsRestjson1_serializeDocumentFunctionResponseTypeList(v []types.FunctionRe return nil } -func awsRestjson1_serializeDocumentHeadersList(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - func awsRestjson1_serializeDocumentImageConfig(v *types.ImageConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/lambda/types/enums.go b/service/lambda/types/enums.go index 5a267cc4689..921530e2f6a 100644 --- a/service/lambda/types/enums.go +++ b/service/lambda/types/enums.go @@ -20,24 +20,6 @@ func (Architecture) Values() []Architecture { } } -type AuthorizationType string - -// Enum values for AuthorizationType -const ( - AuthorizationTypeNone AuthorizationType = "NONE" - AuthorizationTypeAwsIam AuthorizationType = "AWS_IAM" -) - -// Values returns all known values for AuthorizationType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (AuthorizationType) Values() []AuthorizationType { - return []AuthorizationType{ - "NONE", - "AWS_IAM", - } -} - type CodeSigningPolicy string // Enum values for CodeSigningPolicy diff --git a/service/lambda/types/types.go b/service/lambda/types/types.go index 36b6a38fab1..b9eb5245105 100644 --- a/service/lambda/types/types.go +++ b/service/lambda/types/types.go @@ -157,22 +157,6 @@ type Concurrency struct { noSmithyDocumentSerde } -type Cors struct { - AllowCredentials *bool - - AllowHeaders []string - - AllowMethods []string - - AllowOrigins []string - - ExposeHeaders []string - - MaxAge *int32 - - noSmithyDocumentSerde -} - // The dead-letter queue // (https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#dlq) for // failed asynchronous invocations. @@ -261,6 +245,12 @@ type EventSourceMappingConfiguration struct { // The Amazon Resource Name (ARN) of the event source. EventSourceArn *string + // (Streams and Amazon SQS) An object that defines the filter criteria that + // determine whether Lambda should process an event. For more information, see + // Lambda event filtering + // (https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html). + FilterCriteria *FilterCriteria + // The ARN of the Lambda function. FunctionArn *string @@ -354,6 +344,27 @@ type FileSystemConfig struct { noSmithyDocumentSerde } +// A structure within a FilterCriteria object that defines an event filtering +// pattern. +type Filter struct { + + // A filter pattern. For more information on the syntax of a filter pattern, see + // Filter rule syntax + // (https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-syntax). + Pattern *string + + noSmithyDocumentSerde +} + +// An object that contains the filters for an event source. +type FilterCriteria struct { + + // A list of filters. + Filters []Filter + + noSmithyDocumentSerde +} + // The code for the Lambda function. You can specify either an object in Amazon S3, // upload a .zip file archive deployment package directly, or specify the URI of a // container image. @@ -544,28 +555,6 @@ type FunctionEventInvokeConfig struct { noSmithyDocumentSerde } -type FunctionUrlConfig struct { - - // This member is required. - AuthorizationType AuthorizationType - - // This member is required. - CreationTime *string - - // This member is required. - FunctionArn *string - - // This member is required. - FunctionUrl *string - - // This member is required. - LastModifiedTime *string - - Cors *Cors - - noSmithyDocumentSerde -} - // Configuration values that override the container image Dockerfile settings. See // Container settings // (https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms). @@ -806,7 +795,18 @@ type SourceAccessConfiguration struct { // // * VIRTUAL_HOST - (Amazon MQ) The name of the // virtual host in your RabbitMQ broker. Lambda uses this RabbitMQ host as the - // event source. + // event source. This property cannot be specified in an UpdateEventSourceMapping + // API call. + // + // * CLIENT_CERTIFICATE_TLS_AUTH - (Amazon MSK, Self-managed Apache + // Kafka) The Secrets Manager ARN of your secret key containing the certificate + // chain (X.509 PEM), private key (PKCS#8 PEM), and private key password (optional) + // used for mutual TLS authentication of your MSK/Apache Kafka brokers. + // + // * + // SERVER_ROOT_CA_CERTIFICATE - (Self-managed Apache Kafka) The Secrets Manager ARN + // of your secret key containing the root CA certificate (X.509 PEM) used for TLS + // encryption of your Apache Kafka brokers. Type SourceAccessType // The value for your chosen configuration in Type. For example: "URI": diff --git a/service/lambda/validators.go b/service/lambda/validators.go index d1b733185a1..3a170f5999c 100644 --- a/service/lambda/validators.go +++ b/service/lambda/validators.go @@ -130,26 +130,6 @@ func (m *validateOpCreateFunction) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } -type validateOpCreateFunctionUrlConfig struct { -} - -func (*validateOpCreateFunctionUrlConfig) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateFunctionUrlConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateFunctionUrlConfigInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateFunctionUrlConfigInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - type validateOpDeleteAlias struct { } @@ -290,26 +270,6 @@ func (m *validateOpDeleteFunction) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } -type validateOpDeleteFunctionUrlConfig struct { -} - -func (*validateOpDeleteFunctionUrlConfig) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteFunctionUrlConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteFunctionUrlConfigInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteFunctionUrlConfigInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - type validateOpDeleteLayerVersion struct { } @@ -510,26 +470,6 @@ func (m *validateOpGetFunction) HandleInitialize(ctx context.Context, in middlew return next.HandleInitialize(ctx, in) } -type validateOpGetFunctionUrlConfig struct { -} - -func (*validateOpGetFunctionUrlConfig) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetFunctionUrlConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetFunctionUrlConfigInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetFunctionUrlConfigInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - type validateOpGetLayerVersionByArn struct { } @@ -730,26 +670,6 @@ func (m *validateOpListFunctionsByCodeSigningConfig) HandleInitialize(ctx contex return next.HandleInitialize(ctx, in) } -type validateOpListFunctionUrlConfigs struct { -} - -func (*validateOpListFunctionUrlConfigs) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListFunctionUrlConfigs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListFunctionUrlConfigsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListFunctionUrlConfigsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - type validateOpListLayerVersions struct { } @@ -1150,26 +1070,6 @@ func (m *validateOpUpdateFunctionEventInvokeConfig) HandleInitialize(ctx context return next.HandleInitialize(ctx, in) } -type validateOpUpdateFunctionUrlConfig struct { -} - -func (*validateOpUpdateFunctionUrlConfig) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateFunctionUrlConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateFunctionUrlConfigInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateFunctionUrlConfigInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - func addOpAddLayerVersionPermissionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAddLayerVersionPermission{}, middleware.After) } @@ -1194,10 +1094,6 @@ func addOpCreateFunctionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateFunction{}, middleware.After) } -func addOpCreateFunctionUrlConfigValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateFunctionUrlConfig{}, middleware.After) -} - func addOpDeleteAliasValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteAlias{}, middleware.After) } @@ -1226,10 +1122,6 @@ func addOpDeleteFunctionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteFunction{}, middleware.After) } -func addOpDeleteFunctionUrlConfigValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteFunctionUrlConfig{}, middleware.After) -} - func addOpDeleteLayerVersionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteLayerVersion{}, middleware.After) } @@ -1270,10 +1162,6 @@ func addOpGetFunctionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetFunction{}, middleware.After) } -func addOpGetFunctionUrlConfigValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetFunctionUrlConfig{}, middleware.After) -} - func addOpGetLayerVersionByArnValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetLayerVersionByArn{}, middleware.After) } @@ -1314,10 +1202,6 @@ func addOpListFunctionsByCodeSigningConfigValidationMiddleware(stack *middleware return stack.Initialize.Add(&validateOpListFunctionsByCodeSigningConfig{}, middleware.After) } -func addOpListFunctionUrlConfigsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListFunctionUrlConfigs{}, middleware.After) -} - func addOpListLayerVersionsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListLayerVersions{}, middleware.After) } @@ -1398,10 +1282,6 @@ func addOpUpdateFunctionEventInvokeConfigValidationMiddleware(stack *middleware. return stack.Initialize.Add(&validateOpUpdateFunctionEventInvokeConfig{}, middleware.After) } -func addOpUpdateFunctionUrlConfigValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateFunctionUrlConfig{}, middleware.After) -} - func validateAllowedPublishers(v *types.AllowedPublishers) error { if v == nil { return nil @@ -1581,24 +1461,6 @@ func validateOpCreateFunctionInput(v *CreateFunctionInput) error { } } -func validateOpCreateFunctionUrlConfigInput(v *CreateFunctionUrlConfigInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateFunctionUrlConfigInput"} - if v.FunctionName == nil { - invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) - } - if len(v.AuthorizationType) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("AuthorizationType")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - func validateOpDeleteAliasInput(v *DeleteAliasInput) error { if v == nil { return nil @@ -1707,21 +1569,6 @@ func validateOpDeleteFunctionInput(v *DeleteFunctionInput) error { } } -func validateOpDeleteFunctionUrlConfigInput(v *DeleteFunctionUrlConfigInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteFunctionUrlConfigInput"} - if v.FunctionName == nil { - invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - func validateOpDeleteLayerVersionInput(v *DeleteLayerVersionInput) error { if v == nil { return nil @@ -1878,21 +1725,6 @@ func validateOpGetFunctionInput(v *GetFunctionInput) error { } } -func validateOpGetFunctionUrlConfigInput(v *GetFunctionUrlConfigInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetFunctionUrlConfigInput"} - if v.FunctionName == nil { - invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - func validateOpGetLayerVersionByArnInput(v *GetLayerVersionByArnInput) error { if v == nil { return nil @@ -2049,21 +1881,6 @@ func validateOpListFunctionsByCodeSigningConfigInput(v *ListFunctionsByCodeSigni } } -func validateOpListFunctionUrlConfigsInput(v *ListFunctionUrlConfigsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListFunctionUrlConfigsInput"} - if v.FunctionName == nil { - invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - func validateOpListLayerVersionsInput(v *ListLayerVersionsInput) error { if v == nil { return nil @@ -2403,18 +2220,3 @@ func validateOpUpdateFunctionEventInvokeConfigInput(v *UpdateFunctionEventInvoke return nil } } - -func validateOpUpdateFunctionUrlConfigInput(v *UpdateFunctionUrlConfigInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UpdateFunctionUrlConfigInput"} - if v.FunctionName == nil { - invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} diff --git a/service/macie2/api_op_CreateCustomDataIdentifier.go b/service/macie2/api_op_CreateCustomDataIdentifier.go index d403e80c480..94ba7697a8c 100644 --- a/service/macie2/api_op_CreateCustomDataIdentifier.go +++ b/service/macie2/api_op_CreateCustomDataIdentifier.go @@ -38,8 +38,8 @@ type CreateCustomDataIdentifierInput struct { // A custom description of the custom data identifier. The description can contain // as many as 512 characters. We strongly recommend that you avoid including any // sensitive data in the description of a custom data identifier. Other users of - // your account might be able to see the identifier's description, depending on the - // actions that they're allowed to perform in Amazon Macie. + // your account might be able to see this description, depending on the actions + // that they're allowed to perform in Amazon Macie. Description *string // An array that lists specific character sequences (ignore words) to exclude from @@ -65,8 +65,8 @@ type CreateCustomDataIdentifierInput struct { // A custom name for the custom data identifier. The name can contain as many as // 128 characters. We strongly recommend that you avoid including any sensitive // data in the name of a custom data identifier. Other users of your account might - // be able to see the identifier's name, depending on the actions that they're - // allowed to perform in Amazon Macie. + // be able to see this name, depending on the actions that they're allowed to + // perform in Amazon Macie. Name *string // The regular expression (regex) that defines the pattern to match. The expression diff --git a/service/macie2/api_op_CreateFindingsFilter.go b/service/macie2/api_op_CreateFindingsFilter.go index 8304bf28e82..ec55c04caa7 100644 --- a/service/macie2/api_op_CreateFindingsFilter.go +++ b/service/macie2/api_op_CreateFindingsFilter.go @@ -45,8 +45,8 @@ type CreateFindingsFilterInput struct { // A custom name for the filter. The name must contain at least 3 characters and // can contain as many as 64 characters. We strongly recommend that you avoid // including any sensitive data in the name of a filter. Other users of your - // account might be able to see the filter's name, depending on the actions that - // they're allowed to perform in Amazon Macie. + // account might be able to see this name, depending on the actions that they're + // allowed to perform in Amazon Macie. // // This member is required. Name *string @@ -58,8 +58,8 @@ type CreateFindingsFilterInput struct { // A custom description of the filter. The description can contain as many as 512 // characters. We strongly recommend that you avoid including any sensitive data in // the description of a filter. Other users of your account might be able to see - // the filter's description, depending on the actions that they're allowed to - // perform in Amazon Macie. + // this description, depending on the actions that they're allowed to perform in + // Amazon Macie. Description *string // The position of the filter in the list of saved filters on the Amazon Macie diff --git a/service/macie2/api_op_CreateInvitations.go b/service/macie2/api_op_CreateInvitations.go index 8d9c876bc71..728e19406b3 100644 --- a/service/macie2/api_op_CreateInvitations.go +++ b/service/macie2/api_op_CreateInvitations.go @@ -35,14 +35,14 @@ type CreateInvitationsInput struct { // This member is required. AccountIds []string - // Specifies whether to send an email notification to the root user of each account - // that the invitation will be sent to. This notification is in addition to an - // alert that the root user receives in Personal Health Dashboard. To send an email - // notification to the root user of each account, set this value to true. + // Specifies whether to send the invitation as an email message. If this value is + // false, Amazon Macie sends the invitation (as an email message) to the email + // address that you specified for the recipient's account when you associated the + // account with your account. The default value is false. DisableEmailNotification bool - // A custom message to include in the invitation. Amazon Macie adds this message to - // the standard content that it sends for an invitation. + // Custom text to include in the email message that contains the invitation. The + // text can contain as many as 80 alphanumeric characters. Message *string noSmithyDocumentSerde diff --git a/service/macie2/api_op_DescribeOrganizationConfiguration.go b/service/macie2/api_op_DescribeOrganizationConfiguration.go index 1f0b1e4d036..be4a375422e 100644 --- a/service/macie2/api_op_DescribeOrganizationConfiguration.go +++ b/service/macie2/api_op_DescribeOrganizationConfiguration.go @@ -10,8 +10,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves the Amazon Macie configuration settings for an Amazon Web Services -// organization. +// Retrieves the Amazon Macie configuration settings for an organization in +// Organizations. func (c *Client) DescribeOrganizationConfiguration(ctx context.Context, params *DescribeOrganizationConfigurationInput, optFns ...func(*Options)) (*DescribeOrganizationConfigurationOutput, error) { if params == nil { params = &DescribeOrganizationConfigurationInput{} @@ -34,11 +34,11 @@ type DescribeOrganizationConfigurationInput struct { type DescribeOrganizationConfigurationOutput struct { // Specifies whether Amazon Macie is enabled automatically for accounts that are - // added to the Amazon Web Services organization. + // added to the organization. AutoEnable bool // Specifies whether the maximum number of Amazon Macie member accounts are part of - // the Amazon Web Services organization. + // the organization. MaxAccountLimitReached bool // Metadata pertaining to the operation's result. diff --git a/service/macie2/api_op_DisableMacie.go b/service/macie2/api_op_DisableMacie.go index e58cf0f15a5..32a906371f0 100644 --- a/service/macie2/api_op_DisableMacie.go +++ b/service/macie2/api_op_DisableMacie.go @@ -10,7 +10,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Disables an Amazon Macie account and deletes Macie resources for the account. +// Disables Amazon Macie and deletes all settings and resources for a Macie +// account. func (c *Client) DisableMacie(ctx context.Context, params *DisableMacieInput, optFns ...func(*Options)) (*DisableMacieOutput, error) { if params == nil { params = &DisableMacieInput{} diff --git a/service/macie2/api_op_DisableOrganizationAdminAccount.go b/service/macie2/api_op_DisableOrganizationAdminAccount.go index 4ab207f7593..10c5bd5d311 100644 --- a/service/macie2/api_op_DisableOrganizationAdminAccount.go +++ b/service/macie2/api_op_DisableOrganizationAdminAccount.go @@ -11,7 +11,7 @@ import ( ) // Disables an account as the delegated Amazon Macie administrator account for an -// Amazon Web Services organization. +// organization in Organizations. func (c *Client) DisableOrganizationAdminAccount(ctx context.Context, params *DisableOrganizationAdminAccountInput, optFns ...func(*Options)) (*DisableOrganizationAdminAccountOutput, error) { if params == nil { params = &DisableOrganizationAdminAccountInput{} diff --git a/service/macie2/api_op_EnableOrganizationAdminAccount.go b/service/macie2/api_op_EnableOrganizationAdminAccount.go index 5224a77e15f..6cab8b01bb7 100644 --- a/service/macie2/api_op_EnableOrganizationAdminAccount.go +++ b/service/macie2/api_op_EnableOrganizationAdminAccount.go @@ -12,7 +12,7 @@ import ( ) // Designates an account as the delegated Amazon Macie administrator account for an -// Amazon Web Services organization. +// organization in Organizations. func (c *Client) EnableOrganizationAdminAccount(ctx context.Context, params *EnableOrganizationAdminAccountInput, optFns ...func(*Options)) (*EnableOrganizationAdminAccountOutput, error) { if params == nil { params = &EnableOrganizationAdminAccountInput{} diff --git a/service/macie2/api_op_GetAdministratorAccount.go b/service/macie2/api_op_GetAdministratorAccount.go index 0bfb512e68e..291ae17aa4d 100644 --- a/service/macie2/api_op_GetAdministratorAccount.go +++ b/service/macie2/api_op_GetAdministratorAccount.go @@ -35,8 +35,8 @@ type GetAdministratorAccountInput struct { type GetAdministratorAccountOutput struct { // The Amazon Web Services account ID for the administrator account. If the - // accounts are associated by a Macie membership invitation, this object also - // provides details about the invitation that was sent to establish the + // accounts are associated by an Amazon Macie membership invitation, this object + // also provides details about the invitation that was sent to establish the // relationship between the accounts. Administrator *types.Invitation diff --git a/service/macie2/api_op_GetBucketStatistics.go b/service/macie2/api_op_GetBucketStatistics.go index 76033c213a3..bfbc53e7de7 100644 --- a/service/macie2/api_op_GetBucketStatistics.go +++ b/service/macie2/api_op_GetBucketStatistics.go @@ -12,8 +12,8 @@ import ( "time" ) -// Retrieves (queries) aggregated statistical data for all the S3 buckets that -// Amazon Macie monitors and analyzes. +// Retrieves (queries) aggregated statistical data about S3 buckets that Amazon +// Macie monitors and analyzes. func (c *Client) GetBucketStatistics(ctx context.Context, params *GetBucketStatisticsInput, optFns ...func(*Options)) (*GetBucketStatisticsOutput, error) { if params == nil { params = &GetBucketStatisticsInput{} diff --git a/service/macie2/api_op_GetMacieSession.go b/service/macie2/api_op_GetMacieSession.go index 6464f2a2a0b..e9371150068 100644 --- a/service/macie2/api_op_GetMacieSession.go +++ b/service/macie2/api_op_GetMacieSession.go @@ -39,23 +39,24 @@ type GetMacieSessionOutput struct { // account was created. CreatedAt *time.Time - // The frequency with which Macie publishes updates to policy findings for the - // account. This includes publishing updates to Security Hub and Amazon EventBridge - // (formerly called Amazon CloudWatch Events). + // The frequency with which Amazon Macie publishes updates to policy findings for + // the account. This includes publishing updates to Security Hub and Amazon + // EventBridge (formerly called Amazon CloudWatch Events). FindingPublishingFrequency types.FindingPublishingFrequency - // The Amazon Resource Name (ARN) of the service-linked role that allows Macie to - // monitor and analyze data in Amazon Web Services resources for the account. + // The Amazon Resource Name (ARN) of the service-linked role that allows Amazon + // Macie to monitor and analyze data in Amazon Web Services resources for the + // account. ServiceRole *string - // The current status of the Macie account. Possible values are: PAUSED, the + // The current status of the Amazon Macie account. Possible values are: PAUSED, the // account is enabled but all Macie activities are suspended (paused) for the // account; and, ENABLED, the account is enabled and all Macie activities are // enabled for the account. Status types.MacieStatus // The date and time, in UTC and extended ISO 8601 format, of the most recent - // change to the status of the Macie account. + // change to the status of the Amazon Macie account. UpdatedAt *time.Time // Metadata pertaining to the operation's result. diff --git a/service/macie2/api_op_GetMember.go b/service/macie2/api_op_GetMember.go index c0487bc4f78..769ef07f34a 100644 --- a/service/macie2/api_op_GetMember.go +++ b/service/macie2/api_op_GetMember.go @@ -55,8 +55,8 @@ type GetMemberOutput struct { Email *string // The date and time, in UTC and extended ISO 8601 format, when an Amazon Macie - // membership invitation was last sent to the account. This value is null if a - // Macie invitation hasn't been sent to the account. + // membership invitation was last sent to the account. This value is null if an + // invitation hasn't been sent to the account. InvitedAt *time.Time // (Deprecated) The Amazon Web Services account ID for the administrator account. diff --git a/service/macie2/api_op_ListMembers.go b/service/macie2/api_op_ListMembers.go index b011469b4a4..bd26881a568 100644 --- a/service/macie2/api_op_ListMembers.go +++ b/service/macie2/api_op_ListMembers.go @@ -50,8 +50,7 @@ type ListMembersInput struct { type ListMembersOutput struct { // An array of objects, one for each account that's associated with the - // administrator account and meets the criteria specified by the onlyAssociated - // request parameter. + // administrator account and meets the criteria specified in the request. Members []types.Member // The string to use in a subsequent request to get the next page of results in a diff --git a/service/macie2/api_op_ListOrganizationAdminAccounts.go b/service/macie2/api_op_ListOrganizationAdminAccounts.go index dfc08116789..5ce8536dfba 100644 --- a/service/macie2/api_op_ListOrganizationAdminAccounts.go +++ b/service/macie2/api_op_ListOrganizationAdminAccounts.go @@ -13,7 +13,7 @@ import ( ) // Retrieves information about the delegated Amazon Macie administrator account for -// an Amazon Web Services organization. +// an organization in Organizations. func (c *Client) ListOrganizationAdminAccounts(ctx context.Context, params *ListOrganizationAdminAccountsInput, optFns ...func(*Options)) (*ListOrganizationAdminAccountsOutput, error) { if params == nil { params = &ListOrganizationAdminAccountsInput{} diff --git a/service/macie2/api_op_UpdateFindingsFilter.go b/service/macie2/api_op_UpdateFindingsFilter.go index 859b0b5b540..e37da12b0b9 100644 --- a/service/macie2/api_op_UpdateFindingsFilter.go +++ b/service/macie2/api_op_UpdateFindingsFilter.go @@ -47,9 +47,8 @@ type UpdateFindingsFilterInput struct { // A custom description of the filter. The description can contain as many as 512 // characters. We strongly recommend that you avoid including any sensitive data in - // the description of a filter. Other users might be able to see the filter's - // description, depending on the actions that they're allowed to perform in Amazon - // Macie. + // the description of a filter. Other users might be able to see this description, + // depending on the actions that they're allowed to perform in Amazon Macie. Description *string // The criteria to use to filter findings. @@ -58,8 +57,8 @@ type UpdateFindingsFilterInput struct { // A custom name for the filter. The name must contain at least 3 characters and // can contain as many as 64 characters. We strongly recommend that you avoid // including any sensitive data in the name of a filter. Other users might be able - // to see the filter's name, depending on the actions that they're allowed to - // perform in Amazon Macie. + // to see this name, depending on the actions that they're allowed to perform in + // Amazon Macie. Name *string // The position of the filter in the list of saved filters on the Amazon Macie diff --git a/service/macie2/api_op_UpdateMacieSession.go b/service/macie2/api_op_UpdateMacieSession.go index 53125e76bd7..2bf5de24827 100644 --- a/service/macie2/api_op_UpdateMacieSession.go +++ b/service/macie2/api_op_UpdateMacieSession.go @@ -11,8 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Suspends or re-enables an Amazon Macie account, or updates the configuration -// settings for a Macie account. +// Suspends or re-enables Amazon Macie, or updates the configuration settings for a +// Macie account. func (c *Client) UpdateMacieSession(ctx context.Context, params *UpdateMacieSessionInput, optFns ...func(*Options)) (*UpdateMacieSessionOutput, error) { if params == nil { params = &UpdateMacieSessionInput{} diff --git a/service/macie2/api_op_UpdateOrganizationConfiguration.go b/service/macie2/api_op_UpdateOrganizationConfiguration.go index 38f40d752a8..0e6d8b8cd01 100644 --- a/service/macie2/api_op_UpdateOrganizationConfiguration.go +++ b/service/macie2/api_op_UpdateOrganizationConfiguration.go @@ -10,8 +10,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates the Amazon Macie configuration settings for an Amazon Web Services -// organization. +// Updates the Amazon Macie configuration settings for an organization in +// Organizations. func (c *Client) UpdateOrganizationConfiguration(ctx context.Context, params *UpdateOrganizationConfigurationInput, optFns ...func(*Options)) (*UpdateOrganizationConfigurationOutput, error) { if params == nil { params = &UpdateOrganizationConfigurationInput{} @@ -29,8 +29,8 @@ func (c *Client) UpdateOrganizationConfiguration(ctx context.Context, params *Up type UpdateOrganizationConfigurationInput struct { - // Specifies whether to enable Amazon Macie automatically for each account, when - // the account is added to the Amazon Web Services organization. + // Specifies whether to enable Amazon Macie automatically for an account when the + // account is added to the organization in Organizations. // // This member is required. AutoEnable bool diff --git a/service/macie2/types/types.go b/service/macie2/types/types.go index d0dcad643d2..924de3df4a4 100644 --- a/service/macie2/types/types.go +++ b/service/macie2/types/types.go @@ -51,14 +51,14 @@ type AccountLevelPermissions struct { } // Provides information about the delegated Amazon Macie administrator account for -// an Amazon Web Services organization. +// an organization in Organizations. type AdminAccount struct { // The Amazon Web Services account ID for the account. AccountId *string - // The current status of the account as the delegated administrator of Amazon Macie - // for the organization. + // The current status of the account as the delegated Amazon Macie administrator + // account for the organization. Status AdminStatus noSmithyDocumentSerde @@ -1188,24 +1188,21 @@ type IamUser struct { noSmithyDocumentSerde } -// Provides information about an Amazon Macie membership invitation that was -// received by an account. +// Provides information about an Amazon Macie membership invitation. type Invitation struct { // The Amazon Web Services account ID for the account that sent the invitation. AccountId *string - // The unique identifier for the invitation. Amazon Macie uses this identifier to - // validate the inviter account with the invitee account. + // The unique identifier for the invitation. InvitationId *string // The date and time, in UTC and extended ISO 8601 format, when the invitation was // sent. InvitedAt *time.Time - // The status of the relationship between the account that sent the invitation - // (inviter account) and the account that received the invitation (invitee - // account). + // The status of the relationship between the account that sent the invitation and + // the account that received the invitation. RelationshipStatus RelationshipStatus noSmithyDocumentSerde @@ -1677,8 +1674,8 @@ type Member struct { Email *string // The date and time, in UTC and extended ISO 8601 format, when an Amazon Macie - // membership invitation was last sent to the account. This value is null if a - // Macie invitation hasn't been sent to the account. + // membership invitation was last sent to the account. This value is null if an + // invitation hasn't been sent to the account. InvitedAt *time.Time // (Deprecated) The Amazon Web Services account ID for the administrator account. @@ -2423,10 +2420,11 @@ type SeverityLevel struct { // This member is required. OccurrencesThreshold int64 - // The severity to assign to a finding if the number of occurrences is greater than - // or equal to the specified threshold (occurrencesThreshold) and, if applicable, - // is less than the threshold for the next consecutive severity level for the - // custom data identifier. + // The severity to assign to a finding: if the number of occurrences is greater + // than or equal to the specified threshold (occurrencesThreshold); and, if + // applicable, the number of occurrences is less than the threshold for the next + // consecutive severity level for the custom data identifier, moving from LOW to + // HIGH. // // This member is required. Severity DataIdentifierSeverity diff --git a/service/mgn/api_op_ChangeServerLifeCycleState.go b/service/mgn/api_op_ChangeServerLifeCycleState.go index 8dce04b34b1..9f72297277a 100644 --- a/service/mgn/api_op_ChangeServerLifeCycleState.go +++ b/service/mgn/api_op_ChangeServerLifeCycleState.go @@ -63,6 +63,9 @@ type ChangeServerLifeCycleStateOutput struct { // Source server lifecycle state. LifeCycle *types.LifeCycle + // Source server replication type. + ReplicationType types.ReplicationType + // Source server properties. SourceProperties *types.SourceProperties @@ -72,6 +75,9 @@ type ChangeServerLifeCycleStateOutput struct { // Source server Tags. Tags map[string]string + // Source server vCenter client id. + VcenterClientID *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/mgn/api_op_DeleteVcenterClient.go b/service/mgn/api_op_DeleteVcenterClient.go new file mode 100644 index 00000000000..d1a6d4c104a --- /dev/null +++ b/service/mgn/api_op_DeleteVcenterClient.go @@ -0,0 +1,116 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mgn + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a single vCenter client by ID. +func (c *Client) DeleteVcenterClient(ctx context.Context, params *DeleteVcenterClientInput, optFns ...func(*Options)) (*DeleteVcenterClientOutput, error) { + if params == nil { + params = &DeleteVcenterClientInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteVcenterClient", params, optFns, c.addOperationDeleteVcenterClientMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteVcenterClientOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteVcenterClientInput struct { + + // ID of resource to be deleted. + // + // This member is required. + VcenterClientID *string + + noSmithyDocumentSerde +} + +type DeleteVcenterClientOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteVcenterClientMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteVcenterClient{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteVcenterClient{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteVcenterClientValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVcenterClient(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteVcenterClient(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mgn", + OperationName: "DeleteVcenterClient", + } +} diff --git a/service/mgn/api_op_DescribeVcenterClients.go b/service/mgn/api_op_DescribeVcenterClients.go new file mode 100644 index 00000000000..6f196bff548 --- /dev/null +++ b/service/mgn/api_op_DescribeVcenterClients.go @@ -0,0 +1,206 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mgn + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/mgn/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all vCenter clients. +func (c *Client) DescribeVcenterClients(ctx context.Context, params *DescribeVcenterClientsInput, optFns ...func(*Options)) (*DescribeVcenterClientsOutput, error) { + if params == nil { + params = &DescribeVcenterClientsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeVcenterClients", params, optFns, c.addOperationDescribeVcenterClientsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeVcenterClientsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeVcenterClientsInput struct { + + // Maximum results to be returned in DescribeVcenterClients. + MaxResults int32 + + // Next pagination token to be provided for DescribeVcenterClients. + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeVcenterClientsOutput struct { + + // List of items returned by DescribeVcenterClients. + Items []types.VcenterClient + + // Next pagination token returned from DescribeVcenterClients. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeVcenterClientsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeVcenterClients{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeVcenterClients{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVcenterClients(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// DescribeVcenterClientsAPIClient is a client that implements the +// DescribeVcenterClients operation. +type DescribeVcenterClientsAPIClient interface { + DescribeVcenterClients(context.Context, *DescribeVcenterClientsInput, ...func(*Options)) (*DescribeVcenterClientsOutput, error) +} + +var _ DescribeVcenterClientsAPIClient = (*Client)(nil) + +// DescribeVcenterClientsPaginatorOptions is the paginator options for +// DescribeVcenterClients +type DescribeVcenterClientsPaginatorOptions struct { + // Maximum results to be returned in DescribeVcenterClients. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeVcenterClientsPaginator is a paginator for DescribeVcenterClients +type DescribeVcenterClientsPaginator struct { + options DescribeVcenterClientsPaginatorOptions + client DescribeVcenterClientsAPIClient + params *DescribeVcenterClientsInput + nextToken *string + firstPage bool +} + +// NewDescribeVcenterClientsPaginator returns a new DescribeVcenterClientsPaginator +func NewDescribeVcenterClientsPaginator(client DescribeVcenterClientsAPIClient, params *DescribeVcenterClientsInput, optFns ...func(*DescribeVcenterClientsPaginatorOptions)) *DescribeVcenterClientsPaginator { + if params == nil { + params = &DescribeVcenterClientsInput{} + } + + options := DescribeVcenterClientsPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeVcenterClientsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeVcenterClientsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribeVcenterClients page. +func (p *DescribeVcenterClientsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVcenterClientsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.MaxResults = p.options.Limit + + result, err := p.client.DescribeVcenterClients(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opDescribeVcenterClients(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mgn", + OperationName: "DescribeVcenterClients", + } +} diff --git a/service/mgn/api_op_DisconnectFromService.go b/service/mgn/api_op_DisconnectFromService.go index d4300fc305c..561eebea055 100644 --- a/service/mgn/api_op_DisconnectFromService.go +++ b/service/mgn/api_op_DisconnectFromService.go @@ -65,6 +65,9 @@ type DisconnectFromServiceOutput struct { // Source server lifecycle state. LifeCycle *types.LifeCycle + // Source server replication type. + ReplicationType types.ReplicationType + // Source server properties. SourceProperties *types.SourceProperties @@ -74,6 +77,9 @@ type DisconnectFromServiceOutput struct { // Source server Tags. Tags map[string]string + // Source server vCenter client id. + VcenterClientID *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/mgn/api_op_FinalizeCutover.go b/service/mgn/api_op_FinalizeCutover.go index 0e082070516..43bb77d8cc1 100644 --- a/service/mgn/api_op_FinalizeCutover.go +++ b/service/mgn/api_op_FinalizeCutover.go @@ -64,6 +64,9 @@ type FinalizeCutoverOutput struct { // Source server lifecycle state. LifeCycle *types.LifeCycle + // Source server replication type. + ReplicationType types.ReplicationType + // Source server properties. SourceProperties *types.SourceProperties @@ -73,6 +76,9 @@ type FinalizeCutoverOutput struct { // Source server Tags. Tags map[string]string + // Source server vCenter client id. + VcenterClientID *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/mgn/api_op_MarkAsArchived.go b/service/mgn/api_op_MarkAsArchived.go index 015249918f8..6a278afabd2 100644 --- a/service/mgn/api_op_MarkAsArchived.go +++ b/service/mgn/api_op_MarkAsArchived.go @@ -56,6 +56,9 @@ type MarkAsArchivedOutput struct { // Source server lifecycle state. LifeCycle *types.LifeCycle + // Source server replication type. + ReplicationType types.ReplicationType + // Source server properties. SourceProperties *types.SourceProperties @@ -65,6 +68,9 @@ type MarkAsArchivedOutput struct { // Source server Tags. Tags map[string]string + // Source server vCenter client id. + VcenterClientID *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/mgn/api_op_RetryDataReplication.go b/service/mgn/api_op_RetryDataReplication.go index 6de4822d8d5..728cb3eb099 100644 --- a/service/mgn/api_op_RetryDataReplication.go +++ b/service/mgn/api_op_RetryDataReplication.go @@ -57,6 +57,9 @@ type RetryDataReplicationOutput struct { // Source server lifecycle state. LifeCycle *types.LifeCycle + // Source server replication type. + ReplicationType types.ReplicationType + // Source server properties. SourceProperties *types.SourceProperties @@ -66,6 +69,9 @@ type RetryDataReplicationOutput struct { // Source server Tags. Tags map[string]string + // Source server vCenter client id. + VcenterClientID *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/mgn/api_op_StartReplication.go b/service/mgn/api_op_StartReplication.go new file mode 100644 index 00000000000..0ed95bdd626 --- /dev/null +++ b/service/mgn/api_op_StartReplication.go @@ -0,0 +1,148 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mgn + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/mgn/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Starts replication on source server by ID. +func (c *Client) StartReplication(ctx context.Context, params *StartReplicationInput, optFns ...func(*Options)) (*StartReplicationOutput, error) { + if params == nil { + params = &StartReplicationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartReplication", params, optFns, c.addOperationStartReplicationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartReplicationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartReplicationInput struct { + + // ID of source server on which to start replication. + // + // This member is required. + SourceServerID *string + + noSmithyDocumentSerde +} + +type StartReplicationOutput struct { + + // Source server ARN. + Arn *string + + // Source server data replication info. + DataReplicationInfo *types.DataReplicationInfo + + // Source server archived status. + IsArchived *bool + + // Source server launched instance. + LaunchedInstance *types.LaunchedInstance + + // Source server lifecycle state. + LifeCycle *types.LifeCycle + + // Source server replication type. + ReplicationType types.ReplicationType + + // Source server properties. + SourceProperties *types.SourceProperties + + // Source server ID. + SourceServerID *string + + // Source server Tags. + Tags map[string]string + + // Source server vCenter client id. + VcenterClientID *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartReplicationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpStartReplication{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartReplication{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpStartReplicationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartReplication(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStartReplication(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mgn", + OperationName: "StartReplication", + } +} diff --git a/service/mgn/api_op_UpdateSourceServerReplicationType.go b/service/mgn/api_op_UpdateSourceServerReplicationType.go new file mode 100644 index 00000000000..341106f656c --- /dev/null +++ b/service/mgn/api_op_UpdateSourceServerReplicationType.go @@ -0,0 +1,153 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mgn + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/mgn/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates source server Replication Type by ID. +func (c *Client) UpdateSourceServerReplicationType(ctx context.Context, params *UpdateSourceServerReplicationTypeInput, optFns ...func(*Options)) (*UpdateSourceServerReplicationTypeOutput, error) { + if params == nil { + params = &UpdateSourceServerReplicationTypeInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateSourceServerReplicationType", params, optFns, c.addOperationUpdateSourceServerReplicationTypeMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateSourceServerReplicationTypeOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateSourceServerReplicationTypeInput struct { + + // Replication type to which to update source server. + // + // This member is required. + ReplicationType types.ReplicationType + + // ID of source server on which to update replication type. + // + // This member is required. + SourceServerID *string + + noSmithyDocumentSerde +} + +type UpdateSourceServerReplicationTypeOutput struct { + + // Source server ARN. + Arn *string + + // Source server data replication info. + DataReplicationInfo *types.DataReplicationInfo + + // Source server archived status. + IsArchived *bool + + // Source server launched instance. + LaunchedInstance *types.LaunchedInstance + + // Source server lifecycle state. + LifeCycle *types.LifeCycle + + // Source server replication type. + ReplicationType types.ReplicationType + + // Source server properties. + SourceProperties *types.SourceProperties + + // Source server ID. + SourceServerID *string + + // Source server Tags. + Tags map[string]string + + // Source server vCenter client id. + VcenterClientID *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateSourceServerReplicationTypeMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateSourceServerReplicationType{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateSourceServerReplicationType{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateSourceServerReplicationTypeValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSourceServerReplicationType(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateSourceServerReplicationType(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mgn", + OperationName: "UpdateSourceServerReplicationType", + } +} diff --git a/service/mgn/deserializers.go b/service/mgn/deserializers.go index c459dc2bd03..0df1a23a21f 100644 --- a/service/mgn/deserializers.go +++ b/service/mgn/deserializers.go @@ -195,6 +195,15 @@ func awsRestjson1_deserializeOpDocumentChangeServerLifeCycleStateOutput(v **Chan return err } + case "replicationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReplicationType to be of type string, got %T instead", value) + } + sv.ReplicationType = types.ReplicationType(jtv) + } + case "sourceProperties": if err := awsRestjson1_deserializeDocumentSourceProperties(&sv.SourceProperties, value); err != nil { return err @@ -214,6 +223,15 @@ func awsRestjson1_deserializeOpDocumentChangeServerLifeCycleStateOutput(v **Chan return err } + case "vcenterClientID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VcenterClientID to be of type string, got %T instead", value) + } + sv.VcenterClientID = ptr.String(jtv) + } + default: _, _ = key, value @@ -765,6 +783,101 @@ func awsRestjson1_deserializeOpErrorDeleteSourceServer(response *smithyhttp.Resp } } +type awsRestjson1_deserializeOpDeleteVcenterClient struct { +} + +func (*awsRestjson1_deserializeOpDeleteVcenterClient) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteVcenterClient) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteVcenterClient(response, &metadata) + } + output := &DeleteVcenterClientOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteVcenterClient(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("UninitializedAccountException", errorCode): + return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpDescribeJobLogItems struct { } @@ -1404,14 +1517,14 @@ func awsRestjson1_deserializeOpDocumentDescribeSourceServersOutput(v **DescribeS return nil } -type awsRestjson1_deserializeOpDisconnectFromService struct { +type awsRestjson1_deserializeOpDescribeVcenterClients struct { } -func (*awsRestjson1_deserializeOpDisconnectFromService) ID() string { +func (*awsRestjson1_deserializeOpDescribeVcenterClients) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDisconnectFromService) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeVcenterClients) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1425,9 +1538,9 @@ func (m *awsRestjson1_deserializeOpDisconnectFromService) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDisconnectFromService(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeVcenterClients(response, &metadata) } - output := &DisconnectFromServiceOutput{} + output := &DescribeVcenterClientsOutput{} out.Result = output var buff [1024]byte @@ -1448,7 +1561,7 @@ func (m *awsRestjson1_deserializeOpDisconnectFromService) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDisconnectFromServiceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeVcenterClientsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1461,7 +1574,7 @@ func (m *awsRestjson1_deserializeOpDisconnectFromService) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorDisconnectFromService(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeVcenterClients(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1502,15 +1615,15 @@ func awsRestjson1_deserializeOpErrorDisconnectFromService(response *smithyhttp.R } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("UninitializedAccountException", errorCode): return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -1521,7 +1634,7 @@ func awsRestjson1_deserializeOpErrorDisconnectFromService(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentDisconnectFromServiceOutput(v **DisconnectFromServiceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeVcenterClientsOutput(v **DescribeVcenterClientsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1534,65 +1647,27 @@ func awsRestjson1_deserializeOpDocumentDisconnectFromServiceOutput(v **Disconnec return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DisconnectFromServiceOutput + var sv *DescribeVcenterClientsOutput if *v == nil { - sv = &DisconnectFromServiceOutput{} + sv = &DescribeVcenterClientsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ARN to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "dataReplicationInfo": - if err := awsRestjson1_deserializeDocumentDataReplicationInfo(&sv.DataReplicationInfo, value); err != nil { - return err - } - - case "isArchived": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.IsArchived = ptr.Bool(jtv) - } - - case "launchedInstance": - if err := awsRestjson1_deserializeDocumentLaunchedInstance(&sv.LaunchedInstance, value); err != nil { - return err - } - - case "lifeCycle": - if err := awsRestjson1_deserializeDocumentLifeCycle(&sv.LifeCycle, value); err != nil { - return err - } - - case "sourceProperties": - if err := awsRestjson1_deserializeDocumentSourceProperties(&sv.SourceProperties, value); err != nil { + case "items": + if err := awsRestjson1_deserializeDocumentVcenterClientList(&sv.Items, value); err != nil { return err } - case "sourceServerID": + case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SourceServerID to be of type string, got %T instead", value) + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } - sv.SourceServerID = ptr.String(jtv) - } - - case "tags": - if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { - return err + sv.NextToken = ptr.String(jtv) } default: @@ -1604,14 +1679,14 @@ func awsRestjson1_deserializeOpDocumentDisconnectFromServiceOutput(v **Disconnec return nil } -type awsRestjson1_deserializeOpFinalizeCutover struct { +type awsRestjson1_deserializeOpDisconnectFromService struct { } -func (*awsRestjson1_deserializeOpFinalizeCutover) ID() string { +func (*awsRestjson1_deserializeOpDisconnectFromService) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpFinalizeCutover) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDisconnectFromService) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1625,9 +1700,9 @@ func (m *awsRestjson1_deserializeOpFinalizeCutover) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorFinalizeCutover(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDisconnectFromService(response, &metadata) } - output := &FinalizeCutoverOutput{} + output := &DisconnectFromServiceOutput{} out.Result = output var buff [1024]byte @@ -1648,7 +1723,7 @@ func (m *awsRestjson1_deserializeOpFinalizeCutover) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentFinalizeCutoverOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDisconnectFromServiceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1661,7 +1736,7 @@ func (m *awsRestjson1_deserializeOpFinalizeCutover) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorFinalizeCutover(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDisconnectFromService(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1711,9 +1786,6 @@ func awsRestjson1_deserializeOpErrorFinalizeCutover(response *smithyhttp.Respons case strings.EqualFold("UninitializedAccountException", errorCode): return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): - return awsRestjson1_deserializeErrorValidationException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -1724,7 +1796,7 @@ func awsRestjson1_deserializeOpErrorFinalizeCutover(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpDocumentFinalizeCutoverOutput(v **FinalizeCutoverOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDisconnectFromServiceOutput(v **DisconnectFromServiceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1737,9 +1809,9 @@ func awsRestjson1_deserializeOpDocumentFinalizeCutoverOutput(v **FinalizeCutover return fmt.Errorf("unexpected JSON type %v", value) } - var sv *FinalizeCutoverOutput + var sv *DisconnectFromServiceOutput if *v == nil { - sv = &FinalizeCutoverOutput{} + sv = &DisconnectFromServiceOutput{} } else { sv = *v } @@ -1779,6 +1851,15 @@ func awsRestjson1_deserializeOpDocumentFinalizeCutoverOutput(v **FinalizeCutover return err } + case "replicationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReplicationType to be of type string, got %T instead", value) + } + sv.ReplicationType = types.ReplicationType(jtv) + } + case "sourceProperties": if err := awsRestjson1_deserializeDocumentSourceProperties(&sv.SourceProperties, value); err != nil { return err @@ -1798,6 +1879,15 @@ func awsRestjson1_deserializeOpDocumentFinalizeCutoverOutput(v **FinalizeCutover return err } + case "vcenterClientID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VcenterClientID to be of type string, got %T instead", value) + } + sv.VcenterClientID = ptr.String(jtv) + } + default: _, _ = key, value @@ -1807,14 +1897,14 @@ func awsRestjson1_deserializeOpDocumentFinalizeCutoverOutput(v **FinalizeCutover return nil } -type awsRestjson1_deserializeOpGetLaunchConfiguration struct { +type awsRestjson1_deserializeOpFinalizeCutover struct { } -func (*awsRestjson1_deserializeOpGetLaunchConfiguration) ID() string { +func (*awsRestjson1_deserializeOpFinalizeCutover) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetLaunchConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpFinalizeCutover) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1828,9 +1918,9 @@ func (m *awsRestjson1_deserializeOpGetLaunchConfiguration) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetLaunchConfiguration(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorFinalizeCutover(response, &metadata) } - output := &GetLaunchConfigurationOutput{} + output := &FinalizeCutoverOutput{} out.Result = output var buff [1024]byte @@ -1851,7 +1941,7 @@ func (m *awsRestjson1_deserializeOpGetLaunchConfiguration) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetLaunchConfigurationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentFinalizeCutoverOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1864,7 +1954,7 @@ func (m *awsRestjson1_deserializeOpGetLaunchConfiguration) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetLaunchConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorFinalizeCutover(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1905,12 +1995,18 @@ func awsRestjson1_deserializeOpErrorGetLaunchConfiguration(response *smithyhttp. } switch { + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("UninitializedAccountException", errorCode): return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -1921,7 +2017,7 @@ func awsRestjson1_deserializeOpErrorGetLaunchConfiguration(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentGetLaunchConfigurationOutput(v **GetLaunchConfigurationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentFinalizeCutoverOutput(v **FinalizeCutoverOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1934,43 +2030,258 @@ func awsRestjson1_deserializeOpDocumentGetLaunchConfigurationOutput(v **GetLaunc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetLaunchConfigurationOutput + var sv *FinalizeCutoverOutput if *v == nil { - sv = &GetLaunchConfigurationOutput{} + sv = &FinalizeCutoverOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "copyPrivateIp": + case "arn": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) } - sv.CopyPrivateIp = ptr.Bool(jtv) + sv.Arn = ptr.String(jtv) } - case "copyTags": + case "dataReplicationInfo": + if err := awsRestjson1_deserializeDocumentDataReplicationInfo(&sv.DataReplicationInfo, value); err != nil { + return err + } + + case "isArchived": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } - sv.CopyTags = ptr.Bool(jtv) + sv.IsArchived = ptr.Bool(jtv) } - case "ec2LaunchTemplateID": + case "launchedInstance": + if err := awsRestjson1_deserializeDocumentLaunchedInstance(&sv.LaunchedInstance, value); err != nil { + return err + } + + case "lifeCycle": + if err := awsRestjson1_deserializeDocumentLifeCycle(&sv.LifeCycle, value); err != nil { + return err + } + + case "replicationType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + return fmt.Errorf("expected ReplicationType to be of type string, got %T instead", value) } - sv.Ec2LaunchTemplateID = ptr.String(jtv) + sv.ReplicationType = types.ReplicationType(jtv) } - case "launchDisposition": + case "sourceProperties": + if err := awsRestjson1_deserializeDocumentSourceProperties(&sv.SourceProperties, value); err != nil { + return err + } + + case "sourceServerID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SourceServerID to be of type string, got %T instead", value) + } + sv.SourceServerID = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { + return err + } + + case "vcenterClientID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VcenterClientID to be of type string, got %T instead", value) + } + sv.VcenterClientID = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetLaunchConfiguration struct { +} + +func (*awsRestjson1_deserializeOpGetLaunchConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetLaunchConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetLaunchConfiguration(response, &metadata) + } + output := &GetLaunchConfigurationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetLaunchConfigurationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetLaunchConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("UninitializedAccountException", errorCode): + return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetLaunchConfigurationOutput(v **GetLaunchConfigurationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetLaunchConfigurationOutput + if *v == nil { + sv = &GetLaunchConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "copyPrivateIp": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.CopyPrivateIp = ptr.Bool(jtv) + } + + case "copyTags": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.CopyTags = ptr.Bool(jtv) + } + + case "ec2LaunchTemplateID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + } + sv.Ec2LaunchTemplateID = ptr.String(jtv) + } + + case "launchDisposition": if value != nil { jtv, ok := value.(string) if !ok { @@ -2709,6 +3020,15 @@ func awsRestjson1_deserializeOpDocumentMarkAsArchivedOutput(v **MarkAsArchivedOu return err } + case "replicationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReplicationType to be of type string, got %T instead", value) + } + sv.ReplicationType = types.ReplicationType(jtv) + } + case "sourceProperties": if err := awsRestjson1_deserializeDocumentSourceProperties(&sv.SourceProperties, value); err != nil { return err @@ -2728,6 +3048,15 @@ func awsRestjson1_deserializeOpDocumentMarkAsArchivedOutput(v **MarkAsArchivedOu return err } + case "vcenterClientID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VcenterClientID to be of type string, got %T instead", value) + } + sv.VcenterClientID = ptr.String(jtv) + } + default: _, _ = key, value @@ -2909,6 +3238,15 @@ func awsRestjson1_deserializeOpDocumentRetryDataReplicationOutput(v **RetryDataR return err } + case "replicationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReplicationType to be of type string, got %T instead", value) + } + sv.ReplicationType = types.ReplicationType(jtv) + } + case "sourceProperties": if err := awsRestjson1_deserializeDocumentSourceProperties(&sv.SourceProperties, value); err != nil { return err @@ -2928,6 +3266,15 @@ func awsRestjson1_deserializeOpDocumentRetryDataReplicationOutput(v **RetryDataR return err } + case "vcenterClientID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VcenterClientID to be of type string, got %T instead", value) + } + sv.VcenterClientID = ptr.String(jtv) + } + default: _, _ = key, value @@ -3054,33 +3401,257 @@ func awsRestjson1_deserializeOpErrorStartCutover(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentStartCutoverOutput(v **StartCutoverOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } +func awsRestjson1_deserializeOpDocumentStartCutoverOutput(v **StartCutoverOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartCutoverOutput + if *v == nil { + sv = &StartCutoverOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "job": + if err := awsRestjson1_deserializeDocumentJob(&sv.Job, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpStartReplication struct { +} + +func (*awsRestjson1_deserializeOpStartReplication) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpStartReplication) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorStartReplication(response, &metadata) + } + output := &StartReplicationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentStartReplicationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorStartReplication(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("UninitializedAccountException", errorCode): + return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentStartReplicationOutput(v **StartReplicationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartReplicationOutput + if *v == nil { + sv = &StartReplicationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "dataReplicationInfo": + if err := awsRestjson1_deserializeDocumentDataReplicationInfo(&sv.DataReplicationInfo, value); err != nil { + return err + } + + case "isArchived": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IsArchived = ptr.Bool(jtv) + } + + case "launchedInstance": + if err := awsRestjson1_deserializeDocumentLaunchedInstance(&sv.LaunchedInstance, value); err != nil { + return err + } + + case "lifeCycle": + if err := awsRestjson1_deserializeDocumentLifeCycle(&sv.LifeCycle, value); err != nil { + return err + } + + case "replicationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReplicationType to be of type string, got %T instead", value) + } + sv.ReplicationType = types.ReplicationType(jtv) + } - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + case "sourceProperties": + if err := awsRestjson1_deserializeDocumentSourceProperties(&sv.SourceProperties, value); err != nil { + return err + } - var sv *StartCutoverOutput - if *v == nil { - sv = &StartCutoverOutput{} - } else { - sv = *v - } + case "sourceServerID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SourceServerID to be of type string, got %T instead", value) + } + sv.SourceServerID = ptr.String(jtv) + } - for key, value := range shape { - switch key { - case "job": - if err := awsRestjson1_deserializeDocumentJob(&sv.Job, value); err != nil { + case "tags": + if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { return err } + case "vcenterClientID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VcenterClientID to be of type string, got %T instead", value) + } + sv.VcenterClientID = ptr.String(jtv) + } + default: _, _ = key, value @@ -4358,13 +4929,234 @@ func awsRestjson1_deserializeOpDocumentUpdateReplicationConfigurationTemplateOut return err } - case "useDedicatedReplicationServer": + case "useDedicatedReplicationServer": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.UseDedicatedReplicationServer = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateSourceServerReplicationType struct { +} + +func (*awsRestjson1_deserializeOpUpdateSourceServerReplicationType) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateSourceServerReplicationType) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateSourceServerReplicationType(response, &metadata) + } + output := &UpdateSourceServerReplicationTypeOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateSourceServerReplicationTypeOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateSourceServerReplicationType(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("UninitializedAccountException", errorCode): + return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateSourceServerReplicationTypeOutput(v **UpdateSourceServerReplicationTypeOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateSourceServerReplicationTypeOutput + if *v == nil { + sv = &UpdateSourceServerReplicationTypeOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "dataReplicationInfo": + if err := awsRestjson1_deserializeDocumentDataReplicationInfo(&sv.DataReplicationInfo, value); err != nil { + return err + } + + case "isArchived": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IsArchived = ptr.Bool(jtv) + } + + case "launchedInstance": + if err := awsRestjson1_deserializeDocumentLaunchedInstance(&sv.LaunchedInstance, value); err != nil { + return err + } + + case "lifeCycle": + if err := awsRestjson1_deserializeDocumentLifeCycle(&sv.LifeCycle, value); err != nil { + return err + } + + case "replicationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReplicationType to be of type string, got %T instead", value) + } + sv.ReplicationType = types.ReplicationType(jtv) + } + + case "sourceProperties": + if err := awsRestjson1_deserializeDocumentSourceProperties(&sv.SourceProperties, value); err != nil { + return err + } + + case "sourceServerID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SourceServerID to be of type string, got %T instead", value) + } + sv.SourceServerID = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { + return err + } + + case "vcenterClientID": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + return fmt.Errorf("expected VcenterClientID to be of type string, got %T instead", value) } - sv.UseDedicatedReplicationServer = ptr.Bool(jtv) + sv.VcenterClientID = ptr.String(jtv) } default: @@ -4552,6 +5344,42 @@ func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp return output } +func awsRestjson1_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServiceQuotaExceededException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentServiceQuotaExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ThrottlingException{} var buff [1024]byte @@ -4975,6 +5803,15 @@ func awsRestjson1_deserializeDocumentDataReplicationInfo(v **types.DataReplicati sv.LagDuration = ptr.String(jtv) } + case "lastSnapshotDateTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) + } + sv.LastSnapshotDateTime = ptr.String(jtv) + } + case "replicatedDisks": if err := awsRestjson1_deserializeDocumentDataReplicationInfoReplicatedDisks(&sv.ReplicatedDisks, value); err != nil { return err @@ -5388,6 +6225,15 @@ func awsRestjson1_deserializeDocumentIdentificationHints(v **types.Identificatio sv.Hostname = ptr.String(jtv) } + case "vmPath": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + } + sv.VmPath = ptr.String(jtv) + } + case "vmWareUuid": if value != nil { jtv, ok := value.(string) @@ -6933,6 +7779,91 @@ func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.Resourc return nil } +func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ServiceQuotaExceededException + if *v == nil { + sv = &types.ServiceQuotaExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LargeBoundedString to be of type string, got %T instead", value) + } + sv.Code = ptr.String(jtv) + } + + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LargeBoundedString to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "quotaCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LargeBoundedString to be of type string, got %T instead", value) + } + sv.QuotaCode = ptr.String(jtv) + } + + case "resourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LargeBoundedString to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + + case "resourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LargeBoundedString to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + case "serviceCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LargeBoundedString to be of type string, got %T instead", value) + } + sv.ServiceCode = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentSourceProperties(v **types.SourceProperties, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -7075,6 +8006,15 @@ func awsRestjson1_deserializeDocumentSourceServer(v **types.SourceServer, value return err } + case "replicationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReplicationType to be of type string, got %T instead", value) + } + sv.ReplicationType = types.ReplicationType(jtv) + } + case "sourceProperties": if err := awsRestjson1_deserializeDocumentSourceProperties(&sv.SourceProperties, value); err != nil { return err @@ -7094,6 +8034,15 @@ func awsRestjson1_deserializeDocumentSourceServer(v **types.SourceServer, value return err } + case "vcenterClientID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VcenterClientID to be of type string, got %T instead", value) + } + sv.VcenterClientID = ptr.String(jtv) + } + default: _, _ = key, value @@ -7434,3 +8383,132 @@ func awsRestjson1_deserializeDocumentValidationExceptionFieldList(v *[]types.Val *v = cv return nil } + +func awsRestjson1_deserializeDocumentVcenterClient(v **types.VcenterClient, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.VcenterClient + if *v == nil { + sv = &types.VcenterClient{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "datacenterName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + } + sv.DatacenterName = ptr.String(jtv) + } + + case "hostname": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + } + sv.Hostname = ptr.String(jtv) + } + + case "lastSeenDatetime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) + } + sv.LastSeenDatetime = ptr.String(jtv) + } + + case "sourceServerTags": + if err := awsRestjson1_deserializeDocumentTagsMap(&sv.SourceServerTags, value); err != nil { + return err + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { + return err + } + + case "vcenterClientID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VcenterClientID to be of type string, got %T instead", value) + } + sv.VcenterClientID = ptr.String(jtv) + } + + case "vcenterUUID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + } + sv.VcenterUUID = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentVcenterClientList(v *[]types.VcenterClient, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.VcenterClient + if *v == nil { + cv = []types.VcenterClient{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.VcenterClient + destAddr := &col + if err := awsRestjson1_deserializeDocumentVcenterClient(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} diff --git a/service/mgn/generated.json b/service/mgn/generated.json index e69811b5753..105f93c7d87 100644 --- a/service/mgn/generated.json +++ b/service/mgn/generated.json @@ -12,10 +12,12 @@ "api_op_DeleteJob.go", "api_op_DeleteReplicationConfigurationTemplate.go", "api_op_DeleteSourceServer.go", + "api_op_DeleteVcenterClient.go", "api_op_DescribeJobLogItems.go", "api_op_DescribeJobs.go", "api_op_DescribeReplicationConfigurationTemplates.go", "api_op_DescribeSourceServers.go", + "api_op_DescribeVcenterClients.go", "api_op_DisconnectFromService.go", "api_op_FinalizeCutover.go", "api_op_GetLaunchConfiguration.go", @@ -25,6 +27,7 @@ "api_op_MarkAsArchived.go", "api_op_RetryDataReplication.go", "api_op_StartCutover.go", + "api_op_StartReplication.go", "api_op_StartTest.go", "api_op_TagResource.go", "api_op_TerminateTargetInstances.go", @@ -32,6 +35,7 @@ "api_op_UpdateLaunchConfiguration.go", "api_op_UpdateReplicationConfiguration.go", "api_op_UpdateReplicationConfigurationTemplate.go", + "api_op_UpdateSourceServerReplicationType.go", "deserializers.go", "doc.go", "endpoints.go", diff --git a/service/mgn/serializers.go b/service/mgn/serializers.go index 79841ce0ecc..3ae67a7e009 100644 --- a/service/mgn/serializers.go +++ b/service/mgn/serializers.go @@ -427,6 +427,74 @@ func awsRestjson1_serializeOpDocumentDeleteSourceServerInput(v *DeleteSourceServ return nil } +type awsRestjson1_serializeOpDeleteVcenterClient struct { +} + +func (*awsRestjson1_serializeOpDeleteVcenterClient) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteVcenterClient) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteVcenterClientInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/DeleteVcenterClient") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentDeleteVcenterClientInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteVcenterClientInput(v *DeleteVcenterClientInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDeleteVcenterClientInput(v *DeleteVcenterClientInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.VcenterClientID != nil { + ok := object.Key("vcenterClientID") + ok.String(*v.VcenterClientID) + } + + return nil +} + type awsRestjson1_serializeOpDescribeJobLogItems struct { } @@ -745,6 +813,63 @@ func awsRestjson1_serializeOpDocumentDescribeSourceServersInput(v *DescribeSourc return nil } +type awsRestjson1_serializeOpDescribeVcenterClients struct { +} + +func (*awsRestjson1_serializeOpDescribeVcenterClients) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeVcenterClients) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeVcenterClientsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/DescribeVcenterClients") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeVcenterClientsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeVcenterClientsInput(v *DescribeVcenterClientsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != 0 { + encoder.SetQuery("maxResults").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + type awsRestjson1_serializeOpDisconnectFromService struct { } @@ -1333,6 +1458,74 @@ func awsRestjson1_serializeOpDocumentStartCutoverInput(v *StartCutoverInput, val return nil } +type awsRestjson1_serializeOpStartReplication struct { +} + +func (*awsRestjson1_serializeOpStartReplication) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStartReplication) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StartReplicationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/StartReplication") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentStartReplicationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsStartReplicationInput(v *StartReplicationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentStartReplicationInput(v *StartReplicationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SourceServerID != nil { + ok := object.Key("sourceServerID") + ok.String(*v.SourceServerID) + } + + return nil +} + type awsRestjson1_serializeOpStartTest struct { } @@ -2015,6 +2208,79 @@ func awsRestjson1_serializeOpDocumentUpdateReplicationConfigurationTemplateInput return nil } +type awsRestjson1_serializeOpUpdateSourceServerReplicationType struct { +} + +func (*awsRestjson1_serializeOpUpdateSourceServerReplicationType) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateSourceServerReplicationType) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateSourceServerReplicationTypeInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/UpdateSourceServerReplicationType") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateSourceServerReplicationTypeInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateSourceServerReplicationTypeInput(v *UpdateSourceServerReplicationTypeInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateSourceServerReplicationTypeInput(v *UpdateSourceServerReplicationTypeInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.ReplicationType) > 0 { + ok := object.Key("replicationType") + ok.String(string(v.ReplicationType)) + } + + if v.SourceServerID != nil { + ok := object.Key("sourceServerID") + ok.String(*v.SourceServerID) + } + + return nil +} + func awsRestjson1_serializeDocumentChangeServerLifeCycleStateSourceServerLifecycle(v *types.ChangeServerLifeCycleStateSourceServerLifecycle, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2071,6 +2337,20 @@ func awsRestjson1_serializeDocumentDescribeSourceServersRequestFilters(v *types. ok.Boolean(*v.IsArchived) } + if v.LifeCycleStates != nil { + ok := object.Key("lifeCycleStates") + if err := awsRestjson1_serializeDocumentLifeCycleStates(v.LifeCycleStates, ok); err != nil { + return err + } + } + + if v.ReplicationTypes != nil { + ok := object.Key("replicationTypes") + if err := awsRestjson1_serializeDocumentReplicationTypes(v.ReplicationTypes, ok); err != nil { + return err + } + } + if v.SourceServerIDs != nil { ok := object.Key("sourceServerIDs") if err := awsRestjson1_serializeDocumentDescribeSourceServersRequestFiltersIDs(v.SourceServerIDs, ok); err != nil { @@ -2104,6 +2384,17 @@ func awsRestjson1_serializeDocumentLicensing(v *types.Licensing, value smithyjso return nil } +func awsRestjson1_serializeDocumentLifeCycleStates(v []types.LifeCycleState, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + func awsRestjson1_serializeDocumentReplicationConfigurationReplicatedDisk(v *types.ReplicationConfigurationReplicatedDisk, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2166,6 +2457,17 @@ func awsRestjson1_serializeDocumentReplicationServersSecurityGroupsIDs(v []strin return nil } +func awsRestjson1_serializeDocumentReplicationTypes(v []types.ReplicationType, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + func awsRestjson1_serializeDocumentStartCutoverRequestSourceServerIDs(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() diff --git a/service/mgn/types/enums.go b/service/mgn/types/enums.go index 22fc31cfa81..623bec4752a 100644 --- a/service/mgn/types/enums.go +++ b/service/mgn/types/enums.go @@ -41,6 +41,8 @@ const ( DataReplicationErrorStringFailedToPairReplicationServerWithAgent DataReplicationErrorString = "FAILED_TO_PAIR_REPLICATION_SERVER_WITH_AGENT" DataReplicationErrorStringFailedToConnectAgentToReplicationServer DataReplicationErrorString = "FAILED_TO_CONNECT_AGENT_TO_REPLICATION_SERVER" DataReplicationErrorStringFailedToStartDataTransfer DataReplicationErrorString = "FAILED_TO_START_DATA_TRANSFER" + DataReplicationErrorStringUnsupportedVmConfiguration DataReplicationErrorString = "UNSUPPORTED_VM_CONFIGURATION" + DataReplicationErrorStringLastSnapshotJobFailed DataReplicationErrorString = "LAST_SNAPSHOT_JOB_FAILED" ) // Values returns all known values for DataReplicationErrorString. Note that this @@ -62,6 +64,8 @@ func (DataReplicationErrorString) Values() []DataReplicationErrorString { "FAILED_TO_PAIR_REPLICATION_SERVER_WITH_AGENT", "FAILED_TO_CONNECT_AGENT_TO_REPLICATION_SERVER", "FAILED_TO_START_DATA_TRANSFER", + "UNSUPPORTED_VM_CONFIGURATION", + "LAST_SNAPSHOT_JOB_FAILED", } } @@ -131,16 +135,18 @@ type DataReplicationState string // Enum values for DataReplicationState const ( - DataReplicationStateStopped DataReplicationState = "STOPPED" - DataReplicationStateInitiating DataReplicationState = "INITIATING" - DataReplicationStateInitialSync DataReplicationState = "INITIAL_SYNC" - DataReplicationStateBacklog DataReplicationState = "BACKLOG" - DataReplicationStateCreatingSnapshot DataReplicationState = "CREATING_SNAPSHOT" - DataReplicationStateContinuous DataReplicationState = "CONTINUOUS" - DataReplicationStatePaused DataReplicationState = "PAUSED" - DataReplicationStateRescan DataReplicationState = "RESCAN" - DataReplicationStateStalled DataReplicationState = "STALLED" - DataReplicationStateDisconnected DataReplicationState = "DISCONNECTED" + DataReplicationStateStopped DataReplicationState = "STOPPED" + DataReplicationStateInitiating DataReplicationState = "INITIATING" + DataReplicationStateInitialSync DataReplicationState = "INITIAL_SYNC" + DataReplicationStateBacklog DataReplicationState = "BACKLOG" + DataReplicationStateCreatingSnapshot DataReplicationState = "CREATING_SNAPSHOT" + DataReplicationStateContinuous DataReplicationState = "CONTINUOUS" + DataReplicationStatePaused DataReplicationState = "PAUSED" + DataReplicationStateRescan DataReplicationState = "RESCAN" + DataReplicationStateStalled DataReplicationState = "STALLED" + DataReplicationStateDisconnected DataReplicationState = "DISCONNECTED" + DataReplicationStatePendingSnapshotShipping DataReplicationState = "PENDING_SNAPSHOT_SHIPPING" + DataReplicationStateShippingSnapshot DataReplicationState = "SHIPPING_SNAPSHOT" ) // Values returns all known values for DataReplicationState. Note that this can be @@ -158,6 +164,8 @@ func (DataReplicationState) Values() []DataReplicationState { "RESCAN", "STALLED", "DISCONNECTED", + "PENDING_SNAPSHOT_SHIPPING", + "SHIPPING_SNAPSHOT", } } @@ -343,6 +351,7 @@ const ( LifeCycleStateCuttingOver LifeCycleState = "CUTTING_OVER" LifeCycleStateCutover LifeCycleState = "CUTOVER" LifeCycleStateDisconnected LifeCycleState = "DISCONNECTED" + LifeCycleStateDiscovered LifeCycleState = "DISCOVERED" ) // Values returns all known values for LifeCycleState. Note that this can be @@ -358,6 +367,7 @@ func (LifeCycleState) Values() []LifeCycleState { "CUTTING_OVER", "CUTOVER", "DISCONNECTED", + "DISCOVERED", } } @@ -445,6 +455,24 @@ func (ReplicationConfigurationReplicatedDiskStagingDiskType) Values() []Replicat } } +type ReplicationType string + +// Enum values for ReplicationType +const ( + ReplicationTypeAgentBased ReplicationType = "AGENT_BASED" + ReplicationTypeSnapshotShipping ReplicationType = "SNAPSHOT_SHIPPING" +) + +// Values returns all known values for ReplicationType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ReplicationType) Values() []ReplicationType { + return []ReplicationType{ + "AGENT_BASED", + "SNAPSHOT_SHIPPING", + } +} + type TargetInstanceTypeRightSizingMethod string // Enum values for TargetInstanceTypeRightSizingMethod diff --git a/service/mgn/types/errors.go b/service/mgn/types/errors.go index 85796468bec..6dbfc6880dd 100644 --- a/service/mgn/types/errors.go +++ b/service/mgn/types/errors.go @@ -97,6 +97,31 @@ func (e *ResourceNotFoundException) ErrorMessage() string { func (e *ResourceNotFoundException) ErrorCode() string { return "ResourceNotFoundException" } func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The request could not be completed because its exceeded the service quota. +type ServiceQuotaExceededException struct { + Message *string + + Code *string + ResourceId *string + ResourceType *string + ServiceCode *string + QuotaCode *string + + noSmithyDocumentSerde +} + +func (e *ServiceQuotaExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceQuotaExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceQuotaExceededException) ErrorCode() string { return "ServiceQuotaExceededException" } +func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // Reached throttling quota exception. type ThrottlingException struct { Message *string diff --git a/service/mgn/types/types.go b/service/mgn/types/types.go index 571e35d2078..8d63b6dba6a 100644 --- a/service/mgn/types/types.go +++ b/service/mgn/types/types.go @@ -59,6 +59,9 @@ type DataReplicationInfo struct { // Request to query data replication lag durating. LagDuration *string + // Request to query data replication last snapshot time. + LastSnapshotDateTime *string + // Request to query disks replicated. ReplicatedDisks []DataReplicationInfoReplicatedDisk @@ -134,6 +137,12 @@ type DescribeSourceServersRequestFilters struct { // Request to filter Source Servers list by archived. IsArchived *bool + // Request to filter Source Servers list by life cycle states. + LifeCycleStates []LifeCycleState + + // Request to filter Source Servers list by replication type. + ReplicationTypes []ReplicationType + // Request to filter Source Servers list by Source Server ID. SourceServerIDs []string @@ -164,6 +173,9 @@ type IdentificationHints struct { // Hostname identification hint. Hostname *string + // vCenter VM path identification hint. + VmPath *string + // vmWare UUID identification hint. VmWareUuid *string @@ -533,6 +545,9 @@ type SourceServer struct { // Source server lifecycle state. LifeCycle *LifeCycle + // Source server replication type. + ReplicationType ReplicationType + // Source server properties. SourceProperties *SourceProperties @@ -542,6 +557,9 @@ type SourceServer struct { // Source server Tags. Tags map[string]string + // Source server vCenter client id. + VcenterClientID *string + noSmithyDocumentSerde } @@ -557,4 +575,34 @@ type ValidationExceptionField struct { noSmithyDocumentSerde } +// vCenter client. +type VcenterClient struct { + + // Arn of vCenter client. + Arn *string + + // Datacenter name of vCenter client. + DatacenterName *string + + // Hostname of vCenter client . + Hostname *string + + // Last seen time of vCenter client. + LastSeenDatetime *string + + // Tags for Source Server of vCenter client. + SourceServerTags map[string]string + + // Tags for vCenter client. + Tags map[string]string + + // ID of vCenter client. + VcenterClientID *string + + // Vcenter UUID of vCenter client. + VcenterUUID *string + + noSmithyDocumentSerde +} + type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/mgn/validators.go b/service/mgn/validators.go index 2754c191699..9b05fac3427 100644 --- a/service/mgn/validators.go +++ b/service/mgn/validators.go @@ -110,6 +110,26 @@ func (m *validateOpDeleteSourceServer) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpDeleteVcenterClient struct { +} + +func (*validateOpDeleteVcenterClient) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteVcenterClient) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteVcenterClientInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteVcenterClientInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeJobLogItems struct { } @@ -350,6 +370,26 @@ func (m *validateOpStartCutover) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpStartReplication struct { +} + +func (*validateOpStartReplication) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartReplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartReplicationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartReplicationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpStartTest struct { } @@ -490,6 +530,26 @@ func (m *validateOpUpdateReplicationConfigurationTemplate) HandleInitialize(ctx return next.HandleInitialize(ctx, in) } +type validateOpUpdateSourceServerReplicationType struct { +} + +func (*validateOpUpdateSourceServerReplicationType) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateSourceServerReplicationType) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateSourceServerReplicationTypeInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateSourceServerReplicationTypeInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + func addOpChangeServerLifeCycleStateValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpChangeServerLifeCycleState{}, middleware.After) } @@ -510,6 +570,10 @@ func addOpDeleteSourceServerValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpDeleteSourceServer{}, middleware.After) } +func addOpDeleteVcenterClientValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteVcenterClient{}, middleware.After) +} + func addOpDescribeJobLogItemsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeJobLogItems{}, middleware.After) } @@ -558,6 +622,10 @@ func addOpStartCutoverValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartCutover{}, middleware.After) } +func addOpStartReplicationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartReplication{}, middleware.After) +} + func addOpStartTestValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartTest{}, middleware.After) } @@ -586,6 +654,10 @@ func addOpUpdateReplicationConfigurationTemplateValidationMiddleware(stack *midd return stack.Initialize.Add(&validateOpUpdateReplicationConfigurationTemplate{}, middleware.After) } +func addOpUpdateSourceServerReplicationTypeValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateSourceServerReplicationType{}, middleware.After) +} + func validateChangeServerLifeCycleStateSourceServerLifecycle(v *types.ChangeServerLifeCycleStateSourceServerLifecycle) error { if v == nil { return nil @@ -710,6 +782,21 @@ func validateOpDeleteSourceServerInput(v *DeleteSourceServerInput) error { } } +func validateOpDeleteVcenterClientInput(v *DeleteVcenterClientInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteVcenterClientInput"} + if v.VcenterClientID == nil { + invalidParams.Add(smithy.NewErrParamRequired("VcenterClientID")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeJobLogItemsInput(v *DescribeJobLogItemsInput) error { if v == nil { return nil @@ -890,6 +977,21 @@ func validateOpStartCutoverInput(v *StartCutoverInput) error { } } +func validateOpStartReplicationInput(v *StartReplicationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartReplicationInput"} + if v.SourceServerID == nil { + invalidParams.Add(smithy.NewErrParamRequired("SourceServerID")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpStartTestInput(v *StartTestInput) error { if v == nil { return nil @@ -1000,3 +1102,21 @@ func validateOpUpdateReplicationConfigurationTemplateInput(v *UpdateReplicationC return nil } } + +func validateOpUpdateSourceServerReplicationTypeInput(v *UpdateSourceServerReplicationTypeInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateSourceServerReplicationTypeInput"} + if v.SourceServerID == nil { + invalidParams.Add(smithy.NewErrParamRequired("SourceServerID")) + } + if len(v.ReplicationType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ReplicationType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/migrationhubrefactorspaces/LICENSE.txt b/service/migrationhubrefactorspaces/LICENSE.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/service/migrationhubrefactorspaces/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/service/migrationhubrefactorspaces/api_client.go b/service/migrationhubrefactorspaces/api_client.go new file mode 100644 index 00000000000..1960d1ae9c2 --- /dev/null +++ b/service/migrationhubrefactorspaces/api_client.go @@ -0,0 +1,317 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces + +import ( + "context" + cryptorand "crypto/rand" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/retry" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" + smithy "github.com/aws/smithy-go" + smithydocument "github.com/aws/smithy-go/document" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/middleware" + smithyrand "github.com/aws/smithy-go/rand" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/http" + "time" +) + +const ServiceID = "Migration Hub Refactor Spaces" +const ServiceAPIVersion = "2021-10-26" + +// Client provides the API client to make operations call for AWS Migration Hub +// Refactor Spaces. +type Client struct { + options Options +} + +// New returns an initialized Client based on the functional options. Provide +// additional functional options to further configure the behavior of the client, +// such as changing the client's endpoint or adding custom middleware behavior. +func New(options Options, optFns ...func(*Options)) *Client { + options = options.Copy() + + resolveDefaultLogger(&options) + + resolveRetryer(&options) + + resolveHTTPClient(&options) + + resolveHTTPSignerV4(&options) + + resolveDefaultEndpointConfiguration(&options) + + resolveIdempotencyTokenProvider(&options) + + for _, fn := range optFns { + fn(&options) + } + + client := &Client{ + options: options, + } + + return client +} + +type Options struct { + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + APIOptions []func(*middleware.Stack) error + + // Configures the events that will be sent to the configured logger. + ClientLogMode aws.ClientLogMode + + // The credentials object to use when signing requests. + Credentials aws.CredentialsProvider + + // The endpoint options to be used when attempting to resolve an endpoint. + EndpointOptions EndpointResolverOptions + + // The service endpoint resolver. + EndpointResolver EndpointResolver + + // Signature Version 4 (SigV4) Signer + HTTPSignerV4 HTTPSignerV4 + + // Provides idempotency tokens values that will be automatically populated into + // idempotent API operations. + IdempotencyTokenProvider IdempotencyTokenProvider + + // The logger writer interface to write logging messages to. + Logger logging.Logger + + // The region to send requests to. (Required) + Region string + + // Retryer guides how HTTP requests should be retried in case of recoverable + // failures. When nil the API client will use a default retryer. + Retryer aws.Retryer + + // The HTTP client to invoke API calls with. Defaults to client's default HTTP + // implementation if nil. + HTTPClient HTTPClient +} + +// WithAPIOptions returns a functional option for setting the Client's APIOptions +// option. +func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { + return func(o *Options) { + o.APIOptions = append(o.APIOptions, optFns...) + } +} + +// WithEndpointResolver returns a functional option for setting the Client's +// EndpointResolver option. +func WithEndpointResolver(v EndpointResolver) func(*Options) { + return func(o *Options) { + o.EndpointResolver = v + } +} + +type HTTPClient interface { + Do(*http.Request) (*http.Response, error) +} + +// Copy creates a clone where the APIOptions list is deep copied. +func (o Options) Copy() Options { + to := o + to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) + copy(to.APIOptions, o.APIOptions) + return to +} +func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { + ctx = middleware.ClearStackValues(ctx) + stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) + options := c.options.Copy() + for _, fn := range optFns { + fn(&options) + } + + finalizeClientEndpointResolverOptions(&options) + + for _, fn := range stackFns { + if err := fn(stack, options); err != nil { + return nil, metadata, err + } + } + + for _, fn := range options.APIOptions { + if err := fn(stack); err != nil { + return nil, metadata, err + } + } + + handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) + result, metadata, err = handler.Handle(ctx, params) + if err != nil { + err = &smithy.OperationError{ + ServiceID: ServiceID, + OperationName: opID, + Err: err, + } + } + return result, metadata, err +} + +type noSmithyDocumentSerde = smithydocument.NoSerde + +func resolveDefaultLogger(o *Options) { + if o.Logger != nil { + return + } + o.Logger = logging.Nop{} +} + +func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { + return middleware.AddSetLoggerMiddleware(stack, o.Logger) +} + +// NewFromConfig returns a new client from the provided config. +func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { + opts := Options{ + Region: cfg.Region, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + } + resolveAWSRetryerProvider(cfg, &opts) + resolveAWSEndpointResolver(cfg, &opts) + resolveUseDualStackEndpoint(cfg, &opts) + resolveUseFIPSEndpoint(cfg, &opts) + return New(opts, optFns...) +} + +func resolveHTTPClient(o *Options) { + if o.HTTPClient != nil { + return + } + o.HTTPClient = awshttp.NewBuildableClient() +} + +func resolveRetryer(o *Options) { + if o.Retryer != nil { + return + } + o.Retryer = retry.NewStandard() +} + +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + +func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { + if cfg.EndpointResolver == nil { + return + } + o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver()) +} + +func addClientUserAgent(stack *middleware.Stack) error { + return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "migrationhubrefactorspaces", goModuleVersion)(stack) +} + +func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error { + mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{ + CredentialsProvider: o.Credentials, + Signer: o.HTTPSignerV4, + LogSigning: o.ClientLogMode.IsSigning(), + }) + return stack.Finalize.Add(mw, middleware.After) +} + +type HTTPSignerV4 interface { + SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error +} + +func resolveHTTPSignerV4(o *Options) { + if o.HTTPSignerV4 != nil { + return + } + o.HTTPSignerV4 = newDefaultV4Signer(*o) +} + +func newDefaultV4Signer(o Options) *v4.Signer { + return v4.NewSigner(func(so *v4.SignerOptions) { + so.Logger = o.Logger + so.LogSigning = o.ClientLogMode.IsSigning() + }) +} + +func resolveIdempotencyTokenProvider(o *Options) { + if o.IdempotencyTokenProvider != nil { + return + } + o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) +} + +func addRetryMiddlewares(stack *middleware.Stack, o Options) error { + mo := retry.AddRetryMiddlewaresOptions{ + Retryer: o.Retryer, + LogRetryAttempts: o.ClientLogMode.IsRetries(), + } + return retry.AddRetryMiddlewares(stack, mo) +} + +// resolves dual-stack endpoint configuration +func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseDualStackEndpoint = value + } + return nil +} + +// resolves FIPS endpoint configuration +func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseFIPSEndpoint = value + } + return nil +} + +// IdempotencyTokenProvider interface for providing idempotency token +type IdempotencyTokenProvider interface { + GetIdempotencyToken() (string, error) +} + +func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { + return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) +} + +func addResponseErrorMiddleware(stack *middleware.Stack) error { + return awshttp.AddResponseErrorMiddleware(stack) +} + +func addRequestResponseLogging(stack *middleware.Stack, o Options) error { + return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ + LogRequest: o.ClientLogMode.IsRequest(), + LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), + LogResponse: o.ClientLogMode.IsResponse(), + LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), + }, middleware.After) +} diff --git a/service/migrationhubrefactorspaces/api_op_CreateApplication.go b/service/migrationhubrefactorspaces/api_op_CreateApplication.go new file mode 100644 index 00000000000..cc67b06ef52 --- /dev/null +++ b/service/migrationhubrefactorspaces/api_op_CreateApplication.go @@ -0,0 +1,232 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Creates an Amazon Web Services Migration Hub Refactor Spaces application. The +// account that owns the environment also owns the applications created inside the +// environment, regardless of the account that creates the application. Refactor +// Spaces provisions the Amazon API Gateway and Network Load Balancer for the +// application proxy inside your account. +func (c *Client) CreateApplication(ctx context.Context, params *CreateApplicationInput, optFns ...func(*Options)) (*CreateApplicationOutput, error) { + if params == nil { + params = &CreateApplicationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateApplication", params, optFns, c.addOperationCreateApplicationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateApplicationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateApplicationInput struct { + + // The unique identifier of the environment. + // + // This member is required. + EnvironmentIdentifier *string + + // The name to use for the application. + // + // This member is required. + Name *string + + // The proxy type of the proxy created within the application. + // + // This member is required. + ProxyType types.ProxyType + + // The ID of the virtual private cloud (VPC). + // + // This member is required. + VpcId *string + + // A wrapper object holding the API Gateway endpoint type and stage name for the + // proxy. + ApiGatewayProxy *types.ApiGatewayProxyInput + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientToken *string + + // The tags to assign to the application. A tag is a label that you assign to an + // Amazon Web Services resource. Each tag consists of a key-value pair. + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateApplicationOutput struct { + + // A wrapper object holding the API Gateway endpoint type and stage name for the + // proxy. + ApiGatewayProxy *types.ApiGatewayProxyInput + + // The unique identifier of the application. + ApplicationId *string + + // The Amazon Resource Name (ARN) of the application. The format for this ARN is + // arn:aws:refactor-spaces:region:account-id:resource-type/resource-id . For more + // information about ARNs, see Amazon Resource Names (ARNs) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in + // the Amazon Web Services General Reference. + Arn *string + + // The Amazon Web Services account ID of application creator. + CreatedByAccountId *string + + // A timestamp that indicates when the application is created. + CreatedTime *time.Time + + // The ID of the environment in which the application is created. + EnvironmentId *string + + // A timestamp that indicates when the application was last updated. + LastUpdatedTime *time.Time + + // The name of the application. + Name *string + + // The Amazon Web Services account ID of the application owner. + OwnerAccountId *string + + // The proxy type of the proxy created within the application. + ProxyType types.ProxyType + + // The current state of the application. + State types.ApplicationState + + // The tags assigned to the application. A tag is a label that you assign to an + // Amazon Web Services resource. Each tag consists of a key-value pair. + Tags map[string]string + + // The ID of the Amazon VPC. + VpcId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateApplicationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateApplication{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateApplication{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opCreateApplicationMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateApplicationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateApplication(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateApplication struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateApplication) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateApplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*CreateApplicationInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateApplicationInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateApplicationMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateApplication{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateApplication(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "refactor-spaces", + OperationName: "CreateApplication", + } +} diff --git a/service/migrationhubrefactorspaces/api_op_CreateEnvironment.go b/service/migrationhubrefactorspaces/api_op_CreateEnvironment.go new file mode 100644 index 00000000000..127dcc1b7a7 --- /dev/null +++ b/service/migrationhubrefactorspaces/api_op_CreateEnvironment.go @@ -0,0 +1,208 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Creates an Amazon Web Services Migration Hub Refactor Spaces environment. The +// caller owns the environment resource, and they are referred to as the +// environment owner. The environment owner has cross-account visibility and +// control of Refactor Spaces resources that are added to the environment by other +// accounts that the environment is shared with. When creating an environment, +// Refactor Spaces provisions a transit gateway in your account. +func (c *Client) CreateEnvironment(ctx context.Context, params *CreateEnvironmentInput, optFns ...func(*Options)) (*CreateEnvironmentOutput, error) { + if params == nil { + params = &CreateEnvironmentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateEnvironment", params, optFns, c.addOperationCreateEnvironmentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateEnvironmentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateEnvironmentInput struct { + + // The name of the environment. + // + // This member is required. + Name *string + + // The network fabric type of the environment. + // + // This member is required. + NetworkFabricType types.NetworkFabricType + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientToken *string + + // The description of the environment. + Description *string + + // The tags to assign to the environment. A tag is a label that you assign to an + // Amazon Web Services resource. Each tag consists of a key-value pair. + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateEnvironmentOutput struct { + + // The Amazon Resource Name (ARN) of the environment. + Arn *string + + // A timestamp that indicates when the environment is created. + CreatedTime *time.Time + + // A description of the environment. + Description *string + + // The unique identifier of the environment. + EnvironmentId *string + + // A timestamp that indicates when the environment was last updated. + LastUpdatedTime *time.Time + + // The name of the environment. + Name *string + + // The network fabric type of the environment. + NetworkFabricType types.NetworkFabricType + + // The Amazon Web Services account ID of environment owner. + OwnerAccountId *string + + // The current state of the environment. + State types.EnvironmentState + + // The tags assigned to the created environment. A tag is a label that you assign + // to an Amazon Web Services resource. Each tag consists of a key-value pair.. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateEnvironmentMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateEnvironment{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateEnvironment{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opCreateEnvironmentMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateEnvironmentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateEnvironment(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateEnvironment struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateEnvironment) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateEnvironment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*CreateEnvironmentInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateEnvironmentInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateEnvironmentMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateEnvironment{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateEnvironment(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "refactor-spaces", + OperationName: "CreateEnvironment", + } +} diff --git a/service/migrationhubrefactorspaces/api_op_CreateRoute.go b/service/migrationhubrefactorspaces/api_op_CreateRoute.go new file mode 100644 index 00000000000..3c872a9452c --- /dev/null +++ b/service/migrationhubrefactorspaces/api_op_CreateRoute.go @@ -0,0 +1,264 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Creates an Amazon Web Services Migration Hub Refactor Spaces route. The account +// owner of the service resource is always the environment owner, regardless of +// which account creates the route. Routes target a service in the application. If +// an application does not have any routes, then the first route must be created as +// a DEFAULTRouteType. When you create a route, Refactor Spaces configures the +// Amazon API Gateway to send traffic to the target service as follows: +// +// * If the +// service has a URL endpoint, and the endpoint resolves to a private IP address, +// Refactor Spaces routes traffic using the API Gateway VPC link. +// +// * If the service +// has a URL endpoint, and the endpoint resolves to a public IP address, Refactor +// Spaces routes traffic over the public internet. +// +// * If the service has an Lambda +// function endpoint, then Refactor Spaces uses the API Gateway Lambda +// integration. +// +// A health check is performed on the service when the route is +// created. If the health check fails, the route transitions to FAILED, and no +// traffic is sent to the service. For Lambda functions, the Lambda function state +// is checked. If the function is not active, the function configuration is updated +// so that Lambda resources are provisioned. If the Lambda state is Failed, then +// the route creation fails. For more information, see the +// GetFunctionConfiguration's State response parameter +// (https://docs.aws.amazon.com/lambda/latest/dg/API_GetFunctionConfiguration.html#SSS-GetFunctionConfiguration-response-State) +// in the Lambda Developer Guide. For public URLs, a connection is opened to the +// public endpoint. If the URL is not reachable, the health check fails. For +// private URLs, a target group is created and the target group health check is +// run. The HealthCheckProtocol, HealthCheckPort, and HealthCheckPath are the same +// protocol, port, and path specified in the URL or health URL, if used. All other +// settings use the default values, as described in Health checks for your target +// groups +// (https://docs.aws.amazon.com/elasticloadbalancing/latest/application/target-group-health-checks.html). +// The health check is considered successful if at least one target within the +// target group transitions to a healthy state. +func (c *Client) CreateRoute(ctx context.Context, params *CreateRouteInput, optFns ...func(*Options)) (*CreateRouteOutput, error) { + if params == nil { + params = &CreateRouteInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateRoute", params, optFns, c.addOperationCreateRouteMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateRouteOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateRouteInput struct { + + // The ID of the application within which the route is being created. + // + // This member is required. + ApplicationIdentifier *string + + // The ID of the environment in which the route is created. + // + // This member is required. + EnvironmentIdentifier *string + + // The route type of the route. DEFAULT indicates that all traffic that does not + // match another route is forwarded to the default route. Applications must have a + // default route before any other routes can be created. URI_PATH indicates a route + // that is based on a URI path. + // + // This member is required. + RouteType types.RouteType + + // The ID of the service in which the route is created. Traffic that matches this + // route is forwarded to this service. + // + // This member is required. + ServiceIdentifier *string + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientToken *string + + // The tags to assign to the route. A tag is a label that you assign to an Amazon + // Web Services resource. Each tag consists of a key-value pair.. + Tags map[string]string + + // The configuration for the URI path route type. + UriPathRoute *types.UriPathRouteInput + + noSmithyDocumentSerde +} + +type CreateRouteOutput struct { + + // The ID of the application in which the route is created. + ApplicationId *string + + // The Amazon Resource Name (ARN) of the route. The format for this ARN is + // arn:aws:refactor-spaces:region:account-id:resource-type/resource-id . For more + // information about ARNs, see Amazon Resource Names (ARNs) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in + // the Amazon Web Services General Reference. + Arn *string + + // The Amazon Web Services account ID of the route creator. + CreatedByAccountId *string + + // A timestamp that indicates when the route is created. + CreatedTime *time.Time + + // A timestamp that indicates when the route was last updated. + LastUpdatedTime *time.Time + + // The Amazon Web Services account ID of the route owner. + OwnerAccountId *string + + // The unique identifier of the route. + RouteId *string + + // The route type of the route. + RouteType types.RouteType + + // The ID of service in which the rute iscreated. Traffic that matches this route + // is forwarded to this service. + ServiceId *string + + // he current state of the route. + State types.RouteState + + // The tags assigned to the created route. A tag is a label that you assign to an + // Amazon Web Services resource. Each tag consists of a key-value pair. + Tags map[string]string + + // onfiguration for the URI path route type. + UriPathRoute *types.UriPathRouteInput + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateRouteMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateRoute{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateRoute{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opCreateRouteMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateRouteValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateRoute(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateRoute struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateRoute) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateRoute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*CreateRouteInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateRouteInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateRouteMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateRoute{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateRoute(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "refactor-spaces", + OperationName: "CreateRoute", + } +} diff --git a/service/migrationhubrefactorspaces/api_op_CreateService.go b/service/migrationhubrefactorspaces/api_op_CreateService.go new file mode 100644 index 00000000000..d441db6ef5e --- /dev/null +++ b/service/migrationhubrefactorspaces/api_op_CreateService.go @@ -0,0 +1,248 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Creates an Amazon Web Services Migration Hub Refactor Spaces service. The +// account owner of the service is always the environment owner, regardless of +// which account in the environment creates the service. Services have either a URL +// endpoint in a virtual private cloud (VPC), or a Lambda function endpoint. If an +// Amazon Web Services resourceis launched in a service VPC, and you want it to be +// accessible to all of an environment’s services with VPCs and routes, apply the +// RefactorSpacesSecurityGroup to the resource. Alternatively, to add more +// cross-account constraints, apply your own security group. +func (c *Client) CreateService(ctx context.Context, params *CreateServiceInput, optFns ...func(*Options)) (*CreateServiceOutput, error) { + if params == nil { + params = &CreateServiceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateService", params, optFns, c.addOperationCreateServiceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateServiceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateServiceInput struct { + + // The ID of the application which the service is created. + // + // This member is required. + ApplicationIdentifier *string + + // The type of endpoint to use for the service. The type can be a URL in a VPC or + // an Lambda function. + // + // This member is required. + EndpointType types.ServiceEndpointType + + // The ID of the environment in which the service is created. + // + // This member is required. + EnvironmentIdentifier *string + + // The name of the service. + // + // This member is required. + Name *string + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientToken *string + + // The description of the service. + Description *string + + // The configuration for the Lambda endpoint type. + LambdaEndpoint *types.LambdaEndpointInput + + // The tags to assign to the service. A tag is a label that you assign to an Amazon + // Web Services resource. Each tag consists of a key-value pair.. + Tags map[string]string + + // The configuration for the URL endpoint type. + UrlEndpoint *types.UrlEndpointInput + + // The ID of the VPC. + VpcId *string + + noSmithyDocumentSerde +} + +type CreateServiceOutput struct { + + // The ID of the application that the created service belongs to. + ApplicationId *string + + // The Amazon Resource Name (ARN) of the service. + Arn *string + + // The Amazon Web Services account ID of the service creator. + CreatedByAccountId *string + + // A timestamp that indicates when the service is created. + CreatedTime *time.Time + + // The description of the created service. + Description *string + + // The endpoint type of the service. + EndpointType types.ServiceEndpointType + + // The unique identifier of the environment. + EnvironmentId *string + + // The configuration for the Lambda endpoint type. + LambdaEndpoint *types.LambdaEndpointInput + + // A timestamp that indicates when the service was last updated. + LastUpdatedTime *time.Time + + // The name of the service. + Name *string + + // The Amazon Web Services account ID of the service owner. + OwnerAccountId *string + + // The unique identifier of the service. + ServiceId *string + + // The current state of the service. + State types.ServiceState + + // The tags assigned to the created service. A tag is a label that you assign to an + // Amazon Web Services resource. Each tag consists of a key-value pair.. + Tags map[string]string + + // The configuration for the URL endpoint type. + UrlEndpoint *types.UrlEndpointInput + + // The ID of the VPC. + VpcId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateServiceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateService{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateService{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opCreateServiceMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateServiceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateService(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateService struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateService) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateService) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*CreateServiceInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateServiceInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateServiceMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateService{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateService(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "refactor-spaces", + OperationName: "CreateService", + } +} diff --git a/service/migrationhubrefactorspaces/api_op_DeleteApplication.go b/service/migrationhubrefactorspaces/api_op_DeleteApplication.go new file mode 100644 index 00000000000..c834b206026 --- /dev/null +++ b/service/migrationhubrefactorspaces/api_op_DeleteApplication.go @@ -0,0 +1,144 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Deletes an Amazon Web Services Migration Hub Refactor Spaces application. Before +// you can delete an application, you must first delete any services or routes +// within the application. +func (c *Client) DeleteApplication(ctx context.Context, params *DeleteApplicationInput, optFns ...func(*Options)) (*DeleteApplicationOutput, error) { + if params == nil { + params = &DeleteApplicationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteApplication", params, optFns, c.addOperationDeleteApplicationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteApplicationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteApplicationInput struct { + + // The ID of the application. + // + // This member is required. + ApplicationIdentifier *string + + // The ID of the environment. + // + // This member is required. + EnvironmentIdentifier *string + + noSmithyDocumentSerde +} + +type DeleteApplicationOutput struct { + + // The ID of the application. + ApplicationId *string + + // The Amazon Resource Name (ARN) of the application. + Arn *string + + // The unique identifier of the application’s environment. + EnvironmentId *string + + // A timestamp that indicates when the environment was last updated. + LastUpdatedTime *time.Time + + // The name of the application. + Name *string + + // The current state of the application. + State types.ApplicationState + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteApplicationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteApplication{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteApplication{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteApplicationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteApplication(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteApplication(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "refactor-spaces", + OperationName: "DeleteApplication", + } +} diff --git a/service/migrationhubrefactorspaces/api_op_DeleteEnvironment.go b/service/migrationhubrefactorspaces/api_op_DeleteEnvironment.go new file mode 100644 index 00000000000..88bb950a109 --- /dev/null +++ b/service/migrationhubrefactorspaces/api_op_DeleteEnvironment.go @@ -0,0 +1,136 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Deletes an Amazon Web Services Migration Hub Refactor Spaces environment. Before +// you can delete an environment, you must first delete any applications and +// services within the environment. +func (c *Client) DeleteEnvironment(ctx context.Context, params *DeleteEnvironmentInput, optFns ...func(*Options)) (*DeleteEnvironmentOutput, error) { + if params == nil { + params = &DeleteEnvironmentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteEnvironment", params, optFns, c.addOperationDeleteEnvironmentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteEnvironmentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteEnvironmentInput struct { + + // The ID of the environment. + // + // This member is required. + EnvironmentIdentifier *string + + noSmithyDocumentSerde +} + +type DeleteEnvironmentOutput struct { + + // The Amazon Resource Name (ARN) of the environment. + Arn *string + + // The unique identifier of the environment. + EnvironmentId *string + + // A timestamp that indicates when the environment was last updated. + LastUpdatedTime *time.Time + + // The name of the environment. + Name *string + + // The current state of the environment. + State types.EnvironmentState + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteEnvironmentMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteEnvironment{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteEnvironment{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteEnvironmentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteEnvironment(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteEnvironment(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "refactor-spaces", + OperationName: "DeleteEnvironment", + } +} diff --git a/service/migrationhubrefactorspaces/api_op_DeleteResourcePolicy.go b/service/migrationhubrefactorspaces/api_op_DeleteResourcePolicy.go new file mode 100644 index 00000000000..b63e8f41461 --- /dev/null +++ b/service/migrationhubrefactorspaces/api_op_DeleteResourcePolicy.go @@ -0,0 +1,116 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the resource policy set for the environment. +func (c *Client) DeleteResourcePolicy(ctx context.Context, params *DeleteResourcePolicyInput, optFns ...func(*Options)) (*DeleteResourcePolicyOutput, error) { + if params == nil { + params = &DeleteResourcePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteResourcePolicy", params, optFns, c.addOperationDeleteResourcePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteResourcePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteResourcePolicyInput struct { + + // Amazon Resource Name (ARN) of the resource associated with the policy. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type DeleteResourcePolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteResourcePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteResourcePolicy{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteResourcePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "refactor-spaces", + OperationName: "DeleteResourcePolicy", + } +} diff --git a/service/migrationhubrefactorspaces/api_op_DeleteRoute.go b/service/migrationhubrefactorspaces/api_op_DeleteRoute.go new file mode 100644 index 00000000000..35b12c50323 --- /dev/null +++ b/service/migrationhubrefactorspaces/api_op_DeleteRoute.go @@ -0,0 +1,147 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Deletes an Amazon Web Services Migration Hub Refactor Spaces route. +func (c *Client) DeleteRoute(ctx context.Context, params *DeleteRouteInput, optFns ...func(*Options)) (*DeleteRouteOutput, error) { + if params == nil { + params = &DeleteRouteInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteRoute", params, optFns, c.addOperationDeleteRouteMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteRouteOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteRouteInput struct { + + // The ID of the application to delete the route from. + // + // This member is required. + ApplicationIdentifier *string + + // The ID of the environment to delete the route from. + // + // This member is required. + EnvironmentIdentifier *string + + // The ID of the route to delete. + // + // This member is required. + RouteIdentifier *string + + noSmithyDocumentSerde +} + +type DeleteRouteOutput struct { + + // he ID of the application that the route belongs to. + ApplicationId *string + + // The Amazon Resource Name (ARN) of the route. + Arn *string + + // A timestamp that indicates when the route was last updated. + LastUpdatedTime *time.Time + + // The ID of the route to delete. + RouteId *string + + // The ID of the service that the route belongs to. + ServiceId *string + + // The current state of the route. + State types.RouteState + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteRouteMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteRoute{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteRoute{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteRouteValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRoute(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteRoute(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "refactor-spaces", + OperationName: "DeleteRoute", + } +} diff --git a/service/migrationhubrefactorspaces/api_op_DeleteService.go b/service/migrationhubrefactorspaces/api_op_DeleteService.go new file mode 100644 index 00000000000..b573349ad19 --- /dev/null +++ b/service/migrationhubrefactorspaces/api_op_DeleteService.go @@ -0,0 +1,152 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Deletes an Amazon Web Services Migration Hub Refactor Spaces service. +func (c *Client) DeleteService(ctx context.Context, params *DeleteServiceInput, optFns ...func(*Options)) (*DeleteServiceOutput, error) { + if params == nil { + params = &DeleteServiceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteService", params, optFns, c.addOperationDeleteServiceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteServiceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteServiceInput struct { + + // Deletes a Refactor Spaces service. The RefactorSpacesSecurityGroup security + // group must be removed from all Amazon Web Services resources in the virtual + // private cloud (VPC) prior to deleting a service with a URL endpoint in a VPC. + // + // This member is required. + ApplicationIdentifier *string + + // The ID of the environment that the service is in. + // + // This member is required. + EnvironmentIdentifier *string + + // The ID of the service to delete. + // + // This member is required. + ServiceIdentifier *string + + noSmithyDocumentSerde +} + +type DeleteServiceOutput struct { + + // The ID of the application that the service is in. + ApplicationId *string + + // The Amazon Resource Name (ARN) of the service. + Arn *string + + // The unique identifier of the environment. + EnvironmentId *string + + // A timestamp that indicates when the service was last updated. + LastUpdatedTime *time.Time + + // The name of the service. + Name *string + + // The unique identifier of the service. + ServiceId *string + + // The current state of the service. + State types.ServiceState + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteServiceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteService{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteService{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteServiceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteService(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteService(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "refactor-spaces", + OperationName: "DeleteService", + } +} diff --git a/service/migrationhubrefactorspaces/api_op_GetApplication.go b/service/migrationhubrefactorspaces/api_op_GetApplication.go new file mode 100644 index 00000000000..fd5b7ae3b07 --- /dev/null +++ b/service/migrationhubrefactorspaces/api_op_GetApplication.go @@ -0,0 +1,167 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Gets an Amazon Web Services Migration Hub Refactor Spaces application. +func (c *Client) GetApplication(ctx context.Context, params *GetApplicationInput, optFns ...func(*Options)) (*GetApplicationOutput, error) { + if params == nil { + params = &GetApplicationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetApplication", params, optFns, c.addOperationGetApplicationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetApplicationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetApplicationInput struct { + + // The ID of the application. + // + // This member is required. + ApplicationIdentifier *string + + // The ID of the environment. + // + // This member is required. + EnvironmentIdentifier *string + + noSmithyDocumentSerde +} + +type GetApplicationOutput struct { + + // The endpoint URL of the API Gateway proxy. + ApiGatewayProxy *types.ApiGatewayProxyConfig + + // The unique identifier of the application. + ApplicationId *string + + // The Amazon Resource Name (ARN) of the application. + Arn *string + + // The Amazon Web Services account ID of the application creator. + CreatedByAccountId *string + + // A timestamp that indicates when the application is created. + CreatedTime *time.Time + + // The unique identifier of the environment. + EnvironmentId *string + + // Any error associated with the application resource. + Error *types.ErrorResponse + + // A timestamp that indicates when the application was last updated. + LastUpdatedTime *time.Time + + // The name of the application. + Name *string + + // The Amazon Web Services account ID of the application owner. + OwnerAccountId *string + + // The proxy type of the proxy created within the application. + ProxyType types.ProxyType + + // The current state of the application. + State types.ApplicationState + + // The tags assigned to the application. A tag is a label that you assign to an + // Amazon Web Services resource. Each tag consists of a key-value pair. + Tags map[string]string + + // The ID of the virtual private cloud (VPC). + VpcId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetApplicationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetApplication{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetApplication{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetApplicationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetApplication(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetApplication(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "refactor-spaces", + OperationName: "GetApplication", + } +} diff --git a/service/migrationhubrefactorspaces/api_op_GetEnvironment.go b/service/migrationhubrefactorspaces/api_op_GetEnvironment.go new file mode 100644 index 00000000000..c922fffebfc --- /dev/null +++ b/service/migrationhubrefactorspaces/api_op_GetEnvironment.go @@ -0,0 +1,156 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Gets an Amazon Web Services Migration Hub Refactor Spaces environment. +func (c *Client) GetEnvironment(ctx context.Context, params *GetEnvironmentInput, optFns ...func(*Options)) (*GetEnvironmentOutput, error) { + if params == nil { + params = &GetEnvironmentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetEnvironment", params, optFns, c.addOperationGetEnvironmentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetEnvironmentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetEnvironmentInput struct { + + // The ID of the environment. + // + // This member is required. + EnvironmentIdentifier *string + + noSmithyDocumentSerde +} + +type GetEnvironmentOutput struct { + + // The Amazon Resource Name (ARN) of the environment. + Arn *string + + // A timestamp that indicates when the environment is created. + CreatedTime *time.Time + + // The description of the environment. + Description *string + + // The unique identifier of the environment. + EnvironmentId *string + + // Any error associated with the environment resource. + Error *types.ErrorResponse + + // A timestamp that indicates when the environment was last updated. + LastUpdatedTime *time.Time + + // The name of the environment. + Name *string + + // The network fabric type of the environment. + NetworkFabricType types.NetworkFabricType + + // The Amazon Web Services account ID of the environment owner. + OwnerAccountId *string + + // The current state of the environment. + State types.EnvironmentState + + // The tags to assign to the environment. A tag is a label that you assign to an + // Amazon Web Services resource. Each tag consists of a key-value pair. + Tags map[string]string + + // The ID of the transit gateway set up by the environment. + TransitGatewayId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetEnvironmentMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetEnvironment{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetEnvironment{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetEnvironmentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEnvironment(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetEnvironment(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "refactor-spaces", + OperationName: "GetEnvironment", + } +} diff --git a/service/migrationhubrefactorspaces/api_op_GetResourcePolicy.go b/service/migrationhubrefactorspaces/api_op_GetResourcePolicy.go new file mode 100644 index 00000000000..29aee93e141 --- /dev/null +++ b/service/migrationhubrefactorspaces/api_op_GetResourcePolicy.go @@ -0,0 +1,120 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets the resource-based permission policy that is set for the given environment. +func (c *Client) GetResourcePolicy(ctx context.Context, params *GetResourcePolicyInput, optFns ...func(*Options)) (*GetResourcePolicyOutput, error) { + if params == nil { + params = &GetResourcePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetResourcePolicy", params, optFns, c.addOperationGetResourcePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetResourcePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetResourcePolicyInput struct { + + // The Amazon Resource Name (ARN) of the resource associated with the policy. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type GetResourcePolicyOutput struct { + + // A JSON-formatted string for an Amazon Web Services resource-based policy. + Policy *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetResourcePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetResourcePolicy{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetResourcePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetResourcePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "refactor-spaces", + OperationName: "GetResourcePolicy", + } +} diff --git a/service/migrationhubrefactorspaces/api_op_GetRoute.go b/service/migrationhubrefactorspaces/api_op_GetRoute.go new file mode 100644 index 00000000000..71bb295e5ba --- /dev/null +++ b/service/migrationhubrefactorspaces/api_op_GetRoute.go @@ -0,0 +1,189 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Gets an Amazon Web Services Migration Hub Refactor Spaces route. +func (c *Client) GetRoute(ctx context.Context, params *GetRouteInput, optFns ...func(*Options)) (*GetRouteOutput, error) { + if params == nil { + params = &GetRouteInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetRoute", params, optFns, c.addOperationGetRouteMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetRouteOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetRouteInput struct { + + // The ID of the application. + // + // This member is required. + ApplicationIdentifier *string + + // The ID of the environment. + // + // This member is required. + EnvironmentIdentifier *string + + // The ID of the route. + // + // This member is required. + RouteIdentifier *string + + noSmithyDocumentSerde +} + +type GetRouteOutput struct { + + // The ID of the application that the route belongs to. + ApplicationId *string + + // The Amazon Resource Name (ARN) of the route. + Arn *string + + // The Amazon Web Services account ID of the route creator. + CreatedByAccountId *string + + // The timestamp of when the route is created. + CreatedTime *time.Time + + // Unique identifier of the environment. + EnvironmentId *string + + // Any error associated with the route resource. + Error *types.ErrorResponse + + // Indicates whether to match all subpaths of the given source path. If this value + // is false, requests must match the source path exactly before they are forwarded + // to this route's service. + IncludeChildPaths *bool + + // A timestamp that indicates when the route was last updated. + LastUpdatedTime *time.Time + + // A list of HTTP methods to match. An empty list matches all values. If a method + // is present, only HTTP requests using that method are forwarded to this route’s + // service. + Methods []types.HttpMethod + + // The Amazon Web Services account ID of the route owner. + OwnerAccountId *string + + // A mapping of Amazon API Gateway path resources to resource IDs. + PathResourceToId map[string]string + + // The unique identifier of the route. DEFAULT: All traffic that does not match + // another route is forwarded to the default route. Applications must have a + // default route before any other routes can be created. URI_PATH: A route that is + // based on a URI path. + RouteId *string + + // The type of route. + RouteType types.RouteType + + // The unique identifier of the service. + ServiceId *string + + // The path to use to match traffic. Paths must start with / and are relative to + // the base of the application. + SourcePath *string + + // The current state of the route. + State types.RouteState + + // The tags assigned to the route. A tag is a label that you assign to an Amazon + // Web Services resource. Each tag consists of a key-value pair. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetRouteMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetRoute{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetRoute{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetRouteValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRoute(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetRoute(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "refactor-spaces", + OperationName: "GetRoute", + } +} diff --git a/service/migrationhubrefactorspaces/api_op_GetService.go b/service/migrationhubrefactorspaces/api_op_GetService.go new file mode 100644 index 00000000000..09713b6e164 --- /dev/null +++ b/service/migrationhubrefactorspaces/api_op_GetService.go @@ -0,0 +1,183 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Gets an Amazon Web Services Migration Hub Refactor Spaces service. +func (c *Client) GetService(ctx context.Context, params *GetServiceInput, optFns ...func(*Options)) (*GetServiceOutput, error) { + if params == nil { + params = &GetServiceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetService", params, optFns, c.addOperationGetServiceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetServiceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetServiceInput struct { + + // The ID of the application. + // + // This member is required. + ApplicationIdentifier *string + + // The ID of the environment. + // + // This member is required. + EnvironmentIdentifier *string + + // The ID of the service. + // + // This member is required. + ServiceIdentifier *string + + noSmithyDocumentSerde +} + +type GetServiceOutput struct { + + // The ID of the application. + ApplicationId *string + + // The Amazon Resource Name (ARN) of the service. + Arn *string + + // The Amazon Web Services account ID of the service creator. + CreatedByAccountId *string + + // The timestamp of when the service is created. + CreatedTime *time.Time + + // The description of the service. + Description *string + + // The endpoint type of the service. + EndpointType types.ServiceEndpointType + + // The unique identifier of the environment. + EnvironmentId *string + + // Any error associated with the service resource. + Error *types.ErrorResponse + + // The configuration for the Lambda endpoint type. The Arn is the Amazon Resource + // Name (ARN) of the Lambda function associated with this service. + LambdaEndpoint *types.LambdaEndpointConfig + + // A timestamp that indicates when the service was last updated. + LastUpdatedTime *time.Time + + // The name of the service. + Name *string + + // The Amazon Web Services account ID of the service owner. + OwnerAccountId *string + + // The unique identifier of the service. + ServiceId *string + + // The current state of the service. + State types.ServiceState + + // The tags assigned to the service. A tag is a label that you assign to an Amazon + // Web Services resource. Each tag consists of a key-value pair. + Tags map[string]string + + // The configuration for the URL endpoint type. The Url isthe URL of the endpoint + // type. The HealthUrl is the health check URL of the endpoint type. + UrlEndpoint *types.UrlEndpointConfig + + // The ID of the virtual private cloud (VPC). + VpcId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetServiceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetService{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetService{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetServiceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetService(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetService(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "refactor-spaces", + OperationName: "GetService", + } +} diff --git a/service/migrationhubrefactorspaces/api_op_ListApplications.go b/service/migrationhubrefactorspaces/api_op_ListApplications.go new file mode 100644 index 00000000000..d523202ae8a --- /dev/null +++ b/service/migrationhubrefactorspaces/api_op_ListApplications.go @@ -0,0 +1,220 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all the Amazon Web Services Migration Hub Refactor Spaces applications +// within an environment. +func (c *Client) ListApplications(ctx context.Context, params *ListApplicationsInput, optFns ...func(*Options)) (*ListApplicationsOutput, error) { + if params == nil { + params = &ListApplicationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListApplications", params, optFns, c.addOperationListApplicationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListApplicationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListApplicationsInput struct { + + // The ID of the environment. + // + // This member is required. + EnvironmentIdentifier *string + + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + MaxResults *int32 + + // The token for the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListApplicationsOutput struct { + + // The list of ApplicationSummary objects. + ApplicationSummaryList []types.ApplicationSummary + + // The token for the next page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListApplications{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListApplications{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListApplicationsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplications(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListApplicationsAPIClient is a client that implements the ListApplications +// operation. +type ListApplicationsAPIClient interface { + ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) +} + +var _ ListApplicationsAPIClient = (*Client)(nil) + +// ListApplicationsPaginatorOptions is the paginator options for ListApplications +type ListApplicationsPaginatorOptions struct { + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListApplicationsPaginator is a paginator for ListApplications +type ListApplicationsPaginator struct { + options ListApplicationsPaginatorOptions + client ListApplicationsAPIClient + params *ListApplicationsInput + nextToken *string + firstPage bool +} + +// NewListApplicationsPaginator returns a new ListApplicationsPaginator +func NewListApplicationsPaginator(client ListApplicationsAPIClient, params *ListApplicationsInput, optFns ...func(*ListApplicationsPaginatorOptions)) *ListApplicationsPaginator { + if params == nil { + params = &ListApplicationsInput{} + } + + options := ListApplicationsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListApplicationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListApplicationsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListApplications page. +func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListApplicationsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListApplications(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListApplications(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "refactor-spaces", + OperationName: "ListApplications", + } +} diff --git a/service/migrationhubrefactorspaces/api_op_ListEnvironmentVpcs.go b/service/migrationhubrefactorspaces/api_op_ListEnvironmentVpcs.go new file mode 100644 index 00000000000..9d2a0b97a3a --- /dev/null +++ b/service/migrationhubrefactorspaces/api_op_ListEnvironmentVpcs.go @@ -0,0 +1,221 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all the virtual private clouds (VPCs) that are part of an Amazon Web +// Services Migration Hub Refactor Spaces environment. +func (c *Client) ListEnvironmentVpcs(ctx context.Context, params *ListEnvironmentVpcsInput, optFns ...func(*Options)) (*ListEnvironmentVpcsOutput, error) { + if params == nil { + params = &ListEnvironmentVpcsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListEnvironmentVpcs", params, optFns, c.addOperationListEnvironmentVpcsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListEnvironmentVpcsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListEnvironmentVpcsInput struct { + + // The ID of the environment. + // + // This member is required. + EnvironmentIdentifier *string + + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + MaxResults *int32 + + // The token for the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListEnvironmentVpcsOutput struct { + + // The list of EnvironmentVpc objects. + EnvironmentVpcList []types.EnvironmentVpc + + // The token for the next page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListEnvironmentVpcsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListEnvironmentVpcs{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListEnvironmentVpcs{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListEnvironmentVpcsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEnvironmentVpcs(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListEnvironmentVpcsAPIClient is a client that implements the ListEnvironmentVpcs +// operation. +type ListEnvironmentVpcsAPIClient interface { + ListEnvironmentVpcs(context.Context, *ListEnvironmentVpcsInput, ...func(*Options)) (*ListEnvironmentVpcsOutput, error) +} + +var _ ListEnvironmentVpcsAPIClient = (*Client)(nil) + +// ListEnvironmentVpcsPaginatorOptions is the paginator options for +// ListEnvironmentVpcs +type ListEnvironmentVpcsPaginatorOptions struct { + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListEnvironmentVpcsPaginator is a paginator for ListEnvironmentVpcs +type ListEnvironmentVpcsPaginator struct { + options ListEnvironmentVpcsPaginatorOptions + client ListEnvironmentVpcsAPIClient + params *ListEnvironmentVpcsInput + nextToken *string + firstPage bool +} + +// NewListEnvironmentVpcsPaginator returns a new ListEnvironmentVpcsPaginator +func NewListEnvironmentVpcsPaginator(client ListEnvironmentVpcsAPIClient, params *ListEnvironmentVpcsInput, optFns ...func(*ListEnvironmentVpcsPaginatorOptions)) *ListEnvironmentVpcsPaginator { + if params == nil { + params = &ListEnvironmentVpcsInput{} + } + + options := ListEnvironmentVpcsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListEnvironmentVpcsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListEnvironmentVpcsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListEnvironmentVpcs page. +func (p *ListEnvironmentVpcsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEnvironmentVpcsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListEnvironmentVpcs(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListEnvironmentVpcs(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "refactor-spaces", + OperationName: "ListEnvironmentVpcs", + } +} diff --git a/service/migrationhubrefactorspaces/api_op_ListEnvironments.go b/service/migrationhubrefactorspaces/api_op_ListEnvironments.go new file mode 100644 index 00000000000..f0ff0a4416a --- /dev/null +++ b/service/migrationhubrefactorspaces/api_op_ListEnvironments.go @@ -0,0 +1,212 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists Amazon Web Services Migration Hub Refactor Spaces environments owned by a +// caller account or shared with the caller account. +func (c *Client) ListEnvironments(ctx context.Context, params *ListEnvironmentsInput, optFns ...func(*Options)) (*ListEnvironmentsOutput, error) { + if params == nil { + params = &ListEnvironmentsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListEnvironments", params, optFns, c.addOperationListEnvironmentsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListEnvironmentsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListEnvironmentsInput struct { + + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + MaxResults *int32 + + // The token for the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListEnvironmentsOutput struct { + + // The list of EnvironmentSummary objects. + EnvironmentSummaryList []types.EnvironmentSummary + + // The token for the next page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListEnvironmentsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListEnvironments{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListEnvironments{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEnvironments(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListEnvironmentsAPIClient is a client that implements the ListEnvironments +// operation. +type ListEnvironmentsAPIClient interface { + ListEnvironments(context.Context, *ListEnvironmentsInput, ...func(*Options)) (*ListEnvironmentsOutput, error) +} + +var _ ListEnvironmentsAPIClient = (*Client)(nil) + +// ListEnvironmentsPaginatorOptions is the paginator options for ListEnvironments +type ListEnvironmentsPaginatorOptions struct { + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListEnvironmentsPaginator is a paginator for ListEnvironments +type ListEnvironmentsPaginator struct { + options ListEnvironmentsPaginatorOptions + client ListEnvironmentsAPIClient + params *ListEnvironmentsInput + nextToken *string + firstPage bool +} + +// NewListEnvironmentsPaginator returns a new ListEnvironmentsPaginator +func NewListEnvironmentsPaginator(client ListEnvironmentsAPIClient, params *ListEnvironmentsInput, optFns ...func(*ListEnvironmentsPaginatorOptions)) *ListEnvironmentsPaginator { + if params == nil { + params = &ListEnvironmentsInput{} + } + + options := ListEnvironmentsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListEnvironmentsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListEnvironmentsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListEnvironments page. +func (p *ListEnvironmentsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEnvironmentsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListEnvironments(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListEnvironments(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "refactor-spaces", + OperationName: "ListEnvironments", + } +} diff --git a/service/migrationhubrefactorspaces/api_op_ListRoutes.go b/service/migrationhubrefactorspaces/api_op_ListRoutes.go new file mode 100644 index 00000000000..e6c87ad7628 --- /dev/null +++ b/service/migrationhubrefactorspaces/api_op_ListRoutes.go @@ -0,0 +1,224 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all the Amazon Web Services Migration Hub Refactor Spaces routes within an +// application. +func (c *Client) ListRoutes(ctx context.Context, params *ListRoutesInput, optFns ...func(*Options)) (*ListRoutesOutput, error) { + if params == nil { + params = &ListRoutesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListRoutes", params, optFns, c.addOperationListRoutesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListRoutesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListRoutesInput struct { + + // The ID of the application. + // + // This member is required. + ApplicationIdentifier *string + + // The ID of the environment. + // + // This member is required. + EnvironmentIdentifier *string + + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + MaxResults *int32 + + // The token for the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListRoutesOutput struct { + + // The token for the next page of results. + NextToken *string + + // The list of RouteSummary objects. + RouteSummaryList []types.RouteSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListRoutesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListRoutes{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListRoutes{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListRoutesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRoutes(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListRoutesAPIClient is a client that implements the ListRoutes operation. +type ListRoutesAPIClient interface { + ListRoutes(context.Context, *ListRoutesInput, ...func(*Options)) (*ListRoutesOutput, error) +} + +var _ ListRoutesAPIClient = (*Client)(nil) + +// ListRoutesPaginatorOptions is the paginator options for ListRoutes +type ListRoutesPaginatorOptions struct { + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListRoutesPaginator is a paginator for ListRoutes +type ListRoutesPaginator struct { + options ListRoutesPaginatorOptions + client ListRoutesAPIClient + params *ListRoutesInput + nextToken *string + firstPage bool +} + +// NewListRoutesPaginator returns a new ListRoutesPaginator +func NewListRoutesPaginator(client ListRoutesAPIClient, params *ListRoutesInput, optFns ...func(*ListRoutesPaginatorOptions)) *ListRoutesPaginator { + if params == nil { + params = &ListRoutesInput{} + } + + options := ListRoutesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListRoutesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListRoutesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListRoutes page. +func (p *ListRoutesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListRoutesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListRoutes(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListRoutes(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "refactor-spaces", + OperationName: "ListRoutes", + } +} diff --git a/service/migrationhubrefactorspaces/api_op_ListServices.go b/service/migrationhubrefactorspaces/api_op_ListServices.go new file mode 100644 index 00000000000..b2a17b8574b --- /dev/null +++ b/service/migrationhubrefactorspaces/api_op_ListServices.go @@ -0,0 +1,224 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all the Amazon Web Services Migration Hub Refactor Spaces services within +// an application. +func (c *Client) ListServices(ctx context.Context, params *ListServicesInput, optFns ...func(*Options)) (*ListServicesOutput, error) { + if params == nil { + params = &ListServicesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListServices", params, optFns, c.addOperationListServicesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListServicesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListServicesInput struct { + + // The ID of the application. + // + // This member is required. + ApplicationIdentifier *string + + // The ID of the environment. + // + // This member is required. + EnvironmentIdentifier *string + + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + MaxResults *int32 + + // The token for the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListServicesOutput struct { + + // The token for the next page of results. + NextToken *string + + // The list of ServiceSummary objects. + ServiceSummaryList []types.ServiceSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListServicesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListServices{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListServices{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListServicesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServices(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListServicesAPIClient is a client that implements the ListServices operation. +type ListServicesAPIClient interface { + ListServices(context.Context, *ListServicesInput, ...func(*Options)) (*ListServicesOutput, error) +} + +var _ ListServicesAPIClient = (*Client)(nil) + +// ListServicesPaginatorOptions is the paginator options for ListServices +type ListServicesPaginatorOptions struct { + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListServicesPaginator is a paginator for ListServices +type ListServicesPaginator struct { + options ListServicesPaginatorOptions + client ListServicesAPIClient + params *ListServicesInput + nextToken *string + firstPage bool +} + +// NewListServicesPaginator returns a new ListServicesPaginator +func NewListServicesPaginator(client ListServicesAPIClient, params *ListServicesInput, optFns ...func(*ListServicesPaginatorOptions)) *ListServicesPaginator { + if params == nil { + params = &ListServicesInput{} + } + + options := ListServicesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListServicesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListServicesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListServices page. +func (p *ListServicesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListServicesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListServices(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListServices(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "refactor-spaces", + OperationName: "ListServices", + } +} diff --git a/service/migrationhubrefactorspaces/api_op_ListTagsForResource.go b/service/migrationhubrefactorspaces/api_op_ListTagsForResource.go new file mode 100644 index 00000000000..12015b188ff --- /dev/null +++ b/service/migrationhubrefactorspaces/api_op_ListTagsForResource.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the tags of a resource. The caller account must be the same as the +// resource’s OwnerAccountId. Listing tags in other accounts is not supported. +func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { + if params == nil { + params = &ListTagsForResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTagsForResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListTagsForResourceInput struct { + + // The Amazon Resource Name (ARN) of the resource. + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + +type ListTagsForResourceOutput struct { + + // The list of tags assigned to the resource. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "refactor-spaces", + OperationName: "ListTagsForResource", + } +} diff --git a/service/migrationhubrefactorspaces/api_op_PutResourcePolicy.go b/service/migrationhubrefactorspaces/api_op_PutResourcePolicy.go new file mode 100644 index 00000000000..8276a5fc6a1 --- /dev/null +++ b/service/migrationhubrefactorspaces/api_op_PutResourcePolicy.go @@ -0,0 +1,127 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Attaches a resource-based permission policy to the Amazon Web Services Migration +// Hub Refactor Spaces environment. The policy must contain the same actions and +// condition statements as the +// arn:aws:ram::aws:permission/AWSRAMDefaultPermissionRefactorSpacesEnvironment +// permission in Resource Access Manager. The policy must not contain new lines or +// blank lines. +func (c *Client) PutResourcePolicy(ctx context.Context, params *PutResourcePolicyInput, optFns ...func(*Options)) (*PutResourcePolicyOutput, error) { + if params == nil { + params = &PutResourcePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutResourcePolicy", params, optFns, c.addOperationPutResourcePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutResourcePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutResourcePolicyInput struct { + + // A JSON-formatted string for an Amazon Web Services resource-based policy. + // + // This member is required. + Policy *string + + // The Amazon Resource Name (ARN) of the resource to which the policy is being + // attached. + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + +type PutResourcePolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpPutResourcePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutResourcePolicy{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutResourcePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "refactor-spaces", + OperationName: "PutResourcePolicy", + } +} diff --git a/service/migrationhubrefactorspaces/api_op_TagResource.go b/service/migrationhubrefactorspaces/api_op_TagResource.go new file mode 100644 index 00000000000..96dbe0e7e45 --- /dev/null +++ b/service/migrationhubrefactorspaces/api_op_TagResource.go @@ -0,0 +1,125 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes the tags of a given resource. Tags are metadata which can be used to +// manage a resource. To tag a resource, the caller account must be the same as the +// resource’s OwnerAccountId. Tagging resources in other accounts is not supported. +// Amazon Web Services Migration Hub Refactor Spaces does not propagate tags to +// orchestrated resources, such as an environment’s transit gateway. +func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { + if params == nil { + params = &TagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TagResourceInput struct { + + // The Amazon Resource Name (ARN) of the resource + // + // This member is required. + ResourceArn *string + + // The new or modified tags for the resource. + // + // This member is required. + Tags map[string]string + + noSmithyDocumentSerde +} + +type TagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpTagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "refactor-spaces", + OperationName: "TagResource", + } +} diff --git a/service/migrationhubrefactorspaces/api_op_UntagResource.go b/service/migrationhubrefactorspaces/api_op_UntagResource.go new file mode 100644 index 00000000000..ca6c6a89d59 --- /dev/null +++ b/service/migrationhubrefactorspaces/api_op_UntagResource.go @@ -0,0 +1,124 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds to or modifies the tags of the given resource. Tags are metadata which can +// be used to manage a resource. To untag a resource, the caller account must be +// the same as the resource’s OwnerAccountId. Untagging resources across accounts +// is not supported. +func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { + if params == nil { + params = &UntagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UntagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UntagResourceInput struct { + + // The Amazon Resource Name (ARN) of the resource. + // + // This member is required. + ResourceArn *string + + // The list of keys of the tags to be removed from the resource. + // + // This member is required. + TagKeys []string + + noSmithyDocumentSerde +} + +type UntagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUntagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "refactor-spaces", + OperationName: "UntagResource", + } +} diff --git a/service/migrationhubrefactorspaces/deserializers.go b/service/migrationhubrefactorspaces/deserializers.go new file mode 100644 index 00000000000..6e368af9daf --- /dev/null +++ b/service/migrationhubrefactorspaces/deserializers.go @@ -0,0 +1,7222 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces/types" + smithy "github.com/aws/smithy-go" + smithyio "github.com/aws/smithy-go/io" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" + "strconv" + "strings" +) + +type awsRestjson1_deserializeOpCreateApplication struct { +} + +func (*awsRestjson1_deserializeOpCreateApplication) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateApplication) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCreateApplication(response, &metadata) + } + output := &CreateApplicationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreateApplicationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateApplication(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateApplicationOutput(v **CreateApplicationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateApplicationOutput + if *v == nil { + sv = &CreateApplicationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApiGatewayProxy": + if err := awsRestjson1_deserializeDocumentApiGatewayProxyInput(&sv.ApiGatewayProxy, value); err != nil { + return err + } + + case "ApplicationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationId to be of type string, got %T instead", value) + } + sv.ApplicationId = ptr.String(jtv) + } + + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "CreatedByAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.CreatedByAccountId = ptr.String(jtv) + } + + case "CreatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "EnvironmentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentId to be of type string, got %T instead", value) + } + sv.EnvironmentId = ptr.String(jtv) + } + + case "LastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "OwnerAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.OwnerAccountId = ptr.String(jtv) + } + + case "ProxyType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProxyType to be of type string, got %T instead", value) + } + sv.ProxyType = types.ProxyType(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationState to be of type string, got %T instead", value) + } + sv.State = types.ApplicationState(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "VpcId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VpcId to be of type string, got %T instead", value) + } + sv.VpcId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateEnvironment struct { +} + +func (*awsRestjson1_deserializeOpCreateEnvironment) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateEnvironment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCreateEnvironment(response, &metadata) + } + output := &CreateEnvironmentOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreateEnvironmentOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateEnvironment(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateEnvironmentOutput(v **CreateEnvironmentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateEnvironmentOutput + if *v == nil { + sv = &CreateEnvironmentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "CreatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "EnvironmentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentId to be of type string, got %T instead", value) + } + sv.EnvironmentId = ptr.String(jtv) + } + + case "LastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "NetworkFabricType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NetworkFabricType to be of type string, got %T instead", value) + } + sv.NetworkFabricType = types.NetworkFabricType(jtv) + } + + case "OwnerAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.OwnerAccountId = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentState to be of type string, got %T instead", value) + } + sv.State = types.EnvironmentState(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateRoute struct { +} + +func (*awsRestjson1_deserializeOpCreateRoute) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateRoute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCreateRoute(response, &metadata) + } + output := &CreateRouteOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreateRouteOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateRoute(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateRouteOutput(v **CreateRouteOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateRouteOutput + if *v == nil { + sv = &CreateRouteOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApplicationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationId to be of type string, got %T instead", value) + } + sv.ApplicationId = ptr.String(jtv) + } + + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "CreatedByAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.CreatedByAccountId = ptr.String(jtv) + } + + case "CreatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "LastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "OwnerAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.OwnerAccountId = ptr.String(jtv) + } + + case "RouteId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteId to be of type string, got %T instead", value) + } + sv.RouteId = ptr.String(jtv) + } + + case "RouteType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteType to be of type string, got %T instead", value) + } + sv.RouteType = types.RouteType(jtv) + } + + case "ServiceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceId to be of type string, got %T instead", value) + } + sv.ServiceId = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteState to be of type string, got %T instead", value) + } + sv.State = types.RouteState(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "UriPathRoute": + if err := awsRestjson1_deserializeDocumentUriPathRouteInput(&sv.UriPathRoute, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateService struct { +} + +func (*awsRestjson1_deserializeOpCreateService) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateService) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCreateService(response, &metadata) + } + output := &CreateServiceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreateServiceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateService(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateServiceOutput(v **CreateServiceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateServiceOutput + if *v == nil { + sv = &CreateServiceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApplicationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationId to be of type string, got %T instead", value) + } + sv.ApplicationId = ptr.String(jtv) + } + + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "CreatedByAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.CreatedByAccountId = ptr.String(jtv) + } + + case "CreatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "EndpointType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceEndpointType to be of type string, got %T instead", value) + } + sv.EndpointType = types.ServiceEndpointType(jtv) + } + + case "EnvironmentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentId to be of type string, got %T instead", value) + } + sv.EnvironmentId = ptr.String(jtv) + } + + case "LambdaEndpoint": + if err := awsRestjson1_deserializeDocumentLambdaEndpointInput(&sv.LambdaEndpoint, value); err != nil { + return err + } + + case "LastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "OwnerAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.OwnerAccountId = ptr.String(jtv) + } + + case "ServiceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceId to be of type string, got %T instead", value) + } + sv.ServiceId = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceState to be of type string, got %T instead", value) + } + sv.State = types.ServiceState(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "UrlEndpoint": + if err := awsRestjson1_deserializeDocumentUrlEndpointInput(&sv.UrlEndpoint, value); err != nil { + return err + } + + case "VpcId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VpcId to be of type string, got %T instead", value) + } + sv.VpcId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteApplication struct { +} + +func (*awsRestjson1_deserializeOpDeleteApplication) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteApplication) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteApplication(response, &metadata) + } + output := &DeleteApplicationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDeleteApplicationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteApplication(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDeleteApplicationOutput(v **DeleteApplicationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteApplicationOutput + if *v == nil { + sv = &DeleteApplicationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApplicationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationId to be of type string, got %T instead", value) + } + sv.ApplicationId = ptr.String(jtv) + } + + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "EnvironmentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentId to be of type string, got %T instead", value) + } + sv.EnvironmentId = ptr.String(jtv) + } + + case "LastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationState to be of type string, got %T instead", value) + } + sv.State = types.ApplicationState(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteEnvironment struct { +} + +func (*awsRestjson1_deserializeOpDeleteEnvironment) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteEnvironment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteEnvironment(response, &metadata) + } + output := &DeleteEnvironmentOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDeleteEnvironmentOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteEnvironment(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDeleteEnvironmentOutput(v **DeleteEnvironmentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteEnvironmentOutput + if *v == nil { + sv = &DeleteEnvironmentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "EnvironmentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentId to be of type string, got %T instead", value) + } + sv.EnvironmentId = ptr.String(jtv) + } + + case "LastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentState to be of type string, got %T instead", value) + } + sv.State = types.EnvironmentState(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteResourcePolicy struct { +} + +func (*awsRestjson1_deserializeOpDeleteResourcePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteResourcePolicy(response, &metadata) + } + output := &DeleteResourcePolicyOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteRoute struct { +} + +func (*awsRestjson1_deserializeOpDeleteRoute) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteRoute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteRoute(response, &metadata) + } + output := &DeleteRouteOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDeleteRouteOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteRoute(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDeleteRouteOutput(v **DeleteRouteOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteRouteOutput + if *v == nil { + sv = &DeleteRouteOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApplicationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationId to be of type string, got %T instead", value) + } + sv.ApplicationId = ptr.String(jtv) + } + + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "LastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "RouteId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteId to be of type string, got %T instead", value) + } + sv.RouteId = ptr.String(jtv) + } + + case "ServiceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceId to be of type string, got %T instead", value) + } + sv.ServiceId = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteState to be of type string, got %T instead", value) + } + sv.State = types.RouteState(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteService struct { +} + +func (*awsRestjson1_deserializeOpDeleteService) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteService) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteService(response, &metadata) + } + output := &DeleteServiceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDeleteServiceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteService(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDeleteServiceOutput(v **DeleteServiceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteServiceOutput + if *v == nil { + sv = &DeleteServiceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApplicationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationId to be of type string, got %T instead", value) + } + sv.ApplicationId = ptr.String(jtv) + } + + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "EnvironmentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentId to be of type string, got %T instead", value) + } + sv.EnvironmentId = ptr.String(jtv) + } + + case "LastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "ServiceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceId to be of type string, got %T instead", value) + } + sv.ServiceId = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceState to be of type string, got %T instead", value) + } + sv.State = types.ServiceState(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetApplication struct { +} + +func (*awsRestjson1_deserializeOpGetApplication) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetApplication) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetApplication(response, &metadata) + } + output := &GetApplicationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetApplicationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetApplication(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetApplicationOutput(v **GetApplicationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetApplicationOutput + if *v == nil { + sv = &GetApplicationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApiGatewayProxy": + if err := awsRestjson1_deserializeDocumentApiGatewayProxyConfig(&sv.ApiGatewayProxy, value); err != nil { + return err + } + + case "ApplicationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationId to be of type string, got %T instead", value) + } + sv.ApplicationId = ptr.String(jtv) + } + + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "CreatedByAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.CreatedByAccountId = ptr.String(jtv) + } + + case "CreatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "EnvironmentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentId to be of type string, got %T instead", value) + } + sv.EnvironmentId = ptr.String(jtv) + } + + case "Error": + if err := awsRestjson1_deserializeDocumentErrorResponse(&sv.Error, value); err != nil { + return err + } + + case "LastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "OwnerAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.OwnerAccountId = ptr.String(jtv) + } + + case "ProxyType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProxyType to be of type string, got %T instead", value) + } + sv.ProxyType = types.ProxyType(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationState to be of type string, got %T instead", value) + } + sv.State = types.ApplicationState(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "VpcId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VpcId to be of type string, got %T instead", value) + } + sv.VpcId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetEnvironment struct { +} + +func (*awsRestjson1_deserializeOpGetEnvironment) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetEnvironment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetEnvironment(response, &metadata) + } + output := &GetEnvironmentOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetEnvironmentOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetEnvironment(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetEnvironmentOutput(v **GetEnvironmentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetEnvironmentOutput + if *v == nil { + sv = &GetEnvironmentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "CreatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "EnvironmentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentId to be of type string, got %T instead", value) + } + sv.EnvironmentId = ptr.String(jtv) + } + + case "Error": + if err := awsRestjson1_deserializeDocumentErrorResponse(&sv.Error, value); err != nil { + return err + } + + case "LastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "NetworkFabricType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NetworkFabricType to be of type string, got %T instead", value) + } + sv.NetworkFabricType = types.NetworkFabricType(jtv) + } + + case "OwnerAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.OwnerAccountId = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentState to be of type string, got %T instead", value) + } + sv.State = types.EnvironmentState(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "TransitGatewayId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TransitGatewayId to be of type string, got %T instead", value) + } + sv.TransitGatewayId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetResourcePolicy struct { +} + +func (*awsRestjson1_deserializeOpGetResourcePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetResourcePolicy(response, &metadata) + } + output := &GetResourcePolicyOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetResourcePolicyOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetResourcePolicyOutput(v **GetResourcePolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetResourcePolicyOutput + if *v == nil { + sv = &GetResourcePolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Policy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyString to be of type string, got %T instead", value) + } + sv.Policy = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetRoute struct { +} + +func (*awsRestjson1_deserializeOpGetRoute) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetRoute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetRoute(response, &metadata) + } + output := &GetRouteOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetRouteOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetRoute(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetRouteOutput(v **GetRouteOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetRouteOutput + if *v == nil { + sv = &GetRouteOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApplicationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationId to be of type string, got %T instead", value) + } + sv.ApplicationId = ptr.String(jtv) + } + + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "CreatedByAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.CreatedByAccountId = ptr.String(jtv) + } + + case "CreatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "EnvironmentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentId to be of type string, got %T instead", value) + } + sv.EnvironmentId = ptr.String(jtv) + } + + case "Error": + if err := awsRestjson1_deserializeDocumentErrorResponse(&sv.Error, value); err != nil { + return err + } + + case "IncludeChildPaths": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IncludeChildPaths = ptr.Bool(jtv) + } + + case "LastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Methods": + if err := awsRestjson1_deserializeDocumentHttpMethods(&sv.Methods, value); err != nil { + return err + } + + case "OwnerAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.OwnerAccountId = ptr.String(jtv) + } + + case "PathResourceToId": + if err := awsRestjson1_deserializeDocumentPathResourceToId(&sv.PathResourceToId, value); err != nil { + return err + } + + case "RouteId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteId to be of type string, got %T instead", value) + } + sv.RouteId = ptr.String(jtv) + } + + case "RouteType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteType to be of type string, got %T instead", value) + } + sv.RouteType = types.RouteType(jtv) + } + + case "ServiceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceId to be of type string, got %T instead", value) + } + sv.ServiceId = ptr.String(jtv) + } + + case "SourcePath": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UriPath to be of type string, got %T instead", value) + } + sv.SourcePath = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteState to be of type string, got %T instead", value) + } + sv.State = types.RouteState(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetService struct { +} + +func (*awsRestjson1_deserializeOpGetService) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetService) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetService(response, &metadata) + } + output := &GetServiceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetServiceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetService(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetServiceOutput(v **GetServiceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetServiceOutput + if *v == nil { + sv = &GetServiceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApplicationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationId to be of type string, got %T instead", value) + } + sv.ApplicationId = ptr.String(jtv) + } + + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "CreatedByAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.CreatedByAccountId = ptr.String(jtv) + } + + case "CreatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "EndpointType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceEndpointType to be of type string, got %T instead", value) + } + sv.EndpointType = types.ServiceEndpointType(jtv) + } + + case "EnvironmentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentId to be of type string, got %T instead", value) + } + sv.EnvironmentId = ptr.String(jtv) + } + + case "Error": + if err := awsRestjson1_deserializeDocumentErrorResponse(&sv.Error, value); err != nil { + return err + } + + case "LambdaEndpoint": + if err := awsRestjson1_deserializeDocumentLambdaEndpointConfig(&sv.LambdaEndpoint, value); err != nil { + return err + } + + case "LastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "OwnerAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.OwnerAccountId = ptr.String(jtv) + } + + case "ServiceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceId to be of type string, got %T instead", value) + } + sv.ServiceId = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceState to be of type string, got %T instead", value) + } + sv.State = types.ServiceState(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "UrlEndpoint": + if err := awsRestjson1_deserializeDocumentUrlEndpointConfig(&sv.UrlEndpoint, value); err != nil { + return err + } + + case "VpcId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VpcId to be of type string, got %T instead", value) + } + sv.VpcId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListApplications struct { +} + +func (*awsRestjson1_deserializeOpListApplications) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListApplications) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListApplications(response, &metadata) + } + output := &ListApplicationsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListApplicationsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListApplications(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListApplicationsOutput(v **ListApplicationsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListApplicationsOutput + if *v == nil { + sv = &ListApplicationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApplicationSummaryList": + if err := awsRestjson1_deserializeDocumentApplicationSummaries(&sv.ApplicationSummaryList, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListEnvironments struct { +} + +func (*awsRestjson1_deserializeOpListEnvironments) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListEnvironments) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListEnvironments(response, &metadata) + } + output := &ListEnvironmentsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListEnvironmentsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListEnvironments(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListEnvironmentsOutput(v **ListEnvironmentsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListEnvironmentsOutput + if *v == nil { + sv = &ListEnvironmentsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EnvironmentSummaryList": + if err := awsRestjson1_deserializeDocumentEnvironmentSummaries(&sv.EnvironmentSummaryList, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListEnvironmentVpcs struct { +} + +func (*awsRestjson1_deserializeOpListEnvironmentVpcs) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListEnvironmentVpcs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListEnvironmentVpcs(response, &metadata) + } + output := &ListEnvironmentVpcsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListEnvironmentVpcsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListEnvironmentVpcs(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListEnvironmentVpcsOutput(v **ListEnvironmentVpcsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListEnvironmentVpcsOutput + if *v == nil { + sv = &ListEnvironmentVpcsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EnvironmentVpcList": + if err := awsRestjson1_deserializeDocumentEnvironmentVpcs(&sv.EnvironmentVpcList, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListRoutes struct { +} + +func (*awsRestjson1_deserializeOpListRoutes) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListRoutes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListRoutes(response, &metadata) + } + output := &ListRoutesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListRoutesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListRoutes(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListRoutesOutput(v **ListRoutesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListRoutesOutput + if *v == nil { + sv = &ListRoutesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "RouteSummaryList": + if err := awsRestjson1_deserializeDocumentRouteSummaries(&sv.RouteSummaryList, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListServices struct { +} + +func (*awsRestjson1_deserializeOpListServices) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListServices) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListServices(response, &metadata) + } + output := &ListServicesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListServicesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListServices(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListServicesOutput(v **ListServicesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListServicesOutput + if *v == nil { + sv = &ListServicesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "ServiceSummaryList": + if err := awsRestjson1_deserializeDocumentServiceSummaries(&sv.ServiceSummaryList, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListTagsForResource struct { +} + +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) + } + output := &ListTagsForResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListTagsForResourceOutput + if *v == nil { + sv = &ListTagsForResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPutResourcePolicy struct { +} + +func (*awsRestjson1_deserializeOpPutResourcePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorPutResourcePolicy(response, &metadata) + } + output := &PutResourcePolicyOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPutResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidResourcePolicyException", errorCode): + return awsRestjson1_deserializeErrorInvalidResourcePolicyException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpTagResource struct { +} + +func (*awsRestjson1_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) + } + output := &TagResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUntagResource struct { +} + +func (*awsRestjson1_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) + } + output := &UntagResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsThrottlingException(v *types.ThrottlingException, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("Retry-After"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + vv, err := strconv.ParseInt(headerValues[0], 0, 32) + if err != nil { + return err + } + v.RetryAfterSeconds = int32(vv) + } + + return nil +} +func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDeniedException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ConflictException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentConflictException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalServerException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorInvalidResourcePolicyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidResourcePolicyException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentInvalidResourcePolicyException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceNotFoundException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServiceQuotaExceededException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentServiceQuotaExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ThrottlingException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentThrottlingException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + if err := awsRestjson1_deserializeOpHttpBindingsThrottlingException(output, response); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response error with invalid HTTP bindings, %w", err)} + } + + return output +} + +func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ValidationException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentValidationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAdditionalDetails(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AdditionalDetailsValue to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentApiGatewayProxyConfig(v **types.ApiGatewayProxyConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ApiGatewayProxyConfig + if *v == nil { + sv = &types.ApiGatewayProxyConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApiGatewayId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApiGatewayId to be of type string, got %T instead", value) + } + sv.ApiGatewayId = ptr.String(jtv) + } + + case "EndpointType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApiGatewayEndpointType to be of type string, got %T instead", value) + } + sv.EndpointType = types.ApiGatewayEndpointType(jtv) + } + + case "NlbArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NlbArn to be of type string, got %T instead", value) + } + sv.NlbArn = ptr.String(jtv) + } + + case "NlbName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NlbName to be of type string, got %T instead", value) + } + sv.NlbName = ptr.String(jtv) + } + + case "ProxyUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uri to be of type string, got %T instead", value) + } + sv.ProxyUrl = ptr.String(jtv) + } + + case "StageName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StageName to be of type string, got %T instead", value) + } + sv.StageName = ptr.String(jtv) + } + + case "VpcLinkId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VpcLinkId to be of type string, got %T instead", value) + } + sv.VpcLinkId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentApiGatewayProxyInput(v **types.ApiGatewayProxyInput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ApiGatewayProxyInput + if *v == nil { + sv = &types.ApiGatewayProxyInput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EndpointType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApiGatewayEndpointType to be of type string, got %T instead", value) + } + sv.EndpointType = types.ApiGatewayEndpointType(jtv) + } + + case "StageName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StageName to be of type string, got %T instead", value) + } + sv.StageName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentApiGatewayProxySummary(v **types.ApiGatewayProxySummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ApiGatewayProxySummary + if *v == nil { + sv = &types.ApiGatewayProxySummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApiGatewayId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApiGatewayId to be of type string, got %T instead", value) + } + sv.ApiGatewayId = ptr.String(jtv) + } + + case "EndpointType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApiGatewayEndpointType to be of type string, got %T instead", value) + } + sv.EndpointType = types.ApiGatewayEndpointType(jtv) + } + + case "NlbArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NlbArn to be of type string, got %T instead", value) + } + sv.NlbArn = ptr.String(jtv) + } + + case "NlbName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NlbName to be of type string, got %T instead", value) + } + sv.NlbName = ptr.String(jtv) + } + + case "ProxyUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uri to be of type string, got %T instead", value) + } + sv.ProxyUrl = ptr.String(jtv) + } + + case "StageName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StageName to be of type string, got %T instead", value) + } + sv.StageName = ptr.String(jtv) + } + + case "VpcLinkId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VpcLinkId to be of type string, got %T instead", value) + } + sv.VpcLinkId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentApplicationSummaries(v *[]types.ApplicationSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ApplicationSummary + if *v == nil { + cv = []types.ApplicationSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ApplicationSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentApplicationSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentApplicationSummary(v **types.ApplicationSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ApplicationSummary + if *v == nil { + sv = &types.ApplicationSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApiGatewayProxy": + if err := awsRestjson1_deserializeDocumentApiGatewayProxySummary(&sv.ApiGatewayProxy, value); err != nil { + return err + } + + case "ApplicationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationId to be of type string, got %T instead", value) + } + sv.ApplicationId = ptr.String(jtv) + } + + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "CreatedByAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.CreatedByAccountId = ptr.String(jtv) + } + + case "CreatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "EnvironmentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentId to be of type string, got %T instead", value) + } + sv.EnvironmentId = ptr.String(jtv) + } + + case "Error": + if err := awsRestjson1_deserializeDocumentErrorResponse(&sv.Error, value); err != nil { + return err + } + + case "LastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "OwnerAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.OwnerAccountId = ptr.String(jtv) + } + + case "ProxyType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProxyType to be of type string, got %T instead", value) + } + sv.ProxyType = types.ProxyType(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationState to be of type string, got %T instead", value) + } + sv.State = types.ApplicationState(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "VpcId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VpcId to be of type string, got %T instead", value) + } + sv.VpcId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCidrBlocks(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CidrBlock to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConflictException + if *v == nil { + sv = &types.ConflictException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "ResourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + + case "ResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEnvironmentSummaries(v *[]types.EnvironmentSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.EnvironmentSummary + if *v == nil { + cv = []types.EnvironmentSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EnvironmentSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentEnvironmentSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentEnvironmentSummary(v **types.EnvironmentSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EnvironmentSummary + if *v == nil { + sv = &types.EnvironmentSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "CreatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "EnvironmentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentId to be of type string, got %T instead", value) + } + sv.EnvironmentId = ptr.String(jtv) + } + + case "Error": + if err := awsRestjson1_deserializeDocumentErrorResponse(&sv.Error, value); err != nil { + return err + } + + case "LastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "NetworkFabricType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NetworkFabricType to be of type string, got %T instead", value) + } + sv.NetworkFabricType = types.NetworkFabricType(jtv) + } + + case "OwnerAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.OwnerAccountId = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentState to be of type string, got %T instead", value) + } + sv.State = types.EnvironmentState(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "TransitGatewayId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TransitGatewayId to be of type string, got %T instead", value) + } + sv.TransitGatewayId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEnvironmentVpc(v **types.EnvironmentVpc, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EnvironmentVpc + if *v == nil { + sv = &types.EnvironmentVpc{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "CidrBlocks": + if err := awsRestjson1_deserializeDocumentCidrBlocks(&sv.CidrBlocks, value); err != nil { + return err + } + + case "CreatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "EnvironmentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentId to be of type string, got %T instead", value) + } + sv.EnvironmentId = ptr.String(jtv) + } + + case "LastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "VpcId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VpcId to be of type string, got %T instead", value) + } + sv.VpcId = ptr.String(jtv) + } + + case "VpcName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Ec2TagValue to be of type string, got %T instead", value) + } + sv.VpcName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEnvironmentVpcs(v *[]types.EnvironmentVpc, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.EnvironmentVpc + if *v == nil { + cv = []types.EnvironmentVpc{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EnvironmentVpc + destAddr := &col + if err := awsRestjson1_deserializeDocumentEnvironmentVpc(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentErrorResponse(v **types.ErrorResponse, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ErrorResponse + if *v == nil { + sv = &types.ErrorResponse{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "AdditionalDetails": + if err := awsRestjson1_deserializeDocumentAdditionalDetails(&sv.AdditionalDetails, value); err != nil { + return err + } + + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.Code = types.ErrorCode(jtv) + } + + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "ResourceIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceIdentifier to be of type string, got %T instead", value) + } + sv.ResourceIdentifier = ptr.String(jtv) + } + + case "ResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorResourceType to be of type string, got %T instead", value) + } + sv.ResourceType = types.ErrorResourceType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentHttpMethods(v *[]types.HttpMethod, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.HttpMethod + if *v == nil { + cv = []types.HttpMethod{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.HttpMethod + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected HttpMethod to be of type string, got %T instead", value) + } + col = types.HttpMethod(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InternalServerException + if *v == nil { + sv = &types.InternalServerException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInvalidResourcePolicyException(v **types.InvalidResourcePolicyException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidResourcePolicyException + if *v == nil { + sv = &types.InvalidResourcePolicyException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentLambdaEndpointConfig(v **types.LambdaEndpointConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LambdaEndpointConfig + if *v == nil { + sv = &types.LambdaEndpointConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LambdaArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentLambdaEndpointInput(v **types.LambdaEndpointInput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LambdaEndpointInput + if *v == nil { + sv = &types.LambdaEndpointInput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LambdaArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentLambdaEndpointSummary(v **types.LambdaEndpointSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LambdaEndpointSummary + if *v == nil { + sv = &types.LambdaEndpointSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LambdaArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPathResourceToId(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PathResourceToIdValue to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceNotFoundException + if *v == nil { + sv = &types.ResourceNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "ResourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + + case "ResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRouteSummaries(v *[]types.RouteSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.RouteSummary + if *v == nil { + cv = []types.RouteSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RouteSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentRouteSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRouteSummary(v **types.RouteSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RouteSummary + if *v == nil { + sv = &types.RouteSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApplicationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationId to be of type string, got %T instead", value) + } + sv.ApplicationId = ptr.String(jtv) + } + + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "CreatedByAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.CreatedByAccountId = ptr.String(jtv) + } + + case "CreatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "EnvironmentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentId to be of type string, got %T instead", value) + } + sv.EnvironmentId = ptr.String(jtv) + } + + case "Error": + if err := awsRestjson1_deserializeDocumentErrorResponse(&sv.Error, value); err != nil { + return err + } + + case "IncludeChildPaths": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IncludeChildPaths = ptr.Bool(jtv) + } + + case "LastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Methods": + if err := awsRestjson1_deserializeDocumentHttpMethods(&sv.Methods, value); err != nil { + return err + } + + case "OwnerAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.OwnerAccountId = ptr.String(jtv) + } + + case "PathResourceToId": + if err := awsRestjson1_deserializeDocumentPathResourceToId(&sv.PathResourceToId, value); err != nil { + return err + } + + case "RouteId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteId to be of type string, got %T instead", value) + } + sv.RouteId = ptr.String(jtv) + } + + case "RouteType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteType to be of type string, got %T instead", value) + } + sv.RouteType = types.RouteType(jtv) + } + + case "ServiceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceId to be of type string, got %T instead", value) + } + sv.ServiceId = ptr.String(jtv) + } + + case "SourcePath": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UriPath to be of type string, got %T instead", value) + } + sv.SourcePath = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteState to be of type string, got %T instead", value) + } + sv.State = types.RouteState(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ServiceQuotaExceededException + if *v == nil { + sv = &types.ServiceQuotaExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "QuotaCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.QuotaCode = ptr.String(jtv) + } + + case "ResourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + + case "ResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + case "ServiceCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ServiceCode = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentServiceSummaries(v *[]types.ServiceSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ServiceSummary + if *v == nil { + cv = []types.ServiceSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ServiceSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentServiceSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentServiceSummary(v **types.ServiceSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ServiceSummary + if *v == nil { + sv = &types.ServiceSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApplicationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationId to be of type string, got %T instead", value) + } + sv.ApplicationId = ptr.String(jtv) + } + + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "CreatedByAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.CreatedByAccountId = ptr.String(jtv) + } + + case "CreatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "EndpointType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceEndpointType to be of type string, got %T instead", value) + } + sv.EndpointType = types.ServiceEndpointType(jtv) + } + + case "EnvironmentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentId to be of type string, got %T instead", value) + } + sv.EnvironmentId = ptr.String(jtv) + } + + case "Error": + if err := awsRestjson1_deserializeDocumentErrorResponse(&sv.Error, value); err != nil { + return err + } + + case "LambdaEndpoint": + if err := awsRestjson1_deserializeDocumentLambdaEndpointSummary(&sv.LambdaEndpoint, value); err != nil { + return err + } + + case "LastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "OwnerAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.OwnerAccountId = ptr.String(jtv) + } + + case "ServiceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceId to be of type string, got %T instead", value) + } + sv.ServiceId = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceState to be of type string, got %T instead", value) + } + sv.State = types.ServiceState(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "UrlEndpoint": + if err := awsRestjson1_deserializeDocumentUrlEndpointSummary(&sv.UrlEndpoint, value); err != nil { + return err + } + + case "VpcId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VpcId to be of type string, got %T instead", value) + } + sv.VpcId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTagMap(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ThrottlingException + if *v == nil { + sv = &types.ThrottlingException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "QuotaCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.QuotaCode = ptr.String(jtv) + } + + case "RetryAfterSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected RetryAfterSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RetryAfterSeconds = int32(i64) + } + + case "ServiceCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ServiceCode = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentUriPathRouteInput(v **types.UriPathRouteInput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.UriPathRouteInput + if *v == nil { + sv = &types.UriPathRouteInput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ActivationState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteActivationState to be of type string, got %T instead", value) + } + sv.ActivationState = types.RouteActivationState(jtv) + } + + case "IncludeChildPaths": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IncludeChildPaths = ptr.Bool(jtv) + } + + case "Methods": + if err := awsRestjson1_deserializeDocumentHttpMethods(&sv.Methods, value); err != nil { + return err + } + + case "SourcePath": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UriPath to be of type string, got %T instead", value) + } + sv.SourcePath = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentUrlEndpointConfig(v **types.UrlEndpointConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.UrlEndpointConfig + if *v == nil { + sv = &types.UrlEndpointConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "HealthUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uri to be of type string, got %T instead", value) + } + sv.HealthUrl = ptr.String(jtv) + } + + case "Url": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uri to be of type string, got %T instead", value) + } + sv.Url = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentUrlEndpointInput(v **types.UrlEndpointInput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.UrlEndpointInput + if *v == nil { + sv = &types.UrlEndpointInput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "HealthUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uri to be of type string, got %T instead", value) + } + sv.HealthUrl = ptr.String(jtv) + } + + case "Url": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uri to be of type string, got %T instead", value) + } + sv.Url = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentUrlEndpointSummary(v **types.UrlEndpointSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.UrlEndpointSummary + if *v == nil { + sv = &types.UrlEndpointSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "HealthUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uri to be of type string, got %T instead", value) + } + sv.HealthUrl = ptr.String(jtv) + } + + case "Url": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uri to be of type string, got %T instead", value) + } + sv.Url = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ValidationException + if *v == nil { + sv = &types.ValidationException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} diff --git a/service/migrationhubrefactorspaces/doc.go b/service/migrationhubrefactorspaces/doc.go new file mode 100644 index 00000000000..fb7194cd69a --- /dev/null +++ b/service/migrationhubrefactorspaces/doc.go @@ -0,0 +1,14 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package migrationhubrefactorspaces provides the API client, operations, and +// parameter types for AWS Migration Hub Refactor Spaces. +// +// Amazon Web Services Migration Hub Refactor Spaces This API reference provides +// descriptions, syntax, and other details about each of the actions and data types +// for Amazon Web Services Migration Hub Refactor Spaces (Refactor Spaces). The +// topic for each action shows the API request parameters and the response. +// Alternatively, you can use one of the Amazon Web Services SDKs to access an API +// that is tailored to the programming language or platform that you're using. For +// more information, see Amazon Web Services SDKs +// (http://aws.amazon.com/tools/#SDKs). +package migrationhubrefactorspaces diff --git a/service/migrationhubrefactorspaces/endpoints.go b/service/migrationhubrefactorspaces/endpoints.go new file mode 100644 index 00000000000..141032ba3a6 --- /dev/null +++ b/service/migrationhubrefactorspaces/endpoints.go @@ -0,0 +1,200 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + internalendpoints "github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces/internal/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/url" + "strings" +) + +// EndpointResolverOptions is the service endpoint resolver options +type EndpointResolverOptions = internalendpoints.Options + +// EndpointResolver interface for resolving service endpoints. +type EndpointResolver interface { + ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) +} + +var _ EndpointResolver = &internalendpoints.Resolver{} + +// NewDefaultEndpointResolver constructs a new service endpoint resolver +func NewDefaultEndpointResolver() *internalendpoints.Resolver { + return internalendpoints.New() +} + +// EndpointResolverFunc is a helper utility that wraps a function so it satisfies +// the EndpointResolver interface. This is useful when you want to add additional +// endpoint resolving logic, or stub out specific endpoints with custom values. +type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) + +func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + return fn(region, options) +} + +func resolveDefaultEndpointConfiguration(o *Options) { + if o.EndpointResolver != nil { + return + } + o.EndpointResolver = NewDefaultEndpointResolver() +} + +// EndpointResolverFromURL returns an EndpointResolver configured using the +// provided endpoint url. By default, the resolved endpoint resolver uses the +// client region as signing region, and the endpoint source is set to +// EndpointSourceCustom.You can provide functional options to configure endpoint +// values for the resolved endpoint. +func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { + e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} + for _, fn := range optFns { + fn(&e) + } + + return EndpointResolverFunc( + func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { + if len(e.SigningRegion) == 0 { + e.SigningRegion = region + } + return e, nil + }, + ) +} + +type ResolveEndpoint struct { + Resolver EndpointResolver + Options EndpointResolverOptions +} + +func (*ResolveEndpoint) ID() string { + return "ResolveEndpoint" +} + +func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.Resolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + eo := m.Options + eo.Logger = middleware.GetLogger(ctx) + + var endpoint aws.Endpoint + endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL, err = url.Parse(endpoint.URL) + if err != nil { + return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) + } + + if len(awsmiddleware.GetSigningName(ctx)) == 0 { + signingName := endpoint.SigningName + if len(signingName) == 0 { + signingName = "refactor-spaces" + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + } + ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) + ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) + ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) + ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) + return next.HandleSerialize(ctx, in) +} +func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { + return stack.Serialize.Insert(&ResolveEndpoint{ + Resolver: o.EndpointResolver, + Options: o.EndpointOptions, + }, "OperationSerializer", middleware.Before) +} + +func removeResolveEndpointMiddleware(stack *middleware.Stack) error { + _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) + return err +} + +type wrappedEndpointResolver struct { + awsResolver aws.EndpointResolverWithOptions + resolver EndpointResolver +} + +func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + if w.awsResolver == nil { + goto fallback + } + endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options) + if err == nil { + return endpoint, nil + } + + if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) { + return endpoint, err + } + +fallback: + if w.resolver == nil { + return endpoint, fmt.Errorf("default endpoint resolver provided was nil") + } + return w.resolver.ResolveEndpoint(region, options) +} + +type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) + +func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { + return a(service, region) +} + +var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) + +// withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. +// If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided +// fallbackResolver for resolution. +// +// fallbackResolver must not be nil +func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver { + var resolver aws.EndpointResolverWithOptions + + if awsResolverWithOptions != nil { + resolver = awsResolverWithOptions + } else if awsResolver != nil { + resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) + } + + return &wrappedEndpointResolver{ + awsResolver: resolver, + resolver: fallbackResolver, + } +} + +func finalizeClientEndpointResolverOptions(options *Options) { + options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() + + if len(options.EndpointOptions.ResolvedRegion) == 0 { + const fipsInfix = "-fips-" + const fipsPrefix = "fips-" + const fipsSuffix = "-fips" + + if strings.Contains(options.Region, fipsInfix) || + strings.Contains(options.Region, fipsPrefix) || + strings.Contains(options.Region, fipsSuffix) { + options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( + options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") + options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled + } + } + +} diff --git a/service/migrationhubrefactorspaces/generated.json b/service/migrationhubrefactorspaces/generated.json new file mode 100644 index 00000000000..f1fa1c74a29 --- /dev/null +++ b/service/migrationhubrefactorspaces/generated.json @@ -0,0 +1,49 @@ +{ + "dependencies": { + "github.com/aws/aws-sdk-go-v2": "v1.4.0", + "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", + "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", + "github.com/aws/smithy-go": "v1.4.0" + }, + "files": [ + "api_client.go", + "api_op_CreateApplication.go", + "api_op_CreateEnvironment.go", + "api_op_CreateRoute.go", + "api_op_CreateService.go", + "api_op_DeleteApplication.go", + "api_op_DeleteEnvironment.go", + "api_op_DeleteResourcePolicy.go", + "api_op_DeleteRoute.go", + "api_op_DeleteService.go", + "api_op_GetApplication.go", + "api_op_GetEnvironment.go", + "api_op_GetResourcePolicy.go", + "api_op_GetRoute.go", + "api_op_GetService.go", + "api_op_ListApplications.go", + "api_op_ListEnvironmentVpcs.go", + "api_op_ListEnvironments.go", + "api_op_ListRoutes.go", + "api_op_ListServices.go", + "api_op_ListTagsForResource.go", + "api_op_PutResourcePolicy.go", + "api_op_TagResource.go", + "api_op_UntagResource.go", + "deserializers.go", + "doc.go", + "endpoints.go", + "generated.json", + "internal/endpoints/endpoints.go", + "internal/endpoints/endpoints_test.go", + "protocol_test.go", + "serializers.go", + "types/enums.go", + "types/errors.go", + "types/types.go", + "validators.go" + ], + "go": "1.15", + "module": "github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces", + "unstable": false +} diff --git a/service/migrationhubrefactorspaces/go.mod b/service/migrationhubrefactorspaces/go.mod new file mode 100644 index 00000000000..21dd3e93812 --- /dev/null +++ b/service/migrationhubrefactorspaces/go.mod @@ -0,0 +1,16 @@ +module github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces + +go 1.15 + +require ( + github.com/aws/aws-sdk-go-v2 v1.11.1 + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.1 + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.0.1 + github.com/aws/smithy-go v1.9.0 +) + +replace github.com/aws/aws-sdk-go-v2 => ../../ + +replace github.com/aws/aws-sdk-go-v2/internal/configsources => ../../internal/configsources/ + +replace github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 => ../../internal/endpoints/v2/ diff --git a/service/migrationhubrefactorspaces/go.sum b/service/migrationhubrefactorspaces/go.sum new file mode 100644 index 00000000000..45efc0b1e03 --- /dev/null +++ b/service/migrationhubrefactorspaces/go.sum @@ -0,0 +1,14 @@ +github.com/aws/smithy-go v1.9.0 h1:c7FUdEqrQA1/UVKKCNDFQPNKGp4FQg3YW4Ck5SLTG58= +github.com/aws/smithy-go v1.9.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/service/migrationhubrefactorspaces/go_module_metadata.go b/service/migrationhubrefactorspaces/go_module_metadata.go new file mode 100644 index 00000000000..56012dc304b --- /dev/null +++ b/service/migrationhubrefactorspaces/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package migrationhubrefactorspaces + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "tip" diff --git a/service/migrationhubrefactorspaces/internal/endpoints/endpoints.go b/service/migrationhubrefactorspaces/internal/endpoints/endpoints.go new file mode 100644 index 00000000000..e45112f9b3d --- /dev/null +++ b/service/migrationhubrefactorspaces/internal/endpoints/endpoints.go @@ -0,0 +1,250 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "github.com/aws/aws-sdk-go-v2/aws" + endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" + "github.com/aws/smithy-go/logging" + "regexp" +) + +// Options is the endpoint resolver configuration options +type Options struct { + // Logger is a logging implementation that log events should be sent to. + Logger logging.Logger + + // LogDeprecated indicates that deprecated endpoints should be logged to the + // provided logger. + LogDeprecated bool + + // ResolvedRegion is used to override the region to be resolved, rather then the + // using the value passed to the ResolveEndpoint method. This value is used by the + // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative + // name. You must not set this value directly in your application. + ResolvedRegion string + + // DisableHTTPS informs the resolver to return an endpoint that does not use the + // HTTPS scheme. + DisableHTTPS bool + + // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. + UseDualStackEndpoint aws.DualStackEndpointState + + // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. + UseFIPSEndpoint aws.FIPSEndpointState +} + +func (o Options) GetResolvedRegion() string { + return o.ResolvedRegion +} + +func (o Options) GetDisableHTTPS() bool { + return o.DisableHTTPS +} + +func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { + return o.UseDualStackEndpoint +} + +func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { + return o.UseFIPSEndpoint +} + +func transformToSharedOptions(options Options) endpoints.Options { + return endpoints.Options{ + Logger: options.Logger, + LogDeprecated: options.LogDeprecated, + ResolvedRegion: options.ResolvedRegion, + DisableHTTPS: options.DisableHTTPS, + UseDualStackEndpoint: options.UseDualStackEndpoint, + UseFIPSEndpoint: options.UseFIPSEndpoint, + } +} + +// Resolver Migration Hub Refactor Spaces endpoint resolver +type Resolver struct { + partitions endpoints.Partitions +} + +// ResolveEndpoint resolves the service endpoint for the given region and options +func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { + if len(region) == 0 { + return endpoint, &aws.MissingRegionError{} + } + + opt := transformToSharedOptions(options) + return r.partitions.ResolveEndpoint(region, opt) +} + +// New returns a new Resolver +func New() *Resolver { + return &Resolver{ + partitions: defaultPartitions, + } +} + +var partitionRegexp = struct { + Aws *regexp.Regexp + AwsCn *regexp.Regexp + AwsIso *regexp.Regexp + AwsIsoB *regexp.Regexp + AwsUsGov *regexp.Regexp +}{ + + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"), + AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), + AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), + AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), + AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), +} + +var defaultPartitions = endpoints.Partitions{ + { + ID: "aws", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "refactor-spaces.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "refactor-spaces-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "refactor-spaces-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "refactor-spaces.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: true, + }, + { + ID: "aws-cn", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "refactor-spaces.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "refactor-spaces-fips.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "refactor-spaces-fips.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "refactor-spaces.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsCn, + IsRegionalized: true, + }, + { + ID: "aws-iso", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "refactor-spaces-fips.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "refactor-spaces.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIso, + IsRegionalized: true, + }, + { + ID: "aws-iso-b", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "refactor-spaces-fips.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "refactor-spaces.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoB, + IsRegionalized: true, + }, + { + ID: "aws-us-gov", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "refactor-spaces.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "refactor-spaces-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "refactor-spaces-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "refactor-spaces.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: true, + }, +} diff --git a/service/migrationhubrefactorspaces/internal/endpoints/endpoints_test.go b/service/migrationhubrefactorspaces/internal/endpoints/endpoints_test.go new file mode 100644 index 00000000000..08e5da2d833 --- /dev/null +++ b/service/migrationhubrefactorspaces/internal/endpoints/endpoints_test.go @@ -0,0 +1,11 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "testing" +) + +func TestRegexCompile(t *testing.T) { + _ = defaultPartitions +} diff --git a/service/migrationhubrefactorspaces/protocol_test.go b/service/migrationhubrefactorspaces/protocol_test.go new file mode 100644 index 00000000000..b1d30c13ab0 --- /dev/null +++ b/service/migrationhubrefactorspaces/protocol_test.go @@ -0,0 +1,3 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces diff --git a/service/migrationhubrefactorspaces/serializers.go b/service/migrationhubrefactorspaces/serializers.go new file mode 100644 index 00000000000..9bbbe01a6e5 --- /dev/null +++ b/service/migrationhubrefactorspaces/serializers.go @@ -0,0 +1,1844 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces + +import ( + "bytes" + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/encoding/httpbinding" + smithyjson "github.com/aws/smithy-go/encoding/json" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +type awsRestjson1_serializeOpCreateApplication struct { +} + +func (*awsRestjson1_serializeOpCreateApplication) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateApplication) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateApplicationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/environments/{EnvironmentIdentifier}/applications") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateApplicationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateApplicationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateApplicationInput(v *CreateApplicationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.EnvironmentIdentifier == nil || len(*v.EnvironmentIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member EnvironmentIdentifier must not be empty")} + } + if v.EnvironmentIdentifier != nil { + if err := encoder.SetURI("EnvironmentIdentifier").String(*v.EnvironmentIdentifier); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateApplicationInput(v *CreateApplicationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ApiGatewayProxy != nil { + ok := object.Key("ApiGatewayProxy") + if err := awsRestjson1_serializeDocumentApiGatewayProxyInput(v.ApiGatewayProxy, ok); err != nil { + return err + } + } + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if len(v.ProxyType) > 0 { + ok := object.Key("ProxyType") + ok.String(string(v.ProxyType)) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + if v.VpcId != nil { + ok := object.Key("VpcId") + ok.String(*v.VpcId) + } + + return nil +} + +type awsRestjson1_serializeOpCreateEnvironment struct { +} + +func (*awsRestjson1_serializeOpCreateEnvironment) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateEnvironment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateEnvironmentInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/environments") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateEnvironmentInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateEnvironmentInput(v *CreateEnvironmentInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateEnvironmentInput(v *CreateEnvironmentInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if len(v.NetworkFabricType) > 0 { + ok := object.Key("NetworkFabricType") + ok.String(string(v.NetworkFabricType)) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCreateRoute struct { +} + +func (*awsRestjson1_serializeOpCreateRoute) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateRouteInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/routes") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateRouteInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateRouteInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateRouteInput(v *CreateRouteInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ApplicationIdentifier == nil || len(*v.ApplicationIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ApplicationIdentifier must not be empty")} + } + if v.ApplicationIdentifier != nil { + if err := encoder.SetURI("ApplicationIdentifier").String(*v.ApplicationIdentifier); err != nil { + return err + } + } + + if v.EnvironmentIdentifier == nil || len(*v.EnvironmentIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member EnvironmentIdentifier must not be empty")} + } + if v.EnvironmentIdentifier != nil { + if err := encoder.SetURI("EnvironmentIdentifier").String(*v.EnvironmentIdentifier); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateRouteInput(v *CreateRouteInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if len(v.RouteType) > 0 { + ok := object.Key("RouteType") + ok.String(string(v.RouteType)) + } + + if v.ServiceIdentifier != nil { + ok := object.Key("ServiceIdentifier") + ok.String(*v.ServiceIdentifier) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + if v.UriPathRoute != nil { + ok := object.Key("UriPathRoute") + if err := awsRestjson1_serializeDocumentUriPathRouteInput(v.UriPathRoute, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCreateService struct { +} + +func (*awsRestjson1_serializeOpCreateService) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateService) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateServiceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/services") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateServiceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateServiceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateServiceInput(v *CreateServiceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ApplicationIdentifier == nil || len(*v.ApplicationIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ApplicationIdentifier must not be empty")} + } + if v.ApplicationIdentifier != nil { + if err := encoder.SetURI("ApplicationIdentifier").String(*v.ApplicationIdentifier); err != nil { + return err + } + } + + if v.EnvironmentIdentifier == nil || len(*v.EnvironmentIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member EnvironmentIdentifier must not be empty")} + } + if v.EnvironmentIdentifier != nil { + if err := encoder.SetURI("EnvironmentIdentifier").String(*v.EnvironmentIdentifier); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateServiceInput(v *CreateServiceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if len(v.EndpointType) > 0 { + ok := object.Key("EndpointType") + ok.String(string(v.EndpointType)) + } + + if v.LambdaEndpoint != nil { + ok := object.Key("LambdaEndpoint") + if err := awsRestjson1_serializeDocumentLambdaEndpointInput(v.LambdaEndpoint, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + if v.UrlEndpoint != nil { + ok := object.Key("UrlEndpoint") + if err := awsRestjson1_serializeDocumentUrlEndpointInput(v.UrlEndpoint, ok); err != nil { + return err + } + } + + if v.VpcId != nil { + ok := object.Key("VpcId") + ok.String(*v.VpcId) + } + + return nil +} + +type awsRestjson1_serializeOpDeleteApplication struct { +} + +func (*awsRestjson1_serializeOpDeleteApplication) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteApplication) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteApplicationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteApplicationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteApplicationInput(v *DeleteApplicationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ApplicationIdentifier == nil || len(*v.ApplicationIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ApplicationIdentifier must not be empty")} + } + if v.ApplicationIdentifier != nil { + if err := encoder.SetURI("ApplicationIdentifier").String(*v.ApplicationIdentifier); err != nil { + return err + } + } + + if v.EnvironmentIdentifier == nil || len(*v.EnvironmentIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member EnvironmentIdentifier must not be empty")} + } + if v.EnvironmentIdentifier != nil { + if err := encoder.SetURI("EnvironmentIdentifier").String(*v.EnvironmentIdentifier); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteEnvironment struct { +} + +func (*awsRestjson1_serializeOpDeleteEnvironment) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteEnvironment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteEnvironmentInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/environments/{EnvironmentIdentifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteEnvironmentInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteEnvironmentInput(v *DeleteEnvironmentInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.EnvironmentIdentifier == nil || len(*v.EnvironmentIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member EnvironmentIdentifier must not be empty")} + } + if v.EnvironmentIdentifier != nil { + if err := encoder.SetURI("EnvironmentIdentifier").String(*v.EnvironmentIdentifier); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteResourcePolicy struct { +} + +func (*awsRestjson1_serializeOpDeleteResourcePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteResourcePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/resourcepolicy/{Identifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteResourcePolicyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteResourcePolicyInput(v *DeleteResourcePolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Identifier must not be empty")} + } + if v.Identifier != nil { + if err := encoder.SetURI("Identifier").String(*v.Identifier); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteRoute struct { +} + +func (*awsRestjson1_serializeOpDeleteRoute) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteRouteInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/routes/{RouteIdentifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteRouteInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteRouteInput(v *DeleteRouteInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ApplicationIdentifier == nil || len(*v.ApplicationIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ApplicationIdentifier must not be empty")} + } + if v.ApplicationIdentifier != nil { + if err := encoder.SetURI("ApplicationIdentifier").String(*v.ApplicationIdentifier); err != nil { + return err + } + } + + if v.EnvironmentIdentifier == nil || len(*v.EnvironmentIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member EnvironmentIdentifier must not be empty")} + } + if v.EnvironmentIdentifier != nil { + if err := encoder.SetURI("EnvironmentIdentifier").String(*v.EnvironmentIdentifier); err != nil { + return err + } + } + + if v.RouteIdentifier == nil || len(*v.RouteIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member RouteIdentifier must not be empty")} + } + if v.RouteIdentifier != nil { + if err := encoder.SetURI("RouteIdentifier").String(*v.RouteIdentifier); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteService struct { +} + +func (*awsRestjson1_serializeOpDeleteService) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteService) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteServiceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/services/{ServiceIdentifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteServiceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteServiceInput(v *DeleteServiceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ApplicationIdentifier == nil || len(*v.ApplicationIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ApplicationIdentifier must not be empty")} + } + if v.ApplicationIdentifier != nil { + if err := encoder.SetURI("ApplicationIdentifier").String(*v.ApplicationIdentifier); err != nil { + return err + } + } + + if v.EnvironmentIdentifier == nil || len(*v.EnvironmentIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member EnvironmentIdentifier must not be empty")} + } + if v.EnvironmentIdentifier != nil { + if err := encoder.SetURI("EnvironmentIdentifier").String(*v.EnvironmentIdentifier); err != nil { + return err + } + } + + if v.ServiceIdentifier == nil || len(*v.ServiceIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ServiceIdentifier must not be empty")} + } + if v.ServiceIdentifier != nil { + if err := encoder.SetURI("ServiceIdentifier").String(*v.ServiceIdentifier); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetApplication struct { +} + +func (*awsRestjson1_serializeOpGetApplication) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetApplication) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetApplicationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetApplicationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetApplicationInput(v *GetApplicationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ApplicationIdentifier == nil || len(*v.ApplicationIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ApplicationIdentifier must not be empty")} + } + if v.ApplicationIdentifier != nil { + if err := encoder.SetURI("ApplicationIdentifier").String(*v.ApplicationIdentifier); err != nil { + return err + } + } + + if v.EnvironmentIdentifier == nil || len(*v.EnvironmentIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member EnvironmentIdentifier must not be empty")} + } + if v.EnvironmentIdentifier != nil { + if err := encoder.SetURI("EnvironmentIdentifier").String(*v.EnvironmentIdentifier); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetEnvironment struct { +} + +func (*awsRestjson1_serializeOpGetEnvironment) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetEnvironment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetEnvironmentInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/environments/{EnvironmentIdentifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetEnvironmentInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetEnvironmentInput(v *GetEnvironmentInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.EnvironmentIdentifier == nil || len(*v.EnvironmentIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member EnvironmentIdentifier must not be empty")} + } + if v.EnvironmentIdentifier != nil { + if err := encoder.SetURI("EnvironmentIdentifier").String(*v.EnvironmentIdentifier); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetResourcePolicy struct { +} + +func (*awsRestjson1_serializeOpGetResourcePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetResourcePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/resourcepolicy/{Identifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetResourcePolicyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetResourcePolicyInput(v *GetResourcePolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Identifier must not be empty")} + } + if v.Identifier != nil { + if err := encoder.SetURI("Identifier").String(*v.Identifier); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetRoute struct { +} + +func (*awsRestjson1_serializeOpGetRoute) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetRouteInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/routes/{RouteIdentifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetRouteInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetRouteInput(v *GetRouteInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ApplicationIdentifier == nil || len(*v.ApplicationIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ApplicationIdentifier must not be empty")} + } + if v.ApplicationIdentifier != nil { + if err := encoder.SetURI("ApplicationIdentifier").String(*v.ApplicationIdentifier); err != nil { + return err + } + } + + if v.EnvironmentIdentifier == nil || len(*v.EnvironmentIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member EnvironmentIdentifier must not be empty")} + } + if v.EnvironmentIdentifier != nil { + if err := encoder.SetURI("EnvironmentIdentifier").String(*v.EnvironmentIdentifier); err != nil { + return err + } + } + + if v.RouteIdentifier == nil || len(*v.RouteIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member RouteIdentifier must not be empty")} + } + if v.RouteIdentifier != nil { + if err := encoder.SetURI("RouteIdentifier").String(*v.RouteIdentifier); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetService struct { +} + +func (*awsRestjson1_serializeOpGetService) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetService) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetServiceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/services/{ServiceIdentifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetServiceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetServiceInput(v *GetServiceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ApplicationIdentifier == nil || len(*v.ApplicationIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ApplicationIdentifier must not be empty")} + } + if v.ApplicationIdentifier != nil { + if err := encoder.SetURI("ApplicationIdentifier").String(*v.ApplicationIdentifier); err != nil { + return err + } + } + + if v.EnvironmentIdentifier == nil || len(*v.EnvironmentIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member EnvironmentIdentifier must not be empty")} + } + if v.EnvironmentIdentifier != nil { + if err := encoder.SetURI("EnvironmentIdentifier").String(*v.EnvironmentIdentifier); err != nil { + return err + } + } + + if v.ServiceIdentifier == nil || len(*v.ServiceIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ServiceIdentifier must not be empty")} + } + if v.ServiceIdentifier != nil { + if err := encoder.SetURI("ServiceIdentifier").String(*v.ServiceIdentifier); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpListApplications struct { +} + +func (*awsRestjson1_serializeOpListApplications) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListApplications) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListApplicationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/environments/{EnvironmentIdentifier}/applications") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListApplicationsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListApplicationsInput(v *ListApplicationsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.EnvironmentIdentifier == nil || len(*v.EnvironmentIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member EnvironmentIdentifier must not be empty")} + } + if v.EnvironmentIdentifier != nil { + if err := encoder.SetURI("EnvironmentIdentifier").String(*v.EnvironmentIdentifier); err != nil { + return err + } + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListEnvironments struct { +} + +func (*awsRestjson1_serializeOpListEnvironments) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListEnvironments) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListEnvironmentsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/environments") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListEnvironmentsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListEnvironmentsInput(v *ListEnvironmentsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListEnvironmentVpcs struct { +} + +func (*awsRestjson1_serializeOpListEnvironmentVpcs) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListEnvironmentVpcs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListEnvironmentVpcsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/environments/{EnvironmentIdentifier}/vpcs") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListEnvironmentVpcsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListEnvironmentVpcsInput(v *ListEnvironmentVpcsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.EnvironmentIdentifier == nil || len(*v.EnvironmentIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member EnvironmentIdentifier must not be empty")} + } + if v.EnvironmentIdentifier != nil { + if err := encoder.SetURI("EnvironmentIdentifier").String(*v.EnvironmentIdentifier); err != nil { + return err + } + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListRoutes struct { +} + +func (*awsRestjson1_serializeOpListRoutes) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListRoutes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListRoutesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/routes") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListRoutesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListRoutesInput(v *ListRoutesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ApplicationIdentifier == nil || len(*v.ApplicationIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ApplicationIdentifier must not be empty")} + } + if v.ApplicationIdentifier != nil { + if err := encoder.SetURI("ApplicationIdentifier").String(*v.ApplicationIdentifier); err != nil { + return err + } + } + + if v.EnvironmentIdentifier == nil || len(*v.EnvironmentIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member EnvironmentIdentifier must not be empty")} + } + if v.EnvironmentIdentifier != nil { + if err := encoder.SetURI("EnvironmentIdentifier").String(*v.EnvironmentIdentifier); err != nil { + return err + } + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListServices struct { +} + +func (*awsRestjson1_serializeOpListServices) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListServices) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListServicesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/services") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListServicesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListServicesInput(v *ListServicesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ApplicationIdentifier == nil || len(*v.ApplicationIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ApplicationIdentifier must not be empty")} + } + if v.ApplicationIdentifier != nil { + if err := encoder.SetURI("ApplicationIdentifier").String(*v.ApplicationIdentifier); err != nil { + return err + } + } + + if v.EnvironmentIdentifier == nil || len(*v.EnvironmentIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member EnvironmentIdentifier must not be empty")} + } + if v.EnvironmentIdentifier != nil { + if err := encoder.SetURI("EnvironmentIdentifier").String(*v.EnvironmentIdentifier); err != nil { + return err + } + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListTagsForResource struct { +} + +func (*awsRestjson1_serializeOpListTagsForResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListTagsForResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpPutResourcePolicy struct { +} + +func (*awsRestjson1_serializeOpPutResourcePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPutResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutResourcePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/resourcepolicy") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPutResourcePolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsPutResourcePolicyInput(v *PutResourcePolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentPutResourcePolicyInput(v *PutResourcePolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Policy != nil { + ok := object.Key("Policy") + ok.String(*v.Policy) + } + + if v.ResourceArn != nil { + ok := object.Key("ResourceArn") + ok.String(*v.ResourceArn) + } + + return nil +} + +type awsRestjson1_serializeOpTagResource struct { +} + +func (*awsRestjson1_serializeOpTagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*TagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUntagResource struct { +} + +func (*awsRestjson1_serializeOpUntagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UntagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + if v.TagKeys != nil { + for i := range v.TagKeys { + encoder.AddQuery("tagKeys").String(v.TagKeys[i]) + } + } + + return nil +} + +func awsRestjson1_serializeDocumentApiGatewayProxyInput(v *types.ApiGatewayProxyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.EndpointType) > 0 { + ok := object.Key("EndpointType") + ok.String(string(v.EndpointType)) + } + + if v.StageName != nil { + ok := object.Key("StageName") + ok.String(*v.StageName) + } + + return nil +} + +func awsRestjson1_serializeDocumentHttpMethods(v []types.HttpMethod, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsRestjson1_serializeDocumentLambdaEndpointInput(v *types.LambdaEndpointInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Arn != nil { + ok := object.Key("Arn") + ok.String(*v.Arn) + } + + return nil +} + +func awsRestjson1_serializeDocumentTagMap(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + +func awsRestjson1_serializeDocumentUriPathRouteInput(v *types.UriPathRouteInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.ActivationState) > 0 { + ok := object.Key("ActivationState") + ok.String(string(v.ActivationState)) + } + + if v.IncludeChildPaths != nil { + ok := object.Key("IncludeChildPaths") + ok.Boolean(*v.IncludeChildPaths) + } + + if v.Methods != nil { + ok := object.Key("Methods") + if err := awsRestjson1_serializeDocumentHttpMethods(v.Methods, ok); err != nil { + return err + } + } + + if v.SourcePath != nil { + ok := object.Key("SourcePath") + ok.String(*v.SourcePath) + } + + return nil +} + +func awsRestjson1_serializeDocumentUrlEndpointInput(v *types.UrlEndpointInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.HealthUrl != nil { + ok := object.Key("HealthUrl") + ok.String(*v.HealthUrl) + } + + if v.Url != nil { + ok := object.Key("Url") + ok.String(*v.Url) + } + + return nil +} diff --git a/service/migrationhubrefactorspaces/types/enums.go b/service/migrationhubrefactorspaces/types/enums.go new file mode 100644 index 00000000000..73823fd74b6 --- /dev/null +++ b/service/migrationhubrefactorspaces/types/enums.go @@ -0,0 +1,317 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type ApiGatewayEndpointType string + +// Enum values for ApiGatewayEndpointType +const ( + ApiGatewayEndpointTypeRegional ApiGatewayEndpointType = "REGIONAL" + ApiGatewayEndpointTypePrivate ApiGatewayEndpointType = "PRIVATE" +) + +// Values returns all known values for ApiGatewayEndpointType. Note that this can +// be expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ApiGatewayEndpointType) Values() []ApiGatewayEndpointType { + return []ApiGatewayEndpointType{ + "REGIONAL", + "PRIVATE", + } +} + +type ApplicationState string + +// Enum values for ApplicationState +const ( + ApplicationStateCreating ApplicationState = "CREATING" + ApplicationStateActive ApplicationState = "ACTIVE" + ApplicationStateDeleting ApplicationState = "DELETING" + ApplicationStateFailed ApplicationState = "FAILED" + ApplicationStateUpdating ApplicationState = "UPDATING" +) + +// Values returns all known values for ApplicationState. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ApplicationState) Values() []ApplicationState { + return []ApplicationState{ + "CREATING", + "ACTIVE", + "DELETING", + "FAILED", + "UPDATING", + } +} + +type EnvironmentState string + +// Enum values for EnvironmentState +const ( + EnvironmentStateCreating EnvironmentState = "CREATING" + EnvironmentStateActive EnvironmentState = "ACTIVE" + EnvironmentStateDeleting EnvironmentState = "DELETING" + EnvironmentStateFailed EnvironmentState = "FAILED" +) + +// Values returns all known values for EnvironmentState. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (EnvironmentState) Values() []EnvironmentState { + return []EnvironmentState{ + "CREATING", + "ACTIVE", + "DELETING", + "FAILED", + } +} + +type ErrorCode string + +// Enum values for ErrorCode +const ( + ErrorCodeInvalidResourceState ErrorCode = "INVALID_RESOURCE_STATE" + ErrorCodeResourceLimitExceeded ErrorCode = "RESOURCE_LIMIT_EXCEEDED" + ErrorCodeResourceCreationFailure ErrorCode = "RESOURCE_CREATION_FAILURE" + ErrorCodeResourceUpdateFailure ErrorCode = "RESOURCE_UPDATE_FAILURE" + ErrorCodeServiceEndpointHealthCheckFailure ErrorCode = "SERVICE_ENDPOINT_HEALTH_CHECK_FAILURE" + ErrorCodeResourceDeletionFailure ErrorCode = "RESOURCE_DELETION_FAILURE" + ErrorCodeResourceRetrievalFailure ErrorCode = "RESOURCE_RETRIEVAL_FAILURE" + ErrorCodeResourceInUse ErrorCode = "RESOURCE_IN_USE" + ErrorCodeResourceNotFound ErrorCode = "RESOURCE_NOT_FOUND" + ErrorCodeStateTransitionFailure ErrorCode = "STATE_TRANSITION_FAILURE" + ErrorCodeRequestLimitExceeded ErrorCode = "REQUEST_LIMIT_EXCEEDED" + ErrorCodeNotAuthorized ErrorCode = "NOT_AUTHORIZED" +) + +// Values returns all known values for ErrorCode. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (ErrorCode) Values() []ErrorCode { + return []ErrorCode{ + "INVALID_RESOURCE_STATE", + "RESOURCE_LIMIT_EXCEEDED", + "RESOURCE_CREATION_FAILURE", + "RESOURCE_UPDATE_FAILURE", + "SERVICE_ENDPOINT_HEALTH_CHECK_FAILURE", + "RESOURCE_DELETION_FAILURE", + "RESOURCE_RETRIEVAL_FAILURE", + "RESOURCE_IN_USE", + "RESOURCE_NOT_FOUND", + "STATE_TRANSITION_FAILURE", + "REQUEST_LIMIT_EXCEEDED", + "NOT_AUTHORIZED", + } +} + +type ErrorResourceType string + +// Enum values for ErrorResourceType +const ( + ErrorResourceTypeEnvironment ErrorResourceType = "ENVIRONMENT" + ErrorResourceTypeApplication ErrorResourceType = "APPLICATION" + ErrorResourceTypeRoute ErrorResourceType = "ROUTE" + ErrorResourceTypeService ErrorResourceType = "SERVICE" + ErrorResourceTypeTransitGateway ErrorResourceType = "TRANSIT_GATEWAY" + ErrorResourceTypeTransitGatewayAttachment ErrorResourceType = "TRANSIT_GATEWAY_ATTACHMENT" + ErrorResourceTypeApiGateway ErrorResourceType = "API_GATEWAY" + ErrorResourceTypeNlb ErrorResourceType = "NLB" + ErrorResourceTypeTargetGroup ErrorResourceType = "TARGET_GROUP" + ErrorResourceTypeLoadBalancerListener ErrorResourceType = "LOAD_BALANCER_LISTENER" + ErrorResourceTypeVpcLink ErrorResourceType = "VPC_LINK" + ErrorResourceTypeLambda ErrorResourceType = "LAMBDA" + ErrorResourceTypeVpc ErrorResourceType = "VPC" + ErrorResourceTypeSubnet ErrorResourceType = "SUBNET" + ErrorResourceTypeRouteTable ErrorResourceType = "ROUTE_TABLE" + ErrorResourceTypeSecurityGroup ErrorResourceType = "SECURITY_GROUP" + ErrorResourceTypeVpcEndpointServiceConfiguration ErrorResourceType = "VPC_ENDPOINT_SERVICE_CONFIGURATION" + ErrorResourceTypeResourceShare ErrorResourceType = "RESOURCE_SHARE" + ErrorResourceTypeIamRole ErrorResourceType = "IAM_ROLE" +) + +// Values returns all known values for ErrorResourceType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ErrorResourceType) Values() []ErrorResourceType { + return []ErrorResourceType{ + "ENVIRONMENT", + "APPLICATION", + "ROUTE", + "SERVICE", + "TRANSIT_GATEWAY", + "TRANSIT_GATEWAY_ATTACHMENT", + "API_GATEWAY", + "NLB", + "TARGET_GROUP", + "LOAD_BALANCER_LISTENER", + "VPC_LINK", + "LAMBDA", + "VPC", + "SUBNET", + "ROUTE_TABLE", + "SECURITY_GROUP", + "VPC_ENDPOINT_SERVICE_CONFIGURATION", + "RESOURCE_SHARE", + "IAM_ROLE", + } +} + +type HttpMethod string + +// Enum values for HttpMethod +const ( + HttpMethodDelete HttpMethod = "DELETE" + HttpMethodGet HttpMethod = "GET" + HttpMethodHead HttpMethod = "HEAD" + HttpMethodOptions HttpMethod = "OPTIONS" + HttpMethodPatch HttpMethod = "PATCH" + HttpMethodPost HttpMethod = "POST" + HttpMethodPut HttpMethod = "PUT" +) + +// Values returns all known values for HttpMethod. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (HttpMethod) Values() []HttpMethod { + return []HttpMethod{ + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT", + } +} + +type NetworkFabricType string + +// Enum values for NetworkFabricType +const ( + NetworkFabricTypeTransitGateway NetworkFabricType = "TRANSIT_GATEWAY" +) + +// Values returns all known values for NetworkFabricType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (NetworkFabricType) Values() []NetworkFabricType { + return []NetworkFabricType{ + "TRANSIT_GATEWAY", + } +} + +type ProxyType string + +// Enum values for ProxyType +const ( + ProxyTypeApiGateway ProxyType = "API_GATEWAY" +) + +// Values returns all known values for ProxyType. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (ProxyType) Values() []ProxyType { + return []ProxyType{ + "API_GATEWAY", + } +} + +type RouteActivationState string + +// Enum values for RouteActivationState +const ( + RouteActivationStateActive RouteActivationState = "ACTIVE" +) + +// Values returns all known values for RouteActivationState. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (RouteActivationState) Values() []RouteActivationState { + return []RouteActivationState{ + "ACTIVE", + } +} + +type RouteState string + +// Enum values for RouteState +const ( + RouteStateCreating RouteState = "CREATING" + RouteStateActive RouteState = "ACTIVE" + RouteStateDeleting RouteState = "DELETING" + RouteStateFailed RouteState = "FAILED" + RouteStateUpdating RouteState = "UPDATING" + RouteStateInactive RouteState = "INACTIVE" +) + +// Values returns all known values for RouteState. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (RouteState) Values() []RouteState { + return []RouteState{ + "CREATING", + "ACTIVE", + "DELETING", + "FAILED", + "UPDATING", + "INACTIVE", + } +} + +type RouteType string + +// Enum values for RouteType +const ( + RouteTypeDefault RouteType = "DEFAULT" + RouteTypeUriPath RouteType = "URI_PATH" +) + +// Values returns all known values for RouteType. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (RouteType) Values() []RouteType { + return []RouteType{ + "DEFAULT", + "URI_PATH", + } +} + +type ServiceEndpointType string + +// Enum values for ServiceEndpointType +const ( + ServiceEndpointTypeLambda ServiceEndpointType = "LAMBDA" + ServiceEndpointTypeUrl ServiceEndpointType = "URL" +) + +// Values returns all known values for ServiceEndpointType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ServiceEndpointType) Values() []ServiceEndpointType { + return []ServiceEndpointType{ + "LAMBDA", + "URL", + } +} + +type ServiceState string + +// Enum values for ServiceState +const ( + ServiceStateCreating ServiceState = "CREATING" + ServiceStateActive ServiceState = "ACTIVE" + ServiceStateDeleting ServiceState = "DELETING" + ServiceStateFailed ServiceState = "FAILED" +) + +// Values returns all known values for ServiceState. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (ServiceState) Values() []ServiceState { + return []ServiceState{ + "CREATING", + "ACTIVE", + "DELETING", + "FAILED", + } +} diff --git a/service/migrationhubrefactorspaces/types/errors.go b/service/migrationhubrefactorspaces/types/errors.go new file mode 100644 index 00000000000..398a22ebd52 --- /dev/null +++ b/service/migrationhubrefactorspaces/types/errors.go @@ -0,0 +1,175 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "fmt" + smithy "github.com/aws/smithy-go" +) + +// The user does not have sufficient access to perform this action. +type AccessDeniedException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *AccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AccessDeniedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AccessDeniedException) ErrorCode() string { return "AccessDeniedException" } +func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Updating or deleting a resource can cause an inconsistent state. +type ConflictException struct { + Message *string + + ResourceId *string + ResourceType *string + + noSmithyDocumentSerde +} + +func (e *ConflictException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ConflictException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ConflictException) ErrorCode() string { return "ConflictException" } +func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// An unexpected error occurred while processing the request. +type InternalServerException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *InternalServerException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InternalServerException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InternalServerException) ErrorCode() string { return "InternalServerException" } +func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// The resource policy is not valid. +type InvalidResourcePolicyException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *InvalidResourcePolicyException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidResourcePolicyException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidResourcePolicyException) ErrorCode() string { return "InvalidResourcePolicyException" } +func (e *InvalidResourcePolicyException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request references a resource that does not exist. +type ResourceNotFoundException struct { + Message *string + + ResourceId *string + ResourceType *string + + noSmithyDocumentSerde +} + +func (e *ResourceNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceNotFoundException) ErrorCode() string { return "ResourceNotFoundException" } +func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request would cause a service quota to be exceeded. +type ServiceQuotaExceededException struct { + Message *string + + ResourceId *string + ResourceType *string + QuotaCode *string + ServiceCode *string + + noSmithyDocumentSerde +} + +func (e *ServiceQuotaExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceQuotaExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceQuotaExceededException) ErrorCode() string { return "ServiceQuotaExceededException" } +func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Request was denied because the request was throttled. +type ThrottlingException struct { + Message *string + + QuotaCode *string + ServiceCode *string + RetryAfterSeconds int32 + + noSmithyDocumentSerde +} + +func (e *ThrottlingException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ThrottlingException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ThrottlingException) ErrorCode() string { return "ThrottlingException" } +func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The input does not satisfy the constraints specified by an Amazon Web Service. +type ValidationException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *ValidationException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ValidationException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ValidationException) ErrorCode() string { return "ValidationException" } +func (e *ValidationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/service/migrationhubrefactorspaces/types/types.go b/service/migrationhubrefactorspaces/types/types.go new file mode 100644 index 00000000000..b12df89b15d --- /dev/null +++ b/service/migrationhubrefactorspaces/types/types.go @@ -0,0 +1,455 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + smithydocument "github.com/aws/smithy-go/document" + "time" +) + +// A wrapper object holding the Amazon API Gateway proxy configuration. +type ApiGatewayProxyConfig struct { + + // The resource ID of the API Gateway for the proxy. + ApiGatewayId *string + + // The type of API Gateway endpoint created. + EndpointType ApiGatewayEndpointType + + // The Amazon Resource Name (ARN) of the Network Load Balancer configured by the + // API Gateway proxy. + NlbArn *string + + // The name of the Network Load Balancer that is configured by the API Gateway + // proxy. + NlbName *string + + // The endpoint URL of the API Gateway proxy. + ProxyUrl *string + + // The name of the API Gateway stage. The name defaults to prod. + StageName *string + + // The VpcLink ID of the API Gateway proxy. + VpcLinkId *string + + noSmithyDocumentSerde +} + +// A wrapper object holding the Amazon API Gateway endpoint input. +type ApiGatewayProxyInput struct { + + // The type of endpoint to use for the API Gateway proxy. If no value is specified + // in the request, the value is set to REGIONAL by default. If the value is set to + // PRIVATE in the request, this creates a private API endpoint that is isolated + // from the public internet. The private endpoint can only be accessed by using + // Amazon Virtual Private Cloud (Amazon VPC) endpoints for Amazon API Gateway that + // have been granted access. + EndpointType ApiGatewayEndpointType + + // The name of the API Gateway stage. The name defaults to prod. + StageName *string + + noSmithyDocumentSerde +} + +// A wrapper object holding the Amazon API Gateway proxy summary. +type ApiGatewayProxySummary struct { + + // The resource ID of the API Gateway for the proxy. + ApiGatewayId *string + + // The type of API Gateway endpoint created. + EndpointType ApiGatewayEndpointType + + // The Amazon Resource Name (ARN) of the Network Load Balancer configured by the + // API Gateway proxy. + NlbArn *string + + // The name of the Network Load Balancer that is configured by the API Gateway + // proxy. + NlbName *string + + // The endpoint URL of the API Gateway proxy. + ProxyUrl *string + + // The name of the API Gateway stage. The name defaults to prod. + StageName *string + + // The VpcLink ID of the API Gateway proxy. + VpcLinkId *string + + noSmithyDocumentSerde +} + +// The list of ApplicationSummary objects. +type ApplicationSummary struct { + + // The endpoint URL of the Amazon API Gateway proxy. + ApiGatewayProxy *ApiGatewayProxySummary + + // The unique identifier of the application. + ApplicationId *string + + // he Amazon Resource Name (ARN) of the application. + Arn *string + + // The Amazon Web Services account ID of the application creator. + CreatedByAccountId *string + + // A timestamp that indicates when the application is created. + CreatedTime *time.Time + + // The unique identifier of the environment. + EnvironmentId *string + + // Any error associated with the application resource. + Error *ErrorResponse + + // A timestamp that indicates when the application was last updated. + LastUpdatedTime *time.Time + + // The name of the application. + Name *string + + // The Amazon Web Services account ID of the application owner. + OwnerAccountId *string + + // The proxy type of the proxy created within the application. + ProxyType ProxyType + + // The current state of the application. + State ApplicationState + + // The tags assigned to the application. + Tags map[string]string + + // The ID of the virtual private cloud (VPC). + VpcId *string + + noSmithyDocumentSerde +} + +// The summary information for environments as a response to ListEnvironments. +type EnvironmentSummary struct { + + // The Amazon Resource Name (ARN) of the environment. + Arn *string + + // A timestamp that indicates when the environment is created. + CreatedTime *time.Time + + // A description of the environment. + Description *string + + // The unique identifier of the environment. + EnvironmentId *string + + // Any error associated with the environment resource. + Error *ErrorResponse + + // A timestamp that indicates when the environment was last updated. + LastUpdatedTime *time.Time + + // The name of the environment. + Name *string + + // The network fabric type of the environment. + NetworkFabricType NetworkFabricType + + // The Amazon Web Services account ID of the environment owner. + OwnerAccountId *string + + // The current state of the environment. + State EnvironmentState + + // The tags assigned to the environment. + Tags map[string]string + + // The ID of the transit gateway set up by the environment. + TransitGatewayId *string + + noSmithyDocumentSerde +} + +// Provides summary information for the EnvironmentVpc resource as a response to +// ListEnvironmentVpc. +type EnvironmentVpc struct { + + // The Amazon Web Services account ID of the virtual private cloud (VPC) owner. + AccountId *string + + // The list of Amazon Virtual Private Cloud (Amazon VPC) CIDR blocks. + CidrBlocks []string + + // A timestamp that indicates when the VPC is first added to the environment. + CreatedTime *time.Time + + // The unique identifier of the environment. + EnvironmentId *string + + // A timestamp that indicates when the VPC was last updated by the environment. + LastUpdatedTime *time.Time + + // The ID of the VPC. + VpcId *string + + // The name of the VPC at the time it is added to the environment. + VpcName *string + + noSmithyDocumentSerde +} + +// Error associated with a resource returned for a Get or List resource response. +type ErrorResponse struct { + + // The Amazon Web Services account ID of the resource owner. + AccountId *string + + // Additional details about the error. + AdditionalDetails map[string]string + + // The error code associated with the error. + Code ErrorCode + + // The message associated with the error. + Message *string + + // The ID of the resource. + ResourceIdentifier *string + + // The type of resource. + ResourceType ErrorResourceType + + noSmithyDocumentSerde +} + +// The configuration for the Lambda endpoint type. +type LambdaEndpointConfig struct { + + // The Amazon Resource Name (ARN) of the Lambda endpoint. + Arn *string + + noSmithyDocumentSerde +} + +// The input for the Lambda endpoint type. +type LambdaEndpointInput struct { + + // The Amazon Resource Name (ARN) of the Lambda endpoint. + // + // This member is required. + Arn *string + + noSmithyDocumentSerde +} + +// The summary for the Lambda endpoint type. +type LambdaEndpointSummary struct { + + // The Amazon Resource Name (ARN) of the Lambda endpoint. + Arn *string + + noSmithyDocumentSerde +} + +// The summary information for the routes as a response to ListRoutes. +type RouteSummary struct { + + // The unique identifier of the application. + ApplicationId *string + + // The Amazon Resource Name (ARN) of the route. + Arn *string + + // The Amazon Web Services account ID of the route creator. + CreatedByAccountId *string + + // A timestamp that indicates when the route is created. + CreatedTime *time.Time + + // The unique identifier of the environment. + EnvironmentId *string + + // Any error associated with the route resource. + Error *ErrorResponse + + // Indicates whether to match all subpaths of the given source path. If this value + // is false, requests must match the source path exactly before they are forwarded + // to this route's service. + IncludeChildPaths *bool + + // A timestamp that indicates when the route was last updated. + LastUpdatedTime *time.Time + + // A list of HTTP methods to match. An empty list matches all values. If a method + // is present, only HTTP requests using that method are forwarded to this route’s + // service. + Methods []HttpMethod + + // The Amazon Web Services account ID of the route owner. + OwnerAccountId *string + + // A mapping of Amazon API Gateway path resources to resource IDs. + PathResourceToId map[string]string + + // The unique identifier of the route. + RouteId *string + + // The route type of the route. + RouteType RouteType + + // The unique identifier of the service. + ServiceId *string + + // The path to use to match traffic. Paths must start with / and are relative to + // the base of the application. + SourcePath *string + + // The current state of the route. + State RouteState + + // The tags assigned to the route. + Tags map[string]string + + noSmithyDocumentSerde +} + +// A summary for the service as a response to ListServices. +type ServiceSummary struct { + + // The unique identifier of the application. + ApplicationId *string + + // The Amazon Resource Name (ARN) of the service. + Arn *string + + // The Amazon Web Services account ID of the service creator. + CreatedByAccountId *string + + // A timestamp that indicates when the service is created. + CreatedTime *time.Time + + // A description of the service. + Description *string + + // The endpoint type of the service. + EndpointType ServiceEndpointType + + // The unique identifier of the environment. + EnvironmentId *string + + // Any error associated with the service resource. + Error *ErrorResponse + + // A summary of the configuration for the Lambda endpoint type. + LambdaEndpoint *LambdaEndpointSummary + + // A timestamp that indicates when the service was last updated. + LastUpdatedTime *time.Time + + // The name of the service. + Name *string + + // The Amazon Web Services account ID of the service owner. + OwnerAccountId *string + + // The unique identifier of the service. + ServiceId *string + + // The current state of the service. + State ServiceState + + // The tags assigned to the service. + Tags map[string]string + + // The summary of the configuration for the URL endpoint type. + UrlEndpoint *UrlEndpointSummary + + // The ID of the virtual private cloud (VPC). + VpcId *string + + noSmithyDocumentSerde +} + +// The configuration for the URI path route type. +type UriPathRouteInput struct { + + // Indicates whether traffic is forwarded to this route’s service after the route + // is created. + // + // This member is required. + ActivationState RouteActivationState + + // The path to use to match traffic. Paths must start with / and are relative to + // the base of the application. + // + // This member is required. + SourcePath *string + + // Indicates whether to match all subpaths of the given source path. If this value + // is false, requests must match the source path exactly before they are forwarded + // to this route's service. + IncludeChildPaths *bool + + // A list of HTTP methods to match. An empty list matches all values. If a method + // is present, only HTTP requests using that method are forwarded to this route’s + // service. + Methods []HttpMethod + + noSmithyDocumentSerde +} + +// The configuration for the URL endpoint type. +type UrlEndpointConfig struct { + + // The health check URL of the URL endpoint type. + HealthUrl *string + + // The HTTP URL endpoint. + Url *string + + noSmithyDocumentSerde +} + +// The configuration for the URL endpoint type. +type UrlEndpointInput struct { + + // The URL to route traffic to. The URL must be an rfc3986-formatted URL + // (https://datatracker.ietf.org/doc/html/rfc3986). If the host is a domain name, + // the name must be resolvable over the public internet. If the scheme is https, + // the top level domain of the host must be listed in the IANA root zone database + // (https://www.iana.org/domains/root/db). + // + // This member is required. + Url *string + + // The health check URL of the URL endpoint type. If the URL is a public endpoint, + // the HealthUrl must also be a public endpoint. If the URL is a private endpoint + // inside a virtual private cloud (VPC), the health URL must also be a private + // endpoint, and the host must be the same as the URL. + HealthUrl *string + + noSmithyDocumentSerde +} + +// The summary of the configuration for the URL endpoint type. +type UrlEndpointSummary struct { + + // The health check URL of the URL endpoint type. If the URL is a public endpoint, + // the HealthUrl must also be a public endpoint. If the URL is a private endpoint + // inside a virtual private cloud (VPC), the health URL must also be a private + // endpoint, and the host must be the same as the URL. + HealthUrl *string + + // The URL to route traffic to. The URL must be an rfc3986-formatted URL + // (https://datatracker.ietf.org/doc/html/rfc3986). If the host is a domain name, + // the name must be resolvable over the public internet. If the scheme is https, + // the top level domain of the host must be listed in the IANA root zone database + // (https://www.iana.org/domains/root/db). + Url *string + + noSmithyDocumentSerde +} + +type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/migrationhubrefactorspaces/validators.go b/service/migrationhubrefactorspaces/validators.go new file mode 100644 index 00000000000..1bd036b1372 --- /dev/null +++ b/service/migrationhubrefactorspaces/validators.go @@ -0,0 +1,1007 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubrefactorspaces + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpCreateApplication struct { +} + +func (*validateOpCreateApplication) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateApplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateApplicationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateApplicationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateEnvironment struct { +} + +func (*validateOpCreateEnvironment) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateEnvironment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateEnvironmentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateEnvironmentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateRoute struct { +} + +func (*validateOpCreateRoute) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateRoute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateRouteInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateRouteInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateService struct { +} + +func (*validateOpCreateService) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateService) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateServiceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateServiceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteApplication struct { +} + +func (*validateOpDeleteApplication) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteApplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteApplicationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteApplicationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteEnvironment struct { +} + +func (*validateOpDeleteEnvironment) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteEnvironment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteEnvironmentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteEnvironmentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteResourcePolicy struct { +} + +func (*validateOpDeleteResourcePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteResourcePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteResourcePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteRoute struct { +} + +func (*validateOpDeleteRoute) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteRoute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteRouteInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteRouteInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteService struct { +} + +func (*validateOpDeleteService) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteService) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteServiceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteServiceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetApplication struct { +} + +func (*validateOpGetApplication) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetApplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetApplicationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetApplicationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetEnvironment struct { +} + +func (*validateOpGetEnvironment) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetEnvironment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetEnvironmentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetEnvironmentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetResourcePolicy struct { +} + +func (*validateOpGetResourcePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetResourcePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetResourcePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetRoute struct { +} + +func (*validateOpGetRoute) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetRoute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetRouteInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetRouteInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetService struct { +} + +func (*validateOpGetService) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetService) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetServiceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetServiceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListApplications struct { +} + +func (*validateOpListApplications) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListApplications) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListApplicationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListApplicationsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListEnvironmentVpcs struct { +} + +func (*validateOpListEnvironmentVpcs) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListEnvironmentVpcs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListEnvironmentVpcsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListEnvironmentVpcsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListRoutes struct { +} + +func (*validateOpListRoutes) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListRoutes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListRoutesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListRoutesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListServices struct { +} + +func (*validateOpListServices) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListServices) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListServicesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListServicesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListTagsForResource struct { +} + +func (*validateOpListTagsForResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListTagsForResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListTagsForResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutResourcePolicy struct { +} + +func (*validateOpPutResourcePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutResourcePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutResourcePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpTagResource struct { +} + +func (*validateOpTagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUntagResource struct { +} + +func (*validateOpUntagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UntagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUntagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpCreateApplicationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateApplication{}, middleware.After) +} + +func addOpCreateEnvironmentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateEnvironment{}, middleware.After) +} + +func addOpCreateRouteValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateRoute{}, middleware.After) +} + +func addOpCreateServiceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateService{}, middleware.After) +} + +func addOpDeleteApplicationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteApplication{}, middleware.After) +} + +func addOpDeleteEnvironmentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteEnvironment{}, middleware.After) +} + +func addOpDeleteResourcePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteResourcePolicy{}, middleware.After) +} + +func addOpDeleteRouteValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteRoute{}, middleware.After) +} + +func addOpDeleteServiceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteService{}, middleware.After) +} + +func addOpGetApplicationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetApplication{}, middleware.After) +} + +func addOpGetEnvironmentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetEnvironment{}, middleware.After) +} + +func addOpGetResourcePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetResourcePolicy{}, middleware.After) +} + +func addOpGetRouteValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetRoute{}, middleware.After) +} + +func addOpGetServiceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetService{}, middleware.After) +} + +func addOpListApplicationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListApplications{}, middleware.After) +} + +func addOpListEnvironmentVpcsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListEnvironmentVpcs{}, middleware.After) +} + +func addOpListRoutesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListRoutes{}, middleware.After) +} + +func addOpListServicesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListServices{}, middleware.After) +} + +func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) +} + +func addOpPutResourcePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutResourcePolicy{}, middleware.After) +} + +func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) +} + +func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) +} + +func validateLambdaEndpointInput(v *types.LambdaEndpointInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LambdaEndpointInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateUriPathRouteInput(v *types.UriPathRouteInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UriPathRouteInput"} + if v.SourcePath == nil { + invalidParams.Add(smithy.NewErrParamRequired("SourcePath")) + } + if len(v.ActivationState) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ActivationState")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateUrlEndpointInput(v *types.UrlEndpointInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UrlEndpointInput"} + if v.Url == nil { + invalidParams.Add(smithy.NewErrParamRequired("Url")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateApplicationInput(v *CreateApplicationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateApplicationInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.EnvironmentIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentIdentifier")) + } + if v.VpcId == nil { + invalidParams.Add(smithy.NewErrParamRequired("VpcId")) + } + if len(v.ProxyType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ProxyType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateEnvironmentInput(v *CreateEnvironmentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateEnvironmentInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if len(v.NetworkFabricType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("NetworkFabricType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateRouteInput(v *CreateRouteInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateRouteInput"} + if v.EnvironmentIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentIdentifier")) + } + if v.ApplicationIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApplicationIdentifier")) + } + if v.ServiceIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServiceIdentifier")) + } + if len(v.RouteType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("RouteType")) + } + if v.UriPathRoute != nil { + if err := validateUriPathRouteInput(v.UriPathRoute); err != nil { + invalidParams.AddNested("UriPathRoute", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateServiceInput(v *CreateServiceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateServiceInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.EnvironmentIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentIdentifier")) + } + if v.ApplicationIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApplicationIdentifier")) + } + if len(v.EndpointType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("EndpointType")) + } + if v.UrlEndpoint != nil { + if err := validateUrlEndpointInput(v.UrlEndpoint); err != nil { + invalidParams.AddNested("UrlEndpoint", err.(smithy.InvalidParamsError)) + } + } + if v.LambdaEndpoint != nil { + if err := validateLambdaEndpointInput(v.LambdaEndpoint); err != nil { + invalidParams.AddNested("LambdaEndpoint", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteApplicationInput(v *DeleteApplicationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteApplicationInput"} + if v.EnvironmentIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentIdentifier")) + } + if v.ApplicationIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApplicationIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteEnvironmentInput(v *DeleteEnvironmentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteEnvironmentInput"} + if v.EnvironmentIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteResourcePolicyInput(v *DeleteResourcePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteResourcePolicyInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteRouteInput(v *DeleteRouteInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteRouteInput"} + if v.EnvironmentIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentIdentifier")) + } + if v.ApplicationIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApplicationIdentifier")) + } + if v.RouteIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("RouteIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteServiceInput(v *DeleteServiceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteServiceInput"} + if v.EnvironmentIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentIdentifier")) + } + if v.ApplicationIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApplicationIdentifier")) + } + if v.ServiceIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServiceIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetApplicationInput(v *GetApplicationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetApplicationInput"} + if v.EnvironmentIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentIdentifier")) + } + if v.ApplicationIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApplicationIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetEnvironmentInput(v *GetEnvironmentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetEnvironmentInput"} + if v.EnvironmentIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetResourcePolicyInput(v *GetResourcePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetResourcePolicyInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetRouteInput(v *GetRouteInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetRouteInput"} + if v.EnvironmentIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentIdentifier")) + } + if v.ApplicationIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApplicationIdentifier")) + } + if v.RouteIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("RouteIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetServiceInput(v *GetServiceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetServiceInput"} + if v.EnvironmentIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentIdentifier")) + } + if v.ApplicationIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApplicationIdentifier")) + } + if v.ServiceIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServiceIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListApplicationsInput(v *ListApplicationsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListApplicationsInput"} + if v.EnvironmentIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListEnvironmentVpcsInput(v *ListEnvironmentVpcsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListEnvironmentVpcsInput"} + if v.EnvironmentIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListRoutesInput(v *ListRoutesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListRoutesInput"} + if v.EnvironmentIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentIdentifier")) + } + if v.ApplicationIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApplicationIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListServicesInput(v *ListServicesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListServicesInput"} + if v.EnvironmentIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentIdentifier")) + } + if v.ApplicationIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApplicationIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutResourcePolicyInput(v *PutResourcePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutResourcePolicyInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.Policy == nil { + invalidParams.Add(smithy.NewErrParamRequired("Policy")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpTagResourceInput(v *TagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.Tags == nil { + invalidParams.Add(smithy.NewErrParamRequired("Tags")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUntagResourceInput(v *UntagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.TagKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/opensearch/api_op_UpdateDomainConfig.go b/service/opensearch/api_op_UpdateDomainConfig.go index 290521c619d..2e5a6e16458 100644 --- a/service/opensearch/api_op_UpdateDomainConfig.go +++ b/service/opensearch/api_op_UpdateDomainConfig.go @@ -65,6 +65,11 @@ type UpdateDomainConfigInput struct { // Options to specify configuration that will be applied to the domain endpoint. DomainEndpointOptions *types.DomainEndpointOptions + // This flag, when set to True, specifies whether the UpdateDomain request should + // return the results of validation checks (DryRunResults) without actually + // applying the change. + DryRun *bool + // Specify the type and size of the EBS volume to use. EBSOptions *types.EBSOptions @@ -100,6 +105,9 @@ type UpdateDomainConfigOutput struct { // This member is required. DomainConfig *types.DomainConfig + // Contains result of DryRun. + DryRunResults *types.DryRunResults + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/opensearch/deserializers.go b/service/opensearch/deserializers.go index 0e62217a511..3b459642ec4 100644 --- a/service/opensearch/deserializers.go +++ b/service/opensearch/deserializers.go @@ -5878,6 +5878,11 @@ func awsRestjson1_deserializeOpDocumentUpdateDomainConfigOutput(v **UpdateDomain return err } + case "DryRunResults": + if err := awsRestjson1_deserializeDocumentDryRunResults(&sv.DryRunResults, value); err != nil { + return err + } + default: _, _ = key, value @@ -8727,6 +8732,55 @@ func awsRestjson1_deserializeDocumentDomainStatusList(v *[]types.DomainStatus, v return nil } +func awsRestjson1_deserializeDocumentDryRunResults(v **types.DryRunResults, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DryRunResults + if *v == nil { + sv = &types.DryRunResults{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DeploymentType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeploymentType to be of type string, got %T instead", value) + } + sv.DeploymentType = ptr.String(jtv) + } + + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentDuration(v **types.Duration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/opensearch/serializers.go b/service/opensearch/serializers.go index a3a500ce812..bfb9fc285e7 100644 --- a/service/opensearch/serializers.go +++ b/service/opensearch/serializers.go @@ -2630,6 +2630,11 @@ func awsRestjson1_serializeOpDocumentUpdateDomainConfigInput(v *UpdateDomainConf } } + if v.DryRun != nil { + ok := object.Key("DryRun") + ok.Boolean(*v.DryRun) + } + if v.EBSOptions != nil { ok := object.Key("EBSOptions") if err := awsRestjson1_serializeDocumentEBSOptions(v.EBSOptions, ok); err != nil { diff --git a/service/opensearch/types/types.go b/service/opensearch/types/types.go index 891e29f42ba..d9f3c6b3155 100644 --- a/service/opensearch/types/types.go +++ b/service/opensearch/types/types.go @@ -688,6 +688,21 @@ type DomainStatus struct { noSmithyDocumentSerde } +type DryRunResults struct { + + // Specifies the way in which Amazon OpenSearch Service applies the update. + // Possible responses are Blue/Green (the update requires a blue/green deployment), + // DynamicUpdate (no blue/green required), Undetermined (the domain is undergoing + // an update and can't predict the deployment type; try again after the update is + // complete), and None (the request doesn't include any configuration changes). + DeploymentType *string + + // Contains an optional message associated with the DryRunResults. + Message *string + + noSmithyDocumentSerde +} + // The maintenance schedule duration: duration value and duration unit. See // Auto-Tune for Amazon OpenSearch Service // (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html) diff --git a/service/outposts/api_op_CancelOrder.go b/service/outposts/api_op_CancelOrder.go new file mode 100644 index 00000000000..2de8c3d2939 --- /dev/null +++ b/service/outposts/api_op_CancelOrder.go @@ -0,0 +1,116 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package outposts + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Cancels an order for an Outpost. +func (c *Client) CancelOrder(ctx context.Context, params *CancelOrderInput, optFns ...func(*Options)) (*CancelOrderOutput, error) { + if params == nil { + params = &CancelOrderInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CancelOrder", params, optFns, c.addOperationCancelOrderMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CancelOrderOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CancelOrderInput struct { + + // The ID of the order to cancel. + // + // This member is required. + OrderId *string + + noSmithyDocumentSerde +} + +type CancelOrderOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCancelOrderMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCancelOrder{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCancelOrder{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCancelOrderValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelOrder(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCancelOrder(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "outposts", + OperationName: "CancelOrder", + } +} diff --git a/service/outposts/api_op_CreateSite.go b/service/outposts/api_op_CreateSite.go new file mode 100644 index 00000000000..52587e44220 --- /dev/null +++ b/service/outposts/api_op_CreateSite.go @@ -0,0 +1,147 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package outposts + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/outposts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a site for an Outpost. +func (c *Client) CreateSite(ctx context.Context, params *CreateSiteInput, optFns ...func(*Options)) (*CreateSiteOutput, error) { + if params == nil { + params = &CreateSiteInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateSite", params, optFns, c.addOperationCreateSiteMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateSiteOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateSiteInput struct { + + // The name of the site. + // + // This member is required. + Name *string + + // The description of the site. + Description *string + + // Additional information that you provide about site access requirements, + // electrician scheduling, personal protective equipment, or regulation of + // equipment materials that could affect your installation process. + Notes *string + + // The location to install and power on the hardware. This address might be + // different from the shipping address. + OperatingAddress *types.Address + + // Information about the physical and logistical details for the rack at this site. + // For more information about hardware requirements for racks, see Network + // readiness checklist + // (https://docs.aws.amazon.com/outposts/latest/userguide/outposts-requirements.html#checklist) + // in the Amazon Web Services Outposts User Guide. + RackPhysicalProperties *types.RackPhysicalProperties + + // The location to ship the hardware. This address might be different from the + // operating address. + ShippingAddress *types.Address + + // The tags to apply to a site. + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateSiteOutput struct { + + // Information about a site. + Site *types.Site + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateSiteMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateSite{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateSite{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateSiteValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSite(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateSite(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "outposts", + OperationName: "CreateSite", + } +} diff --git a/service/outposts/api_op_GetCatalogItem.go b/service/outposts/api_op_GetCatalogItem.go new file mode 100644 index 00000000000..97d5d760137 --- /dev/null +++ b/service/outposts/api_op_GetCatalogItem.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package outposts + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/outposts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets information about a catalog item. +func (c *Client) GetCatalogItem(ctx context.Context, params *GetCatalogItemInput, optFns ...func(*Options)) (*GetCatalogItemOutput, error) { + if params == nil { + params = &GetCatalogItemInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetCatalogItem", params, optFns, c.addOperationGetCatalogItemMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetCatalogItemOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetCatalogItemInput struct { + + // The ID of the catalog item. + // + // This member is required. + CatalogItemId *string + + noSmithyDocumentSerde +} + +type GetCatalogItemOutput struct { + + // Information about this catalog item. + CatalogItem *types.CatalogItem + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetCatalogItemMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetCatalogItem{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetCatalogItem{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetCatalogItemValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCatalogItem(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetCatalogItem(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "outposts", + OperationName: "GetCatalogItem", + } +} diff --git a/service/outposts/api_op_GetOrder.go b/service/outposts/api_op_GetOrder.go new file mode 100644 index 00000000000..41732f7c4e7 --- /dev/null +++ b/service/outposts/api_op_GetOrder.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package outposts + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/outposts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets an order. +func (c *Client) GetOrder(ctx context.Context, params *GetOrderInput, optFns ...func(*Options)) (*GetOrderOutput, error) { + if params == nil { + params = &GetOrderInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetOrder", params, optFns, c.addOperationGetOrderMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetOrderOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetOrderInput struct { + + // The ID of the order. + // + // This member is required. + OrderId *string + + noSmithyDocumentSerde +} + +type GetOrderOutput struct { + + // Information about an order. + Order *types.Order + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetOrderMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetOrder{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetOrder{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetOrderValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetOrder(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetOrder(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "outposts", + OperationName: "GetOrder", + } +} diff --git a/service/outposts/api_op_GetSite.go b/service/outposts/api_op_GetSite.go new file mode 100644 index 00000000000..3f7cbd5f785 --- /dev/null +++ b/service/outposts/api_op_GetSite.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package outposts + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/outposts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets information about the specified Outpost site. +func (c *Client) GetSite(ctx context.Context, params *GetSiteInput, optFns ...func(*Options)) (*GetSiteOutput, error) { + if params == nil { + params = &GetSiteInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetSite", params, optFns, c.addOperationGetSiteMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetSiteOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetSiteInput struct { + + // The ID of the site. + // + // This member is required. + SiteId *string + + noSmithyDocumentSerde +} + +type GetSiteOutput struct { + + // Information about a site. + Site *types.Site + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetSiteMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetSite{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetSite{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetSiteValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSite(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetSite(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "outposts", + OperationName: "GetSite", + } +} diff --git a/service/outposts/api_op_GetSiteAddress.go b/service/outposts/api_op_GetSiteAddress.go new file mode 100644 index 00000000000..3e0c9850f7f --- /dev/null +++ b/service/outposts/api_op_GetSiteAddress.go @@ -0,0 +1,132 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package outposts + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/outposts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets the site address. +func (c *Client) GetSiteAddress(ctx context.Context, params *GetSiteAddressInput, optFns ...func(*Options)) (*GetSiteAddressOutput, error) { + if params == nil { + params = &GetSiteAddressInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetSiteAddress", params, optFns, c.addOperationGetSiteAddressMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetSiteAddressOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetSiteAddressInput struct { + + // The type of the address you request. + // + // This member is required. + AddressType types.AddressType + + // The ID of the site. + // + // This member is required. + SiteId *string + + noSmithyDocumentSerde +} + +type GetSiteAddressOutput struct { + + // Information about the address. + Address *types.Address + + // The type of the address you receive. + AddressType types.AddressType + + // The ID of the site. + SiteId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetSiteAddressMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetSiteAddress{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetSiteAddress{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetSiteAddressValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSiteAddress(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetSiteAddress(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "outposts", + OperationName: "GetSiteAddress", + } +} diff --git a/service/outposts/api_op_ListCatalogItems.go b/service/outposts/api_op_ListCatalogItems.go new file mode 100644 index 00000000000..ea75a584e0a --- /dev/null +++ b/service/outposts/api_op_ListCatalogItems.go @@ -0,0 +1,231 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package outposts + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/outposts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Use to create a list of every item in the catalog. Add filters to your request +// to return a more specific list of results. Use filters to match an item class, +// storage option, or EC2 family. If you specify multiple filters, the filters are +// joined with an AND, and the request returns only results that match all of the +// specified filters. +func (c *Client) ListCatalogItems(ctx context.Context, params *ListCatalogItemsInput, optFns ...func(*Options)) (*ListCatalogItemsOutput, error) { + if params == nil { + params = &ListCatalogItemsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListCatalogItems", params, optFns, c.addOperationListCatalogItemsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListCatalogItemsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListCatalogItemsInput struct { + + // A filter for EC2 family options for items in the catalog. Filter values are case + // sensitive. If you specify multiple values for a filter, the values are joined + // with an OR, and the request returns all results that match any of the specified + // values. + EC2FamilyFilter []string + + // A filter for the class of items in the catalog. Filter values are case + // sensitive. If you specify multiple values for a filter, the values are joined + // with an OR, and the request returns all results that match any of the specified + // values. + ItemClassFilter []types.CatalogItemClass + + // The maximum page size. + MaxResults *int32 + + // The pagination token. + NextToken *string + + // A filter for the storage options of items in the catalog. Filter values are case + // sensitive. If you specify multiple values for a filter, the values are joined + // with an OR, and the request returns all results that match any of the specified + // values. + SupportedStorageFilter []types.SupportedStorageEnum + + noSmithyDocumentSerde +} + +type ListCatalogItemsOutput struct { + + // Information about the catalog items. + CatalogItems []types.CatalogItem + + // The pagination token. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListCatalogItemsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListCatalogItems{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListCatalogItems{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCatalogItems(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListCatalogItemsAPIClient is a client that implements the ListCatalogItems +// operation. +type ListCatalogItemsAPIClient interface { + ListCatalogItems(context.Context, *ListCatalogItemsInput, ...func(*Options)) (*ListCatalogItemsOutput, error) +} + +var _ ListCatalogItemsAPIClient = (*Client)(nil) + +// ListCatalogItemsPaginatorOptions is the paginator options for ListCatalogItems +type ListCatalogItemsPaginatorOptions struct { + // The maximum page size. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListCatalogItemsPaginator is a paginator for ListCatalogItems +type ListCatalogItemsPaginator struct { + options ListCatalogItemsPaginatorOptions + client ListCatalogItemsAPIClient + params *ListCatalogItemsInput + nextToken *string + firstPage bool +} + +// NewListCatalogItemsPaginator returns a new ListCatalogItemsPaginator +func NewListCatalogItemsPaginator(client ListCatalogItemsAPIClient, params *ListCatalogItemsInput, optFns ...func(*ListCatalogItemsPaginatorOptions)) *ListCatalogItemsPaginator { + if params == nil { + params = &ListCatalogItemsInput{} + } + + options := ListCatalogItemsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListCatalogItemsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListCatalogItemsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListCatalogItems page. +func (p *ListCatalogItemsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCatalogItemsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListCatalogItems(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListCatalogItems(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "outposts", + OperationName: "ListCatalogItems", + } +} diff --git a/service/outposts/api_op_ListOrders.go b/service/outposts/api_op_ListOrders.go new file mode 100644 index 00000000000..cc05829e29b --- /dev/null +++ b/service/outposts/api_op_ListOrders.go @@ -0,0 +1,212 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package outposts + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/outposts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Create a list of the Outpost orders for your Amazon Web Services account. You +// can filter your request by Outpost to return a more specific list of results. +func (c *Client) ListOrders(ctx context.Context, params *ListOrdersInput, optFns ...func(*Options)) (*ListOrdersOutput, error) { + if params == nil { + params = &ListOrdersInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListOrders", params, optFns, c.addOperationListOrdersMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListOrdersOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListOrdersInput struct { + + // The maximum page size. + MaxResults *int32 + + // The pagination token. + NextToken *string + + // The ID or the Amazon Resource Name (ARN) of the Outpost. + OutpostIdentifierFilter *string + + noSmithyDocumentSerde +} + +type ListOrdersOutput struct { + + // The pagination token. + NextToken *string + + // Information about the orders. + Orders []types.OrderSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListOrdersMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListOrders{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListOrders{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOrders(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListOrdersAPIClient is a client that implements the ListOrders operation. +type ListOrdersAPIClient interface { + ListOrders(context.Context, *ListOrdersInput, ...func(*Options)) (*ListOrdersOutput, error) +} + +var _ ListOrdersAPIClient = (*Client)(nil) + +// ListOrdersPaginatorOptions is the paginator options for ListOrders +type ListOrdersPaginatorOptions struct { + // The maximum page size. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListOrdersPaginator is a paginator for ListOrders +type ListOrdersPaginator struct { + options ListOrdersPaginatorOptions + client ListOrdersAPIClient + params *ListOrdersInput + nextToken *string + firstPage bool +} + +// NewListOrdersPaginator returns a new ListOrdersPaginator +func NewListOrdersPaginator(client ListOrdersAPIClient, params *ListOrdersInput, optFns ...func(*ListOrdersPaginatorOptions)) *ListOrdersPaginator { + if params == nil { + params = &ListOrdersInput{} + } + + options := ListOrdersPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListOrdersPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListOrdersPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListOrders page. +func (p *ListOrdersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListOrdersOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListOrders(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListOrders(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "outposts", + OperationName: "ListOrders", + } +} diff --git a/service/outposts/api_op_ListOutposts.go b/service/outposts/api_op_ListOutposts.go index 6a931a909d6..4eda8027275 100644 --- a/service/outposts/api_op_ListOutposts.go +++ b/service/outposts/api_op_ListOutposts.go @@ -12,11 +12,11 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Create a list of the Outposts for your AWS account. Add filters to your request -// to return a more specific list of results. Use filters to match an Outpost -// lifecycle status, Availibility Zone (us-east-1a), and AZ ID (use1-az1). If you -// specify multiple filters, the filters are joined with an AND, and the request -// returns only results that match all of the specified filters. +// Create a list of the Outposts for your Amazon Web Services account. Add filters +// to your request to return a more specific list of results. Use filters to match +// an Outpost lifecycle status, Availability Zone (us-east-1a), and AZ ID +// (use1-az1). If you specify multiple filters, the filters are joined with an AND, +// and the request returns only results that match all of the specified filters. func (c *Client) ListOutposts(ctx context.Context, params *ListOutpostsInput, optFns ...func(*Options)) (*ListOutpostsOutput, error) { if params == nil { params = &ListOutpostsInput{} @@ -34,7 +34,7 @@ func (c *Client) ListOutposts(ctx context.Context, params *ListOutpostsInput, op type ListOutpostsInput struct { - // A filter for the Availibility Zone (us-east-1a) of the Outpost. Filter values + // A filter for the Availability Zone (us-east-1a) of the Outpost. Filter values // are case sensitive. If you specify multiple values for a filter, the values are // joined with an OR, and the request returns all results that match any of the // specified values. diff --git a/service/outposts/api_op_ListSites.go b/service/outposts/api_op_ListSites.go index a233ac52376..b37fa3b49fb 100644 --- a/service/outposts/api_op_ListSites.go +++ b/service/outposts/api_op_ListSites.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists the sites for the specified AWS account. +// Lists the sites for your Amazon Web Services account. func (c *Client) ListSites(ctx context.Context, params *ListSitesInput, optFns ...func(*Options)) (*ListSitesOutput, error) { if params == nil { params = &ListSitesInput{} diff --git a/service/outposts/api_op_UpdateSite.go b/service/outposts/api_op_UpdateSite.go new file mode 100644 index 00000000000..ab37bfb6cfa --- /dev/null +++ b/service/outposts/api_op_UpdateSite.go @@ -0,0 +1,130 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package outposts + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/outposts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the site. +func (c *Client) UpdateSite(ctx context.Context, params *UpdateSiteInput, optFns ...func(*Options)) (*UpdateSiteOutput, error) { + if params == nil { + params = &UpdateSiteInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateSite", params, optFns, c.addOperationUpdateSiteMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateSiteOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateSiteInput struct { + + // The ID of the site. + // + // This member is required. + SiteId *string + + // The description of the site. + Description *string + + // The name of the site. + Name *string + + // Notes about a site. + Notes *string + + noSmithyDocumentSerde +} + +type UpdateSiteOutput struct { + + // Information about a site. + Site *types.Site + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateSiteMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateSite{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateSite{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateSiteValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSite(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateSite(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "outposts", + OperationName: "UpdateSite", + } +} diff --git a/service/outposts/api_op_UpdateSiteAddress.go b/service/outposts/api_op_UpdateSiteAddress.go new file mode 100644 index 00000000000..dc2f45ac7b7 --- /dev/null +++ b/service/outposts/api_op_UpdateSiteAddress.go @@ -0,0 +1,137 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package outposts + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/outposts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the site address. To update a site address with an order IN_PROGRESS, +// you must wait for the order to complete or cancel the order. You can update the +// operating address before you place an order at the site, or after all Outposts +// that belong to the site have been deactivated. +func (c *Client) UpdateSiteAddress(ctx context.Context, params *UpdateSiteAddressInput, optFns ...func(*Options)) (*UpdateSiteAddressOutput, error) { + if params == nil { + params = &UpdateSiteAddressInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateSiteAddress", params, optFns, c.addOperationUpdateSiteAddressMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateSiteAddressOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateSiteAddressInput struct { + + // The address for the site. + // + // This member is required. + Address *types.Address + + // The type of the address. + // + // This member is required. + AddressType types.AddressType + + // The ID of the site. + // + // This member is required. + SiteId *string + + noSmithyDocumentSerde +} + +type UpdateSiteAddressOutput struct { + + // Information about an address. + Address *types.Address + + // The type of the address. + AddressType types.AddressType + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateSiteAddressMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateSiteAddress{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateSiteAddress{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateSiteAddressValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSiteAddress(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateSiteAddress(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "outposts", + OperationName: "UpdateSiteAddress", + } +} diff --git a/service/outposts/api_op_UpdateSiteRackPhysicalProperties.go b/service/outposts/api_op_UpdateSiteRackPhysicalProperties.go new file mode 100644 index 00000000000..7a018fa26c1 --- /dev/null +++ b/service/outposts/api_op_UpdateSiteRackPhysicalProperties.go @@ -0,0 +1,230 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package outposts + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/outposts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Update the physical and logistical details for a rack at a site. For more +// information about hardware requirements for racks, see Network readiness +// checklist +// (https://docs.aws.amazon.com/outposts/latest/userguide/outposts-requirements.html#checklist) +// in the Amazon Web Services Outposts User Guide. To update a rack at a site with +// an order of IN_PROGRESS, you must wait for the order to complete or cancel the +// order. +func (c *Client) UpdateSiteRackPhysicalProperties(ctx context.Context, params *UpdateSiteRackPhysicalPropertiesInput, optFns ...func(*Options)) (*UpdateSiteRackPhysicalPropertiesOutput, error) { + if params == nil { + params = &UpdateSiteRackPhysicalPropertiesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateSiteRackPhysicalProperties", params, optFns, c.addOperationUpdateSiteRackPhysicalPropertiesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateSiteRackPhysicalPropertiesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateSiteRackPhysicalPropertiesInput struct { + + // The ID of the site. + // + // This member is required. + SiteId *string + + // Specify the type of fiber that you will use to attach the Outpost to your + // network. + FiberOpticCableType types.FiberOpticCableType + + // Specify the maximum rack weight that this site can support. NO_LIMIT is over + // 2000lbs. + MaximumSupportedWeightLbs types.MaximumSupportedWeightLbs + + // Specify the type of optical standard that you will use to attach the Outpost to + // your network. This field is dependent on uplink speed, fiber type, and distance + // to the upstream device. For more information about networking requirements for + // racks, see Network + // (https://docs.aws.amazon.com/outposts/latest/userguide/outposts-requirements.html#facility-networking) + // in the Amazon Web Services Outposts User Guide. + // + // * OPTIC_10GBASE_SR: + // 10GBASE-SR + // + // * OPTIC_10GBASE_IR: 10GBASE-IR + // + // * OPTIC_10GBASE_LR: 10GBASE-LR + // + // * + // OPTIC_40GBASE_SR: 40GBASE-SR + // + // * OPTIC_40GBASE_ESR: 40GBASE-ESR + // + // * + // OPTIC_40GBASE_IR4_LR4L: 40GBASE-IR (LR4L) + // + // * OPTIC_40GBASE_LR4: 40GBASE-LR4 + // + // * + // OPTIC_100GBASE_SR4: 100GBASE-SR4 + // + // * OPTIC_100GBASE_CWDM4: 100GBASE-CWDM4 + // + // * + // OPTIC_100GBASE_LR4: 100GBASE-LR4 + // + // * OPTIC_100G_PSM4_MSA: 100G PSM4 MSA + // + // * + // OPTIC_1000BASE_LX: 1000Base-LX + // + // * OPTIC_1000BASE_SX : 1000Base-SX + OpticalStandard types.OpticalStandard + + // Specify the power connector that Amazon Web Services should plan to provide for + // connections to the hardware. Note the correlation between PowerPhase and + // PowerConnector. + // + // * Single-phase AC feed + // + // * L6-30P – (common in US); 30A; single + // phase + // + // * IEC309 (blue) – P+N+E, 6hr; 32 A; single phase + // + // * Three-phase AC + // feed + // + // * AH530P7W (red) – 3P+N+E, 7hr; 30A; three phase + // + // * AH532P6W (red) – + // 3P+N+E, 6hr; 32A; three phase + PowerConnector types.PowerConnector + + // Specify in kVA the power draw available at the hardware placement position for + // the rack. + PowerDrawKva types.PowerDrawKva + + // Specify whether the power feed comes above or below the rack. + PowerFeedDrop types.PowerFeedDrop + + // Specify the power option that you can provide for hardware. + // + // * Single-phase AC + // feed: 200 V to 277 V, 50 Hz or 60 Hz + // + // * Three-phase AC feed: 346 V to 480 V, 50 + // Hz or 60 Hz + PowerPhase types.PowerPhase + + // Racks come with two Outpost network devices. Depending on the supported uplink + // speed at the site, the Outpost network devices provide a variable number of + // uplinks. Specify the number of uplinks for each Outpost network device that you + // intend to use to connect the rack to your network. Note the correlation between + // UplinkGbps and UplinkCount. + // + // * 1Gbps - Uplinks available: 1, 2, 4, 6, 8 + // + // * + // 10Gbps - Uplinks available: 1, 2, 4, 8, 12, 16 + // + // * 40 and 100 Gbps- Uplinks + // available: 1, 2, 4 + UplinkCount types.UplinkCount + + // Specify the uplink speed the rack should support for the connection to the + // Region. + UplinkGbps types.UplinkGbps + + noSmithyDocumentSerde +} + +type UpdateSiteRackPhysicalPropertiesOutput struct { + + // Information about a site. + Site *types.Site + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateSiteRackPhysicalPropertiesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateSiteRackPhysicalProperties{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateSiteRackPhysicalProperties{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateSiteRackPhysicalPropertiesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSiteRackPhysicalProperties(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateSiteRackPhysicalProperties(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "outposts", + OperationName: "UpdateSiteRackPhysicalProperties", + } +} diff --git a/service/outposts/deserializers.go b/service/outposts/deserializers.go index a37ef5e73e8..99b72b3c1fa 100644 --- a/service/outposts/deserializers.go +++ b/service/outposts/deserializers.go @@ -16,9 +16,105 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "io" + "math" "strings" ) +type awsRestjson1_deserializeOpCancelOrder struct { +} + +func (*awsRestjson1_deserializeOpCancelOrder) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCancelOrder) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCancelOrder(response, &metadata) + } + output := &CancelOrderOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCancelOrder(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpCreateOrder struct { } @@ -343,6 +439,165 @@ func awsRestjson1_deserializeOpDocumentCreateOutpostOutput(v **CreateOutpostOutp return nil } +type awsRestjson1_deserializeOpCreateSite struct { +} + +func (*awsRestjson1_deserializeOpCreateSite) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateSite) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCreateSite(response, &metadata) + } + output := &CreateSiteOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreateSiteOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateSite(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateSiteOutput(v **CreateSiteOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateSiteOutput + if *v == nil { + sv = &CreateSiteOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Site": + if err := awsRestjson1_deserializeDocumentSite(&sv.Site, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpDeleteOutpost struct { } @@ -533,14 +788,14 @@ func awsRestjson1_deserializeOpErrorDeleteSite(response *smithyhttp.Response, me } } -type awsRestjson1_deserializeOpGetOutpost struct { +type awsRestjson1_deserializeOpGetCatalogItem struct { } -func (*awsRestjson1_deserializeOpGetOutpost) ID() string { +func (*awsRestjson1_deserializeOpGetCatalogItem) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetOutpost) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetCatalogItem) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -554,9 +809,9 @@ func (m *awsRestjson1_deserializeOpGetOutpost) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetOutpost(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetCatalogItem(response, &metadata) } - output := &GetOutpostOutput{} + output := &GetCatalogItemOutput{} out.Result = output var buff [1024]byte @@ -577,7 +832,7 @@ func (m *awsRestjson1_deserializeOpGetOutpost) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetOutpostOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetCatalogItemOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -590,7 +845,7 @@ func (m *awsRestjson1_deserializeOpGetOutpost) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetOutpost(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetCatalogItem(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -631,9 +886,6 @@ func awsRestjson1_deserializeOpErrorGetOutpost(response *smithyhttp.Response, me } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -653,7 +905,7 @@ func awsRestjson1_deserializeOpErrorGetOutpost(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentGetOutpostOutput(v **GetOutpostOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetCatalogItemOutput(v **GetCatalogItemOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -666,17 +918,17 @@ func awsRestjson1_deserializeOpDocumentGetOutpostOutput(v **GetOutpostOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetOutpostOutput + var sv *GetCatalogItemOutput if *v == nil { - sv = &GetOutpostOutput{} + sv = &GetCatalogItemOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Outpost": - if err := awsRestjson1_deserializeDocumentOutpost(&sv.Outpost, value); err != nil { + case "CatalogItem": + if err := awsRestjson1_deserializeDocumentCatalogItem(&sv.CatalogItem, value); err != nil { return err } @@ -689,14 +941,14 @@ func awsRestjson1_deserializeOpDocumentGetOutpostOutput(v **GetOutpostOutput, va return nil } -type awsRestjson1_deserializeOpGetOutpostInstanceTypes struct { +type awsRestjson1_deserializeOpGetOrder struct { } -func (*awsRestjson1_deserializeOpGetOutpostInstanceTypes) ID() string { +func (*awsRestjson1_deserializeOpGetOrder) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetOutpostInstanceTypes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetOrder) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -710,9 +962,9 @@ func (m *awsRestjson1_deserializeOpGetOutpostInstanceTypes) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetOutpostInstanceTypes(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetOrder(response, &metadata) } - output := &GetOutpostInstanceTypesOutput{} + output := &GetOrderOutput{} out.Result = output var buff [1024]byte @@ -733,7 +985,7 @@ func (m *awsRestjson1_deserializeOpGetOutpostInstanceTypes) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetOutpostInstanceTypesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetOrderOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -746,7 +998,7 @@ func (m *awsRestjson1_deserializeOpGetOutpostInstanceTypes) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetOutpostInstanceTypes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetOrder(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -787,9 +1039,6 @@ func awsRestjson1_deserializeOpErrorGetOutpostInstanceTypes(response *smithyhttp } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -809,7 +1058,7 @@ func awsRestjson1_deserializeOpErrorGetOutpostInstanceTypes(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentGetOutpostInstanceTypesOutput(v **GetOutpostInstanceTypesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetOrderOutput(v **GetOrderOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -822,47 +1071,20 @@ func awsRestjson1_deserializeOpDocumentGetOutpostInstanceTypesOutput(v **GetOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetOutpostInstanceTypesOutput + var sv *GetOrderOutput if *v == nil { - sv = &GetOutpostInstanceTypesOutput{} + sv = &GetOrderOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "InstanceTypes": - if err := awsRestjson1_deserializeDocumentInstanceTypeListDefinition(&sv.InstanceTypes, value); err != nil { + case "Order": + if err := awsRestjson1_deserializeDocumentOrder(&sv.Order, value); err != nil { return err } - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Token to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "OutpostArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected OutpostArn to be of type string, got %T instead", value) - } - sv.OutpostArn = ptr.String(jtv) - } - - case "OutpostId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected OutpostId to be of type string, got %T instead", value) - } - sv.OutpostId = ptr.String(jtv) - } - default: _, _ = key, value @@ -872,14 +1094,14 @@ func awsRestjson1_deserializeOpDocumentGetOutpostInstanceTypesOutput(v **GetOutp return nil } -type awsRestjson1_deserializeOpListOutposts struct { +type awsRestjson1_deserializeOpGetOutpost struct { } -func (*awsRestjson1_deserializeOpListOutposts) ID() string { +func (*awsRestjson1_deserializeOpGetOutpost) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListOutposts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetOutpost) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -893,9 +1115,9 @@ func (m *awsRestjson1_deserializeOpListOutposts) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListOutposts(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetOutpost(response, &metadata) } - output := &ListOutpostsOutput{} + output := &GetOutpostOutput{} out.Result = output var buff [1024]byte @@ -916,7 +1138,7 @@ func (m *awsRestjson1_deserializeOpListOutposts) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListOutpostsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetOutpostOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -929,7 +1151,7 @@ func (m *awsRestjson1_deserializeOpListOutposts) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorListOutposts(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetOutpost(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -976,6 +1198,9 @@ func awsRestjson1_deserializeOpErrorListOutposts(response *smithyhttp.Response, case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) @@ -989,7 +1214,7 @@ func awsRestjson1_deserializeOpErrorListOutposts(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentListOutpostsOutput(v **ListOutpostsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetOutpostOutput(v **GetOutpostOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1002,26 +1227,17 @@ func awsRestjson1_deserializeOpDocumentListOutpostsOutput(v **ListOutpostsOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListOutpostsOutput + var sv *GetOutpostOutput if *v == nil { - sv = &ListOutpostsOutput{} + sv = &GetOutpostOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Token to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "Outposts": - if err := awsRestjson1_deserializeDocumentOutpostListDefinition(&sv.Outposts, value); err != nil { + case "Outpost": + if err := awsRestjson1_deserializeDocumentOutpost(&sv.Outpost, value); err != nil { return err } @@ -1034,14 +1250,14 @@ func awsRestjson1_deserializeOpDocumentListOutpostsOutput(v **ListOutpostsOutput return nil } -type awsRestjson1_deserializeOpListSites struct { +type awsRestjson1_deserializeOpGetOutpostInstanceTypes struct { } -func (*awsRestjson1_deserializeOpListSites) ID() string { +func (*awsRestjson1_deserializeOpGetOutpostInstanceTypes) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListSites) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetOutpostInstanceTypes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1055,9 +1271,9 @@ func (m *awsRestjson1_deserializeOpListSites) HandleDeserialize(ctx context.Cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListSites(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetOutpostInstanceTypes(response, &metadata) } - output := &ListSitesOutput{} + output := &GetOutpostInstanceTypesOutput{} out.Result = output var buff [1024]byte @@ -1078,7 +1294,7 @@ func (m *awsRestjson1_deserializeOpListSites) HandleDeserialize(ctx context.Cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListSitesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetOutpostInstanceTypesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1091,7 +1307,7 @@ func (m *awsRestjson1_deserializeOpListSites) HandleDeserialize(ctx context.Cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorListSites(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetOutpostInstanceTypes(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1138,6 +1354,9 @@ func awsRestjson1_deserializeOpErrorListSites(response *smithyhttp.Response, met case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) @@ -1151,7 +1370,7 @@ func awsRestjson1_deserializeOpErrorListSites(response *smithyhttp.Response, met } } -func awsRestjson1_deserializeOpDocumentListSitesOutput(v **ListSitesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetOutpostInstanceTypesOutput(v **GetOutpostInstanceTypesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1164,15 +1383,20 @@ func awsRestjson1_deserializeOpDocumentListSitesOutput(v **ListSitesOutput, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListSitesOutput + var sv *GetOutpostInstanceTypesOutput if *v == nil { - sv = &ListSitesOutput{} + sv = &GetOutpostInstanceTypesOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "InstanceTypes": + if err := awsRestjson1_deserializeDocumentInstanceTypeListDefinition(&sv.InstanceTypes, value); err != nil { + return err + } + case "NextToken": if value != nil { jtv, ok := value.(string) @@ -1182,9 +1406,22 @@ func awsRestjson1_deserializeOpDocumentListSitesOutput(v **ListSitesOutput, valu sv.NextToken = ptr.String(jtv) } - case "Sites": - if err := awsRestjson1_deserializeDocumentSiteListDefinition(&sv.Sites, value); err != nil { - return err + case "OutpostArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OutpostArn to be of type string, got %T instead", value) + } + sv.OutpostArn = ptr.String(jtv) + } + + case "OutpostId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OutpostId to be of type string, got %T instead", value) + } + sv.OutpostId = ptr.String(jtv) } default: @@ -1196,14 +1433,14 @@ func awsRestjson1_deserializeOpDocumentListSitesOutput(v **ListSitesOutput, valu return nil } -type awsRestjson1_deserializeOpListTagsForResource struct { +type awsRestjson1_deserializeOpGetSite struct { } -func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { +func (*awsRestjson1_deserializeOpGetSite) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetSite) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1217,9 +1454,9 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetSite(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &GetSiteOutput{} out.Result = output var buff [1024]byte @@ -1240,7 +1477,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetSiteOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1253,7 +1490,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetSite(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1294,6 +1531,9 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -1313,7 +1553,7 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetSiteOutput(v **GetSiteOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1326,17 +1566,17 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTagsForResourceOutput + var sv *GetSiteOutput if *v == nil { - sv = &ListTagsForResourceOutput{} + sv = &GetSiteOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Tags": - if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + case "Site": + if err := awsRestjson1_deserializeDocumentSite(&sv.Site, value); err != nil { return err } @@ -1349,14 +1589,14 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return nil } -type awsRestjson1_deserializeOpTagResource struct { +type awsRestjson1_deserializeOpGetSiteAddress struct { } -func (*awsRestjson1_deserializeOpTagResource) ID() string { +func (*awsRestjson1_deserializeOpGetSiteAddress) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetSiteAddress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1370,15 +1610,43 @@ func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetSiteAddress(response, &metadata) } - output := &TagResourceOutput{} + output := &GetSiteAddressOutput{} out.Result = output + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetSiteAddressOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + return out, metadata, err } -func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetSiteAddress(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1419,6 +1687,9 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -1438,14 +1709,68 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -type awsRestjson1_deserializeOpUntagResource struct { +func awsRestjson1_deserializeOpDocumentGetSiteAddressOutput(v **GetSiteAddressOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetSiteAddressOutput + if *v == nil { + sv = &GetSiteAddressOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Address": + if err := awsRestjson1_deserializeDocumentAddress(&sv.Address, value); err != nil { + return err + } + + case "AddressType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressType to be of type string, got %T instead", value) + } + sv.AddressType = types.AddressType(jtv) + } + + case "SiteId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SiteId to be of type string, got %T instead", value) + } + sv.SiteId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpUntagResource) ID() string { +type awsRestjson1_deserializeOpListCatalogItems struct { +} + +func (*awsRestjson1_deserializeOpListCatalogItems) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListCatalogItems) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1459,15 +1784,43 @@ func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListCatalogItems(response, &metadata) } - output := &UntagResourceOutput{} + output := &ListCatalogItemsOutput{} out.Result = output + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListCatalogItemsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + return out, metadata, err } -func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListCatalogItems(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1527,10 +1880,1361 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } -func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.AccessDeniedException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) +func awsRestjson1_deserializeOpDocumentListCatalogItemsOutput(v **ListCatalogItemsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListCatalogItemsOutput + if *v == nil { + sv = &ListCatalogItemsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CatalogItems": + if err := awsRestjson1_deserializeDocumentCatalogItemListDefinition(&sv.CatalogItems, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Token to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListOrders struct { +} + +func (*awsRestjson1_deserializeOpListOrders) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListOrders) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListOrders(response, &metadata) + } + output := &ListOrdersOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListOrdersOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListOrders(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListOrdersOutput(v **ListOrdersOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListOrdersOutput + if *v == nil { + sv = &ListOrdersOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Token to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Orders": + if err := awsRestjson1_deserializeDocumentOrderSummaryListDefinition(&sv.Orders, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListOutposts struct { +} + +func (*awsRestjson1_deserializeOpListOutposts) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListOutposts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListOutposts(response, &metadata) + } + output := &ListOutpostsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListOutpostsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListOutposts(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListOutpostsOutput(v **ListOutpostsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListOutpostsOutput + if *v == nil { + sv = &ListOutpostsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Token to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Outposts": + if err := awsRestjson1_deserializeDocumentOutpostListDefinition(&sv.Outposts, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListSites struct { +} + +func (*awsRestjson1_deserializeOpListSites) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListSites) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListSites(response, &metadata) + } + output := &ListSitesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListSitesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListSites(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListSitesOutput(v **ListSitesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListSitesOutput + if *v == nil { + sv = &ListSitesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Token to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Sites": + if err := awsRestjson1_deserializeDocumentSiteListDefinition(&sv.Sites, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListTagsForResource struct { +} + +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) + } + output := &ListTagsForResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListTagsForResourceOutput + if *v == nil { + sv = &ListTagsForResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpTagResource struct { +} + +func (*awsRestjson1_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) + } + output := &TagResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUntagResource struct { +} + +func (*awsRestjson1_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) + } + output := &UntagResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUpdateSite struct { +} + +func (*awsRestjson1_deserializeOpUpdateSite) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateSite) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateSite(response, &metadata) + } + output := &UpdateSiteOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateSiteOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateSite(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateSiteOutput(v **UpdateSiteOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateSiteOutput + if *v == nil { + sv = &UpdateSiteOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Site": + if err := awsRestjson1_deserializeDocumentSite(&sv.Site, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateSiteAddress struct { +} + +func (*awsRestjson1_deserializeOpUpdateSiteAddress) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateSiteAddress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateSiteAddress(response, &metadata) + } + output := &UpdateSiteAddressOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateSiteAddressOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateSiteAddress(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateSiteAddressOutput(v **UpdateSiteAddressOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateSiteAddressOutput + if *v == nil { + sv = &UpdateSiteAddressOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Address": + if err := awsRestjson1_deserializeDocumentAddress(&sv.Address, value); err != nil { + return err + } + + case "AddressType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressType to be of type string, got %T instead", value) + } + sv.AddressType = types.AddressType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateSiteRackPhysicalProperties struct { +} + +func (*awsRestjson1_deserializeOpUpdateSiteRackPhysicalProperties) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateSiteRackPhysicalProperties) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateSiteRackPhysicalProperties(response, &metadata) + } + output := &UpdateSiteRackPhysicalPropertiesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateSiteRackPhysicalPropertiesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateSiteRackPhysicalProperties(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateSiteRackPhysicalPropertiesOutput(v **UpdateSiteRackPhysicalPropertiesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateSiteRackPhysicalPropertiesOutput + if *v == nil { + sv = &UpdateSiteRackPhysicalPropertiesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Site": + if err := awsRestjson1_deserializeDocumentSite(&sv.Site, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDeniedException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) @@ -1707,43 +3411,358 @@ func awsRestjson1_deserializeErrorServiceQuotaExceededException(response *smithy return output } -func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ValidationException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) +func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ValidationException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentValidationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAddress(v **types.Address, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Address + if *v == nil { + sv = &types.Address{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AddressLine1": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressLine1 to be of type string, got %T instead", value) + } + sv.AddressLine1 = ptr.String(jtv) + } + + case "AddressLine2": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressLine2 to be of type string, got %T instead", value) + } + sv.AddressLine2 = ptr.String(jtv) + } + + case "AddressLine3": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddressLine3 to be of type string, got %T instead", value) + } + sv.AddressLine3 = ptr.String(jtv) + } + + case "City": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected City to be of type string, got %T instead", value) + } + sv.City = ptr.String(jtv) + } + + case "ContactName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContactName to be of type string, got %T instead", value) + } + sv.ContactName = ptr.String(jtv) + } + + case "ContactPhoneNumber": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContactPhoneNumber to be of type string, got %T instead", value) + } + sv.ContactPhoneNumber = ptr.String(jtv) + } + + case "CountryCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CountryCode to be of type string, got %T instead", value) + } + sv.CountryCode = ptr.String(jtv) + } + + case "DistrictOrCounty": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DistrictOrCounty to be of type string, got %T instead", value) + } + sv.DistrictOrCounty = ptr.String(jtv) + } + + case "Municipality": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Municipality to be of type string, got %T instead", value) + } + sv.Municipality = ptr.String(jtv) + } + + case "PostalCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PostalCode to be of type string, got %T instead", value) + } + sv.PostalCode = ptr.String(jtv) + } + + case "StateOrRegion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StateOrRegion to be of type string, got %T instead", value) + } + sv.StateOrRegion = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCatalogItem(v **types.CatalogItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CatalogItem + if *v == nil { + sv = &types.CatalogItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CatalogItemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SkuCode to be of type string, got %T instead", value) + } + sv.CatalogItemId = ptr.String(jtv) + } + + case "EC2Capacities": + if err := awsRestjson1_deserializeDocumentEC2CapacityListDefinition(&sv.EC2Capacities, value); err != nil { + return err + } + + case "ItemStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CatalogItemStatus to be of type string, got %T instead", value) + } + sv.ItemStatus = types.CatalogItemStatus(jtv) + } + + case "PowerKva": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.PowerKva = ptr.Float32(float32(f64)) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.PowerKva = ptr.Float32(float32(f64)) + + default: + return fmt.Errorf("expected CatalogItemPowerKva to be a JSON Number, got %T instead", value) + + } + } + + case "SupportedStorage": + if err := awsRestjson1_deserializeDocumentSupportedStorageList(&sv.SupportedStorage, value); err != nil { + return err + } + + case "SupportedUplinkGbps": + if err := awsRestjson1_deserializeDocumentSupportedUplinkGbpsListDefinition(&sv.SupportedUplinkGbps, value); err != nil { + return err + } + + case "WeightLbs": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected CatalogItemWeightLbs to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.WeightLbs = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), } - return err } + *v = sv + return nil +} - err := awsRestjson1_deserializeDocumentValidationException(&output, shape) +func awsRestjson1_deserializeDocumentCatalogItemListDefinition(v *[]types.CatalogItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) } - errorBody.Seek(0, io.SeekStart) + var cv []types.CatalogItem + if *v == nil { + cv = []types.CatalogItem{} + } else { + cv = *v + } - return output + for _, value := range shape { + var col types.CatalogItem + destAddr := &col + if err := awsRestjson1_deserializeDocumentCatalogItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil } -func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { +func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1756,9 +3775,9 @@ func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDenie return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AccessDeniedException + var sv *types.ConflictException if *v == nil { - sv = &types.AccessDeniedException{} + sv = &types.ConflictException{} } else { sv = *v } @@ -1774,6 +3793,24 @@ func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDenie sv.Message = ptr.String(jtv) } + case "ResourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + + case "ResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value) + } + sv.ResourceType = types.ResourceType(jtv) + } + default: _, _ = key, value @@ -1783,7 +3820,7 @@ func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDenie return nil } -func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { +func awsRestjson1_deserializeDocumentEC2Capacity(v **types.EC2Capacity, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1796,40 +3833,40 @@ func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictExcepti return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ConflictException + var sv *types.EC2Capacity if *v == nil { - sv = &types.ConflictException{} + sv = &types.EC2Capacity{} } else { sv = *v } for key, value := range shape { switch key { - case "Message": + case "Family": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected Family to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.Family = ptr.String(jtv) } - case "ResourceId": + case "MaxSize": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected MaxSize to be of type string, got %T instead", value) } - sv.ResourceId = ptr.String(jtv) + sv.MaxSize = ptr.String(jtv) } - case "ResourceType": + case "Quantity": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value) + return fmt.Errorf("expected Quantity to be of type string, got %T instead", value) } - sv.ResourceType = types.ResourceType(jtv) + sv.Quantity = ptr.String(jtv) } default: @@ -1841,6 +3878,40 @@ func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictExcepti return nil } +func awsRestjson1_deserializeDocumentEC2CapacityListDefinition(v *[]types.EC2Capacity, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.EC2Capacity + if *v == nil { + cv = []types.EC2Capacity{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EC2Capacity + destAddr := &col + if err := awsRestjson1_deserializeDocumentEC2Capacity(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentInstanceTypeItem(v **types.InstanceTypeItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -2012,9 +4083,9 @@ func awsRestjson1_deserializeDocumentLineItem(v **types.LineItem, value interfac if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Status to be of type string, got %T instead", value) + return fmt.Errorf("expected LineItemStatus to be of type string, got %T instead", value) } - sv.Status = ptr.String(jtv) + sv.Status = types.LineItemStatus(jtv) } default: @@ -2060,35 +4131,179 @@ func awsRestjson1_deserializeDocumentLineItemListDefinition(v *[]types.LineItem, return nil } -func awsRestjson1_deserializeDocumentNotFoundException(v **types.NotFoundException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } +func awsRestjson1_deserializeDocumentLineItemStatusCounts(v *map[string]int32, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]int32 + if *v == nil { + mv = map[string]int32{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal int32 + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected LineItemQuantity to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + parsedVal = int32(i64) + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentNotFoundException(v **types.NotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.NotFoundException + if *v == nil { + sv = &types.NotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentOrder(v **types.Order, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Order + if *v == nil { + sv = &types.Order{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LineItems": + if err := awsRestjson1_deserializeDocumentLineItemListDefinition(&sv.LineItems, value); err != nil { + return err + } + + case "OrderFulfilledDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.OrderFulfilledDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected ISO8601Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "OrderId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OrderId to be of type string, got %T instead", value) + } + sv.OrderId = ptr.String(jtv) + } + + case "OrderSubmissionDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.OrderSubmissionDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected ISO8601Timestamp to be a JSON Number, got %T instead", value) + + } + } - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + case "OutpostId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OutpostIdOnly to be of type string, got %T instead", value) + } + sv.OutpostId = ptr.String(jtv) + } - var sv *types.NotFoundException - if *v == nil { - sv = &types.NotFoundException{} - } else { - sv = *v - } + case "PaymentOption": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaymentOption to be of type string, got %T instead", value) + } + sv.PaymentOption = types.PaymentOption(jtv) + } - for key, value := range shape { - switch key { - case "Message": + case "Status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected OrderStatus to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.Status = types.OrderStatus(jtv) } default: @@ -2100,7 +4315,7 @@ func awsRestjson1_deserializeDocumentNotFoundException(v **types.NotFoundExcepti return nil } -func awsRestjson1_deserializeDocumentOrder(v **types.Order, value interface{}) error { +func awsRestjson1_deserializeDocumentOrderSummary(v **types.OrderSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2113,17 +4328,17 @@ func awsRestjson1_deserializeDocumentOrder(v **types.Order, value interface{}) e return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Order + var sv *types.OrderSummary if *v == nil { - sv = &types.Order{} + sv = &types.OrderSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "LineItems": - if err := awsRestjson1_deserializeDocumentLineItemListDefinition(&sv.LineItems, value); err != nil { + case "LineItemCountsByStatus": + if err := awsRestjson1_deserializeDocumentLineItemStatusCounts(&sv.LineItemCountsByStatus, value); err != nil { return err } @@ -2168,22 +4383,22 @@ func awsRestjson1_deserializeDocumentOrder(v **types.Order, value interface{}) e } } - case "OutpostId": + case "OrderType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected OutpostIdOnly to be of type string, got %T instead", value) + return fmt.Errorf("expected OrderType to be of type string, got %T instead", value) } - sv.OutpostId = ptr.String(jtv) + sv.OrderType = types.OrderType(jtv) } - case "PaymentOption": + case "OutpostId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected PaymentOption to be of type string, got %T instead", value) + return fmt.Errorf("expected OutpostIdOnly to be of type string, got %T instead", value) } - sv.PaymentOption = types.PaymentOption(jtv) + sv.OutpostId = ptr.String(jtv) } case "Status": @@ -2204,6 +4419,40 @@ func awsRestjson1_deserializeDocumentOrder(v **types.Order, value interface{}) e return nil } +func awsRestjson1_deserializeDocumentOrderSummaryListDefinition(v *[]types.OrderSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.OrderSummary + if *v == nil { + cv = []types.OrderSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.OrderSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentOrderSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentOutpost(v **types.Outpost, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -2364,6 +4613,118 @@ func awsRestjson1_deserializeDocumentOutpostListDefinition(v *[]types.Outpost, v return nil } +func awsRestjson1_deserializeDocumentRackPhysicalProperties(v **types.RackPhysicalProperties, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RackPhysicalProperties + if *v == nil { + sv = &types.RackPhysicalProperties{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FiberOpticCableType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FiberOpticCableType to be of type string, got %T instead", value) + } + sv.FiberOpticCableType = types.FiberOpticCableType(jtv) + } + + case "MaximumSupportedWeightLbs": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaximumSupportedWeightLbs to be of type string, got %T instead", value) + } + sv.MaximumSupportedWeightLbs = types.MaximumSupportedWeightLbs(jtv) + } + + case "OpticalStandard": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpticalStandard to be of type string, got %T instead", value) + } + sv.OpticalStandard = types.OpticalStandard(jtv) + } + + case "PowerConnector": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PowerConnector to be of type string, got %T instead", value) + } + sv.PowerConnector = types.PowerConnector(jtv) + } + + case "PowerDrawKva": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PowerDrawKva to be of type string, got %T instead", value) + } + sv.PowerDrawKva = types.PowerDrawKva(jtv) + } + + case "PowerFeedDrop": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PowerFeedDrop to be of type string, got %T instead", value) + } + sv.PowerFeedDrop = types.PowerFeedDrop(jtv) + } + + case "PowerPhase": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PowerPhase to be of type string, got %T instead", value) + } + sv.PowerPhase = types.PowerPhase(jtv) + } + + case "UplinkCount": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UplinkCount to be of type string, got %T instead", value) + } + sv.UplinkCount = types.UplinkCount(jtv) + } + + case "UplinkGbps": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UplinkGbps to be of type string, got %T instead", value) + } + sv.UplinkGbps = types.UplinkGbps(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -2453,6 +4814,47 @@ func awsRestjson1_deserializeDocumentSite(v **types.Site, value interface{}) err sv.Name = ptr.String(jtv) } + case "Notes": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SiteNotes to be of type string, got %T instead", value) + } + sv.Notes = ptr.String(jtv) + } + + case "OperatingAddressCity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected City to be of type string, got %T instead", value) + } + sv.OperatingAddressCity = ptr.String(jtv) + } + + case "OperatingAddressCountryCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CountryCode to be of type string, got %T instead", value) + } + sv.OperatingAddressCountryCode = ptr.String(jtv) + } + + case "OperatingAddressStateOrRegion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StateOrRegion to be of type string, got %T instead", value) + } + sv.OperatingAddressStateOrRegion = ptr.String(jtv) + } + + case "RackPhysicalProperties": + if err := awsRestjson1_deserializeDocumentRackPhysicalProperties(&sv.RackPhysicalProperties, value); err != nil { + return err + } + case "SiteArn": if value != nil { jtv, ok := value.(string) @@ -2519,6 +4921,82 @@ func awsRestjson1_deserializeDocumentSiteListDefinition(v *[]types.Site, value i return nil } +func awsRestjson1_deserializeDocumentSupportedStorageList(v *[]types.SupportedStorageEnum, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.SupportedStorageEnum + if *v == nil { + cv = []types.SupportedStorageEnum{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SupportedStorageEnum + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SupportedStorageEnum to be of type string, got %T instead", value) + } + col = types.SupportedStorageEnum(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentSupportedUplinkGbpsListDefinition(v *[]int32, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []int32 + if *v == nil { + cv = []int32{} + } else { + cv = *v + } + + for _, value := range shape { + var col int32 + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected SupportedUplinkGbps to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + col = int32(i64) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentTagMap(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/outposts/doc.go b/service/outposts/doc.go index df4fd17697a..7cb8062805d 100644 --- a/service/outposts/doc.go +++ b/service/outposts/doc.go @@ -3,10 +3,10 @@ // Package outposts provides the API client, operations, and parameter types for // AWS Outposts. // -// AWS Outposts is a fully managed service that extends AWS infrastructure, APIs, -// and tools to customer premises. By providing local access to AWS managed -// infrastructure, AWS Outposts enables customers to build and run applications on -// premises using the same programming interfaces as in AWS Regions, while using -// local compute and storage resources for lower latency and local data processing -// needs. +// Amazon Web Services Outposts is a fully managed service that extends Amazon Web +// Services infrastructure, APIs, and tools to customer premises. By providing +// local access to Amazon Web Services managed infrastructure, Amazon Web Services +// Outposts enables customers to build and run applications on premises using the +// same programming interfaces as in Amazon Web Services Regions, while using local +// compute and storage resources for lower latency and local data processing needs. package outposts diff --git a/service/outposts/generated.json b/service/outposts/generated.json index 2b107befbb3..b358f57799d 100644 --- a/service/outposts/generated.json +++ b/service/outposts/generated.json @@ -7,17 +7,28 @@ }, "files": [ "api_client.go", + "api_op_CancelOrder.go", "api_op_CreateOrder.go", "api_op_CreateOutpost.go", + "api_op_CreateSite.go", "api_op_DeleteOutpost.go", "api_op_DeleteSite.go", + "api_op_GetCatalogItem.go", + "api_op_GetOrder.go", "api_op_GetOutpost.go", "api_op_GetOutpostInstanceTypes.go", + "api_op_GetSite.go", + "api_op_GetSiteAddress.go", + "api_op_ListCatalogItems.go", + "api_op_ListOrders.go", "api_op_ListOutposts.go", "api_op_ListSites.go", "api_op_ListTagsForResource.go", "api_op_TagResource.go", "api_op_UntagResource.go", + "api_op_UpdateSite.go", + "api_op_UpdateSiteAddress.go", + "api_op_UpdateSiteRackPhysicalProperties.go", "deserializers.go", "doc.go", "endpoints.go", diff --git a/service/outposts/serializers.go b/service/outposts/serializers.go index b68119f5d59..8ee40a74fe2 100644 --- a/service/outposts/serializers.go +++ b/service/outposts/serializers.go @@ -14,6 +14,64 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) +type awsRestjson1_serializeOpCancelOrder struct { +} + +func (*awsRestjson1_serializeOpCancelOrder) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCancelOrder) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CancelOrderInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/orders/{OrderId}/cancel") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCancelOrderInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCancelOrderInput(v *CancelOrderInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.OrderId == nil || len(*v.OrderId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member OrderId must not be empty")} + } + if v.OrderId != nil { + if err := encoder.SetURI("OrderId").String(*v.OrderId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCreateOrder struct { } @@ -194,6 +252,112 @@ func awsRestjson1_serializeOpDocumentCreateOutpostInput(v *CreateOutpostInput, v return nil } +type awsRestjson1_serializeOpCreateSite struct { +} + +func (*awsRestjson1_serializeOpCreateSite) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateSite) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateSiteInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/sites") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateSiteInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateSiteInput(v *CreateSiteInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateSiteInput(v *CreateSiteInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.Notes != nil { + ok := object.Key("Notes") + ok.String(*v.Notes) + } + + if v.OperatingAddress != nil { + ok := object.Key("OperatingAddress") + if err := awsRestjson1_serializeDocumentAddress(v.OperatingAddress, ok); err != nil { + return err + } + } + + if v.RackPhysicalProperties != nil { + ok := object.Key("RackPhysicalProperties") + if err := awsRestjson1_serializeDocumentRackPhysicalProperties(v.RackPhysicalProperties, ok); err != nil { + return err + } + } + + if v.ShippingAddress != nil { + ok := object.Key("ShippingAddress") + if err := awsRestjson1_serializeDocumentAddress(v.ShippingAddress, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDeleteOutpost struct { } @@ -310,14 +474,14 @@ func awsRestjson1_serializeOpHttpBindingsDeleteSiteInput(v *DeleteSiteInput, enc return nil } -type awsRestjson1_serializeOpGetOutpost struct { +type awsRestjson1_serializeOpGetCatalogItem struct { } -func (*awsRestjson1_serializeOpGetOutpost) ID() string { +func (*awsRestjson1_serializeOpGetCatalogItem) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetOutpost) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetCatalogItem) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -325,13 +489,13 @@ func (m *awsRestjson1_serializeOpGetOutpost) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetOutpostInput) + input, ok := in.Parameters.(*GetCatalogItemInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/outposts/{OutpostId}") + opPath, opQuery := httpbinding.SplitURI("/catalog/item/{CatalogItemId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -340,7 +504,7 @@ func (m *awsRestjson1_serializeOpGetOutpost) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetOutpostInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetCatalogItemInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -351,16 +515,16 @@ func (m *awsRestjson1_serializeOpGetOutpost) HandleSerialize(ctx context.Context return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetOutpostInput(v *GetOutpostInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetCatalogItemInput(v *GetCatalogItemInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.OutpostId == nil || len(*v.OutpostId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member OutpostId must not be empty")} + if v.CatalogItemId == nil || len(*v.CatalogItemId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member CatalogItemId must not be empty")} } - if v.OutpostId != nil { - if err := encoder.SetURI("OutpostId").String(*v.OutpostId); err != nil { + if v.CatalogItemId != nil { + if err := encoder.SetURI("CatalogItemId").String(*v.CatalogItemId); err != nil { return err } } @@ -368,14 +532,14 @@ func awsRestjson1_serializeOpHttpBindingsGetOutpostInput(v *GetOutpostInput, enc return nil } -type awsRestjson1_serializeOpGetOutpostInstanceTypes struct { +type awsRestjson1_serializeOpGetOrder struct { } -func (*awsRestjson1_serializeOpGetOutpostInstanceTypes) ID() string { +func (*awsRestjson1_serializeOpGetOrder) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetOutpostInstanceTypes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetOrder) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -383,13 +547,13 @@ func (m *awsRestjson1_serializeOpGetOutpostInstanceTypes) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetOutpostInstanceTypesInput) + input, ok := in.Parameters.(*GetOrderInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/outposts/{OutpostId}/instanceTypes") + opPath, opQuery := httpbinding.SplitURI("/orders/{OrderId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -398,7 +562,7 @@ func (m *awsRestjson1_serializeOpGetOutpostInstanceTypes) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetOutpostInstanceTypesInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetOrderInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -409,24 +573,16 @@ func (m *awsRestjson1_serializeOpGetOutpostInstanceTypes) HandleSerialize(ctx co return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetOutpostInstanceTypesInput(v *GetOutpostInstanceTypesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetOrderInput(v *GetOrderInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MaxResults != nil { - encoder.SetQuery("MaxResults").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("NextToken").String(*v.NextToken) - } - - if v.OutpostId == nil || len(*v.OutpostId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member OutpostId must not be empty")} + if v.OrderId == nil || len(*v.OrderId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member OrderId must not be empty")} } - if v.OutpostId != nil { - if err := encoder.SetURI("OutpostId").String(*v.OutpostId); err != nil { + if v.OrderId != nil { + if err := encoder.SetURI("OrderId").String(*v.OrderId); err != nil { return err } } @@ -434,14 +590,14 @@ func awsRestjson1_serializeOpHttpBindingsGetOutpostInstanceTypesInput(v *GetOutp return nil } -type awsRestjson1_serializeOpListOutposts struct { +type awsRestjson1_serializeOpGetOutpost struct { } -func (*awsRestjson1_serializeOpListOutposts) ID() string { +func (*awsRestjson1_serializeOpGetOutpost) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListOutposts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetOutpost) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -449,13 +605,13 @@ func (m *awsRestjson1_serializeOpListOutposts) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListOutpostsInput) + input, ok := in.Parameters.(*GetOutpostInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/outposts") + opPath, opQuery := httpbinding.SplitURI("/outposts/{OutpostId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -464,7 +620,7 @@ func (m *awsRestjson1_serializeOpListOutposts) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListOutpostsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetOutpostInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -475,48 +631,31 @@ func (m *awsRestjson1_serializeOpListOutposts) HandleSerialize(ctx context.Conte return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListOutpostsInput(v *ListOutpostsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetOutpostInput(v *GetOutpostInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AvailabilityZoneFilter != nil { - for i := range v.AvailabilityZoneFilter { - encoder.AddQuery("AvailabilityZoneFilter").String(v.AvailabilityZoneFilter[i]) - } - } - - if v.AvailabilityZoneIdFilter != nil { - for i := range v.AvailabilityZoneIdFilter { - encoder.AddQuery("AvailabilityZoneIdFilter").String(v.AvailabilityZoneIdFilter[i]) - } + if v.OutpostId == nil || len(*v.OutpostId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member OutpostId must not be empty")} } - - if v.LifeCycleStatusFilter != nil { - for i := range v.LifeCycleStatusFilter { - encoder.AddQuery("LifeCycleStatusFilter").String(v.LifeCycleStatusFilter[i]) + if v.OutpostId != nil { + if err := encoder.SetURI("OutpostId").String(*v.OutpostId); err != nil { + return err } } - if v.MaxResults != nil { - encoder.SetQuery("MaxResults").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("NextToken").String(*v.NextToken) - } - return nil } -type awsRestjson1_serializeOpListSites struct { +type awsRestjson1_serializeOpGetOutpostInstanceTypes struct { } -func (*awsRestjson1_serializeOpListSites) ID() string { +func (*awsRestjson1_serializeOpGetOutpostInstanceTypes) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListSites) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetOutpostInstanceTypes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -524,13 +663,13 @@ func (m *awsRestjson1_serializeOpListSites) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListSitesInput) + input, ok := in.Parameters.(*GetOutpostInstanceTypesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/sites") + opPath, opQuery := httpbinding.SplitURI("/outposts/{OutpostId}/instanceTypes") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -539,7 +678,7 @@ func (m *awsRestjson1_serializeOpListSites) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListSitesInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetOutpostInstanceTypesInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -550,7 +689,7 @@ func (m *awsRestjson1_serializeOpListSites) HandleSerialize(ctx context.Context, return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListSitesInput(v *ListSitesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetOutpostInstanceTypesInput(v *GetOutpostInstanceTypesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -563,17 +702,26 @@ func awsRestjson1_serializeOpHttpBindingsListSitesInput(v *ListSitesInput, encod encoder.SetQuery("NextToken").String(*v.NextToken) } + if v.OutpostId == nil || len(*v.OutpostId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member OutpostId must not be empty")} + } + if v.OutpostId != nil { + if err := encoder.SetURI("OutpostId").String(*v.OutpostId); err != nil { + return err + } + } + return nil } -type awsRestjson1_serializeOpListTagsForResource struct { +type awsRestjson1_serializeOpGetSite struct { } -func (*awsRestjson1_serializeOpListTagsForResource) ID() string { +func (*awsRestjson1_serializeOpGetSite) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetSite) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -581,13 +729,13 @@ func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListTagsForResourceInput) + input, ok := in.Parameters.(*GetSiteInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") + opPath, opQuery := httpbinding.SplitURI("/sites/{SiteId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -596,7 +744,7 @@ func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetSiteInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -607,16 +755,16 @@ func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetSiteInput(v *GetSiteInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + if v.SiteId == nil || len(*v.SiteId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member SiteId must not be empty")} } - if v.ResourceArn != nil { - if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + if v.SiteId != nil { + if err := encoder.SetURI("SiteId").String(*v.SiteId); err != nil { return err } } @@ -624,14 +772,14 @@ func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsFor return nil } -type awsRestjson1_serializeOpTagResource struct { +type awsRestjson1_serializeOpGetSiteAddress struct { } -func (*awsRestjson1_serializeOpTagResource) ID() string { +func (*awsRestjson1_serializeOpGetSiteAddress) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetSiteAddress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -639,28 +787,416 @@ func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*TagResourceInput) + input, ok := in.Parameters.(*GetSiteAddressInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") + opPath, opQuery := httpbinding.SplitURI("/sites/{SiteId}/address") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "GET" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetSiteAddressInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetSiteAddressInput(v *GetSiteAddressInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if len(v.AddressType) > 0 { + encoder.SetQuery("AddressType").String(string(v.AddressType)) + } + + if v.SiteId == nil || len(*v.SiteId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member SiteId must not be empty")} + } + if v.SiteId != nil { + if err := encoder.SetURI("SiteId").String(*v.SiteId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpListCatalogItems struct { +} + +func (*awsRestjson1_serializeOpListCatalogItems) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListCatalogItems) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListCatalogItemsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/catalog/items") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListCatalogItemsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListCatalogItemsInput(v *ListCatalogItemsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.EC2FamilyFilter != nil { + for i := range v.EC2FamilyFilter { + encoder.AddQuery("EC2FamilyFilter").String(v.EC2FamilyFilter[i]) + } + } + + if v.ItemClassFilter != nil { + for i := range v.ItemClassFilter { + encoder.AddQuery("ItemClassFilter").String(string(v.ItemClassFilter[i])) + } + } + + if v.MaxResults != nil { + encoder.SetQuery("MaxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("NextToken").String(*v.NextToken) + } + + if v.SupportedStorageFilter != nil { + for i := range v.SupportedStorageFilter { + encoder.AddQuery("SupportedStorageFilter").String(string(v.SupportedStorageFilter[i])) + } + } + + return nil +} + +type awsRestjson1_serializeOpListOrders struct { +} + +func (*awsRestjson1_serializeOpListOrders) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListOrders) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListOrdersInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/list-orders") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListOrdersInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListOrdersInput(v *ListOrdersInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != nil { + encoder.SetQuery("MaxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("NextToken").String(*v.NextToken) + } + + if v.OutpostIdentifierFilter != nil { + encoder.SetQuery("OutpostIdentifierFilter").String(*v.OutpostIdentifierFilter) + } + + return nil +} + +type awsRestjson1_serializeOpListOutposts struct { +} + +func (*awsRestjson1_serializeOpListOutposts) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListOutposts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListOutpostsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/outposts") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListOutpostsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListOutpostsInput(v *ListOutpostsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AvailabilityZoneFilter != nil { + for i := range v.AvailabilityZoneFilter { + encoder.AddQuery("AvailabilityZoneFilter").String(v.AvailabilityZoneFilter[i]) + } + } + + if v.AvailabilityZoneIdFilter != nil { + for i := range v.AvailabilityZoneIdFilter { + encoder.AddQuery("AvailabilityZoneIdFilter").String(v.AvailabilityZoneIdFilter[i]) + } + } + + if v.LifeCycleStatusFilter != nil { + for i := range v.LifeCycleStatusFilter { + encoder.AddQuery("LifeCycleStatusFilter").String(v.LifeCycleStatusFilter[i]) + } + } + + if v.MaxResults != nil { + encoder.SetQuery("MaxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("NextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListSites struct { +} + +func (*awsRestjson1_serializeOpListSites) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListSites) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListSitesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/sites") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListSitesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListSitesInput(v *ListSitesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != nil { + encoder.SetQuery("MaxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("NextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListTagsForResource struct { +} + +func (*awsRestjson1_serializeOpListTagsForResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListTagsForResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpTagResource struct { +} + +func (*awsRestjson1_serializeOpTagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*TagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -676,16 +1212,163 @@ func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUntagResource struct { +} + +func (*awsRestjson1_serializeOpUntagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UntagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + if v.TagKeys != nil { + for i := range v.TagKeys { + encoder.AddQuery("tagKeys").String(v.TagKeys[i]) + } + } + + return nil +} + +type awsRestjson1_serializeOpUpdateSite struct { +} + +func (*awsRestjson1_serializeOpUpdateSite) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateSite) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateSiteInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/sites/{SiteId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PATCH" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateSiteInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateSiteInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateSiteInput(v *UpdateSiteInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + if v.SiteId == nil || len(*v.SiteId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member SiteId must not be empty")} } - if v.ResourceArn != nil { - if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + if v.SiteId != nil { + if err := encoder.SetURI("SiteId").String(*v.SiteId); err != nil { return err } } @@ -693,13 +1376,90 @@ func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, e return nil } -func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentUpdateSiteInput(v *UpdateSiteInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.Tags != nil { - ok := object.Key("Tags") - if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.Notes != nil { + ok := object.Key("Notes") + ok.String(*v.Notes) + } + + return nil +} + +type awsRestjson1_serializeOpUpdateSiteAddress struct { +} + +func (*awsRestjson1_serializeOpUpdateSiteAddress) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateSiteAddress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateSiteAddressInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/sites/{SiteId}/address") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateSiteAddressInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateSiteAddressInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateSiteAddressInput(v *UpdateSiteAddressInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.SiteId == nil || len(*v.SiteId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member SiteId must not be empty")} + } + if v.SiteId != nil { + if err := encoder.SetURI("SiteId").String(*v.SiteId); err != nil { return err } } @@ -707,14 +1467,33 @@ func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value return nil } -type awsRestjson1_serializeOpUntagResource struct { +func awsRestjson1_serializeOpDocumentUpdateSiteAddressInput(v *UpdateSiteAddressInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Address != nil { + ok := object.Key("Address") + if err := awsRestjson1_serializeDocumentAddress(v.Address, ok); err != nil { + return err + } + } + + if len(v.AddressType) > 0 { + ok := object.Key("AddressType") + ok.String(string(v.AddressType)) + } + + return nil } -func (*awsRestjson1_serializeOpUntagResource) ID() string { +type awsRestjson1_serializeOpUpdateSiteRackPhysicalProperties struct { +} + +func (*awsRestjson1_serializeOpUpdateSiteRackPhysicalProperties) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateSiteRackPhysicalProperties) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -722,22 +1501,33 @@ func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*UntagResourceInput) + input, ok := in.Parameters.(*UpdateSiteRackPhysicalPropertiesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") + opPath, opQuery := httpbinding.SplitURI("/sites/{SiteId}/rackPhysicalProperties") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "PATCH" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdateSiteRackPhysicalPropertiesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateSiteRackPhysicalPropertiesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -748,24 +1538,132 @@ func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateSiteRackPhysicalPropertiesInput(v *UpdateSiteRackPhysicalPropertiesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + if v.SiteId == nil || len(*v.SiteId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member SiteId must not be empty")} } - if v.ResourceArn != nil { - if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + if v.SiteId != nil { + if err := encoder.SetURI("SiteId").String(*v.SiteId); err != nil { return err } } - if v.TagKeys != nil { - for i := range v.TagKeys { - encoder.AddQuery("tagKeys").String(v.TagKeys[i]) - } + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateSiteRackPhysicalPropertiesInput(v *UpdateSiteRackPhysicalPropertiesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.FiberOpticCableType) > 0 { + ok := object.Key("FiberOpticCableType") + ok.String(string(v.FiberOpticCableType)) + } + + if len(v.MaximumSupportedWeightLbs) > 0 { + ok := object.Key("MaximumSupportedWeightLbs") + ok.String(string(v.MaximumSupportedWeightLbs)) + } + + if len(v.OpticalStandard) > 0 { + ok := object.Key("OpticalStandard") + ok.String(string(v.OpticalStandard)) + } + + if len(v.PowerConnector) > 0 { + ok := object.Key("PowerConnector") + ok.String(string(v.PowerConnector)) + } + + if len(v.PowerDrawKva) > 0 { + ok := object.Key("PowerDrawKva") + ok.String(string(v.PowerDrawKva)) + } + + if len(v.PowerFeedDrop) > 0 { + ok := object.Key("PowerFeedDrop") + ok.String(string(v.PowerFeedDrop)) + } + + if len(v.PowerPhase) > 0 { + ok := object.Key("PowerPhase") + ok.String(string(v.PowerPhase)) + } + + if len(v.UplinkCount) > 0 { + ok := object.Key("UplinkCount") + ok.String(string(v.UplinkCount)) + } + + if len(v.UplinkGbps) > 0 { + ok := object.Key("UplinkGbps") + ok.String(string(v.UplinkGbps)) + } + + return nil +} + +func awsRestjson1_serializeDocumentAddress(v *types.Address, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AddressLine1 != nil { + ok := object.Key("AddressLine1") + ok.String(*v.AddressLine1) + } + + if v.AddressLine2 != nil { + ok := object.Key("AddressLine2") + ok.String(*v.AddressLine2) + } + + if v.AddressLine3 != nil { + ok := object.Key("AddressLine3") + ok.String(*v.AddressLine3) + } + + if v.City != nil { + ok := object.Key("City") + ok.String(*v.City) + } + + if v.ContactName != nil { + ok := object.Key("ContactName") + ok.String(*v.ContactName) + } + + if v.ContactPhoneNumber != nil { + ok := object.Key("ContactPhoneNumber") + ok.String(*v.ContactPhoneNumber) + } + + if v.CountryCode != nil { + ok := object.Key("CountryCode") + ok.String(*v.CountryCode) + } + + if v.DistrictOrCounty != nil { + ok := object.Key("DistrictOrCounty") + ok.String(*v.DistrictOrCounty) + } + + if v.Municipality != nil { + ok := object.Key("Municipality") + ok.String(*v.Municipality) + } + + if v.PostalCode != nil { + ok := object.Key("PostalCode") + ok.String(*v.PostalCode) + } + + if v.StateOrRegion != nil { + ok := object.Key("StateOrRegion") + ok.String(*v.StateOrRegion) } return nil @@ -801,6 +1699,58 @@ func awsRestjson1_serializeDocumentLineItemRequestListDefinition(v []types.LineI return nil } +func awsRestjson1_serializeDocumentRackPhysicalProperties(v *types.RackPhysicalProperties, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.FiberOpticCableType) > 0 { + ok := object.Key("FiberOpticCableType") + ok.String(string(v.FiberOpticCableType)) + } + + if len(v.MaximumSupportedWeightLbs) > 0 { + ok := object.Key("MaximumSupportedWeightLbs") + ok.String(string(v.MaximumSupportedWeightLbs)) + } + + if len(v.OpticalStandard) > 0 { + ok := object.Key("OpticalStandard") + ok.String(string(v.OpticalStandard)) + } + + if len(v.PowerConnector) > 0 { + ok := object.Key("PowerConnector") + ok.String(string(v.PowerConnector)) + } + + if len(v.PowerDrawKva) > 0 { + ok := object.Key("PowerDrawKva") + ok.String(string(v.PowerDrawKva)) + } + + if len(v.PowerFeedDrop) > 0 { + ok := object.Key("PowerFeedDrop") + ok.String(string(v.PowerFeedDrop)) + } + + if len(v.PowerPhase) > 0 { + ok := object.Key("PowerPhase") + ok.String(string(v.PowerPhase)) + } + + if len(v.UplinkCount) > 0 { + ok := object.Key("UplinkCount") + ok.String(string(v.UplinkCount)) + } + + if len(v.UplinkGbps) > 0 { + ok := object.Key("UplinkGbps") + ok.String(string(v.UplinkGbps)) + } + + return nil +} + func awsRestjson1_serializeDocumentTagMap(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/outposts/types/enums.go b/service/outposts/types/enums.go index 898fd74fb02..ff8c7a92697 100644 --- a/service/outposts/types/enums.go +++ b/service/outposts/types/enums.go @@ -2,6 +2,172 @@ package types +type AddressType string + +// Enum values for AddressType +const ( + AddressTypeShippingAddress AddressType = "SHIPPING_ADDRESS" + AddressTypeOperatingAddress AddressType = "OPERATING_ADDRESS" +) + +// Values returns all known values for AddressType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (AddressType) Values() []AddressType { + return []AddressType{ + "SHIPPING_ADDRESS", + "OPERATING_ADDRESS", + } +} + +type CatalogItemClass string + +// Enum values for CatalogItemClass +const ( + CatalogItemClassRack CatalogItemClass = "RACK" + CatalogItemClassServer CatalogItemClass = "SERVER" +) + +// Values returns all known values for CatalogItemClass. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (CatalogItemClass) Values() []CatalogItemClass { + return []CatalogItemClass{ + "RACK", + "SERVER", + } +} + +type CatalogItemStatus string + +// Enum values for CatalogItemStatus +const ( + CatalogItemStatusAvailable CatalogItemStatus = "AVAILABLE" + CatalogItemStatusDiscontinued CatalogItemStatus = "DISCONTINUED" +) + +// Values returns all known values for CatalogItemStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (CatalogItemStatus) Values() []CatalogItemStatus { + return []CatalogItemStatus{ + "AVAILABLE", + "DISCONTINUED", + } +} + +type FiberOpticCableType string + +// Enum values for FiberOpticCableType +const ( + FiberOpticCableTypeSingleMode FiberOpticCableType = "SINGLE_MODE" + FiberOpticCableTypeMultiMode FiberOpticCableType = "MULTI_MODE" +) + +// Values returns all known values for FiberOpticCableType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (FiberOpticCableType) Values() []FiberOpticCableType { + return []FiberOpticCableType{ + "SINGLE_MODE", + "MULTI_MODE", + } +} + +type LineItemStatus string + +// Enum values for LineItemStatus +const ( + LineItemStatusPreparing LineItemStatus = "PREPARING" + LineItemStatusBuilding LineItemStatus = "BUILDING" + LineItemStatusShipped LineItemStatus = "SHIPPED" + LineItemStatusDelivered LineItemStatus = "DELIVERED" + LineItemStatusInstalling LineItemStatus = "INSTALLING" + LineItemStatusInstalled LineItemStatus = "INSTALLED" + LineItemStatusError LineItemStatus = "ERROR" + LineItemStatusCancelled LineItemStatus = "CANCELLED" +) + +// Values returns all known values for LineItemStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (LineItemStatus) Values() []LineItemStatus { + return []LineItemStatus{ + "PREPARING", + "BUILDING", + "SHIPPED", + "DELIVERED", + "INSTALLING", + "INSTALLED", + "ERROR", + "CANCELLED", + } +} + +type MaximumSupportedWeightLbs string + +// Enum values for MaximumSupportedWeightLbs +const ( + MaximumSupportedWeightLbsNoLimit MaximumSupportedWeightLbs = "NO_LIMIT" + MaximumSupportedWeightLbsMax1400Lbs MaximumSupportedWeightLbs = "MAX_1400_LBS" + MaximumSupportedWeightLbsMax1600Lbs MaximumSupportedWeightLbs = "MAX_1600_LBS" + MaximumSupportedWeightLbsMax1800Lbs MaximumSupportedWeightLbs = "MAX_1800_LBS" + MaximumSupportedWeightLbsMax2000Lbs MaximumSupportedWeightLbs = "MAX_2000_LBS" +) + +// Values returns all known values for MaximumSupportedWeightLbs. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// The ordering of this slice is not guaranteed to be stable across updates. +func (MaximumSupportedWeightLbs) Values() []MaximumSupportedWeightLbs { + return []MaximumSupportedWeightLbs{ + "NO_LIMIT", + "MAX_1400_LBS", + "MAX_1600_LBS", + "MAX_1800_LBS", + "MAX_2000_LBS", + } +} + +type OpticalStandard string + +// Enum values for OpticalStandard +const ( + OpticalStandardOptic10gbaseSr OpticalStandard = "OPTIC_10GBASE_SR" + OpticalStandardOptic10gbaseIr OpticalStandard = "OPTIC_10GBASE_IR" + OpticalStandardOptic10gbaseLr OpticalStandard = "OPTIC_10GBASE_LR" + OpticalStandardOptic40gbaseSr OpticalStandard = "OPTIC_40GBASE_SR" + OpticalStandardOptic40gbaseEsr OpticalStandard = "OPTIC_40GBASE_ESR" + OpticalStandardOptic40gbaseIr4Lr4l OpticalStandard = "OPTIC_40GBASE_IR4_LR4L" + OpticalStandardOptic40gbaseLr4 OpticalStandard = "OPTIC_40GBASE_LR4" + OpticalStandardOptic100gbaseSr4 OpticalStandard = "OPTIC_100GBASE_SR4" + OpticalStandardOptic100gbaseCwdm4 OpticalStandard = "OPTIC_100GBASE_CWDM4" + OpticalStandardOptic100gbaseLr4 OpticalStandard = "OPTIC_100GBASE_LR4" + OpticalStandardOptic100gPsm4Msa OpticalStandard = "OPTIC_100G_PSM4_MSA" + OpticalStandardOptic1000baseLx OpticalStandard = "OPTIC_1000BASE_LX" + OpticalStandardOptic1000baseSx OpticalStandard = "OPTIC_1000BASE_SX" +) + +// Values returns all known values for OpticalStandard. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (OpticalStandard) Values() []OpticalStandard { + return []OpticalStandard{ + "OPTIC_10GBASE_SR", + "OPTIC_10GBASE_IR", + "OPTIC_10GBASE_LR", + "OPTIC_40GBASE_SR", + "OPTIC_40GBASE_ESR", + "OPTIC_40GBASE_IR4_LR4L", + "OPTIC_40GBASE_LR4", + "OPTIC_100GBASE_SR4", + "OPTIC_100GBASE_CWDM4", + "OPTIC_100GBASE_LR4", + "OPTIC_100G_PSM4_MSA", + "OPTIC_1000BASE_LX", + "OPTIC_1000BASE_SX", + } +} + type OrderStatus string // Enum values for OrderStatus @@ -12,6 +178,10 @@ const ( OrderStatusInstalling OrderStatus = "INSTALLING" OrderStatusFulfilled OrderStatus = "FULFILLED" OrderStatusCancelled OrderStatus = "CANCELLED" + OrderStatusPreparing OrderStatus = "PREPARING" + OrderStatusInProgress OrderStatus = "IN_PROGRESS" + OrderStatusCompleted OrderStatus = "COMPLETED" + OrderStatusError OrderStatus = "ERROR" ) // Values returns all known values for OrderStatus. Note that this can be expanded @@ -25,6 +195,28 @@ func (OrderStatus) Values() []OrderStatus { "INSTALLING", "FULFILLED", "CANCELLED", + "PREPARING", + "IN_PROGRESS", + "COMPLETED", + "ERROR", + } +} + +type OrderType string + +// Enum values for OrderType +const ( + OrderTypeOutpost OrderType = "OUTPOST" + OrderTypeReplacement OrderType = "REPLACEMENT" +) + +// Values returns all known values for OrderType. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (OrderType) Values() []OrderType { + return []OrderType{ + "OUTPOST", + "REPLACEMENT", } } @@ -64,11 +256,90 @@ func (PaymentTerm) Values() []PaymentTerm { } } +type PowerConnector string + +// Enum values for PowerConnector +const ( + PowerConnectorL630p PowerConnector = "L6_30P" + PowerConnectorIec309 PowerConnector = "IEC309" + PowerConnectorAh530p7w PowerConnector = "AH530P7W" + PowerConnectorAh532p6w PowerConnector = "AH532P6W" +) + +// Values returns all known values for PowerConnector. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (PowerConnector) Values() []PowerConnector { + return []PowerConnector{ + "L6_30P", + "IEC309", + "AH530P7W", + "AH532P6W", + } +} + +type PowerDrawKva string + +// Enum values for PowerDrawKva +const ( + PowerDrawKvaPower5Kva PowerDrawKva = "POWER_5_KVA" + PowerDrawKvaPower10Kva PowerDrawKva = "POWER_10_KVA" + PowerDrawKvaPower15Kva PowerDrawKva = "POWER_15_KVA" +) + +// Values returns all known values for PowerDrawKva. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (PowerDrawKva) Values() []PowerDrawKva { + return []PowerDrawKva{ + "POWER_5_KVA", + "POWER_10_KVA", + "POWER_15_KVA", + } +} + +type PowerFeedDrop string + +// Enum values for PowerFeedDrop +const ( + PowerFeedDropAboveRack PowerFeedDrop = "ABOVE_RACK" + PowerFeedDropBelowRack PowerFeedDrop = "BELOW_RACK" +) + +// Values returns all known values for PowerFeedDrop. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (PowerFeedDrop) Values() []PowerFeedDrop { + return []PowerFeedDrop{ + "ABOVE_RACK", + "BELOW_RACK", + } +} + +type PowerPhase string + +// Enum values for PowerPhase +const ( + PowerPhaseSinglePhase PowerPhase = "SINGLE_PHASE" + PowerPhaseThreePhase PowerPhase = "THREE_PHASE" +) + +// Values returns all known values for PowerPhase. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (PowerPhase) Values() []PowerPhase { + return []PowerPhase{ + "SINGLE_PHASE", + "THREE_PHASE", + } +} + type ResourceType string // Enum values for ResourceType const ( ResourceTypeOutpost ResourceType = "OUTPOST" + ResourceTypeOrder ResourceType = "ORDER" ) // Values returns all known values for ResourceType. Note that this can be expanded @@ -77,5 +348,80 @@ const ( func (ResourceType) Values() []ResourceType { return []ResourceType{ "OUTPOST", + "ORDER", + } +} + +type SupportedStorageEnum string + +// Enum values for SupportedStorageEnum +const ( + SupportedStorageEnumEbs SupportedStorageEnum = "EBS" + SupportedStorageEnumS3 SupportedStorageEnum = "S3" +) + +// Values returns all known values for SupportedStorageEnum. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (SupportedStorageEnum) Values() []SupportedStorageEnum { + return []SupportedStorageEnum{ + "EBS", + "S3", + } +} + +type UplinkCount string + +// Enum values for UplinkCount +const ( + UplinkCountUplinkCount1 UplinkCount = "UPLINK_COUNT_1" + UplinkCountUplinkCount2 UplinkCount = "UPLINK_COUNT_2" + UplinkCountUplinkCount3 UplinkCount = "UPLINK_COUNT_3" + UplinkCountUplinkCount4 UplinkCount = "UPLINK_COUNT_4" + UplinkCountUplinkCount5 UplinkCount = "UPLINK_COUNT_5" + UplinkCountUplinkCount6 UplinkCount = "UPLINK_COUNT_6" + UplinkCountUplinkCount7 UplinkCount = "UPLINK_COUNT_7" + UplinkCountUplinkCount8 UplinkCount = "UPLINK_COUNT_8" + UplinkCountUplinkCount12 UplinkCount = "UPLINK_COUNT_12" + UplinkCountUplinkCount16 UplinkCount = "UPLINK_COUNT_16" +) + +// Values returns all known values for UplinkCount. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (UplinkCount) Values() []UplinkCount { + return []UplinkCount{ + "UPLINK_COUNT_1", + "UPLINK_COUNT_2", + "UPLINK_COUNT_3", + "UPLINK_COUNT_4", + "UPLINK_COUNT_5", + "UPLINK_COUNT_6", + "UPLINK_COUNT_7", + "UPLINK_COUNT_8", + "UPLINK_COUNT_12", + "UPLINK_COUNT_16", + } +} + +type UplinkGbps string + +// Enum values for UplinkGbps +const ( + UplinkGbpsUplink1g UplinkGbps = "UPLINK_1G" + UplinkGbpsUplink10g UplinkGbps = "UPLINK_10G" + UplinkGbpsUplink40g UplinkGbps = "UPLINK_40G" + UplinkGbpsUplink100g UplinkGbps = "UPLINK_100G" +) + +// Values returns all known values for UplinkGbps. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (UplinkGbps) Values() []UplinkGbps { + return []UplinkGbps{ + "UPLINK_1G", + "UPLINK_10G", + "UPLINK_40G", + "UPLINK_100G", } } diff --git a/service/outposts/types/types.go b/service/outposts/types/types.go index c21f23272ca..091c2b58475 100644 --- a/service/outposts/types/types.go +++ b/service/outposts/types/types.go @@ -7,6 +7,97 @@ import ( "time" ) +// Information about an address. +type Address struct { + + // The first line of the address. + // + // This member is required. + AddressLine1 *string + + // The city for the address. + // + // This member is required. + City *string + + // The ISO-3166 two-letter country code for the address. + // + // This member is required. + CountryCode *string + + // The postal code for the address. + // + // This member is required. + PostalCode *string + + // The state for the address. + // + // This member is required. + StateOrRegion *string + + // The second line of the address. + AddressLine2 *string + + // The third line of the address. + AddressLine3 *string + + // The name of the contact. + ContactName *string + + // The phone number of the contact. + ContactPhoneNumber *string + + // The district or county for the address. + DistrictOrCounty *string + + // The municipality for the address. + Municipality *string + + noSmithyDocumentSerde +} + +// Information about a catalog item. +type CatalogItem struct { + + // The ID of the catalog item. + CatalogItemId *string + + // Information about the EC2 capacity of an item. + EC2Capacities []EC2Capacity + + // The status of a catalog item. + ItemStatus CatalogItemStatus + + // Information about the power draw of an item. + PowerKva *float32 + + // The supported storage options for the catalog item. + SupportedStorage []SupportedStorageEnum + + // The uplink speed this catalog item requires for the connection to the Region. + SupportedUplinkGbps []int32 + + // The weight of the item in pounds. + WeightLbs *int32 + + noSmithyDocumentSerde +} + +// Information about EC2 capacity. +type EC2Capacity struct { + + // The family of the EC2 capacity. + Family *string + + // The maximum size of the EC2 capacity. + MaxSize *string + + // The quantity of the EC2 capacity. + Quantity *string + + noSmithyDocumentSerde +} + // Information about an instance type. type InstanceTypeItem struct { @@ -29,7 +120,7 @@ type LineItem struct { Quantity int32 // The status of the line item. - Status *string + Status LineItemStatus noSmithyDocumentSerde } @@ -61,13 +152,73 @@ type Order struct { // The submission date for the order. OrderSubmissionDate *time.Time - // The ID of the Outpost. + // The ID of the Outpost in the order. OutpostId *string // The payment option for the order. PaymentOption PaymentOption - // The status of the order + // The status of the order. + // + // * PREPARING - Order is received and being prepared. + // + // * + // IN_PROGRESS - Order is either being built, shipped, or installed. To get more + // details, see the LineItem status. + // + // * COMPLETED - Order is complete. + // + // * CANCELLED + // - Order is cancelled. + // + // * ERROR - Customer should contact support. + // + // The following + // status are deprecated: RECEIVED, PENDING, PROCESSING, INSTALLING, and FULFILLED. + Status OrderStatus + + noSmithyDocumentSerde +} + +// A summary of line items in your order. +type OrderSummary struct { + + // The status of all line items in the order. + LineItemCountsByStatus map[string]int32 + + // Fulfilment date for the order. + OrderFulfilledDate *time.Time + + // The ID of the order. + OrderId *string + + // Submission date for the order. + OrderSubmissionDate *time.Time + + // The type of order. + OrderType OrderType + + // The ID of the Outpost. + OutpostId *string + + // The status of the order. + // + // * PREPARING - Order is received and is being + // prepared. + // + // * IN_PROGRESS - Order is either being built, shipped, or installed. + // For more information, see the LineItem status. + // + // * COMPLETED - Order is + // complete. + // + // * CANCELLED - Order is cancelled. + // + // * ERROR - Customer should contact + // support. + // + // The following statuses are deprecated: RECEIVED, PENDING, PROCESSING, + // INSTALLING, and FULFILLED. Status OrderStatus noSmithyDocumentSerde @@ -97,7 +248,7 @@ type Outpost struct { // The ID of the Outpost. OutpostId *string - // The AWS account ID of the Outpost owner. + // The Amazon Web Services account ID of the Outpost owner. OwnerId *string // The Amazon Resource Name (ARN) of the site. @@ -112,10 +263,53 @@ type Outpost struct { noSmithyDocumentSerde } +// Information about the physical and logistical details for racks at sites. For +// more information about hardware requirements for racks, see Network readiness +// checklist +// (https://docs.aws.amazon.com/outposts/latest/userguide/outposts-requirements.html#checklist) +// in the Amazon Web Services Outposts User Guide. +type RackPhysicalProperties struct { + + // The type of fiber used to attach the Outpost to the network. + FiberOpticCableType FiberOpticCableType + + // The maximum rack weight that this site can support. NO_LIMIT is over 2000 lbs + // (907 kg). + MaximumSupportedWeightLbs MaximumSupportedWeightLbs + + // The type of optical standard used to attach the Outpost to the network. This + // field is dependent on uplink speed, fiber type, and distance to the upstream + // device. For more information about networking requirements for racks, see + // Network + // (https://docs.aws.amazon.com/outposts/latest/userguide/outposts-requirements.html#facility-networking) + // in the Amazon Web Services Outposts User Guide. + OpticalStandard OpticalStandard + + // The power connector for the hardware. + PowerConnector PowerConnector + + // The power draw available at the hardware placement position for the rack. + PowerDrawKva PowerDrawKva + + // The position of the power feed. + PowerFeedDrop PowerFeedDrop + + // The power option that you can provide for hardware. + PowerPhase PowerPhase + + // The number of uplinks each Outpost network device. + UplinkCount UplinkCount + + // The uplink speed the rack supports for the connection to the Region. + UplinkGbps UplinkGbps + + noSmithyDocumentSerde +} + // Information about a site. type Site struct { - // The ID of the AWS account. + // The ID of the Amazon Web Services account. AccountId *string // The description of the site. @@ -124,6 +318,22 @@ type Site struct { // The name of the site. Name *string + // Notes about a site. + Notes *string + + // City where the hardware is installed and powered on. + OperatingAddressCity *string + + // The ISO-3166 two-letter country code where the hardware is installed and powered + // on. + OperatingAddressCountryCode *string + + // State or region where the hardware is installed and powered on. + OperatingAddressStateOrRegion *string + + // Information about the physical and logistical details for a rack at the site. + RackPhysicalProperties *RackPhysicalProperties + // The Amazon Resource Name (ARN) of the site. SiteArn *string diff --git a/service/outposts/validators.go b/service/outposts/validators.go index 8c11dd86fdd..4b7a302cf2c 100644 --- a/service/outposts/validators.go +++ b/service/outposts/validators.go @@ -5,10 +5,31 @@ package outposts import ( "context" "fmt" + "github.com/aws/aws-sdk-go-v2/service/outposts/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" ) +type validateOpCancelOrder struct { +} + +func (*validateOpCancelOrder) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCancelOrder) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CancelOrderInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCancelOrderInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateOrder struct { } @@ -49,6 +70,26 @@ func (m *validateOpCreateOutpost) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpCreateSite struct { +} + +func (*validateOpCreateSite) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateSite) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateSiteInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateSiteInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteOutpost struct { } @@ -89,6 +130,46 @@ func (m *validateOpDeleteSite) HandleInitialize(ctx context.Context, in middlewa return next.HandleInitialize(ctx, in) } +type validateOpGetCatalogItem struct { +} + +func (*validateOpGetCatalogItem) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetCatalogItem) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetCatalogItemInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetCatalogItemInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetOrder struct { +} + +func (*validateOpGetOrder) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetOrder) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetOrderInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetOrderInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetOutpost struct { } @@ -129,6 +210,46 @@ func (m *validateOpGetOutpostInstanceTypes) HandleInitialize(ctx context.Context return next.HandleInitialize(ctx, in) } +type validateOpGetSiteAddress struct { +} + +func (*validateOpGetSiteAddress) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetSiteAddress) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetSiteAddressInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetSiteAddressInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetSite struct { +} + +func (*validateOpGetSite) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetSite) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetSiteInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetSiteInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListTagsForResource struct { } @@ -189,6 +310,70 @@ func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpUpdateSiteAddress struct { +} + +func (*validateOpUpdateSiteAddress) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateSiteAddress) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateSiteAddressInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateSiteAddressInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateSite struct { +} + +func (*validateOpUpdateSite) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateSite) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateSiteInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateSiteInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateSiteRackPhysicalProperties struct { +} + +func (*validateOpUpdateSiteRackPhysicalProperties) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateSiteRackPhysicalProperties) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateSiteRackPhysicalPropertiesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateSiteRackPhysicalPropertiesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpCancelOrderValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCancelOrder{}, middleware.After) +} + func addOpCreateOrderValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateOrder{}, middleware.After) } @@ -197,6 +382,10 @@ func addOpCreateOutpostValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateOutpost{}, middleware.After) } +func addOpCreateSiteValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateSite{}, middleware.After) +} + func addOpDeleteOutpostValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteOutpost{}, middleware.After) } @@ -205,6 +394,14 @@ func addOpDeleteSiteValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteSite{}, middleware.After) } +func addOpGetCatalogItemValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetCatalogItem{}, middleware.After) +} + +func addOpGetOrderValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetOrder{}, middleware.After) +} + func addOpGetOutpostValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetOutpost{}, middleware.After) } @@ -213,6 +410,14 @@ func addOpGetOutpostInstanceTypesValidationMiddleware(stack *middleware.Stack) e return stack.Initialize.Add(&validateOpGetOutpostInstanceTypes{}, middleware.After) } +func addOpGetSiteAddressValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetSiteAddress{}, middleware.After) +} + +func addOpGetSiteValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetSite{}, middleware.After) +} + func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } @@ -225,6 +430,60 @@ func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) } +func addOpUpdateSiteAddressValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateSiteAddress{}, middleware.After) +} + +func addOpUpdateSiteValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateSite{}, middleware.After) +} + +func addOpUpdateSiteRackPhysicalPropertiesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateSiteRackPhysicalProperties{}, middleware.After) +} + +func validateAddress(v *types.Address) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Address"} + if v.AddressLine1 == nil { + invalidParams.Add(smithy.NewErrParamRequired("AddressLine1")) + } + if v.City == nil { + invalidParams.Add(smithy.NewErrParamRequired("City")) + } + if v.StateOrRegion == nil { + invalidParams.Add(smithy.NewErrParamRequired("StateOrRegion")) + } + if v.PostalCode == nil { + invalidParams.Add(smithy.NewErrParamRequired("PostalCode")) + } + if v.CountryCode == nil { + invalidParams.Add(smithy.NewErrParamRequired("CountryCode")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCancelOrderInput(v *CancelOrderInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CancelOrderInput"} + if v.OrderId == nil { + invalidParams.Add(smithy.NewErrParamRequired("OrderId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateOrderInput(v *CreateOrderInput) error { if v == nil { return nil @@ -264,6 +523,31 @@ func validateOpCreateOutpostInput(v *CreateOutpostInput) error { } } +func validateOpCreateSiteInput(v *CreateSiteInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateSiteInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.OperatingAddress != nil { + if err := validateAddress(v.OperatingAddress); err != nil { + invalidParams.AddNested("OperatingAddress", err.(smithy.InvalidParamsError)) + } + } + if v.ShippingAddress != nil { + if err := validateAddress(v.ShippingAddress); err != nil { + invalidParams.AddNested("ShippingAddress", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteOutpostInput(v *DeleteOutpostInput) error { if v == nil { return nil @@ -294,6 +578,36 @@ func validateOpDeleteSiteInput(v *DeleteSiteInput) error { } } +func validateOpGetCatalogItemInput(v *GetCatalogItemInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetCatalogItemInput"} + if v.CatalogItemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CatalogItemId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetOrderInput(v *GetOrderInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetOrderInput"} + if v.OrderId == nil { + invalidParams.Add(smithy.NewErrParamRequired("OrderId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetOutpostInput(v *GetOutpostInput) error { if v == nil { return nil @@ -324,6 +638,39 @@ func validateOpGetOutpostInstanceTypesInput(v *GetOutpostInstanceTypesInput) err } } +func validateOpGetSiteAddressInput(v *GetSiteAddressInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetSiteAddressInput"} + if v.SiteId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SiteId")) + } + if len(v.AddressType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("AddressType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetSiteInput(v *GetSiteInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetSiteInput"} + if v.SiteId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SiteId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { if v == nil { return nil @@ -374,3 +721,58 @@ func validateOpUntagResourceInput(v *UntagResourceInput) error { return nil } } + +func validateOpUpdateSiteAddressInput(v *UpdateSiteAddressInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateSiteAddressInput"} + if v.SiteId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SiteId")) + } + if len(v.AddressType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("AddressType")) + } + if v.Address == nil { + invalidParams.Add(smithy.NewErrParamRequired("Address")) + } else if v.Address != nil { + if err := validateAddress(v.Address); err != nil { + invalidParams.AddNested("Address", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateSiteInput(v *UpdateSiteInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateSiteInput"} + if v.SiteId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SiteId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateSiteRackPhysicalPropertiesInput(v *UpdateSiteRackPhysicalPropertiesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateSiteRackPhysicalPropertiesInput"} + if v.SiteId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SiteId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/personalize/api_op_CreateBatchSegmentJob.go b/service/personalize/api_op_CreateBatchSegmentJob.go new file mode 100644 index 00000000000..e89b4a72a9a --- /dev/null +++ b/service/personalize/api_op_CreateBatchSegmentJob.go @@ -0,0 +1,153 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package personalize + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/personalize/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a batch segment job. The operation can handle up to 50 million records +// and the input file must be in JSON format. For more information, see +// recommendations-batch. +func (c *Client) CreateBatchSegmentJob(ctx context.Context, params *CreateBatchSegmentJobInput, optFns ...func(*Options)) (*CreateBatchSegmentJobOutput, error) { + if params == nil { + params = &CreateBatchSegmentJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateBatchSegmentJob", params, optFns, c.addOperationCreateBatchSegmentJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateBatchSegmentJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateBatchSegmentJobInput struct { + + // The Amazon S3 path for the input data used to generate the batch segment job. + // + // This member is required. + JobInput *types.BatchSegmentJobInput + + // The name of the batch segment job to create. + // + // This member is required. + JobName *string + + // The Amazon S3 path for the bucket where the job's output will be stored. + // + // This member is required. + JobOutput *types.BatchSegmentJobOutput + + // The ARN of the Amazon Identity and Access Management role that has permissions + // to read and write to your input and output Amazon S3 buckets respectively. + // + // This member is required. + RoleArn *string + + // The Amazon Resource Name (ARN) of the solution version you want the batch + // segment job to use to generate batch segments. + // + // This member is required. + SolutionVersionArn *string + + // The ARN of the filter to apply to the batch segment job. For more information on + // using filters, see filter-batch. + FilterArn *string + + // The number of predicted users generated by the batch segment job for each line + // of input data. + NumResults *int32 + + noSmithyDocumentSerde +} + +type CreateBatchSegmentJobOutput struct { + + // The ARN of the batch segment job. + BatchSegmentJobArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateBatchSegmentJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateBatchSegmentJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateBatchSegmentJob{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateBatchSegmentJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateBatchSegmentJob(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateBatchSegmentJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "personalize", + OperationName: "CreateBatchSegmentJob", + } +} diff --git a/service/personalize/api_op_CreateCampaign.go b/service/personalize/api_op_CreateCampaign.go index 3275ecc976f..8d95481e405 100644 --- a/service/personalize/api_op_CreateCampaign.go +++ b/service/personalize/api_op_CreateCampaign.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates a campaign by deploying a solution version. When a client calls the +// Creates a campaign that deploys a solution version. When a client calls the // GetRecommendations // (https://docs.aws.amazon.com/personalize/latest/dg/API_RS_GetRecommendations.html) // and GetPersonalizedRanking diff --git a/service/personalize/api_op_CreateDatasetGroup.go b/service/personalize/api_op_CreateDatasetGroup.go index b48fd63f62d..100c8a89532 100644 --- a/service/personalize/api_op_CreateDatasetGroup.go +++ b/service/personalize/api_op_CreateDatasetGroup.go @@ -6,13 +6,14 @@ import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/personalize/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates an empty dataset group. A dataset group contains related datasets that -// supply data for training a model. A dataset group can contain at most three -// datasets, one for each type of dataset: +// Creates an empty dataset group. A dataset group is a container for Amazon +// Personalize resources. A dataset group can contain at most three datasets, one +// for each type of dataset: // // * Interactions // @@ -20,38 +21,42 @@ import ( // // * Users // -// To -// train a model (create a solution), a dataset group that contains an Interactions -// dataset is required. Call CreateDataset to add a dataset to the group. A dataset -// group can be in one of the following states: +// A dataset group can +// be a Domain dataset group, where you specify a domain and use pre-configured +// resources like recommenders, or a Custom dataset group, where you use custom +// resources, such as a solution with a solution version, that you deploy with a +// campaign. If you start with a Domain dataset group, you can still add custom +// resources such as solutions and solution versions trained with recipes for +// custom use cases and deployed with campaigns. A dataset group can be in one of +// the following states: // -// * CREATE PENDING > CREATE -// IN_PROGRESS > ACTIVE -or- CREATE FAILED +// * CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- +// CREATE FAILED // // * DELETE PENDING // -// To get the status of -// the dataset group, call DescribeDatasetGroup. If the status shows as CREATE -// FAILED, the response includes a failureReason key, which describes why the -// creation failed. You must wait until the status of the dataset group is ACTIVE -// before adding a dataset to the group. You can specify an Key Management Service -// (KMS) key to encrypt the datasets in the group. If you specify a KMS key, you -// must also include an Identity and Access Management (IAM) role that has -// permission to access the key. APIs that require a dataset group ARN in the -// request +// To get the status of the dataset group, call +// DescribeDatasetGroup. If the status shows as CREATE FAILED, the response +// includes a failureReason key, which describes why the creation failed. You must +// wait until the status of the dataset group is ACTIVE before adding a dataset to +// the group. You can specify an Key Management Service (KMS) key to encrypt the +// datasets in the group. If you specify a KMS key, you must also include an +// Identity and Access Management (IAM) role that has permission to access the key. +// APIs that require a dataset group ARN in the request // // * CreateDataset // -// * CreateEventTracker +// * +// CreateEventTracker // // * CreateSolution // -// Related -// APIs +// Related APIs // // * ListDatasetGroups // -// * DescribeDatasetGroup +// * +// DescribeDatasetGroup // // * DeleteDatasetGroup func (c *Client) CreateDatasetGroup(ctx context.Context, params *CreateDatasetGroupInput, optFns ...func(*Options)) (*CreateDatasetGroupOutput, error) { @@ -76,6 +81,13 @@ type CreateDatasetGroupInput struct { // This member is required. Name *string + // The domain of the dataset group. Specify a domain to create a Domain dataset + // group. The domain you specify determines the default schemas for datasets and + // the use cases available for recommenders. If you don't specify a domain, you + // create a Custom dataset group with solution versions that you deploy with a + // campaign. + Domain types.Domain + // The Amazon Resource Name (ARN) of a Key Management Service (KMS) key used to // encrypt the datasets. KmsKeyArn *string @@ -93,6 +105,9 @@ type CreateDatasetGroupOutput struct { // The Amazon Resource Name (ARN) of the new dataset group. DatasetGroupArn *string + // The domain for the new Domain dataset group. + Domain types.Domain + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/personalize/api_op_CreateRecommender.go b/service/personalize/api_op_CreateRecommender.go new file mode 100644 index 00000000000..e3cb06861d5 --- /dev/null +++ b/service/personalize/api_op_CreateRecommender.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package personalize + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/personalize/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a recommender with the recipe (a Domain dataset group use case) you +// specify. You create recommenders for a Domain dataset group and specify the +// recommender's Amazon Resource Name (ARN) when you make a GetRecommendations +// (https://docs.aws.amazon.com/personalize/latest/dg/API_RS_GetRecommendations.html) +// request. Status A recommender can be in one of the following states: +// +// * CREATE +// PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED +// +// * DELETE PENDING > +// DELETE IN_PROGRESS +// +// To get the recommender status, call DescribeRecommender. +// Wait until the status of the recommender is ACTIVE before asking the recommender +// for recommendations. Related APIs +// +// * ListRecommenders +// +// * DescribeRecommender +// +// * +// UpdateRecommender +// +// * DeleteRecommender +func (c *Client) CreateRecommender(ctx context.Context, params *CreateRecommenderInput, optFns ...func(*Options)) (*CreateRecommenderOutput, error) { + if params == nil { + params = &CreateRecommenderInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateRecommender", params, optFns, c.addOperationCreateRecommenderMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateRecommenderOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateRecommenderInput struct { + + // The Amazon Resource Name (ARN) of the destination domain dataset group for the + // recommender. + // + // This member is required. + DatasetGroupArn *string + + // The name of the recommender. + // + // This member is required. + Name *string + + // The Amazon Resource Name (ARN) of the recipe that the recommender will use. For + // a recommender, a recipe is a Domain dataset group use case. Only Domain dataset + // group use cases can be used to create a recommender. For information about use + // cases see Choosing recommender use cases + // (https://docs.aws.amazon.com/personalize/latest/dg/domain-use-cases.html). + // + // This member is required. + RecipeArn *string + + // The configuration details of the recommender. + RecommenderConfig *types.RecommenderConfig + + noSmithyDocumentSerde +} + +type CreateRecommenderOutput struct { + + // The Amazon Resource Name (ARN) of the recommender. + RecommenderArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateRecommenderMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateRecommender{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateRecommender{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateRecommenderValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateRecommender(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateRecommender(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "personalize", + OperationName: "CreateRecommender", + } +} diff --git a/service/personalize/api_op_CreateSchema.go b/service/personalize/api_op_CreateSchema.go index 80324cc84ea..5ac89ef4763 100644 --- a/service/personalize/api_op_CreateSchema.go +++ b/service/personalize/api_op_CreateSchema.go @@ -6,6 +6,7 @@ import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/personalize/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -13,12 +14,14 @@ import ( // Creates an Amazon Personalize schema from the specified schema string. The // schema you create must be in Avro JSON format. Amazon Personalize recognizes // three schema variants. Each schema is associated with a dataset type and has a -// set of required field and keywords. You specify a schema when you call -// CreateDataset. Related APIs +// set of required field and keywords. If you are creating a schema for a dataset +// in a Domain dataset group, you provide the domain of the Domain dataset group. +// You specify a schema when you call CreateDataset. Related APIs // // * ListSchemas // -// * DescribeSchema +// * +// DescribeSchema // // * DeleteSchema func (c *Client) CreateSchema(ctx context.Context, params *CreateSchemaInput, optFns ...func(*Options)) (*CreateSchemaOutput, error) { @@ -48,6 +51,11 @@ type CreateSchemaInput struct { // This member is required. Schema *string + // The domain for the schema. If you are creating a schema for a dataset in a + // Domain dataset group, specify the domain you chose when you created the Domain + // dataset group. + Domain types.Domain + noSmithyDocumentSerde } diff --git a/service/personalize/api_op_CreateSolutionVersion.go b/service/personalize/api_op_CreateSolutionVersion.go index 348166ccdb9..5da9dcc73ab 100644 --- a/service/personalize/api_op_CreateSolutionVersion.go +++ b/service/personalize/api_op_CreateSolutionVersion.go @@ -11,11 +11,11 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Trains or retrains an active solution. A solution is created using the -// CreateSolution operation and must be in the ACTIVE state before calling -// CreateSolutionVersion. A new version of the solution is created every time you -// call this operation. Status A solution version can be in one of the following -// states: +// Trains or retrains an active solution in a Custom dataset group. A solution is +// created using the CreateSolution operation and must be in the ACTIVE state +// before calling CreateSolutionVersion. A new version of the solution is created +// every time you call this operation. Status A solution version can be in one of +// the following states: // // * CREATE PENDING // @@ -23,27 +23,27 @@ import ( // // * ACTIVE // -// * CREATE FAILED -// // * -// CREATE STOPPING +// CREATE FAILED +// +// * CREATE STOPPING // // * CREATE STOPPED // -// To get the status of the version, call -// DescribeSolutionVersion. Wait until the status shows as ACTIVE before calling -// CreateCampaign. If the status shows as CREATE FAILED, the response includes a -// failureReason key, which describes why the job failed. Related APIs +// To get the status of the +// version, call DescribeSolutionVersion. Wait until the status shows as ACTIVE +// before calling CreateCampaign. If the status shows as CREATE FAILED, the +// response includes a failureReason key, which describes why the job failed. +// Related APIs // -// * -// ListSolutionVersions +// * ListSolutionVersions // // * DescribeSolutionVersion // -// * ListSolutions -// // * -// CreateSolution +// ListSolutions +// +// * CreateSolution // // * DescribeSolution // diff --git a/service/personalize/api_op_DeleteRecommender.go b/service/personalize/api_op_DeleteRecommender.go new file mode 100644 index 00000000000..7ee13df8eff --- /dev/null +++ b/service/personalize/api_op_DeleteRecommender.go @@ -0,0 +1,119 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package personalize + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deactivates and removes a recommender. A deleted recommender can no longer be +// specified in a GetRecommendations +// (https://docs.aws.amazon.com/personalize/latest/dg/API_RS_GetRecommendations.html) +// request. +func (c *Client) DeleteRecommender(ctx context.Context, params *DeleteRecommenderInput, optFns ...func(*Options)) (*DeleteRecommenderOutput, error) { + if params == nil { + params = &DeleteRecommenderInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteRecommender", params, optFns, c.addOperationDeleteRecommenderMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteRecommenderOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteRecommenderInput struct { + + // The Amazon Resource Name (ARN) of the recommender to delete. + // + // This member is required. + RecommenderArn *string + + noSmithyDocumentSerde +} + +type DeleteRecommenderOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteRecommenderMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteRecommender{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteRecommender{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteRecommenderValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRecommender(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteRecommender(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "personalize", + OperationName: "DeleteRecommender", + } +} diff --git a/service/personalize/api_op_DescribeBatchSegmentJob.go b/service/personalize/api_op_DescribeBatchSegmentJob.go new file mode 100644 index 00000000000..d1eec83138c --- /dev/null +++ b/service/personalize/api_op_DescribeBatchSegmentJob.go @@ -0,0 +1,123 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package personalize + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/personalize/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets the properties of a batch segment job including name, Amazon Resource Name +// (ARN), status, input and output configurations, and the ARN of the solution +// version used to generate segments. +func (c *Client) DescribeBatchSegmentJob(ctx context.Context, params *DescribeBatchSegmentJobInput, optFns ...func(*Options)) (*DescribeBatchSegmentJobOutput, error) { + if params == nil { + params = &DescribeBatchSegmentJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeBatchSegmentJob", params, optFns, c.addOperationDescribeBatchSegmentJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeBatchSegmentJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeBatchSegmentJobInput struct { + + // The ARN of the batch segment job to describe. + // + // This member is required. + BatchSegmentJobArn *string + + noSmithyDocumentSerde +} + +type DescribeBatchSegmentJobOutput struct { + + // Information on the specified batch segment job. + BatchSegmentJob *types.BatchSegmentJob + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeBatchSegmentJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeBatchSegmentJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeBatchSegmentJob{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDescribeBatchSegmentJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeBatchSegmentJob(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeBatchSegmentJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "personalize", + OperationName: "DescribeBatchSegmentJob", + } +} diff --git a/service/personalize/api_op_DescribeRecommender.go b/service/personalize/api_op_DescribeRecommender.go new file mode 100644 index 00000000000..032bab080bf --- /dev/null +++ b/service/personalize/api_op_DescribeRecommender.go @@ -0,0 +1,132 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package personalize + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/personalize/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Describes the given recommender, including its status. A recommender can be in +// one of the following states: +// +// * CREATE PENDING > CREATE IN_PROGRESS > ACTIVE +// -or- CREATE FAILED +// +// * DELETE PENDING > DELETE IN_PROGRESS +// +// When the status is +// CREATE FAILED, the response includes the failureReason key, which describes why. +// For more information on recommenders, see CreateRecommender +// (https://docs.aws.amazon.com/personalize/latest/dg/API_CreateRecommender.html). +func (c *Client) DescribeRecommender(ctx context.Context, params *DescribeRecommenderInput, optFns ...func(*Options)) (*DescribeRecommenderOutput, error) { + if params == nil { + params = &DescribeRecommenderInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeRecommender", params, optFns, c.addOperationDescribeRecommenderMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeRecommenderOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeRecommenderInput struct { + + // The Amazon Resource Name (ARN) of the recommender to describe. + // + // This member is required. + RecommenderArn *string + + noSmithyDocumentSerde +} + +type DescribeRecommenderOutput struct { + + // The properties of the recommender. + Recommender *types.Recommender + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeRecommenderMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeRecommender{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeRecommender{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDescribeRecommenderValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeRecommender(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeRecommender(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "personalize", + OperationName: "DescribeRecommender", + } +} diff --git a/service/personalize/api_op_ListBatchSegmentJobs.go b/service/personalize/api_op_ListBatchSegmentJobs.go new file mode 100644 index 00000000000..58cf104d8d0 --- /dev/null +++ b/service/personalize/api_op_ListBatchSegmentJobs.go @@ -0,0 +1,218 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package personalize + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/personalize/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a list of the batch segment jobs that have been performed off of a solution +// version that you specify. +func (c *Client) ListBatchSegmentJobs(ctx context.Context, params *ListBatchSegmentJobsInput, optFns ...func(*Options)) (*ListBatchSegmentJobsOutput, error) { + if params == nil { + params = &ListBatchSegmentJobsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListBatchSegmentJobs", params, optFns, c.addOperationListBatchSegmentJobsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListBatchSegmentJobsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListBatchSegmentJobsInput struct { + + // The maximum number of batch segment job results to return in each page. The + // default value is 100. + MaxResults *int32 + + // The token to request the next page of results. + NextToken *string + + // The Amazon Resource Name (ARN) of the solution version that the batch segment + // jobs used to generate batch segments. + SolutionVersionArn *string + + noSmithyDocumentSerde +} + +type ListBatchSegmentJobsOutput struct { + + // A list containing information on each job that is returned. + BatchSegmentJobs []types.BatchSegmentJobSummary + + // The token to use to retrieve the next page of results. The value is null when + // there are no more results to return. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListBatchSegmentJobsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListBatchSegmentJobs{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListBatchSegmentJobs{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBatchSegmentJobs(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListBatchSegmentJobsAPIClient is a client that implements the +// ListBatchSegmentJobs operation. +type ListBatchSegmentJobsAPIClient interface { + ListBatchSegmentJobs(context.Context, *ListBatchSegmentJobsInput, ...func(*Options)) (*ListBatchSegmentJobsOutput, error) +} + +var _ ListBatchSegmentJobsAPIClient = (*Client)(nil) + +// ListBatchSegmentJobsPaginatorOptions is the paginator options for +// ListBatchSegmentJobs +type ListBatchSegmentJobsPaginatorOptions struct { + // The maximum number of batch segment job results to return in each page. The + // default value is 100. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListBatchSegmentJobsPaginator is a paginator for ListBatchSegmentJobs +type ListBatchSegmentJobsPaginator struct { + options ListBatchSegmentJobsPaginatorOptions + client ListBatchSegmentJobsAPIClient + params *ListBatchSegmentJobsInput + nextToken *string + firstPage bool +} + +// NewListBatchSegmentJobsPaginator returns a new ListBatchSegmentJobsPaginator +func NewListBatchSegmentJobsPaginator(client ListBatchSegmentJobsAPIClient, params *ListBatchSegmentJobsInput, optFns ...func(*ListBatchSegmentJobsPaginatorOptions)) *ListBatchSegmentJobsPaginator { + if params == nil { + params = &ListBatchSegmentJobsInput{} + } + + options := ListBatchSegmentJobsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListBatchSegmentJobsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListBatchSegmentJobsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListBatchSegmentJobs page. +func (p *ListBatchSegmentJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListBatchSegmentJobsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListBatchSegmentJobs(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListBatchSegmentJobs(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "personalize", + OperationName: "ListBatchSegmentJobs", + } +} diff --git a/service/personalize/api_op_ListRecipes.go b/service/personalize/api_op_ListRecipes.go index 3d8652c9da2..fd998eab40e 100644 --- a/service/personalize/api_op_ListRecipes.go +++ b/service/personalize/api_op_ListRecipes.go @@ -31,6 +31,11 @@ func (c *Client) ListRecipes(ctx context.Context, params *ListRecipesInput, optF type ListRecipesInput struct { + // Filters returned recipes by domain for a Domain dataset group. Only recipes + // (Domain dataset group use cases) for this domain are included in the response. + // If you don't specify a domain, only non-domain recipes are returned. + Domain types.Domain + // The maximum number of recipes to return. MaxResults *int32 diff --git a/service/personalize/api_op_ListRecommenders.go b/service/personalize/api_op_ListRecommenders.go new file mode 100644 index 00000000000..567bc174c66 --- /dev/null +++ b/service/personalize/api_op_ListRecommenders.go @@ -0,0 +1,220 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package personalize + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/personalize/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of recommenders in a given Domain dataset group. When a Domain +// dataset group is not specified, all the recommenders associated with the account +// are listed. The response provides the properties for each recommender, including +// the Amazon Resource Name (ARN). For more information on recommenders, see +// CreateRecommender +// (https://docs.aws.amazon.com/personalize/latest/dg/API_CreateRecommender.html). +func (c *Client) ListRecommenders(ctx context.Context, params *ListRecommendersInput, optFns ...func(*Options)) (*ListRecommendersOutput, error) { + if params == nil { + params = &ListRecommendersInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListRecommenders", params, optFns, c.addOperationListRecommendersMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListRecommendersOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListRecommendersInput struct { + + // The Amazon Resource Name (ARN) of the Domain dataset group to list the + // recommenders for. When a Domain dataset group is not specified, all the + // recommenders associated with the account are listed. + DatasetGroupArn *string + + // The maximum number of recommenders to return. + MaxResults *int32 + + // A token returned from the previous call to ListRecommenders for getting the next + // set of recommenders (if they exist). + NextToken *string + + noSmithyDocumentSerde +} + +type ListRecommendersOutput struct { + + // A token for getting the next set of recommenders (if they exist). + NextToken *string + + // A list of the recommenders. + Recommenders []types.RecommenderSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListRecommendersMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListRecommenders{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListRecommenders{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRecommenders(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListRecommendersAPIClient is a client that implements the ListRecommenders +// operation. +type ListRecommendersAPIClient interface { + ListRecommenders(context.Context, *ListRecommendersInput, ...func(*Options)) (*ListRecommendersOutput, error) +} + +var _ ListRecommendersAPIClient = (*Client)(nil) + +// ListRecommendersPaginatorOptions is the paginator options for ListRecommenders +type ListRecommendersPaginatorOptions struct { + // The maximum number of recommenders to return. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListRecommendersPaginator is a paginator for ListRecommenders +type ListRecommendersPaginator struct { + options ListRecommendersPaginatorOptions + client ListRecommendersAPIClient + params *ListRecommendersInput + nextToken *string + firstPage bool +} + +// NewListRecommendersPaginator returns a new ListRecommendersPaginator +func NewListRecommendersPaginator(client ListRecommendersAPIClient, params *ListRecommendersInput, optFns ...func(*ListRecommendersPaginatorOptions)) *ListRecommendersPaginator { + if params == nil { + params = &ListRecommendersInput{} + } + + options := ListRecommendersPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListRecommendersPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListRecommendersPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListRecommenders page. +func (p *ListRecommendersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListRecommendersOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListRecommenders(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListRecommenders(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "personalize", + OperationName: "ListRecommenders", + } +} diff --git a/service/personalize/api_op_UpdateRecommender.go b/service/personalize/api_op_UpdateRecommender.go new file mode 100644 index 00000000000..ae3fd6d4b1e --- /dev/null +++ b/service/personalize/api_op_UpdateRecommender.go @@ -0,0 +1,126 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package personalize + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/personalize/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the recommender to modify the recommender configuration. +func (c *Client) UpdateRecommender(ctx context.Context, params *UpdateRecommenderInput, optFns ...func(*Options)) (*UpdateRecommenderOutput, error) { + if params == nil { + params = &UpdateRecommenderInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateRecommender", params, optFns, c.addOperationUpdateRecommenderMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateRecommenderOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateRecommenderInput struct { + + // The Amazon Resource Name (ARN) of the recommender to modify. + // + // This member is required. + RecommenderArn *string + + // The configuration details of the recommender. + // + // This member is required. + RecommenderConfig *types.RecommenderConfig + + noSmithyDocumentSerde +} + +type UpdateRecommenderOutput struct { + + // The same recommender Amazon Resource Name (ARN) as given in the request. + RecommenderArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateRecommenderMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateRecommender{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateRecommender{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateRecommenderValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRecommender(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateRecommender(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "personalize", + OperationName: "UpdateRecommender", + } +} diff --git a/service/personalize/deserializers.go b/service/personalize/deserializers.go index 3f7c5c90efa..edf6272ea41 100644 --- a/service/personalize/deserializers.go +++ b/service/personalize/deserializers.go @@ -144,6 +144,129 @@ func awsAwsjson11_deserializeOpErrorCreateBatchInferenceJob(response *smithyhttp } } +type awsAwsjson11_deserializeOpCreateBatchSegmentJob struct { +} + +func (*awsAwsjson11_deserializeOpCreateBatchSegmentJob) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateBatchSegmentJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCreateBatchSegmentJob(response, &metadata) + } + output := &CreateBatchSegmentJobOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCreateBatchSegmentJobOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCreateBatchSegmentJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceAlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response, errorBody) + + case strings.EqualFold("ResourceInUseException", errorCode): + return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpCreateCampaign struct { } @@ -996,6 +1119,126 @@ func awsAwsjson11_deserializeOpErrorCreateFilter(response *smithyhttp.Response, } } +type awsAwsjson11_deserializeOpCreateRecommender struct { +} + +func (*awsAwsjson11_deserializeOpCreateRecommender) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateRecommender) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCreateRecommender(response, &metadata) + } + output := &CreateRecommenderOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCreateRecommenderOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCreateRecommender(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceAlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpCreateSchema struct { } @@ -1831,14 +2074,14 @@ func awsAwsjson11_deserializeOpErrorDeleteFilter(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpDeleteSchema struct { +type awsAwsjson11_deserializeOpDeleteRecommender struct { } -func (*awsAwsjson11_deserializeOpDeleteSchema) ID() string { +func (*awsAwsjson11_deserializeOpDeleteRecommender) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteSchema) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteRecommender) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1852,9 +2095,9 @@ func (m *awsAwsjson11_deserializeOpDeleteSchema) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteSchema(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteRecommender(response, &metadata) } - output := &DeleteSchemaOutput{} + output := &DeleteRecommenderOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -1866,7 +2109,7 @@ func (m *awsAwsjson11_deserializeOpDeleteSchema) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteSchema(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteRecommender(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1926,14 +2169,14 @@ func awsAwsjson11_deserializeOpErrorDeleteSchema(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpDeleteSolution struct { +type awsAwsjson11_deserializeOpDeleteSchema struct { } -func (*awsAwsjson11_deserializeOpDeleteSolution) ID() string { +func (*awsAwsjson11_deserializeOpDeleteSchema) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteSolution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteSchema) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1947,9 +2190,9 @@ func (m *awsAwsjson11_deserializeOpDeleteSolution) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteSolution(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteSchema(response, &metadata) } - output := &DeleteSolutionOutput{} + output := &DeleteSchemaOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -1961,7 +2204,7 @@ func (m *awsAwsjson11_deserializeOpDeleteSolution) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteSolution(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteSchema(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2021,14 +2264,14 @@ func awsAwsjson11_deserializeOpErrorDeleteSolution(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpDescribeAlgorithm struct { +type awsAwsjson11_deserializeOpDeleteSolution struct { } -func (*awsAwsjson11_deserializeOpDescribeAlgorithm) ID() string { +func (*awsAwsjson11_deserializeOpDeleteSolution) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeAlgorithm) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteSolution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2042,43 +2285,21 @@ func (m *awsAwsjson11_deserializeOpDescribeAlgorithm) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeAlgorithm(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteSolution(response, &metadata) } - output := &DescribeAlgorithmOutput{} + output := &DeleteSolutionOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentDescribeAlgorithmOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), } - return out, metadata, err } return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeAlgorithm(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteSolution(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2122,6 +2343,9 @@ func awsAwsjson11_deserializeOpErrorDescribeAlgorithm(response *smithyhttp.Respo case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + case strings.EqualFold("ResourceInUseException", errorCode): + return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) @@ -2135,14 +2359,14 @@ func awsAwsjson11_deserializeOpErrorDescribeAlgorithm(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpDescribeBatchInferenceJob struct { +type awsAwsjson11_deserializeOpDescribeAlgorithm struct { } -func (*awsAwsjson11_deserializeOpDescribeBatchInferenceJob) ID() string { +func (*awsAwsjson11_deserializeOpDescribeAlgorithm) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeBatchInferenceJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeAlgorithm) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2156,9 +2380,9 @@ func (m *awsAwsjson11_deserializeOpDescribeBatchInferenceJob) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeBatchInferenceJob(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeAlgorithm(response, &metadata) } - output := &DescribeBatchInferenceJobOutput{} + output := &DescribeAlgorithmOutput{} out.Result = output var buff [1024]byte @@ -2178,7 +2402,7 @@ func (m *awsAwsjson11_deserializeOpDescribeBatchInferenceJob) HandleDeserialize( return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeBatchInferenceJobOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeAlgorithmOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2192,7 +2416,7 @@ func (m *awsAwsjson11_deserializeOpDescribeBatchInferenceJob) HandleDeserialize( return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeBatchInferenceJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeAlgorithm(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2249,14 +2473,14 @@ func awsAwsjson11_deserializeOpErrorDescribeBatchInferenceJob(response *smithyht } } -type awsAwsjson11_deserializeOpDescribeCampaign struct { +type awsAwsjson11_deserializeOpDescribeBatchInferenceJob struct { } -func (*awsAwsjson11_deserializeOpDescribeCampaign) ID() string { +func (*awsAwsjson11_deserializeOpDescribeBatchInferenceJob) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeCampaign) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeBatchInferenceJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2270,9 +2494,9 @@ func (m *awsAwsjson11_deserializeOpDescribeCampaign) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeCampaign(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeBatchInferenceJob(response, &metadata) } - output := &DescribeCampaignOutput{} + output := &DescribeBatchInferenceJobOutput{} out.Result = output var buff [1024]byte @@ -2292,7 +2516,7 @@ func (m *awsAwsjson11_deserializeOpDescribeCampaign) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeCampaignOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeBatchInferenceJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2306,7 +2530,7 @@ func (m *awsAwsjson11_deserializeOpDescribeCampaign) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeCampaign(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeBatchInferenceJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2363,14 +2587,14 @@ func awsAwsjson11_deserializeOpErrorDescribeCampaign(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpDescribeDataset struct { +type awsAwsjson11_deserializeOpDescribeBatchSegmentJob struct { } -func (*awsAwsjson11_deserializeOpDescribeDataset) ID() string { +func (*awsAwsjson11_deserializeOpDescribeBatchSegmentJob) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeDataset) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeBatchSegmentJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2384,9 +2608,9 @@ func (m *awsAwsjson11_deserializeOpDescribeDataset) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeDataset(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeBatchSegmentJob(response, &metadata) } - output := &DescribeDatasetOutput{} + output := &DescribeBatchSegmentJobOutput{} out.Result = output var buff [1024]byte @@ -2406,7 +2630,7 @@ func (m *awsAwsjson11_deserializeOpDescribeDataset) HandleDeserialize(ctx contex return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeDatasetOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeBatchSegmentJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2420,7 +2644,7 @@ func (m *awsAwsjson11_deserializeOpDescribeDataset) HandleDeserialize(ctx contex return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeDataset(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeBatchSegmentJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2477,14 +2701,14 @@ func awsAwsjson11_deserializeOpErrorDescribeDataset(response *smithyhttp.Respons } } -type awsAwsjson11_deserializeOpDescribeDatasetExportJob struct { +type awsAwsjson11_deserializeOpDescribeCampaign struct { } -func (*awsAwsjson11_deserializeOpDescribeDatasetExportJob) ID() string { +func (*awsAwsjson11_deserializeOpDescribeCampaign) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeDatasetExportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeCampaign) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2498,9 +2722,9 @@ func (m *awsAwsjson11_deserializeOpDescribeDatasetExportJob) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeDatasetExportJob(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeCampaign(response, &metadata) } - output := &DescribeDatasetExportJobOutput{} + output := &DescribeCampaignOutput{} out.Result = output var buff [1024]byte @@ -2520,7 +2744,7 @@ func (m *awsAwsjson11_deserializeOpDescribeDatasetExportJob) HandleDeserialize(c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeDatasetExportJobOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeCampaignOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2534,7 +2758,7 @@ func (m *awsAwsjson11_deserializeOpDescribeDatasetExportJob) HandleDeserialize(c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeDatasetExportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeCampaign(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2591,14 +2815,14 @@ func awsAwsjson11_deserializeOpErrorDescribeDatasetExportJob(response *smithyhtt } } -type awsAwsjson11_deserializeOpDescribeDatasetGroup struct { +type awsAwsjson11_deserializeOpDescribeDataset struct { } -func (*awsAwsjson11_deserializeOpDescribeDatasetGroup) ID() string { +func (*awsAwsjson11_deserializeOpDescribeDataset) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeDatasetGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeDataset) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2612,9 +2836,9 @@ func (m *awsAwsjson11_deserializeOpDescribeDatasetGroup) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeDatasetGroup(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeDataset(response, &metadata) } - output := &DescribeDatasetGroupOutput{} + output := &DescribeDatasetOutput{} out.Result = output var buff [1024]byte @@ -2634,7 +2858,7 @@ func (m *awsAwsjson11_deserializeOpDescribeDatasetGroup) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeDatasetGroupOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeDatasetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2648,7 +2872,7 @@ func (m *awsAwsjson11_deserializeOpDescribeDatasetGroup) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeDatasetGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeDataset(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2705,14 +2929,14 @@ func awsAwsjson11_deserializeOpErrorDescribeDatasetGroup(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpDescribeDatasetImportJob struct { +type awsAwsjson11_deserializeOpDescribeDatasetExportJob struct { } -func (*awsAwsjson11_deserializeOpDescribeDatasetImportJob) ID() string { +func (*awsAwsjson11_deserializeOpDescribeDatasetExportJob) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeDatasetImportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeDatasetExportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2726,9 +2950,9 @@ func (m *awsAwsjson11_deserializeOpDescribeDatasetImportJob) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeDatasetImportJob(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeDatasetExportJob(response, &metadata) } - output := &DescribeDatasetImportJobOutput{} + output := &DescribeDatasetExportJobOutput{} out.Result = output var buff [1024]byte @@ -2748,7 +2972,7 @@ func (m *awsAwsjson11_deserializeOpDescribeDatasetImportJob) HandleDeserialize(c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeDatasetImportJobOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeDatasetExportJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2762,7 +2986,7 @@ func (m *awsAwsjson11_deserializeOpDescribeDatasetImportJob) HandleDeserialize(c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeDatasetImportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeDatasetExportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2819,14 +3043,14 @@ func awsAwsjson11_deserializeOpErrorDescribeDatasetImportJob(response *smithyhtt } } -type awsAwsjson11_deserializeOpDescribeEventTracker struct { +type awsAwsjson11_deserializeOpDescribeDatasetGroup struct { } -func (*awsAwsjson11_deserializeOpDescribeEventTracker) ID() string { +func (*awsAwsjson11_deserializeOpDescribeDatasetGroup) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeEventTracker) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeDatasetGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2840,9 +3064,9 @@ func (m *awsAwsjson11_deserializeOpDescribeEventTracker) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeEventTracker(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeDatasetGroup(response, &metadata) } - output := &DescribeEventTrackerOutput{} + output := &DescribeDatasetGroupOutput{} out.Result = output var buff [1024]byte @@ -2862,7 +3086,7 @@ func (m *awsAwsjson11_deserializeOpDescribeEventTracker) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeEventTrackerOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeDatasetGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2876,7 +3100,7 @@ func (m *awsAwsjson11_deserializeOpDescribeEventTracker) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeEventTracker(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeDatasetGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2933,14 +3157,14 @@ func awsAwsjson11_deserializeOpErrorDescribeEventTracker(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpDescribeFeatureTransformation struct { +type awsAwsjson11_deserializeOpDescribeDatasetImportJob struct { } -func (*awsAwsjson11_deserializeOpDescribeFeatureTransformation) ID() string { +func (*awsAwsjson11_deserializeOpDescribeDatasetImportJob) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeFeatureTransformation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeDatasetImportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2954,9 +3178,9 @@ func (m *awsAwsjson11_deserializeOpDescribeFeatureTransformation) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeFeatureTransformation(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeDatasetImportJob(response, &metadata) } - output := &DescribeFeatureTransformationOutput{} + output := &DescribeDatasetImportJobOutput{} out.Result = output var buff [1024]byte @@ -2976,7 +3200,7 @@ func (m *awsAwsjson11_deserializeOpDescribeFeatureTransformation) HandleDeserial return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeFeatureTransformationOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeDatasetImportJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2990,7 +3214,7 @@ func (m *awsAwsjson11_deserializeOpDescribeFeatureTransformation) HandleDeserial return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeFeatureTransformation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeDatasetImportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3047,14 +3271,14 @@ func awsAwsjson11_deserializeOpErrorDescribeFeatureTransformation(response *smit } } -type awsAwsjson11_deserializeOpDescribeFilter struct { +type awsAwsjson11_deserializeOpDescribeEventTracker struct { } -func (*awsAwsjson11_deserializeOpDescribeFilter) ID() string { +func (*awsAwsjson11_deserializeOpDescribeEventTracker) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeFilter) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeEventTracker) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3068,9 +3292,9 @@ func (m *awsAwsjson11_deserializeOpDescribeFilter) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeFilter(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeEventTracker(response, &metadata) } - output := &DescribeFilterOutput{} + output := &DescribeEventTrackerOutput{} out.Result = output var buff [1024]byte @@ -3090,7 +3314,7 @@ func (m *awsAwsjson11_deserializeOpDescribeFilter) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeFilterOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeEventTrackerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3104,7 +3328,7 @@ func (m *awsAwsjson11_deserializeOpDescribeFilter) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeFilter(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeEventTracker(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3161,14 +3385,14 @@ func awsAwsjson11_deserializeOpErrorDescribeFilter(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpDescribeRecipe struct { +type awsAwsjson11_deserializeOpDescribeFeatureTransformation struct { } -func (*awsAwsjson11_deserializeOpDescribeRecipe) ID() string { +func (*awsAwsjson11_deserializeOpDescribeFeatureTransformation) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeRecipe) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeFeatureTransformation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3182,9 +3406,9 @@ func (m *awsAwsjson11_deserializeOpDescribeRecipe) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeRecipe(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeFeatureTransformation(response, &metadata) } - output := &DescribeRecipeOutput{} + output := &DescribeFeatureTransformationOutput{} out.Result = output var buff [1024]byte @@ -3204,7 +3428,7 @@ func (m *awsAwsjson11_deserializeOpDescribeRecipe) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeRecipeOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeFeatureTransformationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3218,7 +3442,7 @@ func (m *awsAwsjson11_deserializeOpDescribeRecipe) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeRecipe(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeFeatureTransformation(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3275,14 +3499,14 @@ func awsAwsjson11_deserializeOpErrorDescribeRecipe(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpDescribeSchema struct { +type awsAwsjson11_deserializeOpDescribeFilter struct { } -func (*awsAwsjson11_deserializeOpDescribeSchema) ID() string { +func (*awsAwsjson11_deserializeOpDescribeFilter) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeSchema) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeFilter) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3296,9 +3520,9 @@ func (m *awsAwsjson11_deserializeOpDescribeSchema) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeSchema(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeFilter(response, &metadata) } - output := &DescribeSchemaOutput{} + output := &DescribeFilterOutput{} out.Result = output var buff [1024]byte @@ -3318,7 +3542,7 @@ func (m *awsAwsjson11_deserializeOpDescribeSchema) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeSchemaOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeFilterOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3332,7 +3556,7 @@ func (m *awsAwsjson11_deserializeOpDescribeSchema) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeSchema(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeFilter(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3389,14 +3613,14 @@ func awsAwsjson11_deserializeOpErrorDescribeSchema(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpDescribeSolution struct { +type awsAwsjson11_deserializeOpDescribeRecipe struct { } -func (*awsAwsjson11_deserializeOpDescribeSolution) ID() string { +func (*awsAwsjson11_deserializeOpDescribeRecipe) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeSolution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeRecipe) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3410,9 +3634,9 @@ func (m *awsAwsjson11_deserializeOpDescribeSolution) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeSolution(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeRecipe(response, &metadata) } - output := &DescribeSolutionOutput{} + output := &DescribeRecipeOutput{} out.Result = output var buff [1024]byte @@ -3432,7 +3656,7 @@ func (m *awsAwsjson11_deserializeOpDescribeSolution) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeSolutionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeRecipeOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3446,7 +3670,7 @@ func (m *awsAwsjson11_deserializeOpDescribeSolution) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeSolution(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeRecipe(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3503,14 +3727,14 @@ func awsAwsjson11_deserializeOpErrorDescribeSolution(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpDescribeSolutionVersion struct { +type awsAwsjson11_deserializeOpDescribeRecommender struct { } -func (*awsAwsjson11_deserializeOpDescribeSolutionVersion) ID() string { +func (*awsAwsjson11_deserializeOpDescribeRecommender) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeSolutionVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeRecommender) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3524,9 +3748,9 @@ func (m *awsAwsjson11_deserializeOpDescribeSolutionVersion) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeSolutionVersion(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeRecommender(response, &metadata) } - output := &DescribeSolutionVersionOutput{} + output := &DescribeRecommenderOutput{} out.Result = output var buff [1024]byte @@ -3546,7 +3770,7 @@ func (m *awsAwsjson11_deserializeOpDescribeSolutionVersion) HandleDeserialize(ct return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeSolutionVersionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeRecommenderOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3560,7 +3784,7 @@ func (m *awsAwsjson11_deserializeOpDescribeSolutionVersion) HandleDeserialize(ct return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeSolutionVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeRecommender(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3617,14 +3841,14 @@ func awsAwsjson11_deserializeOpErrorDescribeSolutionVersion(response *smithyhttp } } -type awsAwsjson11_deserializeOpGetSolutionMetrics struct { +type awsAwsjson11_deserializeOpDescribeSchema struct { } -func (*awsAwsjson11_deserializeOpGetSolutionMetrics) ID() string { +func (*awsAwsjson11_deserializeOpDescribeSchema) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetSolutionMetrics) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeSchema) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3638,9 +3862,9 @@ func (m *awsAwsjson11_deserializeOpGetSolutionMetrics) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetSolutionMetrics(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeSchema(response, &metadata) } - output := &GetSolutionMetricsOutput{} + output := &DescribeSchemaOutput{} out.Result = output var buff [1024]byte @@ -3660,7 +3884,7 @@ func (m *awsAwsjson11_deserializeOpGetSolutionMetrics) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetSolutionMetricsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeSchemaOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3674,7 +3898,7 @@ func (m *awsAwsjson11_deserializeOpGetSolutionMetrics) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetSolutionMetrics(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeSchema(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3718,9 +3942,6 @@ func awsAwsjson11_deserializeOpErrorGetSolutionMetrics(response *smithyhttp.Resp case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("ResourceInUseException", errorCode): - return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) @@ -3734,14 +3955,14 @@ func awsAwsjson11_deserializeOpErrorGetSolutionMetrics(response *smithyhttp.Resp } } -type awsAwsjson11_deserializeOpListBatchInferenceJobs struct { +type awsAwsjson11_deserializeOpDescribeSolution struct { } -func (*awsAwsjson11_deserializeOpListBatchInferenceJobs) ID() string { +func (*awsAwsjson11_deserializeOpDescribeSolution) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListBatchInferenceJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeSolution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3755,9 +3976,9 @@ func (m *awsAwsjson11_deserializeOpListBatchInferenceJobs) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListBatchInferenceJobs(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeSolution(response, &metadata) } - output := &ListBatchInferenceJobsOutput{} + output := &DescribeSolutionOutput{} out.Result = output var buff [1024]byte @@ -3777,7 +3998,7 @@ func (m *awsAwsjson11_deserializeOpListBatchInferenceJobs) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListBatchInferenceJobsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeSolutionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3791,7 +4012,7 @@ func (m *awsAwsjson11_deserializeOpListBatchInferenceJobs) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListBatchInferenceJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeSolution(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3835,8 +4056,8 @@ func awsAwsjson11_deserializeOpErrorListBatchInferenceJobs(response *smithyhttp. case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -3848,14 +4069,14 @@ func awsAwsjson11_deserializeOpErrorListBatchInferenceJobs(response *smithyhttp. } } -type awsAwsjson11_deserializeOpListCampaigns struct { +type awsAwsjson11_deserializeOpDescribeSolutionVersion struct { } -func (*awsAwsjson11_deserializeOpListCampaigns) ID() string { +func (*awsAwsjson11_deserializeOpDescribeSolutionVersion) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListCampaigns) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeSolutionVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3869,9 +4090,9 @@ func (m *awsAwsjson11_deserializeOpListCampaigns) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListCampaigns(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeSolutionVersion(response, &metadata) } - output := &ListCampaignsOutput{} + output := &DescribeSolutionVersionOutput{} out.Result = output var buff [1024]byte @@ -3891,7 +4112,7 @@ func (m *awsAwsjson11_deserializeOpListCampaigns) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListCampaignsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeSolutionVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3905,7 +4126,7 @@ func (m *awsAwsjson11_deserializeOpListCampaigns) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListCampaigns(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeSolutionVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3949,8 +4170,8 @@ func awsAwsjson11_deserializeOpErrorListCampaigns(response *smithyhttp.Response, case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -3962,14 +4183,14 @@ func awsAwsjson11_deserializeOpErrorListCampaigns(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpListDatasetExportJobs struct { +type awsAwsjson11_deserializeOpGetSolutionMetrics struct { } -func (*awsAwsjson11_deserializeOpListDatasetExportJobs) ID() string { +func (*awsAwsjson11_deserializeOpGetSolutionMetrics) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListDatasetExportJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetSolutionMetrics) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3983,9 +4204,9 @@ func (m *awsAwsjson11_deserializeOpListDatasetExportJobs) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListDatasetExportJobs(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetSolutionMetrics(response, &metadata) } - output := &ListDatasetExportJobsOutput{} + output := &GetSolutionMetricsOutput{} out.Result = output var buff [1024]byte @@ -4005,7 +4226,7 @@ func (m *awsAwsjson11_deserializeOpListDatasetExportJobs) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListDatasetExportJobsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetSolutionMetricsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4019,7 +4240,7 @@ func (m *awsAwsjson11_deserializeOpListDatasetExportJobs) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListDatasetExportJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetSolutionMetrics(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4063,8 +4284,11 @@ func awsAwsjson11_deserializeOpErrorListDatasetExportJobs(response *smithyhttp.R case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("ResourceInUseException", errorCode): + return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -4076,14 +4300,14 @@ func awsAwsjson11_deserializeOpErrorListDatasetExportJobs(response *smithyhttp.R } } -type awsAwsjson11_deserializeOpListDatasetGroups struct { +type awsAwsjson11_deserializeOpListBatchInferenceJobs struct { } -func (*awsAwsjson11_deserializeOpListDatasetGroups) ID() string { +func (*awsAwsjson11_deserializeOpListBatchInferenceJobs) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListDatasetGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListBatchInferenceJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4097,9 +4321,9 @@ func (m *awsAwsjson11_deserializeOpListDatasetGroups) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListDatasetGroups(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListBatchInferenceJobs(response, &metadata) } - output := &ListDatasetGroupsOutput{} + output := &ListBatchInferenceJobsOutput{} out.Result = output var buff [1024]byte @@ -4119,7 +4343,7 @@ func (m *awsAwsjson11_deserializeOpListDatasetGroups) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListDatasetGroupsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListBatchInferenceJobsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4133,7 +4357,7 @@ func (m *awsAwsjson11_deserializeOpListDatasetGroups) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListDatasetGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListBatchInferenceJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4174,6 +4398,9 @@ func awsAwsjson11_deserializeOpErrorListDatasetGroups(response *smithyhttp.Respo } switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) @@ -4187,14 +4414,14 @@ func awsAwsjson11_deserializeOpErrorListDatasetGroups(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpListDatasetImportJobs struct { +type awsAwsjson11_deserializeOpListBatchSegmentJobs struct { } -func (*awsAwsjson11_deserializeOpListDatasetImportJobs) ID() string { +func (*awsAwsjson11_deserializeOpListBatchSegmentJobs) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListDatasetImportJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListBatchSegmentJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4208,9 +4435,9 @@ func (m *awsAwsjson11_deserializeOpListDatasetImportJobs) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListDatasetImportJobs(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListBatchSegmentJobs(response, &metadata) } - output := &ListDatasetImportJobsOutput{} + output := &ListBatchSegmentJobsOutput{} out.Result = output var buff [1024]byte @@ -4230,7 +4457,7 @@ func (m *awsAwsjson11_deserializeOpListDatasetImportJobs) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListDatasetImportJobsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListBatchSegmentJobsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4244,7 +4471,7 @@ func (m *awsAwsjson11_deserializeOpListDatasetImportJobs) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListDatasetImportJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListBatchSegmentJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4301,14 +4528,14 @@ func awsAwsjson11_deserializeOpErrorListDatasetImportJobs(response *smithyhttp.R } } -type awsAwsjson11_deserializeOpListDatasets struct { +type awsAwsjson11_deserializeOpListCampaigns struct { } -func (*awsAwsjson11_deserializeOpListDatasets) ID() string { +func (*awsAwsjson11_deserializeOpListCampaigns) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListDatasets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListCampaigns) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4322,9 +4549,9 @@ func (m *awsAwsjson11_deserializeOpListDatasets) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListDatasets(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListCampaigns(response, &metadata) } - output := &ListDatasetsOutput{} + output := &ListCampaignsOutput{} out.Result = output var buff [1024]byte @@ -4344,7 +4571,7 @@ func (m *awsAwsjson11_deserializeOpListDatasets) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListDatasetsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListCampaignsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4358,7 +4585,7 @@ func (m *awsAwsjson11_deserializeOpListDatasets) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListDatasets(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListCampaigns(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4415,14 +4642,14 @@ func awsAwsjson11_deserializeOpErrorListDatasets(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpListEventTrackers struct { +type awsAwsjson11_deserializeOpListDatasetExportJobs struct { } -func (*awsAwsjson11_deserializeOpListEventTrackers) ID() string { +func (*awsAwsjson11_deserializeOpListDatasetExportJobs) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListEventTrackers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListDatasetExportJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4436,9 +4663,9 @@ func (m *awsAwsjson11_deserializeOpListEventTrackers) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListEventTrackers(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListDatasetExportJobs(response, &metadata) } - output := &ListEventTrackersOutput{} + output := &ListDatasetExportJobsOutput{} out.Result = output var buff [1024]byte @@ -4458,7 +4685,7 @@ func (m *awsAwsjson11_deserializeOpListEventTrackers) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListEventTrackersOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListDatasetExportJobsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4472,7 +4699,7 @@ func (m *awsAwsjson11_deserializeOpListEventTrackers) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListEventTrackers(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListDatasetExportJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4529,14 +4756,14 @@ func awsAwsjson11_deserializeOpErrorListEventTrackers(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpListFilters struct { +type awsAwsjson11_deserializeOpListDatasetGroups struct { } -func (*awsAwsjson11_deserializeOpListFilters) ID() string { +func (*awsAwsjson11_deserializeOpListDatasetGroups) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListFilters) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListDatasetGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4550,9 +4777,9 @@ func (m *awsAwsjson11_deserializeOpListFilters) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListFilters(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListDatasetGroups(response, &metadata) } - output := &ListFiltersOutput{} + output := &ListDatasetGroupsOutput{} out.Result = output var buff [1024]byte @@ -4572,7 +4799,7 @@ func (m *awsAwsjson11_deserializeOpListFilters) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListFiltersOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListDatasetGroupsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4586,7 +4813,7 @@ func (m *awsAwsjson11_deserializeOpListFilters) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListFilters(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListDatasetGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4627,9 +4854,6 @@ func awsAwsjson11_deserializeOpErrorListFilters(response *smithyhttp.Response, m } switch { - case strings.EqualFold("InvalidInputException", errorCode): - return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) @@ -4643,14 +4867,14 @@ func awsAwsjson11_deserializeOpErrorListFilters(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpListRecipes struct { +type awsAwsjson11_deserializeOpListDatasetImportJobs struct { } -func (*awsAwsjson11_deserializeOpListRecipes) ID() string { +func (*awsAwsjson11_deserializeOpListDatasetImportJobs) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListRecipes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListDatasetImportJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4664,9 +4888,9 @@ func (m *awsAwsjson11_deserializeOpListRecipes) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListRecipes(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListDatasetImportJobs(response, &metadata) } - output := &ListRecipesOutput{} + output := &ListDatasetImportJobsOutput{} out.Result = output var buff [1024]byte @@ -4686,7 +4910,7 @@ func (m *awsAwsjson11_deserializeOpListRecipes) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListRecipesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListDatasetImportJobsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4700,7 +4924,7 @@ func (m *awsAwsjson11_deserializeOpListRecipes) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListRecipes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListDatasetImportJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4741,6 +4965,9 @@ func awsAwsjson11_deserializeOpErrorListRecipes(response *smithyhttp.Response, m } switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) @@ -4754,14 +4981,14 @@ func awsAwsjson11_deserializeOpErrorListRecipes(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpListSchemas struct { +type awsAwsjson11_deserializeOpListDatasets struct { } -func (*awsAwsjson11_deserializeOpListSchemas) ID() string { +func (*awsAwsjson11_deserializeOpListDatasets) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListSchemas) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListDatasets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4775,9 +5002,9 @@ func (m *awsAwsjson11_deserializeOpListSchemas) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListSchemas(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListDatasets(response, &metadata) } - output := &ListSchemasOutput{} + output := &ListDatasetsOutput{} out.Result = output var buff [1024]byte @@ -4797,7 +5024,7 @@ func (m *awsAwsjson11_deserializeOpListSchemas) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListSchemasOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListDatasetsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4811,7 +5038,7 @@ func (m *awsAwsjson11_deserializeOpListSchemas) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListSchemas(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListDatasets(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4852,6 +5079,9 @@ func awsAwsjson11_deserializeOpErrorListSchemas(response *smithyhttp.Response, m } switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) @@ -4865,14 +5095,14 @@ func awsAwsjson11_deserializeOpErrorListSchemas(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpListSolutions struct { +type awsAwsjson11_deserializeOpListEventTrackers struct { } -func (*awsAwsjson11_deserializeOpListSolutions) ID() string { +func (*awsAwsjson11_deserializeOpListEventTrackers) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListSolutions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListEventTrackers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4886,9 +5116,9 @@ func (m *awsAwsjson11_deserializeOpListSolutions) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListSolutions(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListEventTrackers(response, &metadata) } - output := &ListSolutionsOutput{} + output := &ListEventTrackersOutput{} out.Result = output var buff [1024]byte @@ -4908,7 +5138,7 @@ func (m *awsAwsjson11_deserializeOpListSolutions) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListSolutionsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListEventTrackersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4922,7 +5152,7 @@ func (m *awsAwsjson11_deserializeOpListSolutions) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListSolutions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListEventTrackers(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4979,14 +5209,14 @@ func awsAwsjson11_deserializeOpErrorListSolutions(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpListSolutionVersions struct { +type awsAwsjson11_deserializeOpListFilters struct { } -func (*awsAwsjson11_deserializeOpListSolutionVersions) ID() string { +func (*awsAwsjson11_deserializeOpListFilters) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListSolutionVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListFilters) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5000,9 +5230,9 @@ func (m *awsAwsjson11_deserializeOpListSolutionVersions) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListSolutionVersions(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListFilters(response, &metadata) } - output := &ListSolutionVersionsOutput{} + output := &ListFiltersOutput{} out.Result = output var buff [1024]byte @@ -5022,7 +5252,7 @@ func (m *awsAwsjson11_deserializeOpListSolutionVersions) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListSolutionVersionsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListFiltersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5036,7 +5266,7 @@ func (m *awsAwsjson11_deserializeOpListSolutionVersions) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListSolutionVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListFilters(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5083,9 +5313,6 @@ func awsAwsjson11_deserializeOpErrorListSolutionVersions(response *smithyhttp.Re case strings.EqualFold("InvalidNextTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -5096,14 +5323,14 @@ func awsAwsjson11_deserializeOpErrorListSolutionVersions(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpStopSolutionVersionCreation struct { +type awsAwsjson11_deserializeOpListRecipes struct { } -func (*awsAwsjson11_deserializeOpStopSolutionVersionCreation) ID() string { +func (*awsAwsjson11_deserializeOpListRecipes) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStopSolutionVersionCreation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListRecipes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5117,21 +5344,43 @@ func (m *awsAwsjson11_deserializeOpStopSolutionVersionCreation) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStopSolutionVersionCreation(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListRecipes(response, &metadata) } - output := &StopSolutionVersionCreationOutput{} + output := &ListRecipesOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListRecipesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } + return out, metadata, err } return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStopSolutionVersionCreation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListRecipes(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5175,11 +5424,8 @@ func awsAwsjson11_deserializeOpErrorStopSolutionVersionCreation(response *smithy case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("ResourceInUseException", errorCode): - return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -5191,14 +5437,14 @@ func awsAwsjson11_deserializeOpErrorStopSolutionVersionCreation(response *smithy } } -type awsAwsjson11_deserializeOpUpdateCampaign struct { +type awsAwsjson11_deserializeOpListRecommenders struct { } -func (*awsAwsjson11_deserializeOpUpdateCampaign) ID() string { +func (*awsAwsjson11_deserializeOpListRecommenders) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateCampaign) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListRecommenders) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5212,9 +5458,9 @@ func (m *awsAwsjson11_deserializeOpUpdateCampaign) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateCampaign(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListRecommenders(response, &metadata) } - output := &UpdateCampaignOutput{} + output := &ListRecommendersOutput{} out.Result = output var buff [1024]byte @@ -5234,7 +5480,7 @@ func (m *awsAwsjson11_deserializeOpUpdateCampaign) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateCampaignOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListRecommendersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5248,7 +5494,7 @@ func (m *awsAwsjson11_deserializeOpUpdateCampaign) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateCampaign(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListRecommenders(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5292,11 +5538,8 @@ func awsAwsjson11_deserializeOpErrorUpdateCampaign(response *smithyhttp.Response case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("ResourceInUseException", errorCode): - return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -5308,11 +5551,36 @@ func awsAwsjson11_deserializeOpErrorUpdateCampaign(response *smithyhttp.Response } } -func awsAwsjson11_deserializeErrorInvalidInputException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +type awsAwsjson11_deserializeOpListSchemas struct { +} + +func (*awsAwsjson11_deserializeOpListSchemas) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListSchemas) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListSchemas(response, &metadata) + } + output := &ListSchemasOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -5323,12 +5591,10 @@ func awsAwsjson11_deserializeErrorInvalidInputException(response *smithyhttp.Res Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.InvalidInputException{} - err := awsAwsjson11_deserializeDocumentInvalidInputException(&output, shape) - + err = awsAwsjson11_deserializeOpDocumentListSchemasOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5336,22 +5602,35 @@ func awsAwsjson11_deserializeErrorInvalidInputException(response *smithyhttp.Res Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson11_deserializeErrorInvalidNextTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeOpErrorListSchemas(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -5361,28 +5640,58 @@ func awsAwsjson11_deserializeErrorInvalidNextTokenException(response *smithyhttp return err } - output := &types.InvalidNextTokenException{} - err := awsAwsjson11_deserializeDocumentInvalidNextTokenException(&output, shape) + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + switch { + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - errorBody.Seek(0, io.SeekStart) - return output +type awsAwsjson11_deserializeOpListSolutions struct { } -func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func (*awsAwsjson11_deserializeOpListSolutions) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListSolutions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListSolutions(response, &metadata) + } + output := &ListSolutionsOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -5393,12 +5702,10 @@ func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Re Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.LimitExceededException{} - err := awsAwsjson11_deserializeDocumentLimitExceededException(&output, shape) - + err = awsAwsjson11_deserializeOpDocumentListSolutionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5406,22 +5713,35 @@ func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Re Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeOpErrorListSolutions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -5431,28 +5751,61 @@ func awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response *smith return err } - output := &types.ResourceAlreadyExistsException{} - err := awsAwsjson11_deserializeDocumentResourceAlreadyExistsException(&output, shape) + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - errorBody.Seek(0, io.SeekStart) - return output +type awsAwsjson11_deserializeOpListSolutionVersions struct { } -func awsAwsjson11_deserializeErrorResourceInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func (*awsAwsjson11_deserializeOpListSolutionVersions) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListSolutionVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListSolutionVersions(response, &metadata) + } + output := &ListSolutionVersionsOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -5463,12 +5816,10 @@ func awsAwsjson11_deserializeErrorResourceInUseException(response *smithyhttp.Re Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.ResourceInUseException{} - err := awsAwsjson11_deserializeDocumentResourceInUseException(&output, shape) - + err = awsAwsjson11_deserializeOpDocumentListSolutionVersionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5476,22 +5827,35 @@ func awsAwsjson11_deserializeErrorResourceInUseException(response *smithyhttp.Re Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeOpErrorListSolutionVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -5501,56 +5865,895 @@ func awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp return err } - output := &types.ResourceNotFoundException{} - err := awsAwsjson11_deserializeDocumentResourceNotFoundException(&output, shape) + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - errorBody.Seek(0, io.SeekStart) - return output +type awsAwsjson11_deserializeOpStopSolutionVersionCreation struct { } -func awsAwsjson11_deserializeDocumentAlgorithm(v **types.Algorithm, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil +func (*awsAwsjson11_deserializeOpStopSolutionVersionCreation) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpStopSolutionVersionCreation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err } - shape, ok := value.(map[string]interface{}) + response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { - return fmt.Errorf("unexpected JSON type %v", value) + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } - var sv *types.Algorithm - if *v == nil { - sv = &types.Algorithm{} - } else { + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorStopSolutionVersionCreation(response, &metadata) + } + output := &StopSolutionVersionCreationOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorStopSolutionVersionCreation(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceInUseException", errorCode): + return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateCampaign struct { +} + +func (*awsAwsjson11_deserializeOpUpdateCampaign) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateCampaign) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateCampaign(response, &metadata) + } + output := &UpdateCampaignOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateCampaignOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateCampaign(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceInUseException", errorCode): + return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateRecommender struct { +} + +func (*awsAwsjson11_deserializeOpUpdateRecommender) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateRecommender) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateRecommender(response, &metadata) + } + output := &UpdateRecommenderOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateRecommenderOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateRecommender(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceInUseException", errorCode): + return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsAwsjson11_deserializeErrorInvalidInputException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidInputException{} + err := awsAwsjson11_deserializeDocumentInvalidInputException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidNextTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidNextTokenException{} + err := awsAwsjson11_deserializeDocumentInvalidNextTokenException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.LimitExceededException{} + err := awsAwsjson11_deserializeDocumentLimitExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ResourceAlreadyExistsException{} + err := awsAwsjson11_deserializeDocumentResourceAlreadyExistsException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorResourceInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ResourceInUseException{} + err := awsAwsjson11_deserializeDocumentResourceInUseException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ResourceNotFoundException{} + err := awsAwsjson11_deserializeDocumentResourceNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeDocumentAlgorithm(v **types.Algorithm, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Algorithm + if *v == nil { + sv = &types.Algorithm{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "algorithmArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.AlgorithmArn = ptr.String(jtv) + } + + case "algorithmImage": + if err := awsAwsjson11_deserializeDocumentAlgorithmImage(&sv.AlgorithmImage, value); err != nil { + return err + } + + case "creationDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "defaultHyperParameterRanges": + if err := awsAwsjson11_deserializeDocumentDefaultHyperParameterRanges(&sv.DefaultHyperParameterRanges, value); err != nil { + return err + } + + case "defaultHyperParameters": + if err := awsAwsjson11_deserializeDocumentHyperParameters(&sv.DefaultHyperParameters, value); err != nil { + return err + } + + case "defaultResourceConfig": + if err := awsAwsjson11_deserializeDocumentResourceConfig(&sv.DefaultResourceConfig, value); err != nil { + return err + } + + case "lastUpdatedDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + case "trainingInputMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TrainingInputMode to be of type string, got %T instead", value) + } + sv.TrainingInputMode = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAlgorithmImage(v **types.AlgorithmImage, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AlgorithmImage + if *v == nil { + sv = &types.AlgorithmImage{} + } else { sv = *v } for key, value := range shape { switch key { - case "algorithmArn": + case "dockerURI": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DockerURI to be of type string, got %T instead", value) + } + sv.DockerURI = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentArnList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentAutoMLConfig(v **types.AutoMLConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AutoMLConfig + if *v == nil { + sv = &types.AutoMLConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "metricName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MetricName to be of type string, got %T instead", value) + } + sv.MetricName = ptr.String(jtv) + } + + case "recipeList": + if err := awsAwsjson11_deserializeDocumentArnList(&sv.RecipeList, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAutoMLResult(v **types.AutoMLResult, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AutoMLResult + if *v == nil { + sv = &types.AutoMLResult{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "bestRecipeArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.AlgorithmArn = ptr.String(jtv) + sv.BestRecipeArn = ptr.String(jtv) } - case "algorithmImage": - if err := awsAwsjson11_deserializeDocumentAlgorithmImage(&sv.AlgorithmImage, value); err != nil { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentBatchInferenceJob(v **types.BatchInferenceJob, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.BatchInferenceJob + if *v == nil { + sv = &types.BatchInferenceJob{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "batchInferenceJobArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.BatchInferenceJobArn = ptr.String(jtv) + } + + case "batchInferenceJobConfig": + if err := awsAwsjson11_deserializeDocumentBatchInferenceJobConfig(&sv.BatchInferenceJobConfig, value); err != nil { return err } @@ -5570,18 +6773,40 @@ func awsAwsjson11_deserializeDocumentAlgorithm(v **types.Algorithm, value interf } } - case "defaultHyperParameterRanges": - if err := awsAwsjson11_deserializeDocumentDefaultHyperParameterRanges(&sv.DefaultHyperParameterRanges, value); err != nil { - return err + case "failureReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value) + } + sv.FailureReason = ptr.String(jtv) } - case "defaultHyperParameters": - if err := awsAwsjson11_deserializeDocumentHyperParameters(&sv.DefaultHyperParameters, value); err != nil { + case "filterArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.FilterArn = ptr.String(jtv) + } + + case "jobInput": + if err := awsAwsjson11_deserializeDocumentBatchInferenceJobInput(&sv.JobInput, value); err != nil { return err } - case "defaultResourceConfig": - if err := awsAwsjson11_deserializeDocumentResourceConfig(&sv.DefaultResourceConfig, value); err != nil { + case "jobName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.JobName = ptr.String(jtv) + } + + case "jobOutput": + if err := awsAwsjson11_deserializeDocumentBatchInferenceJobOutput(&sv.JobOutput, value); err != nil { return err } @@ -5601,31 +6826,44 @@ func awsAwsjson11_deserializeDocumentAlgorithm(v **types.Algorithm, value interf } } - case "name": + case "numResults": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected NumBatchResults to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.NumResults = ptr.Int32(int32(i64)) + } + + case "roleArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Name to be of type string, got %T instead", value) + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.RoleArn = ptr.String(jtv) } - case "roleArn": + case "solutionVersionArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.RoleArn = ptr.String(jtv) + sv.SolutionVersionArn = ptr.String(jtv) } - case "trainingInputMode": + case "status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TrainingInputMode to be of type string, got %T instead", value) + return fmt.Errorf("expected Status to be of type string, got %T instead", value) } - sv.TrainingInputMode = ptr.String(jtv) + sv.Status = ptr.String(jtv) } default: @@ -5637,7 +6875,7 @@ func awsAwsjson11_deserializeDocumentAlgorithm(v **types.Algorithm, value interf return nil } -func awsAwsjson11_deserializeDocumentAlgorithmImage(v **types.AlgorithmImage, value interface{}) error { +func awsAwsjson11_deserializeDocumentBatchInferenceJobConfig(v **types.BatchInferenceJobConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5650,31 +6888,18 @@ func awsAwsjson11_deserializeDocumentAlgorithmImage(v **types.AlgorithmImage, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AlgorithmImage + var sv *types.BatchInferenceJobConfig if *v == nil { - sv = &types.AlgorithmImage{} + sv = &types.BatchInferenceJobConfig{} } else { sv = *v } for key, value := range shape { switch key { - case "dockerURI": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DockerURI to be of type string, got %T instead", value) - } - sv.DockerURI = ptr.String(jtv) - } - - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Name to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) + case "itemExplorationConfig": + if err := awsAwsjson11_deserializeDocumentHyperParameters(&sv.ItemExplorationConfig, value); err != nil { + return err } default: @@ -5686,7 +6911,7 @@ func awsAwsjson11_deserializeDocumentAlgorithmImage(v **types.AlgorithmImage, va return nil } -func awsAwsjson11_deserializeDocumentArnList(v *[]string, value interface{}) error { +func awsAwsjson11_deserializeDocumentBatchInferenceJobInput(v **types.BatchInferenceJobInput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5694,35 +6919,35 @@ func awsAwsjson11_deserializeDocumentArnList(v *[]string, value interface{}) err return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []string + var sv *types.BatchInferenceJobInput if *v == nil { - cv = []string{} + sv = &types.BatchInferenceJobInput{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + for key, value := range shape { + switch key { + case "s3DataSource": + if err := awsAwsjson11_deserializeDocumentS3DataConfig(&sv.S3DataSource, value); err != nil { + return err } - col = jtv - } - cv = append(cv, col) + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentAutoMLConfig(v **types.AutoMLConfig, value interface{}) error { +func awsAwsjson11_deserializeDocumentBatchInferenceJobOutput(v **types.BatchInferenceJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5735,26 +6960,17 @@ func awsAwsjson11_deserializeDocumentAutoMLConfig(v **types.AutoMLConfig, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AutoMLConfig + var sv *types.BatchInferenceJobOutput if *v == nil { - sv = &types.AutoMLConfig{} + sv = &types.BatchInferenceJobOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "metricName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MetricName to be of type string, got %T instead", value) - } - sv.MetricName = ptr.String(jtv) - } - - case "recipeList": - if err := awsAwsjson11_deserializeDocumentArnList(&sv.RecipeList, value); err != nil { + case "s3DataDestination": + if err := awsAwsjson11_deserializeDocumentS3DataConfig(&sv.S3DataDestination, value); err != nil { return err } @@ -5767,7 +6983,41 @@ func awsAwsjson11_deserializeDocumentAutoMLConfig(v **types.AutoMLConfig, value return nil } -func awsAwsjson11_deserializeDocumentAutoMLResult(v **types.AutoMLResult, value interface{}) error { +func awsAwsjson11_deserializeDocumentBatchInferenceJobs(v *[]types.BatchInferenceJobSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.BatchInferenceJobSummary + if *v == nil { + cv = []types.BatchInferenceJobSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BatchInferenceJobSummary + destAddr := &col + if err := awsAwsjson11_deserializeDocumentBatchInferenceJobSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentBatchInferenceJobSummary(v **types.BatchInferenceJobSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5780,22 +7030,90 @@ func awsAwsjson11_deserializeDocumentAutoMLResult(v **types.AutoMLResult, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AutoMLResult + var sv *types.BatchInferenceJobSummary if *v == nil { - sv = &types.AutoMLResult{} + sv = &types.BatchInferenceJobSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "bestRecipeArn": + case "batchInferenceJobArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.BestRecipeArn = ptr.String(jtv) + sv.BatchInferenceJobArn = ptr.String(jtv) + } + + case "creationDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "failureReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value) + } + sv.FailureReason = ptr.String(jtv) + } + + case "jobName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.JobName = ptr.String(jtv) + } + + case "lastUpdatedDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "solutionVersionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.SolutionVersionArn = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Status to be of type string, got %T instead", value) + } + sv.Status = ptr.String(jtv) } default: @@ -5807,7 +7125,7 @@ func awsAwsjson11_deserializeDocumentAutoMLResult(v **types.AutoMLResult, value return nil } -func awsAwsjson11_deserializeDocumentBatchInferenceJob(v **types.BatchInferenceJob, value interface{}) error { +func awsAwsjson11_deserializeDocumentBatchSegmentJob(v **types.BatchSegmentJob, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5820,27 +7138,22 @@ func awsAwsjson11_deserializeDocumentBatchInferenceJob(v **types.BatchInferenceJ return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.BatchInferenceJob + var sv *types.BatchSegmentJob if *v == nil { - sv = &types.BatchInferenceJob{} + sv = &types.BatchSegmentJob{} } else { sv = *v } for key, value := range shape { switch key { - case "batchInferenceJobArn": + case "batchSegmentJobArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.BatchInferenceJobArn = ptr.String(jtv) - } - - case "batchInferenceJobConfig": - if err := awsAwsjson11_deserializeDocumentBatchInferenceJobConfig(&sv.BatchInferenceJobConfig, value); err != nil { - return err + sv.BatchSegmentJobArn = ptr.String(jtv) } case "creationDateTime": @@ -5878,7 +7191,7 @@ func awsAwsjson11_deserializeDocumentBatchInferenceJob(v **types.BatchInferenceJ } case "jobInput": - if err := awsAwsjson11_deserializeDocumentBatchInferenceJobInput(&sv.JobInput, value); err != nil { + if err := awsAwsjson11_deserializeDocumentBatchSegmentJobInput(&sv.JobInput, value); err != nil { return err } @@ -5892,7 +7205,7 @@ func awsAwsjson11_deserializeDocumentBatchInferenceJob(v **types.BatchInferenceJ } case "jobOutput": - if err := awsAwsjson11_deserializeDocumentBatchInferenceJobOutput(&sv.JobOutput, value); err != nil { + if err := awsAwsjson11_deserializeDocumentBatchSegmentJobOutput(&sv.JobOutput, value); err != nil { return err } @@ -5938,54 +7251,18 @@ func awsAwsjson11_deserializeDocumentBatchInferenceJob(v **types.BatchInferenceJ if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.SolutionVersionArn = ptr.String(jtv) - } - - case "status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Status to be of type string, got %T instead", value) - } - sv.Status = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentBatchInferenceJobConfig(v **types.BatchInferenceJobConfig, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.BatchInferenceJobConfig - if *v == nil { - sv = &types.BatchInferenceJobConfig{} - } else { - sv = *v - } + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.SolutionVersionArn = ptr.String(jtv) + } - for key, value := range shape { - switch key { - case "itemExplorationConfig": - if err := awsAwsjson11_deserializeDocumentHyperParameters(&sv.ItemExplorationConfig, value); err != nil { - return err + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Status to be of type string, got %T instead", value) + } + sv.Status = ptr.String(jtv) } default: @@ -5997,7 +7274,7 @@ func awsAwsjson11_deserializeDocumentBatchInferenceJobConfig(v **types.BatchInfe return nil } -func awsAwsjson11_deserializeDocumentBatchInferenceJobInput(v **types.BatchInferenceJobInput, value interface{}) error { +func awsAwsjson11_deserializeDocumentBatchSegmentJobInput(v **types.BatchSegmentJobInput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6010,9 +7287,9 @@ func awsAwsjson11_deserializeDocumentBatchInferenceJobInput(v **types.BatchInfer return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.BatchInferenceJobInput + var sv *types.BatchSegmentJobInput if *v == nil { - sv = &types.BatchInferenceJobInput{} + sv = &types.BatchSegmentJobInput{} } else { sv = *v } @@ -6033,7 +7310,7 @@ func awsAwsjson11_deserializeDocumentBatchInferenceJobInput(v **types.BatchInfer return nil } -func awsAwsjson11_deserializeDocumentBatchInferenceJobOutput(v **types.BatchInferenceJobOutput, value interface{}) error { +func awsAwsjson11_deserializeDocumentBatchSegmentJobOutput(v **types.BatchSegmentJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6046,9 +7323,9 @@ func awsAwsjson11_deserializeDocumentBatchInferenceJobOutput(v **types.BatchInfe return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.BatchInferenceJobOutput + var sv *types.BatchSegmentJobOutput if *v == nil { - sv = &types.BatchInferenceJobOutput{} + sv = &types.BatchSegmentJobOutput{} } else { sv = *v } @@ -6069,7 +7346,7 @@ func awsAwsjson11_deserializeDocumentBatchInferenceJobOutput(v **types.BatchInfe return nil } -func awsAwsjson11_deserializeDocumentBatchInferenceJobs(v *[]types.BatchInferenceJobSummary, value interface{}) error { +func awsAwsjson11_deserializeDocumentBatchSegmentJobs(v *[]types.BatchSegmentJobSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6082,17 +7359,17 @@ func awsAwsjson11_deserializeDocumentBatchInferenceJobs(v *[]types.BatchInferenc return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.BatchInferenceJobSummary + var cv []types.BatchSegmentJobSummary if *v == nil { - cv = []types.BatchInferenceJobSummary{} + cv = []types.BatchSegmentJobSummary{} } else { cv = *v } for _, value := range shape { - var col types.BatchInferenceJobSummary + var col types.BatchSegmentJobSummary destAddr := &col - if err := awsAwsjson11_deserializeDocumentBatchInferenceJobSummary(&destAddr, value); err != nil { + if err := awsAwsjson11_deserializeDocumentBatchSegmentJobSummary(&destAddr, value); err != nil { return err } col = *destAddr @@ -6103,7 +7380,7 @@ func awsAwsjson11_deserializeDocumentBatchInferenceJobs(v *[]types.BatchInferenc return nil } -func awsAwsjson11_deserializeDocumentBatchInferenceJobSummary(v **types.BatchInferenceJobSummary, value interface{}) error { +func awsAwsjson11_deserializeDocumentBatchSegmentJobSummary(v **types.BatchSegmentJobSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6116,22 +7393,22 @@ func awsAwsjson11_deserializeDocumentBatchInferenceJobSummary(v **types.BatchInf return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.BatchInferenceJobSummary + var sv *types.BatchSegmentJobSummary if *v == nil { - sv = &types.BatchInferenceJobSummary{} + sv = &types.BatchSegmentJobSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "batchInferenceJobArn": + case "batchSegmentJobArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.BatchInferenceJobArn = ptr.String(jtv) + sv.BatchSegmentJobArn = ptr.String(jtv) } case "creationDateTime": @@ -7340,6 +8617,15 @@ func awsAwsjson11_deserializeDocumentDatasetGroup(v **types.DatasetGroup, value sv.DatasetGroupArn = ptr.String(jtv) } + case "domain": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Domain to be of type string, got %T instead", value) + } + sv.Domain = types.Domain(jtv) + } + case "failureReason": if value != nil { jtv, ok := value.(string) @@ -7491,6 +8777,15 @@ func awsAwsjson11_deserializeDocumentDatasetGroupSummary(v **types.DatasetGroupS sv.DatasetGroupArn = ptr.String(jtv) } + case "domain": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Domain to be of type string, got %T instead", value) + } + sv.Domain = types.Domain(jtv) + } + case "failureReason": if value != nil { jtv, ok := value.(string) @@ -7870,6 +9165,15 @@ func awsAwsjson11_deserializeDocumentDatasetSchema(v **types.DatasetSchema, valu } } + case "domain": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Domain to be of type string, got %T instead", value) + } + sv.Domain = types.Domain(jtv) + } + case "lastUpdatedDateTime": if value != nil { switch jtv := value.(type) { @@ -7960,6 +9264,15 @@ func awsAwsjson11_deserializeDocumentDatasetSchemaSummary(v **types.DatasetSchem } } + case "domain": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Domain to be of type string, got %T instead", value) + } + sv.Domain = types.Domain(jtv) + } + case "lastUpdatedDateTime": if value != nil { switch jtv := value.(type) { @@ -9707,19 +11020,228 @@ func awsAwsjson11_deserializeDocumentMetrics(v *map[string]float64, value interf } parsedVal = f64 - default: - return fmt.Errorf("expected MetricValue to be a JSON Number, got %T instead", value) + default: + return fmt.Errorf("expected MetricValue to be a JSON Number, got %T instead", value) + + } + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentOptimizationObjective(v **types.OptimizationObjective, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OptimizationObjective + if *v == nil { + sv = &types.OptimizationObjective{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "itemAttribute": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ItemAttribute to be of type string, got %T instead", value) + } + sv.ItemAttribute = ptr.String(jtv) + } + + case "objectiveSensitivity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ObjectiveSensitivity to be of type string, got %T instead", value) + } + sv.ObjectiveSensitivity = types.ObjectiveSensitivity(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentRecipe(v **types.Recipe, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Recipe + if *v == nil { + sv = &types.Recipe{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "algorithmArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.AlgorithmArn = ptr.String(jtv) + } + + case "creationDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "featureTransformationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.FeatureTransformationArn = ptr.String(jtv) + } + + case "lastUpdatedDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "recipeArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.RecipeArn = ptr.String(jtv) + } + + case "recipeType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RecipeType to be of type string, got %T instead", value) + } + sv.RecipeType = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Status to be of type string, got %T instead", value) + } + sv.Status = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentRecipes(v *[]types.RecipeSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.RecipeSummary + if *v == nil { + cv = []types.RecipeSummary{} + } else { + cv = *v + } - } + for _, value := range shape { + var col types.RecipeSummary + destAddr := &col + if err := awsAwsjson11_deserializeDocumentRecipeSummary(&destAddr, value); err != nil { + return err } - mv[key] = parsedVal + col = *destAddr + cv = append(cv, col) } - *v = mv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentOptimizationObjective(v **types.OptimizationObjective, value interface{}) error { +func awsAwsjson11_deserializeDocumentRecipeSummary(v **types.RecipeSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9732,31 +11254,81 @@ func awsAwsjson11_deserializeDocumentOptimizationObjective(v **types.Optimizatio return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.OptimizationObjective + var sv *types.RecipeSummary if *v == nil { - sv = &types.OptimizationObjective{} + sv = &types.RecipeSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "itemAttribute": + case "creationDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "domain": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ItemAttribute to be of type string, got %T instead", value) + return fmt.Errorf("expected Domain to be of type string, got %T instead", value) } - sv.ItemAttribute = ptr.String(jtv) + sv.Domain = types.Domain(jtv) } - case "objectiveSensitivity": + case "lastUpdatedDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ObjectiveSensitivity to be of type string, got %T instead", value) + return fmt.Errorf("expected Name to be of type string, got %T instead", value) } - sv.ObjectiveSensitivity = types.ObjectiveSensitivity(jtv) + sv.Name = ptr.String(jtv) + } + + case "recipeArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.RecipeArn = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Status to be of type string, got %T instead", value) + } + sv.Status = ptr.String(jtv) } default: @@ -9768,7 +11340,7 @@ func awsAwsjson11_deserializeDocumentOptimizationObjective(v **types.Optimizatio return nil } -func awsAwsjson11_deserializeDocumentRecipe(v **types.Recipe, value interface{}) error { +func awsAwsjson11_deserializeDocumentRecommender(v **types.Recommender, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9781,24 +11353,15 @@ func awsAwsjson11_deserializeDocumentRecipe(v **types.Recipe, value interface{}) return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Recipe + var sv *types.Recommender if *v == nil { - sv = &types.Recipe{} + sv = &types.Recommender{} } else { sv = *v } for key, value := range shape { switch key { - case "algorithmArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.AlgorithmArn = ptr.String(jtv) - } - case "creationDateTime": if value != nil { switch jtv := value.(type) { @@ -9815,22 +11378,22 @@ func awsAwsjson11_deserializeDocumentRecipe(v **types.Recipe, value interface{}) } } - case "description": + case "datasetGroupArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Description to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.Description = ptr.String(jtv) + sv.DatasetGroupArn = ptr.String(jtv) } - case "featureTransformationArn": + case "failureReason": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value) } - sv.FeatureTransformationArn = ptr.String(jtv) + sv.FailureReason = ptr.String(jtv) } case "lastUpdatedDateTime": @@ -9849,6 +11412,11 @@ func awsAwsjson11_deserializeDocumentRecipe(v **types.Recipe, value interface{}) } } + case "latestRecommenderUpdate": + if err := awsAwsjson11_deserializeDocumentRecommenderUpdateSummary(&sv.LatestRecommenderUpdate, value); err != nil { + return err + } + case "name": if value != nil { jtv, ok := value.(string) @@ -9867,13 +11435,18 @@ func awsAwsjson11_deserializeDocumentRecipe(v **types.Recipe, value interface{}) sv.RecipeArn = ptr.String(jtv) } - case "recipeType": + case "recommenderArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RecipeType to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.RecipeType = ptr.String(jtv) + sv.RecommenderArn = ptr.String(jtv) + } + + case "recommenderConfig": + if err := awsAwsjson11_deserializeDocumentRecommenderConfig(&sv.RecommenderConfig, value); err != nil { + return err } case "status": @@ -9894,7 +11467,43 @@ func awsAwsjson11_deserializeDocumentRecipe(v **types.Recipe, value interface{}) return nil } -func awsAwsjson11_deserializeDocumentRecipes(v *[]types.RecipeSummary, value interface{}) error { +func awsAwsjson11_deserializeDocumentRecommenderConfig(v **types.RecommenderConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RecommenderConfig + if *v == nil { + sv = &types.RecommenderConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "itemExplorationConfig": + if err := awsAwsjson11_deserializeDocumentHyperParameters(&sv.ItemExplorationConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentRecommenders(v *[]types.RecommenderSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9907,17 +11516,17 @@ func awsAwsjson11_deserializeDocumentRecipes(v *[]types.RecipeSummary, value int return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.RecipeSummary + var cv []types.RecommenderSummary if *v == nil { - cv = []types.RecipeSummary{} + cv = []types.RecommenderSummary{} } else { cv = *v } for _, value := range shape { - var col types.RecipeSummary + var col types.RecommenderSummary destAddr := &col - if err := awsAwsjson11_deserializeDocumentRecipeSummary(&destAddr, value); err != nil { + if err := awsAwsjson11_deserializeDocumentRecommenderSummary(&destAddr, value); err != nil { return err } col = *destAddr @@ -9928,7 +11537,7 @@ func awsAwsjson11_deserializeDocumentRecipes(v *[]types.RecipeSummary, value int return nil } -func awsAwsjson11_deserializeDocumentRecipeSummary(v **types.RecipeSummary, value interface{}) error { +func awsAwsjson11_deserializeDocumentRecommenderSummary(v **types.RecommenderSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9941,9 +11550,9 @@ func awsAwsjson11_deserializeDocumentRecipeSummary(v **types.RecipeSummary, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.RecipeSummary + var sv *types.RecommenderSummary if *v == nil { - sv = &types.RecipeSummary{} + sv = &types.RecommenderSummary{} } else { sv = *v } @@ -9966,6 +11575,15 @@ func awsAwsjson11_deserializeDocumentRecipeSummary(v **types.RecipeSummary, valu } } + case "datasetGroupArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.DatasetGroupArn = ptr.String(jtv) + } + case "lastUpdatedDateTime": if value != nil { switch jtv := value.(type) { @@ -10000,6 +11618,106 @@ func awsAwsjson11_deserializeDocumentRecipeSummary(v **types.RecipeSummary, valu sv.RecipeArn = ptr.String(jtv) } + case "recommenderArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.RecommenderArn = ptr.String(jtv) + } + + case "recommenderConfig": + if err := awsAwsjson11_deserializeDocumentRecommenderConfig(&sv.RecommenderConfig, value); err != nil { + return err + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Status to be of type string, got %T instead", value) + } + sv.Status = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentRecommenderUpdateSummary(v **types.RecommenderUpdateSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RecommenderUpdateSummary + if *v == nil { + sv = &types.RecommenderUpdateSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "creationDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "failureReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value) + } + sv.FailureReason = ptr.String(jtv) + } + + case "lastUpdatedDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "recommenderConfig": + if err := awsAwsjson11_deserializeDocumentRecommenderConfig(&sv.RecommenderConfig, value); err != nil { + return err + } + case "status": if value != nil { jtv, ok := value.(string) @@ -10993,6 +12711,46 @@ func awsAwsjson11_deserializeOpDocumentCreateBatchInferenceJobOutput(v **CreateB return nil } +func awsAwsjson11_deserializeOpDocumentCreateBatchSegmentJobOutput(v **CreateBatchSegmentJobOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateBatchSegmentJobOutput + if *v == nil { + sv = &CreateBatchSegmentJobOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "batchSegmentJobArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.BatchSegmentJobArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentCreateCampaignOutput(v **CreateCampaignOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -11104,6 +12862,15 @@ func awsAwsjson11_deserializeOpDocumentCreateDatasetGroupOutput(v **CreateDatase sv.DatasetGroupArn = ptr.String(jtv) } + case "domain": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Domain to be of type string, got %T instead", value) + } + sv.Domain = types.Domain(jtv) + } + default: _, _ = key, value @@ -11282,6 +13049,46 @@ func awsAwsjson11_deserializeOpDocumentCreateFilterOutput(v **CreateFilterOutput return nil } +func awsAwsjson11_deserializeOpDocumentCreateRecommenderOutput(v **CreateRecommenderOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateRecommenderOutput + if *v == nil { + sv = &CreateRecommenderOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "recommenderArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.RecommenderArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentCreateSchemaOutput(v **CreateSchemaOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -11474,6 +13281,42 @@ func awsAwsjson11_deserializeOpDocumentDescribeBatchInferenceJobOutput(v **Descr return nil } +func awsAwsjson11_deserializeOpDocumentDescribeBatchSegmentJobOutput(v **DescribeBatchSegmentJobOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeBatchSegmentJobOutput + if *v == nil { + sv = &DescribeBatchSegmentJobOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "batchSegmentJob": + if err := awsAwsjson11_deserializeDocumentBatchSegmentJob(&sv.BatchSegmentJob, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentDescribeCampaignOutput(v **DescribeCampaignOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -11798,6 +13641,42 @@ func awsAwsjson11_deserializeOpDocumentDescribeRecipeOutput(v **DescribeRecipeOu return nil } +func awsAwsjson11_deserializeOpDocumentDescribeRecommenderOutput(v **DescribeRecommenderOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeRecommenderOutput + if *v == nil { + sv = &DescribeRecommenderOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "recommender": + if err := awsAwsjson11_deserializeDocumentRecommender(&sv.Recommender, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentDescribeSchemaOutput(v **DescribeSchemaOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -11996,6 +13875,51 @@ func awsAwsjson11_deserializeOpDocumentListBatchInferenceJobsOutput(v **ListBatc return nil } +func awsAwsjson11_deserializeOpDocumentListBatchSegmentJobsOutput(v **ListBatchSegmentJobsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListBatchSegmentJobsOutput + if *v == nil { + sv = &ListBatchSegmentJobsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "batchSegmentJobs": + if err := awsAwsjson11_deserializeDocumentBatchSegmentJobs(&sv.BatchSegmentJobs, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentListCampaignsOutput(v **ListCampaignsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12356,6 +14280,51 @@ func awsAwsjson11_deserializeOpDocumentListRecipesOutput(v **ListRecipesOutput, return nil } +func awsAwsjson11_deserializeOpDocumentListRecommendersOutput(v **ListRecommendersOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListRecommendersOutput + if *v == nil { + sv = &ListRecommendersOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "recommenders": + if err := awsAwsjson11_deserializeDocumentRecommenders(&sv.Recommenders, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentListSchemasOutput(v **ListSchemasOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12530,3 +14499,43 @@ func awsAwsjson11_deserializeOpDocumentUpdateCampaignOutput(v **UpdateCampaignOu *v = sv return nil } + +func awsAwsjson11_deserializeOpDocumentUpdateRecommenderOutput(v **UpdateRecommenderOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateRecommenderOutput + if *v == nil { + sv = &UpdateRecommenderOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "recommenderArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.RecommenderArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} diff --git a/service/personalize/generated.json b/service/personalize/generated.json index e5bd22382ed..04cf244d956 100644 --- a/service/personalize/generated.json +++ b/service/personalize/generated.json @@ -8,6 +8,7 @@ "files": [ "api_client.go", "api_op_CreateBatchInferenceJob.go", + "api_op_CreateBatchSegmentJob.go", "api_op_CreateCampaign.go", "api_op_CreateDataset.go", "api_op_CreateDatasetExportJob.go", @@ -15,6 +16,7 @@ "api_op_CreateDatasetImportJob.go", "api_op_CreateEventTracker.go", "api_op_CreateFilter.go", + "api_op_CreateRecommender.go", "api_op_CreateSchema.go", "api_op_CreateSolution.go", "api_op_CreateSolutionVersion.go", @@ -23,10 +25,12 @@ "api_op_DeleteDatasetGroup.go", "api_op_DeleteEventTracker.go", "api_op_DeleteFilter.go", + "api_op_DeleteRecommender.go", "api_op_DeleteSchema.go", "api_op_DeleteSolution.go", "api_op_DescribeAlgorithm.go", "api_op_DescribeBatchInferenceJob.go", + "api_op_DescribeBatchSegmentJob.go", "api_op_DescribeCampaign.go", "api_op_DescribeDataset.go", "api_op_DescribeDatasetExportJob.go", @@ -36,11 +40,13 @@ "api_op_DescribeFeatureTransformation.go", "api_op_DescribeFilter.go", "api_op_DescribeRecipe.go", + "api_op_DescribeRecommender.go", "api_op_DescribeSchema.go", "api_op_DescribeSolution.go", "api_op_DescribeSolutionVersion.go", "api_op_GetSolutionMetrics.go", "api_op_ListBatchInferenceJobs.go", + "api_op_ListBatchSegmentJobs.go", "api_op_ListCampaigns.go", "api_op_ListDatasetExportJobs.go", "api_op_ListDatasetGroups.go", @@ -49,11 +55,13 @@ "api_op_ListEventTrackers.go", "api_op_ListFilters.go", "api_op_ListRecipes.go", + "api_op_ListRecommenders.go", "api_op_ListSchemas.go", "api_op_ListSolutionVersions.go", "api_op_ListSolutions.go", "api_op_StopSolutionVersionCreation.go", "api_op_UpdateCampaign.go", + "api_op_UpdateRecommender.go", "deserializers.go", "doc.go", "endpoints.go", diff --git a/service/personalize/serializers.go b/service/personalize/serializers.go index 9fb16a5b48c..a1c4909462d 100644 --- a/service/personalize/serializers.go +++ b/service/personalize/serializers.go @@ -71,6 +71,61 @@ func (m *awsAwsjson11_serializeOpCreateBatchInferenceJob) HandleSerialize(ctx co return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpCreateBatchSegmentJob struct { +} + +func (*awsAwsjson11_serializeOpCreateBatchSegmentJob) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateBatchSegmentJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateBatchSegmentJobInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonPersonalize.CreateBatchSegmentJob") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateBatchSegmentJobInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpCreateCampaign struct { } @@ -456,6 +511,61 @@ func (m *awsAwsjson11_serializeOpCreateFilter) HandleSerialize(ctx context.Conte return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpCreateRecommender struct { +} + +func (*awsAwsjson11_serializeOpCreateRecommender) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateRecommender) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateRecommenderInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonPersonalize.CreateRecommender") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateRecommenderInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpCreateSchema struct { } @@ -896,6 +1006,61 @@ func (m *awsAwsjson11_serializeOpDeleteFilter) HandleSerialize(ctx context.Conte return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDeleteRecommender struct { +} + +func (*awsAwsjson11_serializeOpDeleteRecommender) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteRecommender) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteRecommenderInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonPersonalize.DeleteRecommender") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteRecommenderInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpDeleteSchema struct { } @@ -1116,6 +1281,61 @@ func (m *awsAwsjson11_serializeOpDescribeBatchInferenceJob) HandleSerialize(ctx return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDescribeBatchSegmentJob struct { +} + +func (*awsAwsjson11_serializeOpDescribeBatchSegmentJob) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeBatchSegmentJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeBatchSegmentJobInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonPersonalize.DescribeBatchSegmentJob") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeBatchSegmentJobInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpDescribeCampaign struct { } @@ -1611,6 +1831,61 @@ func (m *awsAwsjson11_serializeOpDescribeRecipe) HandleSerialize(ctx context.Con return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDescribeRecommender struct { +} + +func (*awsAwsjson11_serializeOpDescribeRecommender) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeRecommender) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeRecommenderInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonPersonalize.DescribeRecommender") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeRecommenderInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpDescribeSchema struct { } @@ -1886,14 +2161,14 @@ func (m *awsAwsjson11_serializeOpListBatchInferenceJobs) HandleSerialize(ctx con return next.HandleSerialize(ctx, in) } -type awsAwsjson11_serializeOpListCampaigns struct { +type awsAwsjson11_serializeOpListBatchSegmentJobs struct { } -func (*awsAwsjson11_serializeOpListCampaigns) ID() string { +func (*awsAwsjson11_serializeOpListBatchSegmentJobs) ID() string { return "OperationSerializer" } -func (m *awsAwsjson11_serializeOpListCampaigns) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson11_serializeOpListBatchSegmentJobs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1901,7 +2176,7 @@ func (m *awsAwsjson11_serializeOpListCampaigns) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListCampaignsInput) + input, ok := in.Parameters.(*ListBatchSegmentJobsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1922,10 +2197,10 @@ func (m *awsAwsjson11_serializeOpListCampaigns) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonPersonalize.ListCampaigns") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonPersonalize.ListBatchSegmentJobs") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentListCampaignsInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson11_serializeOpDocumentListBatchSegmentJobsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1941,14 +2216,69 @@ func (m *awsAwsjson11_serializeOpListCampaigns) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } -type awsAwsjson11_serializeOpListDatasetExportJobs struct { +type awsAwsjson11_serializeOpListCampaigns struct { } -func (*awsAwsjson11_serializeOpListDatasetExportJobs) ID() string { +func (*awsAwsjson11_serializeOpListCampaigns) ID() string { return "OperationSerializer" } -func (m *awsAwsjson11_serializeOpListDatasetExportJobs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson11_serializeOpListCampaigns) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListCampaignsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonPersonalize.ListCampaigns") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListCampaignsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListDatasetExportJobs struct { +} + +func (*awsAwsjson11_serializeOpListDatasetExportJobs) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListDatasetExportJobs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2326,6 +2656,61 @@ func (m *awsAwsjson11_serializeOpListRecipes) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpListRecommenders struct { +} + +func (*awsAwsjson11_serializeOpListRecommenders) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListRecommenders) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListRecommendersInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonPersonalize.ListRecommenders") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListRecommendersInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpListSchemas struct { } @@ -2600,6 +2985,61 @@ func (m *awsAwsjson11_serializeOpUpdateCampaign) HandleSerialize(ctx context.Con return next.HandleSerialize(ctx, in) } + +type awsAwsjson11_serializeOpUpdateRecommender struct { +} + +func (*awsAwsjson11_serializeOpUpdateRecommender) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateRecommender) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateRecommenderInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonPersonalize.UpdateRecommender") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateRecommenderInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} func awsAwsjson11_serializeDocumentArnList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -2672,6 +3112,34 @@ func awsAwsjson11_serializeDocumentBatchInferenceJobOutput(v *types.BatchInferen return nil } +func awsAwsjson11_serializeDocumentBatchSegmentJobInput(v *types.BatchSegmentJobInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.S3DataSource != nil { + ok := object.Key("s3DataSource") + if err := awsAwsjson11_serializeDocumentS3DataConfig(v.S3DataSource, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentBatchSegmentJobOutput(v *types.BatchSegmentJobOutput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.S3DataDestination != nil { + ok := object.Key("s3DataDestination") + if err := awsAwsjson11_serializeDocumentS3DataConfig(v.S3DataDestination, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeDocumentCampaignConfig(v *types.CampaignConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2985,6 +3453,20 @@ func awsAwsjson11_serializeDocumentOptimizationObjective(v *types.OptimizationOb return nil } +func awsAwsjson11_serializeDocumentRecommenderConfig(v *types.RecommenderConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ItemExplorationConfig != nil { + ok := object.Key("itemExplorationConfig") + if err := awsAwsjson11_serializeDocumentHyperParameters(v.ItemExplorationConfig, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeDocumentS3DataConfig(v *types.S3DataConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3102,6 +3584,52 @@ func awsAwsjson11_serializeOpDocumentCreateBatchInferenceJobInput(v *CreateBatch return nil } +func awsAwsjson11_serializeOpDocumentCreateBatchSegmentJobInput(v *CreateBatchSegmentJobInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FilterArn != nil { + ok := object.Key("filterArn") + ok.String(*v.FilterArn) + } + + if v.JobInput != nil { + ok := object.Key("jobInput") + if err := awsAwsjson11_serializeDocumentBatchSegmentJobInput(v.JobInput, ok); err != nil { + return err + } + } + + if v.JobName != nil { + ok := object.Key("jobName") + ok.String(*v.JobName) + } + + if v.JobOutput != nil { + ok := object.Key("jobOutput") + if err := awsAwsjson11_serializeDocumentBatchSegmentJobOutput(v.JobOutput, ok); err != nil { + return err + } + } + + if v.NumResults != nil { + ok := object.Key("numResults") + ok.Integer(*v.NumResults) + } + + if v.RoleArn != nil { + ok := object.Key("roleArn") + ok.String(*v.RoleArn) + } + + if v.SolutionVersionArn != nil { + ok := object.Key("solutionVersionArn") + ok.String(*v.SolutionVersionArn) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentCreateCampaignInput(v *CreateCampaignInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3169,6 +3697,11 @@ func awsAwsjson11_serializeOpDocumentCreateDatasetGroupInput(v *CreateDatasetGro object := value.Object() defer object.Close() + if len(v.Domain) > 0 { + ok := object.Key("domain") + ok.String(string(v.Domain)) + } + if v.KmsKeyArn != nil { ok := object.Key("kmsKeyArn") ok.String(*v.KmsKeyArn) @@ -3282,10 +3815,44 @@ func awsAwsjson11_serializeOpDocumentCreateFilterInput(v *CreateFilterInput, val return nil } +func awsAwsjson11_serializeOpDocumentCreateRecommenderInput(v *CreateRecommenderInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DatasetGroupArn != nil { + ok := object.Key("datasetGroupArn") + ok.String(*v.DatasetGroupArn) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.RecipeArn != nil { + ok := object.Key("recipeArn") + ok.String(*v.RecipeArn) + } + + if v.RecommenderConfig != nil { + ok := object.Key("recommenderConfig") + if err := awsAwsjson11_serializeDocumentRecommenderConfig(v.RecommenderConfig, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeOpDocumentCreateSchemaInput(v *CreateSchemaInput, value smithyjson.Value) error { object := value.Object() defer object.Close() + if len(v.Domain) > 0 { + ok := object.Key("domain") + ok.String(string(v.Domain)) + } + if v.Name != nil { ok := object.Key("name") ok.String(*v.Name) @@ -3420,6 +3987,18 @@ func awsAwsjson11_serializeOpDocumentDeleteFilterInput(v *DeleteFilterInput, val return nil } +func awsAwsjson11_serializeOpDocumentDeleteRecommenderInput(v *DeleteRecommenderInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RecommenderArn != nil { + ok := object.Key("recommenderArn") + ok.String(*v.RecommenderArn) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDeleteSchemaInput(v *DeleteSchemaInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3468,6 +4047,18 @@ func awsAwsjson11_serializeOpDocumentDescribeBatchInferenceJobInput(v *DescribeB return nil } +func awsAwsjson11_serializeOpDocumentDescribeBatchSegmentJobInput(v *DescribeBatchSegmentJobInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BatchSegmentJobArn != nil { + ok := object.Key("batchSegmentJobArn") + ok.String(*v.BatchSegmentJobArn) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDescribeCampaignInput(v *DescribeCampaignInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3576,6 +4167,18 @@ func awsAwsjson11_serializeOpDocumentDescribeRecipeInput(v *DescribeRecipeInput, return nil } +func awsAwsjson11_serializeOpDocumentDescribeRecommenderInput(v *DescribeRecommenderInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RecommenderArn != nil { + ok := object.Key("recommenderArn") + ok.String(*v.RecommenderArn) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDescribeSchemaInput(v *DescribeSchemaInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3646,6 +4249,28 @@ func awsAwsjson11_serializeOpDocumentListBatchInferenceJobsInput(v *ListBatchInf return nil } +func awsAwsjson11_serializeOpDocumentListBatchSegmentJobsInput(v *ListBatchSegmentJobsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.SolutionVersionArn != nil { + ok := object.Key("solutionVersionArn") + ok.String(*v.SolutionVersionArn) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentListCampaignsInput(v *ListCampaignsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3799,6 +4424,11 @@ func awsAwsjson11_serializeOpDocumentListRecipesInput(v *ListRecipesInput, value object := value.Object() defer object.Close() + if len(v.Domain) > 0 { + ok := object.Key("domain") + ok.String(string(v.Domain)) + } + if v.MaxResults != nil { ok := object.Key("maxResults") ok.Integer(*v.MaxResults) @@ -3817,6 +4447,28 @@ func awsAwsjson11_serializeOpDocumentListRecipesInput(v *ListRecipesInput, value return nil } +func awsAwsjson11_serializeOpDocumentListRecommendersInput(v *ListRecommendersInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DatasetGroupArn != nil { + ok := object.Key("datasetGroupArn") + ok.String(*v.DatasetGroupArn) + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentListSchemasInput(v *ListSchemasInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3918,3 +4570,22 @@ func awsAwsjson11_serializeOpDocumentUpdateCampaignInput(v *UpdateCampaignInput, return nil } + +func awsAwsjson11_serializeOpDocumentUpdateRecommenderInput(v *UpdateRecommenderInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RecommenderArn != nil { + ok := object.Key("recommenderArn") + ok.String(*v.RecommenderArn) + } + + if v.RecommenderConfig != nil { + ok := object.Key("recommenderConfig") + if err := awsAwsjson11_serializeDocumentRecommenderConfig(v.RecommenderConfig, ok); err != nil { + return err + } + } + + return nil +} diff --git a/service/personalize/types/enums.go b/service/personalize/types/enums.go index 3a0d34d0f9a..6be4c67fd2c 100644 --- a/service/personalize/types/enums.go +++ b/service/personalize/types/enums.go @@ -2,6 +2,24 @@ package types +type Domain string + +// Enum values for Domain +const ( + DomainEcommerce Domain = "ECOMMERCE" + DomainVideoOnDemand Domain = "VIDEO_ON_DEMAND" +) + +// Values returns all known values for Domain. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (Domain) Values() []Domain { + return []Domain{ + "ECOMMERCE", + "VIDEO_ON_DEMAND", + } +} + type IngestionMode string // Enum values for IngestionMode diff --git a/service/personalize/types/types.go b/service/personalize/types/types.go index d901efe94d7..0615c7df993 100644 --- a/service/personalize/types/types.go +++ b/service/personalize/types/types.go @@ -218,7 +218,123 @@ type BatchInferenceJobSummary struct { noSmithyDocumentSerde } -// Describes a deployed solution version, otherwise known as a campaign. For more +// Contains information on a batch segment job. +type BatchSegmentJob struct { + + // The Amazon Resource Name (ARN) of the batch segment job. + BatchSegmentJobArn *string + + // The time at which the batch segment job was created. + CreationDateTime *time.Time + + // If the batch segment job failed, the reason for the failure. + FailureReason *string + + // The ARN of the filter used on the batch segment job. + FilterArn *string + + // The Amazon S3 path that leads to the input data used to generate the batch + // segment job. + JobInput *BatchSegmentJobInput + + // The name of the batch segment job. + JobName *string + + // The Amazon S3 bucket that contains the output data generated by the batch + // segment job. + JobOutput *BatchSegmentJobOutput + + // The time at which the batch segment job last updated. + LastUpdatedDateTime *time.Time + + // The number of predicted users generated by the batch segment job for each line + // of input data. + NumResults *int32 + + // The ARN of the Amazon Identity and Access Management (IAM) role that requested + // the batch segment job. + RoleArn *string + + // The Amazon Resource Name (ARN) of the solution version used by the batch segment + // job to generate batch segments. + SolutionVersionArn *string + + // The status of the batch segment job. The status is one of the following + // values: + // + // * PENDING + // + // * IN PROGRESS + // + // * ACTIVE + // + // * CREATE FAILED + Status *string + + noSmithyDocumentSerde +} + +// The input configuration of a batch segment job. +type BatchSegmentJobInput struct { + + // The configuration details of an Amazon S3 input or output bucket. + // + // This member is required. + S3DataSource *S3DataConfig + + noSmithyDocumentSerde +} + +// The output configuration parameters of a batch segment job. +type BatchSegmentJobOutput struct { + + // The configuration details of an Amazon S3 input or output bucket. + // + // This member is required. + S3DataDestination *S3DataConfig + + noSmithyDocumentSerde +} + +// A truncated version of the BatchSegmentJob datatype. The ListBatchSegmentJobs +// operation returns a list of batch segment job summaries. +type BatchSegmentJobSummary struct { + + // The Amazon Resource Name (ARN) of the batch segment job. + BatchSegmentJobArn *string + + // The time at which the batch segment job was created. + CreationDateTime *time.Time + + // If the batch segment job failed, the reason for the failure. + FailureReason *string + + // The name of the batch segment job. + JobName *string + + // The time at which the batch segment job was last updated. + LastUpdatedDateTime *time.Time + + // The Amazon Resource Name (ARN) of the solution version used by the batch segment + // job to generate batch segments. + SolutionVersionArn *string + + // The status of the batch segment job. The status is one of the following + // values: + // + // * PENDING + // + // * IN PROGRESS + // + // * ACTIVE + // + // * CREATE FAILED + Status *string + + noSmithyDocumentSerde +} + +// An object that describes the deployment of a solution version. For more // information on campaigns, see CreateCampaign. type Campaign struct { @@ -266,11 +382,11 @@ type Campaign struct { // The configuration details of a campaign. type CampaignConfig struct { - // A string to string map specifying the exploration configuration hyperparameters, - // including explorationWeight and explorationItemAgeCutOff, you want to use to - // configure the amount of item exploration Amazon Personalize uses when - // recommending items. Provide itemExplorationConfig data only if your solution - // uses the User-Personalization + // Specifies the exploration configuration hyperparameters, including + // explorationWeight and explorationItemAgeCutOff, you want to use to configure the + // amount of item exploration Amazon Personalize uses when recommending items. + // Provide itemExplorationConfig data only if your solution uses the + // User-Personalization // (https://docs.aws.amazon.com/personalize/latest/dg/native-recipe-new-item-USER_PERSONALIZATION.html) // recipe. ItemExplorationConfig map[string]string @@ -519,6 +635,9 @@ type DatasetGroup struct { // The Amazon Resource Name (ARN) of the dataset group. DatasetGroupArn *string + // The domain of a Domain dataset group. + Domain Domain + // If creating a dataset group fails, provides the reason why. FailureReason *string @@ -557,6 +676,9 @@ type DatasetGroupSummary struct { // The Amazon Resource Name (ARN) of the dataset group. DatasetGroupArn *string + // The domain of a Domain dataset group. + Domain Domain + // If creating a dataset group fails, the reason behind the failure. FailureReason *string @@ -658,6 +780,9 @@ type DatasetSchema struct { // The date and time (in Unix time) that the schema was created. CreationDateTime *time.Time + // The domain of a schema that you created for a dataset in a Domain dataset group. + Domain Domain + // The date and time (in Unix time) that the schema was last updated. LastUpdatedDateTime *time.Time @@ -680,6 +805,9 @@ type DatasetSchemaSummary struct { // The date and time (in Unix time) that the schema was created. CreationDateTime *time.Time + // The domain of a schema that you created for a dataset in a Domain dataset group. + Domain Domain + // The date and time (in Unix time) that the schema was last updated. LastUpdatedDateTime *time.Time @@ -1116,6 +1244,9 @@ type RecipeSummary struct { // The date and time (in Unix time) that the recipe was created. CreationDateTime *time.Time + // The domain of the recipe (if the recipe is a Domain dataset group use case). + Domain Domain + // The date and time (in Unix time) that the recipe was last updated. LastUpdatedDateTime *time.Time @@ -1131,6 +1262,133 @@ type RecipeSummary struct { noSmithyDocumentSerde } +// Describes a recommendation generator for a Domain dataset group. You create a +// recommender in a Domain dataset group for a specific domain use case (domain +// recipe), and specify the recommender in a GetRecommendations +// (https://docs.aws.amazon.com/personalize/latest/dg/API_RS_GetRecommendations.html) +// request. +type Recommender struct { + + // The date and time (in Unix format) that the recommender was created. + CreationDateTime *time.Time + + // The Amazon Resource Name (ARN) of the Domain dataset group that contains the + // recommender. + DatasetGroupArn *string + + // If a recommender fails, the reason behind the failure. + FailureReason *string + + // The date and time (in Unix format) that the recommender was last updated. + LastUpdatedDateTime *time.Time + + // Provides a summary of the latest updates to the recommender. + LatestRecommenderUpdate *RecommenderUpdateSummary + + // The name of the recommender. + Name *string + + // The Amazon Resource Name (ARN) of the recipe (Domain dataset group use case) + // that the recommender was created for. + RecipeArn *string + + // The Amazon Resource Name (ARN) of the recommender. + RecommenderArn *string + + // The configuration details of the recommender. + RecommenderConfig *RecommenderConfig + + // The status of the recommender. A recommender can be in one of the following + // states: + // + // * CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED + // + // * + // DELETE PENDING > DELETE IN_PROGRESS + Status *string + + noSmithyDocumentSerde +} + +// The configuration details of the recommender. +type RecommenderConfig struct { + + // Specifies the exploration configuration hyperparameters, including + // explorationWeight and explorationItemAgeCutOff, you want to use to configure the + // amount of item exploration Amazon Personalize uses when recommending items. + // Provide itemExplorationConfig data only if your recommenders generate + // personalized recommendations for a user (not popular items or similar items). + ItemExplorationConfig map[string]string + + noSmithyDocumentSerde +} + +// Provides a summary of the properties of the recommender. +type RecommenderSummary struct { + + // The date and time (in Unix format) that the recommender was created. + CreationDateTime *time.Time + + // The Amazon Resource Name (ARN) of the Domain dataset group that contains the + // recommender. + DatasetGroupArn *string + + // The date and time (in Unix format) that the recommender was last updated. + LastUpdatedDateTime *time.Time + + // The name of the recommender. + Name *string + + // The Amazon Resource Name (ARN) of the recipe (Domain dataset group use case) + // that the recommender was created for. + RecipeArn *string + + // The Amazon Resource Name (ARN) of the recommender. + RecommenderArn *string + + // The configuration details of the recommender. + RecommenderConfig *RecommenderConfig + + // The status of the recommender. A recommender can be in one of the following + // states: + // + // * CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED + // + // * + // DELETE PENDING > DELETE IN_PROGRESS + Status *string + + noSmithyDocumentSerde +} + +// Provides a summary of the properties of a recommender update. For a complete +// listing, call the DescribeRecommender API. +type RecommenderUpdateSummary struct { + + // The date and time (in Unix format) that the recommender update was created. + CreationDateTime *time.Time + + // If a recommender update fails, the reason behind the failure. + FailureReason *string + + // The date and time (in Unix time) that the recommender update was last updated. + LastUpdatedDateTime *time.Time + + // The configuration details of the recommender update. + RecommenderConfig *RecommenderConfig + + // The status of the recommender update. A recommender can be in one of the + // following states: + // + // * CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE + // FAILED + // + // * DELETE PENDING > DELETE IN_PROGRESS + Status *string + + noSmithyDocumentSerde +} + // The configuration details of an Amazon S3 input or output bucket. type S3DataConfig struct { @@ -1263,7 +1521,8 @@ type SolutionSummary struct { noSmithyDocumentSerde } -// An object that provides information about a specific version of a Solution. +// An object that provides information about a specific version of a Solution in a +// Custom dataset group. type SolutionVersion struct { // The date and time (in Unix time) that this version of the solution was created. diff --git a/service/personalize/validators.go b/service/personalize/validators.go index a978fbf2632..bc7966936cc 100644 --- a/service/personalize/validators.go +++ b/service/personalize/validators.go @@ -30,6 +30,26 @@ func (m *validateOpCreateBatchInferenceJob) HandleInitialize(ctx context.Context return next.HandleInitialize(ctx, in) } +type validateOpCreateBatchSegmentJob struct { +} + +func (*validateOpCreateBatchSegmentJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateBatchSegmentJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateBatchSegmentJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateBatchSegmentJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateCampaign struct { } @@ -170,6 +190,26 @@ func (m *validateOpCreateFilter) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpCreateRecommender struct { +} + +func (*validateOpCreateRecommender) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateRecommender) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateRecommenderInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateRecommenderInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateSchema struct { } @@ -330,6 +370,26 @@ func (m *validateOpDeleteFilter) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpDeleteRecommender struct { +} + +func (*validateOpDeleteRecommender) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteRecommender) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteRecommenderInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteRecommenderInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteSchema struct { } @@ -410,6 +470,26 @@ func (m *validateOpDescribeBatchInferenceJob) HandleInitialize(ctx context.Conte return next.HandleInitialize(ctx, in) } +type validateOpDescribeBatchSegmentJob struct { +} + +func (*validateOpDescribeBatchSegmentJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeBatchSegmentJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeBatchSegmentJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeBatchSegmentJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeCampaign struct { } @@ -590,6 +670,26 @@ func (m *validateOpDescribeRecipe) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } +type validateOpDescribeRecommender struct { +} + +func (*validateOpDescribeRecommender) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeRecommender) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeRecommenderInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeRecommenderInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeSchema struct { } @@ -710,10 +810,34 @@ func (m *validateOpUpdateCampaign) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } +type validateOpUpdateRecommender struct { +} + +func (*validateOpUpdateRecommender) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateRecommender) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateRecommenderInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateRecommenderInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + func addOpCreateBatchInferenceJobValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateBatchInferenceJob{}, middleware.After) } +func addOpCreateBatchSegmentJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateBatchSegmentJob{}, middleware.After) +} + func addOpCreateCampaignValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateCampaign{}, middleware.After) } @@ -742,6 +866,10 @@ func addOpCreateFilterValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateFilter{}, middleware.After) } +func addOpCreateRecommenderValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateRecommender{}, middleware.After) +} + func addOpCreateSchemaValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateSchema{}, middleware.After) } @@ -774,6 +902,10 @@ func addOpDeleteFilterValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteFilter{}, middleware.After) } +func addOpDeleteRecommenderValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteRecommender{}, middleware.After) +} + func addOpDeleteSchemaValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteSchema{}, middleware.After) } @@ -790,6 +922,10 @@ func addOpDescribeBatchInferenceJobValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpDescribeBatchInferenceJob{}, middleware.After) } +func addOpDescribeBatchSegmentJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeBatchSegmentJob{}, middleware.After) +} + func addOpDescribeCampaignValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeCampaign{}, middleware.After) } @@ -826,6 +962,10 @@ func addOpDescribeRecipeValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeRecipe{}, middleware.After) } +func addOpDescribeRecommenderValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeRecommender{}, middleware.After) +} + func addOpDescribeSchemaValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeSchema{}, middleware.After) } @@ -850,6 +990,10 @@ func addOpUpdateCampaignValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateCampaign{}, middleware.After) } +func addOpUpdateRecommenderValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateRecommender{}, middleware.After) +} + func validateBatchInferenceJobInput(v *types.BatchInferenceJobInput) error { if v == nil { return nil @@ -888,6 +1032,44 @@ func validateBatchInferenceJobOutput(v *types.BatchInferenceJobOutput) error { } } +func validateBatchSegmentJobInput(v *types.BatchSegmentJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchSegmentJobInput"} + if v.S3DataSource == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3DataSource")) + } else if v.S3DataSource != nil { + if err := validateS3DataConfig(v.S3DataSource); err != nil { + invalidParams.AddNested("S3DataSource", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateBatchSegmentJobOutput(v *types.BatchSegmentJobOutput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchSegmentJobOutput"} + if v.S3DataDestination == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3DataDestination")) + } else if v.S3DataDestination != nil { + if err := validateS3DataConfig(v.S3DataDestination); err != nil { + invalidParams.AddNested("S3DataDestination", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateDatasetExportJobOutput(v *types.DatasetExportJobOutput) error { if v == nil { return nil @@ -957,6 +1139,41 @@ func validateOpCreateBatchInferenceJobInput(v *CreateBatchInferenceJobInput) err } } +func validateOpCreateBatchSegmentJobInput(v *CreateBatchSegmentJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateBatchSegmentJobInput"} + if v.JobName == nil { + invalidParams.Add(smithy.NewErrParamRequired("JobName")) + } + if v.SolutionVersionArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("SolutionVersionArn")) + } + if v.JobInput == nil { + invalidParams.Add(smithy.NewErrParamRequired("JobInput")) + } else if v.JobInput != nil { + if err := validateBatchSegmentJobInput(v.JobInput); err != nil { + invalidParams.AddNested("JobInput", err.(smithy.InvalidParamsError)) + } + } + if v.JobOutput == nil { + invalidParams.Add(smithy.NewErrParamRequired("JobOutput")) + } else if v.JobOutput != nil { + if err := validateBatchSegmentJobOutput(v.JobOutput); err != nil { + invalidParams.AddNested("JobOutput", err.(smithy.InvalidParamsError)) + } + } + if v.RoleArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateCampaignInput(v *CreateCampaignInput) error { if v == nil { return nil @@ -1105,6 +1322,27 @@ func validateOpCreateFilterInput(v *CreateFilterInput) error { } } +func validateOpCreateRecommenderInput(v *CreateRecommenderInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateRecommenderInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.DatasetGroupArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("DatasetGroupArn")) + } + if v.RecipeArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("RecipeArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateSchemaInput(v *CreateSchemaInput) error { if v == nil { return nil @@ -1231,6 +1469,21 @@ func validateOpDeleteFilterInput(v *DeleteFilterInput) error { } } +func validateOpDeleteRecommenderInput(v *DeleteRecommenderInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteRecommenderInput"} + if v.RecommenderArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("RecommenderArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteSchemaInput(v *DeleteSchemaInput) error { if v == nil { return nil @@ -1291,6 +1544,21 @@ func validateOpDescribeBatchInferenceJobInput(v *DescribeBatchInferenceJobInput) } } +func validateOpDescribeBatchSegmentJobInput(v *DescribeBatchSegmentJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeBatchSegmentJobInput"} + if v.BatchSegmentJobArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("BatchSegmentJobArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeCampaignInput(v *DescribeCampaignInput) error { if v == nil { return nil @@ -1426,6 +1694,21 @@ func validateOpDescribeRecipeInput(v *DescribeRecipeInput) error { } } +func validateOpDescribeRecommenderInput(v *DescribeRecommenderInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeRecommenderInput"} + if v.RecommenderArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("RecommenderArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeSchemaInput(v *DescribeSchemaInput) error { if v == nil { return nil @@ -1515,3 +1798,21 @@ func validateOpUpdateCampaignInput(v *UpdateCampaignInput) error { return nil } } + +func validateOpUpdateRecommenderInput(v *UpdateRecommenderInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateRecommenderInput"} + if v.RecommenderArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("RecommenderArn")) + } + if v.RecommenderConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("RecommenderConfig")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/personalizeruntime/api_op_GetRecommendations.go b/service/personalizeruntime/api_op_GetRecommendations.go index 21643cc5309..6f33df28dda 100644 --- a/service/personalizeruntime/api_op_GetRecommendations.go +++ b/service/personalizeruntime/api_op_GetRecommendations.go @@ -11,17 +11,22 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Returns a list of recommended items. The required input depends on the recipe -// type used to create the solution backing the campaign, as follows: +// Returns a list of recommended items. For campaigns, the campaign's Amazon +// Resource Name (ARN) is required and the required user and item input depends on +// the recipe type used to create the solution backing the campaign as follows: // // * -// RELATED_ITEMS - itemId required, userId not used +// USER_PERSONALIZATION - userId required, itemId not used // -// * USER_PERSONALIZATION - -// itemId optional, userId required +// * RELATED_ITEMS - +// itemId required, userId not used // // Campaigns that are backed by a solution -// created using a recipe of type PERSONALIZED_RANKING use the API. +// created using a recipe of type PERSONALIZED_RANKING use the API. For +// recommenders, the recommender's ARN is required and the required item and user +// input depends on the use case (domain-based recipe) backing the recommender. For +// information on use case requirements see Choosing recommender use cases +// (https://docs.aws.amazon.com/personalize/latest/dg/domain-use-cases.html). func (c *Client) GetRecommendations(ctx context.Context, params *GetRecommendationsInput, optFns ...func(*Options)) (*GetRecommendationsOutput, error) { if params == nil { params = &GetRecommendationsInput{} @@ -41,8 +46,6 @@ type GetRecommendationsInput struct { // The Amazon Resource Name (ARN) of the campaign to use for getting // recommendations. - // - // This member is required. CampaignArn *string // The contextual metadata to use when getting recommendations. Contextual metadata @@ -75,6 +78,11 @@ type GetRecommendationsInput struct { // The number of results to return. The default is 25. The maximum is 500. NumResults int32 + // The Amazon Resource Name (ARN) of the recommender to use to get recommendations. + // Provide a recommender ARN if you created a Domain dataset group with a + // recommender for a domain use case. + RecommenderArn *string + // The user ID to provide recommendations for. Required for USER_PERSONALIZATION // recipe type. UserId *string @@ -84,7 +92,7 @@ type GetRecommendationsInput struct { type GetRecommendationsOutput struct { - // A list of recommendations sorted in ascending order by prediction score. There + // A list of recommendations sorted in descending order by prediction score. There // can be a maximum of 500 items in the list. ItemList []types.PredictedItem @@ -142,9 +150,6 @@ func (c *Client) addOperationGetRecommendationsMiddlewares(stack *middleware.Sta if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addOpGetRecommendationsValidationMiddleware(stack); err != nil { - return err - } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRecommendations(options.Region), middleware.Before); err != nil { return err } diff --git a/service/personalizeruntime/serializers.go b/service/personalizeruntime/serializers.go index 3508cd8f873..e4bc2ecb635 100644 --- a/service/personalizeruntime/serializers.go +++ b/service/personalizeruntime/serializers.go @@ -206,6 +206,11 @@ func awsRestjson1_serializeOpDocumentGetRecommendationsInput(v *GetRecommendatio ok.Integer(v.NumResults) } + if v.RecommenderArn != nil { + ok := object.Key("recommenderArn") + ok.String(*v.RecommenderArn) + } + if v.UserId != nil { ok := object.Key("userId") ok.String(*v.UserId) diff --git a/service/personalizeruntime/validators.go b/service/personalizeruntime/validators.go index bd489c0b3bc..479c3b048aa 100644 --- a/service/personalizeruntime/validators.go +++ b/service/personalizeruntime/validators.go @@ -29,34 +29,10 @@ func (m *validateOpGetPersonalizedRanking) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } -type validateOpGetRecommendations struct { -} - -func (*validateOpGetRecommendations) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetRecommendations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetRecommendationsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetRecommendationsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - func addOpGetPersonalizedRankingValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetPersonalizedRanking{}, middleware.After) } -func addOpGetRecommendationsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetRecommendations{}, middleware.After) -} - func validateOpGetPersonalizedRankingInput(v *GetPersonalizedRankingInput) error { if v == nil { return nil @@ -77,18 +53,3 @@ func validateOpGetPersonalizedRankingInput(v *GetPersonalizedRankingInput) error return nil } } - -func validateOpGetRecommendationsInput(v *GetRecommendationsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetRecommendationsInput"} - if v.CampaignArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("CampaignArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} diff --git a/service/pinpoint/api_op_SendOTPMessage.go b/service/pinpoint/api_op_SendOTPMessage.go new file mode 100644 index 00000000000..22050ef769c --- /dev/null +++ b/service/pinpoint/api_op_SendOTPMessage.go @@ -0,0 +1,129 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package pinpoint + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/pinpoint/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Send an OTP message +func (c *Client) SendOTPMessage(ctx context.Context, params *SendOTPMessageInput, optFns ...func(*Options)) (*SendOTPMessageOutput, error) { + if params == nil { + params = &SendOTPMessageInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SendOTPMessage", params, optFns, c.addOperationSendOTPMessageMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SendOTPMessageOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SendOTPMessageInput struct { + + // The unique ID of your Amazon Pinpoint application. + // + // This member is required. + ApplicationId *string + + // Send OTP message request parameters. + // + // This member is required. + SendOTPMessageRequestParameters *types.SendOTPMessageRequestParameters + + noSmithyDocumentSerde +} + +type SendOTPMessageOutput struct { + + // Provides information about the results of a request to send a message to an + // endpoint address. + // + // This member is required. + MessageResponse *types.MessageResponse + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSendOTPMessageMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpSendOTPMessage{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpSendOTPMessage{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpSendOTPMessageValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSendOTPMessage(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opSendOTPMessage(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mobiletargeting", + OperationName: "SendOTPMessage", + } +} diff --git a/service/pinpoint/api_op_VerifyOTPMessage.go b/service/pinpoint/api_op_VerifyOTPMessage.go new file mode 100644 index 00000000000..94d0ef58c3a --- /dev/null +++ b/service/pinpoint/api_op_VerifyOTPMessage.go @@ -0,0 +1,128 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package pinpoint + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/pinpoint/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Verify an OTP +func (c *Client) VerifyOTPMessage(ctx context.Context, params *VerifyOTPMessageInput, optFns ...func(*Options)) (*VerifyOTPMessageOutput, error) { + if params == nil { + params = &VerifyOTPMessageInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "VerifyOTPMessage", params, optFns, c.addOperationVerifyOTPMessageMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*VerifyOTPMessageOutput) + out.ResultMetadata = metadata + return out, nil +} + +type VerifyOTPMessageInput struct { + + // The unique ID of your Amazon Pinpoint application. + // + // This member is required. + ApplicationId *string + + // Verify OTP message request. + // + // This member is required. + VerifyOTPMessageRequestParameters *types.VerifyOTPMessageRequestParameters + + noSmithyDocumentSerde +} + +type VerifyOTPMessageOutput struct { + + // Verify OTP Message Response. + // + // This member is required. + VerificationResponse *types.VerificationResponse + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationVerifyOTPMessageMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpVerifyOTPMessage{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpVerifyOTPMessage{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpVerifyOTPMessageValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opVerifyOTPMessage(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opVerifyOTPMessage(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mobiletargeting", + OperationName: "VerifyOTPMessage", + } +} diff --git a/service/pinpoint/deserializers.go b/service/pinpoint/deserializers.go index 9bfe7397949..5ad4e74cb77 100644 --- a/service/pinpoint/deserializers.go +++ b/service/pinpoint/deserializers.go @@ -14814,6 +14814,171 @@ func awsRestjson1_deserializeOpDocumentSendMessagesOutput(v **SendMessagesOutput return nil } +type awsRestjson1_deserializeOpSendOTPMessage struct { +} + +func (*awsRestjson1_deserializeOpSendOTPMessage) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpSendOTPMessage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorSendOTPMessage(response, &metadata) + } + output := &SendOTPMessageOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeDocumentMessageResponse(&output.MessageResponse, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorSendOTPMessage(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("MethodNotAllowedException", errorCode): + return awsRestjson1_deserializeErrorMethodNotAllowedException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("PayloadTooLargeException", errorCode): + return awsRestjson1_deserializeErrorPayloadTooLargeException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentSendOTPMessageOutput(v **SendOTPMessageOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *SendOTPMessageOutput + if *v == nil { + sv = &SendOTPMessageOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "MessageResponse": + if err := awsRestjson1_deserializeDocumentMessageResponse(&sv.MessageResponse, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpSendUsersMessages struct { } @@ -19114,6 +19279,171 @@ func awsRestjson1_deserializeOpDocumentUpdateVoiceTemplateOutput(v **UpdateVoice return nil } +type awsRestjson1_deserializeOpVerifyOTPMessage struct { +} + +func (*awsRestjson1_deserializeOpVerifyOTPMessage) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpVerifyOTPMessage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorVerifyOTPMessage(response, &metadata) + } + output := &VerifyOTPMessageOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeDocumentVerificationResponse(&output.VerificationResponse, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorVerifyOTPMessage(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("MethodNotAllowedException", errorCode): + return awsRestjson1_deserializeErrorMethodNotAllowedException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("PayloadTooLargeException", errorCode): + return awsRestjson1_deserializeErrorPayloadTooLargeException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentVerifyOTPMessageOutput(v **VerifyOTPMessageOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *VerifyOTPMessageOutput + if *v == nil { + sv = &VerifyOTPMessageOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "VerificationResponse": + if err := awsRestjson1_deserializeDocumentVerificationResponse(&sv.VerificationResponse, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeErrorBadRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.BadRequestException{} var buff [1024]byte @@ -31457,6 +31787,46 @@ func awsRestjson1_deserializeDocumentTreatmentResource(v **types.TreatmentResour return nil } +func awsRestjson1_deserializeDocumentVerificationResponse(v **types.VerificationResponse, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.VerificationResponse + if *v == nil { + sv = &types.VerificationResponse{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Valid": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected __boolean to be of type *bool, got %T instead", value) + } + sv.Valid = jtv + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentVoiceChannelResponse(v **types.VoiceChannelResponse, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/pinpoint/generated.json b/service/pinpoint/generated.json index 787981d370b..9bd9fa26858 100644 --- a/service/pinpoint/generated.json +++ b/service/pinpoint/generated.json @@ -97,6 +97,7 @@ "api_op_PutEvents.go", "api_op_RemoveAttributes.go", "api_op_SendMessages.go", + "api_op_SendOTPMessage.go", "api_op_SendUsersMessages.go", "api_op_TagResource.go", "api_op_UntagResource.go", @@ -124,6 +125,7 @@ "api_op_UpdateTemplateActiveVersion.go", "api_op_UpdateVoiceChannel.go", "api_op_UpdateVoiceTemplate.go", + "api_op_VerifyOTPMessage.go", "deserializers.go", "doc.go", "endpoints.go", diff --git a/service/pinpoint/serializers.go b/service/pinpoint/serializers.go index 6e14115154b..0cc0dcaa21b 100644 --- a/service/pinpoint/serializers.go +++ b/service/pinpoint/serializers.go @@ -6073,6 +6073,87 @@ func awsRestjson1_serializeOpHttpBindingsSendMessagesInput(v *SendMessagesInput, return nil } +type awsRestjson1_serializeOpSendOTPMessage struct { +} + +func (*awsRestjson1_serializeOpSendOTPMessage) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpSendOTPMessage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*SendOTPMessageInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/apps/{ApplicationId}/otp") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsSendOTPMessageInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + + if input.SendOTPMessageRequestParameters != nil { + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeDocumentSendOTPMessageRequestParameters(input.SendOTPMessageRequestParameters, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsSendOTPMessageInput(v *SendOTPMessageInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ApplicationId == nil || len(*v.ApplicationId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ApplicationId must not be empty")} + } + if v.ApplicationId != nil { + if err := encoder.SetURI("ApplicationId").String(*v.ApplicationId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpSendUsersMessages struct { } @@ -8337,6 +8418,87 @@ func awsRestjson1_serializeOpHttpBindingsUpdateVoiceTemplateInput(v *UpdateVoice return nil } +type awsRestjson1_serializeOpVerifyOTPMessage struct { +} + +func (*awsRestjson1_serializeOpVerifyOTPMessage) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpVerifyOTPMessage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*VerifyOTPMessageInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/apps/{ApplicationId}/verify-otp") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsVerifyOTPMessageInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + + if input.VerifyOTPMessageRequestParameters != nil { + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeDocumentVerifyOTPMessageRequestParameters(input.VerifyOTPMessageRequestParameters, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsVerifyOTPMessageInput(v *VerifyOTPMessageInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ApplicationId == nil || len(*v.ApplicationId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ApplicationId must not be empty")} + } + if v.ApplicationId != nil { + if err := encoder.SetURI("ApplicationId").String(*v.ApplicationId); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentActivity(v *types.Activity, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -11974,6 +12136,68 @@ func awsRestjson1_serializeDocumentSegmentReference(v *types.SegmentReference, v return nil } +func awsRestjson1_serializeDocumentSendOTPMessageRequestParameters(v *types.SendOTPMessageRequestParameters, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AllowedAttempts != 0 { + ok := object.Key("AllowedAttempts") + ok.Integer(v.AllowedAttempts) + } + + if v.BrandName != nil { + ok := object.Key("BrandName") + ok.String(*v.BrandName) + } + + if v.Channel != nil { + ok := object.Key("Channel") + ok.String(*v.Channel) + } + + if v.CodeLength != 0 { + ok := object.Key("CodeLength") + ok.Integer(v.CodeLength) + } + + if v.DestinationIdentity != nil { + ok := object.Key("DestinationIdentity") + ok.String(*v.DestinationIdentity) + } + + if v.EntityId != nil { + ok := object.Key("EntityId") + ok.String(*v.EntityId) + } + + if v.Language != nil { + ok := object.Key("Language") + ok.String(*v.Language) + } + + if v.OriginationIdentity != nil { + ok := object.Key("OriginationIdentity") + ok.String(*v.OriginationIdentity) + } + + if v.ReferenceId != nil { + ok := object.Key("ReferenceId") + ok.String(*v.ReferenceId) + } + + if v.TemplateId != nil { + ok := object.Key("TemplateId") + ok.String(*v.TemplateId) + } + + if v.ValidityPeriod != 0 { + ok := object.Key("ValidityPeriod") + ok.Integer(v.ValidityPeriod) + } + + return nil +} + func awsRestjson1_serializeDocumentSendUsersMessageRequest(v *types.SendUsersMessageRequest, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -12444,6 +12668,28 @@ func awsRestjson1_serializeDocumentUpdateRecommenderConfigurationShape(v *types. return nil } +func awsRestjson1_serializeDocumentVerifyOTPMessageRequestParameters(v *types.VerifyOTPMessageRequestParameters, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DestinationIdentity != nil { + ok := object.Key("DestinationIdentity") + ok.String(*v.DestinationIdentity) + } + + if v.Otp != nil { + ok := object.Key("Otp") + ok.String(*v.Otp) + } + + if v.ReferenceId != nil { + ok := object.Key("ReferenceId") + ok.String(*v.ReferenceId) + } + + return nil +} + func awsRestjson1_serializeDocumentVoiceChannelRequest(v *types.VoiceChannelRequest, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/pinpoint/types/types.go b/service/pinpoint/types/types.go index 4c21dbacb6f..d40c8eada05 100644 --- a/service/pinpoint/types/types.go +++ b/service/pinpoint/types/types.go @@ -5443,6 +5443,57 @@ type SegmentsResponse struct { noSmithyDocumentSerde } +// Send OTP message request parameters. +type SendOTPMessageRequestParameters struct { + + // The brand name that will be substituted into the OTP message body. Should be + // owned by calling AWS account. + // + // This member is required. + BrandName *string + + // Channel type for the OTP message. Supported values: [SMS]. + // + // This member is required. + Channel *string + + // The destination identity to send OTP to. + // + // This member is required. + DestinationIdentity *string + + // The origination identity used to send OTP from. + // + // This member is required. + OriginationIdentity *string + + // Developer-specified reference identifier. Required to match during OTP + // verification. + // + // This member is required. + ReferenceId *string + + // The attempts allowed to validate an OTP. + AllowedAttempts int32 + + // The number of characters in the generated OTP. + CodeLength int32 + + // A unique Entity ID received from DLT after entity registration is approved. + EntityId *string + + // The language to be used for the outgoing message body containing the OTP. + Language *string + + // A unique Template ID received from DLT after entity registration is approved. + TemplateId *string + + // The time in minutes before the OTP is no longer valid. + ValidityPeriod int32 + + noSmithyDocumentSerde +} + // Specifies the configuration and other settings for a message to send to all the // endpoints that are associated with a list of users. type SendUsersMessageRequest struct { @@ -6222,6 +6273,36 @@ type UpdateRecommenderConfigurationShape struct { noSmithyDocumentSerde } +// Verify OTP Message Response. +type VerificationResponse struct { + + // Specifies whether the OTP is valid or not. + Valid bool + + noSmithyDocumentSerde +} + +// Verify OTP message request. +type VerifyOTPMessageRequestParameters struct { + + // The destination identity to send OTP to. + // + // This member is required. + DestinationIdentity *string + + // The OTP the end user provided for verification. + // + // This member is required. + Otp *string + + // The reference identifier provided when the OTP was previously sent. + // + // This member is required. + ReferenceId *string + + noSmithyDocumentSerde +} + // Specifies the status and settings of the voice channel for an application. type VoiceChannelRequest struct { diff --git a/service/pinpoint/validators.go b/service/pinpoint/validators.go index ddebc5b8e8b..021d583a809 100644 --- a/service/pinpoint/validators.go +++ b/service/pinpoint/validators.go @@ -1750,6 +1750,26 @@ func (m *validateOpSendMessages) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpSendOTPMessage struct { +} + +func (*validateOpSendOTPMessage) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSendOTPMessage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SendOTPMessageInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSendOTPMessageInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpSendUsersMessages struct { } @@ -2290,6 +2310,26 @@ func (m *validateOpUpdateVoiceTemplate) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpVerifyOTPMessage struct { +} + +func (*validateOpVerifyOTPMessage) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpVerifyOTPMessage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*VerifyOTPMessageInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpVerifyOTPMessageInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + func addOpCreateAppValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateApp{}, middleware.After) } @@ -2638,6 +2678,10 @@ func addOpSendMessagesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpSendMessages{}, middleware.After) } +func addOpSendOTPMessageValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSendOTPMessage{}, middleware.After) +} + func addOpSendUsersMessagesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpSendUsersMessages{}, middleware.After) } @@ -2746,6 +2790,10 @@ func addOpUpdateVoiceTemplateValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpUpdateVoiceTemplate{}, middleware.After) } +func addOpVerifyOTPMessageValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpVerifyOTPMessage{}, middleware.After) +} + func validateActivity(v *types.Activity) error { if v == nil { return nil @@ -3898,6 +3946,33 @@ func validateSegmentReference(v *types.SegmentReference) error { } } +func validateSendOTPMessageRequestParameters(v *types.SendOTPMessageRequestParameters) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SendOTPMessageRequestParameters"} + if v.BrandName == nil { + invalidParams.Add(smithy.NewErrParamRequired("BrandName")) + } + if v.Channel == nil { + invalidParams.Add(smithy.NewErrParamRequired("Channel")) + } + if v.DestinationIdentity == nil { + invalidParams.Add(smithy.NewErrParamRequired("DestinationIdentity")) + } + if v.OriginationIdentity == nil { + invalidParams.Add(smithy.NewErrParamRequired("OriginationIdentity")) + } + if v.ReferenceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ReferenceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateSendUsersMessageRequest(v *types.SendUsersMessageRequest) error { if v == nil { return nil @@ -4031,6 +4106,27 @@ func validateUpdateRecommenderConfigurationShape(v *types.UpdateRecommenderConfi } } +func validateVerifyOTPMessageRequestParameters(v *types.VerifyOTPMessageRequestParameters) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "VerifyOTPMessageRequestParameters"} + if v.DestinationIdentity == nil { + invalidParams.Add(smithy.NewErrParamRequired("DestinationIdentity")) + } + if v.Otp == nil { + invalidParams.Add(smithy.NewErrParamRequired("Otp")) + } + if v.ReferenceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ReferenceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateWriteCampaignRequest(v *types.WriteCampaignRequest) error { if v == nil { return nil @@ -5642,6 +5738,28 @@ func validateOpSendMessagesInput(v *SendMessagesInput) error { } } +func validateOpSendOTPMessageInput(v *SendOTPMessageInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SendOTPMessageInput"} + if v.ApplicationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApplicationId")) + } + if v.SendOTPMessageRequestParameters == nil { + invalidParams.Add(smithy.NewErrParamRequired("SendOTPMessageRequestParameters")) + } else if v.SendOTPMessageRequestParameters != nil { + if err := validateSendOTPMessageRequestParameters(v.SendOTPMessageRequestParameters); err != nil { + invalidParams.AddNested("SendOTPMessageRequestParameters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpSendUsersMessagesInput(v *SendUsersMessagesInput) error { if v == nil { return nil @@ -6193,3 +6311,25 @@ func validateOpUpdateVoiceTemplateInput(v *UpdateVoiceTemplateInput) error { return nil } } + +func validateOpVerifyOTPMessageInput(v *VerifyOTPMessageInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "VerifyOTPMessageInput"} + if v.ApplicationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApplicationId")) + } + if v.VerifyOTPMessageRequestParameters == nil { + invalidParams.Add(smithy.NewErrParamRequired("VerifyOTPMessageRequestParameters")) + } else if v.VerifyOTPMessageRequestParameters != nil { + if err := validateVerifyOTPMessageRequestParameters(v.VerifyOTPMessageRequestParameters); err != nil { + invalidParams.AddNested("VerifyOTPMessageRequestParameters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/proton/api_op_AcceptEnvironmentAccountConnection.go b/service/proton/api_op_AcceptEnvironmentAccountConnection.go index 53f61ec9822..b80b8334a91 100644 --- a/service/proton/api_op_AcceptEnvironmentAccountConnection.go +++ b/service/proton/api_op_AcceptEnvironmentAccountConnection.go @@ -12,12 +12,12 @@ import ( ) // In a management account, an environment account connection request is accepted. -// When the environment account connection request is accepted, AWS Proton can use -// the associated IAM role to provision environment infrastructure resources in the +// When the environment account connection request is accepted, Proton can use the +// associated IAM role to provision environment infrastructure resources in the // associated environment account. For more information, see Environment account // connections // (https://docs.aws.amazon.com/proton/latest/adminguide/ag-env-account-connections.html) -// in the AWS Proton Administrator guide. +// in the Proton Administrator guide. func (c *Client) AcceptEnvironmentAccountConnection(ctx context.Context, params *AcceptEnvironmentAccountConnectionInput, optFns ...func(*Options)) (*AcceptEnvironmentAccountConnectionOutput, error) { if params == nil { params = &AcceptEnvironmentAccountConnectionInput{} @@ -45,7 +45,7 @@ type AcceptEnvironmentAccountConnectionInput struct { type AcceptEnvironmentAccountConnectionOutput struct { - // The environment account connection data that's returned by AWS Proton. + // The environment account connection data that's returned by Proton. // // This member is required. EnvironmentAccountConnection *types.EnvironmentAccountConnection diff --git a/service/proton/api_op_CancelEnvironmentDeployment.go b/service/proton/api_op_CancelEnvironmentDeployment.go index 00ad49cc33f..5c9664ede5b 100644 --- a/service/proton/api_op_CancelEnvironmentDeployment.go +++ b/service/proton/api_op_CancelEnvironmentDeployment.go @@ -14,18 +14,18 @@ import ( // Attempts to cancel an environment deployment on an UpdateEnvironment action, if // the deployment is IN_PROGRESS. For more information, see Update an environment // (https://docs.aws.amazon.com/proton/latest/adminguide/ag-env-update.html) in the -// AWS Proton Administrator guide. The following list includes potential -// cancellation scenarios. +// Proton Administrator guide. The following list includes potential cancellation +// scenarios. // -// * If the cancellation attempt succeeds, the resulting -// deployment state is CANCELLED. +// * If the cancellation attempt succeeds, the resulting deployment +// state is CANCELLED. // -// * If the cancellation attempt fails, the -// resulting deployment state is FAILED. +// * If the cancellation attempt fails, the resulting +// deployment state is FAILED. // -// * If the current UpdateEnvironment action -// succeeds before the cancellation attempt starts, the resulting deployment state -// is SUCCEEDED and the cancellation attempt has no effect. +// * If the current UpdateEnvironment action succeeds +// before the cancellation attempt starts, the resulting deployment state is +// SUCCEEDED and the cancellation attempt has no effect. func (c *Client) CancelEnvironmentDeployment(ctx context.Context, params *CancelEnvironmentDeploymentInput, optFns ...func(*Options)) (*CancelEnvironmentDeploymentOutput, error) { if params == nil { params = &CancelEnvironmentDeploymentInput{} @@ -53,7 +53,7 @@ type CancelEnvironmentDeploymentInput struct { type CancelEnvironmentDeploymentOutput struct { - // The environment summary data that's returned by AWS Proton. + // The environment summary data that's returned by Proton. // // This member is required. Environment *types.Environment diff --git a/service/proton/api_op_CancelServiceInstanceDeployment.go b/service/proton/api_op_CancelServiceInstanceDeployment.go index c96fb2325f6..fc28b61b860 100644 --- a/service/proton/api_op_CancelServiceInstanceDeployment.go +++ b/service/proton/api_op_CancelServiceInstanceDeployment.go @@ -13,9 +13,9 @@ import ( // Attempts to cancel a service instance deployment on an UpdateServiceInstance // action, if the deployment is IN_PROGRESS. For more information, see Update a -// service instance in the AWS Proton Administrator guide +// service instance in the Proton Administrator guide // (https://docs.aws.amazon.com/proton/latest/adminguide/ag-svc-instance-update.html) -// or the AWS Proton User guide +// or the Proton User guide // (https://docs.aws.amazon.com/proton/latest/userguide/ug-svc-instance-update.html). // The following list includes potential cancellation scenarios. // @@ -61,7 +61,7 @@ type CancelServiceInstanceDeploymentInput struct { type CancelServiceInstanceDeploymentOutput struct { - // The service instance summary data that's returned by AWS Proton. + // The service instance summary data that's returned by Proton. // // This member is required. ServiceInstance *types.ServiceInstance diff --git a/service/proton/api_op_CancelServicePipelineDeployment.go b/service/proton/api_op_CancelServicePipelineDeployment.go index cb7f9fd9fed..1d692edf059 100644 --- a/service/proton/api_op_CancelServicePipelineDeployment.go +++ b/service/proton/api_op_CancelServicePipelineDeployment.go @@ -13,9 +13,9 @@ import ( // Attempts to cancel a service pipeline deployment on an UpdateServicePipeline // action, if the deployment is IN_PROGRESS. For more information, see Update a -// service pipeline in the AWS Proton Administrator guide +// service pipeline in the Proton Administrator guide // (https://docs.aws.amazon.com/proton/latest/adminguide/ag-svc-pipeline-update.html) -// or the AWS Proton User guide +// or the Proton User guide // (https://docs.aws.amazon.com/proton/latest/userguide/ug-svc-pipeline-update.html). // The following list includes potential cancellation scenarios. // @@ -56,7 +56,7 @@ type CancelServicePipelineDeploymentInput struct { type CancelServicePipelineDeploymentOutput struct { - // The service pipeline detail data that's returned by AWS Proton. + // The service pipeline detail data that's returned by Proton. // // This member is required. Pipeline *types.ServicePipeline diff --git a/service/proton/api_op_CreateEnvironment.go b/service/proton/api_op_CreateEnvironment.go index 20e8e31048b..c6a2c15c29e 100644 --- a/service/proton/api_op_CreateEnvironment.go +++ b/service/proton/api_op_CreateEnvironment.go @@ -11,11 +11,21 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deploy a new environment. An AWS Proton environment is created from an -// environment template that defines infrastructure and resources that can be -// shared across services. For more information, see the Environments +// Deploy a new environment. An Proton environment is created from an environment +// template that defines infrastructure and resources that can be shared across +// services. You can provision environments using the following methods: +// +// * +// Standard provisioning: Proton makes direct calls to provision your resources. +// +// * +// Pull request provisioning: Proton makes pull requests on your repository to +// provide compiled infrastructure as code (IaC) files that your IaC engine uses to +// provision resources. +// +// For more information, see the Environments // (https://docs.aws.amazon.com/proton/latest/adminguide/ag-environments.html) in -// the AWS Proton Administrator Guide. +// the Proton Administrator Guide. func (c *Client) CreateEnvironment(ctx context.Context, params *CreateEnvironmentInput, optFns ...func(*Options)) (*CreateEnvironmentOutput, error) { if params == nil { params = &CreateEnvironmentInput{} @@ -41,14 +51,14 @@ type CreateEnvironmentInput struct { // A link to a YAML formatted spec file that provides inputs as defined in the // environment template bundle schema file. For more information, see Environments // (https://docs.aws.amazon.com/proton/latest/adminguide/ag-environments.html) in - // the AWS Proton Administrator Guide. + // the Proton Administrator Guide. // // This value conforms to the media type: application/yaml // // This member is required. Spec *string - // The ID of the major version of the environment template. + // The major version of the environment template. // // This member is required. TemplateMajorVersion *string @@ -56,7 +66,7 @@ type CreateEnvironmentInput struct { // The name of the environment template. For more information, see Environment // Templates // (https://docs.aws.amazon.com/proton/latest/adminguide/ag-templates.html) in the - // AWS Proton Administrator Guide. + // Proton Administrator Guide. // // This member is required. TemplateName *string @@ -67,25 +77,33 @@ type CreateEnvironmentInput struct { // The ID of the environment account connection that you provide if you're // provisioning your environment infrastructure resources to an environment // account. You must include either the environmentAccountConnectionId or - // protonServiceRoleArn parameter and value. For more information, see Environment - // account connections + // protonServiceRoleArn parameter and value and omit the provisioningRepository + // parameter and values. For more information, see Environment account connections // (https://docs.aws.amazon.com/proton/latest/adminguide/ag-env-account-connections.html) - // in the AWS Proton Administrator guide. + // in the Proton Administrator guide. EnvironmentAccountConnectionId *string - // The Amazon Resource Name (ARN) of the AWS Proton service role that allows AWS - // Proton to make calls to other services on your behalf. You must include either - // the environmentAccountConnectionId or protonServiceRoleArn parameter and value. + // The Amazon Resource Name (ARN) of the Proton service role that allows Proton to + // make calls to other services on your behalf. You must include either the + // environmentAccountConnectionId or protonServiceRoleArn parameter and value and + // omit the provisioningRepository parameter when you use standard provisioning. ProtonServiceRoleArn *string - // Create tags for your environment. For more information, see AWS Proton resources - // and tagging in the AWS Proton Administrator Guide - // (https://docs.aws.amazon.com/proton/latest/adminguide/resources.html) or AWS - // Proton User Guide - // (https://docs.aws.amazon.com/proton/latest/userguide/resources.html). + // The repository that you provide with pull request provisioning. If you provide + // this parameter, you must omit the environmentAccountConnectionId and + // protonServiceRoleArn parameters. Provisioning by pull request is currently in + // feature preview and is only usable with Terraform based Proton Templates. To + // learn more about Amazon Web Services Feature Preview terms + // (https://aws.amazon.com/service-terms), see section 2 on Beta and Previews. + ProvisioningRepository *types.RepositoryBranchInput + + // Create tags for your environment. For more information, see Proton resources and + // tagging in the Proton Administrator Guide + // (https://docs.aws.amazon.com/proton/latest/adminguide/resources.html) or Proton + // User Guide (https://docs.aws.amazon.com/proton/latest/userguide/resources.html). Tags []types.Tag - // The ID of the minor version of the environment template. + // The minor version of the environment template. TemplateMinorVersion *string noSmithyDocumentSerde @@ -93,7 +111,7 @@ type CreateEnvironmentInput struct { type CreateEnvironmentOutput struct { - // The environment detail data that's returned by AWS Proton. + // The environment detail data that's returned by Proton. // // This member is required. Environment *types.Environment diff --git a/service/proton/api_op_CreateEnvironmentAccountConnection.go b/service/proton/api_op_CreateEnvironmentAccountConnection.go index 3591f96bb6f..e9f7d142dce 100644 --- a/service/proton/api_op_CreateEnvironmentAccountConnection.go +++ b/service/proton/api_op_CreateEnvironmentAccountConnection.go @@ -18,7 +18,7 @@ import ( // account that maintains authorization and permissions. For more information, see // Environment account connections // (https://docs.aws.amazon.com/proton/latest/adminguide/ag-env-account-connections.html) -// in the AWS Proton Administrator guide. +// in the Proton Administrator guide. func (c *Client) CreateEnvironmentAccountConnection(ctx context.Context, params *CreateEnvironmentAccountConnectionInput, optFns ...func(*Options)) (*CreateEnvironmentAccountConnectionOutput, error) { if params == nil { params = &CreateEnvironmentAccountConnectionInput{} @@ -36,39 +36,45 @@ func (c *Client) CreateEnvironmentAccountConnection(ctx context.Context, params type CreateEnvironmentAccountConnectionInput struct { - // The name of the AWS Proton environment that's created in the associated - // management account. + // The name of the Proton environment that's created in the associated management + // account. // // This member is required. EnvironmentName *string // The ID of the management account that accepts or rejects the environment account - // connection. You create an manage the AWS Proton environment in this account. If - // the management account accepts the environment account connection, AWS Proton - // can use the associated IAM role to provision environment infrastructure - // resources in the associated environment account. + // connection. You create an manage the Proton environment in this account. If the + // management account accepts the environment account connection, Proton can use + // the associated IAM role to provision environment infrastructure resources in the + // associated environment account. // // This member is required. ManagementAccountId *string // The Amazon Resource Name (ARN) of the IAM service role that's created in the - // environment account. AWS Proton uses this role to provision infrastructure - // resources in the associated environment account. + // environment account. Proton uses this role to provision infrastructure resources + // in the associated environment account. // // This member is required. RoleArn *string - // When included, if two identicial requests are made with the same client token, - // AWS Proton returns the environment account connection that the first request + // When included, if two identical requests are made with the same client token, + // Proton returns the environment account connection that the first request // created. ClientToken *string + // Tags for your environment account connection. For more information, see Proton + // resources and tagging + // (https://docs.aws.amazon.com/proton/latest/adminguide/resources.html) in the + // Proton Administrator Guide. + Tags []types.Tag + noSmithyDocumentSerde } type CreateEnvironmentAccountConnectionOutput struct { - // The environment account connection detail data that's returned by AWS Proton. + // The environment account connection detail data that's returned by Proton. // // This member is required. EnvironmentAccountConnection *types.EnvironmentAccountConnection diff --git a/service/proton/api_op_CreateEnvironmentTemplate.go b/service/proton/api_op_CreateEnvironmentTemplate.go index ddf8232cd8f..346265dc2c7 100644 --- a/service/proton/api_op_CreateEnvironmentTemplate.go +++ b/service/proton/api_op_CreateEnvironmentTemplate.go @@ -11,24 +11,24 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Create an environment template for AWS Proton. For more information, see -// Environment Templates +// Create an environment template for Proton. For more information, see Environment +// Templates // (https://docs.aws.amazon.com/proton/latest/adminguide/ag-templates.html) in the -// AWS Proton Administrator Guide. You can create an environment template in one of -// the two following ways: +// Proton Administrator Guide. You can create an environment template in one of the +// two following ways: // -// * Register and publish a standard environment template -// that instructs AWS Proton to deploy and manage environment infrastructure. +// * Register and publish a standard environment template that +// instructs Proton to deploy and manage environment infrastructure. // -// * -// Register and publish a customer managed environment template that connects AWS -// Proton to your existing provisioned infrastructure that you manage. AWS Proton -// doesn't manage your existing provisioned infrastructure. To create an -// environment template for customer provisioned and managed infrastructure, -// include the provisioning parameter and set the value to CUSTOMER_MANAGED. For -// more information, see Register and publish an environment template +// * Register +// and publish a customer managed environment template that connects Proton to your +// existing provisioned infrastructure that you manage. Proton doesn't manage your +// existing provisioned infrastructure. To create an environment template for +// customer provisioned and managed infrastructure, include the provisioning +// parameter and set the value to CUSTOMER_MANAGED. For more information, see +// Register and publish an environment template // (https://docs.aws.amazon.com/proton/latest/adminguide/template-create.html) in -// the AWS Proton Administrator Guide. +// the Proton Administrator Guide. func (c *Client) CreateEnvironmentTemplate(ctx context.Context, params *CreateEnvironmentTemplateInput, optFns ...func(*Options)) (*CreateEnvironmentTemplateOutput, error) { if params == nil { params = &CreateEnvironmentTemplateInput{} @@ -57,18 +57,17 @@ type CreateEnvironmentTemplateInput struct { // The environment template name as displayed in the developer interface. DisplayName *string - // A customer provided encryption key that AWS Proton uses to encrypt data. + // A customer provided encryption key that Proton uses to encrypt data. EncryptionKey *string // When included, indicates that the environment template is for customer // provisioned and managed infrastructure. Provisioning types.Provisioning - // Create tags for your environment template. For more information, see AWS Proton - // resources and tagging in the AWS Proton Administrator Guide - // (https://docs.aws.amazon.com/proton/latest/adminguide/resources.html) or AWS - // Proton User Guide - // (https://docs.aws.amazon.com/proton/latest/userguide/resources.html). + // Create tags for your environment template. For more information, see Proton + // resources and tagging in the Proton Administrator Guide + // (https://docs.aws.amazon.com/proton/latest/adminguide/resources.html) or Proton + // User Guide (https://docs.aws.amazon.com/proton/latest/userguide/resources.html). Tags []types.Tag noSmithyDocumentSerde @@ -76,7 +75,7 @@ type CreateEnvironmentTemplateInput struct { type CreateEnvironmentTemplateOutput struct { - // The environment template detail data that's returned by AWS Proton. + // The environment template detail data that's returned by Proton. // // This member is required. EnvironmentTemplate *types.EnvironmentTemplate diff --git a/service/proton/api_op_CreateEnvironmentTemplateVersion.go b/service/proton/api_op_CreateEnvironmentTemplateVersion.go index cfe6c50fbf9..3a1e7a5b078 100644 --- a/service/proton/api_op_CreateEnvironmentTemplateVersion.go +++ b/service/proton/api_op_CreateEnvironmentTemplateVersion.go @@ -43,17 +43,16 @@ type CreateEnvironmentTemplateVersionInput struct { // This member is required. TemplateName *string - // When included, if two identicial requests are made with the same client token, - // AWS Proton returns the environment template version that the first request - // created. + // When included, if two identical requests are made with the same client token, + // Proton returns the environment template version that the first request created. ClientToken *string // A description of the new version of an environment template. Description *string - // To create a new minor version of the environment template, include a - // majorVersion. To create a new major and minor version of the environment - // template, exclude majorVersion. + // To create a new minor version of the environment template, include a major + // Version. To create a new major and minor version of the environment template, + // exclude major Version. MajorVersion *string // Create tags for a new version of an environment template. @@ -64,7 +63,7 @@ type CreateEnvironmentTemplateVersionInput struct { type CreateEnvironmentTemplateVersionOutput struct { - // The environment template detail data that's returned by AWS Proton. + // The environment template detail data that's returned by Proton. // // This member is required. EnvironmentTemplateVersion *types.EnvironmentTemplateVersion diff --git a/service/proton/api_op_CreateRepository.go b/service/proton/api_op_CreateRepository.go new file mode 100644 index 00000000000..b0555ee8a3d --- /dev/null +++ b/service/proton/api_op_CreateRepository.go @@ -0,0 +1,146 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package proton + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/proton/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Create and register a link to a repository that can be used with pull request +// provisioning or template sync configurations. For more information, see Template +// bundles +// (https://docs.aws.amazon.com/proton/latest/adminguide/ag-template-bundles.html) +// and Template sync configurations +// (https://docs.aws.amazon.com/proton/latest/adminguide/ag-template-sync-configs.html) +// in the Proton Administrator Guide. +func (c *Client) CreateRepository(ctx context.Context, params *CreateRepositoryInput, optFns ...func(*Options)) (*CreateRepositoryOutput, error) { + if params == nil { + params = &CreateRepositoryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateRepository", params, optFns, c.addOperationCreateRepositoryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateRepositoryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateRepositoryInput struct { + + // The Amazon Resource Name (ARN) of your Amazon Web Services CodeStar connection. + // For more information, see Setting up for Proton + // (https://docs.aws.amazon.com/setting-up-for-service) in the Proton Administrator + // Guide. + // + // This member is required. + ConnectionArn *string + + // The repository name, for example myrepos/myrepo. + // + // This member is required. + Name *string + + // The repository provider. + // + // This member is required. + Provider types.RepositoryProvider + + // The ARN of your customer Amazon Web Services Key Management Service (Amazon Web + // Services KMS) key. + EncryptionKey *string + + noSmithyDocumentSerde +} + +type CreateRepositoryOutput struct { + + // The repository detail data that's returned by Proton. + // + // This member is required. + Repository *types.Repository + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateRepositoryMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpCreateRepository{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpCreateRepository{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateRepositoryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateRepository(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateRepository(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "proton", + OperationName: "CreateRepository", + } +} diff --git a/service/proton/api_op_CreateService.go b/service/proton/api_op_CreateService.go index fc7ab23b498..cd0622ffa7d 100644 --- a/service/proton/api_op_CreateService.go +++ b/service/proton/api_op_CreateService.go @@ -11,12 +11,12 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Create an AWS Proton service. An AWS Proton service is an instantiation of a -// service template and often includes several service instances and pipeline. For -// more information, see Services +// Create an Proton service. An Proton service is an instantiation of a service +// template and often includes several service instances and pipeline. For more +// information, see Services // (https://docs.aws.amazon.com/proton/latest/adminguide/ag-services.html) in the -// AWS Proton Administrator Guide and Services -// (https://docs.aws.amazon.com/proton/latest/userguide/ug-service.html) in the AWS +// Proton Administrator Guide and Services +// (https://docs.aws.amazon.com/proton/latest/userguide/ug-service.html) in the // Proton User Guide. func (c *Client) CreateService(ctx context.Context, params *CreateServiceInput, optFns ...func(*Options)) (*CreateServiceOutput, error) { if params == nil { @@ -45,17 +45,16 @@ type CreateServiceInput struct { // inputs in the spec if your service template doesn’t include a service pipeline. // For more information, see Create a service // (https://docs.aws.amazon.com/proton/latest/adminguide/ag-create-svc.html.html) - // in the AWS Proton Administrator Guide and Create a service + // in the Proton Administrator Guide and Create a service // (https://docs.aws.amazon.com/proton/latest/userguide/ug-svc-create.html) in the - // AWS Proton User Guide. + // Proton User Guide. // // This value conforms to the media type: application/yaml // // This member is required. Spec *string - // The ID of the major version of the service template that was used to create the - // service. + // The major version of the service template that was used to create the service. // // This member is required. TemplateMajorVersion *string @@ -66,35 +65,33 @@ type CreateServiceInput struct { TemplateName *string // The name of the code repository branch that holds the code that's deployed in - // AWS Proton. Don't include this parameter if your service template doesn't - // include a service pipeline. + // Proton. Don't include this parameter if your service template doesn't include a + // service pipeline. BranchName *string - // A description of the AWS Proton service. + // A description of the Proton service. Description *string // The Amazon Resource Name (ARN) of the repository connection. For more // information, see Set up repository connection // (https://docs.aws.amazon.com/proton/latest/adminguide/setting-up-for-service.html#setting-up-vcontrol) - // in the AWS Proton Administrator Guide and Setting up with AWS Proton + // in the Proton Administrator Guide and Setting up with Proton // (https://docs.aws.amazon.com/proton/latest/userguide/proton-setup.html#setup-repo-connection) - // in the AWS Proton User Guide. Don't include this parameter if your service - // template doesn't include a service pipeline. + // in the Proton User Guide. Don't include this parameter if your service template + // doesn't include a service pipeline. RepositoryConnectionArn *string // The ID of the code repository. Don't include this parameter if your service // template doesn't include a service pipeline. RepositoryId *string - // Create tags for your service. For more information, see AWS Proton resources and - // tagging in the AWS Proton Administrator Guide - // (https://docs.aws.amazon.com/proton/latest/adminguide/resources.html) or AWS - // Proton User Guide - // (https://docs.aws.amazon.com/proton/latest/userguide/resources.html). + // Create tags for your service. For more information, see Proton resources and + // tagging in the Proton Administrator Guide + // (https://docs.aws.amazon.com/proton/latest/adminguide/resources.html) or Proton + // User Guide (https://docs.aws.amazon.com/proton/latest/userguide/resources.html). Tags []types.Tag - // The ID of the minor version of the service template that was used to create the - // service. + // The minor version of the service template that was used to create the service. TemplateMinorVersion *string noSmithyDocumentSerde @@ -102,7 +99,7 @@ type CreateServiceInput struct { type CreateServiceOutput struct { - // The service detail data that's returned by AWS Proton. + // The service detail data that's returned by Proton. // // This member is required. Service *types.Service diff --git a/service/proton/api_op_CreateServiceTemplate.go b/service/proton/api_op_CreateServiceTemplate.go index ab6d5af1f79..ccdde0c3f18 100644 --- a/service/proton/api_op_CreateServiceTemplate.go +++ b/service/proton/api_op_CreateServiceTemplate.go @@ -13,13 +13,13 @@ import ( // Create a service template. The administrator creates a service template to // define standardized infrastructure and an optional CICD service pipeline. -// Developers, in turn, select the service template from AWS Proton. If the -// selected service template includes a service pipeline definition, they provide a -// link to their source code repository. AWS Proton then deploys and manages the -// infrastructure defined by the selected service template. For more information, -// see Service Templates +// Developers, in turn, select the service template from Proton. If the selected +// service template includes a service pipeline definition, they provide a link to +// their source code repository. Proton then deploys and manages the infrastructure +// defined by the selected service template. For more information, see Service +// Templates // (https://docs.aws.amazon.com/proton/latest/adminguide/managing-svc-templates.html) -// in the AWS Proton Administrator Guide. +// in the Proton Administrator Guide. func (c *Client) CreateServiceTemplate(ctx context.Context, params *CreateServiceTemplateInput, optFns ...func(*Options)) (*CreateServiceTemplateOutput, error) { if params == nil { params = &CreateServiceTemplateInput{} @@ -51,19 +51,18 @@ type CreateServiceTemplateInput struct { // A customer provided encryption key that's used to encrypt data. EncryptionKey *string - // AWS Proton includes a service pipeline for your service by default. When - // included, this parameter indicates that an AWS Proton service pipeline won't be - // included for your service. Once specified, this parameter can't be changed. For - // more information, see Service template bundles + // Proton includes a service pipeline for your service by default. When included, + // this parameter indicates that an Proton service pipeline won't be included for + // your service. Once specified, this parameter can't be changed. For more + // information, see Service template bundles // (https://docs.aws.amazon.com/proton/latest/adminguide/ag-template-bundles.html) - // in the AWS Proton Administrator Guide. + // in the Proton Administrator Guide. PipelineProvisioning types.Provisioning - // Create tags for your service template. For more information, see AWS Proton - // resources and tagging in the AWS Proton Administrator Guide - // (https://docs.aws.amazon.com/proton/latest/adminguide/resources.html) or AWS - // Proton User Guide - // (https://docs.aws.amazon.com/proton/latest/userguide/resources.html). + // Create tags for your service template. For more information, see Proton + // resources and tagging in the Proton Administrator Guide + // (https://docs.aws.amazon.com/proton/latest/adminguide/resources.html) or Proton + // User Guide (https://docs.aws.amazon.com/proton/latest/userguide/resources.html). Tags []types.Tag noSmithyDocumentSerde @@ -71,7 +70,7 @@ type CreateServiceTemplateInput struct { type CreateServiceTemplateOutput struct { - // The service template detail data that's returned by AWS Proton. + // The service template detail data that's returned by Proton. // // This member is required. ServiceTemplate *types.ServiceTemplate diff --git a/service/proton/api_op_CreateServiceTemplateVersion.go b/service/proton/api_op_CreateServiceTemplateVersion.go index 2b94525904c..46d085302ec 100644 --- a/service/proton/api_op_CreateServiceTemplateVersion.go +++ b/service/proton/api_op_CreateServiceTemplateVersion.go @@ -12,8 +12,8 @@ import ( ) // Create a new major or minor version of a service template. A major version of a -// service template is a version that isn't backwards compatible. A minor version -// of a service template is a version that's backwards compatible within its major +// service template is a version that isn't backward compatible. A minor version of +// a service template is a version that's backward compatible within its major // version. func (c *Client) CreateServiceTemplateVersion(ctx context.Context, params *CreateServiceTemplateVersionInput, optFns ...func(*Options)) (*CreateServiceTemplateVersionOutput, error) { if params == nil { @@ -49,16 +49,16 @@ type CreateServiceTemplateVersionInput struct { // This member is required. TemplateName *string - // When included, if two identicial requests are made with the same client token, - // AWS Proton returns the service template version that the first request created. + // When included, if two identical requests are made with the same client token, + // Proton returns the service template version that the first request created. ClientToken *string // A description of the new version of a service template. Description *string - // To create a new minor version of the service template, include a majorVersion. - // To create a new major and minor version of the service template, exclude - // majorVersion. + // To create a new minor version of the service template, include a major Version. + // To create a new major and minor version of the service template, exclude major + // Version. MajorVersion *string // Create tags for a new version of a service template. @@ -69,8 +69,7 @@ type CreateServiceTemplateVersionInput struct { type CreateServiceTemplateVersionOutput struct { - // The service template version summary of detail data that's returned by AWS - // Proton. + // The service template version summary of detail data that's returned by Proton. // // This member is required. ServiceTemplateVersion *types.ServiceTemplateVersion diff --git a/service/proton/api_op_CreateTemplateSyncConfig.go b/service/proton/api_op_CreateTemplateSyncConfig.go new file mode 100644 index 00000000000..8a36ffa03df --- /dev/null +++ b/service/proton/api_op_CreateTemplateSyncConfig.go @@ -0,0 +1,153 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package proton + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/proton/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Set up a template for automated template version creation. When a commit is +// pushed to your registered repository +// (https://docs.aws.amazon.com/proton/latest/APIReference/API_Repository.html), +// Proton checks for changes to your repository template bundles. If it detects a +// template bundle change, a new minor or major version of its template is created, +// if the version doesn’t already exist. For more information, see Template sync +// configurations +// (https://docs.aws.amazon.com/proton/latest/adminguide/ag-template-sync-configs.html) +// in the Proton Administrator Guide. +func (c *Client) CreateTemplateSyncConfig(ctx context.Context, params *CreateTemplateSyncConfigInput, optFns ...func(*Options)) (*CreateTemplateSyncConfigOutput, error) { + if params == nil { + params = &CreateTemplateSyncConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateTemplateSyncConfig", params, optFns, c.addOperationCreateTemplateSyncConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateTemplateSyncConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateTemplateSyncConfigInput struct { + + // The branch of the registered repository for your template. + // + // This member is required. + Branch *string + + // The name of your repository, for example myrepos/myrepo. + // + // This member is required. + RepositoryName *string + + // The provider type for your repository. + // + // This member is required. + RepositoryProvider types.RepositoryProvider + + // The name of your registered template. + // + // This member is required. + TemplateName *string + + // The type of the registered template. + // + // This member is required. + TemplateType types.TemplateType + + // A repository subdirectory path to your template bundle directory. When included, + // Proton limits the template bundle search to this repository directory. + Subdirectory *string + + noSmithyDocumentSerde +} + +type CreateTemplateSyncConfigOutput struct { + + // The template sync configuration detail data that's returned by Proton. + TemplateSyncConfig *types.TemplateSyncConfig + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateTemplateSyncConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpCreateTemplateSyncConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpCreateTemplateSyncConfig{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateTemplateSyncConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTemplateSyncConfig(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateTemplateSyncConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "proton", + OperationName: "CreateTemplateSyncConfig", + } +} diff --git a/service/proton/api_op_DeleteEnvironment.go b/service/proton/api_op_DeleteEnvironment.go index 09d8a6a8349..4652c709dba 100644 --- a/service/proton/api_op_DeleteEnvironment.go +++ b/service/proton/api_op_DeleteEnvironment.go @@ -39,7 +39,7 @@ type DeleteEnvironmentInput struct { type DeleteEnvironmentOutput struct { - // The environment detail data that's returned by AWS Proton. + // The environment detail data that's returned by Proton. Environment *types.Environment // Metadata pertaining to the operation's result. diff --git a/service/proton/api_op_DeleteEnvironmentAccountConnection.go b/service/proton/api_op_DeleteEnvironmentAccountConnection.go index bcfa1ef3fd8..60e11963395 100644 --- a/service/proton/api_op_DeleteEnvironmentAccountConnection.go +++ b/service/proton/api_op_DeleteEnvironmentAccountConnection.go @@ -12,14 +12,14 @@ import ( ) // In an environment account, delete an environment account connection. After you -// delete an environment account connection that’s in use by an AWS Proton -// environment, AWS Proton can’t manage the environment infrastructure resources -// until a new environment account connection is accepted for the environment -// account and associated environment. You're responsible for cleaning up -// provisioned resources that remain without an environment connection. For more -// information, see Environment account connections +// delete an environment account connection that’s in use by an Proton environment, +// Proton can’t manage the environment infrastructure resources until a new +// environment account connection is accepted for the environment account and +// associated environment. You're responsible for cleaning up provisioned resources +// that remain without an environment connection. For more information, see +// Environment account connections // (https://docs.aws.amazon.com/proton/latest/adminguide/ag-env-account-connections.html) -// in the AWS Proton Administrator guide. +// in the Proton Administrator guide. func (c *Client) DeleteEnvironmentAccountConnection(ctx context.Context, params *DeleteEnvironmentAccountConnectionInput, optFns ...func(*Options)) (*DeleteEnvironmentAccountConnectionOutput, error) { if params == nil { params = &DeleteEnvironmentAccountConnectionInput{} @@ -47,7 +47,7 @@ type DeleteEnvironmentAccountConnectionInput struct { type DeleteEnvironmentAccountConnectionOutput struct { - // The environment account connection detail data that's returned by AWS Proton. + // The environment account connection detail data that's returned by Proton. EnvironmentAccountConnection *types.EnvironmentAccountConnection // Metadata pertaining to the operation's result. diff --git a/service/proton/api_op_DeleteEnvironmentTemplate.go b/service/proton/api_op_DeleteEnvironmentTemplate.go index 1476bda1425..506ae325707 100644 --- a/service/proton/api_op_DeleteEnvironmentTemplate.go +++ b/service/proton/api_op_DeleteEnvironmentTemplate.go @@ -40,7 +40,7 @@ type DeleteEnvironmentTemplateInput struct { type DeleteEnvironmentTemplateOutput struct { - // The environment template detail data that's returned by AWS Proton. + // The environment template detail data that's returned by Proton. EnvironmentTemplate *types.EnvironmentTemplate // Metadata pertaining to the operation's result. diff --git a/service/proton/api_op_DeleteEnvironmentTemplateVersion.go b/service/proton/api_op_DeleteEnvironmentTemplateVersion.go index 3b319715a24..21e6853f7af 100644 --- a/service/proton/api_op_DeleteEnvironmentTemplateVersion.go +++ b/service/proton/api_op_DeleteEnvironmentTemplateVersion.go @@ -15,11 +15,11 @@ import ( // version of the environment template if it's not the Recommended version. Delete // the Recommended version of the environment template if no other major versions // or minor versions of the environment template exist. A major version of an -// environment template is a version that's not backwards compatible. Delete a -// minor version of an environment template if it isn't the Recommended version. -// Delete a Recommended minor version of the environment template if no other minor -// versions of the environment template exist. A minor version of an environment -// template is a version that's backwards compatible. +// environment template is a version that's not backward compatible. Delete a minor +// version of an environment template if it isn't the Recommended version. Delete a +// Recommended minor version of the environment template if no other minor versions +// of the environment template exist. A minor version of an environment template is +// a version that's backward compatible. func (c *Client) DeleteEnvironmentTemplateVersion(ctx context.Context, params *DeleteEnvironmentTemplateVersionInput, optFns ...func(*Options)) (*DeleteEnvironmentTemplateVersionOutput, error) { if params == nil { params = &DeleteEnvironmentTemplateVersionInput{} @@ -57,7 +57,7 @@ type DeleteEnvironmentTemplateVersionInput struct { type DeleteEnvironmentTemplateVersionOutput struct { - // The environment template version detail data that's returned by AWS Proton. + // The environment template version detail data that's returned by Proton. EnvironmentTemplateVersion *types.EnvironmentTemplateVersion // Metadata pertaining to the operation's result. diff --git a/service/proton/api_op_DeleteRepository.go b/service/proton/api_op_DeleteRepository.go new file mode 100644 index 00000000000..6beb88710a1 --- /dev/null +++ b/service/proton/api_op_DeleteRepository.go @@ -0,0 +1,126 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package proton + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/proton/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// De-register and unlink your repository. +func (c *Client) DeleteRepository(ctx context.Context, params *DeleteRepositoryInput, optFns ...func(*Options)) (*DeleteRepositoryOutput, error) { + if params == nil { + params = &DeleteRepositoryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteRepository", params, optFns, c.addOperationDeleteRepositoryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteRepositoryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteRepositoryInput struct { + + // The name of the repository. + // + // This member is required. + Name *string + + // The repository provider. + // + // This member is required. + Provider types.RepositoryProvider + + noSmithyDocumentSerde +} + +type DeleteRepositoryOutput struct { + + // The repository detail data that's returned by Proton. + Repository *types.Repository + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteRepositoryMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpDeleteRepository{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDeleteRepository{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteRepositoryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRepository(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteRepository(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "proton", + OperationName: "DeleteRepository", + } +} diff --git a/service/proton/api_op_DeleteService.go b/service/proton/api_op_DeleteService.go index 144ad7e82ee..7c4fc26b2fe 100644 --- a/service/proton/api_op_DeleteService.go +++ b/service/proton/api_op_DeleteService.go @@ -39,7 +39,7 @@ type DeleteServiceInput struct { type DeleteServiceOutput struct { - // The service detail data that's returned by AWS Proton. + // The service detail data that's returned by Proton. Service *types.Service // Metadata pertaining to the operation's result. diff --git a/service/proton/api_op_DeleteServiceTemplate.go b/service/proton/api_op_DeleteServiceTemplate.go index b53a9c74378..18728662d2f 100644 --- a/service/proton/api_op_DeleteServiceTemplate.go +++ b/service/proton/api_op_DeleteServiceTemplate.go @@ -40,7 +40,7 @@ type DeleteServiceTemplateInput struct { type DeleteServiceTemplateOutput struct { - // The service template detail data that's returned by AWS Proton. + // The service template detail data that's returned by Proton. ServiceTemplate *types.ServiceTemplate // Metadata pertaining to the operation's result. diff --git a/service/proton/api_op_DeleteServiceTemplateVersion.go b/service/proton/api_op_DeleteServiceTemplateVersion.go index f4aeb6e17f6..3e41473c34b 100644 --- a/service/proton/api_op_DeleteServiceTemplateVersion.go +++ b/service/proton/api_op_DeleteServiceTemplateVersion.go @@ -57,7 +57,7 @@ type DeleteServiceTemplateVersionInput struct { type DeleteServiceTemplateVersionOutput struct { - // The service template version detail data that's returned by AWS Proton. + // The service template version detail data that's returned by Proton. ServiceTemplateVersion *types.ServiceTemplateVersion // Metadata pertaining to the operation's result. diff --git a/service/proton/api_op_DeleteTemplateSyncConfig.go b/service/proton/api_op_DeleteTemplateSyncConfig.go new file mode 100644 index 00000000000..71dcd3f351e --- /dev/null +++ b/service/proton/api_op_DeleteTemplateSyncConfig.go @@ -0,0 +1,126 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package proton + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/proton/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Delete a template sync configuration. +func (c *Client) DeleteTemplateSyncConfig(ctx context.Context, params *DeleteTemplateSyncConfigInput, optFns ...func(*Options)) (*DeleteTemplateSyncConfigOutput, error) { + if params == nil { + params = &DeleteTemplateSyncConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteTemplateSyncConfig", params, optFns, c.addOperationDeleteTemplateSyncConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteTemplateSyncConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteTemplateSyncConfigInput struct { + + // The template name. + // + // This member is required. + TemplateName *string + + // The template type. + // + // This member is required. + TemplateType types.TemplateType + + noSmithyDocumentSerde +} + +type DeleteTemplateSyncConfigOutput struct { + + // The template sync configuration detail data that's returned by Proton. + TemplateSyncConfig *types.TemplateSyncConfig + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteTemplateSyncConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpDeleteTemplateSyncConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDeleteTemplateSyncConfig{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteTemplateSyncConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTemplateSyncConfig(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteTemplateSyncConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "proton", + OperationName: "DeleteTemplateSyncConfig", + } +} diff --git a/service/proton/api_op_GetAccountSettings.go b/service/proton/api_op_GetAccountSettings.go index 8123a7f0f60..b1456a6134f 100644 --- a/service/proton/api_op_GetAccountSettings.go +++ b/service/proton/api_op_GetAccountSettings.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Get detail data for the AWS Proton pipeline service role. +// Get detail data for the Proton pipeline service role. func (c *Client) GetAccountSettings(ctx context.Context, params *GetAccountSettingsInput, optFns ...func(*Options)) (*GetAccountSettingsOutput, error) { if params == nil { params = &GetAccountSettingsInput{} @@ -33,7 +33,7 @@ type GetAccountSettingsInput struct { type GetAccountSettingsOutput struct { - // The AWS Proton pipeline service role detail data that's returned by AWS Proton. + // The Proton pipeline service role detail data that's returned by Proton. AccountSettings *types.AccountSettings // Metadata pertaining to the operation's result. diff --git a/service/proton/api_op_GetEnvironment.go b/service/proton/api_op_GetEnvironment.go index 7f3952fd4c5..3adec964278 100644 --- a/service/proton/api_op_GetEnvironment.go +++ b/service/proton/api_op_GetEnvironment.go @@ -44,7 +44,7 @@ type GetEnvironmentInput struct { type GetEnvironmentOutput struct { - // The environment detail data that's returned by AWS Proton. + // The environment detail data that's returned by Proton. // // This member is required. Environment *types.Environment diff --git a/service/proton/api_op_GetEnvironmentAccountConnection.go b/service/proton/api_op_GetEnvironmentAccountConnection.go index 28687aa2787..571039c4059 100644 --- a/service/proton/api_op_GetEnvironmentAccountConnection.go +++ b/service/proton/api_op_GetEnvironmentAccountConnection.go @@ -14,7 +14,7 @@ import ( // In an environment account, view the detail data for an environment account // connection. For more information, see Environment account connections // (https://docs.aws.amazon.com/proton/latest/adminguide/ag-env-account-connections.html) -// in the AWS Proton Administrator guide. +// in the Proton Administrator guide. func (c *Client) GetEnvironmentAccountConnection(ctx context.Context, params *GetEnvironmentAccountConnectionInput, optFns ...func(*Options)) (*GetEnvironmentAccountConnectionOutput, error) { if params == nil { params = &GetEnvironmentAccountConnectionInput{} @@ -42,7 +42,7 @@ type GetEnvironmentAccountConnectionInput struct { type GetEnvironmentAccountConnectionOutput struct { - // The environment account connection detail data that's returned by AWS Proton. + // The environment account connection detail data that's returned by Proton. // // This member is required. EnvironmentAccountConnection *types.EnvironmentAccountConnection diff --git a/service/proton/api_op_GetEnvironmentTemplate.go b/service/proton/api_op_GetEnvironmentTemplate.go index 7d1d89ea2c0..c458dc03acf 100644 --- a/service/proton/api_op_GetEnvironmentTemplate.go +++ b/service/proton/api_op_GetEnvironmentTemplate.go @@ -39,7 +39,7 @@ type GetEnvironmentTemplateInput struct { type GetEnvironmentTemplateOutput struct { - // The environment template detail data that's returned by AWS Proton. + // The environment template detail data that's returned by Proton. // // This member is required. EnvironmentTemplate *types.EnvironmentTemplate diff --git a/service/proton/api_op_GetEnvironmentTemplateVersion.go b/service/proton/api_op_GetEnvironmentTemplateVersion.go index 5b0f1372e03..fd6a28b6ac1 100644 --- a/service/proton/api_op_GetEnvironmentTemplateVersion.go +++ b/service/proton/api_op_GetEnvironmentTemplateVersion.go @@ -34,7 +34,7 @@ func (c *Client) GetEnvironmentTemplateVersion(ctx context.Context, params *GetE type GetEnvironmentTemplateVersionInput struct { - // To view environment template major version detail data, include majorVersion. + // To view environment template major version detail data, include major Version. // // This member is required. MajorVersion *string @@ -54,7 +54,7 @@ type GetEnvironmentTemplateVersionInput struct { type GetEnvironmentTemplateVersionOutput struct { - // The environment template version detail data that's returned by AWS Proton. + // The environment template version detail data that's returned by Proton. // // This member is required. EnvironmentTemplateVersion *types.EnvironmentTemplateVersion diff --git a/service/proton/api_op_GetRepository.go b/service/proton/api_op_GetRepository.go new file mode 100644 index 00000000000..fb7966e08b5 --- /dev/null +++ b/service/proton/api_op_GetRepository.go @@ -0,0 +1,128 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package proton + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/proton/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Get detail data for a repository. +func (c *Client) GetRepository(ctx context.Context, params *GetRepositoryInput, optFns ...func(*Options)) (*GetRepositoryOutput, error) { + if params == nil { + params = &GetRepositoryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetRepository", params, optFns, c.addOperationGetRepositoryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetRepositoryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetRepositoryInput struct { + + // The repository name, for example myrepos/myrepo. + // + // This member is required. + Name *string + + // The repository provider. + // + // This member is required. + Provider types.RepositoryProvider + + noSmithyDocumentSerde +} + +type GetRepositoryOutput struct { + + // The repository detail data that's returned by Proton. + // + // This member is required. + Repository *types.Repository + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetRepositoryMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpGetRepository{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpGetRepository{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetRepositoryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRepository(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetRepository(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "proton", + OperationName: "GetRepository", + } +} diff --git a/service/lambda/api_op_CreateFunctionUrlConfig.go b/service/proton/api_op_GetRepositorySyncStatus.go similarity index 59% rename from service/lambda/api_op_CreateFunctionUrlConfig.go rename to service/proton/api_op_GetRepositorySyncStatus.go index 3760500cada..59a4fdb339f 100644 --- a/service/lambda/api_op_CreateFunctionUrlConfig.go +++ b/service/proton/api_op_GetRepositorySyncStatus.go @@ -1,61 +1,61 @@ // Code generated by smithy-go-codegen DO NOT EDIT. -package lambda +package proton import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" - "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/aws-sdk-go-v2/service/proton/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) -func (c *Client) CreateFunctionUrlConfig(ctx context.Context, params *CreateFunctionUrlConfigInput, optFns ...func(*Options)) (*CreateFunctionUrlConfigOutput, error) { +// Get the repository sync status. +func (c *Client) GetRepositorySyncStatus(ctx context.Context, params *GetRepositorySyncStatusInput, optFns ...func(*Options)) (*GetRepositorySyncStatusOutput, error) { if params == nil { - params = &CreateFunctionUrlConfigInput{} + params = &GetRepositorySyncStatusInput{} } - result, metadata, err := c.invokeOperation(ctx, "CreateFunctionUrlConfig", params, optFns, c.addOperationCreateFunctionUrlConfigMiddlewares) + result, metadata, err := c.invokeOperation(ctx, "GetRepositorySyncStatus", params, optFns, c.addOperationGetRepositorySyncStatusMiddlewares) if err != nil { return nil, err } - out := result.(*CreateFunctionUrlConfigOutput) + out := result.(*GetRepositorySyncStatusOutput) out.ResultMetadata = metadata return out, nil } -type CreateFunctionUrlConfigInput struct { +type GetRepositorySyncStatusInput struct { + // The repository branch. + // // This member is required. - AuthorizationType types.AuthorizationType + Branch *string + // The repository name. + // // This member is required. - FunctionName *string - - Cors *types.Cors - - Qualifier *string - - noSmithyDocumentSerde -} - -type CreateFunctionUrlConfigOutput struct { + RepositoryName *string + // The repository provider. + // // This member is required. - AuthorizationType types.AuthorizationType + RepositoryProvider types.RepositoryProvider + // The repository sync type. + // // This member is required. - CreationTime *string + SyncType types.SyncType - // This member is required. - FunctionArn *string + noSmithyDocumentSerde +} - // This member is required. - FunctionUrl *string +type GetRepositorySyncStatusOutput struct { - Cors *types.Cors + // The repository sync status detail data that's returned by Proton. + LatestSync *types.RepositorySyncAttempt // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata @@ -63,12 +63,12 @@ type CreateFunctionUrlConfigOutput struct { noSmithyDocumentSerde } -func (c *Client) addOperationCreateFunctionUrlConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { - err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateFunctionUrlConfig{}, middleware.After) +func (c *Client) addOperationGetRepositorySyncStatusMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpGetRepositorySyncStatus{}, middleware.After) if err != nil { return err } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateFunctionUrlConfig{}, middleware.After) + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpGetRepositorySyncStatus{}, middleware.After) if err != nil { return err } @@ -108,10 +108,10 @@ func (c *Client) addOperationCreateFunctionUrlConfigMiddlewares(stack *middlewar if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addOpCreateFunctionUrlConfigValidationMiddleware(stack); err != nil { + if err = addOpGetRepositorySyncStatusValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateFunctionUrlConfig(options.Region), middleware.Before); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRepositorySyncStatus(options.Region), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -126,11 +126,11 @@ func (c *Client) addOperationCreateFunctionUrlConfigMiddlewares(stack *middlewar return nil } -func newServiceMetadataMiddleware_opCreateFunctionUrlConfig(region string) *awsmiddleware.RegisterServiceMetadata { +func newServiceMetadataMiddleware_opGetRepositorySyncStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, - SigningName: "lambda", - OperationName: "CreateFunctionUrlConfig", + SigningName: "proton", + OperationName: "GetRepositorySyncStatus", } } diff --git a/service/proton/api_op_GetService.go b/service/proton/api_op_GetService.go index 9569be3921d..86c7f621225 100644 --- a/service/proton/api_op_GetService.go +++ b/service/proton/api_op_GetService.go @@ -45,7 +45,7 @@ type GetServiceInput struct { type GetServiceOutput struct { - // The service detail data that's returned by AWS Proton. + // The service detail data that's returned by Proton. Service *types.Service // Metadata pertaining to the operation's result. diff --git a/service/proton/api_op_GetServiceInstance.go b/service/proton/api_op_GetServiceInstance.go index 024437e6370..4e346cfa5b7 100644 --- a/service/proton/api_op_GetServiceInstance.go +++ b/service/proton/api_op_GetServiceInstance.go @@ -50,7 +50,7 @@ type GetServiceInstanceInput struct { type GetServiceInstanceOutput struct { - // The service instance detail data that's returned by AWS Proton. + // The service instance detail data that's returned by Proton. // // This member is required. ServiceInstance *types.ServiceInstance diff --git a/service/proton/api_op_GetServiceTemplate.go b/service/proton/api_op_GetServiceTemplate.go index 355e01c1278..5ab0de53754 100644 --- a/service/proton/api_op_GetServiceTemplate.go +++ b/service/proton/api_op_GetServiceTemplate.go @@ -39,7 +39,7 @@ type GetServiceTemplateInput struct { type GetServiceTemplateOutput struct { - // The service template detail data that's returned by AWS Proton. + // The service template detail data that's returned by Proton. // // This member is required. ServiceTemplate *types.ServiceTemplate diff --git a/service/proton/api_op_GetServiceTemplateVersion.go b/service/proton/api_op_GetServiceTemplateVersion.go index 57937f34500..bd26cd98014 100644 --- a/service/proton/api_op_GetServiceTemplateVersion.go +++ b/service/proton/api_op_GetServiceTemplateVersion.go @@ -34,7 +34,7 @@ func (c *Client) GetServiceTemplateVersion(ctx context.Context, params *GetServi type GetServiceTemplateVersionInput struct { - // To view service template major version detail data, include majorVersion. + // To view service template major version detail data, include major Version. // // This member is required. MajorVersion *string @@ -54,7 +54,7 @@ type GetServiceTemplateVersionInput struct { type GetServiceTemplateVersionOutput struct { - // The service template version detail data that's returned by AWS Proton. + // The service template version detail data that's returned by Proton. // // This member is required. ServiceTemplateVersion *types.ServiceTemplateVersion diff --git a/service/proton/api_op_GetTemplateSyncConfig.go b/service/proton/api_op_GetTemplateSyncConfig.go new file mode 100644 index 00000000000..76518293794 --- /dev/null +++ b/service/proton/api_op_GetTemplateSyncConfig.go @@ -0,0 +1,126 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package proton + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/proton/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Get detail data for a template sync configuration. +func (c *Client) GetTemplateSyncConfig(ctx context.Context, params *GetTemplateSyncConfigInput, optFns ...func(*Options)) (*GetTemplateSyncConfigOutput, error) { + if params == nil { + params = &GetTemplateSyncConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetTemplateSyncConfig", params, optFns, c.addOperationGetTemplateSyncConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetTemplateSyncConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetTemplateSyncConfigInput struct { + + // The template name. + // + // This member is required. + TemplateName *string + + // The template type. + // + // This member is required. + TemplateType types.TemplateType + + noSmithyDocumentSerde +} + +type GetTemplateSyncConfigOutput struct { + + // The template sync configuration detail data that's returned by Proton. + TemplateSyncConfig *types.TemplateSyncConfig + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetTemplateSyncConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpGetTemplateSyncConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpGetTemplateSyncConfig{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetTemplateSyncConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTemplateSyncConfig(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetTemplateSyncConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "proton", + OperationName: "GetTemplateSyncConfig", + } +} diff --git a/service/proton/api_op_GetTemplateSyncStatus.go b/service/proton/api_op_GetTemplateSyncStatus.go new file mode 100644 index 00000000000..110d233e3a8 --- /dev/null +++ b/service/proton/api_op_GetTemplateSyncStatus.go @@ -0,0 +1,137 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package proton + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/proton/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Get the status of a template sync. +func (c *Client) GetTemplateSyncStatus(ctx context.Context, params *GetTemplateSyncStatusInput, optFns ...func(*Options)) (*GetTemplateSyncStatusOutput, error) { + if params == nil { + params = &GetTemplateSyncStatusInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetTemplateSyncStatus", params, optFns, c.addOperationGetTemplateSyncStatusMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetTemplateSyncStatusOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetTemplateSyncStatusInput struct { + + // The template name. + // + // This member is required. + TemplateName *string + + // The template type. + // + // This member is required. + TemplateType types.TemplateType + + // The template version. + // + // This member is required. + TemplateVersion *string + + noSmithyDocumentSerde +} + +type GetTemplateSyncStatusOutput struct { + + // The template sync desired state that's returned by Proton. + DesiredState *types.Revision + + // The details of the last successful sync that's returned by Proton. + LatestSuccessfulSync *types.ResourceSyncAttempt + + // The details of the last sync that's returned by Proton. + LatestSync *types.ResourceSyncAttempt + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetTemplateSyncStatusMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpGetTemplateSyncStatus{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpGetTemplateSyncStatus{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetTemplateSyncStatusValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTemplateSyncStatus(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetTemplateSyncStatus(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "proton", + OperationName: "GetTemplateSyncStatus", + } +} diff --git a/service/proton/api_op_ListEnvironmentAccountConnections.go b/service/proton/api_op_ListEnvironmentAccountConnections.go index 86cc0f77b29..b19bd4bb380 100644 --- a/service/proton/api_op_ListEnvironmentAccountConnections.go +++ b/service/proton/api_op_ListEnvironmentAccountConnections.go @@ -15,7 +15,7 @@ import ( // View a list of environment account connections. For more information, see // Environment account connections // (https://docs.aws.amazon.com/proton/latest/adminguide/ag-env-account-connections.html) -// in the AWS Proton Administrator guide. +// in the Proton Administrator guide. func (c *Client) ListEnvironmentAccountConnections(ctx context.Context, params *ListEnvironmentAccountConnectionsInput, optFns ...func(*Options)) (*ListEnvironmentAccountConnectionsOutput, error) { if params == nil { params = &ListEnvironmentAccountConnectionsInput{} @@ -58,7 +58,7 @@ type ListEnvironmentAccountConnectionsInput struct { type ListEnvironmentAccountConnectionsOutput struct { - // An array of environment account connections with details that's returned by AWS + // An array of environment account connections with details that's returned by // Proton. // // This member is required. diff --git a/service/proton/api_op_ListEnvironmentOutputs.go b/service/proton/api_op_ListEnvironmentOutputs.go new file mode 100644 index 00000000000..e74ad825920 --- /dev/null +++ b/service/proton/api_op_ListEnvironmentOutputs.go @@ -0,0 +1,208 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package proton + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/proton/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List the infrastructure as code outputs for your environment. +func (c *Client) ListEnvironmentOutputs(ctx context.Context, params *ListEnvironmentOutputsInput, optFns ...func(*Options)) (*ListEnvironmentOutputsOutput, error) { + if params == nil { + params = &ListEnvironmentOutputsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListEnvironmentOutputs", params, optFns, c.addOperationListEnvironmentOutputsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListEnvironmentOutputsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListEnvironmentOutputsInput struct { + + // The environment name. + // + // This member is required. + EnvironmentName *string + + // A token to indicate the location of the next environment output in the array of + // environment outputs, after the list of environment outputs that was previously + // requested. + NextToken *string + + noSmithyDocumentSerde +} + +type ListEnvironmentOutputsOutput struct { + + // An array of environment outputs with detail data. + // + // This member is required. + Outputs []types.Output + + // A token to indicate the location of the next environment output in the array of + // environment outputs, after the current requested list of environment outputs. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListEnvironmentOutputsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListEnvironmentOutputs{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListEnvironmentOutputs{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListEnvironmentOutputsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEnvironmentOutputs(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListEnvironmentOutputsAPIClient is a client that implements the +// ListEnvironmentOutputs operation. +type ListEnvironmentOutputsAPIClient interface { + ListEnvironmentOutputs(context.Context, *ListEnvironmentOutputsInput, ...func(*Options)) (*ListEnvironmentOutputsOutput, error) +} + +var _ ListEnvironmentOutputsAPIClient = (*Client)(nil) + +// ListEnvironmentOutputsPaginatorOptions is the paginator options for +// ListEnvironmentOutputs +type ListEnvironmentOutputsPaginatorOptions struct { + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListEnvironmentOutputsPaginator is a paginator for ListEnvironmentOutputs +type ListEnvironmentOutputsPaginator struct { + options ListEnvironmentOutputsPaginatorOptions + client ListEnvironmentOutputsAPIClient + params *ListEnvironmentOutputsInput + nextToken *string + firstPage bool +} + +// NewListEnvironmentOutputsPaginator returns a new ListEnvironmentOutputsPaginator +func NewListEnvironmentOutputsPaginator(client ListEnvironmentOutputsAPIClient, params *ListEnvironmentOutputsInput, optFns ...func(*ListEnvironmentOutputsPaginatorOptions)) *ListEnvironmentOutputsPaginator { + if params == nil { + params = &ListEnvironmentOutputsInput{} + } + + options := ListEnvironmentOutputsPaginatorOptions{} + + for _, fn := range optFns { + fn(&options) + } + + return &ListEnvironmentOutputsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListEnvironmentOutputsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListEnvironmentOutputs page. +func (p *ListEnvironmentOutputsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEnvironmentOutputsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + result, err := p.client.ListEnvironmentOutputs(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListEnvironmentOutputs(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "proton", + OperationName: "ListEnvironmentOutputs", + } +} diff --git a/service/proton/api_op_ListEnvironmentProvisionedResources.go b/service/proton/api_op_ListEnvironmentProvisionedResources.go new file mode 100644 index 00000000000..0e79b3588dc --- /dev/null +++ b/service/proton/api_op_ListEnvironmentProvisionedResources.go @@ -0,0 +1,211 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package proton + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/proton/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List the provisioned resources for your environment. +func (c *Client) ListEnvironmentProvisionedResources(ctx context.Context, params *ListEnvironmentProvisionedResourcesInput, optFns ...func(*Options)) (*ListEnvironmentProvisionedResourcesOutput, error) { + if params == nil { + params = &ListEnvironmentProvisionedResourcesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListEnvironmentProvisionedResources", params, optFns, c.addOperationListEnvironmentProvisionedResourcesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListEnvironmentProvisionedResourcesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListEnvironmentProvisionedResourcesInput struct { + + // The environment name. + // + // This member is required. + EnvironmentName *string + + // A token to indicate the location of the next environment provisioned resource in + // the array of environment provisioned resources, after the list of environment + // provisioned resources that was previously requested. + NextToken *string + + noSmithyDocumentSerde +} + +type ListEnvironmentProvisionedResourcesOutput struct { + + // An array of environment provisioned resources. + // + // This member is required. + ProvisionedResources []types.ProvisionedResource + + // A token to indicate the location of the next environment provisioned resource in + // the array of provisioned resources, after the current requested list of + // environment provisioned resources. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListEnvironmentProvisionedResourcesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListEnvironmentProvisionedResources{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListEnvironmentProvisionedResources{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListEnvironmentProvisionedResourcesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEnvironmentProvisionedResources(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListEnvironmentProvisionedResourcesAPIClient is a client that implements the +// ListEnvironmentProvisionedResources operation. +type ListEnvironmentProvisionedResourcesAPIClient interface { + ListEnvironmentProvisionedResources(context.Context, *ListEnvironmentProvisionedResourcesInput, ...func(*Options)) (*ListEnvironmentProvisionedResourcesOutput, error) +} + +var _ ListEnvironmentProvisionedResourcesAPIClient = (*Client)(nil) + +// ListEnvironmentProvisionedResourcesPaginatorOptions is the paginator options for +// ListEnvironmentProvisionedResources +type ListEnvironmentProvisionedResourcesPaginatorOptions struct { + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListEnvironmentProvisionedResourcesPaginator is a paginator for +// ListEnvironmentProvisionedResources +type ListEnvironmentProvisionedResourcesPaginator struct { + options ListEnvironmentProvisionedResourcesPaginatorOptions + client ListEnvironmentProvisionedResourcesAPIClient + params *ListEnvironmentProvisionedResourcesInput + nextToken *string + firstPage bool +} + +// NewListEnvironmentProvisionedResourcesPaginator returns a new +// ListEnvironmentProvisionedResourcesPaginator +func NewListEnvironmentProvisionedResourcesPaginator(client ListEnvironmentProvisionedResourcesAPIClient, params *ListEnvironmentProvisionedResourcesInput, optFns ...func(*ListEnvironmentProvisionedResourcesPaginatorOptions)) *ListEnvironmentProvisionedResourcesPaginator { + if params == nil { + params = &ListEnvironmentProvisionedResourcesInput{} + } + + options := ListEnvironmentProvisionedResourcesPaginatorOptions{} + + for _, fn := range optFns { + fn(&options) + } + + return &ListEnvironmentProvisionedResourcesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListEnvironmentProvisionedResourcesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListEnvironmentProvisionedResources page. +func (p *ListEnvironmentProvisionedResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEnvironmentProvisionedResourcesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + result, err := p.client.ListEnvironmentProvisionedResources(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListEnvironmentProvisionedResources(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "proton", + OperationName: "ListEnvironmentProvisionedResources", + } +} diff --git a/service/proton/api_op_ListEnvironmentTemplateVersions.go b/service/proton/api_op_ListEnvironmentTemplateVersions.go index 0fabeefaf22..5e91b1b0bf0 100644 --- a/service/proton/api_op_ListEnvironmentTemplateVersions.go +++ b/service/proton/api_op_ListEnvironmentTemplateVersions.go @@ -36,8 +36,8 @@ type ListEnvironmentTemplateVersionsInput struct { TemplateName *string // To view a list of minor of versions under a major version of an environment - // template, include majorVersion. To view a list of major versions of an - // environment template, exclude majorVersion. + // template, include major Version. To view a list of major versions of an + // environment template, exclude major Version. MajorVersion *string // The maximum number of major or minor versions of an environment template to diff --git a/service/proton/api_op_ListRepositories.go b/service/proton/api_op_ListRepositories.go new file mode 100644 index 00000000000..384afb15eef --- /dev/null +++ b/service/proton/api_op_ListRepositories.go @@ -0,0 +1,213 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package proton + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/proton/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List repositories with detail data. +func (c *Client) ListRepositories(ctx context.Context, params *ListRepositoriesInput, optFns ...func(*Options)) (*ListRepositoriesOutput, error) { + if params == nil { + params = &ListRepositoriesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListRepositories", params, optFns, c.addOperationListRepositoriesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListRepositoriesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListRepositoriesInput struct { + + // The maximum number of repositories to list. + MaxResults *int32 + + // A token to indicate the location of the next repository in the array of + // repositories, after the list of repositories previously requested. + NextToken *string + + noSmithyDocumentSerde +} + +type ListRepositoriesOutput struct { + + // An array of repositories. + // + // This member is required. + Repositories []types.RepositorySummary + + // A token to indicate the location of the next repository in the array of + // repositories, after the current requested list of repositories. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListRepositoriesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListRepositories{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListRepositories{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRepositories(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListRepositoriesAPIClient is a client that implements the ListRepositories +// operation. +type ListRepositoriesAPIClient interface { + ListRepositories(context.Context, *ListRepositoriesInput, ...func(*Options)) (*ListRepositoriesOutput, error) +} + +var _ ListRepositoriesAPIClient = (*Client)(nil) + +// ListRepositoriesPaginatorOptions is the paginator options for ListRepositories +type ListRepositoriesPaginatorOptions struct { + // The maximum number of repositories to list. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListRepositoriesPaginator is a paginator for ListRepositories +type ListRepositoriesPaginator struct { + options ListRepositoriesPaginatorOptions + client ListRepositoriesAPIClient + params *ListRepositoriesInput + nextToken *string + firstPage bool +} + +// NewListRepositoriesPaginator returns a new ListRepositoriesPaginator +func NewListRepositoriesPaginator(client ListRepositoriesAPIClient, params *ListRepositoriesInput, optFns ...func(*ListRepositoriesPaginatorOptions)) *ListRepositoriesPaginator { + if params == nil { + params = &ListRepositoriesInput{} + } + + options := ListRepositoriesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListRepositoriesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListRepositoriesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListRepositories page. +func (p *ListRepositoriesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListRepositoriesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListRepositories(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListRepositories(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "proton", + OperationName: "ListRepositories", + } +} diff --git a/service/proton/api_op_ListRepositorySyncDefinitions.go b/service/proton/api_op_ListRepositorySyncDefinitions.go new file mode 100644 index 00000000000..1e3ed6f9c37 --- /dev/null +++ b/service/proton/api_op_ListRepositorySyncDefinitions.go @@ -0,0 +1,221 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package proton + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/proton/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List repository sync definitions with detail data. +func (c *Client) ListRepositorySyncDefinitions(ctx context.Context, params *ListRepositorySyncDefinitionsInput, optFns ...func(*Options)) (*ListRepositorySyncDefinitionsOutput, error) { + if params == nil { + params = &ListRepositorySyncDefinitionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListRepositorySyncDefinitions", params, optFns, c.addOperationListRepositorySyncDefinitionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListRepositorySyncDefinitionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListRepositorySyncDefinitionsInput struct { + + // The repository name. + // + // This member is required. + RepositoryName *string + + // The repository provider. + // + // This member is required. + RepositoryProvider types.RepositoryProvider + + // The sync type. The only supported value is TEMPLATE_SYNC. + // + // This member is required. + SyncType types.SyncType + + // A token to indicate the location of the next repository sync definition in the + // array of repository sync definitions, after the list of repository sync + // definitions previously requested. + NextToken *string + + noSmithyDocumentSerde +} + +type ListRepositorySyncDefinitionsOutput struct { + + // An array of repository sync definitions. + // + // This member is required. + SyncDefinitions []types.RepositorySyncDefinition + + // A token to indicate the location of the next repository sync definition in the + // array of repository sync definitions, after the current requested list of + // repository sync definitions. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListRepositorySyncDefinitionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListRepositorySyncDefinitions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListRepositorySyncDefinitions{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListRepositorySyncDefinitionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRepositorySyncDefinitions(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListRepositorySyncDefinitionsAPIClient is a client that implements the +// ListRepositorySyncDefinitions operation. +type ListRepositorySyncDefinitionsAPIClient interface { + ListRepositorySyncDefinitions(context.Context, *ListRepositorySyncDefinitionsInput, ...func(*Options)) (*ListRepositorySyncDefinitionsOutput, error) +} + +var _ ListRepositorySyncDefinitionsAPIClient = (*Client)(nil) + +// ListRepositorySyncDefinitionsPaginatorOptions is the paginator options for +// ListRepositorySyncDefinitions +type ListRepositorySyncDefinitionsPaginatorOptions struct { + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListRepositorySyncDefinitionsPaginator is a paginator for +// ListRepositorySyncDefinitions +type ListRepositorySyncDefinitionsPaginator struct { + options ListRepositorySyncDefinitionsPaginatorOptions + client ListRepositorySyncDefinitionsAPIClient + params *ListRepositorySyncDefinitionsInput + nextToken *string + firstPage bool +} + +// NewListRepositorySyncDefinitionsPaginator returns a new +// ListRepositorySyncDefinitionsPaginator +func NewListRepositorySyncDefinitionsPaginator(client ListRepositorySyncDefinitionsAPIClient, params *ListRepositorySyncDefinitionsInput, optFns ...func(*ListRepositorySyncDefinitionsPaginatorOptions)) *ListRepositorySyncDefinitionsPaginator { + if params == nil { + params = &ListRepositorySyncDefinitionsInput{} + } + + options := ListRepositorySyncDefinitionsPaginatorOptions{} + + for _, fn := range optFns { + fn(&options) + } + + return &ListRepositorySyncDefinitionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListRepositorySyncDefinitionsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListRepositorySyncDefinitions page. +func (p *ListRepositorySyncDefinitionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListRepositorySyncDefinitionsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + result, err := p.client.ListRepositorySyncDefinitions(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListRepositorySyncDefinitions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "proton", + OperationName: "ListRepositorySyncDefinitions", + } +} diff --git a/service/proton/api_op_ListServiceInstanceOutputs.go b/service/proton/api_op_ListServiceInstanceOutputs.go new file mode 100644 index 00000000000..a43f9d2b349 --- /dev/null +++ b/service/proton/api_op_ListServiceInstanceOutputs.go @@ -0,0 +1,214 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package proton + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/proton/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// View a list service instance infrastructure as code outputs with detail data. +func (c *Client) ListServiceInstanceOutputs(ctx context.Context, params *ListServiceInstanceOutputsInput, optFns ...func(*Options)) (*ListServiceInstanceOutputsOutput, error) { + if params == nil { + params = &ListServiceInstanceOutputsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListServiceInstanceOutputs", params, optFns, c.addOperationListServiceInstanceOutputsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListServiceInstanceOutputsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListServiceInstanceOutputsInput struct { + + // The service instance name. + // + // This member is required. + ServiceInstanceName *string + + // The service name. + // + // This member is required. + ServiceName *string + + // A token to indicate the location of the next output in the array of outputs, + // after the list of outputs that was previously requested. + NextToken *string + + noSmithyDocumentSerde +} + +type ListServiceInstanceOutputsOutput struct { + + // An array of service instance infrastructure as code outputs. + // + // This member is required. + Outputs []types.Output + + // A token to indicate the location of the next output in the array of outputs, + // after the current requested list of outputs. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListServiceInstanceOutputsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListServiceInstanceOutputs{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListServiceInstanceOutputs{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListServiceInstanceOutputsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServiceInstanceOutputs(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListServiceInstanceOutputsAPIClient is a client that implements the +// ListServiceInstanceOutputs operation. +type ListServiceInstanceOutputsAPIClient interface { + ListServiceInstanceOutputs(context.Context, *ListServiceInstanceOutputsInput, ...func(*Options)) (*ListServiceInstanceOutputsOutput, error) +} + +var _ ListServiceInstanceOutputsAPIClient = (*Client)(nil) + +// ListServiceInstanceOutputsPaginatorOptions is the paginator options for +// ListServiceInstanceOutputs +type ListServiceInstanceOutputsPaginatorOptions struct { + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListServiceInstanceOutputsPaginator is a paginator for +// ListServiceInstanceOutputs +type ListServiceInstanceOutputsPaginator struct { + options ListServiceInstanceOutputsPaginatorOptions + client ListServiceInstanceOutputsAPIClient + params *ListServiceInstanceOutputsInput + nextToken *string + firstPage bool +} + +// NewListServiceInstanceOutputsPaginator returns a new +// ListServiceInstanceOutputsPaginator +func NewListServiceInstanceOutputsPaginator(client ListServiceInstanceOutputsAPIClient, params *ListServiceInstanceOutputsInput, optFns ...func(*ListServiceInstanceOutputsPaginatorOptions)) *ListServiceInstanceOutputsPaginator { + if params == nil { + params = &ListServiceInstanceOutputsInput{} + } + + options := ListServiceInstanceOutputsPaginatorOptions{} + + for _, fn := range optFns { + fn(&options) + } + + return &ListServiceInstanceOutputsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListServiceInstanceOutputsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListServiceInstanceOutputs page. +func (p *ListServiceInstanceOutputsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListServiceInstanceOutputsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + result, err := p.client.ListServiceInstanceOutputs(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListServiceInstanceOutputs(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "proton", + OperationName: "ListServiceInstanceOutputs", + } +} diff --git a/service/proton/api_op_ListServiceInstanceProvisionedResources.go b/service/proton/api_op_ListServiceInstanceProvisionedResources.go new file mode 100644 index 00000000000..26ba55f9d92 --- /dev/null +++ b/service/proton/api_op_ListServiceInstanceProvisionedResources.go @@ -0,0 +1,216 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package proton + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/proton/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List provisioned resources for a service instance with details. +func (c *Client) ListServiceInstanceProvisionedResources(ctx context.Context, params *ListServiceInstanceProvisionedResourcesInput, optFns ...func(*Options)) (*ListServiceInstanceProvisionedResourcesOutput, error) { + if params == nil { + params = &ListServiceInstanceProvisionedResourcesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListServiceInstanceProvisionedResources", params, optFns, c.addOperationListServiceInstanceProvisionedResourcesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListServiceInstanceProvisionedResourcesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListServiceInstanceProvisionedResourcesInput struct { + + // The service instance name. + // + // This member is required. + ServiceInstanceName *string + + // The service name. + // + // This member is required. + ServiceName *string + + // A token to indicate the location of the next provisioned resource in the array + // of provisioned resources, after the list of provisioned resources that was + // previously requested. + NextToken *string + + noSmithyDocumentSerde +} + +type ListServiceInstanceProvisionedResourcesOutput struct { + + // An array of provisioned resources for a service instance. + // + // This member is required. + ProvisionedResources []types.ProvisionedResource + + // A token to indicate the location of the next provisioned resource in the array + // of provisioned resources, after the current requested list of provisioned + // resources. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListServiceInstanceProvisionedResourcesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListServiceInstanceProvisionedResources{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListServiceInstanceProvisionedResources{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListServiceInstanceProvisionedResourcesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServiceInstanceProvisionedResources(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListServiceInstanceProvisionedResourcesAPIClient is a client that implements the +// ListServiceInstanceProvisionedResources operation. +type ListServiceInstanceProvisionedResourcesAPIClient interface { + ListServiceInstanceProvisionedResources(context.Context, *ListServiceInstanceProvisionedResourcesInput, ...func(*Options)) (*ListServiceInstanceProvisionedResourcesOutput, error) +} + +var _ ListServiceInstanceProvisionedResourcesAPIClient = (*Client)(nil) + +// ListServiceInstanceProvisionedResourcesPaginatorOptions is the paginator options +// for ListServiceInstanceProvisionedResources +type ListServiceInstanceProvisionedResourcesPaginatorOptions struct { + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListServiceInstanceProvisionedResourcesPaginator is a paginator for +// ListServiceInstanceProvisionedResources +type ListServiceInstanceProvisionedResourcesPaginator struct { + options ListServiceInstanceProvisionedResourcesPaginatorOptions + client ListServiceInstanceProvisionedResourcesAPIClient + params *ListServiceInstanceProvisionedResourcesInput + nextToken *string + firstPage bool +} + +// NewListServiceInstanceProvisionedResourcesPaginator returns a new +// ListServiceInstanceProvisionedResourcesPaginator +func NewListServiceInstanceProvisionedResourcesPaginator(client ListServiceInstanceProvisionedResourcesAPIClient, params *ListServiceInstanceProvisionedResourcesInput, optFns ...func(*ListServiceInstanceProvisionedResourcesPaginatorOptions)) *ListServiceInstanceProvisionedResourcesPaginator { + if params == nil { + params = &ListServiceInstanceProvisionedResourcesInput{} + } + + options := ListServiceInstanceProvisionedResourcesPaginatorOptions{} + + for _, fn := range optFns { + fn(&options) + } + + return &ListServiceInstanceProvisionedResourcesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListServiceInstanceProvisionedResourcesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListServiceInstanceProvisionedResources page. +func (p *ListServiceInstanceProvisionedResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListServiceInstanceProvisionedResourcesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + result, err := p.client.ListServiceInstanceProvisionedResources(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListServiceInstanceProvisionedResources(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "proton", + OperationName: "ListServiceInstanceProvisionedResources", + } +} diff --git a/service/proton/api_op_ListServicePipelineOutputs.go b/service/proton/api_op_ListServicePipelineOutputs.go new file mode 100644 index 00000000000..8e38d07ca69 --- /dev/null +++ b/service/proton/api_op_ListServicePipelineOutputs.go @@ -0,0 +1,209 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package proton + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/proton/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// View a list service pipeline infrastructure as code outputs with detail. +func (c *Client) ListServicePipelineOutputs(ctx context.Context, params *ListServicePipelineOutputsInput, optFns ...func(*Options)) (*ListServicePipelineOutputsOutput, error) { + if params == nil { + params = &ListServicePipelineOutputsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListServicePipelineOutputs", params, optFns, c.addOperationListServicePipelineOutputsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListServicePipelineOutputsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListServicePipelineOutputsInput struct { + + // The service name. + // + // This member is required. + ServiceName *string + + // A token to indicate the location of the next output in the array of outputs, + // after the list of outputs that was previously requested. + NextToken *string + + noSmithyDocumentSerde +} + +type ListServicePipelineOutputsOutput struct { + + // An array of outputs. + // + // This member is required. + Outputs []types.Output + + // A token to indicate the location of the next output in the array of outputs, + // after the current requested list of outputs. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListServicePipelineOutputsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListServicePipelineOutputs{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListServicePipelineOutputs{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListServicePipelineOutputsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServicePipelineOutputs(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListServicePipelineOutputsAPIClient is a client that implements the +// ListServicePipelineOutputs operation. +type ListServicePipelineOutputsAPIClient interface { + ListServicePipelineOutputs(context.Context, *ListServicePipelineOutputsInput, ...func(*Options)) (*ListServicePipelineOutputsOutput, error) +} + +var _ ListServicePipelineOutputsAPIClient = (*Client)(nil) + +// ListServicePipelineOutputsPaginatorOptions is the paginator options for +// ListServicePipelineOutputs +type ListServicePipelineOutputsPaginatorOptions struct { + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListServicePipelineOutputsPaginator is a paginator for +// ListServicePipelineOutputs +type ListServicePipelineOutputsPaginator struct { + options ListServicePipelineOutputsPaginatorOptions + client ListServicePipelineOutputsAPIClient + params *ListServicePipelineOutputsInput + nextToken *string + firstPage bool +} + +// NewListServicePipelineOutputsPaginator returns a new +// ListServicePipelineOutputsPaginator +func NewListServicePipelineOutputsPaginator(client ListServicePipelineOutputsAPIClient, params *ListServicePipelineOutputsInput, optFns ...func(*ListServicePipelineOutputsPaginatorOptions)) *ListServicePipelineOutputsPaginator { + if params == nil { + params = &ListServicePipelineOutputsInput{} + } + + options := ListServicePipelineOutputsPaginatorOptions{} + + for _, fn := range optFns { + fn(&options) + } + + return &ListServicePipelineOutputsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListServicePipelineOutputsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListServicePipelineOutputs page. +func (p *ListServicePipelineOutputsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListServicePipelineOutputsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + result, err := p.client.ListServicePipelineOutputs(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListServicePipelineOutputs(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "proton", + OperationName: "ListServicePipelineOutputs", + } +} diff --git a/service/proton/api_op_ListServicePipelineProvisionedResources.go b/service/proton/api_op_ListServicePipelineProvisionedResources.go new file mode 100644 index 00000000000..36d215e28ff --- /dev/null +++ b/service/proton/api_op_ListServicePipelineProvisionedResources.go @@ -0,0 +1,211 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package proton + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/proton/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List provisioned resources for a service and pipeline with details. +func (c *Client) ListServicePipelineProvisionedResources(ctx context.Context, params *ListServicePipelineProvisionedResourcesInput, optFns ...func(*Options)) (*ListServicePipelineProvisionedResourcesOutput, error) { + if params == nil { + params = &ListServicePipelineProvisionedResourcesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListServicePipelineProvisionedResources", params, optFns, c.addOperationListServicePipelineProvisionedResourcesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListServicePipelineProvisionedResourcesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListServicePipelineProvisionedResourcesInput struct { + + // The service name. + // + // This member is required. + ServiceName *string + + // A token to indicate the location of the next provisioned resource in the array + // of provisioned resources, after the list of provisioned resources that was + // previously requested. + NextToken *string + + noSmithyDocumentSerde +} + +type ListServicePipelineProvisionedResourcesOutput struct { + + // An array of provisioned resources for a service and pipeline. + // + // This member is required. + ProvisionedResources []types.ProvisionedResource + + // A token to indicate the location of the next provisioned resource in the array + // of provisioned resources, after the current requested list of provisioned + // resources. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListServicePipelineProvisionedResourcesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListServicePipelineProvisionedResources{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListServicePipelineProvisionedResources{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListServicePipelineProvisionedResourcesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServicePipelineProvisionedResources(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListServicePipelineProvisionedResourcesAPIClient is a client that implements the +// ListServicePipelineProvisionedResources operation. +type ListServicePipelineProvisionedResourcesAPIClient interface { + ListServicePipelineProvisionedResources(context.Context, *ListServicePipelineProvisionedResourcesInput, ...func(*Options)) (*ListServicePipelineProvisionedResourcesOutput, error) +} + +var _ ListServicePipelineProvisionedResourcesAPIClient = (*Client)(nil) + +// ListServicePipelineProvisionedResourcesPaginatorOptions is the paginator options +// for ListServicePipelineProvisionedResources +type ListServicePipelineProvisionedResourcesPaginatorOptions struct { + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListServicePipelineProvisionedResourcesPaginator is a paginator for +// ListServicePipelineProvisionedResources +type ListServicePipelineProvisionedResourcesPaginator struct { + options ListServicePipelineProvisionedResourcesPaginatorOptions + client ListServicePipelineProvisionedResourcesAPIClient + params *ListServicePipelineProvisionedResourcesInput + nextToken *string + firstPage bool +} + +// NewListServicePipelineProvisionedResourcesPaginator returns a new +// ListServicePipelineProvisionedResourcesPaginator +func NewListServicePipelineProvisionedResourcesPaginator(client ListServicePipelineProvisionedResourcesAPIClient, params *ListServicePipelineProvisionedResourcesInput, optFns ...func(*ListServicePipelineProvisionedResourcesPaginatorOptions)) *ListServicePipelineProvisionedResourcesPaginator { + if params == nil { + params = &ListServicePipelineProvisionedResourcesInput{} + } + + options := ListServicePipelineProvisionedResourcesPaginatorOptions{} + + for _, fn := range optFns { + fn(&options) + } + + return &ListServicePipelineProvisionedResourcesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListServicePipelineProvisionedResourcesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListServicePipelineProvisionedResources page. +func (p *ListServicePipelineProvisionedResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListServicePipelineProvisionedResourcesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + result, err := p.client.ListServicePipelineProvisionedResources(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListServicePipelineProvisionedResources(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "proton", + OperationName: "ListServicePipelineProvisionedResources", + } +} diff --git a/service/proton/api_op_ListServiceTemplateVersions.go b/service/proton/api_op_ListServiceTemplateVersions.go index a0dd7e61f35..a3a14a1fc81 100644 --- a/service/proton/api_op_ListServiceTemplateVersions.go +++ b/service/proton/api_op_ListServiceTemplateVersions.go @@ -36,8 +36,8 @@ type ListServiceTemplateVersionsInput struct { TemplateName *string // To view a list of minor of versions under a major version of a service template, - // include majorVersion. To view a list of major versions of a service template, - // exclude majorVersion. + // include major Version. To view a list of major versions of a service template, + // exclude major Version. MajorVersion *string // The maximum number of major or minor versions of a service template to list. @@ -59,8 +59,8 @@ type ListServiceTemplateVersionsOutput struct { TemplateVersions []types.ServiceTemplateVersionSummary // A token to indicate the location of the next major or minor version in the array - // of major or minor versions of a service template, after the list of major or - // minor versions that was previously requested. + // of major or minor versions of a service template, after the current requested + // list of service major or minor versions. NextToken *string // Metadata pertaining to the operation's result. diff --git a/service/proton/api_op_ListTagsForResource.go b/service/proton/api_op_ListTagsForResource.go index bbc75b16e08..a7268827df4 100644 --- a/service/proton/api_op_ListTagsForResource.go +++ b/service/proton/api_op_ListTagsForResource.go @@ -12,11 +12,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// List tags for a resource. For more information, see AWS Proton resources and -// tagging in the AWS Proton Administrator Guide -// (https://docs.aws.amazon.com/proton/latest/adminguide/resources.html) or AWS -// Proton User Guide -// (https://docs.aws.amazon.com/proton/latest/userguide/resources.html). +// List tags for a resource. For more information, see Proton resources and tagging +// in the Proton Administrator Guide +// (https://docs.aws.amazon.com/proton/latest/adminguide/resources.html) or Proton +// User Guide (https://docs.aws.amazon.com/proton/latest/userguide/resources.html). func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { if params == nil { params = &ListTagsForResourceInput{} diff --git a/service/proton/api_op_NotifyResourceDeploymentStatusChange.go b/service/proton/api_op_NotifyResourceDeploymentStatusChange.go new file mode 100644 index 00000000000..4c9dd7256f6 --- /dev/null +++ b/service/proton/api_op_NotifyResourceDeploymentStatusChange.go @@ -0,0 +1,137 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package proton + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/proton/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Notify Proton of status changes to a provisioned resource when you use pull +// request provisioning. For more information, see Template bundles +// (https://docs.aws.amazon.com/proton/latest/adminguide/ag-template-bundles.html). +// Provisioning by pull request is currently in feature preview and is only usable +// with Terraform based Proton Templates. To learn more about Amazon Web Services +// Feature Preview terms (https://aws.amazon.com/service-terms), see section 2 on +// Beta and Previews. +func (c *Client) NotifyResourceDeploymentStatusChange(ctx context.Context, params *NotifyResourceDeploymentStatusChangeInput, optFns ...func(*Options)) (*NotifyResourceDeploymentStatusChangeOutput, error) { + if params == nil { + params = &NotifyResourceDeploymentStatusChangeInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "NotifyResourceDeploymentStatusChange", params, optFns, c.addOperationNotifyResourceDeploymentStatusChangeMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*NotifyResourceDeploymentStatusChangeOutput) + out.ResultMetadata = metadata + return out, nil +} + +type NotifyResourceDeploymentStatusChangeInput struct { + + // The provisioned resource Amazon Resource Name (ARN). + // + // This member is required. + ResourceArn *string + + // The status of your provisioned resource. + // + // This member is required. + Status types.ResourceDeploymentStatus + + // The deployment ID for your provisioned resource. + DeploymentId *string + + // The provisioned resource state change detail data that's returned by Proton. + Outputs []types.Output + + // The deployment status message for your provisioned resource. + StatusMessage *string + + noSmithyDocumentSerde +} + +type NotifyResourceDeploymentStatusChangeOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationNotifyResourceDeploymentStatusChangeMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpNotifyResourceDeploymentStatusChange{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpNotifyResourceDeploymentStatusChange{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpNotifyResourceDeploymentStatusChangeValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opNotifyResourceDeploymentStatusChange(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opNotifyResourceDeploymentStatusChange(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "proton", + OperationName: "NotifyResourceDeploymentStatusChange", + } +} diff --git a/service/proton/api_op_RejectEnvironmentAccountConnection.go b/service/proton/api_op_RejectEnvironmentAccountConnection.go index 1cfe4f4b08e..1750e22504a 100644 --- a/service/proton/api_op_RejectEnvironmentAccountConnection.go +++ b/service/proton/api_op_RejectEnvironmentAccountConnection.go @@ -17,7 +17,7 @@ import ( // You can’t reject an environment account connection that is connected to an // environment. For more information, see Environment account connections // (https://docs.aws.amazon.com/proton/latest/adminguide/ag-env-account-connections.html) -// in the AWS Proton Administrator guide. +// in the Proton Administrator guide. func (c *Client) RejectEnvironmentAccountConnection(ctx context.Context, params *RejectEnvironmentAccountConnectionInput, optFns ...func(*Options)) (*RejectEnvironmentAccountConnectionOutput, error) { if params == nil { params = &RejectEnvironmentAccountConnectionInput{} @@ -45,7 +45,7 @@ type RejectEnvironmentAccountConnectionInput struct { type RejectEnvironmentAccountConnectionOutput struct { - // The environment connection account detail data that's returned by AWS Proton. + // The environment connection account detail data that's returned by Proton. // // This member is required. EnvironmentAccountConnection *types.EnvironmentAccountConnection diff --git a/service/proton/api_op_TagResource.go b/service/proton/api_op_TagResource.go index 2670f0b4f8e..1a28acbc20a 100644 --- a/service/proton/api_op_TagResource.go +++ b/service/proton/api_op_TagResource.go @@ -11,11 +11,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Tag a resource. For more information, see AWS Proton resources and tagging in -// the AWS Proton Administrator Guide -// (https://docs.aws.amazon.com/proton/latest/adminguide/resources.html) or AWS -// Proton User Guide -// (https://docs.aws.amazon.com/proton/latest/userguide/resources.html). +// Tag a resource. For more information, see Proton resources and tagging in the +// Proton Administrator Guide +// (https://docs.aws.amazon.com/proton/latest/adminguide/resources.html) or Proton +// User Guide (https://docs.aws.amazon.com/proton/latest/userguide/resources.html). func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { if params == nil { params = &TagResourceInput{} diff --git a/service/proton/api_op_UntagResource.go b/service/proton/api_op_UntagResource.go index 731b83829db..fdfe5e7269a 100644 --- a/service/proton/api_op_UntagResource.go +++ b/service/proton/api_op_UntagResource.go @@ -10,11 +10,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Remove a tag from a resource. For more information, see AWS Proton resources and -// tagging in the AWS Proton Administrator Guide -// (https://docs.aws.amazon.com/proton/latest/adminguide/resources.html) or AWS -// Proton User Guide -// (https://docs.aws.amazon.com/proton/latest/userguide/resources.html). +// Remove a tag from a resource. For more information, see Proton resources and +// tagging in the Proton Administrator Guide +// (https://docs.aws.amazon.com/proton/latest/adminguide/resources.html) or Proton +// User Guide (https://docs.aws.amazon.com/proton/latest/userguide/resources.html). func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { if params == nil { params = &UntagResourceInput{} diff --git a/service/proton/api_op_UpdateAccountSettings.go b/service/proton/api_op_UpdateAccountSettings.go index 132f3e9d0b8..6ae5344a1b8 100644 --- a/service/proton/api_op_UpdateAccountSettings.go +++ b/service/proton/api_op_UpdateAccountSettings.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Update the AWS Proton pipeline service account settings. +// Update the Proton service pipeline role or repository settings. func (c *Client) UpdateAccountSettings(ctx context.Context, params *UpdateAccountSettingsInput, optFns ...func(*Options)) (*UpdateAccountSettingsOutput, error) { if params == nil { params = &UpdateAccountSettingsInput{} @@ -29,7 +29,18 @@ func (c *Client) UpdateAccountSettings(ctx context.Context, params *UpdateAccoun type UpdateAccountSettingsInput struct { - // The Amazon Resource Name (ARN) of the AWS Proton pipeline service role. + // The repository that you provide with pull request provisioning. Provisioning by + // pull request is currently in feature preview and is only usable with Terraform + // based Proton Templates. To learn more about Amazon Web Services Feature Preview + // terms (https://aws.amazon.com/service-terms), see section 2 on Beta and + // Previews. + PipelineProvisioningRepository *types.RepositoryBranchInput + + // The Amazon Resource Name (ARN) of the Proton pipeline service role. Provisioning + // by pull request is currently in feature preview and is only usable with + // Terraform based Proton Templates. To learn more about Amazon Web Services + // Feature Preview terms (https://aws.amazon.com/service-terms), see section 2 on + // Beta and Previews. PipelineServiceRoleArn *string noSmithyDocumentSerde @@ -37,7 +48,8 @@ type UpdateAccountSettingsInput struct { type UpdateAccountSettingsOutput struct { - // The AWS Proton pipeline service role detail data that's returned by AWS Proton. + // The Proton pipeline service role repository detail data that's returned by + // Proton. // // This member is required. AccountSettings *types.AccountSettings @@ -93,6 +105,9 @@ func (c *Client) addOperationUpdateAccountSettingsMiddlewares(stack *middleware. if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } + if err = addOpUpdateAccountSettingsValidationMiddleware(stack); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAccountSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/proton/api_op_UpdateEnvironment.go b/service/proton/api_op_UpdateEnvironment.go index 9796f97667c..9aa906fb94c 100644 --- a/service/proton/api_op_UpdateEnvironment.go +++ b/service/proton/api_op_UpdateEnvironment.go @@ -12,28 +12,33 @@ import ( ) // Update an environment. If the environment is associated with an environment -// account connection, don't update or include the protonServiceRoleArn parameter -// to update or connect to an environment account connection. You can only update -// to a new environment account connection if it was created in the same -// environment account that the current environment account connection was created -// in and is associated with the current environment. If the environment isn't -// associated with an environment account connection, don't update or include the -// environmentAccountConnectionId parameter to update or connect to an environment -// account connection. You can update either the environmentAccountConnectionId or -// protonServiceRoleArn parameter and value. You can’t update both. There are four -// modes for updating an environment as described in the following. The -// deploymentType field defines the mode. NONE In this mode, a deployment doesn't -// occur. Only the requested metadata parameters are updated. CURRENT_VERSION In -// this mode, the environment is deployed and updated with the new spec that you -// provide. Only requested parameters are updated. Don’t include minor or major -// version parameters when you use this deployment-type. MINOR_VERSION In this -// mode, the environment is deployed and updated with the published, recommended -// (latest) minor version of the current major version in use, by default. You can -// also specify a different minor version of the current major version in use. -// MAJOR_VERSION In this mode, the environment is deployed and updated with the -// published, recommended (latest) major and minor version of the current template, -// by default. You can also specify a different major version that's higher than -// the major version in use and a minor version (optional). +// account connection, don't update or include the protonServiceRoleArn and +// provisioningRepository parameter to update or connect to an environment account +// connection. You can only update to a new environment account connection if it +// was created in the same environment account that the current environment account +// connection was created in and is associated with the current environment. If the +// environment isn't associated with an environment account connection, don't +// update or include the environmentAccountConnectionId parameter to update or +// connect to an environment account connection. You can update either the +// environmentAccountConnectionId or protonServiceRoleArn parameter and value. You +// can’t update both. If the environment was provisioned with pull request +// provisioning, include the provisioningRepository parameter and omit the +// protonServiceRoleArn and environmentAccountConnectionId parameters. If the +// environment wasn't provisioned with pull request provisioning, omit the +// provisioningRepository parameter. There are four modes for updating an +// environment as described in the following. The deploymentType field defines the +// mode. NONE In this mode, a deployment doesn't occur. Only the requested metadata +// parameters are updated. CURRENT_VERSION In this mode, the environment is +// deployed and updated with the new spec that you provide. Only requested +// parameters are updated. Don’t include minor or major version parameters when you +// use this deployment-type. MINOR_VERSION In this mode, the environment is +// deployed and updated with the published, recommended (latest) minor version of +// the current major version in use, by default. You can also specify a different +// minor version of the current major version in use. MAJOR_VERSION In this mode, +// the environment is deployed and updated with the published, recommended (latest) +// major and minor version of the current template, by default. You can also +// specify a different major version that's higher than the major version in use +// and a minor version (optional). func (c *Client) UpdateEnvironment(ctx context.Context, params *UpdateEnvironmentInput, optFns ...func(*Options)) (*UpdateEnvironmentOutput, error) { if params == nil { params = &UpdateEnvironmentInput{} @@ -82,19 +87,26 @@ type UpdateEnvironmentInput struct { // with the current environment. EnvironmentAccountConnectionId *string - // The Amazon Resource Name (ARN) of the AWS Proton service role that allows AWS - // Proton to make API calls to other services your behalf. + // The Amazon Resource Name (ARN) of the Proton service role that allows Proton to + // make API calls to other services your behalf. ProtonServiceRoleArn *string + // The repository that you provide with pull request provisioning. Provisioning by + // pull request is currently in feature preview and is only usable with Terraform + // based Proton Templates. To learn more about Amazon Web Services Feature Preview + // terms (https://aws.amazon.com/service-terms), see section 2 on Beta and + // Previews. + ProvisioningRepository *types.RepositoryBranchInput + // The formatted specification that defines the update. // // This value conforms to the media type: application/yaml Spec *string - // The ID of the major version of the environment to update. + // The major version of the environment to update. TemplateMajorVersion *string - // The ID of the minor version of the environment to update. + // The minor version of the environment to update. TemplateMinorVersion *string noSmithyDocumentSerde @@ -102,7 +114,7 @@ type UpdateEnvironmentInput struct { type UpdateEnvironmentOutput struct { - // The environment detail data that's returned by AWS Proton. + // The environment detail data that's returned by Proton. // // This member is required. Environment *types.Environment diff --git a/service/proton/api_op_UpdateEnvironmentAccountConnection.go b/service/proton/api_op_UpdateEnvironmentAccountConnection.go index 3b64392a83f..0f2927df7ad 100644 --- a/service/proton/api_op_UpdateEnvironmentAccountConnection.go +++ b/service/proton/api_op_UpdateEnvironmentAccountConnection.go @@ -14,7 +14,7 @@ import ( // In an environment account, update an environment account connection to use a new // IAM role. For more information, see Environment account connections // (https://docs.aws.amazon.com/proton/latest/adminguide/ag-env-account-connections.html) -// in the AWS Proton Administrator guide. +// in the Proton Administrator guide. func (c *Client) UpdateEnvironmentAccountConnection(ctx context.Context, params *UpdateEnvironmentAccountConnectionInput, optFns ...func(*Options)) (*UpdateEnvironmentAccountConnectionOutput, error) { if params == nil { params = &UpdateEnvironmentAccountConnectionInput{} @@ -48,7 +48,7 @@ type UpdateEnvironmentAccountConnectionInput struct { type UpdateEnvironmentAccountConnectionOutput struct { - // The environment account connection detail data that's returned by AWS Proton. + // The environment account connection detail data that's returned by Proton. // // This member is required. EnvironmentAccountConnection *types.EnvironmentAccountConnection diff --git a/service/proton/api_op_UpdateEnvironmentTemplate.go b/service/proton/api_op_UpdateEnvironmentTemplate.go index 43375e84a86..8e43dbf4fe6 100644 --- a/service/proton/api_op_UpdateEnvironmentTemplate.go +++ b/service/proton/api_op_UpdateEnvironmentTemplate.go @@ -46,7 +46,7 @@ type UpdateEnvironmentTemplateInput struct { type UpdateEnvironmentTemplateOutput struct { - // The environment template detail data that's returned by AWS Proton. + // The environment template detail data that's returned by Proton. // // This member is required. EnvironmentTemplate *types.EnvironmentTemplate diff --git a/service/proton/api_op_UpdateEnvironmentTemplateVersion.go b/service/proton/api_op_UpdateEnvironmentTemplateVersion.go index 4c38edcfb62..567aaa0d42a 100644 --- a/service/proton/api_op_UpdateEnvironmentTemplateVersion.go +++ b/service/proton/api_op_UpdateEnvironmentTemplateVersion.go @@ -29,7 +29,7 @@ func (c *Client) UpdateEnvironmentTemplateVersion(ctx context.Context, params *U type UpdateEnvironmentTemplateVersionInput struct { - // To update a major version of an environment template, include majorVersion. + // To update a major version of an environment template, include major Version. // // This member is required. MajorVersion *string @@ -55,7 +55,7 @@ type UpdateEnvironmentTemplateVersionInput struct { type UpdateEnvironmentTemplateVersionOutput struct { - // The environment template version detail data that's returned by AWS Proton. + // The environment template version detail data that's returned by Proton. // // This member is required. EnvironmentTemplateVersion *types.EnvironmentTemplateVersion diff --git a/service/proton/api_op_UpdateService.go b/service/proton/api_op_UpdateService.go index f877ddf3f0e..c1bd2d10986 100644 --- a/service/proton/api_op_UpdateService.go +++ b/service/proton/api_op_UpdateService.go @@ -43,9 +43,9 @@ type UpdateServiceInput struct { // Lists the service instances to add and the existing service instances to remain. // Omit the existing service instances to delete from the list. Don't include edits // to the existing service instances or pipeline. For more information, see Edit a - // service in the AWS Proton Administrator Guide + // service in the Proton Administrator Guide // (https://docs.aws.amazon.com/proton/latest/adminguide/ag-svc-update.html) or the - // AWS Proton User Guide + // Proton User Guide // (https://docs.aws.amazon.com/proton/latest/userguide/ug-svc-update.html). // // This value conforms to the media type: application/yaml @@ -56,7 +56,7 @@ type UpdateServiceInput struct { type UpdateServiceOutput struct { - // The service detail data that's returned by AWS Proton. + // The service detail data that's returned by Proton. // // This member is required. Service *types.Service diff --git a/service/proton/api_op_UpdateServiceInstance.go b/service/proton/api_op_UpdateServiceInstance.go index 8783f670aaa..a5cf11915e9 100644 --- a/service/proton/api_op_UpdateServiceInstance.go +++ b/service/proton/api_op_UpdateServiceInstance.go @@ -86,7 +86,7 @@ type UpdateServiceInstanceInput struct { type UpdateServiceInstanceOutput struct { - // The service instance summary data returned by AWS Proton. + // The service instance summary data returned by Proton. // // This member is required. ServiceInstance *types.ServiceInstance diff --git a/service/proton/api_op_UpdateServicePipeline.go b/service/proton/api_op_UpdateServicePipeline.go index 436121dc1a9..d0af979170f 100644 --- a/service/proton/api_op_UpdateServicePipeline.go +++ b/service/proton/api_op_UpdateServicePipeline.go @@ -85,7 +85,7 @@ type UpdateServicePipelineInput struct { type UpdateServicePipelineOutput struct { - // The pipeline details returned by AWS Proton. + // The pipeline details returned by Proton. // // This member is required. Pipeline *types.ServicePipeline diff --git a/service/proton/api_op_UpdateServiceTemplate.go b/service/proton/api_op_UpdateServiceTemplate.go index c2c95bdd3ac..ecfa1908867 100644 --- a/service/proton/api_op_UpdateServiceTemplate.go +++ b/service/proton/api_op_UpdateServiceTemplate.go @@ -46,7 +46,7 @@ type UpdateServiceTemplateInput struct { type UpdateServiceTemplateOutput struct { - // The service template detail data that's returned by AWS Proton. + // The service template detail data that's returned by Proton. // // This member is required. ServiceTemplate *types.ServiceTemplate diff --git a/service/proton/api_op_UpdateServiceTemplateVersion.go b/service/proton/api_op_UpdateServiceTemplateVersion.go index ee7600423a6..053e3f12d7e 100644 --- a/service/proton/api_op_UpdateServiceTemplateVersion.go +++ b/service/proton/api_op_UpdateServiceTemplateVersion.go @@ -29,7 +29,7 @@ func (c *Client) UpdateServiceTemplateVersion(ctx context.Context, params *Updat type UpdateServiceTemplateVersionInput struct { - // To update a major version of a service template, include majorVersion. + // To update a major version of a service template, include major Version. // // This member is required. MajorVersion *string @@ -59,7 +59,7 @@ type UpdateServiceTemplateVersionInput struct { type UpdateServiceTemplateVersionOutput struct { - // The service template version detail data that's returned by AWS Proton. + // The service template version detail data that's returned by Proton. // // This member is required. ServiceTemplateVersion *types.ServiceTemplateVersion diff --git a/service/proton/api_op_UpdateTemplateSyncConfig.go b/service/proton/api_op_UpdateTemplateSyncConfig.go new file mode 100644 index 00000000000..2e8fa2e4248 --- /dev/null +++ b/service/proton/api_op_UpdateTemplateSyncConfig.go @@ -0,0 +1,146 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package proton + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/proton/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Update template sync configuration parameters, except for the templateName and +// templateType. +func (c *Client) UpdateTemplateSyncConfig(ctx context.Context, params *UpdateTemplateSyncConfigInput, optFns ...func(*Options)) (*UpdateTemplateSyncConfigOutput, error) { + if params == nil { + params = &UpdateTemplateSyncConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateTemplateSyncConfig", params, optFns, c.addOperationUpdateTemplateSyncConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateTemplateSyncConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateTemplateSyncConfigInput struct { + + // The repository branch. + // + // This member is required. + Branch *string + + // The name of the repository, for example myrepos/myrepo. + // + // This member is required. + RepositoryName *string + + // The repository provider. + // + // This member is required. + RepositoryProvider types.RepositoryProvider + + // The synced template name. + // + // This member is required. + TemplateName *string + + // The synced template type. + // + // This member is required. + TemplateType types.TemplateType + + // A subdirectory path to your template bundle version. When included, limits the + // template bundle search to this repository directory. + Subdirectory *string + + noSmithyDocumentSerde +} + +type UpdateTemplateSyncConfigOutput struct { + + // The template sync configuration detail data that's returned by Proton. + TemplateSyncConfig *types.TemplateSyncConfig + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateTemplateSyncConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateTemplateSyncConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateTemplateSyncConfig{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateTemplateSyncConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateTemplateSyncConfig(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateTemplateSyncConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "proton", + OperationName: "UpdateTemplateSyncConfig", + } +} diff --git a/service/proton/deserializers.go b/service/proton/deserializers.go index 3163c68176a..ae08b255ea2 100644 --- a/service/proton/deserializers.go +++ b/service/proton/deserializers.go @@ -1033,14 +1033,14 @@ func awsAwsjson10_deserializeOpErrorCreateEnvironmentTemplateVersion(response *s } } -type awsAwsjson10_deserializeOpCreateService struct { +type awsAwsjson10_deserializeOpCreateRepository struct { } -func (*awsAwsjson10_deserializeOpCreateService) ID() string { +func (*awsAwsjson10_deserializeOpCreateRepository) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpCreateService) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateRepository) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1054,9 +1054,9 @@ func (m *awsAwsjson10_deserializeOpCreateService) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorCreateService(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateRepository(response, &metadata) } - output := &CreateServiceOutput{} + output := &CreateRepositoryOutput{} out.Result = output var buff [1024]byte @@ -1076,7 +1076,7 @@ func (m *awsAwsjson10_deserializeOpCreateService) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentCreateServiceOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateRepositoryOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1090,7 +1090,7 @@ func (m *awsAwsjson10_deserializeOpCreateService) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson10_deserializeOpErrorCreateService(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateRepository(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1140,9 +1140,6 @@ func awsAwsjson10_deserializeOpErrorCreateService(response *smithyhttp.Response, case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) @@ -1162,14 +1159,14 @@ func awsAwsjson10_deserializeOpErrorCreateService(response *smithyhttp.Response, } } -type awsAwsjson10_deserializeOpCreateServiceTemplate struct { +type awsAwsjson10_deserializeOpCreateService struct { } -func (*awsAwsjson10_deserializeOpCreateServiceTemplate) ID() string { +func (*awsAwsjson10_deserializeOpCreateService) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpCreateServiceTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateService) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1183,9 +1180,9 @@ func (m *awsAwsjson10_deserializeOpCreateServiceTemplate) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorCreateServiceTemplate(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateService(response, &metadata) } - output := &CreateServiceTemplateOutput{} + output := &CreateServiceOutput{} out.Result = output var buff [1024]byte @@ -1205,7 +1202,7 @@ func (m *awsAwsjson10_deserializeOpCreateServiceTemplate) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentCreateServiceTemplateOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateServiceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1219,7 +1216,7 @@ func (m *awsAwsjson10_deserializeOpCreateServiceTemplate) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson10_deserializeOpErrorCreateServiceTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateService(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1269,6 +1266,9 @@ func awsAwsjson10_deserializeOpErrorCreateServiceTemplate(response *smithyhttp.R case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) @@ -1288,14 +1288,14 @@ func awsAwsjson10_deserializeOpErrorCreateServiceTemplate(response *smithyhttp.R } } -type awsAwsjson10_deserializeOpCreateServiceTemplateVersion struct { +type awsAwsjson10_deserializeOpCreateServiceTemplate struct { } -func (*awsAwsjson10_deserializeOpCreateServiceTemplateVersion) ID() string { +func (*awsAwsjson10_deserializeOpCreateServiceTemplate) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpCreateServiceTemplateVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateServiceTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1309,9 +1309,9 @@ func (m *awsAwsjson10_deserializeOpCreateServiceTemplateVersion) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorCreateServiceTemplateVersion(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateServiceTemplate(response, &metadata) } - output := &CreateServiceTemplateVersionOutput{} + output := &CreateServiceTemplateOutput{} out.Result = output var buff [1024]byte @@ -1331,7 +1331,7 @@ func (m *awsAwsjson10_deserializeOpCreateServiceTemplateVersion) HandleDeseriali return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentCreateServiceTemplateVersionOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateServiceTemplateOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1345,7 +1345,7 @@ func (m *awsAwsjson10_deserializeOpCreateServiceTemplateVersion) HandleDeseriali return out, metadata, err } -func awsAwsjson10_deserializeOpErrorCreateServiceTemplateVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateServiceTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1395,9 +1395,6 @@ func awsAwsjson10_deserializeOpErrorCreateServiceTemplateVersion(response *smith case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) @@ -1417,14 +1414,14 @@ func awsAwsjson10_deserializeOpErrorCreateServiceTemplateVersion(response *smith } } -type awsAwsjson10_deserializeOpDeleteEnvironment struct { +type awsAwsjson10_deserializeOpCreateServiceTemplateVersion struct { } -func (*awsAwsjson10_deserializeOpDeleteEnvironment) ID() string { +func (*awsAwsjson10_deserializeOpCreateServiceTemplateVersion) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteEnvironment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateServiceTemplateVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1438,9 +1435,9 @@ func (m *awsAwsjson10_deserializeOpDeleteEnvironment) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteEnvironment(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateServiceTemplateVersion(response, &metadata) } - output := &DeleteEnvironmentOutput{} + output := &CreateServiceTemplateVersionOutput{} out.Result = output var buff [1024]byte @@ -1460,7 +1457,7 @@ func (m *awsAwsjson10_deserializeOpDeleteEnvironment) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteEnvironmentOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateServiceTemplateVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1474,7 +1471,7 @@ func (m *awsAwsjson10_deserializeOpDeleteEnvironment) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteEnvironment(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateServiceTemplateVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1527,6 +1524,9 @@ func awsAwsjson10_deserializeOpErrorDeleteEnvironment(response *smithyhttp.Respo case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -1543,14 +1543,14 @@ func awsAwsjson10_deserializeOpErrorDeleteEnvironment(response *smithyhttp.Respo } } -type awsAwsjson10_deserializeOpDeleteEnvironmentAccountConnection struct { +type awsAwsjson10_deserializeOpCreateTemplateSyncConfig struct { } -func (*awsAwsjson10_deserializeOpDeleteEnvironmentAccountConnection) ID() string { +func (*awsAwsjson10_deserializeOpCreateTemplateSyncConfig) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteEnvironmentAccountConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateTemplateSyncConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1564,9 +1564,9 @@ func (m *awsAwsjson10_deserializeOpDeleteEnvironmentAccountConnection) HandleDes } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteEnvironmentAccountConnection(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateTemplateSyncConfig(response, &metadata) } - output := &DeleteEnvironmentAccountConnectionOutput{} + output := &CreateTemplateSyncConfigOutput{} out.Result = output var buff [1024]byte @@ -1586,7 +1586,7 @@ func (m *awsAwsjson10_deserializeOpDeleteEnvironmentAccountConnection) HandleDes return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteEnvironmentAccountConnectionOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateTemplateSyncConfigOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1600,7 +1600,7 @@ func (m *awsAwsjson10_deserializeOpDeleteEnvironmentAccountConnection) HandleDes return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteEnvironmentAccountConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateTemplateSyncConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1650,8 +1650,8 @@ func awsAwsjson10_deserializeOpErrorDeleteEnvironmentAccountConnection(response case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -1669,14 +1669,14 @@ func awsAwsjson10_deserializeOpErrorDeleteEnvironmentAccountConnection(response } } -type awsAwsjson10_deserializeOpDeleteEnvironmentTemplate struct { +type awsAwsjson10_deserializeOpDeleteEnvironment struct { } -func (*awsAwsjson10_deserializeOpDeleteEnvironmentTemplate) ID() string { +func (*awsAwsjson10_deserializeOpDeleteEnvironment) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteEnvironmentTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteEnvironment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1690,9 +1690,9 @@ func (m *awsAwsjson10_deserializeOpDeleteEnvironmentTemplate) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteEnvironmentTemplate(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteEnvironment(response, &metadata) } - output := &DeleteEnvironmentTemplateOutput{} + output := &DeleteEnvironmentOutput{} out.Result = output var buff [1024]byte @@ -1712,7 +1712,7 @@ func (m *awsAwsjson10_deserializeOpDeleteEnvironmentTemplate) HandleDeserialize( return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteEnvironmentTemplateOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteEnvironmentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1726,7 +1726,7 @@ func (m *awsAwsjson10_deserializeOpDeleteEnvironmentTemplate) HandleDeserialize( return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteEnvironmentTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteEnvironment(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1795,14 +1795,14 @@ func awsAwsjson10_deserializeOpErrorDeleteEnvironmentTemplate(response *smithyht } } -type awsAwsjson10_deserializeOpDeleteEnvironmentTemplateVersion struct { +type awsAwsjson10_deserializeOpDeleteEnvironmentAccountConnection struct { } -func (*awsAwsjson10_deserializeOpDeleteEnvironmentTemplateVersion) ID() string { +func (*awsAwsjson10_deserializeOpDeleteEnvironmentAccountConnection) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteEnvironmentTemplateVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteEnvironmentAccountConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1816,9 +1816,9 @@ func (m *awsAwsjson10_deserializeOpDeleteEnvironmentTemplateVersion) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteEnvironmentTemplateVersion(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteEnvironmentAccountConnection(response, &metadata) } - output := &DeleteEnvironmentTemplateVersionOutput{} + output := &DeleteEnvironmentAccountConnectionOutput{} out.Result = output var buff [1024]byte @@ -1838,7 +1838,7 @@ func (m *awsAwsjson10_deserializeOpDeleteEnvironmentTemplateVersion) HandleDeser return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteEnvironmentTemplateVersionOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteEnvironmentAccountConnectionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1852,7 +1852,7 @@ func (m *awsAwsjson10_deserializeOpDeleteEnvironmentTemplateVersion) HandleDeser return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteEnvironmentTemplateVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteEnvironmentAccountConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1921,14 +1921,14 @@ func awsAwsjson10_deserializeOpErrorDeleteEnvironmentTemplateVersion(response *s } } -type awsAwsjson10_deserializeOpDeleteService struct { +type awsAwsjson10_deserializeOpDeleteEnvironmentTemplate struct { } -func (*awsAwsjson10_deserializeOpDeleteService) ID() string { +func (*awsAwsjson10_deserializeOpDeleteEnvironmentTemplate) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteService) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteEnvironmentTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1942,9 +1942,9 @@ func (m *awsAwsjson10_deserializeOpDeleteService) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteService(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteEnvironmentTemplate(response, &metadata) } - output := &DeleteServiceOutput{} + output := &DeleteEnvironmentTemplateOutput{} out.Result = output var buff [1024]byte @@ -1964,7 +1964,7 @@ func (m *awsAwsjson10_deserializeOpDeleteService) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteServiceOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteEnvironmentTemplateOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1978,7 +1978,7 @@ func (m *awsAwsjson10_deserializeOpDeleteService) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteService(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteEnvironmentTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2047,14 +2047,14 @@ func awsAwsjson10_deserializeOpErrorDeleteService(response *smithyhttp.Response, } } -type awsAwsjson10_deserializeOpDeleteServiceTemplate struct { +type awsAwsjson10_deserializeOpDeleteEnvironmentTemplateVersion struct { } -func (*awsAwsjson10_deserializeOpDeleteServiceTemplate) ID() string { +func (*awsAwsjson10_deserializeOpDeleteEnvironmentTemplateVersion) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteServiceTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteEnvironmentTemplateVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2068,9 +2068,9 @@ func (m *awsAwsjson10_deserializeOpDeleteServiceTemplate) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteServiceTemplate(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteEnvironmentTemplateVersion(response, &metadata) } - output := &DeleteServiceTemplateOutput{} + output := &DeleteEnvironmentTemplateVersionOutput{} out.Result = output var buff [1024]byte @@ -2090,7 +2090,7 @@ func (m *awsAwsjson10_deserializeOpDeleteServiceTemplate) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteServiceTemplateOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteEnvironmentTemplateVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2104,7 +2104,7 @@ func (m *awsAwsjson10_deserializeOpDeleteServiceTemplate) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteServiceTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteEnvironmentTemplateVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2173,14 +2173,14 @@ func awsAwsjson10_deserializeOpErrorDeleteServiceTemplate(response *smithyhttp.R } } -type awsAwsjson10_deserializeOpDeleteServiceTemplateVersion struct { +type awsAwsjson10_deserializeOpDeleteRepository struct { } -func (*awsAwsjson10_deserializeOpDeleteServiceTemplateVersion) ID() string { +func (*awsAwsjson10_deserializeOpDeleteRepository) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteServiceTemplateVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteRepository) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2194,9 +2194,9 @@ func (m *awsAwsjson10_deserializeOpDeleteServiceTemplateVersion) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteServiceTemplateVersion(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteRepository(response, &metadata) } - output := &DeleteServiceTemplateVersionOutput{} + output := &DeleteRepositoryOutput{} out.Result = output var buff [1024]byte @@ -2216,7 +2216,7 @@ func (m *awsAwsjson10_deserializeOpDeleteServiceTemplateVersion) HandleDeseriali return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteServiceTemplateVersionOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteRepositoryOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2230,7 +2230,7 @@ func (m *awsAwsjson10_deserializeOpDeleteServiceTemplateVersion) HandleDeseriali return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteServiceTemplateVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteRepository(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2299,14 +2299,14 @@ func awsAwsjson10_deserializeOpErrorDeleteServiceTemplateVersion(response *smith } } -type awsAwsjson10_deserializeOpGetAccountSettings struct { +type awsAwsjson10_deserializeOpDeleteService struct { } -func (*awsAwsjson10_deserializeOpGetAccountSettings) ID() string { +func (*awsAwsjson10_deserializeOpDeleteService) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetAccountSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteService) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2320,9 +2320,9 @@ func (m *awsAwsjson10_deserializeOpGetAccountSettings) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetAccountSettings(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteService(response, &metadata) } - output := &GetAccountSettingsOutput{} + output := &DeleteServiceOutput{} out.Result = output var buff [1024]byte @@ -2342,7 +2342,7 @@ func (m *awsAwsjson10_deserializeOpGetAccountSettings) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetAccountSettingsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteServiceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2356,7 +2356,7 @@ func (m *awsAwsjson10_deserializeOpGetAccountSettings) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetAccountSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteService(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2400,6 +2400,9 @@ func awsAwsjson10_deserializeOpErrorGetAccountSettings(response *smithyhttp.Resp case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -2422,14 +2425,14 @@ func awsAwsjson10_deserializeOpErrorGetAccountSettings(response *smithyhttp.Resp } } -type awsAwsjson10_deserializeOpGetEnvironment struct { +type awsAwsjson10_deserializeOpDeleteServiceTemplate struct { } -func (*awsAwsjson10_deserializeOpGetEnvironment) ID() string { +func (*awsAwsjson10_deserializeOpDeleteServiceTemplate) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetEnvironment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteServiceTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2443,9 +2446,9 @@ func (m *awsAwsjson10_deserializeOpGetEnvironment) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetEnvironment(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteServiceTemplate(response, &metadata) } - output := &GetEnvironmentOutput{} + output := &DeleteServiceTemplateOutput{} out.Result = output var buff [1024]byte @@ -2465,7 +2468,7 @@ func (m *awsAwsjson10_deserializeOpGetEnvironment) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetEnvironmentOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteServiceTemplateOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2479,7 +2482,7 @@ func (m *awsAwsjson10_deserializeOpGetEnvironment) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetEnvironment(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteServiceTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2523,6 +2526,9 @@ func awsAwsjson10_deserializeOpErrorGetEnvironment(response *smithyhttp.Response case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -2545,14 +2551,14 @@ func awsAwsjson10_deserializeOpErrorGetEnvironment(response *smithyhttp.Response } } -type awsAwsjson10_deserializeOpGetEnvironmentAccountConnection struct { +type awsAwsjson10_deserializeOpDeleteServiceTemplateVersion struct { } -func (*awsAwsjson10_deserializeOpGetEnvironmentAccountConnection) ID() string { +func (*awsAwsjson10_deserializeOpDeleteServiceTemplateVersion) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetEnvironmentAccountConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteServiceTemplateVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2566,9 +2572,9 @@ func (m *awsAwsjson10_deserializeOpGetEnvironmentAccountConnection) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetEnvironmentAccountConnection(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteServiceTemplateVersion(response, &metadata) } - output := &GetEnvironmentAccountConnectionOutput{} + output := &DeleteServiceTemplateVersionOutput{} out.Result = output var buff [1024]byte @@ -2588,7 +2594,7 @@ func (m *awsAwsjson10_deserializeOpGetEnvironmentAccountConnection) HandleDeseri return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetEnvironmentAccountConnectionOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteServiceTemplateVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2602,7 +2608,7 @@ func (m *awsAwsjson10_deserializeOpGetEnvironmentAccountConnection) HandleDeseri return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetEnvironmentAccountConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteServiceTemplateVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2646,6 +2652,9 @@ func awsAwsjson10_deserializeOpErrorGetEnvironmentAccountConnection(response *sm case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -2668,14 +2677,14 @@ func awsAwsjson10_deserializeOpErrorGetEnvironmentAccountConnection(response *sm } } -type awsAwsjson10_deserializeOpGetEnvironmentTemplate struct { +type awsAwsjson10_deserializeOpDeleteTemplateSyncConfig struct { } -func (*awsAwsjson10_deserializeOpGetEnvironmentTemplate) ID() string { +func (*awsAwsjson10_deserializeOpDeleteTemplateSyncConfig) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetEnvironmentTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteTemplateSyncConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2689,9 +2698,9 @@ func (m *awsAwsjson10_deserializeOpGetEnvironmentTemplate) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetEnvironmentTemplate(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteTemplateSyncConfig(response, &metadata) } - output := &GetEnvironmentTemplateOutput{} + output := &DeleteTemplateSyncConfigOutput{} out.Result = output var buff [1024]byte @@ -2711,7 +2720,7 @@ func (m *awsAwsjson10_deserializeOpGetEnvironmentTemplate) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetEnvironmentTemplateOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteTemplateSyncConfigOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2725,7 +2734,7 @@ func (m *awsAwsjson10_deserializeOpGetEnvironmentTemplate) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetEnvironmentTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteTemplateSyncConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2769,6 +2778,9 @@ func awsAwsjson10_deserializeOpErrorGetEnvironmentTemplate(response *smithyhttp. case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -2791,14 +2803,14 @@ func awsAwsjson10_deserializeOpErrorGetEnvironmentTemplate(response *smithyhttp. } } -type awsAwsjson10_deserializeOpGetEnvironmentTemplateVersion struct { +type awsAwsjson10_deserializeOpGetAccountSettings struct { } -func (*awsAwsjson10_deserializeOpGetEnvironmentTemplateVersion) ID() string { +func (*awsAwsjson10_deserializeOpGetAccountSettings) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetEnvironmentTemplateVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetAccountSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2812,9 +2824,9 @@ func (m *awsAwsjson10_deserializeOpGetEnvironmentTemplateVersion) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetEnvironmentTemplateVersion(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetAccountSettings(response, &metadata) } - output := &GetEnvironmentTemplateVersionOutput{} + output := &GetAccountSettingsOutput{} out.Result = output var buff [1024]byte @@ -2834,7 +2846,7 @@ func (m *awsAwsjson10_deserializeOpGetEnvironmentTemplateVersion) HandleDeserial return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetEnvironmentTemplateVersionOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetAccountSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2848,7 +2860,7 @@ func (m *awsAwsjson10_deserializeOpGetEnvironmentTemplateVersion) HandleDeserial return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetEnvironmentTemplateVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetAccountSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2914,14 +2926,14 @@ func awsAwsjson10_deserializeOpErrorGetEnvironmentTemplateVersion(response *smit } } -type awsAwsjson10_deserializeOpGetService struct { +type awsAwsjson10_deserializeOpGetEnvironment struct { } -func (*awsAwsjson10_deserializeOpGetService) ID() string { +func (*awsAwsjson10_deserializeOpGetEnvironment) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetService) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetEnvironment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2935,9 +2947,9 @@ func (m *awsAwsjson10_deserializeOpGetService) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetService(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetEnvironment(response, &metadata) } - output := &GetServiceOutput{} + output := &GetEnvironmentOutput{} out.Result = output var buff [1024]byte @@ -2957,7 +2969,7 @@ func (m *awsAwsjson10_deserializeOpGetService) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetServiceOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetEnvironmentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2971,7 +2983,7 @@ func (m *awsAwsjson10_deserializeOpGetService) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetService(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetEnvironment(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3037,14 +3049,14 @@ func awsAwsjson10_deserializeOpErrorGetService(response *smithyhttp.Response, me } } -type awsAwsjson10_deserializeOpGetServiceInstance struct { +type awsAwsjson10_deserializeOpGetEnvironmentAccountConnection struct { } -func (*awsAwsjson10_deserializeOpGetServiceInstance) ID() string { +func (*awsAwsjson10_deserializeOpGetEnvironmentAccountConnection) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetServiceInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetEnvironmentAccountConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3058,9 +3070,9 @@ func (m *awsAwsjson10_deserializeOpGetServiceInstance) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetServiceInstance(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetEnvironmentAccountConnection(response, &metadata) } - output := &GetServiceInstanceOutput{} + output := &GetEnvironmentAccountConnectionOutput{} out.Result = output var buff [1024]byte @@ -3080,7 +3092,7 @@ func (m *awsAwsjson10_deserializeOpGetServiceInstance) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetServiceInstanceOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetEnvironmentAccountConnectionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3094,7 +3106,7 @@ func (m *awsAwsjson10_deserializeOpGetServiceInstance) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetServiceInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetEnvironmentAccountConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3160,14 +3172,14 @@ func awsAwsjson10_deserializeOpErrorGetServiceInstance(response *smithyhttp.Resp } } -type awsAwsjson10_deserializeOpGetServiceTemplate struct { +type awsAwsjson10_deserializeOpGetEnvironmentTemplate struct { } -func (*awsAwsjson10_deserializeOpGetServiceTemplate) ID() string { +func (*awsAwsjson10_deserializeOpGetEnvironmentTemplate) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetServiceTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetEnvironmentTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3181,9 +3193,9 @@ func (m *awsAwsjson10_deserializeOpGetServiceTemplate) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetServiceTemplate(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetEnvironmentTemplate(response, &metadata) } - output := &GetServiceTemplateOutput{} + output := &GetEnvironmentTemplateOutput{} out.Result = output var buff [1024]byte @@ -3203,7 +3215,7 @@ func (m *awsAwsjson10_deserializeOpGetServiceTemplate) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetServiceTemplateOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetEnvironmentTemplateOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3217,7 +3229,7 @@ func (m *awsAwsjson10_deserializeOpGetServiceTemplate) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetServiceTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetEnvironmentTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3283,14 +3295,14 @@ func awsAwsjson10_deserializeOpErrorGetServiceTemplate(response *smithyhttp.Resp } } -type awsAwsjson10_deserializeOpGetServiceTemplateVersion struct { +type awsAwsjson10_deserializeOpGetEnvironmentTemplateVersion struct { } -func (*awsAwsjson10_deserializeOpGetServiceTemplateVersion) ID() string { +func (*awsAwsjson10_deserializeOpGetEnvironmentTemplateVersion) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetServiceTemplateVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetEnvironmentTemplateVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3304,9 +3316,9 @@ func (m *awsAwsjson10_deserializeOpGetServiceTemplateVersion) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetServiceTemplateVersion(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetEnvironmentTemplateVersion(response, &metadata) } - output := &GetServiceTemplateVersionOutput{} + output := &GetEnvironmentTemplateVersionOutput{} out.Result = output var buff [1024]byte @@ -3326,7 +3338,7 @@ func (m *awsAwsjson10_deserializeOpGetServiceTemplateVersion) HandleDeserialize( return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetServiceTemplateVersionOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetEnvironmentTemplateVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3340,7 +3352,7 @@ func (m *awsAwsjson10_deserializeOpGetServiceTemplateVersion) HandleDeserialize( return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetServiceTemplateVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetEnvironmentTemplateVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3406,14 +3418,14 @@ func awsAwsjson10_deserializeOpErrorGetServiceTemplateVersion(response *smithyht } } -type awsAwsjson10_deserializeOpListEnvironmentAccountConnections struct { +type awsAwsjson10_deserializeOpGetRepository struct { } -func (*awsAwsjson10_deserializeOpListEnvironmentAccountConnections) ID() string { +func (*awsAwsjson10_deserializeOpGetRepository) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListEnvironmentAccountConnections) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetRepository) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3427,9 +3439,9 @@ func (m *awsAwsjson10_deserializeOpListEnvironmentAccountConnections) HandleDese } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListEnvironmentAccountConnections(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetRepository(response, &metadata) } - output := &ListEnvironmentAccountConnectionsOutput{} + output := &GetRepositoryOutput{} out.Result = output var buff [1024]byte @@ -3449,7 +3461,7 @@ func (m *awsAwsjson10_deserializeOpListEnvironmentAccountConnections) HandleDese return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListEnvironmentAccountConnectionsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetRepositoryOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3463,7 +3475,7 @@ func (m *awsAwsjson10_deserializeOpListEnvironmentAccountConnections) HandleDese return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListEnvironmentAccountConnections(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetRepository(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3510,6 +3522,9 @@ func awsAwsjson10_deserializeOpErrorListEnvironmentAccountConnections(response * case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -3526,14 +3541,14 @@ func awsAwsjson10_deserializeOpErrorListEnvironmentAccountConnections(response * } } -type awsAwsjson10_deserializeOpListEnvironments struct { +type awsAwsjson10_deserializeOpGetRepositorySyncStatus struct { } -func (*awsAwsjson10_deserializeOpListEnvironments) ID() string { +func (*awsAwsjson10_deserializeOpGetRepositorySyncStatus) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListEnvironments) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetRepositorySyncStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3547,9 +3562,9 @@ func (m *awsAwsjson10_deserializeOpListEnvironments) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListEnvironments(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetRepositorySyncStatus(response, &metadata) } - output := &ListEnvironmentsOutput{} + output := &GetRepositorySyncStatusOutput{} out.Result = output var buff [1024]byte @@ -3569,7 +3584,7 @@ func (m *awsAwsjson10_deserializeOpListEnvironments) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListEnvironmentsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetRepositorySyncStatusOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3583,7 +3598,7 @@ func (m *awsAwsjson10_deserializeOpListEnvironments) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListEnvironments(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetRepositorySyncStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3649,14 +3664,14 @@ func awsAwsjson10_deserializeOpErrorListEnvironments(response *smithyhttp.Respon } } -type awsAwsjson10_deserializeOpListEnvironmentTemplates struct { +type awsAwsjson10_deserializeOpGetService struct { } -func (*awsAwsjson10_deserializeOpListEnvironmentTemplates) ID() string { +func (*awsAwsjson10_deserializeOpGetService) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListEnvironmentTemplates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetService) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3670,9 +3685,9 @@ func (m *awsAwsjson10_deserializeOpListEnvironmentTemplates) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListEnvironmentTemplates(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetService(response, &metadata) } - output := &ListEnvironmentTemplatesOutput{} + output := &GetServiceOutput{} out.Result = output var buff [1024]byte @@ -3692,7 +3707,7 @@ func (m *awsAwsjson10_deserializeOpListEnvironmentTemplates) HandleDeserialize(c return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListEnvironmentTemplatesOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetServiceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3706,7 +3721,7 @@ func (m *awsAwsjson10_deserializeOpListEnvironmentTemplates) HandleDeserialize(c return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListEnvironmentTemplates(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetService(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3753,6 +3768,9 @@ func awsAwsjson10_deserializeOpErrorListEnvironmentTemplates(response *smithyhtt case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -3769,14 +3787,14 @@ func awsAwsjson10_deserializeOpErrorListEnvironmentTemplates(response *smithyhtt } } -type awsAwsjson10_deserializeOpListEnvironmentTemplateVersions struct { +type awsAwsjson10_deserializeOpGetServiceInstance struct { } -func (*awsAwsjson10_deserializeOpListEnvironmentTemplateVersions) ID() string { +func (*awsAwsjson10_deserializeOpGetServiceInstance) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListEnvironmentTemplateVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetServiceInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3790,9 +3808,9 @@ func (m *awsAwsjson10_deserializeOpListEnvironmentTemplateVersions) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListEnvironmentTemplateVersions(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetServiceInstance(response, &metadata) } - output := &ListEnvironmentTemplateVersionsOutput{} + output := &GetServiceInstanceOutput{} out.Result = output var buff [1024]byte @@ -3812,7 +3830,7 @@ func (m *awsAwsjson10_deserializeOpListEnvironmentTemplateVersions) HandleDeseri return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListEnvironmentTemplateVersionsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetServiceInstanceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3826,7 +3844,7 @@ func (m *awsAwsjson10_deserializeOpListEnvironmentTemplateVersions) HandleDeseri return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListEnvironmentTemplateVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetServiceInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3892,14 +3910,14 @@ func awsAwsjson10_deserializeOpErrorListEnvironmentTemplateVersions(response *sm } } -type awsAwsjson10_deserializeOpListServiceInstances struct { +type awsAwsjson10_deserializeOpGetServiceTemplate struct { } -func (*awsAwsjson10_deserializeOpListServiceInstances) ID() string { +func (*awsAwsjson10_deserializeOpGetServiceTemplate) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListServiceInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetServiceTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3913,9 +3931,9 @@ func (m *awsAwsjson10_deserializeOpListServiceInstances) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListServiceInstances(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetServiceTemplate(response, &metadata) } - output := &ListServiceInstancesOutput{} + output := &GetServiceTemplateOutput{} out.Result = output var buff [1024]byte @@ -3935,7 +3953,7 @@ func (m *awsAwsjson10_deserializeOpListServiceInstances) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListServiceInstancesOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetServiceTemplateOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3949,7 +3967,7 @@ func (m *awsAwsjson10_deserializeOpListServiceInstances) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListServiceInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetServiceTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4015,14 +4033,14 @@ func awsAwsjson10_deserializeOpErrorListServiceInstances(response *smithyhttp.Re } } -type awsAwsjson10_deserializeOpListServices struct { +type awsAwsjson10_deserializeOpGetServiceTemplateVersion struct { } -func (*awsAwsjson10_deserializeOpListServices) ID() string { +func (*awsAwsjson10_deserializeOpGetServiceTemplateVersion) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListServices) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetServiceTemplateVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4036,9 +4054,9 @@ func (m *awsAwsjson10_deserializeOpListServices) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListServices(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetServiceTemplateVersion(response, &metadata) } - output := &ListServicesOutput{} + output := &GetServiceTemplateVersionOutput{} out.Result = output var buff [1024]byte @@ -4058,7 +4076,7 @@ func (m *awsAwsjson10_deserializeOpListServices) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListServicesOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetServiceTemplateVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4072,7 +4090,7 @@ func (m *awsAwsjson10_deserializeOpListServices) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListServices(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetServiceTemplateVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4119,6 +4137,9 @@ func awsAwsjson10_deserializeOpErrorListServices(response *smithyhttp.Response, case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -4135,14 +4156,14 @@ func awsAwsjson10_deserializeOpErrorListServices(response *smithyhttp.Response, } } -type awsAwsjson10_deserializeOpListServiceTemplates struct { +type awsAwsjson10_deserializeOpGetTemplateSyncConfig struct { } -func (*awsAwsjson10_deserializeOpListServiceTemplates) ID() string { +func (*awsAwsjson10_deserializeOpGetTemplateSyncConfig) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListServiceTemplates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetTemplateSyncConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4156,9 +4177,9 @@ func (m *awsAwsjson10_deserializeOpListServiceTemplates) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListServiceTemplates(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetTemplateSyncConfig(response, &metadata) } - output := &ListServiceTemplatesOutput{} + output := &GetTemplateSyncConfigOutput{} out.Result = output var buff [1024]byte @@ -4178,7 +4199,7 @@ func (m *awsAwsjson10_deserializeOpListServiceTemplates) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListServiceTemplatesOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetTemplateSyncConfigOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4192,7 +4213,7 @@ func (m *awsAwsjson10_deserializeOpListServiceTemplates) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListServiceTemplates(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetTemplateSyncConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4239,6 +4260,9 @@ func awsAwsjson10_deserializeOpErrorListServiceTemplates(response *smithyhttp.Re case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -4255,14 +4279,14 @@ func awsAwsjson10_deserializeOpErrorListServiceTemplates(response *smithyhttp.Re } } -type awsAwsjson10_deserializeOpListServiceTemplateVersions struct { +type awsAwsjson10_deserializeOpGetTemplateSyncStatus struct { } -func (*awsAwsjson10_deserializeOpListServiceTemplateVersions) ID() string { +func (*awsAwsjson10_deserializeOpGetTemplateSyncStatus) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListServiceTemplateVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetTemplateSyncStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4276,9 +4300,9 @@ func (m *awsAwsjson10_deserializeOpListServiceTemplateVersions) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListServiceTemplateVersions(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetTemplateSyncStatus(response, &metadata) } - output := &ListServiceTemplateVersionsOutput{} + output := &GetTemplateSyncStatusOutput{} out.Result = output var buff [1024]byte @@ -4298,7 +4322,7 @@ func (m *awsAwsjson10_deserializeOpListServiceTemplateVersions) HandleDeserializ return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListServiceTemplateVersionsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetTemplateSyncStatusOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4312,7 +4336,7 @@ func (m *awsAwsjson10_deserializeOpListServiceTemplateVersions) HandleDeserializ return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListServiceTemplateVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetTemplateSyncStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4378,14 +4402,14 @@ func awsAwsjson10_deserializeOpErrorListServiceTemplateVersions(response *smithy } } -type awsAwsjson10_deserializeOpListTagsForResource struct { +type awsAwsjson10_deserializeOpListEnvironmentAccountConnections struct { } -func (*awsAwsjson10_deserializeOpListTagsForResource) ID() string { +func (*awsAwsjson10_deserializeOpListEnvironmentAccountConnections) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListEnvironmentAccountConnections) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4399,9 +4423,9 @@ func (m *awsAwsjson10_deserializeOpListTagsForResource) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListTagsForResource(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListEnvironmentAccountConnections(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &ListEnvironmentAccountConnectionsOutput{} out.Result = output var buff [1024]byte @@ -4421,7 +4445,7 @@ func (m *awsAwsjson10_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListEnvironmentAccountConnectionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4435,7 +4459,7 @@ func (m *awsAwsjson10_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListEnvironmentAccountConnections(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4482,9 +4506,6 @@ func awsAwsjson10_deserializeOpErrorListTagsForResource(response *smithyhttp.Res case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -4501,14 +4522,14 @@ func awsAwsjson10_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -type awsAwsjson10_deserializeOpRejectEnvironmentAccountConnection struct { +type awsAwsjson10_deserializeOpListEnvironmentOutputs struct { } -func (*awsAwsjson10_deserializeOpRejectEnvironmentAccountConnection) ID() string { +func (*awsAwsjson10_deserializeOpListEnvironmentOutputs) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpRejectEnvironmentAccountConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListEnvironmentOutputs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4522,9 +4543,9 @@ func (m *awsAwsjson10_deserializeOpRejectEnvironmentAccountConnection) HandleDes } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorRejectEnvironmentAccountConnection(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListEnvironmentOutputs(response, &metadata) } - output := &RejectEnvironmentAccountConnectionOutput{} + output := &ListEnvironmentOutputsOutput{} out.Result = output var buff [1024]byte @@ -4544,7 +4565,7 @@ func (m *awsAwsjson10_deserializeOpRejectEnvironmentAccountConnection) HandleDes return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentRejectEnvironmentAccountConnectionOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListEnvironmentOutputsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4558,7 +4579,7 @@ func (m *awsAwsjson10_deserializeOpRejectEnvironmentAccountConnection) HandleDes return out, metadata, err } -func awsAwsjson10_deserializeOpErrorRejectEnvironmentAccountConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListEnvironmentOutputs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4602,9 +4623,6 @@ func awsAwsjson10_deserializeOpErrorRejectEnvironmentAccountConnection(response case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -4627,14 +4645,14 @@ func awsAwsjson10_deserializeOpErrorRejectEnvironmentAccountConnection(response } } -type awsAwsjson10_deserializeOpTagResource struct { +type awsAwsjson10_deserializeOpListEnvironmentProvisionedResources struct { } -func (*awsAwsjson10_deserializeOpTagResource) ID() string { +func (*awsAwsjson10_deserializeOpListEnvironmentProvisionedResources) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListEnvironmentProvisionedResources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4648,9 +4666,9 @@ func (m *awsAwsjson10_deserializeOpTagResource) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorTagResource(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListEnvironmentProvisionedResources(response, &metadata) } - output := &TagResourceOutput{} + output := &ListEnvironmentProvisionedResourcesOutput{} out.Result = output var buff [1024]byte @@ -4670,7 +4688,7 @@ func (m *awsAwsjson10_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentTagResourceOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListEnvironmentProvisionedResourcesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4684,7 +4702,7 @@ func (m *awsAwsjson10_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson10_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListEnvironmentProvisionedResources(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4728,9 +4746,6 @@ func awsAwsjson10_deserializeOpErrorTagResource(response *smithyhttp.Response, m case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -4753,14 +4768,14 @@ func awsAwsjson10_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -type awsAwsjson10_deserializeOpUntagResource struct { +type awsAwsjson10_deserializeOpListEnvironments struct { } -func (*awsAwsjson10_deserializeOpUntagResource) ID() string { +func (*awsAwsjson10_deserializeOpListEnvironments) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListEnvironments) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4774,9 +4789,9 @@ func (m *awsAwsjson10_deserializeOpUntagResource) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUntagResource(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListEnvironments(response, &metadata) } - output := &UntagResourceOutput{} + output := &ListEnvironmentsOutput{} out.Result = output var buff [1024]byte @@ -4796,7 +4811,7 @@ func (m *awsAwsjson10_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUntagResourceOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListEnvironmentsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4810,7 +4825,7 @@ func (m *awsAwsjson10_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListEnvironments(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4854,9 +4869,6 @@ func awsAwsjson10_deserializeOpErrorUntagResource(response *smithyhttp.Response, case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -4879,14 +4891,14 @@ func awsAwsjson10_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } -type awsAwsjson10_deserializeOpUpdateAccountSettings struct { +type awsAwsjson10_deserializeOpListEnvironmentTemplates struct { } -func (*awsAwsjson10_deserializeOpUpdateAccountSettings) ID() string { +func (*awsAwsjson10_deserializeOpListEnvironmentTemplates) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUpdateAccountSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListEnvironmentTemplates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4900,9 +4912,9 @@ func (m *awsAwsjson10_deserializeOpUpdateAccountSettings) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUpdateAccountSettings(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListEnvironmentTemplates(response, &metadata) } - output := &UpdateAccountSettingsOutput{} + output := &ListEnvironmentTemplatesOutput{} out.Result = output var buff [1024]byte @@ -4922,7 +4934,7 @@ func (m *awsAwsjson10_deserializeOpUpdateAccountSettings) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUpdateAccountSettingsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListEnvironmentTemplatesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4936,7 +4948,7 @@ func (m *awsAwsjson10_deserializeOpUpdateAccountSettings) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUpdateAccountSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListEnvironmentTemplates(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4980,9 +4992,6 @@ func awsAwsjson10_deserializeOpErrorUpdateAccountSettings(response *smithyhttp.R case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -5002,14 +5011,14 @@ func awsAwsjson10_deserializeOpErrorUpdateAccountSettings(response *smithyhttp.R } } -type awsAwsjson10_deserializeOpUpdateEnvironment struct { +type awsAwsjson10_deserializeOpListEnvironmentTemplateVersions struct { } -func (*awsAwsjson10_deserializeOpUpdateEnvironment) ID() string { +func (*awsAwsjson10_deserializeOpListEnvironmentTemplateVersions) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUpdateEnvironment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListEnvironmentTemplateVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5023,9 +5032,9 @@ func (m *awsAwsjson10_deserializeOpUpdateEnvironment) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUpdateEnvironment(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListEnvironmentTemplateVersions(response, &metadata) } - output := &UpdateEnvironmentOutput{} + output := &ListEnvironmentTemplateVersionsOutput{} out.Result = output var buff [1024]byte @@ -5045,7 +5054,7 @@ func (m *awsAwsjson10_deserializeOpUpdateEnvironment) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUpdateEnvironmentOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListEnvironmentTemplateVersionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5059,7 +5068,7 @@ func (m *awsAwsjson10_deserializeOpUpdateEnvironment) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUpdateEnvironment(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListEnvironmentTemplateVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5103,9 +5112,6 @@ func awsAwsjson10_deserializeOpErrorUpdateEnvironment(response *smithyhttp.Respo case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -5128,14 +5134,14 @@ func awsAwsjson10_deserializeOpErrorUpdateEnvironment(response *smithyhttp.Respo } } -type awsAwsjson10_deserializeOpUpdateEnvironmentAccountConnection struct { +type awsAwsjson10_deserializeOpListRepositories struct { } -func (*awsAwsjson10_deserializeOpUpdateEnvironmentAccountConnection) ID() string { +func (*awsAwsjson10_deserializeOpListRepositories) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUpdateEnvironmentAccountConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListRepositories) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5149,9 +5155,9 @@ func (m *awsAwsjson10_deserializeOpUpdateEnvironmentAccountConnection) HandleDes } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUpdateEnvironmentAccountConnection(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListRepositories(response, &metadata) } - output := &UpdateEnvironmentAccountConnectionOutput{} + output := &ListRepositoriesOutput{} out.Result = output var buff [1024]byte @@ -5171,7 +5177,7 @@ func (m *awsAwsjson10_deserializeOpUpdateEnvironmentAccountConnection) HandleDes return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUpdateEnvironmentAccountConnectionOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListRepositoriesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5185,7 +5191,7 @@ func (m *awsAwsjson10_deserializeOpUpdateEnvironmentAccountConnection) HandleDes return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUpdateEnvironmentAccountConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListRepositories(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5229,9 +5235,6 @@ func awsAwsjson10_deserializeOpErrorUpdateEnvironmentAccountConnection(response case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -5254,14 +5257,14 @@ func awsAwsjson10_deserializeOpErrorUpdateEnvironmentAccountConnection(response } } -type awsAwsjson10_deserializeOpUpdateEnvironmentTemplate struct { +type awsAwsjson10_deserializeOpListRepositorySyncDefinitions struct { } -func (*awsAwsjson10_deserializeOpUpdateEnvironmentTemplate) ID() string { +func (*awsAwsjson10_deserializeOpListRepositorySyncDefinitions) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUpdateEnvironmentTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListRepositorySyncDefinitions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5275,9 +5278,9 @@ func (m *awsAwsjson10_deserializeOpUpdateEnvironmentTemplate) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUpdateEnvironmentTemplate(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListRepositorySyncDefinitions(response, &metadata) } - output := &UpdateEnvironmentTemplateOutput{} + output := &ListRepositorySyncDefinitionsOutput{} out.Result = output var buff [1024]byte @@ -5297,7 +5300,7 @@ func (m *awsAwsjson10_deserializeOpUpdateEnvironmentTemplate) HandleDeserialize( return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUpdateEnvironmentTemplateOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListRepositorySyncDefinitionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5311,7 +5314,7 @@ func (m *awsAwsjson10_deserializeOpUpdateEnvironmentTemplate) HandleDeserialize( return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUpdateEnvironmentTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListRepositorySyncDefinitions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5355,15 +5358,9 @@ func awsAwsjson10_deserializeOpErrorUpdateEnvironmentTemplate(response *smithyht case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -5380,14 +5377,14 @@ func awsAwsjson10_deserializeOpErrorUpdateEnvironmentTemplate(response *smithyht } } -type awsAwsjson10_deserializeOpUpdateEnvironmentTemplateVersion struct { +type awsAwsjson10_deserializeOpListServiceInstanceOutputs struct { } -func (*awsAwsjson10_deserializeOpUpdateEnvironmentTemplateVersion) ID() string { +func (*awsAwsjson10_deserializeOpListServiceInstanceOutputs) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUpdateEnvironmentTemplateVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListServiceInstanceOutputs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5401,9 +5398,9 @@ func (m *awsAwsjson10_deserializeOpUpdateEnvironmentTemplateVersion) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUpdateEnvironmentTemplateVersion(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListServiceInstanceOutputs(response, &metadata) } - output := &UpdateEnvironmentTemplateVersionOutput{} + output := &ListServiceInstanceOutputsOutput{} out.Result = output var buff [1024]byte @@ -5423,7 +5420,7 @@ func (m *awsAwsjson10_deserializeOpUpdateEnvironmentTemplateVersion) HandleDeser return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUpdateEnvironmentTemplateVersionOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListServiceInstanceOutputsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5437,7 +5434,7 @@ func (m *awsAwsjson10_deserializeOpUpdateEnvironmentTemplateVersion) HandleDeser return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUpdateEnvironmentTemplateVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListServiceInstanceOutputs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5481,9 +5478,6 @@ func awsAwsjson10_deserializeOpErrorUpdateEnvironmentTemplateVersion(response *s case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -5506,14 +5500,14 @@ func awsAwsjson10_deserializeOpErrorUpdateEnvironmentTemplateVersion(response *s } } -type awsAwsjson10_deserializeOpUpdateService struct { +type awsAwsjson10_deserializeOpListServiceInstanceProvisionedResources struct { } -func (*awsAwsjson10_deserializeOpUpdateService) ID() string { +func (*awsAwsjson10_deserializeOpListServiceInstanceProvisionedResources) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUpdateService) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListServiceInstanceProvisionedResources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5527,9 +5521,9 @@ func (m *awsAwsjson10_deserializeOpUpdateService) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUpdateService(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListServiceInstanceProvisionedResources(response, &metadata) } - output := &UpdateServiceOutput{} + output := &ListServiceInstanceProvisionedResourcesOutput{} out.Result = output var buff [1024]byte @@ -5549,7 +5543,7 @@ func (m *awsAwsjson10_deserializeOpUpdateService) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUpdateServiceOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListServiceInstanceProvisionedResourcesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5563,7 +5557,7 @@ func (m *awsAwsjson10_deserializeOpUpdateService) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUpdateService(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListServiceInstanceProvisionedResources(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5607,18 +5601,12 @@ func awsAwsjson10_deserializeOpErrorUpdateService(response *smithyhttp.Response, case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -5635,14 +5623,14 @@ func awsAwsjson10_deserializeOpErrorUpdateService(response *smithyhttp.Response, } } -type awsAwsjson10_deserializeOpUpdateServiceInstance struct { +type awsAwsjson10_deserializeOpListServiceInstances struct { } -func (*awsAwsjson10_deserializeOpUpdateServiceInstance) ID() string { +func (*awsAwsjson10_deserializeOpListServiceInstances) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUpdateServiceInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListServiceInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5656,9 +5644,9 @@ func (m *awsAwsjson10_deserializeOpUpdateServiceInstance) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUpdateServiceInstance(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListServiceInstances(response, &metadata) } - output := &UpdateServiceInstanceOutput{} + output := &ListServiceInstancesOutput{} out.Result = output var buff [1024]byte @@ -5678,7 +5666,7 @@ func (m *awsAwsjson10_deserializeOpUpdateServiceInstance) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUpdateServiceInstanceOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListServiceInstancesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5692,7 +5680,7 @@ func (m *awsAwsjson10_deserializeOpUpdateServiceInstance) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUpdateServiceInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListServiceInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5736,9 +5724,6 @@ func awsAwsjson10_deserializeOpErrorUpdateServiceInstance(response *smithyhttp.R case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -5761,14 +5746,14 @@ func awsAwsjson10_deserializeOpErrorUpdateServiceInstance(response *smithyhttp.R } } -type awsAwsjson10_deserializeOpUpdateServicePipeline struct { +type awsAwsjson10_deserializeOpListServicePipelineOutputs struct { } -func (*awsAwsjson10_deserializeOpUpdateServicePipeline) ID() string { +func (*awsAwsjson10_deserializeOpListServicePipelineOutputs) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUpdateServicePipeline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListServicePipelineOutputs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5782,9 +5767,9 @@ func (m *awsAwsjson10_deserializeOpUpdateServicePipeline) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUpdateServicePipeline(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListServicePipelineOutputs(response, &metadata) } - output := &UpdateServicePipelineOutput{} + output := &ListServicePipelineOutputsOutput{} out.Result = output var buff [1024]byte @@ -5804,7 +5789,7 @@ func (m *awsAwsjson10_deserializeOpUpdateServicePipeline) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUpdateServicePipelineOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListServicePipelineOutputsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5818,7 +5803,7 @@ func (m *awsAwsjson10_deserializeOpUpdateServicePipeline) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUpdateServicePipeline(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListServicePipelineOutputs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5862,9 +5847,6 @@ func awsAwsjson10_deserializeOpErrorUpdateServicePipeline(response *smithyhttp.R case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -5887,14 +5869,14 @@ func awsAwsjson10_deserializeOpErrorUpdateServicePipeline(response *smithyhttp.R } } -type awsAwsjson10_deserializeOpUpdateServiceTemplate struct { +type awsAwsjson10_deserializeOpListServicePipelineProvisionedResources struct { } -func (*awsAwsjson10_deserializeOpUpdateServiceTemplate) ID() string { +func (*awsAwsjson10_deserializeOpListServicePipelineProvisionedResources) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUpdateServiceTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListServicePipelineProvisionedResources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5908,9 +5890,9 @@ func (m *awsAwsjson10_deserializeOpUpdateServiceTemplate) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUpdateServiceTemplate(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListServicePipelineProvisionedResources(response, &metadata) } - output := &UpdateServiceTemplateOutput{} + output := &ListServicePipelineProvisionedResourcesOutput{} out.Result = output var buff [1024]byte @@ -5930,7 +5912,7 @@ func (m *awsAwsjson10_deserializeOpUpdateServiceTemplate) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUpdateServiceTemplateOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListServicePipelineProvisionedResourcesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5944,7 +5926,7 @@ func (m *awsAwsjson10_deserializeOpUpdateServiceTemplate) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUpdateServiceTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListServicePipelineProvisionedResources(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5988,9 +5970,6 @@ func awsAwsjson10_deserializeOpErrorUpdateServiceTemplate(response *smithyhttp.R case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -6013,14 +5992,14 @@ func awsAwsjson10_deserializeOpErrorUpdateServiceTemplate(response *smithyhttp.R } } -type awsAwsjson10_deserializeOpUpdateServiceTemplateVersion struct { +type awsAwsjson10_deserializeOpListServices struct { } -func (*awsAwsjson10_deserializeOpUpdateServiceTemplateVersion) ID() string { +func (*awsAwsjson10_deserializeOpListServices) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUpdateServiceTemplateVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListServices) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6034,9 +6013,9 @@ func (m *awsAwsjson10_deserializeOpUpdateServiceTemplateVersion) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUpdateServiceTemplateVersion(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListServices(response, &metadata) } - output := &UpdateServiceTemplateVersionOutput{} + output := &ListServicesOutput{} out.Result = output var buff [1024]byte @@ -6056,7 +6035,7 @@ func (m *awsAwsjson10_deserializeOpUpdateServiceTemplateVersion) HandleDeseriali return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUpdateServiceTemplateVersionOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListServicesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6070,7 +6049,7 @@ func (m *awsAwsjson10_deserializeOpUpdateServiceTemplateVersion) HandleDeseriali return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUpdateServiceTemplateVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListServices(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6114,15 +6093,9 @@ func awsAwsjson10_deserializeOpErrorUpdateServiceTemplateVersion(response *smith case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -6139,46 +6112,36 @@ func awsAwsjson10_deserializeOpErrorUpdateServiceTemplateVersion(response *smith } } -func awsAwsjson10_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } +type awsAwsjson10_deserializeOpListServiceTemplates struct { +} - output := &types.AccessDeniedException{} - err := awsAwsjson10_deserializeDocumentAccessDeniedException(&output, shape) +func (*awsAwsjson10_deserializeOpListServiceTemplates) ID() string { + return "OperationDeserializer" +} +func (m *awsAwsjson10_deserializeOpListServiceTemplates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output -} + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorListServiceTemplates(response, &metadata) + } + output := &ListServiceTemplatesOutput{} + out.Result = output -func awsAwsjson10_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -6189,12 +6152,10 @@ func awsAwsjson10_deserializeErrorConflictException(response *smithyhttp.Respons Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.ConflictException{} - err := awsAwsjson10_deserializeDocumentConflictException(&output, shape) - + err = awsAwsjson10_deserializeOpDocumentListServiceTemplatesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6202,34 +6163,34 @@ func awsAwsjson10_deserializeErrorConflictException(response *smithyhttp.Respons Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson10_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson10_deserializeOpErrorListServiceTemplates(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - output := &types.InternalServerException{} - err := awsAwsjson10_deserializeDocumentInternalServerException(&output, shape) - + code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6241,49 +6202,66 @@ func awsAwsjson10_deserializeErrorInternalServerException(response *smithyhttp.R } errorBody.Seek(0, io.SeekStart) - return output -} + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } -func awsAwsjson10_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - output := &types.ResourceNotFoundException{} - err := awsAwsjson10_deserializeDocumentResourceNotFoundException(&output, shape) +type awsAwsjson10_deserializeOpListServiceTemplateVersions struct { +} + +func (*awsAwsjson10_deserializeOpListServiceTemplateVersions) ID() string { + return "OperationDeserializer" +} +func (m *awsAwsjson10_deserializeOpListServiceTemplateVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output -} + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorListServiceTemplateVersions(response, &metadata) + } + output := &ListServiceTemplateVersionsOutput{} + out.Result = output -func awsAwsjson10_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -6294,12 +6272,10 @@ func awsAwsjson10_deserializeErrorServiceQuotaExceededException(response *smithy Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.ServiceQuotaExceededException{} - err := awsAwsjson10_deserializeDocumentServiceQuotaExceededException(&output, shape) - + err = awsAwsjson10_deserializeOpDocumentListServiceTemplateVersionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6307,34 +6283,34 @@ func awsAwsjson10_deserializeErrorServiceQuotaExceededException(response *smithy Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson10_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson10_deserializeOpErrorListServiceTemplateVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - output := &types.ThrottlingException{} - err := awsAwsjson10_deserializeDocumentThrottlingException(&output, shape) - + code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6346,45 +6322,3807 @@ func awsAwsjson10_deserializeErrorThrottlingException(response *smithyhttp.Respo } errorBody.Seek(0, io.SeekStart) - return output -} + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpListTagsForResource struct { +} + +func (*awsAwsjson10_deserializeOpListTagsForResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorListTagsForResource(response, &metadata) + } + output := &ListTagsForResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpNotifyResourceDeploymentStatusChange struct { +} + +func (*awsAwsjson10_deserializeOpNotifyResourceDeploymentStatusChange) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpNotifyResourceDeploymentStatusChange) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorNotifyResourceDeploymentStatusChange(response, &metadata) + } + output := &NotifyResourceDeploymentStatusChangeOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentNotifyResourceDeploymentStatusChangeOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorNotifyResourceDeploymentStatusChange(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpRejectEnvironmentAccountConnection struct { +} + +func (*awsAwsjson10_deserializeOpRejectEnvironmentAccountConnection) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpRejectEnvironmentAccountConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorRejectEnvironmentAccountConnection(response, &metadata) + } + output := &RejectEnvironmentAccountConnectionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentRejectEnvironmentAccountConnectionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorRejectEnvironmentAccountConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpTagResource struct { +} + +func (*awsAwsjson10_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorTagResource(response, &metadata) + } + output := &TagResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentTagResourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUntagResource struct { +} + +func (*awsAwsjson10_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorUntagResource(response, &metadata) + } + output := &UntagResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentUntagResourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUpdateAccountSettings struct { +} + +func (*awsAwsjson10_deserializeOpUpdateAccountSettings) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdateAccountSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorUpdateAccountSettings(response, &metadata) + } + output := &UpdateAccountSettingsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentUpdateAccountSettingsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorUpdateAccountSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUpdateEnvironment struct { +} + +func (*awsAwsjson10_deserializeOpUpdateEnvironment) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdateEnvironment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorUpdateEnvironment(response, &metadata) + } + output := &UpdateEnvironmentOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentUpdateEnvironmentOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorUpdateEnvironment(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUpdateEnvironmentAccountConnection struct { +} + +func (*awsAwsjson10_deserializeOpUpdateEnvironmentAccountConnection) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdateEnvironmentAccountConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorUpdateEnvironmentAccountConnection(response, &metadata) + } + output := &UpdateEnvironmentAccountConnectionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentUpdateEnvironmentAccountConnectionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorUpdateEnvironmentAccountConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUpdateEnvironmentTemplate struct { +} + +func (*awsAwsjson10_deserializeOpUpdateEnvironmentTemplate) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdateEnvironmentTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorUpdateEnvironmentTemplate(response, &metadata) + } + output := &UpdateEnvironmentTemplateOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentUpdateEnvironmentTemplateOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorUpdateEnvironmentTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUpdateEnvironmentTemplateVersion struct { +} + +func (*awsAwsjson10_deserializeOpUpdateEnvironmentTemplateVersion) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdateEnvironmentTemplateVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorUpdateEnvironmentTemplateVersion(response, &metadata) + } + output := &UpdateEnvironmentTemplateVersionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentUpdateEnvironmentTemplateVersionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorUpdateEnvironmentTemplateVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUpdateService struct { +} + +func (*awsAwsjson10_deserializeOpUpdateService) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdateService) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorUpdateService(response, &metadata) + } + output := &UpdateServiceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentUpdateServiceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorUpdateService(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUpdateServiceInstance struct { +} + +func (*awsAwsjson10_deserializeOpUpdateServiceInstance) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdateServiceInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorUpdateServiceInstance(response, &metadata) + } + output := &UpdateServiceInstanceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentUpdateServiceInstanceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorUpdateServiceInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUpdateServicePipeline struct { +} + +func (*awsAwsjson10_deserializeOpUpdateServicePipeline) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdateServicePipeline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorUpdateServicePipeline(response, &metadata) + } + output := &UpdateServicePipelineOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentUpdateServicePipelineOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorUpdateServicePipeline(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUpdateServiceTemplate struct { +} + +func (*awsAwsjson10_deserializeOpUpdateServiceTemplate) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdateServiceTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorUpdateServiceTemplate(response, &metadata) + } + output := &UpdateServiceTemplateOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentUpdateServiceTemplateOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorUpdateServiceTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUpdateServiceTemplateVersion struct { +} + +func (*awsAwsjson10_deserializeOpUpdateServiceTemplateVersion) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdateServiceTemplateVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorUpdateServiceTemplateVersion(response, &metadata) + } + output := &UpdateServiceTemplateVersionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentUpdateServiceTemplateVersionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorUpdateServiceTemplateVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUpdateTemplateSyncConfig struct { +} + +func (*awsAwsjson10_deserializeOpUpdateTemplateSyncConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdateTemplateSyncConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorUpdateTemplateSyncConfig(response, &metadata) + } + output := &UpdateTemplateSyncConfigOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentUpdateTemplateSyncConfigOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorUpdateTemplateSyncConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsAwsjson10_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.AccessDeniedException{} + err := awsAwsjson10_deserializeDocumentAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ConflictException{} + err := awsAwsjson10_deserializeDocumentConflictException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InternalServerException{} + err := awsAwsjson10_deserializeDocumentInternalServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ResourceNotFoundException{} + err := awsAwsjson10_deserializeDocumentResourceNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ServiceQuotaExceededException{} + err := awsAwsjson10_deserializeDocumentServiceQuotaExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ThrottlingException{} + err := awsAwsjson10_deserializeDocumentThrottlingException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ValidationException{} + err := awsAwsjson10_deserializeDocumentValidationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAccountSettings(v **types.AccountSettings, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccountSettings + if *v == nil { + sv = &types.AccountSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "pipelineProvisioningRepository": + if err := awsAwsjson10_deserializeDocumentRepositoryBranch(&sv.PipelineProvisioningRepository, value); err != nil { + return err + } + + case "pipelineServiceRoleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PipelineRoleArn to be of type string, got %T instead", value) + } + sv.PipelineServiceRoleArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentCompatibleEnvironmentTemplate(v **types.CompatibleEnvironmentTemplate, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CompatibleEnvironmentTemplate + if *v == nil { + sv = &types.CompatibleEnvironmentTemplate{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "majorVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) + } + sv.MajorVersion = ptr.String(jtv) + } + + case "templateName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + } + sv.TemplateName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentCompatibleEnvironmentTemplateList(v *[]types.CompatibleEnvironmentTemplate, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.CompatibleEnvironmentTemplate + if *v == nil { + cv = []types.CompatibleEnvironmentTemplate{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CompatibleEnvironmentTemplate + destAddr := &col + if err := awsAwsjson10_deserializeDocumentCompatibleEnvironmentTemplate(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConflictException + if *v == nil { + sv = &types.ConflictException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentEnvironment(v **types.Environment, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Environment + if *v == nil { + sv = &types.Environment{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "deploymentStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeploymentStatus to be of type string, got %T instead", value) + } + sv.DeploymentStatus = types.DeploymentStatus(jtv) + } + + case "deploymentStatusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) + } + sv.DeploymentStatusMessage = ptr.String(jtv) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "environmentAccountConnectionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentAccountConnectionId to be of type string, got %T instead", value) + } + sv.EnvironmentAccountConnectionId = ptr.String(jtv) + } + + case "environmentAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + } + sv.EnvironmentAccountId = ptr.String(jtv) + } + + case "lastDeploymentAttemptedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastDeploymentAttemptedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "lastDeploymentSucceededAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastDeploymentSucceededAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "protonServiceRoleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.ProtonServiceRoleArn = ptr.String(jtv) + } + + case "provisioning": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Provisioning to be of type string, got %T instead", value) + } + sv.Provisioning = types.Provisioning(jtv) + } + + case "provisioningRepository": + if err := awsAwsjson10_deserializeDocumentRepositoryBranch(&sv.ProvisioningRepository, value); err != nil { + return err + } + + case "spec": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SpecContents to be of type string, got %T instead", value) + } + sv.Spec = ptr.String(jtv) + } + + case "templateMajorVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) + } + sv.TemplateMajorVersion = ptr.String(jtv) + } + + case "templateMinorVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) + } + sv.TemplateMinorVersion = ptr.String(jtv) + } + + case "templateName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + } + sv.TemplateName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentEnvironmentAccountConnection(v **types.EnvironmentAccountConnection, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EnvironmentAccountConnection + if *v == nil { + sv = &types.EnvironmentAccountConnection{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentAccountConnectionArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "environmentAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + } + sv.EnvironmentAccountId = ptr.String(jtv) + } + + case "environmentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + } + sv.EnvironmentName = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentAccountConnectionId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "lastModifiedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "managementAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + } + sv.ManagementAccountId = ptr.String(jtv) + } + + case "requestedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.RequestedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentAccountConnectionStatus to be of type string, got %T instead", value) + } + sv.Status = types.EnvironmentAccountConnectionStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentEnvironmentAccountConnectionSummary(v **types.EnvironmentAccountConnectionSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EnvironmentAccountConnectionSummary + if *v == nil { + sv = &types.EnvironmentAccountConnectionSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentAccountConnectionArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "environmentAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + } + sv.EnvironmentAccountId = ptr.String(jtv) + } + + case "environmentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + } + sv.EnvironmentName = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentAccountConnectionId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "lastModifiedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "managementAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + } + sv.ManagementAccountId = ptr.String(jtv) + } + + case "requestedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.RequestedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentAccountConnectionStatus to be of type string, got %T instead", value) + } + sv.Status = types.EnvironmentAccountConnectionStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentEnvironmentAccountConnectionSummaryList(v *[]types.EnvironmentAccountConnectionSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.EnvironmentAccountConnectionSummary + if *v == nil { + cv = []types.EnvironmentAccountConnectionSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EnvironmentAccountConnectionSummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentEnvironmentAccountConnectionSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentEnvironmentSummary(v **types.EnvironmentSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EnvironmentSummary + if *v == nil { + sv = &types.EnvironmentSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "deploymentStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeploymentStatus to be of type string, got %T instead", value) + } + sv.DeploymentStatus = types.DeploymentStatus(jtv) + } + + case "deploymentStatusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) + } + sv.DeploymentStatusMessage = ptr.String(jtv) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "environmentAccountConnectionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentAccountConnectionId to be of type string, got %T instead", value) + } + sv.EnvironmentAccountConnectionId = ptr.String(jtv) + } + + case "environmentAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + } + sv.EnvironmentAccountId = ptr.String(jtv) + } + + case "lastDeploymentAttemptedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastDeploymentAttemptedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "lastDeploymentSucceededAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastDeploymentSucceededAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "protonServiceRoleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.ProtonServiceRoleArn = ptr.String(jtv) + } + + case "provisioning": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Provisioning to be of type string, got %T instead", value) + } + sv.Provisioning = types.Provisioning(jtv) + } + + case "templateMajorVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) + } + sv.TemplateMajorVersion = ptr.String(jtv) + } + + case "templateMinorVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) + } + sv.TemplateMinorVersion = ptr.String(jtv) + } + + case "templateName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + } + sv.TemplateName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentEnvironmentSummaryList(v *[]types.EnvironmentSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.EnvironmentSummary + if *v == nil { + cv = []types.EnvironmentSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EnvironmentSummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentEnvironmentSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentEnvironmentTemplate(v **types.EnvironmentTemplate, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EnvironmentTemplate + if *v == nil { + sv = &types.EnvironmentTemplate{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentTemplateArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "displayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DisplayName to be of type string, got %T instead", value) + } + sv.DisplayName = ptr.String(jtv) + } + + case "encryptionKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.EncryptionKey = ptr.String(jtv) + } + + case "lastModifiedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "provisioning": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Provisioning to be of type string, got %T instead", value) + } + sv.Provisioning = types.Provisioning(jtv) + } + + case "recommendedVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FullTemplateVersionNumber to be of type string, got %T instead", value) + } + sv.RecommendedVersion = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentEnvironmentTemplateSummary(v **types.EnvironmentTemplateSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EnvironmentTemplateSummary + if *v == nil { + sv = &types.EnvironmentTemplateSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentTemplateArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "displayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DisplayName to be of type string, got %T instead", value) + } + sv.DisplayName = ptr.String(jtv) + } + + case "lastModifiedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "provisioning": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Provisioning to be of type string, got %T instead", value) + } + sv.Provisioning = types.Provisioning(jtv) + } + + case "recommendedVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FullTemplateVersionNumber to be of type string, got %T instead", value) + } + sv.RecommendedVersion = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentEnvironmentTemplateSummaryList(v *[]types.EnvironmentTemplateSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.EnvironmentTemplateSummary + if *v == nil { + cv = []types.EnvironmentTemplateSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EnvironmentTemplateSummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentEnvironmentTemplateSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentEnvironmentTemplateVersion(v **types.EnvironmentTemplateVersion, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EnvironmentTemplateVersion + if *v == nil { + sv = &types.EnvironmentTemplateVersion{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentTemplateVersionArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "lastModifiedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "majorVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) + } + sv.MajorVersion = ptr.String(jtv) + } + + case "minorVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) + } + sv.MinorVersion = ptr.String(jtv) + } + + case "recommendedMinorVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) + } + sv.RecommendedMinorVersion = ptr.String(jtv) + } + + case "schema": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TemplateSchema to be of type string, got %T instead", value) + } + sv.Schema = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TemplateVersionStatus to be of type string, got %T instead", value) + } + sv.Status = types.TemplateVersionStatus(jtv) + } -func awsAwsjson10_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + case "statusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) + } + sv.StatusMessage = ptr.String(jtv) + } + + case "templateName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + } + sv.TemplateName = ptr.String(jtv) + } + + default: + _, _ = key, value - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), } - return err } + *v = sv + return nil +} - output := &types.ValidationException{} - err := awsAwsjson10_deserializeDocumentValidationException(&output, shape) +func awsAwsjson10_deserializeDocumentEnvironmentTemplateVersionSummary(v **types.EnvironmentTemplateVersionSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EnvironmentTemplateVersionSummary + if *v == nil { + sv = &types.EnvironmentTemplateVersionSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentTemplateVersionArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "lastModifiedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "majorVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) + } + sv.MajorVersion = ptr.String(jtv) + } + + case "minorVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) + } + sv.MinorVersion = ptr.String(jtv) + } + + case "recommendedMinorVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) + } + sv.RecommendedMinorVersion = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TemplateVersionStatus to be of type string, got %T instead", value) + } + sv.Status = types.TemplateVersionStatus(jtv) + } + + case "statusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) + } + sv.StatusMessage = ptr.String(jtv) + } + + case "templateName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + } + sv.TemplateName = ptr.String(jtv) + } + + default: + _, _ = key, value - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), } - return err } + *v = sv + return nil +} - errorBody.Seek(0, io.SeekStart) - return output +func awsAwsjson10_deserializeDocumentEnvironmentTemplateVersionSummaryList(v *[]types.EnvironmentTemplateVersionSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.EnvironmentTemplateVersionSummary + if *v == nil { + cv = []types.EnvironmentTemplateVersionSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EnvironmentTemplateVersionSummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentEnvironmentTemplateVersionSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil } -func awsAwsjson10_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { +func awsAwsjson10_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6397,9 +10135,9 @@ func awsAwsjson10_deserializeDocumentAccessDeniedException(v **types.AccessDenie return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AccessDeniedException + var sv *types.InternalServerException if *v == nil { - sv = &types.AccessDeniedException{} + sv = &types.InternalServerException{} } else { sv = *v } @@ -6424,7 +10162,7 @@ func awsAwsjson10_deserializeDocumentAccessDeniedException(v **types.AccessDenie return nil } -func awsAwsjson10_deserializeDocumentAccountSettings(v **types.AccountSettings, value interface{}) error { +func awsAwsjson10_deserializeDocumentOutput(v **types.Output, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6437,34 +10175,77 @@ func awsAwsjson10_deserializeDocumentAccountSettings(v **types.AccountSettings, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AccountSettings + var sv *types.Output if *v == nil { - sv = &types.AccountSettings{} + sv = &types.Output{} } else { sv = *v } for key, value := range shape { switch key { - case "pipelineServiceRoleArn": + case "key": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected OutputKey to be of type string, got %T instead", value) } - sv.PipelineServiceRoleArn = ptr.String(jtv) + sv.Key = ptr.String(jtv) + } + + case "valueString": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OutputValueString to be of type string, got %T instead", value) + } + sv.ValueString = ptr.String(jtv) } - default: - _, _ = key, value + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentOutputsList(v *[]types.Output, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Output + if *v == nil { + cv = []types.Output{} + } else { + cv = *v + } + for _, value := range shape { + var col types.Output + destAddr := &col + if err := awsAwsjson10_deserializeDocumentOutput(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson10_deserializeDocumentCompatibleEnvironmentTemplate(v **types.CompatibleEnvironmentTemplate, value interface{}) error { +func awsAwsjson10_deserializeDocumentProvisionedResource(v **types.ProvisionedResource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6477,31 +10258,40 @@ func awsAwsjson10_deserializeDocumentCompatibleEnvironmentTemplate(v **types.Com return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.CompatibleEnvironmentTemplate + var sv *types.ProvisionedResource if *v == nil { - sv = &types.CompatibleEnvironmentTemplate{} + sv = &types.ProvisionedResource{} } else { sv = *v } for key, value := range shape { switch key { - case "majorVersion": + case "identifier": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) + return fmt.Errorf("expected ProvisionedResourceIdentifier to be of type string, got %T instead", value) } - sv.MajorVersion = ptr.String(jtv) + sv.Identifier = ptr.String(jtv) } - case "templateName": + case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + return fmt.Errorf("expected ProvisionedResourceName to be of type string, got %T instead", value) } - sv.TemplateName = ptr.String(jtv) + sv.Name = ptr.String(jtv) + } + + case "provisioningEngine": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProvisionedResourceEngine to be of type string, got %T instead", value) + } + sv.ProvisioningEngine = types.ProvisionedResourceEngine(jtv) } default: @@ -6513,7 +10303,7 @@ func awsAwsjson10_deserializeDocumentCompatibleEnvironmentTemplate(v **types.Com return nil } -func awsAwsjson10_deserializeDocumentCompatibleEnvironmentTemplateList(v *[]types.CompatibleEnvironmentTemplate, value interface{}) error { +func awsAwsjson10_deserializeDocumentProvisionedResourceList(v *[]types.ProvisionedResource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6526,17 +10316,17 @@ func awsAwsjson10_deserializeDocumentCompatibleEnvironmentTemplateList(v *[]type return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.CompatibleEnvironmentTemplate + var cv []types.ProvisionedResource if *v == nil { - cv = []types.CompatibleEnvironmentTemplate{} + cv = []types.ProvisionedResource{} } else { cv = *v } for _, value := range shape { - var col types.CompatibleEnvironmentTemplate + var col types.ProvisionedResource destAddr := &col - if err := awsAwsjson10_deserializeDocumentCompatibleEnvironmentTemplate(&destAddr, value); err != nil { + if err := awsAwsjson10_deserializeDocumentProvisionedResource(&destAddr, value); err != nil { return err } col = *destAddr @@ -6547,7 +10337,7 @@ func awsAwsjson10_deserializeDocumentCompatibleEnvironmentTemplateList(v *[]type return nil } -func awsAwsjson10_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { +func awsAwsjson10_deserializeDocumentRepository(v **types.Repository, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6560,22 +10350,58 @@ func awsAwsjson10_deserializeDocumentConflictException(v **types.ConflictExcepti return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ConflictException + var sv *types.Repository if *v == nil { - sv = &types.ConflictException{} + sv = &types.Repository{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "arn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected RepositoryArn to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.Arn = ptr.String(jtv) + } + + case "connectionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.ConnectionArn = ptr.String(jtv) + } + + case "encryptionKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.EncryptionKey = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RepositoryName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "provider": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RepositoryProvider to be of type string, got %T instead", value) + } + sv.Provider = types.RepositoryProvider(jtv) } default: @@ -6587,7 +10413,7 @@ func awsAwsjson10_deserializeDocumentConflictException(v **types.ConflictExcepti return nil } -func awsAwsjson10_deserializeDocumentEnvironment(v **types.Environment, value interface{}) error { +func awsAwsjson10_deserializeDocumentRepositoryBranch(v **types.RepositoryBranch, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6600,9 +10426,9 @@ func awsAwsjson10_deserializeDocumentEnvironment(v **types.Environment, value in return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Environment + var sv *types.RepositoryBranch if *v == nil { - sv = &types.Environment{} + sv = &types.RepositoryBranch{} } else { sv = *v } @@ -6613,165 +10439,189 @@ func awsAwsjson10_deserializeDocumentEnvironment(v **types.Environment, value in if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EnvironmentArn to be of type string, got %T instead", value) + return fmt.Errorf("expected RepositoryArn to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } - case "createdAt": + case "branch": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GitBranchName to be of type string, got %T instead", value) } + sv.Branch = ptr.String(jtv) } - case "deploymentStatus": + case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DeploymentStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected RepositoryName to be of type string, got %T instead", value) } - sv.DeploymentStatus = types.DeploymentStatus(jtv) + sv.Name = ptr.String(jtv) } - case "deploymentStatusMessage": + case "provider": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected RepositoryProvider to be of type string, got %T instead", value) } - sv.DeploymentStatusMessage = ptr.String(jtv) + sv.Provider = types.RepositoryProvider(jtv) } - case "description": + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentRepositorySummary(v **types.RepositorySummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RepositorySummary + if *v == nil { + sv = &types.RepositorySummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Description to be of type string, got %T instead", value) + return fmt.Errorf("expected RepositoryArn to be of type string, got %T instead", value) } - sv.Description = ptr.String(jtv) + sv.Arn = ptr.String(jtv) } - case "environmentAccountConnectionId": + case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EnvironmentAccountConnectionId to be of type string, got %T instead", value) + return fmt.Errorf("expected RepositoryName to be of type string, got %T instead", value) } - sv.EnvironmentAccountConnectionId = ptr.String(jtv) + sv.Name = ptr.String(jtv) } - case "environmentAccountId": + case "provider": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + return fmt.Errorf("expected RepositoryProvider to be of type string, got %T instead", value) } - sv.EnvironmentAccountId = ptr.String(jtv) + sv.Provider = types.RepositoryProvider(jtv) } - case "lastDeploymentAttemptedAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastDeploymentAttemptedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + default: + _, _ = key, value - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + } + } + *v = sv + return nil +} - } - } +func awsAwsjson10_deserializeDocumentRepositorySummaryList(v *[]types.RepositorySummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - case "lastDeploymentSucceededAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastDeploymentSucceededAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + var cv []types.RepositorySummary + if *v == nil { + cv = []types.RepositorySummary{} + } else { + cv = *v + } - } - } + for _, value := range shape { + var col types.RepositorySummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentRepositorySummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } + } + *v = cv + return nil +} - case "protonServiceRoleArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.ProtonServiceRoleArn = ptr.String(jtv) - } +func awsAwsjson10_deserializeDocumentRepositorySyncAttempt(v **types.RepositorySyncAttempt, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - case "provisioning": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Provisioning to be of type string, got %T instead", value) - } - sv.Provisioning = types.Provisioning(jtv) - } + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - case "spec": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SpecContents to be of type string, got %T instead", value) - } - sv.Spec = ptr.String(jtv) - } + var sv *types.RepositorySyncAttempt + if *v == nil { + sv = &types.RepositorySyncAttempt{} + } else { + sv = *v + } - case "templateMajorVersion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) - } - sv.TemplateMajorVersion = ptr.String(jtv) + for key, value := range shape { + switch key { + case "events": + if err := awsAwsjson10_deserializeDocumentRepositorySyncEvents(&sv.Events, value); err != nil { + return err } - case "templateMinorVersion": + case "startedAt": if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + } - sv.TemplateMinorVersion = ptr.String(jtv) } - case "templateName": + case "status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + return fmt.Errorf("expected RepositorySyncStatus to be of type string, got %T instead", value) } - sv.TemplateName = ptr.String(jtv) + sv.Status = types.RepositorySyncStatus(jtv) } default: @@ -6783,7 +10633,7 @@ func awsAwsjson10_deserializeDocumentEnvironment(v **types.Environment, value in return nil } -func awsAwsjson10_deserializeDocumentEnvironmentAccountConnection(v **types.EnvironmentAccountConnection, value interface{}) error { +func awsAwsjson10_deserializeDocumentRepositorySyncDefinition(v **types.RepositorySyncDefinition, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6796,77 +10646,135 @@ func awsAwsjson10_deserializeDocumentEnvironmentAccountConnection(v **types.Envi return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EnvironmentAccountConnection + var sv *types.RepositorySyncDefinition if *v == nil { - sv = &types.EnvironmentAccountConnection{} + sv = &types.RepositorySyncDefinition{} } else { sv = *v } for key, value := range shape { switch key { - case "arn": + case "branch": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EnvironmentAccountConnectionArn to be of type string, got %T instead", value) + return fmt.Errorf("expected GitBranchName to be of type string, got %T instead", value) } - sv.Arn = ptr.String(jtv) + sv.Branch = ptr.String(jtv) } - case "environmentAccountId": + case "directory": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.EnvironmentAccountId = ptr.String(jtv) + sv.Directory = ptr.String(jtv) } - case "environmentName": + case "parent": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.EnvironmentName = ptr.String(jtv) + sv.Parent = ptr.String(jtv) } - case "id": + case "target": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EnvironmentAccountConnectionId to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Id = ptr.String(jtv) + sv.Target = ptr.String(jtv) } - case "lastModifiedAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + default: + _, _ = key, value - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentRepositorySyncDefinitionList(v *[]types.RepositorySyncDefinition, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.RepositorySyncDefinition + if *v == nil { + cv = []types.RepositorySyncDefinition{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RepositorySyncDefinition + destAddr := &col + if err := awsAwsjson10_deserializeDocumentRepositorySyncDefinition(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentRepositorySyncEvent(v **types.RepositorySyncEvent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RepositorySyncEvent + if *v == nil { + sv = &types.RepositorySyncEvent{} + } else { + sv = *v + } + for key, value := range shape { + switch key { + case "event": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) } + sv.Event = ptr.String(jtv) } - case "managementAccountId": + case "externalId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.ManagementAccountId = ptr.String(jtv) + sv.ExternalId = ptr.String(jtv) } - case "requestedAt": + case "time": if value != nil { switch jtv := value.(type) { case json.Number: @@ -6874,7 +10782,7 @@ func awsAwsjson10_deserializeDocumentEnvironmentAccountConnection(v **types.Envi if err != nil { return err } - sv.RequestedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + sv.Time = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) @@ -6882,22 +10790,87 @@ func awsAwsjson10_deserializeDocumentEnvironmentAccountConnection(v **types.Envi } } - case "roleArn": + case "type": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.RoleArn = ptr.String(jtv) + sv.Type = ptr.String(jtv) } - case "status": + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentRepositorySyncEvents(v *[]types.RepositorySyncEvent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.RepositorySyncEvent + if *v == nil { + cv = []types.RepositorySyncEvent{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RepositorySyncEvent + destAddr := &col + if err := awsAwsjson10_deserializeDocumentRepositorySyncEvent(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceNotFoundException + if *v == nil { + sv = &types.ResourceNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EnvironmentAccountConnectionStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } - sv.Status = types.EnvironmentAccountConnectionStatus(jtv) + sv.Message = ptr.String(jtv) } default: @@ -6909,7 +10882,7 @@ func awsAwsjson10_deserializeDocumentEnvironmentAccountConnection(v **types.Envi return nil } -func awsAwsjson10_deserializeDocumentEnvironmentAccountConnectionSummary(v **types.EnvironmentAccountConnectionSummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentResourceSyncAttempt(v **types.ResourceSyncAttempt, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6922,77 +10895,114 @@ func awsAwsjson10_deserializeDocumentEnvironmentAccountConnectionSummary(v **typ return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EnvironmentAccountConnectionSummary + var sv *types.ResourceSyncAttempt if *v == nil { - sv = &types.EnvironmentAccountConnectionSummary{} + sv = &types.ResourceSyncAttempt{} } else { sv = *v } for key, value := range shape { switch key { - case "arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EnvironmentAccountConnectionArn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) + case "events": + if err := awsAwsjson10_deserializeDocumentResourceSyncEvents(&sv.Events, value); err != nil { + return err } - case "environmentAccountId": + case "initialRevision": + if err := awsAwsjson10_deserializeDocumentRevision(&sv.InitialRevision, value); err != nil { + return err + } + + case "startedAt": if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + } - sv.EnvironmentAccountId = ptr.String(jtv) } - case "environmentName": + case "status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceSyncStatus to be of type string, got %T instead", value) } - sv.EnvironmentName = ptr.String(jtv) + sv.Status = types.ResourceSyncStatus(jtv) } - case "id": + case "target": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EnvironmentAccountConnectionId to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Id = ptr.String(jtv) + sv.Target = ptr.String(jtv) } - case "lastModifiedAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + case "targetRevision": + if err := awsAwsjson10_deserializeDocumentRevision(&sv.TargetRevision, value); err != nil { + return err + } - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentResourceSyncEvent(v **types.ResourceSyncEvent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceSyncEvent + if *v == nil { + sv = &types.ResourceSyncEvent{} + } else { + sv = *v + } + for key, value := range shape { + switch key { + case "event": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) } + sv.Event = ptr.String(jtv) } - case "managementAccountId": + case "externalId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.ManagementAccountId = ptr.String(jtv) + sv.ExternalId = ptr.String(jtv) } - case "requestedAt": + case "time": if value != nil { switch jtv := value.(type) { case json.Number: @@ -7000,7 +11010,7 @@ func awsAwsjson10_deserializeDocumentEnvironmentAccountConnectionSummary(v **typ if err != nil { return err } - sv.RequestedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + sv.Time = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) @@ -7008,22 +11018,13 @@ func awsAwsjson10_deserializeDocumentEnvironmentAccountConnectionSummary(v **typ } } - case "roleArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.RoleArn = ptr.String(jtv) - } - - case "status": + case "type": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EnvironmentAccountConnectionStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Status = types.EnvironmentAccountConnectionStatus(jtv) + sv.Type = ptr.String(jtv) } default: @@ -7035,7 +11036,7 @@ func awsAwsjson10_deserializeDocumentEnvironmentAccountConnectionSummary(v **typ return nil } -func awsAwsjson10_deserializeDocumentEnvironmentAccountConnectionSummaryList(v *[]types.EnvironmentAccountConnectionSummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentResourceSyncEvents(v *[]types.ResourceSyncEvent, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7048,17 +11049,17 @@ func awsAwsjson10_deserializeDocumentEnvironmentAccountConnectionSummaryList(v * return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.EnvironmentAccountConnectionSummary + var cv []types.ResourceSyncEvent if *v == nil { - cv = []types.EnvironmentAccountConnectionSummary{} + cv = []types.ResourceSyncEvent{} } else { cv = *v } for _, value := range shape { - var col types.EnvironmentAccountConnectionSummary + var col types.ResourceSyncEvent destAddr := &col - if err := awsAwsjson10_deserializeDocumentEnvironmentAccountConnectionSummary(&destAddr, value); err != nil { + if err := awsAwsjson10_deserializeDocumentResourceSyncEvent(&destAddr, value); err != nil { return err } col = *destAddr @@ -7069,7 +11070,7 @@ func awsAwsjson10_deserializeDocumentEnvironmentAccountConnectionSummaryList(v * return nil } -func awsAwsjson10_deserializeDocumentEnvironmentSummary(v **types.EnvironmentSummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentRevision(v **types.Revision, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7082,86 +11083,110 @@ func awsAwsjson10_deserializeDocumentEnvironmentSummary(v **types.EnvironmentSum return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EnvironmentSummary + var sv *types.Revision if *v == nil { - sv = &types.EnvironmentSummary{} + sv = &types.Revision{} } else { sv = *v } for key, value := range shape { switch key { - case "arn": + case "branch": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EnvironmentArn to be of type string, got %T instead", value) + return fmt.Errorf("expected GitBranchName to be of type string, got %T instead", value) } - sv.Arn = ptr.String(jtv) + sv.Branch = ptr.String(jtv) } - case "createdAt": + case "directory": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) } + sv.Directory = ptr.String(jtv) } - case "deploymentStatus": + case "repositoryName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DeploymentStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected RepositoryName to be of type string, got %T instead", value) } - sv.DeploymentStatus = types.DeploymentStatus(jtv) + sv.RepositoryName = ptr.String(jtv) } - case "deploymentStatusMessage": + case "repositoryProvider": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected RepositoryProvider to be of type string, got %T instead", value) } - sv.DeploymentStatusMessage = ptr.String(jtv) + sv.RepositoryProvider = types.RepositoryProvider(jtv) } - case "description": + case "sha": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Description to be of type string, got %T instead", value) + return fmt.Errorf("expected SHA to be of type string, got %T instead", value) } - sv.Description = ptr.String(jtv) + sv.Sha = ptr.String(jtv) } - case "environmentAccountConnectionId": + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentService(v **types.Service, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Service + if *v == nil { + sv = &types.Service{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EnvironmentAccountConnectionId to be of type string, got %T instead", value) + return fmt.Errorf("expected ServiceArn to be of type string, got %T instead", value) } - sv.EnvironmentAccountConnectionId = ptr.String(jtv) + sv.Arn = ptr.String(jtv) } - case "environmentAccountId": + case "branchName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + return fmt.Errorf("expected GitBranchName to be of type string, got %T instead", value) } - sv.EnvironmentAccountId = ptr.String(jtv) + sv.BranchName = ptr.String(jtv) } - case "lastDeploymentAttemptedAt": + case "createdAt": if value != nil { switch jtv := value.(type) { case json.Number: @@ -7169,7 +11194,7 @@ func awsAwsjson10_deserializeDocumentEnvironmentSummary(v **types.EnvironmentSum if err != nil { return err } - sv.LastDeploymentAttemptedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) @@ -7177,7 +11202,16 @@ func awsAwsjson10_deserializeDocumentEnvironmentSummary(v **types.EnvironmentSum } } - case "lastDeploymentSucceededAt": + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "lastModifiedAt": if value != nil { switch jtv := value.(type) { case json.Number: @@ -7185,7 +11219,7 @@ func awsAwsjson10_deserializeDocumentEnvironmentSummary(v **types.EnvironmentSum if err != nil { return err } - sv.LastDeploymentSucceededAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + sv.LastModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) @@ -7202,40 +11236,54 @@ func awsAwsjson10_deserializeDocumentEnvironmentSummary(v **types.EnvironmentSum sv.Name = ptr.String(jtv) } - case "protonServiceRoleArn": + case "pipeline": + if err := awsAwsjson10_deserializeDocumentServicePipeline(&sv.Pipeline, value); err != nil { + return err + } + + case "repositoryConnectionArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.ProtonServiceRoleArn = ptr.String(jtv) + sv.RepositoryConnectionArn = ptr.String(jtv) } - case "provisioning": + case "repositoryId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Provisioning to be of type string, got %T instead", value) + return fmt.Errorf("expected RepositoryId to be of type string, got %T instead", value) } - sv.Provisioning = types.Provisioning(jtv) + sv.RepositoryId = ptr.String(jtv) } - case "templateMajorVersion": + case "spec": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) + return fmt.Errorf("expected SpecContents to be of type string, got %T instead", value) } - sv.TemplateMajorVersion = ptr.String(jtv) + sv.Spec = ptr.String(jtv) } - case "templateMinorVersion": + case "status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) + return fmt.Errorf("expected ServiceStatus to be of type string, got %T instead", value) } - sv.TemplateMinorVersion = ptr.String(jtv) + sv.Status = types.ServiceStatus(jtv) + } + + case "statusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) + } + sv.StatusMessage = ptr.String(jtv) } case "templateName": @@ -7256,41 +11304,7 @@ func awsAwsjson10_deserializeDocumentEnvironmentSummary(v **types.EnvironmentSum return nil } -func awsAwsjson10_deserializeDocumentEnvironmentSummaryList(v *[]types.EnvironmentSummary, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.EnvironmentSummary - if *v == nil { - cv = []types.EnvironmentSummary{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.EnvironmentSummary - destAddr := &col - if err := awsAwsjson10_deserializeDocumentEnvironmentSummary(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson10_deserializeDocumentEnvironmentTemplate(v **types.EnvironmentTemplate, value interface{}) error { +func awsAwsjson10_deserializeDocumentServiceInstance(v **types.ServiceInstance, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7303,9 +11317,9 @@ func awsAwsjson10_deserializeDocumentEnvironmentTemplate(v **types.EnvironmentTe return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EnvironmentTemplate + var sv *types.ServiceInstance if *v == nil { - sv = &types.EnvironmentTemplate{} + sv = &types.ServiceInstance{} } else { sv = *v } @@ -7316,7 +11330,7 @@ func awsAwsjson10_deserializeDocumentEnvironmentTemplate(v **types.EnvironmentTe if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EnvironmentTemplateArn to be of type string, got %T instead", value) + return fmt.Errorf("expected ServiceInstanceArn to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } @@ -7337,34 +11351,34 @@ func awsAwsjson10_deserializeDocumentEnvironmentTemplate(v **types.EnvironmentTe } } - case "description": + case "deploymentStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Description to be of type string, got %T instead", value) + return fmt.Errorf("expected DeploymentStatus to be of type string, got %T instead", value) } - sv.Description = ptr.String(jtv) + sv.DeploymentStatus = types.DeploymentStatus(jtv) } - case "displayName": + case "deploymentStatusMessage": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DisplayName to be of type string, got %T instead", value) + return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) } - sv.DisplayName = ptr.String(jtv) + sv.DeploymentStatusMessage = ptr.String(jtv) } - case "encryptionKey": + case "environmentName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } - sv.EncryptionKey = ptr.String(jtv) + sv.EnvironmentName = ptr.String(jtv) } - case "lastModifiedAt": + case "lastDeploymentAttemptedAt": if value != nil { switch jtv := value.(type) { case json.Number: @@ -7372,7 +11386,7 @@ func awsAwsjson10_deserializeDocumentEnvironmentTemplate(v **types.EnvironmentTe if err != nil { return err } - sv.LastModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + sv.LastDeploymentAttemptedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) @@ -7380,31 +11394,74 @@ func awsAwsjson10_deserializeDocumentEnvironmentTemplate(v **types.EnvironmentTe } } - case "name": + case "lastDeploymentSucceededAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastDeploymentSucceededAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "serviceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + } + sv.ServiceName = ptr.String(jtv) + } + + case "spec": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SpecContents to be of type string, got %T instead", value) + } + sv.Spec = ptr.String(jtv) + } + + case "templateMajorVersion": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.TemplateMajorVersion = ptr.String(jtv) } - case "provisioning": + case "templateMinorVersion": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Provisioning to be of type string, got %T instead", value) + return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) } - sv.Provisioning = types.Provisioning(jtv) + sv.TemplateMinorVersion = ptr.String(jtv) } - case "recommendedVersion": + case "templateName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected FullTemplateVersionNumber to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } - sv.RecommendedVersion = ptr.String(jtv) + sv.TemplateName = ptr.String(jtv) } default: @@ -7416,7 +11473,7 @@ func awsAwsjson10_deserializeDocumentEnvironmentTemplate(v **types.EnvironmentTe return nil } -func awsAwsjson10_deserializeDocumentEnvironmentTemplateSummary(v **types.EnvironmentTemplateSummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentServiceInstanceSummary(v **types.ServiceInstanceSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7429,9 +11486,9 @@ func awsAwsjson10_deserializeDocumentEnvironmentTemplateSummary(v **types.Enviro return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EnvironmentTemplateSummary + var sv *types.ServiceInstanceSummary if *v == nil { - sv = &types.EnvironmentTemplateSummary{} + sv = &types.ServiceInstanceSummary{} } else { sv = *v } @@ -7442,7 +11499,7 @@ func awsAwsjson10_deserializeDocumentEnvironmentTemplateSummary(v **types.Enviro if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EnvironmentTemplateArn to be of type string, got %T instead", value) + return fmt.Errorf("expected ServiceInstanceArn to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } @@ -7463,25 +11520,34 @@ func awsAwsjson10_deserializeDocumentEnvironmentTemplateSummary(v **types.Enviro } } - case "description": + case "deploymentStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Description to be of type string, got %T instead", value) + return fmt.Errorf("expected DeploymentStatus to be of type string, got %T instead", value) } - sv.Description = ptr.String(jtv) + sv.DeploymentStatus = types.DeploymentStatus(jtv) } - case "displayName": + case "deploymentStatusMessage": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DisplayName to be of type string, got %T instead", value) + return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) } - sv.DisplayName = ptr.String(jtv) + sv.DeploymentStatusMessage = ptr.String(jtv) } - case "lastModifiedAt": + case "environmentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + } + sv.EnvironmentName = ptr.String(jtv) + } + + case "lastDeploymentAttemptedAt": if value != nil { switch jtv := value.(type) { case json.Number: @@ -7489,7 +11555,23 @@ func awsAwsjson10_deserializeDocumentEnvironmentTemplateSummary(v **types.Enviro if err != nil { return err } - sv.LastModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + sv.LastDeploymentAttemptedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "lastDeploymentSucceededAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastDeploymentSucceededAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) @@ -7506,22 +11588,40 @@ func awsAwsjson10_deserializeDocumentEnvironmentTemplateSummary(v **types.Enviro sv.Name = ptr.String(jtv) } - case "provisioning": + case "serviceName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Provisioning to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } - sv.Provisioning = types.Provisioning(jtv) + sv.ServiceName = ptr.String(jtv) } - case "recommendedVersion": + case "templateMajorVersion": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected FullTemplateVersionNumber to be of type string, got %T instead", value) + return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) } - sv.RecommendedVersion = ptr.String(jtv) + sv.TemplateMajorVersion = ptr.String(jtv) + } + + case "templateMinorVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) + } + sv.TemplateMinorVersion = ptr.String(jtv) + } + + case "templateName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + } + sv.TemplateName = ptr.String(jtv) } default: @@ -7533,7 +11633,7 @@ func awsAwsjson10_deserializeDocumentEnvironmentTemplateSummary(v **types.Enviro return nil } -func awsAwsjson10_deserializeDocumentEnvironmentTemplateSummaryList(v *[]types.EnvironmentTemplateSummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentServiceInstanceSummaryList(v *[]types.ServiceInstanceSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7546,17 +11646,17 @@ func awsAwsjson10_deserializeDocumentEnvironmentTemplateSummaryList(v *[]types.E return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.EnvironmentTemplateSummary + var cv []types.ServiceInstanceSummary if *v == nil { - cv = []types.EnvironmentTemplateSummary{} + cv = []types.ServiceInstanceSummary{} } else { cv = *v } for _, value := range shape { - var col types.EnvironmentTemplateSummary + var col types.ServiceInstanceSummary destAddr := &col - if err := awsAwsjson10_deserializeDocumentEnvironmentTemplateSummary(&destAddr, value); err != nil { + if err := awsAwsjson10_deserializeDocumentServiceInstanceSummary(&destAddr, value); err != nil { return err } col = *destAddr @@ -7567,7 +11667,7 @@ func awsAwsjson10_deserializeDocumentEnvironmentTemplateSummaryList(v *[]types.E return nil } -func awsAwsjson10_deserializeDocumentEnvironmentTemplateVersion(v **types.EnvironmentTemplateVersion, value interface{}) error { +func awsAwsjson10_deserializeDocumentServicePipeline(v **types.ServicePipeline, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7580,9 +11680,9 @@ func awsAwsjson10_deserializeDocumentEnvironmentTemplateVersion(v **types.Enviro return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EnvironmentTemplateVersion + var sv *types.ServicePipeline if *v == nil { - sv = &types.EnvironmentTemplateVersion{} + sv = &types.ServicePipeline{} } else { sv = *v } @@ -7593,7 +11693,7 @@ func awsAwsjson10_deserializeDocumentEnvironmentTemplateVersion(v **types.Enviro if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EnvironmentTemplateVersionArn to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } @@ -7614,16 +11714,25 @@ func awsAwsjson10_deserializeDocumentEnvironmentTemplateVersion(v **types.Enviro } } - case "description": + case "deploymentStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Description to be of type string, got %T instead", value) + return fmt.Errorf("expected DeploymentStatus to be of type string, got %T instead", value) } - sv.Description = ptr.String(jtv) + sv.DeploymentStatus = types.DeploymentStatus(jtv) } - case "lastModifiedAt": + case "deploymentStatusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) + } + sv.DeploymentStatusMessage = ptr.String(jtv) + } + + case "lastDeploymentAttemptedAt": if value != nil { switch jtv := value.(type) { case json.Number: @@ -7631,7 +11740,7 @@ func awsAwsjson10_deserializeDocumentEnvironmentTemplateVersion(v **types.Enviro if err != nil { return err } - sv.LastModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + sv.LastDeploymentAttemptedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) @@ -7639,67 +11748,96 @@ func awsAwsjson10_deserializeDocumentEnvironmentTemplateVersion(v **types.Enviro } } - case "majorVersion": + case "lastDeploymentSucceededAt": if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastDeploymentSucceededAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + } - sv.MajorVersion = ptr.String(jtv) } - case "minorVersion": + case "spec": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) + return fmt.Errorf("expected SpecContents to be of type string, got %T instead", value) } - sv.MinorVersion = ptr.String(jtv) + sv.Spec = ptr.String(jtv) } - case "recommendedMinorVersion": + case "templateMajorVersion": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) } - sv.RecommendedMinorVersion = ptr.String(jtv) + sv.TemplateMajorVersion = ptr.String(jtv) } - case "schema": + case "templateMinorVersion": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TemplateSchema to be of type string, got %T instead", value) + return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) } - sv.Schema = ptr.String(jtv) + sv.TemplateMinorVersion = ptr.String(jtv) } - case "status": + case "templateName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TemplateVersionStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } - sv.Status = types.TemplateVersionStatus(jtv) + sv.TemplateName = ptr.String(jtv) } - case "statusMessage": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) - } - sv.StatusMessage = ptr.String(jtv) - } + default: + _, _ = key, value - case "templateName": + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ServiceQuotaExceededException + if *v == nil { + sv = &types.ServiceQuotaExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } - sv.TemplateName = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -7711,7 +11849,7 @@ func awsAwsjson10_deserializeDocumentEnvironmentTemplateVersion(v **types.Enviro return nil } -func awsAwsjson10_deserializeDocumentEnvironmentTemplateVersionSummary(v **types.EnvironmentTemplateVersionSummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentServiceSummary(v **types.ServiceSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7724,9 +11862,9 @@ func awsAwsjson10_deserializeDocumentEnvironmentTemplateVersionSummary(v **types return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EnvironmentTemplateVersionSummary + var sv *types.ServiceSummary if *v == nil { - sv = &types.EnvironmentTemplateVersionSummary{} + sv = &types.ServiceSummary{} } else { sv = *v } @@ -7737,7 +11875,7 @@ func awsAwsjson10_deserializeDocumentEnvironmentTemplateVersionSummary(v **types if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EnvironmentTemplateVersionArn to be of type string, got %T instead", value) + return fmt.Errorf("expected ServiceArn to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } @@ -7783,40 +11921,22 @@ func awsAwsjson10_deserializeDocumentEnvironmentTemplateVersionSummary(v **types } } - case "majorVersion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) - } - sv.MajorVersion = ptr.String(jtv) - } - - case "minorVersion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) - } - sv.MinorVersion = ptr.String(jtv) - } - - case "recommendedMinorVersion": + case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } - sv.RecommendedMinorVersion = ptr.String(jtv) + sv.Name = ptr.String(jtv) } case "status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TemplateVersionStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected ServiceStatus to be of type string, got %T instead", value) } - sv.Status = types.TemplateVersionStatus(jtv) + sv.Status = types.ServiceStatus(jtv) } case "statusMessage": @@ -7846,7 +11966,7 @@ func awsAwsjson10_deserializeDocumentEnvironmentTemplateVersionSummary(v **types return nil } -func awsAwsjson10_deserializeDocumentEnvironmentTemplateVersionSummaryList(v *[]types.EnvironmentTemplateVersionSummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentServiceSummaryList(v *[]types.ServiceSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7859,17 +11979,17 @@ func awsAwsjson10_deserializeDocumentEnvironmentTemplateVersionSummaryList(v *[] return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.EnvironmentTemplateVersionSummary + var cv []types.ServiceSummary if *v == nil { - cv = []types.EnvironmentTemplateVersionSummary{} + cv = []types.ServiceSummary{} } else { cv = *v } for _, value := range shape { - var col types.EnvironmentTemplateVersionSummary + var col types.ServiceSummary destAddr := &col - if err := awsAwsjson10_deserializeDocumentEnvironmentTemplateVersionSummary(&destAddr, value); err != nil { + if err := awsAwsjson10_deserializeDocumentServiceSummary(&destAddr, value); err != nil { return err } col = *destAddr @@ -7880,7 +12000,7 @@ func awsAwsjson10_deserializeDocumentEnvironmentTemplateVersionSummaryList(v *[] return nil } -func awsAwsjson10_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { +func awsAwsjson10_deserializeDocumentServiceTemplate(v **types.ServiceTemplate, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7893,62 +12013,108 @@ func awsAwsjson10_deserializeDocumentInternalServerException(v **types.InternalS return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InternalServerException + var sv *types.ServiceTemplate if *v == nil { - sv = &types.InternalServerException{} + sv = &types.ServiceTemplate{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "arn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected ServiceTemplateArn to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.Arn = ptr.String(jtv) } - default: - _, _ = key, value + case "createdAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - } - } - *v = sv - return nil -} + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) -func awsAwsjson10_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } + } + } - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } - var sv *types.ResourceNotFoundException - if *v == nil { - sv = &types.ResourceNotFoundException{} - } else { - sv = *v - } + case "displayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DisplayName to be of type string, got %T instead", value) + } + sv.DisplayName = ptr.String(jtv) + } - for key, value := range shape { - switch key { - case "message": + case "encryptionKey": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.EncryptionKey = ptr.String(jtv) + } + + case "lastModifiedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "pipelineProvisioning": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Provisioning to be of type string, got %T instead", value) + } + sv.PipelineProvisioning = types.Provisioning(jtv) + } + + case "recommendedVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FullTemplateVersionNumber to be of type string, got %T instead", value) + } + sv.RecommendedVersion = ptr.String(jtv) } default: @@ -7960,7 +12126,7 @@ func awsAwsjson10_deserializeDocumentResourceNotFoundException(v **types.Resourc return nil } -func awsAwsjson10_deserializeDocumentService(v **types.Service, value interface{}) error { +func awsAwsjson10_deserializeDocumentServiceTemplateSummary(v **types.ServiceTemplateSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7973,9 +12139,9 @@ func awsAwsjson10_deserializeDocumentService(v **types.Service, value interface{ return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Service + var sv *types.ServiceTemplateSummary if *v == nil { - sv = &types.Service{} + sv = &types.ServiceTemplateSummary{} } else { sv = *v } @@ -7986,20 +12152,11 @@ func awsAwsjson10_deserializeDocumentService(v **types.Service, value interface{ if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ServiceArn to be of type string, got %T instead", value) + return fmt.Errorf("expected ServiceTemplateArn to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } - case "branchName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected GitBranchName to be of type string, got %T instead", value) - } - sv.BranchName = ptr.String(jtv) - } - case "createdAt": if value != nil { switch jtv := value.(type) { @@ -8025,6 +12182,15 @@ func awsAwsjson10_deserializeDocumentService(v **types.Service, value interface{ sv.Description = ptr.String(jtv) } + case "displayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DisplayName to be of type string, got %T instead", value) + } + sv.DisplayName = ptr.String(jtv) + } + case "lastModifiedAt": if value != nil { switch jtv := value.(type) { @@ -8050,75 +12216,68 @@ func awsAwsjson10_deserializeDocumentService(v **types.Service, value interface{ sv.Name = ptr.String(jtv) } - case "pipeline": - if err := awsAwsjson10_deserializeDocumentServicePipeline(&sv.Pipeline, value); err != nil { - return err - } - - case "repositoryConnectionArn": + case "pipelineProvisioning": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected Provisioning to be of type string, got %T instead", value) } - sv.RepositoryConnectionArn = ptr.String(jtv) + sv.PipelineProvisioning = types.Provisioning(jtv) } - case "repositoryId": + case "recommendedVersion": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RepositoryId to be of type string, got %T instead", value) + return fmt.Errorf("expected FullTemplateVersionNumber to be of type string, got %T instead", value) } - sv.RepositoryId = ptr.String(jtv) + sv.RecommendedVersion = ptr.String(jtv) } - case "spec": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SpecContents to be of type string, got %T instead", value) - } - sv.Spec = ptr.String(jtv) - } + default: + _, _ = key, value - case "status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ServiceStatus to be of type string, got %T instead", value) - } - sv.Status = types.ServiceStatus(jtv) - } + } + } + *v = sv + return nil +} - case "statusMessage": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) - } - sv.StatusMessage = ptr.String(jtv) - } +func awsAwsjson10_deserializeDocumentServiceTemplateSummaryList(v *[]types.ServiceTemplateSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - case "templateName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) - } - sv.TemplateName = ptr.String(jtv) - } + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - default: - _, _ = key, value + var cv []types.ServiceTemplateSummary + if *v == nil { + cv = []types.ServiceTemplateSummary{} + } else { + cv = *v + } + for _, value := range shape { + var col types.ServiceTemplateSummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentServiceTemplateSummary(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson10_deserializeDocumentServiceInstance(v **types.ServiceInstance, value interface{}) error { +func awsAwsjson10_deserializeDocumentServiceTemplateVersion(v **types.ServiceTemplateVersion, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8131,9 +12290,9 @@ func awsAwsjson10_deserializeDocumentServiceInstance(v **types.ServiceInstance, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ServiceInstance + var sv *types.ServiceTemplateVersion if *v == nil { - sv = &types.ServiceInstance{} + sv = &types.ServiceTemplateVersion{} } else { sv = *v } @@ -8144,11 +12303,16 @@ func awsAwsjson10_deserializeDocumentServiceInstance(v **types.ServiceInstance, if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ServiceInstanceArn to be of type string, got %T instead", value) + return fmt.Errorf("expected ServiceTemplateVersionArn to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } + case "compatibleEnvironmentTemplates": + if err := awsAwsjson10_deserializeDocumentCompatibleEnvironmentTemplateList(&sv.CompatibleEnvironmentTemplates, value); err != nil { + return err + } + case "createdAt": if value != nil { switch jtv := value.(type) { @@ -8165,34 +12329,16 @@ func awsAwsjson10_deserializeDocumentServiceInstance(v **types.ServiceInstance, } } - case "deploymentStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DeploymentStatus to be of type string, got %T instead", value) - } - sv.DeploymentStatus = types.DeploymentStatus(jtv) - } - - case "deploymentStatusMessage": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) - } - sv.DeploymentStatusMessage = ptr.String(jtv) - } - - case "environmentName": + case "description": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + return fmt.Errorf("expected Description to be of type string, got %T instead", value) } - sv.EnvironmentName = ptr.String(jtv) + sv.Description = ptr.String(jtv) } - case "lastDeploymentAttemptedAt": + case "lastModifiedAt": if value != nil { switch jtv := value.(type) { case json.Number: @@ -8200,7 +12346,7 @@ func awsAwsjson10_deserializeDocumentServiceInstance(v **types.ServiceInstance, if err != nil { return err } - sv.LastDeploymentAttemptedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + sv.LastModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) @@ -8208,65 +12354,58 @@ func awsAwsjson10_deserializeDocumentServiceInstance(v **types.ServiceInstance, } } - case "lastDeploymentSucceededAt": + case "majorVersion": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastDeploymentSucceededAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) } + sv.MajorVersion = ptr.String(jtv) } - case "name": + case "minorVersion": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.MinorVersion = ptr.String(jtv) } - case "serviceName": + case "recommendedMinorVersion": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) } - sv.ServiceName = ptr.String(jtv) + sv.RecommendedMinorVersion = ptr.String(jtv) } - case "spec": + case "schema": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SpecContents to be of type string, got %T instead", value) + return fmt.Errorf("expected TemplateSchema to be of type string, got %T instead", value) } - sv.Spec = ptr.String(jtv) + sv.Schema = ptr.String(jtv) } - case "templateMajorVersion": + case "status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) + return fmt.Errorf("expected TemplateVersionStatus to be of type string, got %T instead", value) } - sv.TemplateMajorVersion = ptr.String(jtv) + sv.Status = types.TemplateVersionStatus(jtv) } - case "templateMinorVersion": + case "statusMessage": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) + return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) } - sv.TemplateMinorVersion = ptr.String(jtv) + sv.StatusMessage = ptr.String(jtv) } case "templateName": @@ -8287,7 +12426,7 @@ func awsAwsjson10_deserializeDocumentServiceInstance(v **types.ServiceInstance, return nil } -func awsAwsjson10_deserializeDocumentServiceInstanceSummary(v **types.ServiceInstanceSummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentServiceTemplateVersionSummary(v **types.ServiceTemplateVersionSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8300,9 +12439,9 @@ func awsAwsjson10_deserializeDocumentServiceInstanceSummary(v **types.ServiceIns return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ServiceInstanceSummary + var sv *types.ServiceTemplateVersionSummary if *v == nil { - sv = &types.ServiceInstanceSummary{} + sv = &types.ServiceTemplateVersionSummary{} } else { sv = *v } @@ -8313,7 +12452,7 @@ func awsAwsjson10_deserializeDocumentServiceInstanceSummary(v **types.ServiceIns if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ServiceInstanceArn to be of type string, got %T instead", value) + return fmt.Errorf("expected ServiceTemplateVersionArn to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } @@ -8334,34 +12473,16 @@ func awsAwsjson10_deserializeDocumentServiceInstanceSummary(v **types.ServiceIns } } - case "deploymentStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DeploymentStatus to be of type string, got %T instead", value) - } - sv.DeploymentStatus = types.DeploymentStatus(jtv) - } - - case "deploymentStatusMessage": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) - } - sv.DeploymentStatusMessage = ptr.String(jtv) - } - - case "environmentName": + case "description": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + return fmt.Errorf("expected Description to be of type string, got %T instead", value) } - sv.EnvironmentName = ptr.String(jtv) + sv.Description = ptr.String(jtv) } - case "lastDeploymentAttemptedAt": + case "lastModifiedAt": if value != nil { switch jtv := value.(type) { case json.Number: @@ -8369,7 +12490,7 @@ func awsAwsjson10_deserializeDocumentServiceInstanceSummary(v **types.ServiceIns if err != nil { return err } - sv.LastDeploymentAttemptedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + sv.LastModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) @@ -8377,56 +12498,49 @@ func awsAwsjson10_deserializeDocumentServiceInstanceSummary(v **types.ServiceIns } } - case "lastDeploymentSucceededAt": + case "majorVersion": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastDeploymentSucceededAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) } + sv.MajorVersion = ptr.String(jtv) } - case "name": + case "minorVersion": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.MinorVersion = ptr.String(jtv) } - case "serviceName": + case "recommendedMinorVersion": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) } - sv.ServiceName = ptr.String(jtv) + sv.RecommendedMinorVersion = ptr.String(jtv) } - case "templateMajorVersion": + case "status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) + return fmt.Errorf("expected TemplateVersionStatus to be of type string, got %T instead", value) } - sv.TemplateMajorVersion = ptr.String(jtv) + sv.Status = types.TemplateVersionStatus(jtv) } - case "templateMinorVersion": + case "statusMessage": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) + return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) } - sv.TemplateMinorVersion = ptr.String(jtv) + sv.StatusMessage = ptr.String(jtv) } case "templateName": @@ -8447,7 +12561,7 @@ func awsAwsjson10_deserializeDocumentServiceInstanceSummary(v **types.ServiceIns return nil } -func awsAwsjson10_deserializeDocumentServiceInstanceSummaryList(v *[]types.ServiceInstanceSummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentServiceTemplateVersionSummaryList(v *[]types.ServiceTemplateVersionSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8460,17 +12574,17 @@ func awsAwsjson10_deserializeDocumentServiceInstanceSummaryList(v *[]types.Servi return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ServiceInstanceSummary + var cv []types.ServiceTemplateVersionSummary if *v == nil { - cv = []types.ServiceInstanceSummary{} + cv = []types.ServiceTemplateVersionSummary{} } else { cv = *v } for _, value := range shape { - var col types.ServiceInstanceSummary + var col types.ServiceTemplateVersionSummary destAddr := &col - if err := awsAwsjson10_deserializeDocumentServiceInstanceSummary(&destAddr, value); err != nil { + if err := awsAwsjson10_deserializeDocumentServiceTemplateVersionSummary(&destAddr, value); err != nil { return err } col = *destAddr @@ -8481,7 +12595,7 @@ func awsAwsjson10_deserializeDocumentServiceInstanceSummaryList(v *[]types.Servi return nil } -func awsAwsjson10_deserializeDocumentServicePipeline(v **types.ServicePipeline, value interface{}) error { +func awsAwsjson10_deserializeDocumentTag(v **types.Tag, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8494,124 +12608,150 @@ func awsAwsjson10_deserializeDocumentServicePipeline(v **types.ServicePipeline, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ServicePipeline + var sv *types.Tag if *v == nil { - sv = &types.ServicePipeline{} + sv = &types.Tag{} } else { sv = *v } for key, value := range shape { switch key { - case "arn": + case "key": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected TagKey to be of type string, got %T instead", value) } - sv.Arn = ptr.String(jtv) + sv.Key = ptr.String(jtv) } - case "createdAt": + case "value": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) } + sv.Value = ptr.String(jtv) } - case "deploymentStatus": + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentTagList(v *[]types.Tag, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Tag + if *v == nil { + cv = []types.Tag{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Tag + destAddr := &col + if err := awsAwsjson10_deserializeDocumentTag(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentTemplateSyncConfig(v **types.TemplateSyncConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.TemplateSyncConfig + if *v == nil { + sv = &types.TemplateSyncConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "branch": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DeploymentStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected GitBranchName to be of type string, got %T instead", value) } - sv.DeploymentStatus = types.DeploymentStatus(jtv) + sv.Branch = ptr.String(jtv) } - case "deploymentStatusMessage": + case "repositoryName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) - } - sv.DeploymentStatusMessage = ptr.String(jtv) - } - - case "lastDeploymentAttemptedAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastDeploymentAttemptedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "lastDeploymentSucceededAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastDeploymentSucceededAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - + return fmt.Errorf("expected RepositoryName to be of type string, got %T instead", value) } + sv.RepositoryName = ptr.String(jtv) } - case "spec": + case "repositoryProvider": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SpecContents to be of type string, got %T instead", value) + return fmt.Errorf("expected RepositoryProvider to be of type string, got %T instead", value) } - sv.Spec = ptr.String(jtv) + sv.RepositoryProvider = types.RepositoryProvider(jtv) } - case "templateMajorVersion": + case "subdirectory": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) + return fmt.Errorf("expected Subdirectory to be of type string, got %T instead", value) } - sv.TemplateMajorVersion = ptr.String(jtv) + sv.Subdirectory = ptr.String(jtv) } - case "templateMinorVersion": + case "templateName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } - sv.TemplateMinorVersion = ptr.String(jtv) + sv.TemplateName = ptr.String(jtv) } - case "templateName": + case "templateType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + return fmt.Errorf("expected TemplateType to be of type string, got %T instead", value) } - sv.TemplateName = ptr.String(jtv) + sv.TemplateType = types.TemplateType(jtv) } default: @@ -8623,7 +12763,7 @@ func awsAwsjson10_deserializeDocumentServicePipeline(v **types.ServicePipeline, return nil } -func awsAwsjson10_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { +func awsAwsjson10_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8636,9 +12776,9 @@ func awsAwsjson10_deserializeDocumentServiceQuotaExceededException(v **types.Ser return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ServiceQuotaExceededException + var sv *types.ThrottlingException if *v == nil { - sv = &types.ServiceQuotaExceededException{} + sv = &types.ThrottlingException{} } else { sv = *v } @@ -8663,7 +12803,7 @@ func awsAwsjson10_deserializeDocumentServiceQuotaExceededException(v **types.Ser return nil } -func awsAwsjson10_deserializeDocumentServiceSummary(v **types.ServiceSummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8676,99 +12816,166 @@ func awsAwsjson10_deserializeDocumentServiceSummary(v **types.ServiceSummary, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ServiceSummary + var sv *types.ValidationException if *v == nil { - sv = &types.ServiceSummary{} + sv = &types.ValidationException{} } else { sv = *v } for key, value := range shape { switch key { - case "arn": + case "message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ServiceArn to be of type string, got %T instead", value) + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } - sv.Arn = ptr.String(jtv) + sv.Message = ptr.String(jtv) } - case "createdAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + default: + _, _ = key, value - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + } + } + *v = sv + return nil +} - } - } +func awsAwsjson10_deserializeOpDocumentAcceptEnvironmentAccountConnectionOutput(v **AcceptEnvironmentAccountConnectionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - case "description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Description to be of type string, got %T instead", value) - } - sv.Description = ptr.String(jtv) + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *AcceptEnvironmentAccountConnectionOutput + if *v == nil { + sv = &AcceptEnvironmentAccountConnectionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "environmentAccountConnection": + if err := awsAwsjson10_deserializeDocumentEnvironmentAccountConnection(&sv.EnvironmentAccountConnection, value); err != nil { + return err } - case "lastModifiedAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + default: + _, _ = key, value - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + } + } + *v = sv + return nil +} - } - } +func awsAwsjson10_deserializeOpDocumentCancelEnvironmentDeploymentOutput(v **CancelEnvironmentDeploymentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - case "status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ServiceStatus to be of type string, got %T instead", value) - } - sv.Status = types.ServiceStatus(jtv) + var sv *CancelEnvironmentDeploymentOutput + if *v == nil { + sv = &CancelEnvironmentDeploymentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "environment": + if err := awsAwsjson10_deserializeDocumentEnvironment(&sv.Environment, value); err != nil { + return err } - case "statusMessage": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) - } - sv.StatusMessage = ptr.String(jtv) + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentCancelServiceInstanceDeploymentOutput(v **CancelServiceInstanceDeploymentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CancelServiceInstanceDeploymentOutput + if *v == nil { + sv = &CancelServiceInstanceDeploymentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "serviceInstance": + if err := awsAwsjson10_deserializeDocumentServiceInstance(&sv.ServiceInstance, value); err != nil { + return err } - case "templateName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) - } - sv.TemplateName = ptr.String(jtv) + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentCancelServicePipelineDeploymentOutput(v **CancelServicePipelineDeploymentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CancelServicePipelineDeploymentOutput + if *v == nil { + sv = &CancelServicePipelineDeploymentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "pipeline": + if err := awsAwsjson10_deserializeDocumentServicePipeline(&sv.Pipeline, value); err != nil { + return err } default: @@ -8780,7 +12987,7 @@ func awsAwsjson10_deserializeDocumentServiceSummary(v **types.ServiceSummary, va return nil } -func awsAwsjson10_deserializeDocumentServiceSummaryList(v *[]types.ServiceSummary, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentCreateEnvironmentAccountConnectionOutput(v **CreateEnvironmentAccountConnectionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8788,33 +12995,35 @@ func awsAwsjson10_deserializeDocumentServiceSummaryList(v *[]types.ServiceSummar return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ServiceSummary + var sv *CreateEnvironmentAccountConnectionOutput if *v == nil { - cv = []types.ServiceSummary{} + sv = &CreateEnvironmentAccountConnectionOutput{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.ServiceSummary - destAddr := &col - if err := awsAwsjson10_deserializeDocumentServiceSummary(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "environmentAccountConnection": + if err := awsAwsjson10_deserializeDocumentEnvironmentAccountConnection(&sv.EnvironmentAccountConnection, value); err != nil { + return err + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsAwsjson10_deserializeDocumentServiceTemplate(v **types.ServiceTemplate, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentCreateEnvironmentOutput(v **CreateEnvironmentOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8827,108 +13036,18 @@ func awsAwsjson10_deserializeDocumentServiceTemplate(v **types.ServiceTemplate, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ServiceTemplate + var sv *CreateEnvironmentOutput if *v == nil { - sv = &types.ServiceTemplate{} + sv = &CreateEnvironmentOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ServiceTemplateArn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "createdAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Description to be of type string, got %T instead", value) - } - sv.Description = ptr.String(jtv) - } - - case "displayName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DisplayName to be of type string, got %T instead", value) - } - sv.DisplayName = ptr.String(jtv) - } - - case "encryptionKey": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.EncryptionKey = ptr.String(jtv) - } - - case "lastModifiedAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "pipelineProvisioning": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Provisioning to be of type string, got %T instead", value) - } - sv.PipelineProvisioning = types.Provisioning(jtv) - } - - case "recommendedVersion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected FullTemplateVersionNumber to be of type string, got %T instead", value) - } - sv.RecommendedVersion = ptr.String(jtv) + case "environment": + if err := awsAwsjson10_deserializeDocumentEnvironment(&sv.Environment, value); err != nil { + return err } default: @@ -8940,7 +13059,7 @@ func awsAwsjson10_deserializeDocumentServiceTemplate(v **types.ServiceTemplate, return nil } -func awsAwsjson10_deserializeDocumentServiceTemplateSummary(v **types.ServiceTemplateSummary, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentCreateEnvironmentTemplateOutput(v **CreateEnvironmentTemplateOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8953,99 +13072,54 @@ func awsAwsjson10_deserializeDocumentServiceTemplateSummary(v **types.ServiceTem return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ServiceTemplateSummary + var sv *CreateEnvironmentTemplateOutput if *v == nil { - sv = &types.ServiceTemplateSummary{} + sv = &CreateEnvironmentTemplateOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ServiceTemplateArn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "createdAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Description to be of type string, got %T instead", value) - } - sv.Description = ptr.String(jtv) - } - - case "displayName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DisplayName to be of type string, got %T instead", value) - } - sv.DisplayName = ptr.String(jtv) + case "environmentTemplate": + if err := awsAwsjson10_deserializeDocumentEnvironmentTemplate(&sv.EnvironmentTemplate, value); err != nil { + return err } - case "lastModifiedAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + default: + _, _ = key, value - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + } + } + *v = sv + return nil +} - } - } +func awsAwsjson10_deserializeOpDocumentCreateEnvironmentTemplateVersionOutput(v **CreateEnvironmentTemplateVersionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - case "pipelineProvisioning": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Provisioning to be of type string, got %T instead", value) - } - sv.PipelineProvisioning = types.Provisioning(jtv) - } + var sv *CreateEnvironmentTemplateVersionOutput + if *v == nil { + sv = &CreateEnvironmentTemplateVersionOutput{} + } else { + sv = *v + } - case "recommendedVersion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected FullTemplateVersionNumber to be of type string, got %T instead", value) - } - sv.RecommendedVersion = ptr.String(jtv) + for key, value := range shape { + switch key { + case "environmentTemplateVersion": + if err := awsAwsjson10_deserializeDocumentEnvironmentTemplateVersion(&sv.EnvironmentTemplateVersion, value); err != nil { + return err } default: @@ -9057,7 +13131,7 @@ func awsAwsjson10_deserializeDocumentServiceTemplateSummary(v **types.ServiceTem return nil } -func awsAwsjson10_deserializeDocumentServiceTemplateSummaryList(v *[]types.ServiceTemplateSummary, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentCreateRepositoryOutput(v **CreateRepositoryOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9065,33 +13139,35 @@ func awsAwsjson10_deserializeDocumentServiceTemplateSummaryList(v *[]types.Servi return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ServiceTemplateSummary + var sv *CreateRepositoryOutput if *v == nil { - cv = []types.ServiceTemplateSummary{} + sv = &CreateRepositoryOutput{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.ServiceTemplateSummary - destAddr := &col - if err := awsAwsjson10_deserializeDocumentServiceTemplateSummary(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "repository": + if err := awsAwsjson10_deserializeDocumentRepository(&sv.Repository, value); err != nil { + return err + } + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } -func awsAwsjson10_deserializeDocumentServiceTemplateVersion(v **types.ServiceTemplateVersion, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentCreateServiceOutput(v **CreateServiceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9104,133 +13180,20 @@ func awsAwsjson10_deserializeDocumentServiceTemplateVersion(v **types.ServiceTem return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ServiceTemplateVersion + var sv *CreateServiceOutput if *v == nil { - sv = &types.ServiceTemplateVersion{} + sv = &CreateServiceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ServiceTemplateVersionArn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "compatibleEnvironmentTemplates": - if err := awsAwsjson10_deserializeDocumentCompatibleEnvironmentTemplateList(&sv.CompatibleEnvironmentTemplates, value); err != nil { + case "service": + if err := awsAwsjson10_deserializeDocumentService(&sv.Service, value); err != nil { return err } - case "createdAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Description to be of type string, got %T instead", value) - } - sv.Description = ptr.String(jtv) - } - - case "lastModifiedAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "majorVersion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) - } - sv.MajorVersion = ptr.String(jtv) - } - - case "minorVersion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) - } - sv.MinorVersion = ptr.String(jtv) - } - - case "recommendedMinorVersion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) - } - sv.RecommendedMinorVersion = ptr.String(jtv) - } - - case "schema": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TemplateSchema to be of type string, got %T instead", value) - } - sv.Schema = ptr.String(jtv) - } - - case "status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TemplateVersionStatus to be of type string, got %T instead", value) - } - sv.Status = types.TemplateVersionStatus(jtv) - } - - case "statusMessage": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) - } - sv.StatusMessage = ptr.String(jtv) - } - - case "templateName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) - } - sv.TemplateName = ptr.String(jtv) - } - default: _, _ = key, value @@ -9240,7 +13203,7 @@ func awsAwsjson10_deserializeDocumentServiceTemplateVersion(v **types.ServiceTem return nil } -func awsAwsjson10_deserializeDocumentServiceTemplateVersionSummary(v **types.ServiceTemplateVersionSummary, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentCreateServiceTemplateOutput(v **CreateServiceTemplateOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9253,117 +13216,18 @@ func awsAwsjson10_deserializeDocumentServiceTemplateVersionSummary(v **types.Ser return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ServiceTemplateVersionSummary + var sv *CreateServiceTemplateOutput if *v == nil { - sv = &types.ServiceTemplateVersionSummary{} + sv = &CreateServiceTemplateOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ServiceTemplateVersionArn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "createdAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Description to be of type string, got %T instead", value) - } - sv.Description = ptr.String(jtv) - } - - case "lastModifiedAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastModifiedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "majorVersion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) - } - sv.MajorVersion = ptr.String(jtv) - } - - case "minorVersion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) - } - sv.MinorVersion = ptr.String(jtv) - } - - case "recommendedMinorVersion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TemplateVersionPart to be of type string, got %T instead", value) - } - sv.RecommendedMinorVersion = ptr.String(jtv) - } - - case "status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TemplateVersionStatus to be of type string, got %T instead", value) - } - sv.Status = types.TemplateVersionStatus(jtv) - } - - case "statusMessage": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) - } - sv.StatusMessage = ptr.String(jtv) - } - - case "templateName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) - } - sv.TemplateName = ptr.String(jtv) + case "serviceTemplate": + if err := awsAwsjson10_deserializeDocumentServiceTemplate(&sv.ServiceTemplate, value); err != nil { + return err } default: @@ -9375,7 +13239,7 @@ func awsAwsjson10_deserializeDocumentServiceTemplateVersionSummary(v **types.Ser return nil } -func awsAwsjson10_deserializeDocumentServiceTemplateVersionSummaryList(v *[]types.ServiceTemplateVersionSummary, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentCreateServiceTemplateVersionOutput(v **CreateServiceTemplateVersionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9383,33 +13247,35 @@ func awsAwsjson10_deserializeDocumentServiceTemplateVersionSummaryList(v *[]type return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ServiceTemplateVersionSummary + var sv *CreateServiceTemplateVersionOutput if *v == nil { - cv = []types.ServiceTemplateVersionSummary{} + sv = &CreateServiceTemplateVersionOutput{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.ServiceTemplateVersionSummary - destAddr := &col - if err := awsAwsjson10_deserializeDocumentServiceTemplateVersionSummary(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "serviceTemplateVersion": + if err := awsAwsjson10_deserializeDocumentServiceTemplateVersion(&sv.ServiceTemplateVersion, value); err != nil { + return err + } + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } -func awsAwsjson10_deserializeDocumentTag(v **types.Tag, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentCreateTemplateSyncConfigOutput(v **CreateTemplateSyncConfigOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9422,31 +13288,18 @@ func awsAwsjson10_deserializeDocumentTag(v **types.Tag, value interface{}) error return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Tag + var sv *CreateTemplateSyncConfigOutput if *v == nil { - sv = &types.Tag{} + sv = &CreateTemplateSyncConfigOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "key": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TagKey to be of type string, got %T instead", value) - } - sv.Key = ptr.String(jtv) - } - - case "value": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) - } - sv.Value = ptr.String(jtv) + case "templateSyncConfig": + if err := awsAwsjson10_deserializeDocumentTemplateSyncConfig(&sv.TemplateSyncConfig, value); err != nil { + return err } default: @@ -9458,7 +13311,7 @@ func awsAwsjson10_deserializeDocumentTag(v **types.Tag, value interface{}) error return nil } -func awsAwsjson10_deserializeDocumentTagList(v *[]types.Tag, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentDeleteEnvironmentAccountConnectionOutput(v **DeleteEnvironmentAccountConnectionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9466,33 +13319,35 @@ func awsAwsjson10_deserializeDocumentTagList(v *[]types.Tag, value interface{}) return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.Tag + var sv *DeleteEnvironmentAccountConnectionOutput if *v == nil { - cv = []types.Tag{} + sv = &DeleteEnvironmentAccountConnectionOutput{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.Tag - destAddr := &col - if err := awsAwsjson10_deserializeDocumentTag(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "environmentAccountConnection": + if err := awsAwsjson10_deserializeDocumentEnvironmentAccountConnection(&sv.EnvironmentAccountConnection, value); err != nil { + return err + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsAwsjson10_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentDeleteEnvironmentOutput(v **DeleteEnvironmentOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9505,22 +13360,18 @@ func awsAwsjson10_deserializeDocumentThrottlingException(v **types.ThrottlingExc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ThrottlingException + var sv *DeleteEnvironmentOutput if *v == nil { - sv = &types.ThrottlingException{} + sv = &DeleteEnvironmentOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) + case "environment": + if err := awsAwsjson10_deserializeDocumentEnvironment(&sv.Environment, value); err != nil { + return err } default: @@ -9532,7 +13383,7 @@ func awsAwsjson10_deserializeDocumentThrottlingException(v **types.ThrottlingExc return nil } -func awsAwsjson10_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentDeleteEnvironmentTemplateOutput(v **DeleteEnvironmentTemplateOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9545,22 +13396,18 @@ func awsAwsjson10_deserializeDocumentValidationException(v **types.ValidationExc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ValidationException + var sv *DeleteEnvironmentTemplateOutput if *v == nil { - sv = &types.ValidationException{} + sv = &DeleteEnvironmentTemplateOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) + case "environmentTemplate": + if err := awsAwsjson10_deserializeDocumentEnvironmentTemplate(&sv.EnvironmentTemplate, value); err != nil { + return err } default: @@ -9572,7 +13419,7 @@ func awsAwsjson10_deserializeDocumentValidationException(v **types.ValidationExc return nil } -func awsAwsjson10_deserializeOpDocumentAcceptEnvironmentAccountConnectionOutput(v **AcceptEnvironmentAccountConnectionOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentDeleteEnvironmentTemplateVersionOutput(v **DeleteEnvironmentTemplateVersionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9585,17 +13432,17 @@ func awsAwsjson10_deserializeOpDocumentAcceptEnvironmentAccountConnectionOutput( return fmt.Errorf("unexpected JSON type %v", value) } - var sv *AcceptEnvironmentAccountConnectionOutput + var sv *DeleteEnvironmentTemplateVersionOutput if *v == nil { - sv = &AcceptEnvironmentAccountConnectionOutput{} + sv = &DeleteEnvironmentTemplateVersionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "environmentAccountConnection": - if err := awsAwsjson10_deserializeDocumentEnvironmentAccountConnection(&sv.EnvironmentAccountConnection, value); err != nil { + case "environmentTemplateVersion": + if err := awsAwsjson10_deserializeDocumentEnvironmentTemplateVersion(&sv.EnvironmentTemplateVersion, value); err != nil { return err } @@ -9608,7 +13455,7 @@ func awsAwsjson10_deserializeOpDocumentAcceptEnvironmentAccountConnectionOutput( return nil } -func awsAwsjson10_deserializeOpDocumentCancelEnvironmentDeploymentOutput(v **CancelEnvironmentDeploymentOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentDeleteRepositoryOutput(v **DeleteRepositoryOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9621,17 +13468,17 @@ func awsAwsjson10_deserializeOpDocumentCancelEnvironmentDeploymentOutput(v **Can return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CancelEnvironmentDeploymentOutput + var sv *DeleteRepositoryOutput if *v == nil { - sv = &CancelEnvironmentDeploymentOutput{} + sv = &DeleteRepositoryOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "environment": - if err := awsAwsjson10_deserializeDocumentEnvironment(&sv.Environment, value); err != nil { + case "repository": + if err := awsAwsjson10_deserializeDocumentRepository(&sv.Repository, value); err != nil { return err } @@ -9644,7 +13491,7 @@ func awsAwsjson10_deserializeOpDocumentCancelEnvironmentDeploymentOutput(v **Can return nil } -func awsAwsjson10_deserializeOpDocumentCancelServiceInstanceDeploymentOutput(v **CancelServiceInstanceDeploymentOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentDeleteServiceOutput(v **DeleteServiceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9657,17 +13504,17 @@ func awsAwsjson10_deserializeOpDocumentCancelServiceInstanceDeploymentOutput(v * return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CancelServiceInstanceDeploymentOutput + var sv *DeleteServiceOutput if *v == nil { - sv = &CancelServiceInstanceDeploymentOutput{} + sv = &DeleteServiceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "serviceInstance": - if err := awsAwsjson10_deserializeDocumentServiceInstance(&sv.ServiceInstance, value); err != nil { + case "service": + if err := awsAwsjson10_deserializeDocumentService(&sv.Service, value); err != nil { return err } @@ -9680,7 +13527,7 @@ func awsAwsjson10_deserializeOpDocumentCancelServiceInstanceDeploymentOutput(v * return nil } -func awsAwsjson10_deserializeOpDocumentCancelServicePipelineDeploymentOutput(v **CancelServicePipelineDeploymentOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentDeleteServiceTemplateOutput(v **DeleteServiceTemplateOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9693,17 +13540,17 @@ func awsAwsjson10_deserializeOpDocumentCancelServicePipelineDeploymentOutput(v * return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CancelServicePipelineDeploymentOutput + var sv *DeleteServiceTemplateOutput if *v == nil { - sv = &CancelServicePipelineDeploymentOutput{} + sv = &DeleteServiceTemplateOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "pipeline": - if err := awsAwsjson10_deserializeDocumentServicePipeline(&sv.Pipeline, value); err != nil { + case "serviceTemplate": + if err := awsAwsjson10_deserializeDocumentServiceTemplate(&sv.ServiceTemplate, value); err != nil { return err } @@ -9716,7 +13563,7 @@ func awsAwsjson10_deserializeOpDocumentCancelServicePipelineDeploymentOutput(v * return nil } -func awsAwsjson10_deserializeOpDocumentCreateEnvironmentAccountConnectionOutput(v **CreateEnvironmentAccountConnectionOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentDeleteServiceTemplateVersionOutput(v **DeleteServiceTemplateVersionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9729,17 +13576,17 @@ func awsAwsjson10_deserializeOpDocumentCreateEnvironmentAccountConnectionOutput( return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateEnvironmentAccountConnectionOutput + var sv *DeleteServiceTemplateVersionOutput if *v == nil { - sv = &CreateEnvironmentAccountConnectionOutput{} + sv = &DeleteServiceTemplateVersionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "environmentAccountConnection": - if err := awsAwsjson10_deserializeDocumentEnvironmentAccountConnection(&sv.EnvironmentAccountConnection, value); err != nil { + case "serviceTemplateVersion": + if err := awsAwsjson10_deserializeDocumentServiceTemplateVersion(&sv.ServiceTemplateVersion, value); err != nil { return err } @@ -9752,7 +13599,7 @@ func awsAwsjson10_deserializeOpDocumentCreateEnvironmentAccountConnectionOutput( return nil } -func awsAwsjson10_deserializeOpDocumentCreateEnvironmentOutput(v **CreateEnvironmentOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentDeleteTemplateSyncConfigOutput(v **DeleteTemplateSyncConfigOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9765,17 +13612,17 @@ func awsAwsjson10_deserializeOpDocumentCreateEnvironmentOutput(v **CreateEnviron return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateEnvironmentOutput + var sv *DeleteTemplateSyncConfigOutput if *v == nil { - sv = &CreateEnvironmentOutput{} + sv = &DeleteTemplateSyncConfigOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "environment": - if err := awsAwsjson10_deserializeDocumentEnvironment(&sv.Environment, value); err != nil { + case "templateSyncConfig": + if err := awsAwsjson10_deserializeDocumentTemplateSyncConfig(&sv.TemplateSyncConfig, value); err != nil { return err } @@ -9788,7 +13635,7 @@ func awsAwsjson10_deserializeOpDocumentCreateEnvironmentOutput(v **CreateEnviron return nil } -func awsAwsjson10_deserializeOpDocumentCreateEnvironmentTemplateOutput(v **CreateEnvironmentTemplateOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentGetAccountSettingsOutput(v **GetAccountSettingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9801,17 +13648,17 @@ func awsAwsjson10_deserializeOpDocumentCreateEnvironmentTemplateOutput(v **Creat return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateEnvironmentTemplateOutput + var sv *GetAccountSettingsOutput if *v == nil { - sv = &CreateEnvironmentTemplateOutput{} + sv = &GetAccountSettingsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "environmentTemplate": - if err := awsAwsjson10_deserializeDocumentEnvironmentTemplate(&sv.EnvironmentTemplate, value); err != nil { + case "accountSettings": + if err := awsAwsjson10_deserializeDocumentAccountSettings(&sv.AccountSettings, value); err != nil { return err } @@ -9824,7 +13671,7 @@ func awsAwsjson10_deserializeOpDocumentCreateEnvironmentTemplateOutput(v **Creat return nil } -func awsAwsjson10_deserializeOpDocumentCreateEnvironmentTemplateVersionOutput(v **CreateEnvironmentTemplateVersionOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentGetEnvironmentAccountConnectionOutput(v **GetEnvironmentAccountConnectionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9837,17 +13684,17 @@ func awsAwsjson10_deserializeOpDocumentCreateEnvironmentTemplateVersionOutput(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateEnvironmentTemplateVersionOutput + var sv *GetEnvironmentAccountConnectionOutput if *v == nil { - sv = &CreateEnvironmentTemplateVersionOutput{} + sv = &GetEnvironmentAccountConnectionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "environmentTemplateVersion": - if err := awsAwsjson10_deserializeDocumentEnvironmentTemplateVersion(&sv.EnvironmentTemplateVersion, value); err != nil { + case "environmentAccountConnection": + if err := awsAwsjson10_deserializeDocumentEnvironmentAccountConnection(&sv.EnvironmentAccountConnection, value); err != nil { return err } @@ -9860,7 +13707,7 @@ func awsAwsjson10_deserializeOpDocumentCreateEnvironmentTemplateVersionOutput(v return nil } -func awsAwsjson10_deserializeOpDocumentCreateServiceOutput(v **CreateServiceOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentGetEnvironmentOutput(v **GetEnvironmentOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9873,17 +13720,17 @@ func awsAwsjson10_deserializeOpDocumentCreateServiceOutput(v **CreateServiceOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateServiceOutput + var sv *GetEnvironmentOutput if *v == nil { - sv = &CreateServiceOutput{} + sv = &GetEnvironmentOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "service": - if err := awsAwsjson10_deserializeDocumentService(&sv.Service, value); err != nil { + case "environment": + if err := awsAwsjson10_deserializeDocumentEnvironment(&sv.Environment, value); err != nil { return err } @@ -9896,7 +13743,7 @@ func awsAwsjson10_deserializeOpDocumentCreateServiceOutput(v **CreateServiceOutp return nil } -func awsAwsjson10_deserializeOpDocumentCreateServiceTemplateOutput(v **CreateServiceTemplateOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentGetEnvironmentTemplateOutput(v **GetEnvironmentTemplateOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9909,17 +13756,17 @@ func awsAwsjson10_deserializeOpDocumentCreateServiceTemplateOutput(v **CreateSer return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateServiceTemplateOutput + var sv *GetEnvironmentTemplateOutput if *v == nil { - sv = &CreateServiceTemplateOutput{} + sv = &GetEnvironmentTemplateOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "serviceTemplate": - if err := awsAwsjson10_deserializeDocumentServiceTemplate(&sv.ServiceTemplate, value); err != nil { + case "environmentTemplate": + if err := awsAwsjson10_deserializeDocumentEnvironmentTemplate(&sv.EnvironmentTemplate, value); err != nil { return err } @@ -9932,7 +13779,7 @@ func awsAwsjson10_deserializeOpDocumentCreateServiceTemplateOutput(v **CreateSer return nil } -func awsAwsjson10_deserializeOpDocumentCreateServiceTemplateVersionOutput(v **CreateServiceTemplateVersionOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentGetEnvironmentTemplateVersionOutput(v **GetEnvironmentTemplateVersionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9945,17 +13792,17 @@ func awsAwsjson10_deserializeOpDocumentCreateServiceTemplateVersionOutput(v **Cr return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateServiceTemplateVersionOutput + var sv *GetEnvironmentTemplateVersionOutput if *v == nil { - sv = &CreateServiceTemplateVersionOutput{} + sv = &GetEnvironmentTemplateVersionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "serviceTemplateVersion": - if err := awsAwsjson10_deserializeDocumentServiceTemplateVersion(&sv.ServiceTemplateVersion, value); err != nil { + case "environmentTemplateVersion": + if err := awsAwsjson10_deserializeDocumentEnvironmentTemplateVersion(&sv.EnvironmentTemplateVersion, value); err != nil { return err } @@ -9968,7 +13815,7 @@ func awsAwsjson10_deserializeOpDocumentCreateServiceTemplateVersionOutput(v **Cr return nil } -func awsAwsjson10_deserializeOpDocumentDeleteEnvironmentAccountConnectionOutput(v **DeleteEnvironmentAccountConnectionOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentGetRepositoryOutput(v **GetRepositoryOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9981,17 +13828,17 @@ func awsAwsjson10_deserializeOpDocumentDeleteEnvironmentAccountConnectionOutput( return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteEnvironmentAccountConnectionOutput + var sv *GetRepositoryOutput if *v == nil { - sv = &DeleteEnvironmentAccountConnectionOutput{} + sv = &GetRepositoryOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "environmentAccountConnection": - if err := awsAwsjson10_deserializeDocumentEnvironmentAccountConnection(&sv.EnvironmentAccountConnection, value); err != nil { + case "repository": + if err := awsAwsjson10_deserializeDocumentRepository(&sv.Repository, value); err != nil { return err } @@ -10004,7 +13851,7 @@ func awsAwsjson10_deserializeOpDocumentDeleteEnvironmentAccountConnectionOutput( return nil } -func awsAwsjson10_deserializeOpDocumentDeleteEnvironmentOutput(v **DeleteEnvironmentOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentGetRepositorySyncStatusOutput(v **GetRepositorySyncStatusOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10017,17 +13864,17 @@ func awsAwsjson10_deserializeOpDocumentDeleteEnvironmentOutput(v **DeleteEnviron return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteEnvironmentOutput + var sv *GetRepositorySyncStatusOutput if *v == nil { - sv = &DeleteEnvironmentOutput{} + sv = &GetRepositorySyncStatusOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "environment": - if err := awsAwsjson10_deserializeDocumentEnvironment(&sv.Environment, value); err != nil { + case "latestSync": + if err := awsAwsjson10_deserializeDocumentRepositorySyncAttempt(&sv.LatestSync, value); err != nil { return err } @@ -10040,7 +13887,7 @@ func awsAwsjson10_deserializeOpDocumentDeleteEnvironmentOutput(v **DeleteEnviron return nil } -func awsAwsjson10_deserializeOpDocumentDeleteEnvironmentTemplateOutput(v **DeleteEnvironmentTemplateOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentGetServiceInstanceOutput(v **GetServiceInstanceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10053,17 +13900,17 @@ func awsAwsjson10_deserializeOpDocumentDeleteEnvironmentTemplateOutput(v **Delet return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteEnvironmentTemplateOutput + var sv *GetServiceInstanceOutput if *v == nil { - sv = &DeleteEnvironmentTemplateOutput{} + sv = &GetServiceInstanceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "environmentTemplate": - if err := awsAwsjson10_deserializeDocumentEnvironmentTemplate(&sv.EnvironmentTemplate, value); err != nil { + case "serviceInstance": + if err := awsAwsjson10_deserializeDocumentServiceInstance(&sv.ServiceInstance, value); err != nil { return err } @@ -10076,7 +13923,7 @@ func awsAwsjson10_deserializeOpDocumentDeleteEnvironmentTemplateOutput(v **Delet return nil } -func awsAwsjson10_deserializeOpDocumentDeleteEnvironmentTemplateVersionOutput(v **DeleteEnvironmentTemplateVersionOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentGetServiceOutput(v **GetServiceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10089,17 +13936,17 @@ func awsAwsjson10_deserializeOpDocumentDeleteEnvironmentTemplateVersionOutput(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteEnvironmentTemplateVersionOutput + var sv *GetServiceOutput if *v == nil { - sv = &DeleteEnvironmentTemplateVersionOutput{} + sv = &GetServiceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "environmentTemplateVersion": - if err := awsAwsjson10_deserializeDocumentEnvironmentTemplateVersion(&sv.EnvironmentTemplateVersion, value); err != nil { + case "service": + if err := awsAwsjson10_deserializeDocumentService(&sv.Service, value); err != nil { return err } @@ -10112,7 +13959,7 @@ func awsAwsjson10_deserializeOpDocumentDeleteEnvironmentTemplateVersionOutput(v return nil } -func awsAwsjson10_deserializeOpDocumentDeleteServiceOutput(v **DeleteServiceOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentGetServiceTemplateOutput(v **GetServiceTemplateOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10125,17 +13972,17 @@ func awsAwsjson10_deserializeOpDocumentDeleteServiceOutput(v **DeleteServiceOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteServiceOutput + var sv *GetServiceTemplateOutput if *v == nil { - sv = &DeleteServiceOutput{} + sv = &GetServiceTemplateOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "service": - if err := awsAwsjson10_deserializeDocumentService(&sv.Service, value); err != nil { + case "serviceTemplate": + if err := awsAwsjson10_deserializeDocumentServiceTemplate(&sv.ServiceTemplate, value); err != nil { return err } @@ -10148,7 +13995,7 @@ func awsAwsjson10_deserializeOpDocumentDeleteServiceOutput(v **DeleteServiceOutp return nil } -func awsAwsjson10_deserializeOpDocumentDeleteServiceTemplateOutput(v **DeleteServiceTemplateOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentGetServiceTemplateVersionOutput(v **GetServiceTemplateVersionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10161,17 +14008,17 @@ func awsAwsjson10_deserializeOpDocumentDeleteServiceTemplateOutput(v **DeleteSer return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteServiceTemplateOutput + var sv *GetServiceTemplateVersionOutput if *v == nil { - sv = &DeleteServiceTemplateOutput{} + sv = &GetServiceTemplateVersionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "serviceTemplate": - if err := awsAwsjson10_deserializeDocumentServiceTemplate(&sv.ServiceTemplate, value); err != nil { + case "serviceTemplateVersion": + if err := awsAwsjson10_deserializeDocumentServiceTemplateVersion(&sv.ServiceTemplateVersion, value); err != nil { return err } @@ -10184,7 +14031,7 @@ func awsAwsjson10_deserializeOpDocumentDeleteServiceTemplateOutput(v **DeleteSer return nil } -func awsAwsjson10_deserializeOpDocumentDeleteServiceTemplateVersionOutput(v **DeleteServiceTemplateVersionOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentGetTemplateSyncConfigOutput(v **GetTemplateSyncConfigOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10197,17 +14044,17 @@ func awsAwsjson10_deserializeOpDocumentDeleteServiceTemplateVersionOutput(v **De return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteServiceTemplateVersionOutput + var sv *GetTemplateSyncConfigOutput if *v == nil { - sv = &DeleteServiceTemplateVersionOutput{} + sv = &GetTemplateSyncConfigOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "serviceTemplateVersion": - if err := awsAwsjson10_deserializeDocumentServiceTemplateVersion(&sv.ServiceTemplateVersion, value); err != nil { + case "templateSyncConfig": + if err := awsAwsjson10_deserializeDocumentTemplateSyncConfig(&sv.TemplateSyncConfig, value); err != nil { return err } @@ -10220,7 +14067,7 @@ func awsAwsjson10_deserializeOpDocumentDeleteServiceTemplateVersionOutput(v **De return nil } -func awsAwsjson10_deserializeOpDocumentGetAccountSettingsOutput(v **GetAccountSettingsOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentGetTemplateSyncStatusOutput(v **GetTemplateSyncStatusOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10233,17 +14080,27 @@ func awsAwsjson10_deserializeOpDocumentGetAccountSettingsOutput(v **GetAccountSe return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetAccountSettingsOutput + var sv *GetTemplateSyncStatusOutput if *v == nil { - sv = &GetAccountSettingsOutput{} + sv = &GetTemplateSyncStatusOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "accountSettings": - if err := awsAwsjson10_deserializeDocumentAccountSettings(&sv.AccountSettings, value); err != nil { + case "desiredState": + if err := awsAwsjson10_deserializeDocumentRevision(&sv.DesiredState, value); err != nil { + return err + } + + case "latestSuccessfulSync": + if err := awsAwsjson10_deserializeDocumentResourceSyncAttempt(&sv.LatestSuccessfulSync, value); err != nil { + return err + } + + case "latestSync": + if err := awsAwsjson10_deserializeDocumentResourceSyncAttempt(&sv.LatestSync, value); err != nil { return err } @@ -10256,7 +14113,7 @@ func awsAwsjson10_deserializeOpDocumentGetAccountSettingsOutput(v **GetAccountSe return nil } -func awsAwsjson10_deserializeOpDocumentGetEnvironmentAccountConnectionOutput(v **GetEnvironmentAccountConnectionOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentListEnvironmentAccountConnectionsOutput(v **ListEnvironmentAccountConnectionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10269,20 +14126,29 @@ func awsAwsjson10_deserializeOpDocumentGetEnvironmentAccountConnectionOutput(v * return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetEnvironmentAccountConnectionOutput + var sv *ListEnvironmentAccountConnectionsOutput if *v == nil { - sv = &GetEnvironmentAccountConnectionOutput{} + sv = &ListEnvironmentAccountConnectionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "environmentAccountConnection": - if err := awsAwsjson10_deserializeDocumentEnvironmentAccountConnection(&sv.EnvironmentAccountConnection, value); err != nil { + case "environmentAccountConnections": + if err := awsAwsjson10_deserializeDocumentEnvironmentAccountConnectionSummaryList(&sv.EnvironmentAccountConnections, value); err != nil { return err } + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + default: _, _ = key, value @@ -10292,7 +14158,7 @@ func awsAwsjson10_deserializeOpDocumentGetEnvironmentAccountConnectionOutput(v * return nil } -func awsAwsjson10_deserializeOpDocumentGetEnvironmentOutput(v **GetEnvironmentOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentListEnvironmentOutputsOutput(v **ListEnvironmentOutputsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10305,17 +14171,26 @@ func awsAwsjson10_deserializeOpDocumentGetEnvironmentOutput(v **GetEnvironmentOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetEnvironmentOutput + var sv *ListEnvironmentOutputsOutput if *v == nil { - sv = &GetEnvironmentOutput{} + sv = &ListEnvironmentOutputsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "environment": - if err := awsAwsjson10_deserializeDocumentEnvironment(&sv.Environment, value); err != nil { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EmptyNextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "outputs": + if err := awsAwsjson10_deserializeDocumentOutputsList(&sv.Outputs, value); err != nil { return err } @@ -10328,7 +14203,7 @@ func awsAwsjson10_deserializeOpDocumentGetEnvironmentOutput(v **GetEnvironmentOu return nil } -func awsAwsjson10_deserializeOpDocumentGetEnvironmentTemplateOutput(v **GetEnvironmentTemplateOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentListEnvironmentProvisionedResourcesOutput(v **ListEnvironmentProvisionedResourcesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10341,17 +14216,26 @@ func awsAwsjson10_deserializeOpDocumentGetEnvironmentTemplateOutput(v **GetEnvir return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetEnvironmentTemplateOutput + var sv *ListEnvironmentProvisionedResourcesOutput if *v == nil { - sv = &GetEnvironmentTemplateOutput{} + sv = &ListEnvironmentProvisionedResourcesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "environmentTemplate": - if err := awsAwsjson10_deserializeDocumentEnvironmentTemplate(&sv.EnvironmentTemplate, value); err != nil { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EmptyNextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "provisionedResources": + if err := awsAwsjson10_deserializeDocumentProvisionedResourceList(&sv.ProvisionedResources, value); err != nil { return err } @@ -10364,7 +14248,7 @@ func awsAwsjson10_deserializeOpDocumentGetEnvironmentTemplateOutput(v **GetEnvir return nil } -func awsAwsjson10_deserializeOpDocumentGetEnvironmentTemplateVersionOutput(v **GetEnvironmentTemplateVersionOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentListEnvironmentsOutput(v **ListEnvironmentsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10377,20 +14261,29 @@ func awsAwsjson10_deserializeOpDocumentGetEnvironmentTemplateVersionOutput(v **G return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetEnvironmentTemplateVersionOutput + var sv *ListEnvironmentsOutput if *v == nil { - sv = &GetEnvironmentTemplateVersionOutput{} + sv = &ListEnvironmentsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "environmentTemplateVersion": - if err := awsAwsjson10_deserializeDocumentEnvironmentTemplateVersion(&sv.EnvironmentTemplateVersion, value); err != nil { + case "environments": + if err := awsAwsjson10_deserializeDocumentEnvironmentSummaryList(&sv.Environments, value); err != nil { return err } + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + default: _, _ = key, value @@ -10400,7 +14293,7 @@ func awsAwsjson10_deserializeOpDocumentGetEnvironmentTemplateVersionOutput(v **G return nil } -func awsAwsjson10_deserializeOpDocumentGetServiceInstanceOutput(v **GetServiceInstanceOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentListEnvironmentTemplatesOutput(v **ListEnvironmentTemplatesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10413,17 +14306,26 @@ func awsAwsjson10_deserializeOpDocumentGetServiceInstanceOutput(v **GetServiceIn return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetServiceInstanceOutput + var sv *ListEnvironmentTemplatesOutput if *v == nil { - sv = &GetServiceInstanceOutput{} + sv = &ListEnvironmentTemplatesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "serviceInstance": - if err := awsAwsjson10_deserializeDocumentServiceInstance(&sv.ServiceInstance, value); err != nil { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "templates": + if err := awsAwsjson10_deserializeDocumentEnvironmentTemplateSummaryList(&sv.Templates, value); err != nil { return err } @@ -10436,7 +14338,7 @@ func awsAwsjson10_deserializeOpDocumentGetServiceInstanceOutput(v **GetServiceIn return nil } -func awsAwsjson10_deserializeOpDocumentGetServiceOutput(v **GetServiceOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentListEnvironmentTemplateVersionsOutput(v **ListEnvironmentTemplateVersionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10449,17 +14351,26 @@ func awsAwsjson10_deserializeOpDocumentGetServiceOutput(v **GetServiceOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetServiceOutput + var sv *ListEnvironmentTemplateVersionsOutput if *v == nil { - sv = &GetServiceOutput{} + sv = &ListEnvironmentTemplateVersionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "service": - if err := awsAwsjson10_deserializeDocumentService(&sv.Service, value); err != nil { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "templateVersions": + if err := awsAwsjson10_deserializeDocumentEnvironmentTemplateVersionSummaryList(&sv.TemplateVersions, value); err != nil { return err } @@ -10472,7 +14383,7 @@ func awsAwsjson10_deserializeOpDocumentGetServiceOutput(v **GetServiceOutput, va return nil } -func awsAwsjson10_deserializeOpDocumentGetServiceTemplateOutput(v **GetServiceTemplateOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentListRepositoriesOutput(v **ListRepositoriesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10485,17 +14396,26 @@ func awsAwsjson10_deserializeOpDocumentGetServiceTemplateOutput(v **GetServiceTe return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetServiceTemplateOutput + var sv *ListRepositoriesOutput if *v == nil { - sv = &GetServiceTemplateOutput{} + sv = &ListRepositoriesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "serviceTemplate": - if err := awsAwsjson10_deserializeDocumentServiceTemplate(&sv.ServiceTemplate, value); err != nil { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "repositories": + if err := awsAwsjson10_deserializeDocumentRepositorySummaryList(&sv.Repositories, value); err != nil { return err } @@ -10508,7 +14428,7 @@ func awsAwsjson10_deserializeOpDocumentGetServiceTemplateOutput(v **GetServiceTe return nil } -func awsAwsjson10_deserializeOpDocumentGetServiceTemplateVersionOutput(v **GetServiceTemplateVersionOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentListRepositorySyncDefinitionsOutput(v **ListRepositorySyncDefinitionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10521,17 +14441,26 @@ func awsAwsjson10_deserializeOpDocumentGetServiceTemplateVersionOutput(v **GetSe return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetServiceTemplateVersionOutput + var sv *ListRepositorySyncDefinitionsOutput if *v == nil { - sv = &GetServiceTemplateVersionOutput{} + sv = &ListRepositorySyncDefinitionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "serviceTemplateVersion": - if err := awsAwsjson10_deserializeDocumentServiceTemplateVersion(&sv.ServiceTemplateVersion, value); err != nil { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EmptyNextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "syncDefinitions": + if err := awsAwsjson10_deserializeDocumentRepositorySyncDefinitionList(&sv.SyncDefinitions, value); err != nil { return err } @@ -10544,7 +14473,7 @@ func awsAwsjson10_deserializeOpDocumentGetServiceTemplateVersionOutput(v **GetSe return nil } -func awsAwsjson10_deserializeOpDocumentListEnvironmentAccountConnectionsOutput(v **ListEnvironmentAccountConnectionsOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentListServiceInstanceOutputsOutput(v **ListServiceInstanceOutputsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10557,29 +14486,29 @@ func awsAwsjson10_deserializeOpDocumentListEnvironmentAccountConnectionsOutput(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListEnvironmentAccountConnectionsOutput + var sv *ListServiceInstanceOutputsOutput if *v == nil { - sv = &ListEnvironmentAccountConnectionsOutput{} + sv = &ListServiceInstanceOutputsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "environmentAccountConnections": - if err := awsAwsjson10_deserializeDocumentEnvironmentAccountConnectionSummaryList(&sv.EnvironmentAccountConnections, value); err != nil { - return err - } - case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + return fmt.Errorf("expected EmptyNextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } + case "outputs": + if err := awsAwsjson10_deserializeDocumentOutputsList(&sv.Outputs, value); err != nil { + return err + } + default: _, _ = key, value @@ -10589,7 +14518,7 @@ func awsAwsjson10_deserializeOpDocumentListEnvironmentAccountConnectionsOutput(v return nil } -func awsAwsjson10_deserializeOpDocumentListEnvironmentsOutput(v **ListEnvironmentsOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentListServiceInstanceProvisionedResourcesOutput(v **ListServiceInstanceProvisionedResourcesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10602,29 +14531,29 @@ func awsAwsjson10_deserializeOpDocumentListEnvironmentsOutput(v **ListEnvironmen return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListEnvironmentsOutput + var sv *ListServiceInstanceProvisionedResourcesOutput if *v == nil { - sv = &ListEnvironmentsOutput{} + sv = &ListServiceInstanceProvisionedResourcesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "environments": - if err := awsAwsjson10_deserializeDocumentEnvironmentSummaryList(&sv.Environments, value); err != nil { - return err - } - case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + return fmt.Errorf("expected EmptyNextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } + case "provisionedResources": + if err := awsAwsjson10_deserializeDocumentProvisionedResourceList(&sv.ProvisionedResources, value); err != nil { + return err + } + default: _, _ = key, value @@ -10634,7 +14563,7 @@ func awsAwsjson10_deserializeOpDocumentListEnvironmentsOutput(v **ListEnvironmen return nil } -func awsAwsjson10_deserializeOpDocumentListEnvironmentTemplatesOutput(v **ListEnvironmentTemplatesOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentListServiceInstancesOutput(v **ListServiceInstancesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10647,9 +14576,9 @@ func awsAwsjson10_deserializeOpDocumentListEnvironmentTemplatesOutput(v **ListEn return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListEnvironmentTemplatesOutput + var sv *ListServiceInstancesOutput if *v == nil { - sv = &ListEnvironmentTemplatesOutput{} + sv = &ListServiceInstancesOutput{} } else { sv = *v } @@ -10665,8 +14594,8 @@ func awsAwsjson10_deserializeOpDocumentListEnvironmentTemplatesOutput(v **ListEn sv.NextToken = ptr.String(jtv) } - case "templates": - if err := awsAwsjson10_deserializeDocumentEnvironmentTemplateSummaryList(&sv.Templates, value); err != nil { + case "serviceInstances": + if err := awsAwsjson10_deserializeDocumentServiceInstanceSummaryList(&sv.ServiceInstances, value); err != nil { return err } @@ -10679,7 +14608,7 @@ func awsAwsjson10_deserializeOpDocumentListEnvironmentTemplatesOutput(v **ListEn return nil } -func awsAwsjson10_deserializeOpDocumentListEnvironmentTemplateVersionsOutput(v **ListEnvironmentTemplateVersionsOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentListServicePipelineOutputsOutput(v **ListServicePipelineOutputsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10692,9 +14621,9 @@ func awsAwsjson10_deserializeOpDocumentListEnvironmentTemplateVersionsOutput(v * return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListEnvironmentTemplateVersionsOutput + var sv *ListServicePipelineOutputsOutput if *v == nil { - sv = &ListEnvironmentTemplateVersionsOutput{} + sv = &ListServicePipelineOutputsOutput{} } else { sv = *v } @@ -10705,13 +14634,13 @@ func awsAwsjson10_deserializeOpDocumentListEnvironmentTemplateVersionsOutput(v * if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + return fmt.Errorf("expected EmptyNextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } - case "templateVersions": - if err := awsAwsjson10_deserializeDocumentEnvironmentTemplateVersionSummaryList(&sv.TemplateVersions, value); err != nil { + case "outputs": + if err := awsAwsjson10_deserializeDocumentOutputsList(&sv.Outputs, value); err != nil { return err } @@ -10724,7 +14653,7 @@ func awsAwsjson10_deserializeOpDocumentListEnvironmentTemplateVersionsOutput(v * return nil } -func awsAwsjson10_deserializeOpDocumentListServiceInstancesOutput(v **ListServiceInstancesOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentListServicePipelineProvisionedResourcesOutput(v **ListServicePipelineProvisionedResourcesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10737,9 +14666,9 @@ func awsAwsjson10_deserializeOpDocumentListServiceInstancesOutput(v **ListServic return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListServiceInstancesOutput + var sv *ListServicePipelineProvisionedResourcesOutput if *v == nil { - sv = &ListServiceInstancesOutput{} + sv = &ListServicePipelineProvisionedResourcesOutput{} } else { sv = *v } @@ -10750,13 +14679,13 @@ func awsAwsjson10_deserializeOpDocumentListServiceInstancesOutput(v **ListServic if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + return fmt.Errorf("expected EmptyNextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } - case "serviceInstances": - if err := awsAwsjson10_deserializeDocumentServiceInstanceSummaryList(&sv.ServiceInstances, value); err != nil { + case "provisionedResources": + if err := awsAwsjson10_deserializeDocumentProvisionedResourceList(&sv.ProvisionedResources, value); err != nil { return err } @@ -10949,6 +14878,37 @@ func awsAwsjson10_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return nil } +func awsAwsjson10_deserializeOpDocumentNotifyResourceDeploymentStatusChangeOutput(v **NotifyResourceDeploymentStatusChangeOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *NotifyResourceDeploymentStatusChangeOutput + if *v == nil { + sv = &NotifyResourceDeploymentStatusChangeOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentRejectEnvironmentAccountConnectionOutput(v **RejectEnvironmentAccountConnectionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -11406,3 +15366,39 @@ func awsAwsjson10_deserializeOpDocumentUpdateServiceTemplateVersionOutput(v **Up *v = sv return nil } + +func awsAwsjson10_deserializeOpDocumentUpdateTemplateSyncConfigOutput(v **UpdateTemplateSyncConfigOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateTemplateSyncConfigOutput + if *v == nil { + sv = &UpdateTemplateSyncConfigOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "templateSyncConfig": + if err := awsAwsjson10_deserializeDocumentTemplateSyncConfig(&sv.TemplateSyncConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} diff --git a/service/proton/doc.go b/service/proton/doc.go index 547cc90dcca..b74b0b2da67 100644 --- a/service/proton/doc.go +++ b/service/proton/doc.go @@ -3,30 +3,31 @@ // Package proton provides the API client, operations, and parameter types for AWS // Proton. // -// This is the AWS Proton Service API Reference. It provides descriptions, syntax -// and usage examples for each of the actions +// This is the Proton Service API Reference. It provides descriptions, syntax and +// usage examples for each of the actions // (https://docs.aws.amazon.com/proton/latest/APIReference/API_Operations.html) and // data types // (https://docs.aws.amazon.com/proton/latest/APIReference/API_Types.html) for the -// AWS Proton service. The documentation for each action shows the Query API -// request parameters and the XML response. Alternatively, you can use the AWS CLI -// to access an API. For more information, see the AWS Command Line Interface User -// Guide (https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html). -// The AWS Proton service is a two-pronged automation framework. Administrators -// create service templates to provide standardized infrastructure and deployment -// tooling for serverless and container based applications. Developers, in turn, -// select from the available service templates to automate their application or -// service deployments. Because administrators define the infrastructure and -// tooling that AWS Proton deploys and manages, they need permissions to use all of -// the listed API operations. When developers select a specific infrastructure and -// tooling set, AWS Proton deploys their applications. To monitor their -// applications that are running on AWS Proton, developers need permissions to the -// service create, list, update and delete API operations and the service instance -// list and update API operations. To learn more about AWS Proton administration, -// see the AWS Proton Administrator Guide +// Proton service. The documentation for each action shows the Query API request +// parameters and the XML response. Alternatively, you can use the Amazon Web +// Services CLI to access an API. For more information, see the Amazon Web Services +// Command Line Interface User Guide +// (https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html). The +// Proton service is a two-pronged automation framework. Administrators create +// service templates to provide standardized infrastructure and deployment tooling +// for serverless and container based applications. Developers, in turn, select +// from the available service templates to automate their application or service +// deployments. Because administrators define the infrastructure and tooling that +// Proton deploys and manages, they need permissions to use all of the listed API +// operations. When developers select a specific infrastructure and tooling set, +// Proton deploys their applications. To monitor their applications that are +// running on Proton, developers need permissions to the service create, list, +// update and delete API operations and the service instance list and update API +// operations. To learn more about Proton administration, see the Proton +// Administrator Guide // (https://docs.aws.amazon.com/proton/latest/adminguide/Welcome.html). To learn -// more about deploying serverless and containerized applications on AWS Proton, -// see the AWS Proton User Guide +// more about deploying serverless and containerized applications on Proton, see +// the Proton User Guide // (https://docs.aws.amazon.com/proton/latest/userguide/Welcome.html). Ensuring // Idempotency When you make a mutating API request, the request typically returns // a result before the asynchronous workflows of the operation are complete. @@ -43,22 +44,22 @@ // contain updated information, such as the current creation status. The following // lists of APIs are grouped according to methods that ensure idempotency. // Idempotent create APIs with a client token The API actions in this list support -// idempotency with the use of a client token. The corresponding AWS CLI commands -// also support idempotency using a client token. A client token is a unique, -// case-sensitive string of up to 64 ASCII characters. To make an idempotent API -// request using one of these actions, specify a client token in the request. We -// recommend that you don't reuse the same client token for other API requests. If -// you don’t provide a client token for these APIs, a default client token is -// automatically provided by SDKs. Given a request action that has succeeded: If -// you retry the request using the same client token and the same parameters, the -// retry succeeds without performing any further actions other than returning the -// original resource detail data in the response. If you retry the request using -// the same client token, but one or more of the parameters are different, the -// retry throws a ValidationException with an IdempotentParameterMismatch error. -// Client tokens expire eight hours after a request is made. If you retry the -// request with the expired token, a new resource is created. If the original -// resource is deleted and you retry the request, a new resource is created. -// Idempotent create APIs with a client token: +// idempotency with the use of a client token. The corresponding Amazon Web +// Services CLI commands also support idempotency using a client token. A client +// token is a unique, case-sensitive string of up to 64 ASCII characters. To make +// an idempotent API request using one of these actions, specify a client token in +// the request. We recommend that you don't reuse the same client token for other +// API requests. If you don’t provide a client token for these APIs, a default +// client token is automatically provided by SDKs. Given a request action that has +// succeeded: If you retry the request using the same client token and the same +// parameters, the retry succeeds without performing any further actions other than +// returning the original resource detail data in the response. If you retry the +// request using the same client token, but one or more of the parameters are +// different, the retry throws a ValidationException with an +// IdempotentParameterMismatch error. Client tokens expire eight hours after a +// request is made. If you retry the request with the expired token, a new resource +// is created. If the original resource is deleted and you retry the request, a new +// resource is created. Idempotent create APIs with a client token: // // * // CreateEnvironmentTemplateVersion diff --git a/service/proton/generated.json b/service/proton/generated.json index 74c0b0faa78..07305f31cad 100644 --- a/service/proton/generated.json +++ b/service/proton/generated.json @@ -16,34 +16,51 @@ "api_op_CreateEnvironmentAccountConnection.go", "api_op_CreateEnvironmentTemplate.go", "api_op_CreateEnvironmentTemplateVersion.go", + "api_op_CreateRepository.go", "api_op_CreateService.go", "api_op_CreateServiceTemplate.go", "api_op_CreateServiceTemplateVersion.go", + "api_op_CreateTemplateSyncConfig.go", "api_op_DeleteEnvironment.go", "api_op_DeleteEnvironmentAccountConnection.go", "api_op_DeleteEnvironmentTemplate.go", "api_op_DeleteEnvironmentTemplateVersion.go", + "api_op_DeleteRepository.go", "api_op_DeleteService.go", "api_op_DeleteServiceTemplate.go", "api_op_DeleteServiceTemplateVersion.go", + "api_op_DeleteTemplateSyncConfig.go", "api_op_GetAccountSettings.go", "api_op_GetEnvironment.go", "api_op_GetEnvironmentAccountConnection.go", "api_op_GetEnvironmentTemplate.go", "api_op_GetEnvironmentTemplateVersion.go", + "api_op_GetRepository.go", + "api_op_GetRepositorySyncStatus.go", "api_op_GetService.go", "api_op_GetServiceInstance.go", "api_op_GetServiceTemplate.go", "api_op_GetServiceTemplateVersion.go", + "api_op_GetTemplateSyncConfig.go", + "api_op_GetTemplateSyncStatus.go", "api_op_ListEnvironmentAccountConnections.go", + "api_op_ListEnvironmentOutputs.go", + "api_op_ListEnvironmentProvisionedResources.go", "api_op_ListEnvironmentTemplateVersions.go", "api_op_ListEnvironmentTemplates.go", "api_op_ListEnvironments.go", + "api_op_ListRepositories.go", + "api_op_ListRepositorySyncDefinitions.go", + "api_op_ListServiceInstanceOutputs.go", + "api_op_ListServiceInstanceProvisionedResources.go", "api_op_ListServiceInstances.go", + "api_op_ListServicePipelineOutputs.go", + "api_op_ListServicePipelineProvisionedResources.go", "api_op_ListServiceTemplateVersions.go", "api_op_ListServiceTemplates.go", "api_op_ListServices.go", "api_op_ListTagsForResource.go", + "api_op_NotifyResourceDeploymentStatusChange.go", "api_op_RejectEnvironmentAccountConnection.go", "api_op_TagResource.go", "api_op_UntagResource.go", @@ -57,6 +74,7 @@ "api_op_UpdateServicePipeline.go", "api_op_UpdateServiceTemplate.go", "api_op_UpdateServiceTemplateVersion.go", + "api_op_UpdateTemplateSyncConfig.go", "deserializers.go", "doc.go", "endpoints.go", diff --git a/service/proton/serializers.go b/service/proton/serializers.go index fd561ea245d..df6fb11de71 100644 --- a/service/proton/serializers.go +++ b/service/proton/serializers.go @@ -455,14 +455,14 @@ func (m *awsAwsjson10_serializeOpCreateEnvironmentTemplateVersion) HandleSeriali return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpCreateService struct { +type awsAwsjson10_serializeOpCreateRepository struct { } -func (*awsAwsjson10_serializeOpCreateService) ID() string { +func (*awsAwsjson10_serializeOpCreateRepository) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpCreateService) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpCreateRepository) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -470,7 +470,7 @@ func (m *awsAwsjson10_serializeOpCreateService) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateServiceInput) + input, ok := in.Parameters.(*CreateRepositoryInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -491,10 +491,10 @@ func (m *awsAwsjson10_serializeOpCreateService) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.CreateService") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.CreateRepository") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentCreateServiceInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentCreateRepositoryInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -510,14 +510,14 @@ func (m *awsAwsjson10_serializeOpCreateService) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpCreateServiceTemplate struct { +type awsAwsjson10_serializeOpCreateService struct { } -func (*awsAwsjson10_serializeOpCreateServiceTemplate) ID() string { +func (*awsAwsjson10_serializeOpCreateService) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpCreateServiceTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpCreateService) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -525,7 +525,7 @@ func (m *awsAwsjson10_serializeOpCreateServiceTemplate) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateServiceTemplateInput) + input, ok := in.Parameters.(*CreateServiceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -546,10 +546,10 @@ func (m *awsAwsjson10_serializeOpCreateServiceTemplate) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.CreateServiceTemplate") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.CreateService") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentCreateServiceTemplateInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentCreateServiceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -565,14 +565,14 @@ func (m *awsAwsjson10_serializeOpCreateServiceTemplate) HandleSerialize(ctx cont return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpCreateServiceTemplateVersion struct { +type awsAwsjson10_serializeOpCreateServiceTemplate struct { } -func (*awsAwsjson10_serializeOpCreateServiceTemplateVersion) ID() string { +func (*awsAwsjson10_serializeOpCreateServiceTemplate) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpCreateServiceTemplateVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpCreateServiceTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -580,7 +580,7 @@ func (m *awsAwsjson10_serializeOpCreateServiceTemplateVersion) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateServiceTemplateVersionInput) + input, ok := in.Parameters.(*CreateServiceTemplateInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -601,10 +601,10 @@ func (m *awsAwsjson10_serializeOpCreateServiceTemplateVersion) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.CreateServiceTemplateVersion") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.CreateServiceTemplate") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentCreateServiceTemplateVersionInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentCreateServiceTemplateInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -620,14 +620,14 @@ func (m *awsAwsjson10_serializeOpCreateServiceTemplateVersion) HandleSerialize(c return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpDeleteEnvironment struct { +type awsAwsjson10_serializeOpCreateServiceTemplateVersion struct { } -func (*awsAwsjson10_serializeOpDeleteEnvironment) ID() string { +func (*awsAwsjson10_serializeOpCreateServiceTemplateVersion) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpDeleteEnvironment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpCreateServiceTemplateVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -635,7 +635,7 @@ func (m *awsAwsjson10_serializeOpDeleteEnvironment) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteEnvironmentInput) + input, ok := in.Parameters.(*CreateServiceTemplateVersionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -656,10 +656,10 @@ func (m *awsAwsjson10_serializeOpDeleteEnvironment) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.DeleteEnvironment") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.CreateServiceTemplateVersion") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentDeleteEnvironmentInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentCreateServiceTemplateVersionInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -675,14 +675,14 @@ func (m *awsAwsjson10_serializeOpDeleteEnvironment) HandleSerialize(ctx context. return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpDeleteEnvironmentAccountConnection struct { +type awsAwsjson10_serializeOpCreateTemplateSyncConfig struct { } -func (*awsAwsjson10_serializeOpDeleteEnvironmentAccountConnection) ID() string { +func (*awsAwsjson10_serializeOpCreateTemplateSyncConfig) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpDeleteEnvironmentAccountConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpCreateTemplateSyncConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -690,7 +690,7 @@ func (m *awsAwsjson10_serializeOpDeleteEnvironmentAccountConnection) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteEnvironmentAccountConnectionInput) + input, ok := in.Parameters.(*CreateTemplateSyncConfigInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -711,10 +711,10 @@ func (m *awsAwsjson10_serializeOpDeleteEnvironmentAccountConnection) HandleSeria return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.DeleteEnvironmentAccountConnection") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.CreateTemplateSyncConfig") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentDeleteEnvironmentAccountConnectionInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentCreateTemplateSyncConfigInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -730,14 +730,14 @@ func (m *awsAwsjson10_serializeOpDeleteEnvironmentAccountConnection) HandleSeria return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpDeleteEnvironmentTemplate struct { +type awsAwsjson10_serializeOpDeleteEnvironment struct { } -func (*awsAwsjson10_serializeOpDeleteEnvironmentTemplate) ID() string { +func (*awsAwsjson10_serializeOpDeleteEnvironment) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpDeleteEnvironmentTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpDeleteEnvironment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -745,7 +745,7 @@ func (m *awsAwsjson10_serializeOpDeleteEnvironmentTemplate) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteEnvironmentTemplateInput) + input, ok := in.Parameters.(*DeleteEnvironmentInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -766,10 +766,10 @@ func (m *awsAwsjson10_serializeOpDeleteEnvironmentTemplate) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.DeleteEnvironmentTemplate") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.DeleteEnvironment") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentDeleteEnvironmentTemplateInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentDeleteEnvironmentInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -785,14 +785,14 @@ func (m *awsAwsjson10_serializeOpDeleteEnvironmentTemplate) HandleSerialize(ctx return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpDeleteEnvironmentTemplateVersion struct { +type awsAwsjson10_serializeOpDeleteEnvironmentAccountConnection struct { } -func (*awsAwsjson10_serializeOpDeleteEnvironmentTemplateVersion) ID() string { +func (*awsAwsjson10_serializeOpDeleteEnvironmentAccountConnection) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpDeleteEnvironmentTemplateVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpDeleteEnvironmentAccountConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -800,7 +800,7 @@ func (m *awsAwsjson10_serializeOpDeleteEnvironmentTemplateVersion) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteEnvironmentTemplateVersionInput) + input, ok := in.Parameters.(*DeleteEnvironmentAccountConnectionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -821,10 +821,10 @@ func (m *awsAwsjson10_serializeOpDeleteEnvironmentTemplateVersion) HandleSeriali return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.DeleteEnvironmentTemplateVersion") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.DeleteEnvironmentAccountConnection") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentDeleteEnvironmentTemplateVersionInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentDeleteEnvironmentAccountConnectionInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -840,14 +840,14 @@ func (m *awsAwsjson10_serializeOpDeleteEnvironmentTemplateVersion) HandleSeriali return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpDeleteService struct { +type awsAwsjson10_serializeOpDeleteEnvironmentTemplate struct { } -func (*awsAwsjson10_serializeOpDeleteService) ID() string { +func (*awsAwsjson10_serializeOpDeleteEnvironmentTemplate) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpDeleteService) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpDeleteEnvironmentTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -855,7 +855,7 @@ func (m *awsAwsjson10_serializeOpDeleteService) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteServiceInput) + input, ok := in.Parameters.(*DeleteEnvironmentTemplateInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -876,10 +876,10 @@ func (m *awsAwsjson10_serializeOpDeleteService) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.DeleteService") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.DeleteEnvironmentTemplate") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentDeleteServiceInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentDeleteEnvironmentTemplateInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -895,14 +895,14 @@ func (m *awsAwsjson10_serializeOpDeleteService) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpDeleteServiceTemplate struct { +type awsAwsjson10_serializeOpDeleteEnvironmentTemplateVersion struct { } -func (*awsAwsjson10_serializeOpDeleteServiceTemplate) ID() string { +func (*awsAwsjson10_serializeOpDeleteEnvironmentTemplateVersion) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpDeleteServiceTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpDeleteEnvironmentTemplateVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -910,7 +910,7 @@ func (m *awsAwsjson10_serializeOpDeleteServiceTemplate) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteServiceTemplateInput) + input, ok := in.Parameters.(*DeleteEnvironmentTemplateVersionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -931,10 +931,10 @@ func (m *awsAwsjson10_serializeOpDeleteServiceTemplate) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.DeleteServiceTemplate") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.DeleteEnvironmentTemplateVersion") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentDeleteServiceTemplateInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentDeleteEnvironmentTemplateVersionInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -950,14 +950,14 @@ func (m *awsAwsjson10_serializeOpDeleteServiceTemplate) HandleSerialize(ctx cont return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpDeleteServiceTemplateVersion struct { +type awsAwsjson10_serializeOpDeleteRepository struct { } -func (*awsAwsjson10_serializeOpDeleteServiceTemplateVersion) ID() string { +func (*awsAwsjson10_serializeOpDeleteRepository) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpDeleteServiceTemplateVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpDeleteRepository) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -965,7 +965,7 @@ func (m *awsAwsjson10_serializeOpDeleteServiceTemplateVersion) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteServiceTemplateVersionInput) + input, ok := in.Parameters.(*DeleteRepositoryInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -986,10 +986,10 @@ func (m *awsAwsjson10_serializeOpDeleteServiceTemplateVersion) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.DeleteServiceTemplateVersion") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.DeleteRepository") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentDeleteServiceTemplateVersionInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentDeleteRepositoryInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1005,14 +1005,14 @@ func (m *awsAwsjson10_serializeOpDeleteServiceTemplateVersion) HandleSerialize(c return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpGetAccountSettings struct { +type awsAwsjson10_serializeOpDeleteService struct { } -func (*awsAwsjson10_serializeOpGetAccountSettings) ID() string { +func (*awsAwsjson10_serializeOpDeleteService) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpGetAccountSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpDeleteService) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1020,7 +1020,7 @@ func (m *awsAwsjson10_serializeOpGetAccountSettings) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetAccountSettingsInput) + input, ok := in.Parameters.(*DeleteServiceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1041,10 +1041,10 @@ func (m *awsAwsjson10_serializeOpGetAccountSettings) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetAccountSettings") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.DeleteService") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentGetAccountSettingsInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentDeleteServiceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1060,14 +1060,14 @@ func (m *awsAwsjson10_serializeOpGetAccountSettings) HandleSerialize(ctx context return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpGetEnvironment struct { +type awsAwsjson10_serializeOpDeleteServiceTemplate struct { } -func (*awsAwsjson10_serializeOpGetEnvironment) ID() string { +func (*awsAwsjson10_serializeOpDeleteServiceTemplate) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpGetEnvironment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpDeleteServiceTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1075,7 +1075,7 @@ func (m *awsAwsjson10_serializeOpGetEnvironment) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetEnvironmentInput) + input, ok := in.Parameters.(*DeleteServiceTemplateInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1096,10 +1096,10 @@ func (m *awsAwsjson10_serializeOpGetEnvironment) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetEnvironment") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.DeleteServiceTemplate") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentGetEnvironmentInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentDeleteServiceTemplateInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1115,14 +1115,14 @@ func (m *awsAwsjson10_serializeOpGetEnvironment) HandleSerialize(ctx context.Con return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpGetEnvironmentAccountConnection struct { +type awsAwsjson10_serializeOpDeleteServiceTemplateVersion struct { } -func (*awsAwsjson10_serializeOpGetEnvironmentAccountConnection) ID() string { +func (*awsAwsjson10_serializeOpDeleteServiceTemplateVersion) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpGetEnvironmentAccountConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpDeleteServiceTemplateVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1130,7 +1130,7 @@ func (m *awsAwsjson10_serializeOpGetEnvironmentAccountConnection) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetEnvironmentAccountConnectionInput) + input, ok := in.Parameters.(*DeleteServiceTemplateVersionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1151,10 +1151,10 @@ func (m *awsAwsjson10_serializeOpGetEnvironmentAccountConnection) HandleSerializ return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetEnvironmentAccountConnection") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.DeleteServiceTemplateVersion") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentGetEnvironmentAccountConnectionInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentDeleteServiceTemplateVersionInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1170,14 +1170,14 @@ func (m *awsAwsjson10_serializeOpGetEnvironmentAccountConnection) HandleSerializ return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpGetEnvironmentTemplate struct { +type awsAwsjson10_serializeOpDeleteTemplateSyncConfig struct { } -func (*awsAwsjson10_serializeOpGetEnvironmentTemplate) ID() string { +func (*awsAwsjson10_serializeOpDeleteTemplateSyncConfig) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpGetEnvironmentTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpDeleteTemplateSyncConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1185,7 +1185,7 @@ func (m *awsAwsjson10_serializeOpGetEnvironmentTemplate) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetEnvironmentTemplateInput) + input, ok := in.Parameters.(*DeleteTemplateSyncConfigInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1206,10 +1206,10 @@ func (m *awsAwsjson10_serializeOpGetEnvironmentTemplate) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetEnvironmentTemplate") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.DeleteTemplateSyncConfig") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentGetEnvironmentTemplateInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentDeleteTemplateSyncConfigInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1225,14 +1225,14 @@ func (m *awsAwsjson10_serializeOpGetEnvironmentTemplate) HandleSerialize(ctx con return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpGetEnvironmentTemplateVersion struct { +type awsAwsjson10_serializeOpGetAccountSettings struct { } -func (*awsAwsjson10_serializeOpGetEnvironmentTemplateVersion) ID() string { +func (*awsAwsjson10_serializeOpGetAccountSettings) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpGetEnvironmentTemplateVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpGetAccountSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1240,7 +1240,7 @@ func (m *awsAwsjson10_serializeOpGetEnvironmentTemplateVersion) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetEnvironmentTemplateVersionInput) + input, ok := in.Parameters.(*GetAccountSettingsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1261,10 +1261,10 @@ func (m *awsAwsjson10_serializeOpGetEnvironmentTemplateVersion) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetEnvironmentTemplateVersion") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetAccountSettings") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentGetEnvironmentTemplateVersionInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentGetAccountSettingsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1280,14 +1280,14 @@ func (m *awsAwsjson10_serializeOpGetEnvironmentTemplateVersion) HandleSerialize( return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpGetService struct { +type awsAwsjson10_serializeOpGetEnvironment struct { } -func (*awsAwsjson10_serializeOpGetService) ID() string { +func (*awsAwsjson10_serializeOpGetEnvironment) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpGetService) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpGetEnvironment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1295,7 +1295,7 @@ func (m *awsAwsjson10_serializeOpGetService) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetServiceInput) + input, ok := in.Parameters.(*GetEnvironmentInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1316,10 +1316,10 @@ func (m *awsAwsjson10_serializeOpGetService) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetService") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetEnvironment") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentGetServiceInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentGetEnvironmentInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1335,14 +1335,14 @@ func (m *awsAwsjson10_serializeOpGetService) HandleSerialize(ctx context.Context return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpGetServiceInstance struct { +type awsAwsjson10_serializeOpGetEnvironmentAccountConnection struct { } -func (*awsAwsjson10_serializeOpGetServiceInstance) ID() string { +func (*awsAwsjson10_serializeOpGetEnvironmentAccountConnection) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpGetServiceInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpGetEnvironmentAccountConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1350,7 +1350,7 @@ func (m *awsAwsjson10_serializeOpGetServiceInstance) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetServiceInstanceInput) + input, ok := in.Parameters.(*GetEnvironmentAccountConnectionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1371,10 +1371,10 @@ func (m *awsAwsjson10_serializeOpGetServiceInstance) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetServiceInstance") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetEnvironmentAccountConnection") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentGetServiceInstanceInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentGetEnvironmentAccountConnectionInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1390,14 +1390,14 @@ func (m *awsAwsjson10_serializeOpGetServiceInstance) HandleSerialize(ctx context return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpGetServiceTemplate struct { +type awsAwsjson10_serializeOpGetEnvironmentTemplate struct { } -func (*awsAwsjson10_serializeOpGetServiceTemplate) ID() string { +func (*awsAwsjson10_serializeOpGetEnvironmentTemplate) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpGetServiceTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpGetEnvironmentTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1405,7 +1405,7 @@ func (m *awsAwsjson10_serializeOpGetServiceTemplate) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetServiceTemplateInput) + input, ok := in.Parameters.(*GetEnvironmentTemplateInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1426,10 +1426,10 @@ func (m *awsAwsjson10_serializeOpGetServiceTemplate) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetServiceTemplate") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetEnvironmentTemplate") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentGetServiceTemplateInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentGetEnvironmentTemplateInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1445,14 +1445,14 @@ func (m *awsAwsjson10_serializeOpGetServiceTemplate) HandleSerialize(ctx context return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpGetServiceTemplateVersion struct { +type awsAwsjson10_serializeOpGetEnvironmentTemplateVersion struct { } -func (*awsAwsjson10_serializeOpGetServiceTemplateVersion) ID() string { +func (*awsAwsjson10_serializeOpGetEnvironmentTemplateVersion) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpGetServiceTemplateVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpGetEnvironmentTemplateVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1460,7 +1460,7 @@ func (m *awsAwsjson10_serializeOpGetServiceTemplateVersion) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetServiceTemplateVersionInput) + input, ok := in.Parameters.(*GetEnvironmentTemplateVersionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1481,10 +1481,10 @@ func (m *awsAwsjson10_serializeOpGetServiceTemplateVersion) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetServiceTemplateVersion") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetEnvironmentTemplateVersion") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentGetServiceTemplateVersionInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentGetEnvironmentTemplateVersionInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1500,14 +1500,14 @@ func (m *awsAwsjson10_serializeOpGetServiceTemplateVersion) HandleSerialize(ctx return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpListEnvironmentAccountConnections struct { +type awsAwsjson10_serializeOpGetRepository struct { } -func (*awsAwsjson10_serializeOpListEnvironmentAccountConnections) ID() string { +func (*awsAwsjson10_serializeOpGetRepository) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpListEnvironmentAccountConnections) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpGetRepository) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1515,7 +1515,7 @@ func (m *awsAwsjson10_serializeOpListEnvironmentAccountConnections) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListEnvironmentAccountConnectionsInput) + input, ok := in.Parameters.(*GetRepositoryInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1536,10 +1536,10 @@ func (m *awsAwsjson10_serializeOpListEnvironmentAccountConnections) HandleSerial return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListEnvironmentAccountConnections") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetRepository") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentListEnvironmentAccountConnectionsInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentGetRepositoryInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1555,14 +1555,14 @@ func (m *awsAwsjson10_serializeOpListEnvironmentAccountConnections) HandleSerial return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpListEnvironments struct { +type awsAwsjson10_serializeOpGetRepositorySyncStatus struct { } -func (*awsAwsjson10_serializeOpListEnvironments) ID() string { +func (*awsAwsjson10_serializeOpGetRepositorySyncStatus) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpListEnvironments) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpGetRepositorySyncStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1570,7 +1570,7 @@ func (m *awsAwsjson10_serializeOpListEnvironments) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListEnvironmentsInput) + input, ok := in.Parameters.(*GetRepositorySyncStatusInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1591,10 +1591,10 @@ func (m *awsAwsjson10_serializeOpListEnvironments) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListEnvironments") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetRepositorySyncStatus") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentListEnvironmentsInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentGetRepositorySyncStatusInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1610,14 +1610,14 @@ func (m *awsAwsjson10_serializeOpListEnvironments) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpListEnvironmentTemplates struct { +type awsAwsjson10_serializeOpGetService struct { } -func (*awsAwsjson10_serializeOpListEnvironmentTemplates) ID() string { +func (*awsAwsjson10_serializeOpGetService) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpListEnvironmentTemplates) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpGetService) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1625,7 +1625,7 @@ func (m *awsAwsjson10_serializeOpListEnvironmentTemplates) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListEnvironmentTemplatesInput) + input, ok := in.Parameters.(*GetServiceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1646,10 +1646,10 @@ func (m *awsAwsjson10_serializeOpListEnvironmentTemplates) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListEnvironmentTemplates") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetService") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentListEnvironmentTemplatesInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentGetServiceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1665,14 +1665,14 @@ func (m *awsAwsjson10_serializeOpListEnvironmentTemplates) HandleSerialize(ctx c return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpListEnvironmentTemplateVersions struct { +type awsAwsjson10_serializeOpGetServiceInstance struct { } -func (*awsAwsjson10_serializeOpListEnvironmentTemplateVersions) ID() string { +func (*awsAwsjson10_serializeOpGetServiceInstance) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpListEnvironmentTemplateVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpGetServiceInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1680,7 +1680,7 @@ func (m *awsAwsjson10_serializeOpListEnvironmentTemplateVersions) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListEnvironmentTemplateVersionsInput) + input, ok := in.Parameters.(*GetServiceInstanceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1701,10 +1701,10 @@ func (m *awsAwsjson10_serializeOpListEnvironmentTemplateVersions) HandleSerializ return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListEnvironmentTemplateVersions") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetServiceInstance") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentListEnvironmentTemplateVersionsInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentGetServiceInstanceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1720,14 +1720,14 @@ func (m *awsAwsjson10_serializeOpListEnvironmentTemplateVersions) HandleSerializ return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpListServiceInstances struct { +type awsAwsjson10_serializeOpGetServiceTemplate struct { } -func (*awsAwsjson10_serializeOpListServiceInstances) ID() string { +func (*awsAwsjson10_serializeOpGetServiceTemplate) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpListServiceInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpGetServiceTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1735,7 +1735,7 @@ func (m *awsAwsjson10_serializeOpListServiceInstances) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListServiceInstancesInput) + input, ok := in.Parameters.(*GetServiceTemplateInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1756,10 +1756,10 @@ func (m *awsAwsjson10_serializeOpListServiceInstances) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListServiceInstances") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetServiceTemplate") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentListServiceInstancesInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentGetServiceTemplateInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1775,14 +1775,14 @@ func (m *awsAwsjson10_serializeOpListServiceInstances) HandleSerialize(ctx conte return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpListServices struct { +type awsAwsjson10_serializeOpGetServiceTemplateVersion struct { } -func (*awsAwsjson10_serializeOpListServices) ID() string { +func (*awsAwsjson10_serializeOpGetServiceTemplateVersion) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpListServices) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpGetServiceTemplateVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1790,7 +1790,7 @@ func (m *awsAwsjson10_serializeOpListServices) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListServicesInput) + input, ok := in.Parameters.(*GetServiceTemplateVersionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1811,10 +1811,10 @@ func (m *awsAwsjson10_serializeOpListServices) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListServices") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetServiceTemplateVersion") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentListServicesInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentGetServiceTemplateVersionInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1830,14 +1830,14 @@ func (m *awsAwsjson10_serializeOpListServices) HandleSerialize(ctx context.Conte return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpListServiceTemplates struct { +type awsAwsjson10_serializeOpGetTemplateSyncConfig struct { } -func (*awsAwsjson10_serializeOpListServiceTemplates) ID() string { +func (*awsAwsjson10_serializeOpGetTemplateSyncConfig) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpListServiceTemplates) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpGetTemplateSyncConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1845,7 +1845,7 @@ func (m *awsAwsjson10_serializeOpListServiceTemplates) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListServiceTemplatesInput) + input, ok := in.Parameters.(*GetTemplateSyncConfigInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1866,10 +1866,10 @@ func (m *awsAwsjson10_serializeOpListServiceTemplates) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListServiceTemplates") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetTemplateSyncConfig") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentListServiceTemplatesInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentGetTemplateSyncConfigInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1885,14 +1885,14 @@ func (m *awsAwsjson10_serializeOpListServiceTemplates) HandleSerialize(ctx conte return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpListServiceTemplateVersions struct { +type awsAwsjson10_serializeOpGetTemplateSyncStatus struct { } -func (*awsAwsjson10_serializeOpListServiceTemplateVersions) ID() string { +func (*awsAwsjson10_serializeOpGetTemplateSyncStatus) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpListServiceTemplateVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpGetTemplateSyncStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1900,7 +1900,7 @@ func (m *awsAwsjson10_serializeOpListServiceTemplateVersions) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListServiceTemplateVersionsInput) + input, ok := in.Parameters.(*GetTemplateSyncStatusInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1921,10 +1921,10 @@ func (m *awsAwsjson10_serializeOpListServiceTemplateVersions) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListServiceTemplateVersions") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.GetTemplateSyncStatus") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentListServiceTemplateVersionsInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentGetTemplateSyncStatusInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1940,14 +1940,14 @@ func (m *awsAwsjson10_serializeOpListServiceTemplateVersions) HandleSerialize(ct return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpListTagsForResource struct { +type awsAwsjson10_serializeOpListEnvironmentAccountConnections struct { } -func (*awsAwsjson10_serializeOpListTagsForResource) ID() string { +func (*awsAwsjson10_serializeOpListEnvironmentAccountConnections) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpListEnvironmentAccountConnections) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1955,7 +1955,7 @@ func (m *awsAwsjson10_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListTagsForResourceInput) + input, ok := in.Parameters.(*ListEnvironmentAccountConnectionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -1976,10 +1976,10 @@ func (m *awsAwsjson10_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListTagsForResource") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListEnvironmentAccountConnections") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentListTagsForResourceInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentListEnvironmentAccountConnectionsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1995,14 +1995,14 @@ func (m *awsAwsjson10_serializeOpListTagsForResource) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpRejectEnvironmentAccountConnection struct { +type awsAwsjson10_serializeOpListEnvironmentOutputs struct { } -func (*awsAwsjson10_serializeOpRejectEnvironmentAccountConnection) ID() string { +func (*awsAwsjson10_serializeOpListEnvironmentOutputs) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpRejectEnvironmentAccountConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpListEnvironmentOutputs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2010,7 +2010,7 @@ func (m *awsAwsjson10_serializeOpRejectEnvironmentAccountConnection) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*RejectEnvironmentAccountConnectionInput) + input, ok := in.Parameters.(*ListEnvironmentOutputsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -2031,10 +2031,10 @@ func (m *awsAwsjson10_serializeOpRejectEnvironmentAccountConnection) HandleSeria return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.RejectEnvironmentAccountConnection") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListEnvironmentOutputs") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentRejectEnvironmentAccountConnectionInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentListEnvironmentOutputsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2050,14 +2050,14 @@ func (m *awsAwsjson10_serializeOpRejectEnvironmentAccountConnection) HandleSeria return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpTagResource struct { +type awsAwsjson10_serializeOpListEnvironmentProvisionedResources struct { } -func (*awsAwsjson10_serializeOpTagResource) ID() string { +func (*awsAwsjson10_serializeOpListEnvironmentProvisionedResources) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpListEnvironmentProvisionedResources) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2065,7 +2065,7 @@ func (m *awsAwsjson10_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*TagResourceInput) + input, ok := in.Parameters.(*ListEnvironmentProvisionedResourcesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -2086,10 +2086,10 @@ func (m *awsAwsjson10_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.TagResource") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListEnvironmentProvisionedResources") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentListEnvironmentProvisionedResourcesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2105,14 +2105,14 @@ func (m *awsAwsjson10_serializeOpTagResource) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpUntagResource struct { +type awsAwsjson10_serializeOpListEnvironments struct { } -func (*awsAwsjson10_serializeOpUntagResource) ID() string { +func (*awsAwsjson10_serializeOpListEnvironments) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpListEnvironments) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2120,7 +2120,7 @@ func (m *awsAwsjson10_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*UntagResourceInput) + input, ok := in.Parameters.(*ListEnvironmentsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -2141,10 +2141,10 @@ func (m *awsAwsjson10_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UntagResource") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListEnvironments") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentUntagResourceInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentListEnvironmentsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2160,14 +2160,14 @@ func (m *awsAwsjson10_serializeOpUntagResource) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpUpdateAccountSettings struct { +type awsAwsjson10_serializeOpListEnvironmentTemplates struct { } -func (*awsAwsjson10_serializeOpUpdateAccountSettings) ID() string { +func (*awsAwsjson10_serializeOpListEnvironmentTemplates) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpUpdateAccountSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpListEnvironmentTemplates) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2175,7 +2175,7 @@ func (m *awsAwsjson10_serializeOpUpdateAccountSettings) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*UpdateAccountSettingsInput) + input, ok := in.Parameters.(*ListEnvironmentTemplatesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -2196,10 +2196,10 @@ func (m *awsAwsjson10_serializeOpUpdateAccountSettings) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateAccountSettings") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListEnvironmentTemplates") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentUpdateAccountSettingsInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentListEnvironmentTemplatesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2215,14 +2215,14 @@ func (m *awsAwsjson10_serializeOpUpdateAccountSettings) HandleSerialize(ctx cont return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpUpdateEnvironment struct { +type awsAwsjson10_serializeOpListEnvironmentTemplateVersions struct { } -func (*awsAwsjson10_serializeOpUpdateEnvironment) ID() string { +func (*awsAwsjson10_serializeOpListEnvironmentTemplateVersions) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpUpdateEnvironment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpListEnvironmentTemplateVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2230,7 +2230,7 @@ func (m *awsAwsjson10_serializeOpUpdateEnvironment) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*UpdateEnvironmentInput) + input, ok := in.Parameters.(*ListEnvironmentTemplateVersionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -2251,10 +2251,10 @@ func (m *awsAwsjson10_serializeOpUpdateEnvironment) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateEnvironment") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListEnvironmentTemplateVersions") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentUpdateEnvironmentInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentListEnvironmentTemplateVersionsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2270,14 +2270,14 @@ func (m *awsAwsjson10_serializeOpUpdateEnvironment) HandleSerialize(ctx context. return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpUpdateEnvironmentAccountConnection struct { +type awsAwsjson10_serializeOpListRepositories struct { } -func (*awsAwsjson10_serializeOpUpdateEnvironmentAccountConnection) ID() string { +func (*awsAwsjson10_serializeOpListRepositories) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpUpdateEnvironmentAccountConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpListRepositories) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2285,7 +2285,7 @@ func (m *awsAwsjson10_serializeOpUpdateEnvironmentAccountConnection) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*UpdateEnvironmentAccountConnectionInput) + input, ok := in.Parameters.(*ListRepositoriesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -2306,10 +2306,10 @@ func (m *awsAwsjson10_serializeOpUpdateEnvironmentAccountConnection) HandleSeria return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateEnvironmentAccountConnection") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListRepositories") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentUpdateEnvironmentAccountConnectionInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentListRepositoriesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2325,14 +2325,14 @@ func (m *awsAwsjson10_serializeOpUpdateEnvironmentAccountConnection) HandleSeria return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpUpdateEnvironmentTemplate struct { +type awsAwsjson10_serializeOpListRepositorySyncDefinitions struct { } -func (*awsAwsjson10_serializeOpUpdateEnvironmentTemplate) ID() string { +func (*awsAwsjson10_serializeOpListRepositorySyncDefinitions) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpUpdateEnvironmentTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpListRepositorySyncDefinitions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2340,7 +2340,7 @@ func (m *awsAwsjson10_serializeOpUpdateEnvironmentTemplate) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*UpdateEnvironmentTemplateInput) + input, ok := in.Parameters.(*ListRepositorySyncDefinitionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -2361,10 +2361,10 @@ func (m *awsAwsjson10_serializeOpUpdateEnvironmentTemplate) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateEnvironmentTemplate") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListRepositorySyncDefinitions") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentUpdateEnvironmentTemplateInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentListRepositorySyncDefinitionsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2380,14 +2380,14 @@ func (m *awsAwsjson10_serializeOpUpdateEnvironmentTemplate) HandleSerialize(ctx return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpUpdateEnvironmentTemplateVersion struct { +type awsAwsjson10_serializeOpListServiceInstanceOutputs struct { } -func (*awsAwsjson10_serializeOpUpdateEnvironmentTemplateVersion) ID() string { +func (*awsAwsjson10_serializeOpListServiceInstanceOutputs) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpUpdateEnvironmentTemplateVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpListServiceInstanceOutputs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2395,7 +2395,7 @@ func (m *awsAwsjson10_serializeOpUpdateEnvironmentTemplateVersion) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*UpdateEnvironmentTemplateVersionInput) + input, ok := in.Parameters.(*ListServiceInstanceOutputsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -2416,10 +2416,10 @@ func (m *awsAwsjson10_serializeOpUpdateEnvironmentTemplateVersion) HandleSeriali return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateEnvironmentTemplateVersion") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListServiceInstanceOutputs") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentUpdateEnvironmentTemplateVersionInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentListServiceInstanceOutputsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2435,14 +2435,14 @@ func (m *awsAwsjson10_serializeOpUpdateEnvironmentTemplateVersion) HandleSeriali return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpUpdateService struct { +type awsAwsjson10_serializeOpListServiceInstanceProvisionedResources struct { } -func (*awsAwsjson10_serializeOpUpdateService) ID() string { +func (*awsAwsjson10_serializeOpListServiceInstanceProvisionedResources) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpUpdateService) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpListServiceInstanceProvisionedResources) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2450,7 +2450,7 @@ func (m *awsAwsjson10_serializeOpUpdateService) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*UpdateServiceInput) + input, ok := in.Parameters.(*ListServiceInstanceProvisionedResourcesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -2471,10 +2471,10 @@ func (m *awsAwsjson10_serializeOpUpdateService) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateService") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListServiceInstanceProvisionedResources") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentUpdateServiceInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentListServiceInstanceProvisionedResourcesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2490,14 +2490,14 @@ func (m *awsAwsjson10_serializeOpUpdateService) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpUpdateServiceInstance struct { +type awsAwsjson10_serializeOpListServiceInstances struct { } -func (*awsAwsjson10_serializeOpUpdateServiceInstance) ID() string { +func (*awsAwsjson10_serializeOpListServiceInstances) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpUpdateServiceInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpListServiceInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2505,7 +2505,7 @@ func (m *awsAwsjson10_serializeOpUpdateServiceInstance) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*UpdateServiceInstanceInput) + input, ok := in.Parameters.(*ListServiceInstancesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -2526,10 +2526,10 @@ func (m *awsAwsjson10_serializeOpUpdateServiceInstance) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateServiceInstance") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListServiceInstances") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentUpdateServiceInstanceInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentListServiceInstancesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2545,14 +2545,14 @@ func (m *awsAwsjson10_serializeOpUpdateServiceInstance) HandleSerialize(ctx cont return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpUpdateServicePipeline struct { +type awsAwsjson10_serializeOpListServicePipelineOutputs struct { } -func (*awsAwsjson10_serializeOpUpdateServicePipeline) ID() string { +func (*awsAwsjson10_serializeOpListServicePipelineOutputs) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpUpdateServicePipeline) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpListServicePipelineOutputs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2560,7 +2560,7 @@ func (m *awsAwsjson10_serializeOpUpdateServicePipeline) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*UpdateServicePipelineInput) + input, ok := in.Parameters.(*ListServicePipelineOutputsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -2581,10 +2581,10 @@ func (m *awsAwsjson10_serializeOpUpdateServicePipeline) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateServicePipeline") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListServicePipelineOutputs") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentUpdateServicePipelineInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentListServicePipelineOutputsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2600,14 +2600,14 @@ func (m *awsAwsjson10_serializeOpUpdateServicePipeline) HandleSerialize(ctx cont return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpUpdateServiceTemplate struct { +type awsAwsjson10_serializeOpListServicePipelineProvisionedResources struct { } -func (*awsAwsjson10_serializeOpUpdateServiceTemplate) ID() string { +func (*awsAwsjson10_serializeOpListServicePipelineProvisionedResources) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpUpdateServiceTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpListServicePipelineProvisionedResources) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2615,7 +2615,7 @@ func (m *awsAwsjson10_serializeOpUpdateServiceTemplate) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*UpdateServiceTemplateInput) + input, ok := in.Parameters.(*ListServicePipelineProvisionedResourcesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -2636,10 +2636,10 @@ func (m *awsAwsjson10_serializeOpUpdateServiceTemplate) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateServiceTemplate") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListServicePipelineProvisionedResources") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentUpdateServiceTemplateInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentListServicePipelineProvisionedResourcesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2655,14 +2655,14 @@ func (m *awsAwsjson10_serializeOpUpdateServiceTemplate) HandleSerialize(ctx cont return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpUpdateServiceTemplateVersion struct { +type awsAwsjson10_serializeOpListServices struct { } -func (*awsAwsjson10_serializeOpUpdateServiceTemplateVersion) ID() string { +func (*awsAwsjson10_serializeOpListServices) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpUpdateServiceTemplateVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpListServices) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2670,7 +2670,7 @@ func (m *awsAwsjson10_serializeOpUpdateServiceTemplateVersion) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*UpdateServiceTemplateVersionInput) + input, ok := in.Parameters.(*ListServicesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -2691,10 +2691,10 @@ func (m *awsAwsjson10_serializeOpUpdateServiceTemplateVersion) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateServiceTemplateVersion") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListServices") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentUpdateServiceTemplateVersionInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentListServicesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2709,89 +2709,1131 @@ func (m *awsAwsjson10_serializeOpUpdateServiceTemplateVersion) HandleSerialize(c return next.HandleSerialize(ctx, in) } -func awsAwsjson10_serializeDocumentCompatibleEnvironmentTemplateInput(v *types.CompatibleEnvironmentTemplateInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.MajorVersion != nil { - ok := object.Key("majorVersion") - ok.String(*v.MajorVersion) - } - - if v.TemplateName != nil { - ok := object.Key("templateName") - ok.String(*v.TemplateName) - } - return nil +type awsAwsjson10_serializeOpListServiceTemplates struct { } -func awsAwsjson10_serializeDocumentCompatibleEnvironmentTemplateInputList(v []types.CompatibleEnvironmentTemplateInput, value smithyjson.Value) error { - array := value.Array() - defer array.Close() +func (*awsAwsjson10_serializeOpListServiceTemplates) ID() string { + return "OperationSerializer" +} - for i := range v { - av := array.Value() - if err := awsAwsjson10_serializeDocumentCompatibleEnvironmentTemplateInput(&v[i], av); err != nil { - return err - } +func (m *awsAwsjson10_serializeOpListServiceTemplates) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - return nil -} -func awsAwsjson10_serializeDocumentEnvironmentAccountConnectionStatusList(v []types.EnvironmentAccountConnectionStatus, value smithyjson.Value) error { - array := value.Array() - defer array.Close() + input, ok := in.Parameters.(*ListServiceTemplatesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } - for i := range v { - av := array.Value() - av.String(string(v[i])) + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } } - return nil -} + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListServiceTemplates") -func awsAwsjson10_serializeDocumentEnvironmentTemplateFilter(v *types.EnvironmentTemplateFilter, value smithyjson.Value) error { - object := value.Object() - defer object.Close() + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListServiceTemplatesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } - if v.MajorVersion != nil { - ok := object.Key("majorVersion") - ok.String(*v.MajorVersion) + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} } - if v.TemplateName != nil { - ok := object.Key("templateName") - ok.String(*v.TemplateName) + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} } + in.Request = request - return nil + return next.HandleSerialize(ctx, in) } -func awsAwsjson10_serializeDocumentEnvironmentTemplateFilterList(v []types.EnvironmentTemplateFilter, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - if err := awsAwsjson10_serializeDocumentEnvironmentTemplateFilter(&v[i], av); err != nil { - return err - } - } - return nil +type awsAwsjson10_serializeOpListServiceTemplateVersions struct { } -func awsAwsjson10_serializeDocumentS3ObjectSource(v *types.S3ObjectSource, value smithyjson.Value) error { - object := value.Object() - defer object.Close() +func (*awsAwsjson10_serializeOpListServiceTemplateVersions) ID() string { + return "OperationSerializer" +} - if v.Bucket != nil { - ok := object.Key("bucket") - ok.String(*v.Bucket) +func (m *awsAwsjson10_serializeOpListServiceTemplateVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - if v.Key != nil { - ok := object.Key("key") - ok.String(*v.Key) + input, ok := in.Parameters.(*ListServiceTemplateVersionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListServiceTemplateVersions") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListServiceTemplateVersionsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpListTagsForResource struct { +} + +func (*awsAwsjson10_serializeOpListTagsForResource) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListTagsForResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.ListTagsForResource") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListTagsForResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpNotifyResourceDeploymentStatusChange struct { +} + +func (*awsAwsjson10_serializeOpNotifyResourceDeploymentStatusChange) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpNotifyResourceDeploymentStatusChange) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*NotifyResourceDeploymentStatusChangeInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.NotifyResourceDeploymentStatusChange") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentNotifyResourceDeploymentStatusChangeInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpRejectEnvironmentAccountConnection struct { +} + +func (*awsAwsjson10_serializeOpRejectEnvironmentAccountConnection) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpRejectEnvironmentAccountConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*RejectEnvironmentAccountConnectionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.RejectEnvironmentAccountConnection") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentRejectEnvironmentAccountConnectionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpTagResource struct { +} + +func (*awsAwsjson10_serializeOpTagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*TagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.TagResource") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpUntagResource struct { +} + +func (*awsAwsjson10_serializeOpUntagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UntagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UntagResource") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentUntagResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpUpdateAccountSettings struct { +} + +func (*awsAwsjson10_serializeOpUpdateAccountSettings) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpUpdateAccountSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateAccountSettingsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateAccountSettings") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentUpdateAccountSettingsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpUpdateEnvironment struct { +} + +func (*awsAwsjson10_serializeOpUpdateEnvironment) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpUpdateEnvironment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateEnvironmentInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateEnvironment") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentUpdateEnvironmentInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpUpdateEnvironmentAccountConnection struct { +} + +func (*awsAwsjson10_serializeOpUpdateEnvironmentAccountConnection) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpUpdateEnvironmentAccountConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateEnvironmentAccountConnectionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateEnvironmentAccountConnection") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentUpdateEnvironmentAccountConnectionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpUpdateEnvironmentTemplate struct { +} + +func (*awsAwsjson10_serializeOpUpdateEnvironmentTemplate) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpUpdateEnvironmentTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateEnvironmentTemplateInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateEnvironmentTemplate") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentUpdateEnvironmentTemplateInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpUpdateEnvironmentTemplateVersion struct { +} + +func (*awsAwsjson10_serializeOpUpdateEnvironmentTemplateVersion) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpUpdateEnvironmentTemplateVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateEnvironmentTemplateVersionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateEnvironmentTemplateVersion") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentUpdateEnvironmentTemplateVersionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpUpdateService struct { +} + +func (*awsAwsjson10_serializeOpUpdateService) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpUpdateService) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateServiceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateService") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentUpdateServiceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpUpdateServiceInstance struct { +} + +func (*awsAwsjson10_serializeOpUpdateServiceInstance) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpUpdateServiceInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateServiceInstanceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateServiceInstance") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentUpdateServiceInstanceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpUpdateServicePipeline struct { +} + +func (*awsAwsjson10_serializeOpUpdateServicePipeline) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpUpdateServicePipeline) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateServicePipelineInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateServicePipeline") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentUpdateServicePipelineInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpUpdateServiceTemplate struct { +} + +func (*awsAwsjson10_serializeOpUpdateServiceTemplate) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpUpdateServiceTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateServiceTemplateInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateServiceTemplate") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentUpdateServiceTemplateInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpUpdateServiceTemplateVersion struct { +} + +func (*awsAwsjson10_serializeOpUpdateServiceTemplateVersion) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpUpdateServiceTemplateVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateServiceTemplateVersionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateServiceTemplateVersion") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentUpdateServiceTemplateVersionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpUpdateTemplateSyncConfig struct { +} + +func (*awsAwsjson10_serializeOpUpdateTemplateSyncConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpUpdateTemplateSyncConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateTemplateSyncConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AwsProton20200720.UpdateTemplateSyncConfig") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentUpdateTemplateSyncConfigInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsAwsjson10_serializeDocumentCompatibleEnvironmentTemplateInput(v *types.CompatibleEnvironmentTemplateInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MajorVersion != nil { + ok := object.Key("majorVersion") + ok.String(*v.MajorVersion) + } + + if v.TemplateName != nil { + ok := object.Key("templateName") + ok.String(*v.TemplateName) + } + + return nil +} + +func awsAwsjson10_serializeDocumentCompatibleEnvironmentTemplateInputList(v []types.CompatibleEnvironmentTemplateInput, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentCompatibleEnvironmentTemplateInput(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentEnvironmentAccountConnectionStatusList(v []types.EnvironmentAccountConnectionStatus, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsAwsjson10_serializeDocumentEnvironmentTemplateFilter(v *types.EnvironmentTemplateFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MajorVersion != nil { + ok := object.Key("majorVersion") + ok.String(*v.MajorVersion) + } + + if v.TemplateName != nil { + ok := object.Key("templateName") + ok.String(*v.TemplateName) + } + + return nil +} + +func awsAwsjson10_serializeDocumentEnvironmentTemplateFilterList(v []types.EnvironmentTemplateFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentEnvironmentTemplateFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentOutput(v *types.Output, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("key") + ok.String(*v.Key) + } + + if v.ValueString != nil { + ok := object.Key("valueString") + ok.String(*v.ValueString) + } + + return nil +} + +func awsAwsjson10_serializeDocumentOutputsList(v []types.Output, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentOutput(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentRepositoryBranchInput(v *types.RepositoryBranchInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Branch != nil { + ok := object.Key("branch") + ok.String(*v.Branch) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if len(v.Provider) > 0 { + ok := object.Key("provider") + ok.String(string(v.Provider)) + } + + return nil +} + +func awsAwsjson10_serializeDocumentS3ObjectSource(v *types.S3ObjectSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Bucket != nil { + ok := object.Key("bucket") + ok.String(*v.Bucket) + } + + if v.Key != nil { + ok := object.Key("key") + ok.String(*v.Key) } return nil @@ -2933,6 +3975,13 @@ func awsAwsjson10_serializeOpDocumentCreateEnvironmentAccountConnectionInput(v * ok.String(*v.RoleArn) } + if v.Tags != nil { + ok := object.Key("tags") + if err := awsAwsjson10_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + return nil } @@ -2960,6 +4009,13 @@ func awsAwsjson10_serializeOpDocumentCreateEnvironmentInput(v *CreateEnvironment ok.String(*v.ProtonServiceRoleArn) } + if v.ProvisioningRepository != nil { + ok := object.Key("provisioningRepository") + if err := awsAwsjson10_serializeDocumentRepositoryBranchInput(v.ProvisioningRepository, ok); err != nil { + return err + } + } + if v.Spec != nil { ok := object.Key("spec") ok.String(*v.Spec) @@ -3070,6 +4126,33 @@ func awsAwsjson10_serializeOpDocumentCreateEnvironmentTemplateVersionInput(v *Cr return nil } +func awsAwsjson10_serializeOpDocumentCreateRepositoryInput(v *CreateRepositoryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ConnectionArn != nil { + ok := object.Key("connectionArn") + ok.String(*v.ConnectionArn) + } + + if v.EncryptionKey != nil { + ok := object.Key("encryptionKey") + ok.String(*v.EncryptionKey) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if len(v.Provider) > 0 { + ok := object.Key("provider") + ok.String(string(v.Provider)) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentCreateServiceInput(v *CreateServiceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3216,6 +4299,43 @@ func awsAwsjson10_serializeOpDocumentCreateServiceTemplateVersionInput(v *Create return nil } +func awsAwsjson10_serializeOpDocumentCreateTemplateSyncConfigInput(v *CreateTemplateSyncConfigInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Branch != nil { + ok := object.Key("branch") + ok.String(*v.Branch) + } + + if v.RepositoryName != nil { + ok := object.Key("repositoryName") + ok.String(*v.RepositoryName) + } + + if len(v.RepositoryProvider) > 0 { + ok := object.Key("repositoryProvider") + ok.String(string(v.RepositoryProvider)) + } + + if v.Subdirectory != nil { + ok := object.Key("subdirectory") + ok.String(*v.Subdirectory) + } + + if v.TemplateName != nil { + ok := object.Key("templateName") + ok.String(*v.TemplateName) + } + + if len(v.TemplateType) > 0 { + ok := object.Key("templateType") + ok.String(string(v.TemplateType)) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentDeleteEnvironmentAccountConnectionInput(v *DeleteEnvironmentAccountConnectionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3274,6 +4394,23 @@ func awsAwsjson10_serializeOpDocumentDeleteEnvironmentTemplateVersionInput(v *De return nil } +func awsAwsjson10_serializeOpDocumentDeleteRepositoryInput(v *DeleteRepositoryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if len(v.Provider) > 0 { + ok := object.Key("provider") + ok.String(string(v.Provider)) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentDeleteServiceInput(v *DeleteServiceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3320,6 +4457,23 @@ func awsAwsjson10_serializeOpDocumentDeleteServiceTemplateVersionInput(v *Delete return nil } +func awsAwsjson10_serializeOpDocumentDeleteTemplateSyncConfigInput(v *DeleteTemplateSyncConfigInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TemplateName != nil { + ok := object.Key("templateName") + ok.String(*v.TemplateName) + } + + if len(v.TemplateType) > 0 { + ok := object.Key("templateType") + ok.String(string(v.TemplateType)) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentGetAccountSettingsInput(v *GetAccountSettingsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3385,6 +4539,50 @@ func awsAwsjson10_serializeOpDocumentGetEnvironmentTemplateVersionInput(v *GetEn return nil } +func awsAwsjson10_serializeOpDocumentGetRepositoryInput(v *GetRepositoryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if len(v.Provider) > 0 { + ok := object.Key("provider") + ok.String(string(v.Provider)) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentGetRepositorySyncStatusInput(v *GetRepositorySyncStatusInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Branch != nil { + ok := object.Key("branch") + ok.String(*v.Branch) + } + + if v.RepositoryName != nil { + ok := object.Key("repositoryName") + ok.String(*v.RepositoryName) + } + + if len(v.RepositoryProvider) > 0 { + ok := object.Key("repositoryProvider") + ok.String(string(v.RepositoryProvider)) + } + + if len(v.SyncType) > 0 { + ok := object.Key("syncType") + ok.String(string(v.SyncType)) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentGetServiceInput(v *GetServiceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3448,6 +4646,45 @@ func awsAwsjson10_serializeOpDocumentGetServiceTemplateVersionInput(v *GetServic return nil } +func awsAwsjson10_serializeOpDocumentGetTemplateSyncConfigInput(v *GetTemplateSyncConfigInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TemplateName != nil { + ok := object.Key("templateName") + ok.String(*v.TemplateName) + } + + if len(v.TemplateType) > 0 { + ok := object.Key("templateType") + ok.String(string(v.TemplateType)) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentGetTemplateSyncStatusInput(v *GetTemplateSyncStatusInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TemplateName != nil { + ok := object.Key("templateName") + ok.String(*v.TemplateName) + } + + if len(v.TemplateType) > 0 { + ok := object.Key("templateType") + ok.String(string(v.TemplateType)) + } + + if v.TemplateVersion != nil { + ok := object.Key("templateVersion") + ok.String(*v.TemplateVersion) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentListEnvironmentAccountConnectionsInput(v *ListEnvironmentAccountConnectionsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3482,6 +4719,40 @@ func awsAwsjson10_serializeOpDocumentListEnvironmentAccountConnectionsInput(v *L return nil } +func awsAwsjson10_serializeOpDocumentListEnvironmentOutputsInput(v *ListEnvironmentOutputsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EnvironmentName != nil { + ok := object.Key("environmentName") + ok.String(*v.EnvironmentName) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentListEnvironmentProvisionedResourcesInput(v *ListEnvironmentProvisionedResourcesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EnvironmentName != nil { + ok := object.Key("environmentName") + ok.String(*v.EnvironmentName) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentListEnvironmentsInput(v *ListEnvironmentsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3550,6 +4821,94 @@ func awsAwsjson10_serializeOpDocumentListEnvironmentTemplateVersionsInput(v *Lis return nil } +func awsAwsjson10_serializeOpDocumentListRepositoriesInput(v *ListRepositoriesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentListRepositorySyncDefinitionsInput(v *ListRepositorySyncDefinitionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.RepositoryName != nil { + ok := object.Key("repositoryName") + ok.String(*v.RepositoryName) + } + + if len(v.RepositoryProvider) > 0 { + ok := object.Key("repositoryProvider") + ok.String(string(v.RepositoryProvider)) + } + + if len(v.SyncType) > 0 { + ok := object.Key("syncType") + ok.String(string(v.SyncType)) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentListServiceInstanceOutputsInput(v *ListServiceInstanceOutputsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.ServiceInstanceName != nil { + ok := object.Key("serviceInstanceName") + ok.String(*v.ServiceInstanceName) + } + + if v.ServiceName != nil { + ok := object.Key("serviceName") + ok.String(*v.ServiceName) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentListServiceInstanceProvisionedResourcesInput(v *ListServiceInstanceProvisionedResourcesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.ServiceInstanceName != nil { + ok := object.Key("serviceInstanceName") + ok.String(*v.ServiceInstanceName) + } + + if v.ServiceName != nil { + ok := object.Key("serviceName") + ok.String(*v.ServiceName) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentListServiceInstancesInput(v *ListServiceInstancesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3572,6 +4931,40 @@ func awsAwsjson10_serializeOpDocumentListServiceInstancesInput(v *ListServiceIns return nil } +func awsAwsjson10_serializeOpDocumentListServicePipelineOutputsInput(v *ListServicePipelineOutputsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.ServiceName != nil { + ok := object.Key("serviceName") + ok.String(*v.ServiceName) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentListServicePipelineProvisionedResourcesInput(v *ListServicePipelineProvisionedResourcesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.ServiceName != nil { + ok := object.Key("serviceName") + ok.String(*v.ServiceName) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentListServicesInput(v *ListServicesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3655,6 +5048,40 @@ func awsAwsjson10_serializeOpDocumentListTagsForResourceInput(v *ListTagsForReso return nil } +func awsAwsjson10_serializeOpDocumentNotifyResourceDeploymentStatusChangeInput(v *NotifyResourceDeploymentStatusChangeInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DeploymentId != nil { + ok := object.Key("deploymentId") + ok.String(*v.DeploymentId) + } + + if v.Outputs != nil { + ok := object.Key("outputs") + if err := awsAwsjson10_serializeDocumentOutputsList(v.Outputs, ok); err != nil { + return err + } + } + + if v.ResourceArn != nil { + ok := object.Key("resourceArn") + ok.String(*v.ResourceArn) + } + + if len(v.Status) > 0 { + ok := object.Key("status") + ok.String(string(v.Status)) + } + + if v.StatusMessage != nil { + ok := object.Key("statusMessage") + ok.String(*v.StatusMessage) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentRejectEnvironmentAccountConnectionInput(v *RejectEnvironmentAccountConnectionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3709,6 +5136,13 @@ func awsAwsjson10_serializeOpDocumentUpdateAccountSettingsInput(v *UpdateAccount object := value.Object() defer object.Close() + if v.PipelineProvisioningRepository != nil { + ok := object.Key("pipelineProvisioningRepository") + if err := awsAwsjson10_serializeDocumentRepositoryBranchInput(v.PipelineProvisioningRepository, ok); err != nil { + return err + } + } + if v.PipelineServiceRoleArn != nil { ok := object.Key("pipelineServiceRoleArn") ok.String(*v.PipelineServiceRoleArn) @@ -3763,6 +5197,13 @@ func awsAwsjson10_serializeOpDocumentUpdateEnvironmentInput(v *UpdateEnvironment ok.String(*v.ProtonServiceRoleArn) } + if v.ProvisioningRepository != nil { + ok := object.Key("provisioningRepository") + if err := awsAwsjson10_serializeDocumentRepositoryBranchInput(v.ProvisioningRepository, ok); err != nil { + return err + } + } + if v.Spec != nil { ok := object.Key("spec") ok.String(*v.Spec) @@ -3986,3 +5427,40 @@ func awsAwsjson10_serializeOpDocumentUpdateServiceTemplateVersionInput(v *Update return nil } + +func awsAwsjson10_serializeOpDocumentUpdateTemplateSyncConfigInput(v *UpdateTemplateSyncConfigInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Branch != nil { + ok := object.Key("branch") + ok.String(*v.Branch) + } + + if v.RepositoryName != nil { + ok := object.Key("repositoryName") + ok.String(*v.RepositoryName) + } + + if len(v.RepositoryProvider) > 0 { + ok := object.Key("repositoryProvider") + ok.String(string(v.RepositoryProvider)) + } + + if v.Subdirectory != nil { + ok := object.Key("subdirectory") + ok.String(*v.Subdirectory) + } + + if v.TemplateName != nil { + ok := object.Key("templateName") + ok.String(*v.TemplateName) + } + + if len(v.TemplateType) > 0 { + ok := object.Key("templateType") + ok.String(string(v.TemplateType)) + } + + return nil +} diff --git a/service/proton/types/enums.go b/service/proton/types/enums.go index 398a84fe4cc..693275388e1 100644 --- a/service/proton/types/enums.go +++ b/service/proton/types/enums.go @@ -94,6 +94,24 @@ func (EnvironmentAccountConnectionStatus) Values() []EnvironmentAccountConnectio } } +type ProvisionedResourceEngine string + +// Enum values for ProvisionedResourceEngine +const ( + ProvisionedResourceEngineCloudformation ProvisionedResourceEngine = "CLOUDFORMATION" + ProvisionedResourceEngineTerraform ProvisionedResourceEngine = "TERRAFORM" +) + +// Values returns all known values for ProvisionedResourceEngine. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// The ordering of this slice is not guaranteed to be stable across updates. +func (ProvisionedResourceEngine) Values() []ProvisionedResourceEngine { + return []ProvisionedResourceEngine{ + "CLOUDFORMATION", + "TERRAFORM", + } +} + type Provisioning string // Enum values for Provisioning @@ -110,6 +128,102 @@ func (Provisioning) Values() []Provisioning { } } +type RepositoryProvider string + +// Enum values for RepositoryProvider +const ( + RepositoryProviderGithub RepositoryProvider = "GITHUB" + RepositoryProviderGithubEnterprise RepositoryProvider = "GITHUB_ENTERPRISE" + RepositoryProviderBitbucket RepositoryProvider = "BITBUCKET" +) + +// Values returns all known values for RepositoryProvider. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (RepositoryProvider) Values() []RepositoryProvider { + return []RepositoryProvider{ + "GITHUB", + "GITHUB_ENTERPRISE", + "BITBUCKET", + } +} + +type RepositorySyncStatus string + +// Enum values for RepositorySyncStatus +const ( + // A repository sync attempt has been created and will begin soon. + RepositorySyncStatusInitiated RepositorySyncStatus = "INITIATED" + // A repository sync attempt has started and work is being done to reconcile the + // branch. + RepositorySyncStatusInProgress RepositorySyncStatus = "IN_PROGRESS" + // The repository sync attempt has completed successfully. + RepositorySyncStatusSucceeded RepositorySyncStatus = "SUCCEEDED" + // The repository sync attempt has failed. + RepositorySyncStatusFailed RepositorySyncStatus = "FAILED" + // The repository sync attempt didn't execute and was queued. + RepositorySyncStatusQueued RepositorySyncStatus = "QUEUED" +) + +// Values returns all known values for RepositorySyncStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (RepositorySyncStatus) Values() []RepositorySyncStatus { + return []RepositorySyncStatus{ + "INITIATED", + "IN_PROGRESS", + "SUCCEEDED", + "FAILED", + "QUEUED", + } +} + +type ResourceDeploymentStatus string + +// Enum values for ResourceDeploymentStatus +const ( + ResourceDeploymentStatusInProgress ResourceDeploymentStatus = "IN_PROGRESS" + ResourceDeploymentStatusFailed ResourceDeploymentStatus = "FAILED" + ResourceDeploymentStatusSucceeded ResourceDeploymentStatus = "SUCCEEDED" +) + +// Values returns all known values for ResourceDeploymentStatus. Note that this can +// be expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ResourceDeploymentStatus) Values() []ResourceDeploymentStatus { + return []ResourceDeploymentStatus{ + "IN_PROGRESS", + "FAILED", + "SUCCEEDED", + } +} + +type ResourceSyncStatus string + +// Enum values for ResourceSyncStatus +const ( + // A sync attempt has been created and will begin soon. + ResourceSyncStatusInitiated ResourceSyncStatus = "INITIATED" + // Syncing has started and work is being done to reconcile state. + ResourceSyncStatusInProgress ResourceSyncStatus = "IN_PROGRESS" + // Syncing has completed successfully. + ResourceSyncStatusSucceeded ResourceSyncStatus = "SUCCEEDED" + // Syncing has failed. + ResourceSyncStatusFailed ResourceSyncStatus = "FAILED" +) + +// Values returns all known values for ResourceSyncStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ResourceSyncStatus) Values() []ResourceSyncStatus { + return []ResourceSyncStatus{ + "INITIATED", + "IN_PROGRESS", + "SUCCEEDED", + "FAILED", + } +} + type ServiceStatus string // Enum values for ServiceStatus @@ -152,6 +266,40 @@ func (ServiceStatus) Values() []ServiceStatus { } } +type SyncType string + +// Enum values for SyncType +const ( + SyncTypeTemplateSync SyncType = "TEMPLATE_SYNC" +) + +// Values returns all known values for SyncType. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (SyncType) Values() []SyncType { + return []SyncType{ + "TEMPLATE_SYNC", + } +} + +type TemplateType string + +// Enum values for TemplateType +const ( + TemplateTypeEnvironment TemplateType = "ENVIRONMENT" + TemplateTypeService TemplateType = "SERVICE" +) + +// Values returns all known values for TemplateType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (TemplateType) Values() []TemplateType { + return []TemplateType{ + "ENVIRONMENT", + "SERVICE", + } +} + type TemplateVersionStatus string // Enum values for TemplateVersionStatus diff --git a/service/proton/types/errors.go b/service/proton/types/errors.go index 8681cbdd717..762ebf86116 100644 --- a/service/proton/types/errors.go +++ b/service/proton/types/errors.go @@ -83,8 +83,8 @@ func (e *ResourceNotFoundException) ErrorMessage() string { func (e *ResourceNotFoundException) ErrorCode() string { return "ResourceNotFoundException" } func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// A quota was exceeded. For more information, see AWS Proton Quotas -// (https://docs.aws.amazon.com/proton/latest/adminguide/ag-limits.html) in the AWS +// A quota was exceeded. For more information, see Proton Quotas +// (https://docs.aws.amazon.com/proton/latest/adminguide/ag-limits.html) in the // Proton Administrator Guide. type ServiceQuotaExceededException struct { Message *string diff --git a/service/proton/types/types.go b/service/proton/types/types.go index 661ad251a28..8f5bab238bc 100644 --- a/service/proton/types/types.go +++ b/service/proton/types/types.go @@ -7,10 +7,17 @@ import ( "time" ) -// The AWS Proton pipeline service role data. +// The Proton pipeline service role and repository data. type AccountSettings struct { - // The Amazon Resource Name (ARN) of the AWS Proton pipeline service role. + // The repository that you provide with pull request provisioning. Provisioning by + // pull request is currently in feature preview and is only usable with Terraform + // based Proton Templates. To learn more about Amazon Web Services Feature Preview + // terms (https://aws.amazon.com/service-terms), see section 2 on Beta and + // Previews. + PipelineProvisioningRepository *RepositoryBranch + + // The Amazon Resource Name (ARN) of the Proton pipeline service role. PipelineServiceRoleArn *string noSmithyDocumentSerde @@ -48,8 +55,8 @@ type CompatibleEnvironmentTemplateInput struct { noSmithyDocumentSerde } -// The environment detail data. An AWS Proton environment is a set resources shared -// across an AWS Proton service. +// The environment detail data. An Proton environment is a set resources shared +// across an Proton service. type Environment struct { // The Amazon Resource Name (ARN) of the environment. @@ -111,14 +118,21 @@ type Environment struct { // are provisioned in. EnvironmentAccountId *string - // The Amazon Resource Name (ARN) of the AWS Proton service role that allows AWS - // Proton to make calls to other services on your behalf. + // The Amazon Resource Name (ARN) of the Proton service role that allows Proton to + // make calls to other services on your behalf. ProtonServiceRoleArn *string // When included, indicates that the environment template is for customer // provisioned and managed infrastructure. Provisioning Provisioning + // The repository that you provide with pull request provisioning. Provisioning by + // pull request is currently in feature preview and is only usable with Terraform + // based Proton Templates. To learn more about Amazon Web Services Feature Preview + // terms (https://aws.amazon.com/service-terms), see section 2 on Beta and + // Previews. + ProvisioningRepository *RepositoryBranch + // The environment spec. // // This value conforms to the media type: application/yaml @@ -267,12 +281,12 @@ type EnvironmentSummary struct { // This member is required. Name *string - // The ID of the major version of the environment template. + // The major version of the environment template. // // This member is required. TemplateMajorVersion *string - // The ID of the minor version of the environment template. + // The minor version of the environment template. // // This member is required. TemplateMinorVersion *string @@ -296,8 +310,8 @@ type EnvironmentSummary struct { // are provisioned in. EnvironmentAccountId *string - // The Amazon Resource Name (ARN) of the AWS Proton service role that allows AWS - // Proton to make calls to other services on your behalf. + // The Amazon Resource Name (ARN) of the Proton service role that allows Proton to + // make calls to other services on your behalf. ProtonServiceRoleArn *string // When included, indicates that the environment template is for customer @@ -398,7 +412,7 @@ type EnvironmentTemplateSummary struct { // provisioned and managed infrastructure. Provisioning Provisioning - // The ID of the recommended version of the environment template. + // The recommended version of the environment template. RecommendedVersion *string noSmithyDocumentSerde @@ -422,13 +436,13 @@ type EnvironmentTemplateVersion struct { // This member is required. LastModifiedAt *time.Time - // The ID of the latest major version that's associated with the version of an - // environment template. + // The latest major version that's associated with the version of an environment + // template. // // This member is required. MajorVersion *string - // The ID of the minor version of an environment template. + // The minor version of an environment template. // // This member is required. MinorVersion *string @@ -446,7 +460,7 @@ type EnvironmentTemplateVersion struct { // A description of the minor version of an environment template. Description *string - // The ID of the recommended minor version of the environment template. + // The recommended minor version of the environment template. RecommendedMinorVersion *string // The schema of the version of an environment template. @@ -478,13 +492,13 @@ type EnvironmentTemplateVersionSummary struct { // This member is required. LastModifiedAt *time.Time - // The ID of the latest major version that's associated with the version of an - // environment template. + // The latest major version that's associated with the version of an environment + // template. // // This member is required. MajorVersion *string - // The ID of the version of an environment template. + // The version of an environment template. // // This member is required. MinorVersion *string @@ -502,7 +516,7 @@ type EnvironmentTemplateVersionSummary struct { // A description of the version of an environment template. Description *string - // The ID of the recommended minor version of the environment template. + // The recommended minor version of the environment template. RecommendedMinorVersion *string // The status message of the version of an environment template. @@ -511,6 +525,303 @@ type EnvironmentTemplateVersionSummary struct { noSmithyDocumentSerde } +// An infrastructure as code defined resource output. +type Output struct { + + // The output key. + Key *string + + // The output value. + ValueString *string + + noSmithyDocumentSerde +} + +// Detail data for a provisioned resource. +type ProvisionedResource struct { + + // The provisioned resource identifier. + Identifier *string + + // The provisioned resource name. + Name *string + + // The resource provisioning engine. Provisioning by pull request is currently in + // feature preview and is only usable with Terraform based Proton Templates. To + // learn more about Amazon Web Services Feature Preview terms + // (https://aws.amazon.com/service-terms), see section 2 on Beta and Previews. + ProvisioningEngine ProvisionedResourceEngine + + noSmithyDocumentSerde +} + +// Detail date for a repository that has been registered with Proton. +type Repository struct { + + // The repository Amazon Resource Name (ARN). + // + // This member is required. + Arn *string + + // The repository Amazon Web Services CodeStar connection that connects Proton to + // your repository. + // + // This member is required. + ConnectionArn *string + + // The repository name. + // + // This member is required. + Name *string + + // The repository provider. + // + // This member is required. + Provider RepositoryProvider + + // Your customer Amazon Web Services KMS encryption key. + EncryptionKey *string + + noSmithyDocumentSerde +} + +// Detail data for a repository branch. Provisioning by pull request is currently +// in feature preview and is only usable with Terraform based Proton Templates. To +// learn more about Amazon Web Services Feature Preview terms +// (https://aws.amazon.com/service-terms), see section 2 on Beta and Previews. +type RepositoryBranch struct { + + // The Amazon Resource Name (ARN) of the repository branch. + // + // This member is required. + Arn *string + + // The repository branch. + // + // This member is required. + Branch *string + + // The repository name. + // + // This member is required. + Name *string + + // The repository provider. + // + // This member is required. + Provider RepositoryProvider + + noSmithyDocumentSerde +} + +// Detail input data for a repository branch. Provisioning by pull request is +// currently in feature preview and is only usable with Terraform based Proton +// Templates. To learn more about Amazon Web Services Feature Preview terms +// (https://aws.amazon.com/service-terms), see section 2 on Beta and Previews. +type RepositoryBranchInput struct { + + // The repository branch. + // + // This member is required. + Branch *string + + // The repository name. + // + // This member is required. + Name *string + + // The repository provider. + // + // This member is required. + Provider RepositoryProvider + + noSmithyDocumentSerde +} + +// A summary of detail data for a registered repository. +type RepositorySummary struct { + + // The Amazon Resource Name (ARN) for a repository. + // + // This member is required. + Arn *string + + // The repository name. + // + // This member is required. + Name *string + + // The repository provider. + // + // This member is required. + Provider RepositoryProvider + + noSmithyDocumentSerde +} + +// Detail data for a repository sync attempt activated by a push to a repository. +type RepositorySyncAttempt struct { + + // Detail data for sync attempt events. + // + // This member is required. + Events []RepositorySyncEvent + + // The time when the sync attempt started. + // + // This member is required. + StartedAt *time.Time + + // The sync attempt status. + // + // This member is required. + Status RepositorySyncStatus + + noSmithyDocumentSerde +} + +// The repository sync definition. +type RepositorySyncDefinition struct { + + // The repository branch. + // + // This member is required. + Branch *string + + // The directory in the repository. + // + // This member is required. + Directory *string + + // The resource that is synced from. + // + // This member is required. + Parent *string + + // The resource that is synced to. + // + // This member is required. + Target *string + + noSmithyDocumentSerde +} + +// Repository sync event detail data for a sync attempt. +type RepositorySyncEvent struct { + + // Event detail for a repository sync attempt. + // + // This member is required. + Event *string + + // The time that the sync event occurred. + // + // This member is required. + Time *time.Time + + // The type of event. + // + // This member is required. + Type *string + + // The external ID of the sync event. + ExternalId *string + + noSmithyDocumentSerde +} + +// Detail data for a resource sync attempt activated by a push to a repository. +type ResourceSyncAttempt struct { + + // An array of events with detail data. + // + // This member is required. + Events []ResourceSyncEvent + + // Detail data for the initial repository commit, path and push. + // + // This member is required. + InitialRevision *Revision + + // The time when the sync attempt started. + // + // This member is required. + StartedAt *time.Time + + // The status of the sync attempt. + // + // This member is required. + Status ResourceSyncStatus + + // The resource that is synced to. + // + // This member is required. + Target *string + + // Detail data for the target revision. + // + // This member is required. + TargetRevision *Revision + + noSmithyDocumentSerde +} + +// Detail data for a resource sync event. +type ResourceSyncEvent struct { + + // A resource sync event. + // + // This member is required. + Event *string + + // The time when the event occurred. + // + // This member is required. + Time *time.Time + + // The type of event. + // + // This member is required. + Type *string + + // The external ID for the event. + ExternalId *string + + noSmithyDocumentSerde +} + +// Revision detail data for a commit and push that activates a sync attempt +type Revision struct { + + // The repository branch. + // + // This member is required. + Branch *string + + // The repository directory changed by a commit and push that activated the sync + // attempt. + // + // This member is required. + Directory *string + + // The repository name. + // + // This member is required. + RepositoryName *string + + // The repository provider. + // + // This member is required. + RepositoryProvider RepositoryProvider + + // The secure hash algorithm (SHA) hash for the revision. + // + // This member is required. + Sha *string + + noSmithyDocumentSerde +} + // Template bundle S3 bucket data. type S3ObjectSource struct { @@ -568,7 +879,7 @@ type Service struct { TemplateName *string // The name of the code repository branch that holds the code that's deployed in - // AWS Proton. + // Proton. BranchName *string // A description of a service. @@ -580,12 +891,12 @@ type Service struct { // The Amazon Resource Name (ARN) of the repository connection. For more // information, see Set up a repository connection // (https://docs.aws.amazon.com/proton/latest/adminguide/setting-up-for-service.html#setting-up-vcontrol) - // in the AWS Proton Administrator Guide and Setting up with AWS Proton + // in the Proton Administrator Guide and Setting up with Proton // (https://docs.aws.amazon.com/proton/latest/userguide/proton-setup.html#setup-repo-connection) - // in the AWS Proton User Guide. + // in the Proton User Guide. RepositoryConnectionArn *string - // The ID of the code repository. + // The ID of the source code repository. RepositoryId *string // A service status message. @@ -637,14 +948,14 @@ type ServiceInstance struct { // This member is required. ServiceName *string - // The ID of the major version of the service template that was used to create the - // service instance. + // The major version of the service template that was used to create the service + // instance. // // This member is required. TemplateMajorVersion *string - // The ID of the minor version of the service template that was used to create the - // service instance. + // The minor version of the service template that was used to create the service + // instance. // // This member is required. TemplateMinorVersion *string @@ -708,12 +1019,12 @@ type ServiceInstanceSummary struct { // This member is required. ServiceName *string - // The ID of the major version of a service template. + // The service instance template major version. // // This member is required. TemplateMajorVersion *string - // The ID of the minor version of a service template. + // The service instance template minor version. // // This member is required. TemplateMinorVersion *string @@ -757,14 +1068,14 @@ type ServicePipeline struct { // This member is required. LastDeploymentSucceededAt *time.Time - // The ID of the major version of the service template that was used to create the - // service pipeline. + // The major version of the service template that was used to create the service + // pipeline. // // This member is required. TemplateMajorVersion *string - // The ID of the minor version of the service template that was used to create the - // service pipeline. + // The minor version of the service template that was used to create the service + // pipeline. // // This member is required. TemplateMinorVersion *string @@ -864,7 +1175,7 @@ type ServiceTemplate struct { // template. Otherwise, a service pipeline isn't included in the service template. PipelineProvisioning Provisioning - // The ID of the recommended version of the service template. + // The recommended version of the service template. RecommendedVersion *string noSmithyDocumentSerde @@ -903,7 +1214,7 @@ type ServiceTemplateSummary struct { // template, otherwise a service pipeline isn't included in the service template. PipelineProvisioning Provisioning - // The ID of the recommended version of the service template. + // The recommended version of the service template. RecommendedVersion *string noSmithyDocumentSerde @@ -933,13 +1244,13 @@ type ServiceTemplateVersion struct { // This member is required. LastModifiedAt *time.Time - // The ID of the latest major version that's associated with the version of a - // service template. + // The latest major version that's associated with the version of a service + // template. // // This member is required. MajorVersion *string - // The ID of the minor version of a service template. + // The minor version of a service template. // // This member is required. MinorVersion *string @@ -957,7 +1268,7 @@ type ServiceTemplateVersion struct { // A description of the version of a service template. Description *string - // The ID of the recommended minor version of the service template. + // The recommended minor version of the service template. RecommendedMinorVersion *string // The schema of the version of a service template. @@ -989,13 +1300,13 @@ type ServiceTemplateVersionSummary struct { // This member is required. LastModifiedAt *time.Time - // The ID of the latest major version that's associated with the version of a - // service template. + // The latest major version that's associated with the version of a service + // template. // // This member is required. MajorVersion *string - // The ID of the minor version of a service template. + // The minor version of a service template. // // This member is required. MinorVersion *string @@ -1013,7 +1324,7 @@ type ServiceTemplateVersionSummary struct { // A description of the version of a service template. Description *string - // The ID of the recommended minor version of the service template. + // The recommended minor version of the service template. RecommendedMinorVersion *string // A service template minor version status message. @@ -1038,6 +1349,40 @@ type Tag struct { noSmithyDocumentSerde } +// The detail data for a template sync configuration. +type TemplateSyncConfig struct { + + // The repository branch. + // + // This member is required. + Branch *string + + // The name of the repository, for example myrepos/myrepo. + // + // This member is required. + RepositoryName *string + + // The repository provider. + // + // This member is required. + RepositoryProvider RepositoryProvider + + // The template name. + // + // This member is required. + TemplateName *string + + // The template type. + // + // This member is required. + TemplateType TemplateType + + // A subdirectory path to your template bundle version. + Subdirectory *string + + noSmithyDocumentSerde +} + // Template version source data. // // The following types satisfy this interface: diff --git a/service/proton/validators.go b/service/proton/validators.go index c49f6edb787..e142ae790ae 100644 --- a/service/proton/validators.go +++ b/service/proton/validators.go @@ -170,6 +170,26 @@ func (m *validateOpCreateEnvironmentTemplateVersion) HandleInitialize(ctx contex return next.HandleInitialize(ctx, in) } +type validateOpCreateRepository struct { +} + +func (*validateOpCreateRepository) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateRepository) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateRepositoryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateRepositoryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateService struct { } @@ -230,6 +250,26 @@ func (m *validateOpCreateServiceTemplateVersion) HandleInitialize(ctx context.Co return next.HandleInitialize(ctx, in) } +type validateOpCreateTemplateSyncConfig struct { +} + +func (*validateOpCreateTemplateSyncConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateTemplateSyncConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateTemplateSyncConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateTemplateSyncConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteEnvironmentAccountConnection struct { } @@ -310,6 +350,26 @@ func (m *validateOpDeleteEnvironmentTemplateVersion) HandleInitialize(ctx contex return next.HandleInitialize(ctx, in) } +type validateOpDeleteRepository struct { +} + +func (*validateOpDeleteRepository) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteRepository) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteRepositoryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteRepositoryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteService struct { } @@ -370,6 +430,26 @@ func (m *validateOpDeleteServiceTemplateVersion) HandleInitialize(ctx context.Co return next.HandleInitialize(ctx, in) } +type validateOpDeleteTemplateSyncConfig struct { +} + +func (*validateOpDeleteTemplateSyncConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteTemplateSyncConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteTemplateSyncConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteTemplateSyncConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetEnvironmentAccountConnection struct { } @@ -450,6 +530,46 @@ func (m *validateOpGetEnvironmentTemplateVersion) HandleInitialize(ctx context.C return next.HandleInitialize(ctx, in) } +type validateOpGetRepository struct { +} + +func (*validateOpGetRepository) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetRepository) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetRepositoryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetRepositoryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetRepositorySyncStatus struct { +} + +func (*validateOpGetRepositorySyncStatus) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetRepositorySyncStatus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetRepositorySyncStatusInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetRepositorySyncStatusInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetService struct { } @@ -530,6 +650,46 @@ func (m *validateOpGetServiceTemplateVersion) HandleInitialize(ctx context.Conte return next.HandleInitialize(ctx, in) } +type validateOpGetTemplateSyncConfig struct { +} + +func (*validateOpGetTemplateSyncConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetTemplateSyncConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetTemplateSyncConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetTemplateSyncConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetTemplateSyncStatus struct { +} + +func (*validateOpGetTemplateSyncStatus) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetTemplateSyncStatus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetTemplateSyncStatusInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetTemplateSyncStatusInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListEnvironmentAccountConnections struct { } @@ -550,6 +710,46 @@ func (m *validateOpListEnvironmentAccountConnections) HandleInitialize(ctx conte return next.HandleInitialize(ctx, in) } +type validateOpListEnvironmentOutputs struct { +} + +func (*validateOpListEnvironmentOutputs) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListEnvironmentOutputs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListEnvironmentOutputsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListEnvironmentOutputsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListEnvironmentProvisionedResources struct { +} + +func (*validateOpListEnvironmentProvisionedResources) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListEnvironmentProvisionedResources) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListEnvironmentProvisionedResourcesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListEnvironmentProvisionedResourcesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListEnvironments struct { } @@ -590,6 +790,106 @@ func (m *validateOpListEnvironmentTemplateVersions) HandleInitialize(ctx context return next.HandleInitialize(ctx, in) } +type validateOpListRepositorySyncDefinitions struct { +} + +func (*validateOpListRepositorySyncDefinitions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListRepositorySyncDefinitions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListRepositorySyncDefinitionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListRepositorySyncDefinitionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListServiceInstanceOutputs struct { +} + +func (*validateOpListServiceInstanceOutputs) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListServiceInstanceOutputs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListServiceInstanceOutputsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListServiceInstanceOutputsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListServiceInstanceProvisionedResources struct { +} + +func (*validateOpListServiceInstanceProvisionedResources) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListServiceInstanceProvisionedResources) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListServiceInstanceProvisionedResourcesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListServiceInstanceProvisionedResourcesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListServicePipelineOutputs struct { +} + +func (*validateOpListServicePipelineOutputs) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListServicePipelineOutputs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListServicePipelineOutputsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListServicePipelineOutputsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListServicePipelineProvisionedResources struct { +} + +func (*validateOpListServicePipelineProvisionedResources) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListServicePipelineProvisionedResources) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListServicePipelineProvisionedResourcesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListServicePipelineProvisionedResourcesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListServiceTemplateVersions struct { } @@ -630,6 +930,26 @@ func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpNotifyResourceDeploymentStatusChange struct { +} + +func (*validateOpNotifyResourceDeploymentStatusChange) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpNotifyResourceDeploymentStatusChange) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*NotifyResourceDeploymentStatusChangeInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpNotifyResourceDeploymentStatusChangeInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpRejectEnvironmentAccountConnection struct { } @@ -690,6 +1010,26 @@ func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpUpdateAccountSettings struct { +} + +func (*validateOpUpdateAccountSettings) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateAccountSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateAccountSettingsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateAccountSettingsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateEnvironmentAccountConnection struct { } @@ -870,7 +1210,27 @@ func (m *validateOpUpdateServiceTemplateVersion) HandleInitialize(ctx context.Co return next.HandleInitialize(ctx, in) } -func addOpAcceptEnvironmentAccountConnectionValidationMiddleware(stack *middleware.Stack) error { +type validateOpUpdateTemplateSyncConfig struct { +} + +func (*validateOpUpdateTemplateSyncConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateTemplateSyncConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateTemplateSyncConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateTemplateSyncConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpAcceptEnvironmentAccountConnectionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAcceptEnvironmentAccountConnection{}, middleware.After) } @@ -902,6 +1262,10 @@ func addOpCreateEnvironmentTemplateVersionValidationMiddleware(stack *middleware return stack.Initialize.Add(&validateOpCreateEnvironmentTemplateVersion{}, middleware.After) } +func addOpCreateRepositoryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateRepository{}, middleware.After) +} + func addOpCreateServiceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateService{}, middleware.After) } @@ -914,6 +1278,10 @@ func addOpCreateServiceTemplateVersionValidationMiddleware(stack *middleware.Sta return stack.Initialize.Add(&validateOpCreateServiceTemplateVersion{}, middleware.After) } +func addOpCreateTemplateSyncConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateTemplateSyncConfig{}, middleware.After) +} + func addOpDeleteEnvironmentAccountConnectionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteEnvironmentAccountConnection{}, middleware.After) } @@ -930,6 +1298,10 @@ func addOpDeleteEnvironmentTemplateVersionValidationMiddleware(stack *middleware return stack.Initialize.Add(&validateOpDeleteEnvironmentTemplateVersion{}, middleware.After) } +func addOpDeleteRepositoryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteRepository{}, middleware.After) +} + func addOpDeleteServiceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteService{}, middleware.After) } @@ -942,6 +1314,10 @@ func addOpDeleteServiceTemplateVersionValidationMiddleware(stack *middleware.Sta return stack.Initialize.Add(&validateOpDeleteServiceTemplateVersion{}, middleware.After) } +func addOpDeleteTemplateSyncConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteTemplateSyncConfig{}, middleware.After) +} + func addOpGetEnvironmentAccountConnectionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetEnvironmentAccountConnection{}, middleware.After) } @@ -958,6 +1334,14 @@ func addOpGetEnvironmentTemplateVersionValidationMiddleware(stack *middleware.St return stack.Initialize.Add(&validateOpGetEnvironmentTemplateVersion{}, middleware.After) } +func addOpGetRepositoryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetRepository{}, middleware.After) +} + +func addOpGetRepositorySyncStatusValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetRepositorySyncStatus{}, middleware.After) +} + func addOpGetServiceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetService{}, middleware.After) } @@ -974,10 +1358,26 @@ func addOpGetServiceTemplateVersionValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpGetServiceTemplateVersion{}, middleware.After) } +func addOpGetTemplateSyncConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetTemplateSyncConfig{}, middleware.After) +} + +func addOpGetTemplateSyncStatusValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetTemplateSyncStatus{}, middleware.After) +} + func addOpListEnvironmentAccountConnectionsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListEnvironmentAccountConnections{}, middleware.After) } +func addOpListEnvironmentOutputsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListEnvironmentOutputs{}, middleware.After) +} + +func addOpListEnvironmentProvisionedResourcesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListEnvironmentProvisionedResources{}, middleware.After) +} + func addOpListEnvironmentsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListEnvironments{}, middleware.After) } @@ -986,6 +1386,26 @@ func addOpListEnvironmentTemplateVersionsValidationMiddleware(stack *middleware. return stack.Initialize.Add(&validateOpListEnvironmentTemplateVersions{}, middleware.After) } +func addOpListRepositorySyncDefinitionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListRepositorySyncDefinitions{}, middleware.After) +} + +func addOpListServiceInstanceOutputsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListServiceInstanceOutputs{}, middleware.After) +} + +func addOpListServiceInstanceProvisionedResourcesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListServiceInstanceProvisionedResources{}, middleware.After) +} + +func addOpListServicePipelineOutputsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListServicePipelineOutputs{}, middleware.After) +} + +func addOpListServicePipelineProvisionedResourcesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListServicePipelineProvisionedResources{}, middleware.After) +} + func addOpListServiceTemplateVersionsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListServiceTemplateVersions{}, middleware.After) } @@ -994,6 +1414,10 @@ func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } +func addOpNotifyResourceDeploymentStatusChangeValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpNotifyResourceDeploymentStatusChange{}, middleware.After) +} + func addOpRejectEnvironmentAccountConnectionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRejectEnvironmentAccountConnection{}, middleware.After) } @@ -1006,6 +1430,10 @@ func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) } +func addOpUpdateAccountSettingsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateAccountSettings{}, middleware.After) +} + func addOpUpdateEnvironmentAccountConnectionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateEnvironmentAccountConnection{}, middleware.After) } @@ -1042,6 +1470,10 @@ func addOpUpdateServiceTemplateVersionValidationMiddleware(stack *middleware.Sta return stack.Initialize.Add(&validateOpUpdateServiceTemplateVersion{}, middleware.After) } +func addOpUpdateTemplateSyncConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateTemplateSyncConfig{}, middleware.After) +} + func validateCompatibleEnvironmentTemplateInput(v *types.CompatibleEnvironmentTemplateInput) error { if v == nil { return nil @@ -1112,6 +1544,27 @@ func validateEnvironmentTemplateFilterList(v []types.EnvironmentTemplateFilter) } } +func validateRepositoryBranchInput(v *types.RepositoryBranchInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RepositoryBranchInput"} + if len(v.Provider) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Provider")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Branch == nil { + invalidParams.Add(smithy.NewErrParamRequired("Branch")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateS3ObjectSource(v *types.S3ObjectSource) error { if v == nil { return nil @@ -1261,6 +1714,11 @@ func validateOpCreateEnvironmentAccountConnectionInput(v *CreateEnvironmentAccou if v.EnvironmentName == nil { invalidParams.Add(smithy.NewErrParamRequired("EnvironmentName")) } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1290,6 +1748,11 @@ func validateOpCreateEnvironmentInput(v *CreateEnvironmentInput) error { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } + if v.ProvisioningRepository != nil { + if err := validateRepositoryBranchInput(v.ProvisioningRepository); err != nil { + invalidParams.AddNested("ProvisioningRepository", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1344,6 +1807,27 @@ func validateOpCreateEnvironmentTemplateVersionInput(v *CreateEnvironmentTemplat } } +func validateOpCreateRepositoryInput(v *CreateRepositoryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateRepositoryInput"} + if len(v.Provider) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Provider")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.ConnectionArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConnectionArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateServiceInput(v *CreateServiceInput) error { if v == nil { return nil @@ -1427,6 +1911,33 @@ func validateOpCreateServiceTemplateVersionInput(v *CreateServiceTemplateVersion } } +func validateOpCreateTemplateSyncConfigInput(v *CreateTemplateSyncConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateTemplateSyncConfigInput"} + if v.TemplateName == nil { + invalidParams.Add(smithy.NewErrParamRequired("TemplateName")) + } + if len(v.TemplateType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("TemplateType")) + } + if len(v.RepositoryProvider) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("RepositoryProvider")) + } + if v.RepositoryName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RepositoryName")) + } + if v.Branch == nil { + invalidParams.Add(smithy.NewErrParamRequired("Branch")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteEnvironmentAccountConnectionInput(v *DeleteEnvironmentAccountConnectionInput) error { if v == nil { return nil @@ -1493,6 +2004,24 @@ func validateOpDeleteEnvironmentTemplateVersionInput(v *DeleteEnvironmentTemplat } } +func validateOpDeleteRepositoryInput(v *DeleteRepositoryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteRepositoryInput"} + if len(v.Provider) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Provider")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteServiceInput(v *DeleteServiceInput) error { if v == nil { return nil @@ -1544,6 +2073,24 @@ func validateOpDeleteServiceTemplateVersionInput(v *DeleteServiceTemplateVersion } } +func validateOpDeleteTemplateSyncConfigInput(v *DeleteTemplateSyncConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteTemplateSyncConfigInput"} + if v.TemplateName == nil { + invalidParams.Add(smithy.NewErrParamRequired("TemplateName")) + } + if len(v.TemplateType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("TemplateType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetEnvironmentAccountConnectionInput(v *GetEnvironmentAccountConnectionInput) error { if v == nil { return nil @@ -1610,6 +2157,48 @@ func validateOpGetEnvironmentTemplateVersionInput(v *GetEnvironmentTemplateVersi } } +func validateOpGetRepositoryInput(v *GetRepositoryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetRepositoryInput"} + if len(v.Provider) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Provider")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetRepositorySyncStatusInput(v *GetRepositorySyncStatusInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetRepositorySyncStatusInput"} + if v.RepositoryName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RepositoryName")) + } + if len(v.RepositoryProvider) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("RepositoryProvider")) + } + if v.Branch == nil { + invalidParams.Add(smithy.NewErrParamRequired("Branch")) + } + if len(v.SyncType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SyncType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetServiceInput(v *GetServiceInput) error { if v == nil { return nil @@ -1679,6 +2268,45 @@ func validateOpGetServiceTemplateVersionInput(v *GetServiceTemplateVersionInput) } } +func validateOpGetTemplateSyncConfigInput(v *GetTemplateSyncConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetTemplateSyncConfigInput"} + if v.TemplateName == nil { + invalidParams.Add(smithy.NewErrParamRequired("TemplateName")) + } + if len(v.TemplateType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("TemplateType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetTemplateSyncStatusInput(v *GetTemplateSyncStatusInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetTemplateSyncStatusInput"} + if v.TemplateName == nil { + invalidParams.Add(smithy.NewErrParamRequired("TemplateName")) + } + if len(v.TemplateType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("TemplateType")) + } + if v.TemplateVersion == nil { + invalidParams.Add(smithy.NewErrParamRequired("TemplateVersion")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListEnvironmentAccountConnectionsInput(v *ListEnvironmentAccountConnectionsInput) error { if v == nil { return nil @@ -1694,6 +2322,36 @@ func validateOpListEnvironmentAccountConnectionsInput(v *ListEnvironmentAccountC } } +func validateOpListEnvironmentOutputsInput(v *ListEnvironmentOutputsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListEnvironmentOutputsInput"} + if v.EnvironmentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListEnvironmentProvisionedResourcesInput(v *ListEnvironmentProvisionedResourcesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListEnvironmentProvisionedResourcesInput"} + if v.EnvironmentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListEnvironmentsInput(v *ListEnvironmentsInput) error { if v == nil { return nil @@ -1726,6 +2384,93 @@ func validateOpListEnvironmentTemplateVersionsInput(v *ListEnvironmentTemplateVe } } +func validateOpListRepositorySyncDefinitionsInput(v *ListRepositorySyncDefinitionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListRepositorySyncDefinitionsInput"} + if v.RepositoryName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RepositoryName")) + } + if len(v.RepositoryProvider) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("RepositoryProvider")) + } + if len(v.SyncType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SyncType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListServiceInstanceOutputsInput(v *ListServiceInstanceOutputsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListServiceInstanceOutputsInput"} + if v.ServiceInstanceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServiceInstanceName")) + } + if v.ServiceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServiceName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListServiceInstanceProvisionedResourcesInput(v *ListServiceInstanceProvisionedResourcesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListServiceInstanceProvisionedResourcesInput"} + if v.ServiceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServiceName")) + } + if v.ServiceInstanceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServiceInstanceName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListServicePipelineOutputsInput(v *ListServicePipelineOutputsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListServicePipelineOutputsInput"} + if v.ServiceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServiceName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListServicePipelineProvisionedResourcesInput(v *ListServicePipelineProvisionedResourcesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListServicePipelineProvisionedResourcesInput"} + if v.ServiceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServiceName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListServiceTemplateVersionsInput(v *ListServiceTemplateVersionsInput) error { if v == nil { return nil @@ -1756,6 +2501,24 @@ func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { } } +func validateOpNotifyResourceDeploymentStatusChangeInput(v *NotifyResourceDeploymentStatusChangeInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "NotifyResourceDeploymentStatusChangeInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if len(v.Status) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Status")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpRejectEnvironmentAccountConnectionInput(v *RejectEnvironmentAccountConnectionInput) error { if v == nil { return nil @@ -1811,6 +2574,23 @@ func validateOpUntagResourceInput(v *UntagResourceInput) error { } } +func validateOpUpdateAccountSettingsInput(v *UpdateAccountSettingsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateAccountSettingsInput"} + if v.PipelineProvisioningRepository != nil { + if err := validateRepositoryBranchInput(v.PipelineProvisioningRepository); err != nil { + invalidParams.AddNested("PipelineProvisioningRepository", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateEnvironmentAccountConnectionInput(v *UpdateEnvironmentAccountConnectionInput) error { if v == nil { return nil @@ -1840,6 +2620,11 @@ func validateOpUpdateEnvironmentInput(v *UpdateEnvironmentInput) error { if len(v.DeploymentType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("DeploymentType")) } + if v.ProvisioningRepository != nil { + if err := validateRepositoryBranchInput(v.ProvisioningRepository); err != nil { + invalidParams.AddNested("ProvisioningRepository", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1980,3 +2765,30 @@ func validateOpUpdateServiceTemplateVersionInput(v *UpdateServiceTemplateVersion return nil } } + +func validateOpUpdateTemplateSyncConfigInput(v *UpdateTemplateSyncConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateTemplateSyncConfigInput"} + if v.TemplateName == nil { + invalidParams.Add(smithy.NewErrParamRequired("TemplateName")) + } + if len(v.TemplateType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("TemplateType")) + } + if len(v.RepositoryProvider) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("RepositoryProvider")) + } + if v.RepositoryName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RepositoryName")) + } + if v.Branch == nil { + invalidParams.Add(smithy.NewErrParamRequired("Branch")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/quicksight/api_op_CreateAccountCustomization.go b/service/quicksight/api_op_CreateAccountCustomization.go index 1128e0aadc6..f6da74b7709 100644 --- a/service/quicksight/api_op_CreateAccountCustomization.go +++ b/service/quicksight/api_op_CreateAccountCustomization.go @@ -18,17 +18,20 @@ import ( // and videos for all new users, see Customizing Amazon QuickSight // (https://docs.aws.amazon.com/quicksight/latest/user/customizing-quicksight.html) // in the Amazon QuickSight User Guide. You can create customizations for your -// Amazon Web Services account or, if you specify a namespace, for a Amazon -// QuickSight namespace instead. Customizations that apply to a namespace always -// override customizations that apply to an Amazon Web Services account. To find -// out which customizations apply, use the DescribeAccountCustomization API -// operation. Before you use the CreateAccountCustomization API operation to add a -// theme as the namespace default, make sure that you first share the theme with -// the namespace. If you don't share it with the namespace, the theme isn't visible -// to your users even if you make it the default theme. To check if the theme is -// shared, view the current permissions by using the DescribeThemePermissions API -// operation. To share the theme, grant permissions by using the -// UpdateThemePermissions API operation. +// Amazon Web Services account or, if you specify a namespace, for a QuickSight +// namespace instead. Customizations that apply to a namespace always override +// customizations that apply to an Amazon Web Services account. To find out which +// customizations apply, use the DescribeAccountCustomization API operation. Before +// you use the CreateAccountCustomization API operation to add a theme as the +// namespace default, make sure that you first share the theme with the namespace. +// If you don't share it with the namespace, the theme isn't visible to your users +// even if you make it the default theme. To check if the theme is shared, view the +// current permissions by using the DescribeThemePermissions +// (https://docs.aws.amazon.com/quicksight/latest/APIReference/API_DescribeThemePermissions.html) +// API operation. To share the theme, grant permissions by using the +// UpdateThemePermissions +// (https://docs.aws.amazon.com/quicksight/latest/APIReference/API_UpdateThemePermissions.html) +// API operation. func (c *Client) CreateAccountCustomization(ctx context.Context, params *CreateAccountCustomizationInput, optFns ...func(*Options)) (*CreateAccountCustomizationOutput, error) { if params == nil { params = &CreateAccountCustomizationInput{} @@ -48,7 +51,7 @@ type CreateAccountCustomizationInput struct { // The Amazon QuickSight customizations you're adding in the current Amazon Web // Services Region. You can add these to an Amazon Web Services account and a - // Amazon QuickSight namespace. For example, you can add a default theme by setting + // QuickSight namespace. For example, you can add a default theme by setting // AccountCustomization to the midnight theme: "AccountCustomization": { // "DefaultTheme": "arn:aws:quicksight::aws:theme/MIDNIGHT" }. Or, you can add a // custom theme by specifying "AccountCustomization": { "DefaultTheme": diff --git a/service/quicksight/api_op_CreateDashboard.go b/service/quicksight/api_op_CreateDashboard.go index b5ac5f3fea0..5f158a69fb8 100644 --- a/service/quicksight/api_op_CreateDashboard.go +++ b/service/quicksight/api_op_CreateDashboard.go @@ -12,12 +12,14 @@ import ( ) // Creates a dashboard from a template. To first create a template, see the -// CreateTemplate API operation. A dashboard is an entity in Amazon QuickSight that -// identifies Amazon QuickSight reports, created from analyses. You can share -// Amazon QuickSight dashboards. With the right permissions, you can create -// scheduled email reports from them. If you have the correct permissions, you can -// create a dashboard from a template that exists in a different Amazon Web -// Services account. +// CreateTemplate +// (https://docs.aws.amazon.com/quicksight/latest/APIReference/API_CreateTemplate.html) +// API operation. A dashboard is an entity in Amazon QuickSight that identifies +// Amazon QuickSight reports, created from analyses. You can share Amazon +// QuickSight dashboards. With the right permissions, you can create scheduled +// email reports from them. If you have the correct permissions, you can create a +// dashboard from a template that exists in a different Amazon Web Services +// account. func (c *Client) CreateDashboard(ctx context.Context, params *CreateDashboardInput, optFns ...func(*Options)) (*CreateDashboardOutput, error) { if params == nil { params = &CreateDashboardInput{} @@ -41,7 +43,7 @@ type CreateDashboardInput struct { // This member is required. AwsAccountId *string - // The ID for the dashboard, also added to the IAMpolicy. + // The ID for the dashboard, also added to the IAM policy. // // This member is required. DashboardId *string @@ -55,12 +57,14 @@ type CreateDashboardInput struct { // SourceEntity, you specify the type of object you're using as source. You can // only create a dashboard from a template, so you use a SourceTemplate entity. If // you need to create a dashboard from an analysis, first convert the analysis to a - // template by using the CreateTemplate API operation. For SourceTemplate, specify - // the Amazon Resource Name (ARN) of the source template. The SourceTemplateARN can - // contain any Amazon Web Services account and any Amazon QuickSight-supported - // Amazon Web Services Region. Use the DataSetReferences entity within - // SourceTemplate to list the replacement datasets for the placeholders listed in - // the original. The schema in each dataset must match its placeholder. + // template by using the CreateTemplate + // (https://docs.aws.amazon.com/quicksight/latest/APIReference/API_CreateTemplate.html) + // API operation. For SourceTemplate, specify the Amazon Resource Name (ARN) of the + // source template. The SourceTemplateARN can contain any Amazon Web Services + // account and any Amazon QuickSight-supported Amazon Web Services Region. Use the + // DataSetReferences entity within SourceTemplate to list the replacement datasets + // for the placeholders listed in the original. The schema in each dataset must + // match its placeholder. // // This member is required. SourceEntity *types.DashboardSourceEntity @@ -88,7 +92,7 @@ type CreateDashboardInput struct { Parameters *types.Parameters // A structure that contains the permissions of the dashboard. You can use this - // structure for granting permissions by providing a list of IAMaction information + // structure for granting permissions by providing a list of IAM action information // for each principal ARN. To specify no permissions, omit the permissions list. Permissions []types.ResourcePermission diff --git a/service/quicksight/api_op_CreateDataSet.go b/service/quicksight/api_op_CreateDataSet.go index cabc4251f94..2fa3cd50080 100644 --- a/service/quicksight/api_op_CreateDataSet.go +++ b/service/quicksight/api_op_CreateDataSet.go @@ -59,7 +59,8 @@ type CreateDataSetInput struct { // Currently, only geospatial hierarchy is supported. ColumnGroups []types.ColumnGroup - // A set of one or more definitions of a ColumnLevelPermissionRule. + // A set of one or more definitions of a ColumnLevelPermissionRule + // (https://docs.aws.amazon.com/quicksight/latest/APIReference/API_ColumnLevelPermissionRule.html). ColumnLevelPermissionRules []types.ColumnLevelPermissionRule // The usage configuration to apply to child datasets that reference this dataset diff --git a/service/quicksight/api_op_CreateFolder.go b/service/quicksight/api_op_CreateFolder.go index 1335370b82c..dc565388cee 100644 --- a/service/quicksight/api_op_CreateFolder.go +++ b/service/quicksight/api_op_CreateFolder.go @@ -29,12 +29,12 @@ func (c *Client) CreateFolder(ctx context.Context, params *CreateFolderInput, op type CreateFolderInput struct { - // The AWS Account ID. + // The ID for the Amazon Web Services account where you want to create the folder. // // This member is required. AwsAccountId *string - // The folder ID. + // The ID of the folder. // // This member is required. FolderId *string @@ -70,7 +70,7 @@ type CreateFolderOutput struct { // The request ID for the newly created folder. RequestId *string - // The status of the newly created folder. If succeeded, the status is SC_OK (200). + // The HTTP status of the request. Status int32 // Metadata pertaining to the operation's result. diff --git a/service/quicksight/api_op_CreateFolderMembership.go b/service/quicksight/api_op_CreateFolderMembership.go index 41f7253898e..1259615908b 100644 --- a/service/quicksight/api_op_CreateFolderMembership.go +++ b/service/quicksight/api_op_CreateFolderMembership.go @@ -29,12 +29,12 @@ func (c *Client) CreateFolderMembership(ctx context.Context, params *CreateFolde type CreateFolderMembershipInput struct { - // The AWS Account ID. + // The ID for the Amazon Web Services account that contains the folder. // // This member is required. AwsAccountId *string - // The folder ID. + // The ID of the folder. // // This member is required. FolderId *string @@ -57,10 +57,10 @@ type CreateFolderMembershipOutput struct { // Information about the member in the folder. FolderMember *types.FolderMember - // The request ID. + // The Amazon Web Services request ID for this operation. RequestId *string - // The status of the folder membership. If succeeded, the status is SC_OK (200). + // The HTTP status of the request. Status int32 // Metadata pertaining to the operation's result. diff --git a/service/quicksight/api_op_CreateIAMPolicyAssignment.go b/service/quicksight/api_op_CreateIAMPolicyAssignment.go index 5986ac8f03d..486fc4c4469 100644 --- a/service/quicksight/api_op_CreateIAMPolicyAssignment.go +++ b/service/quicksight/api_op_CreateIAMPolicyAssignment.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates an assignment with one specified IAMpolicy, identified by its Amazon +// Creates an assignment with one specified IAM policy, identified by its Amazon // Resource Name (ARN). This policy assignment is attached to the specified groups // or users of Amazon QuickSight. Assignment names are unique per Amazon Web // Services account. To avoid overwriting rules in other namespaces, use assignment @@ -54,7 +54,7 @@ type CreateIAMPolicyAssignmentInput struct { // This member is required. AssignmentStatus types.AssignmentStatus - // The ID of the Amazon Web Services account where you want to assign an IAMpolicy + // The ID of the Amazon Web Services account where you want to assign an IAM policy // to Amazon QuickSight users or groups. // // This member is required. @@ -69,7 +69,7 @@ type CreateIAMPolicyAssignmentInput struct { // to. Identities map[string][]string - // The ARN for the IAMpolicy to apply to the Amazon QuickSight users and groups + // The ARN for the IAM policy to apply to the Amazon QuickSight users and groups // specified in this assignment. PolicyArn *string @@ -98,10 +98,10 @@ type CreateIAMPolicyAssignmentOutput struct { // source. AssignmentStatus types.AssignmentStatus - // The Amazon QuickSight users, groups, or both that the IAMpolicy is assigned to. + // The Amazon QuickSight users, groups, or both that the IAM policy is assigned to. Identities map[string][]string - // The ARN for the IAMpolicy that is applied to the Amazon QuickSight users and + // The ARN for the IAM policy that is applied to the Amazon QuickSight users and // groups specified in this assignment. PolicyArn *string diff --git a/service/quicksight/api_op_CreateTheme.go b/service/quicksight/api_op_CreateTheme.go index 37756dfe0e2..746eee38c81 100644 --- a/service/quicksight/api_op_CreateTheme.go +++ b/service/quicksight/api_op_CreateTheme.go @@ -40,8 +40,7 @@ type CreateThemeInput struct { // The ID of the theme that a custom theme will inherit from. All themes inherit // from one of the starting themes defined by Amazon QuickSight. For a list of the - // starting themes, use ListThemes or choose Themes from within a Amazon QuickSight - // analysis. + // starting themes, use ListThemes or choose Themes from within an analysis. // // This member is required. BaseThemeId *string diff --git a/service/quicksight/api_op_DeleteFolder.go b/service/quicksight/api_op_DeleteFolder.go index 69c453de04c..b2942e6ef72 100644 --- a/service/quicksight/api_op_DeleteFolder.go +++ b/service/quicksight/api_op_DeleteFolder.go @@ -28,12 +28,12 @@ func (c *Client) DeleteFolder(ctx context.Context, params *DeleteFolderInput, op type DeleteFolderInput struct { - // The AWS Account ID for the folder. + // The ID for the Amazon Web Services account that contains the folder. // // This member is required. AwsAccountId *string - // The folder ID. + // The ID of the folder. // // This member is required. FolderId *string @@ -46,13 +46,13 @@ type DeleteFolderOutput struct { // The Amazon Resource Name of the deleted folder. Arn *string - // The folder ID. + // The ID of the folder. FolderId *string - // The request ID. + // The Amazon Web Services request ID for this operation. RequestId *string - // The status of deleting the folder. If succeeded, the status is SC_OK (200). + // The HTTP status of the request. Status int32 // Metadata pertaining to the operation's result. diff --git a/service/quicksight/api_op_DeleteFolderMembership.go b/service/quicksight/api_op_DeleteFolderMembership.go index ffc5a1d041d..ba7edcdb1a7 100644 --- a/service/quicksight/api_op_DeleteFolderMembership.go +++ b/service/quicksight/api_op_DeleteFolderMembership.go @@ -29,7 +29,7 @@ func (c *Client) DeleteFolderMembership(ctx context.Context, params *DeleteFolde type DeleteFolderMembershipInput struct { - // The AWS Account ID. + // The ID for the Amazon Web Services account that contains the folder. // // This member is required. AwsAccountId *string @@ -55,10 +55,10 @@ type DeleteFolderMembershipInput struct { type DeleteFolderMembershipOutput struct { - // The request ID. + // The Amazon Web Services request ID for this operation. RequestId *string - // The status of deleting the asset. If succeeded, the status is SC_OK (200). + // The HTTP status of the request. Status int32 // Metadata pertaining to the operation's result. diff --git a/service/quicksight/api_op_DeleteIAMPolicyAssignment.go b/service/quicksight/api_op_DeleteIAMPolicyAssignment.go index 39740991fe3..0615ae02acc 100644 --- a/service/quicksight/api_op_DeleteIAMPolicyAssignment.go +++ b/service/quicksight/api_op_DeleteIAMPolicyAssignment.go @@ -10,7 +10,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes an existing IAMpolicy assignment. +// Deletes an existing IAM policy assignment. func (c *Client) DeleteIAMPolicyAssignment(ctx context.Context, params *DeleteIAMPolicyAssignmentInput, optFns ...func(*Options)) (*DeleteIAMPolicyAssignmentOutput, error) { if params == nil { params = &DeleteIAMPolicyAssignmentInput{} @@ -33,7 +33,7 @@ type DeleteIAMPolicyAssignmentInput struct { // This member is required. AssignmentName *string - // The Amazon Web Services account ID where you want to delete the IAMpolicy + // The Amazon Web Services account ID where you want to delete the IAM policy // assignment. // // This member is required. diff --git a/service/quicksight/api_op_DescribeAccountCustomization.go b/service/quicksight/api_op_DescribeAccountCustomization.go index f0304cdfce5..2e57cf33ebe 100644 --- a/service/quicksight/api_op_DescribeAccountCustomization.go +++ b/service/quicksight/api_op_DescribeAccountCustomization.go @@ -20,20 +20,20 @@ import ( // // * Amazon Web Services account - The // Amazon Web Services account exists at the top of the hierarchy. It has the -// potential to use all of the Amazon Web Services Regions and AWS Services. When -// you subscribe to Amazon QuickSight, you choose one Amazon Web Services Region to -// use as your home Region. That's where your free SPICE capacity is located. You -// can use Amazon QuickSight in any supported Amazon Web Services Region. +// potential to use all of the Amazon Web Services Regions and Amazon Web Services +// Services. When you subscribe to Amazon QuickSight, you choose one Amazon Web +// Services Region to use as your home Region. That's where your free SPICE +// capacity is located. You can use Amazon QuickSight in any supported Amazon Web +// Services Region. // -// * Amazon -// Web Services Region - In each Amazon Web Services Region where you sign in to -// Amazon QuickSight at least once, Amazon QuickSight acts as a separate instance -// of the same service. If you have a user directory, it resides in us-east-1, -// which is the US East (N. Virginia). Generally speaking, these users have access -// to Amazon QuickSight in any Amazon Web Services Region, unless they are -// constrained to a namespace. To run the command in a different Amazon Web -// Services Region, you change your Region settings. If you're using the AWS CLI, -// you can use one of the following options: +// * Amazon Web Services Region - In each Amazon Web Services +// Region where you sign in to Amazon QuickSight at least once, Amazon QuickSight +// acts as a separate instance of the same service. If you have a user directory, +// it resides in us-east-1, which is the US East (N. Virginia). Generally speaking, +// these users have access to Amazon QuickSight in any Amazon Web Services Region, +// unless they are constrained to a namespace. To run the command in a different +// Amazon Web Services Region, you change your Region settings. If you're using the +// CLI, you can use one of the following options: // // * Use command line options // (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-options.html). @@ -45,21 +45,21 @@ import ( // * // Run aws configure to change your default Amazon Web Services Region. Use Enter // to key the same settings for your keys. For more information, see Configuring -// the AWS CLI +// the CLI // (https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html). // // * -// Namespace - A Amazon QuickSight namespace is a partition that contains users and -// assets (data sources, datasets, dashboards, and so on). To access assets that -// are in a specific namespace, users and groups must also be part of the same -// namespace. People who share a namespace are completely isolated from users and -// assets in other namespaces, even if they are in the same Amazon Web Services -// account and Amazon Web Services Region. +// Namespace - A QuickSight namespace is a partition that contains users and assets +// (data sources, datasets, dashboards, and so on). To access assets that are in a +// specific namespace, users and groups must also be part of the same namespace. +// People who share a namespace are completely isolated from users and assets in +// other namespaces, even if they are in the same Amazon Web Services account and +// Amazon Web Services Region. // -// * Applied customizations - Within an -// Amazon Web Services Region, a set of Amazon QuickSight customizations can apply -// to an Amazon Web Services account or to a namespace. Settings that you apply to -// a namespace override settings that you apply to an Amazon Web Services account. +// * Applied customizations - Within an Amazon Web +// Services Region, a set of Amazon QuickSight customizations can apply to an +// Amazon Web Services account or to a namespace. Settings that you apply to a +// namespace override settings that you apply to an Amazon Web Services account. // All settings are isolated to a single Amazon Web Services Region. To apply them // in other Amazon Web Services Regions, run the CreateAccountCustomization command // in each Amazon Web Services Region where you want to apply the same diff --git a/service/quicksight/api_op_DescribeAccountSettings.go b/service/quicksight/api_op_DescribeAccountSettings.go index b89c7da7757..30ac6df209c 100644 --- a/service/quicksight/api_op_DescribeAccountSettings.go +++ b/service/quicksight/api_op_DescribeAccountSettings.go @@ -44,12 +44,12 @@ type DescribeAccountSettingsOutput struct { // The Amazon QuickSight settings for this Amazon Web Services account. This // information includes the edition of Amazon Amazon QuickSight that you subscribed // to (Standard or Enterprise) and the notification email for the Amazon QuickSight - // subscription. In the Amazon QuickSight console, the Amazon QuickSight - // subscription is sometimes referred to as a Amazon QuickSight "account" even - // though it's technically not an account by itself. Instead, it's a subscription - // to the Amazon QuickSight service for your Amazon Web Services account. The - // edition that you subscribe to applies to Amazon QuickSight in every Amazon Web - // Services Region where you use it. + // subscription. In the QuickSight console, the Amazon QuickSight subscription is + // sometimes referred to as a QuickSight "account" even though it's technically not + // an account by itself. Instead, it's a subscription to the Amazon QuickSight + // service for your Amazon Web Services account. The edition that you subscribe to + // applies to Amazon QuickSight in every Amazon Web Services Region where you use + // it. AccountSettings *types.AccountSettings // The Amazon Web Services request ID for this operation. diff --git a/service/quicksight/api_op_DescribeDashboardPermissions.go b/service/quicksight/api_op_DescribeDashboardPermissions.go index cf9e7627f4a..fb138e3f483 100644 --- a/service/quicksight/api_op_DescribeDashboardPermissions.go +++ b/service/quicksight/api_op_DescribeDashboardPermissions.go @@ -35,7 +35,7 @@ type DescribeDashboardPermissionsInput struct { // This member is required. AwsAccountId *string - // The ID for the dashboard, also added to the IAMpolicy. + // The ID for the dashboard, also added to the IAM policy. // // This member is required. DashboardId *string @@ -51,6 +51,13 @@ type DescribeDashboardPermissionsOutput struct { // The ID for the dashboard. DashboardId *string + // A structure that contains the configuration of a shareable link that grants + // access to the dashboard. Your users can use the link to view and interact with + // the dashboard, if the dashboard has been shared with them. For more information + // about sharing dashboards, see Sharing Dashboards + // (https://docs.aws.amazon.com/quicksight/latest/user/sharing-a-dashboard.html). + LinkSharingConfiguration *types.LinkSharingConfiguration + // A structure that contains the permissions for the dashboard. Permissions []types.ResourcePermission diff --git a/service/quicksight/api_op_DescribeFolder.go b/service/quicksight/api_op_DescribeFolder.go index c4615faec44..a96ba352bd6 100644 --- a/service/quicksight/api_op_DescribeFolder.go +++ b/service/quicksight/api_op_DescribeFolder.go @@ -29,12 +29,12 @@ func (c *Client) DescribeFolder(ctx context.Context, params *DescribeFolderInput type DescribeFolderInput struct { - // The AWS account ID. + // The ID for the Amazon Web Services account that contains the folder. // // This member is required. AwsAccountId *string - // The folder ID. + // The ID of the folder. // // This member is required. FolderId *string @@ -47,10 +47,10 @@ type DescribeFolderOutput struct { // Information about the folder. Folder *types.Folder - // The request ID. + // The Amazon Web Services request ID for this operation. RequestId *string - // The status. If succeeded, the status is SC_OK (200). + // The HTTP status of the request. Status int32 // Metadata pertaining to the operation's result. diff --git a/service/quicksight/api_op_DescribeFolderPermissions.go b/service/quicksight/api_op_DescribeFolderPermissions.go index d9d72256eeb..5de2ea15709 100644 --- a/service/quicksight/api_op_DescribeFolderPermissions.go +++ b/service/quicksight/api_op_DescribeFolderPermissions.go @@ -29,12 +29,12 @@ func (c *Client) DescribeFolderPermissions(ctx context.Context, params *Describe type DescribeFolderPermissionsInput struct { - // The AWS Account ID. + // The ID for the Amazon Web Services account that contains the folder. // // This member is required. AwsAccountId *string - // The folder ID. + // The ID of the folder. // // This member is required. FolderId *string @@ -47,16 +47,16 @@ type DescribeFolderPermissionsOutput struct { // The Amazon Resource Name (ARN) for the folder. Arn *string - // The folder ID. + // The ID of the folder. FolderId *string // Information about the permissions on the folder. Permissions []types.ResourcePermission - // The request ID. + // The Amazon Web Services request ID for this operation. RequestId *string - // The status. If succeeded, the status is SC_OK. + // The HTTP status of the request. Status int32 // Metadata pertaining to the operation's result. diff --git a/service/quicksight/api_op_DescribeFolderResolvedPermissions.go b/service/quicksight/api_op_DescribeFolderResolvedPermissions.go index f19881d525b..689a3eac9d2 100644 --- a/service/quicksight/api_op_DescribeFolderResolvedPermissions.go +++ b/service/quicksight/api_op_DescribeFolderResolvedPermissions.go @@ -30,12 +30,12 @@ func (c *Client) DescribeFolderResolvedPermissions(ctx context.Context, params * type DescribeFolderResolvedPermissionsInput struct { - // The AWS account ID. + // The ID for the Amazon Web Services account that contains the folder. // // This member is required. AwsAccountId *string - // The folder ID. + // The ID of the folder. // // This member is required. FolderId *string @@ -45,19 +45,19 @@ type DescribeFolderResolvedPermissionsInput struct { type DescribeFolderResolvedPermissionsOutput struct { - // The Amazon Resource Name (ARN). + // The Amazon Resource Name (ARN) of the folder. Arn *string - // The folder ID. + // The ID of the folder. FolderId *string - // Information about the permissions on the dashboard. + // Information about the permissions for the folder. Permissions []types.ResourcePermission - // The request ID. + // The Amazon Web Services request ID for this operation. RequestId *string - // The status. If succeeded, the status is SC_OK + // The HTTP status of the request. Status int32 // Metadata pertaining to the operation's result. diff --git a/service/quicksight/api_op_DescribeIAMPolicyAssignment.go b/service/quicksight/api_op_DescribeIAMPolicyAssignment.go index 93ee7a773fa..d98a29b76a6 100644 --- a/service/quicksight/api_op_DescribeIAMPolicyAssignment.go +++ b/service/quicksight/api_op_DescribeIAMPolicyAssignment.go @@ -11,7 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Describes an existing IAMpolicy assignment, as specified by the assignment name. +// Describes an existing IAM policy assignment, as specified by the assignment +// name. func (c *Client) DescribeIAMPolicyAssignment(ctx context.Context, params *DescribeIAMPolicyAssignmentInput, optFns ...func(*Options)) (*DescribeIAMPolicyAssignmentOutput, error) { if params == nil { params = &DescribeIAMPolicyAssignmentInput{} @@ -50,7 +51,7 @@ type DescribeIAMPolicyAssignmentInput struct { type DescribeIAMPolicyAssignmentOutput struct { - // Information describing the IAMpolicy assignment. + // Information describing the IAM policy assignment. IAMPolicyAssignment *types.IAMPolicyAssignment // The Amazon Web Services request ID for this operation. diff --git a/service/quicksight/api_op_DescribeIpRestriction.go b/service/quicksight/api_op_DescribeIpRestriction.go index 069a8be3efe..6adce49cdce 100644 --- a/service/quicksight/api_op_DescribeIpRestriction.go +++ b/service/quicksight/api_op_DescribeIpRestriction.go @@ -10,7 +10,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Provides a summary and status of IP Rules. +// Provides a summary and status of IP rules. func (c *Client) DescribeIpRestriction(ctx context.Context, params *DescribeIpRestrictionInput, optFns ...func(*Options)) (*DescribeIpRestrictionOutput, error) { if params == nil { params = &DescribeIpRestrictionInput{} @@ -28,7 +28,7 @@ func (c *Client) DescribeIpRestriction(ctx context.Context, params *DescribeIpRe type DescribeIpRestrictionInput struct { - // Your AWS account ID. + // The ID of the Amazon Web Services account that contains the IP rules. // // This member is required. AwsAccountId *string @@ -38,20 +38,19 @@ type DescribeIpRestrictionInput struct { type DescribeIpRestrictionOutput struct { - // Your AWS account ID. + // The ID of the Amazon Web Services account that contains the IP rules. AwsAccountId *string - // Whether or not IP rules are enabled. + // A value that specifies whether IP rules are turned on. Enabled *bool - // Describes the IP rules with CIDR range and description. + // A map that describes the IP rules with CIDR range and description. IpRestrictionRuleMap map[string]string - // The ID of the describe request. + // The Amazon Web Services request ID for this operation. RequestId *string - // The status of a set of IP restrictions. A successful request returns a 200 - // status code. + // The HTTP status of the request. Status int32 // Metadata pertaining to the operation's result. diff --git a/service/quicksight/api_op_GenerateEmbedUrlForRegisteredUser.go b/service/quicksight/api_op_GenerateEmbedUrlForRegisteredUser.go index 62ebc5aedf3..1fe0331f24c 100644 --- a/service/quicksight/api_op_GenerateEmbedUrlForRegisteredUser.go +++ b/service/quicksight/api_op_GenerateEmbedUrlForRegisteredUser.go @@ -62,8 +62,7 @@ type GenerateEmbedUrlForRegisteredUserInput struct { AwsAccountId *string // The experience you are embedding. For registered users, you can embed Amazon - // QuickSight dashboards, the entire Amazon QuickSight console, or the Amazon - // QuickSight Q search bar. + // QuickSight dashboards or the entire Amazon QuickSight console. // // This member is required. ExperienceConfiguration *types.RegisteredUserEmbeddingExperienceConfiguration @@ -82,7 +81,7 @@ type GenerateEmbedUrlForRegisteredUserInput struct { type GenerateEmbedUrlForRegisteredUserOutput struct { - // The embed URL for the Amazon QuickSight dashboard, console, or Q search bar. + // The embed URL for the Amazon QuickSight dashboard or console. // // This member is required. EmbedUrl *string diff --git a/service/quicksight/api_op_GetDashboardEmbedUrl.go b/service/quicksight/api_op_GetDashboardEmbedUrl.go index d0000f35855..9b4b096c114 100644 --- a/service/quicksight/api_op_GetDashboardEmbedUrl.go +++ b/service/quicksight/api_op_GetDashboardEmbedUrl.go @@ -72,7 +72,7 @@ type GetDashboardEmbedUrlInput struct { // A list of one or more dashboard IDs that you want to add to a session that // includes anonymous users. The IdentityType parameter must be set to ANONYMOUS // for this to work, because other identity types authenticate as Amazon QuickSight - // or IAMusers. For example, if you set "--dashboard-id dash_id1 --dashboard-id + // or IAM users. For example, if you set "--dashboard-id dash_id1 --dashboard-id // dash_id2 dash_id3 identity-type ANONYMOUS", the session can access all three // dashboards. AdditionalDashboardIds []string @@ -111,12 +111,12 @@ type GetDashboardEmbedUrlInput struct { // // * Invited nonfederated users // - // * IAMusers - // and IAMrole-based sessions authenticated through Federated Single Sign-On using - // SAML, OpenID Connect, or IAMfederation. + // * IAM users + // and IAM role-based sessions authenticated through Federated Single Sign-On using + // SAML, OpenID Connect, or IAM federation. // // Omit this parameter for users in the - // third group – IAMusers and IAM role-based sessions. + // third group – IAM users and IAM role-based sessions. UserArn *string noSmithyDocumentSerde diff --git a/service/quicksight/api_op_GetSessionEmbedUrl.go b/service/quicksight/api_op_GetSessionEmbedUrl.go index c3683506889..059ed592152 100644 --- a/service/quicksight/api_op_GetSessionEmbedUrl.go +++ b/service/quicksight/api_op_GetSessionEmbedUrl.go @@ -16,10 +16,13 @@ import ( // sources, datasets, analyses, and dashboards. The users who access an embedded // Amazon QuickSight console need belong to the author or admin security cohort. If // you want to restrict permissions to some of these features, add a custom -// permissions profile to the user with the UpdateUser API operation. Use -// RegisterUser API operation to add a new user with a custom permission profile -// attached. For more information, see the following sections in the Amazon -// QuickSight User Guide: +// permissions profile to the user with the UpdateUser +// (https://docs.aws.amazon.com/quicksight/latest/APIReference/API_UpdateUser.html) +// API operation. Use RegisterUser +// (https://docs.aws.amazon.com/quicksight/latest/APIReference/API_RegisterUser.html) +// API operation to add a new user with a custom permission profile attached. For +// more information, see the following sections in the Amazon QuickSight User +// Guide: // // * Embedding Analytics // (https://docs.aws.amazon.com/quicksight/latest/user/embedded-analytics.html) diff --git a/service/quicksight/api_op_ListFolderMembers.go b/service/quicksight/api_op_ListFolderMembers.go index 6e66b3a8af5..1e9a1007c3a 100644 --- a/service/quicksight/api_op_ListFolderMembers.go +++ b/service/quicksight/api_op_ListFolderMembers.go @@ -29,12 +29,12 @@ func (c *Client) ListFolderMembers(ctx context.Context, params *ListFolderMember type ListFolderMembersInput struct { - // The AWS account ID. + // The ID for the Amazon Web Services account that contains the folder. // // This member is required. AwsAccountId *string - // The folder ID. + // The ID of the folder. // // This member is required. FolderId *string @@ -57,10 +57,10 @@ type ListFolderMembersOutput struct { // The token for the next set of results, or null if there are no more results. NextToken *string - // The request ID. + // The Amazon Web Services request ID for this operation. RequestId *string - // The status. If succeeded, the status is SC_OK + // The HTTP status of the request. Status int32 // Metadata pertaining to the operation's result. diff --git a/service/quicksight/api_op_ListFolders.go b/service/quicksight/api_op_ListFolders.go index 44d3ccdc871..c97c4ec3df1 100644 --- a/service/quicksight/api_op_ListFolders.go +++ b/service/quicksight/api_op_ListFolders.go @@ -29,7 +29,7 @@ func (c *Client) ListFolders(ctx context.Context, params *ListFoldersInput, optF type ListFoldersInput struct { - // The AWS account ID. + // The ID for the Amazon Web Services account that contains the folder. // // This member is required. AwsAccountId *string @@ -45,17 +45,17 @@ type ListFoldersInput struct { type ListFoldersOutput struct { - // A structure that contains all of the folders in your AWS account. This structure - // provides basic information about the folders. + // A structure that contains all of the folders in the Amazon Web Services account. + // This structure provides basic information about the folders. FolderSummaryList []types.FolderSummary // The token for the next set of results, or null if there are no more results. NextToken *string - // The request ID. + // The Amazon Web Services request ID for this operation. RequestId *string - // The status. If succeeded, the status is SC_OK + // The HTTP status of the request. Status int32 // Metadata pertaining to the operation's result. diff --git a/service/quicksight/api_op_ListIAMPolicyAssignments.go b/service/quicksight/api_op_ListIAMPolicyAssignments.go index 5a8071de737..b2cd80ed576 100644 --- a/service/quicksight/api_op_ListIAMPolicyAssignments.go +++ b/service/quicksight/api_op_ListIAMPolicyAssignments.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists IAMpolicy assignments in the current Amazon QuickSight account. +// Lists IAM policy assignments in the current Amazon QuickSight account. func (c *Client) ListIAMPolicyAssignments(ctx context.Context, params *ListIAMPolicyAssignmentsInput, optFns ...func(*Options)) (*ListIAMPolicyAssignmentsOutput, error) { if params == nil { params = &ListIAMPolicyAssignmentsInput{} @@ -29,7 +29,7 @@ func (c *Client) ListIAMPolicyAssignments(ctx context.Context, params *ListIAMPo type ListIAMPolicyAssignmentsInput struct { - // The ID of the Amazon Web Services account that contains these IAMpolicy + // The ID of the Amazon Web Services account that contains these IAM policy // assignments. // // This member is required. @@ -54,7 +54,7 @@ type ListIAMPolicyAssignmentsInput struct { type ListIAMPolicyAssignmentsOutput struct { - // Information describing the IAMpolicy assignments. + // Information describing the IAM policy assignments. IAMPolicyAssignments []types.IAMPolicyAssignmentSummary // The token for the next set of results, or null if there are no more results. diff --git a/service/quicksight/api_op_ListIAMPolicyAssignmentsForUser.go b/service/quicksight/api_op_ListIAMPolicyAssignmentsForUser.go index 090372d3668..57dc250ebfb 100644 --- a/service/quicksight/api_op_ListIAMPolicyAssignmentsForUser.go +++ b/service/quicksight/api_op_ListIAMPolicyAssignmentsForUser.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists all the IAMpolicy assignments, including the Amazon Resource Names (ARNs) +// Lists all the IAM policy assignments, including the Amazon Resource Names (ARNs) // for the IAM policies assigned to the specified user and group or groups that the // user belongs to. func (c *Client) ListIAMPolicyAssignmentsForUser(ctx context.Context, params *ListIAMPolicyAssignmentsForUserInput, optFns ...func(*Options)) (*ListIAMPolicyAssignmentsForUserOutput, error) { diff --git a/service/quicksight/api_op_RegisterUser.go b/service/quicksight/api_op_RegisterUser.go index 27ae73dee8d..3b9faf299fa 100644 --- a/service/quicksight/api_op_RegisterUser.go +++ b/service/quicksight/api_op_RegisterUser.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates an Amazon QuickSight user, whose identity is associated with the AWS +// Creates an Amazon QuickSight user, whose identity is associated with the // Identity and Access Management (IAM) identity or role specified in the request. func (c *Client) RegisterUser(ctx context.Context, params *RegisterUserInput, optFns ...func(*Options)) (*RegisterUserOutput, error) { if params == nil { @@ -46,7 +46,7 @@ type RegisterUserInput struct { // parameter accepts two values: // // * IAM: A user whose identity maps to an existing - // IAMuser or role. + // IAM user or role. // // * QUICKSIGHT: A user whose identity is owned and managed // internally by Amazon QuickSight. @@ -100,13 +100,15 @@ type RegisterUserInput struct { // * Subscribe to email reports // // To add custom permissions to an existing - // user, use UpdateUser instead. A set of custom permissions includes any - // combination of these restrictions. Currently, you need to create the profile - // names for custom permission sets by using the Amazon QuickSight console. Then, - // you use the RegisterUser API operation to assign the named set of permissions to - // a Amazon QuickSight user. Amazon QuickSight custom permissions are applied - // through IAMpolicies. Therefore, they override the permissions typically granted - // by assigning Amazon QuickSight users to one of the default security cohorts in + // user, use UpdateUser + // (https://docs.aws.amazon.com/quicksight/latest/APIReference/API_UpdateUser.html) + // instead. A set of custom permissions includes any combination of these + // restrictions. Currently, you need to create the profile names for custom + // permission sets by using the Amazon QuickSight console. Then, you use the + // RegisterUser API operation to assign the named set of permissions to a + // QuickSight user. Amazon QuickSight custom permissions are applied through IAM + // policies. Therefore, they override the permissions typically granted by + // assigning Amazon QuickSight users to one of the default security cohorts in // Amazon QuickSight (admin, author, reader). This feature is available only to // Amazon QuickSight Enterprise edition subscriptions. CustomPermissionsName *string @@ -129,17 +131,17 @@ type RegisterUserInput struct { // The identity ID for a user in the external login provider. ExternalLoginId *string - // The ARN of the IAMuser or role that you are registering with Amazon QuickSight. + // The ARN of the IAM user or role that you are registering with Amazon QuickSight. IamArn *string // You need to use this parameter only when you register one or more users using an - // assumed IAMrole. You don't need to provide the session name for other scenarios, - // for example when you are registering an IAMuser or an Amazon QuickSight user. - // You can register multiple users using the same IAMrole if each user has a - // different session name. For more information on assuming IAMroles, see - // assume-role + // assumed IAM role. You don't need to provide the session name for other + // scenarios, for example when you are registering an IAM user or an Amazon + // QuickSight user. You can register multiple users using the same IAM role if each + // user has a different session name. For more information on assuming IAM roles, + // see assume-role // (https://docs.aws.amazon.com/cli/latest/reference/sts/assume-role.html) in the - // AWS CLI Reference. + // CLI Reference. SessionName *string // The Amazon QuickSight user name that you want to create for the user you are diff --git a/service/quicksight/api_op_SearchFolders.go b/service/quicksight/api_op_SearchFolders.go index 61be8ebba0b..166b82c7505 100644 --- a/service/quicksight/api_op_SearchFolders.go +++ b/service/quicksight/api_op_SearchFolders.go @@ -29,7 +29,7 @@ func (c *Client) SearchFolders(ctx context.Context, params *SearchFoldersInput, type SearchFoldersInput struct { - // The AWS account ID. + // The ID for the Amazon Web Services account that contains the folder. // // This member is required. AwsAccountId *string @@ -52,17 +52,17 @@ type SearchFoldersInput struct { type SearchFoldersOutput struct { - // A structure that contains all of the folders in your AWS account. This structure - // provides basic information about the folders. + // A structure that contains all of the folders in the Amazon Web Services account. + // This structure provides basic information about the folders. FolderSummaryList []types.FolderSummary // The token for the next set of results, or null if there are no more results. NextToken *string - // The request ID. + // The Amazon Web Services request ID for this operation. RequestId *string - // The status. If succeeded, the status is SC_OK. + // The HTTP status of the request. Status int32 // Metadata pertaining to the operation's result. diff --git a/service/quicksight/api_op_TagResource.go b/service/quicksight/api_op_TagResource.go index 9d02ead0de5..bc7c5fa4bb2 100644 --- a/service/quicksight/api_op_TagResource.go +++ b/service/quicksight/api_op_TagResource.go @@ -21,15 +21,16 @@ import ( // the new tag value that you specify replaces the previous value for that tag. You // can associate as many as 50 tags with a resource. Amazon QuickSight supports // tagging on data set, data source, dashboard, and template. Tagging for Amazon -// QuickSight works in a similar way to tagging for other AWS services, except for -// the following: +// QuickSight works in a similar way to tagging for other Amazon Web Services +// services, except for the following: // -// * You can't use tags to track AWS costs for Amazon QuickSight. -// This restriction is because Amazon QuickSight costs are based on users and SPICE -// capacity, which aren't taggable resources. +// * You can't use tags to track costs for +// Amazon QuickSight. This isn't possible because you can't tag the resources that +// Amazon QuickSight costs are based on, for example Amazon QuickSight storage +// capacity (SPICE), number of users, type of users, and usage metrics. // -// * Amazon QuickSight doesn't -// currently support the Tag Editor for Resource Groups. +// * Amazon +// QuickSight doesn't currently support the tag editor for Resource Groups. func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { if params == nil { params = &TagResourceInput{} diff --git a/service/quicksight/api_op_UpdateDashboard.go b/service/quicksight/api_op_UpdateDashboard.go index 2787d02e07e..67e3229737e 100644 --- a/service/quicksight/api_op_UpdateDashboard.go +++ b/service/quicksight/api_op_UpdateDashboard.go @@ -14,7 +14,9 @@ import ( // Updates a dashboard in an Amazon Web Services account. Updating a Dashboard // creates a new dashboard version but does not immediately publish the new // version. You can update the published version of a dashboard by using the -// UpdateDashboardPublishedVersion API operation. +// UpdateDashboardPublishedVersion +// (https://docs.aws.amazon.com/quicksight/latest/APIReference/API_UpdateDashboardPublishedVersion.html) +// API operation. func (c *Client) UpdateDashboard(ctx context.Context, params *UpdateDashboardInput, optFns ...func(*Options)) (*UpdateDashboardOutput, error) { if params == nil { params = &UpdateDashboardInput{} @@ -52,12 +54,14 @@ type UpdateDashboardInput struct { // SourceEntity, you specify the type of object you're using as source. You can // only update a dashboard from a template, so you use a SourceTemplate entity. If // you need to update a dashboard from an analysis, first convert the analysis to a - // template by using the CreateTemplate API operation. For SourceTemplate, specify - // the Amazon Resource Name (ARN) of the source template. The SourceTemplate ARN - // can contain any Amazon Web Services account and any Amazon QuickSight-supported - // Amazon Web Services Region. Use the DataSetReferences entity within - // SourceTemplate to list the replacement datasets for the placeholders listed in - // the original. The schema in each dataset must match its placeholder. + // template by using the CreateTemplate + // (https://docs.aws.amazon.com/quicksight/latest/APIReference/API_CreateTemplate.html) + // API operation. For SourceTemplate, specify the Amazon Resource Name (ARN) of the + // source template. The SourceTemplate ARN can contain any Amazon Web Services + // account and any Amazon QuickSight-supported Amazon Web Services Region. Use the + // DataSetReferences entity within SourceTemplate to list the replacement datasets + // for the placeholders listed in the original. The schema in each dataset must + // match its placeholder. // // This member is required. SourceEntity *types.DashboardSourceEntity diff --git a/service/quicksight/api_op_UpdateDashboardPermissions.go b/service/quicksight/api_op_UpdateDashboardPermissions.go index f3970772a50..cd362575835 100644 --- a/service/quicksight/api_op_UpdateDashboardPermissions.go +++ b/service/quicksight/api_op_UpdateDashboardPermissions.go @@ -40,9 +40,15 @@ type UpdateDashboardPermissionsInput struct { // This member is required. DashboardId *string + // Grants link permissions to all users in a defined namespace. + GrantLinkPermissions []types.ResourcePermission + // The permissions that you want to grant on this resource. GrantPermissions []types.ResourcePermission + // Revokes link permissions from all users in a defined namespace. + RevokeLinkPermissions []types.ResourcePermission + // The permissions that you want to revoke from this resource. RevokePermissions []types.ResourcePermission @@ -57,6 +63,9 @@ type UpdateDashboardPermissionsOutput struct { // The ID for the dashboard. DashboardId *string + // Updates the permissions of a shared link to an Amazon QuickSight dashboard. + LinkSharingConfiguration *types.LinkSharingConfiguration + // Information about the permissions on the dashboard. Permissions []types.ResourcePermission diff --git a/service/quicksight/api_op_UpdateDataSet.go b/service/quicksight/api_op_UpdateDataSet.go index 58f79b77365..9b5c902dc78 100644 --- a/service/quicksight/api_op_UpdateDataSet.go +++ b/service/quicksight/api_op_UpdateDataSet.go @@ -59,7 +59,8 @@ type UpdateDataSetInput struct { // Currently, only geospatial hierarchy is supported. ColumnGroups []types.ColumnGroup - // A set of one or more definitions of a ColumnLevelPermissionRule. + // A set of one or more definitions of a ColumnLevelPermissionRule + // (https://docs.aws.amazon.com/quicksight/latest/APIReference/API_ColumnLevelPermissionRule.html). ColumnLevelPermissionRules []types.ColumnLevelPermissionRule // The usage configuration to apply to child datasets that reference this dataset diff --git a/service/quicksight/api_op_UpdateFolder.go b/service/quicksight/api_op_UpdateFolder.go index 78032993b0e..1e6954f96e9 100644 --- a/service/quicksight/api_op_UpdateFolder.go +++ b/service/quicksight/api_op_UpdateFolder.go @@ -28,12 +28,12 @@ func (c *Client) UpdateFolder(ctx context.Context, params *UpdateFolderInput, op type UpdateFolderInput struct { - // The AWS account ID. + // The ID for the Amazon Web Services account that contains the folder to update. // // This member is required. AwsAccountId *string - // The folder ID. + // The ID of the folder. // // This member is required. FolderId *string @@ -48,16 +48,16 @@ type UpdateFolderInput struct { type UpdateFolderOutput struct { - // The Amazon Resource Name (ARN). + // The Amazon Resource Name (ARN) of the folder. Arn *string - // The folder ID. + // The ID of the folder. FolderId *string - // The request ID. + // The Amazon Web Services request ID for this operation. RequestId *string - // The status. If succeeded, the status is SC_OK. + // The HTTP status of the request. Status int32 // Metadata pertaining to the operation's result. diff --git a/service/quicksight/api_op_UpdateFolderPermissions.go b/service/quicksight/api_op_UpdateFolderPermissions.go index 78fc9ad8834..78a92c9bece 100644 --- a/service/quicksight/api_op_UpdateFolderPermissions.go +++ b/service/quicksight/api_op_UpdateFolderPermissions.go @@ -29,12 +29,12 @@ func (c *Client) UpdateFolderPermissions(ctx context.Context, params *UpdateFold type UpdateFolderPermissionsInput struct { - // The AWS account ID. + // The ID for the Amazon Web Services account that contains the folder to update. // // This member is required. AwsAccountId *string - // The folder ID. + // The ID of the folder. // // This member is required. FolderId *string @@ -50,19 +50,19 @@ type UpdateFolderPermissionsInput struct { type UpdateFolderPermissionsOutput struct { - // The Amazon Resource Name (ARN). + // The Amazon Resource Name (ARN) of the folder. Arn *string - // The folder ID. + // The ID of the folder. FolderId *string - // Information about the permissions on the dashboard. + // Information about the permissions for the folder. Permissions []types.ResourcePermission - // The request ID. + // The Amazon Web Services request ID for this operation. RequestId *string - // The status. If succeeded, the status is SC_OK. + // The HTTP status of the request. Status int32 // Metadata pertaining to the operation's result. diff --git a/service/quicksight/api_op_UpdateIAMPolicyAssignment.go b/service/quicksight/api_op_UpdateIAMPolicyAssignment.go index 456d557a883..cc64eff85fc 100644 --- a/service/quicksight/api_op_UpdateIAMPolicyAssignment.go +++ b/service/quicksight/api_op_UpdateIAMPolicyAssignment.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates an existing IAMpolicy assignment. This operation updates only the +// Updates an existing IAM policy assignment. This operation updates only the // optional parameter or parameters that are specified in the request. This // overwrites all of the users included in Identities. func (c *Client) UpdateIAMPolicyAssignment(ctx context.Context, params *UpdateIAMPolicyAssignmentInput, optFns ...func(*Options)) (*UpdateIAMPolicyAssignmentOutput, error) { @@ -37,7 +37,7 @@ type UpdateIAMPolicyAssignmentInput struct { // This member is required. AssignmentName *string - // The ID of the Amazon Web Services account that contains the IAMpolicy + // The ID of the Amazon Web Services account that contains the IAM policy // assignment. // // This member is required. @@ -65,7 +65,7 @@ type UpdateIAMPolicyAssignmentInput struct { // to. Identities map[string][]string - // The ARN for the IAMpolicy to apply to the Amazon QuickSight users and groups + // The ARN for the IAM policy to apply to the Amazon QuickSight users and groups // specified in this assignment. PolicyArn *string @@ -93,10 +93,10 @@ type UpdateIAMPolicyAssignmentOutput struct { // source. AssignmentStatus types.AssignmentStatus - // The Amazon QuickSight users, groups, or both that the IAMpolicy is assigned to. + // The Amazon QuickSight users, groups, or both that the IAM policy is assigned to. Identities map[string][]string - // The ARN for the IAMpolicy applied to the Amazon QuickSight users and groups + // The ARN for the IAM policy applied to the Amazon QuickSight users and groups // specified in this assignment. PolicyArn *string diff --git a/service/quicksight/api_op_UpdateIpRestriction.go b/service/quicksight/api_op_UpdateIpRestriction.go index cb9c0f5a1bc..b40d7e155bd 100644 --- a/service/quicksight/api_op_UpdateIpRestriction.go +++ b/service/quicksight/api_op_UpdateIpRestriction.go @@ -10,7 +10,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates content and status of IP Rules. +// Updates the content and status of IP rules. To use this operation, you need to +// provide the entire map of rules. You can use the DescribeIpRestriction operation +// to get the current rule map. func (c *Client) UpdateIpRestriction(ctx context.Context, params *UpdateIpRestrictionInput, optFns ...func(*Options)) (*UpdateIpRestrictionOutput, error) { if params == nil { params = &UpdateIpRestrictionInput{} @@ -28,15 +30,15 @@ func (c *Client) UpdateIpRestriction(ctx context.Context, params *UpdateIpRestri type UpdateIpRestrictionInput struct { - // Your AWS account ID. + // The ID of the Amazon Web Services account that contains the IP rules. // // This member is required. AwsAccountId *string - // Whether or not IP rules are enabled. + // A value that specifies whether IP rules are turned on. Enabled *bool - // Describes updated IP rules. + // A map that describes the updated IP rules with CIDR ranges and descriptions. IpRestrictionRuleMap map[string]string noSmithyDocumentSerde @@ -44,13 +46,13 @@ type UpdateIpRestrictionInput struct { type UpdateIpRestrictionOutput struct { - // Your AWS account ID. + // The ID of the Amazon Web Services account that contains the IP rules. AwsAccountId *string - // The ID of the update request. + // The Amazon Web Services request ID for this operation. RequestId *string - // The status of the updated IP rules. A successful request returns a 200 code. + // The HTTP status of the request. Status int32 // Metadata pertaining to the operation's result. diff --git a/service/quicksight/api_op_UpdateUser.go b/service/quicksight/api_op_UpdateUser.go index 26c06a15577..ffb36217ccd 100644 --- a/service/quicksight/api_op_UpdateUser.go +++ b/service/quicksight/api_op_UpdateUser.go @@ -93,9 +93,9 @@ type UpdateUserInput struct { // combination of these restrictions. Currently, you need to create the profile // names for custom permission sets by using the Amazon QuickSight console. Then, // you use the RegisterUser API operation to assign the named set of permissions to - // a Amazon QuickSight user. Amazon QuickSight custom permissions are applied - // through IAMpolicies. Therefore, they override the permissions typically granted - // by assigning Amazon QuickSight users to one of the default security cohorts in + // a QuickSight user. Amazon QuickSight custom permissions are applied through IAM + // policies. Therefore, they override the permissions typically granted by + // assigning Amazon QuickSight users to one of the default security cohorts in // Amazon QuickSight (admin, author, reader). This feature is available only to // Amazon QuickSight Enterprise edition subscriptions. CustomPermissionsName *string @@ -115,8 +115,9 @@ type UpdateUserInput struct { // parameter to provide the custom OIDC provider URL. // // * NONE: This clears all the - // previously saved external login information for a user. Use DescribeUser API to - // check the external login information. + // previously saved external login information for a user. Use the DescribeUser + // (https://docs.aws.amazon.com/quicksight/latest/APIReference/API_DescribeUser.html) + // API operation to check the external login information. ExternalLoginFederationProviderType *string // The identity ID for a user in the external login provider. diff --git a/service/quicksight/deserializers.go b/service/quicksight/deserializers.go index 779b7419482..5f0a211b6e3 100644 --- a/service/quicksight/deserializers.go +++ b/service/quicksight/deserializers.go @@ -323,6 +323,9 @@ func awsRestjson1_deserializeOpErrorCreateAccountCustomization(response *smithyh case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -3681,6 +3684,9 @@ func awsRestjson1_deserializeOpErrorDeleteAccountCustomization(response *smithyh case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -8004,6 +8010,11 @@ func awsRestjson1_deserializeOpDocumentDescribeDashboardPermissionsOutput(v **De sv.DashboardId = ptr.String(jtv) } + case "LinkSharingConfiguration": + if err := awsRestjson1_deserializeDocumentLinkSharingConfiguration(&sv.LinkSharingConfiguration, value); err != nil { + return err + } + case "Permissions": if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { return err @@ -18192,6 +18203,9 @@ func awsRestjson1_deserializeOpErrorUpdateAccountCustomization(response *smithyh case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) @@ -19289,6 +19303,11 @@ func awsRestjson1_deserializeOpDocumentUpdateDashboardPermissionsOutput(v **Upda sv.DashboardId = ptr.String(jtv) } + case "LinkSharingConfiguration": + if err := awsRestjson1_deserializeDocumentLinkSharingConfiguration(&sv.LinkSharingConfiguration, value); err != nil { + return err + } + case "Permissions": if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { return err @@ -23472,6 +23491,15 @@ func awsRestjson1_deserializeDocumentAccountCustomization(v **types.AccountCusto for key, value := range shape { switch key { + case "DefaultEmailCustomizationTemplate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.DefaultEmailCustomizationTemplate = ptr.String(jtv) + } + case "DefaultTheme": if value != nil { jtv, ok := value.(string) @@ -26800,6 +26828,16 @@ loop: uv = &types.DataSourceParametersMemberAwsIotAnalyticsParameters{Value: mv} break loop + case "ExasolParameters": + var mv types.ExasolParameters + destAddr := &mv + if err := awsRestjson1_deserializeDocumentExasolParameters(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.DataSourceParametersMemberExasolParameters{Value: mv} + break loop + case "JiraParameters": var mv types.JiraParameters destAddr := &mv @@ -27090,6 +27128,59 @@ func awsRestjson1_deserializeDocumentErrorInfo(v **types.ErrorInfo, value interf return nil } +func awsRestjson1_deserializeDocumentExasolParameters(v **types.ExasolParameters, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ExasolParameters + if *v == nil { + sv = &types.ExasolParameters{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Host": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Host to be of type string, got %T instead", value) + } + sv.Host = ptr.String(jtv) + } + + case "Port": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Port to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Port = int32(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentFieldFolder(v **types.FieldFolder, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -28775,6 +28866,42 @@ func awsRestjson1_deserializeDocumentLimitExceededException(v **types.LimitExcee return nil } +func awsRestjson1_deserializeDocumentLinkSharingConfiguration(v **types.LinkSharingConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LinkSharingConfiguration + if *v == nil { + sv = &types.LinkSharingConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Permissions": + if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentLogicalTable(v **types.LogicalTable, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/quicksight/serializers.go b/service/quicksight/serializers.go index f0664599905..e20265369a2 100644 --- a/service/quicksight/serializers.go +++ b/service/quicksight/serializers.go @@ -8028,6 +8028,13 @@ func awsRestjson1_serializeOpDocumentUpdateDashboardPermissionsInput(v *UpdateDa object := value.Object() defer object.Close() + if v.GrantLinkPermissions != nil { + ok := object.Key("GrantLinkPermissions") + if err := awsRestjson1_serializeDocumentUpdateLinkPermissionList(v.GrantLinkPermissions, ok); err != nil { + return err + } + } + if v.GrantPermissions != nil { ok := object.Key("GrantPermissions") if err := awsRestjson1_serializeDocumentUpdateResourcePermissionList(v.GrantPermissions, ok); err != nil { @@ -8035,6 +8042,13 @@ func awsRestjson1_serializeOpDocumentUpdateDashboardPermissionsInput(v *UpdateDa } } + if v.RevokeLinkPermissions != nil { + ok := object.Key("RevokeLinkPermissions") + if err := awsRestjson1_serializeDocumentUpdateLinkPermissionList(v.RevokeLinkPermissions, ok); err != nil { + return err + } + } + if v.RevokePermissions != nil { ok := object.Key("RevokePermissions") if err := awsRestjson1_serializeDocumentUpdateResourcePermissionList(v.RevokePermissions, ok); err != nil { @@ -9813,6 +9827,11 @@ func awsRestjson1_serializeDocumentAccountCustomization(v *types.AccountCustomiz object := value.Object() defer object.Close() + if v.DefaultEmailCustomizationTemplate != nil { + ok := object.Key("DefaultEmailCustomizationTemplate") + ok.String(*v.DefaultEmailCustomizationTemplate) + } + if v.DefaultTheme != nil { ok := object.Key("DefaultTheme") ok.String(*v.DefaultTheme) @@ -10555,6 +10574,12 @@ func awsRestjson1_serializeDocumentDataSourceParameters(v types.DataSourceParame return err } + case *types.DataSourceParametersMemberExasolParameters: + av := object.Key("ExasolParameters") + if err := awsRestjson1_serializeDocumentExasolParameters(&uv.Value, av); err != nil { + return err + } + case *types.DataSourceParametersMemberJiraParameters: av := object.Key("JiraParameters") if err := awsRestjson1_serializeDocumentJiraParameters(&uv.Value, av); err != nil { @@ -10756,6 +10781,23 @@ func awsRestjson1_serializeDocumentDoubleList(v []float64, value smithyjson.Valu return nil } +func awsRestjson1_serializeDocumentExasolParameters(v *types.ExasolParameters, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Host != nil { + ok := object.Key("Host") + ok.String(*v.Host) + } + + { + ok := object.Key("Port") + ok.Integer(v.Port) + } + + return nil +} + func awsRestjson1_serializeDocumentExportToCSVOption(v *types.ExportToCSVOption, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -12294,6 +12336,19 @@ func awsRestjson1_serializeDocumentUntagColumnOperation(v *types.UntagColumnOper return nil } +func awsRestjson1_serializeDocumentUpdateLinkPermissionList(v []types.ResourcePermission, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentResourcePermission(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentUpdateResourcePermissionList(v []types.ResourcePermission, value smithyjson.Value) error { array := value.Array() defer array.Close() diff --git a/service/quicksight/types/enums.go b/service/quicksight/types/enums.go index 7e579ed4536..9a3199d381c 100644 --- a/service/quicksight/types/enums.go +++ b/service/quicksight/types/enums.go @@ -274,6 +274,7 @@ const ( DataSourceTypeTwitter DataSourceType = "TWITTER" DataSourceTypeTimestream DataSourceType = "TIMESTREAM" DataSourceTypeAmazonOpensearch DataSourceType = "AMAZON_OPENSEARCH" + DataSourceTypeExasol DataSourceType = "EXASOL" ) // Values returns all known values for DataSourceType. Note that this can be @@ -305,6 +306,7 @@ func (DataSourceType) Values() []DataSourceType { "TWITTER", "TIMESTREAM", "AMAZON_OPENSEARCH", + "EXASOL", } } diff --git a/service/quicksight/types/errors.go b/service/quicksight/types/errors.go index 7969f41d39c..52b732ed563 100644 --- a/service/quicksight/types/errors.go +++ b/service/quicksight/types/errors.go @@ -367,11 +367,12 @@ func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.Fau // This error indicates that you are calling an embedding operation in Amazon // QuickSight without the required pricing plan on your Amazon Web Services -// account. Before you can use embedding for anonymous users, a Amazon QuickSight +// account. Before you can use embedding for anonymous users, a QuickSight // administrator needs to add capacity pricing to Amazon QuickSight. You can do // this on the Manage Amazon QuickSight page. After capacity pricing is added, you -// can use the GetDashboardEmbedUrl API operation with the --identity-type -// ANONYMOUS option. +// can use the GetDashboardEmbedUrl +// (https://docs.aws.amazon.com/quicksight/latest/APIReference/API_GetDashboardEmbedUrl.html) +// API operation with the --identity-type ANONYMOUS option. type UnsupportedPricingPlanException struct { Message *string diff --git a/service/quicksight/types/types.go b/service/quicksight/types/types.go index 120ebf6d6d7..5ee91090bc2 100644 --- a/service/quicksight/types/types.go +++ b/service/quicksight/types/types.go @@ -8,10 +8,12 @@ import ( ) // The Amazon QuickSight customizations associated with your Amazon Web Services -// account or a Amazon QuickSight namespace in a specific Amazon Web Services -// Region. +// account or a QuickSight namespace in a specific Amazon Web Services Region. type AccountCustomization struct { + // The default email customization template. + DefaultEmailCustomizationTemplate *string + // The default theme for this Amazon QuickSight subscription. DefaultTheme *string @@ -43,7 +45,7 @@ type AccountSettings struct { // The active Identity and Access Management (IAM) policy assignment. type ActiveIAMPolicyAssignment struct { - // A name for the IAMpolicy assignment. + // A name for the IAM policy assignment. AssignmentName *string // The Amazon Resource Name (ARN) of the resource. @@ -72,8 +74,11 @@ type AmazonElasticsearchParameters struct { noSmithyDocumentSerde } +// The parameters for OpenSearch. type AmazonOpenSearchParameters struct { + // The OpenSearch domain. + // // This member is required. Domain *string @@ -213,11 +218,11 @@ type AnonymousUserDashboardEmbeddingConfiguration struct { noSmithyDocumentSerde } -// The type of experience you want to embed. For anonymous users, you can embed an -// Amazon QuickSight dashboard. +// The type of experience you want to embed. For anonymous users, you can embed +// Amazon QuickSight dashboards. type AnonymousUserEmbeddingExperienceConfiguration struct { - // The type of embedding experience. In this case, an Amazon QuickSight dashboard. + // The type of embedding experience. In this case, Amazon QuickSight dashboards. Dashboard *AnonymousUserDashboardEmbeddingConfiguration noSmithyDocumentSerde @@ -409,9 +414,10 @@ type ColumnSchema struct { noSmithyDocumentSerde } -// A tag for a column in a TagColumnOperation structure. This is a variant type -// structure. For this structure to be valid, only one of the attributes can be -// non-null. +// A tag for a column in a TagColumnOperation +// (https://docs.aws.amazon.com/quicksight/latest/APIReference/API_TagColumnOperation.html) +// structure. This is a variant type structure. For this structure to be valid, +// only one of the attributes can be non-null. type ColumnTag struct { // A description for a column. @@ -703,7 +709,8 @@ type DataSet struct { // Currently, only geospatial hierarchy is supported. ColumnGroups []ColumnGroup - // A set of one or more definitions of a ColumnLevelPermissionRule. + // A set of one or more definitions of a ColumnLevelPermissionRule + // (https://docs.aws.amazon.com/quicksight/latest/APIReference/API_ColumnLevelPermissionRule.html). ColumnLevelPermissionRules []ColumnLevelPermissionRule // The amount of SPICE capacity used by this dataset. This is 0 if the dataset @@ -907,7 +914,8 @@ type DataSourceCredentials struct { // DataSourceCredentials structure. CopySourceArn *string - // Credential pair. For more information, see CredentialPair. + // Credential pair. For more information, see CredentialPair + // (https://docs.aws.amazon.com/quicksight/latest/APIReference/API_CredentialPair.html). CredentialPair *CredentialPair noSmithyDocumentSerde @@ -936,6 +944,7 @@ type DataSourceErrorInfo struct { // DataSourceParametersMemberAuroraParameters // DataSourceParametersMemberAuroraPostgreSqlParameters // DataSourceParametersMemberAwsIotAnalyticsParameters +// DataSourceParametersMemberExasolParameters // DataSourceParametersMemberJiraParameters // DataSourceParametersMemberMariaDbParameters // DataSourceParametersMemberMySqlParameters @@ -964,6 +973,7 @@ type DataSourceParametersMemberAmazonElasticsearchParameters struct { func (*DataSourceParametersMemberAmazonElasticsearchParameters) isDataSourceParameters() {} +// The parameters for OpenSearch. type DataSourceParametersMemberAmazonOpenSearchParameters struct { Value AmazonOpenSearchParameters @@ -1008,6 +1018,15 @@ type DataSourceParametersMemberAwsIotAnalyticsParameters struct { func (*DataSourceParametersMemberAwsIotAnalyticsParameters) isDataSourceParameters() {} +// The parameters for Exasol. +type DataSourceParametersMemberExasolParameters struct { + Value ExasolParameters + + noSmithyDocumentSerde +} + +func (*DataSourceParametersMemberExasolParameters) isDataSourceParameters() {} + // The parameters for Jira. type DataSourceParametersMemberJiraParameters struct { Value JiraParameters @@ -1187,6 +1206,22 @@ type ErrorInfo struct { noSmithyDocumentSerde } +// The required parameters for connecting to an Exasol data source. +type ExasolParameters struct { + + // The hostname or IP address of the Exasol data source. + // + // This member is required. + Host *string + + // The port for the Exasol data source. + // + // This member is required. + Port int32 + + noSmithyDocumentSerde +} + // Export to .csv option. type ExportToCSVOption struct { @@ -1220,22 +1255,22 @@ type FilterOperation struct { noSmithyDocumentSerde } -// A folder. +// A folder in Amazon QuickSight. type Folder struct { - // The folder Amazon Resource Name (ARN). + // The Amazon Resource Name (ARN) for the folder. Arn *string // The time that the folder was created. CreatedTime *time.Time - // The folder ID. + // The ID of the folder. FolderId *string - // An array of ancestor folder ARN strings. + // An array of ancestor ARN strings for the folder. FolderPath []string - // The type of the folder. + // The type of folder it is. FolderType FolderType // The time that the folder was last updated. @@ -1247,26 +1282,27 @@ type Folder struct { noSmithyDocumentSerde } -// An asset in a folder, such as a dashboard, analysis, or dataset. +// An asset in a Amazon QuickSight folder, such as a dashboard, analysis, or +// dataset. type FolderMember struct { - // The ID of the asset. + // The ID of an asset in the folder. MemberId *string - // The type of the asset. + // The type of asset that it is. MemberType MemberType noSmithyDocumentSerde } -// Searches a folder by a filter. +// A filter to use to search a Amazon QuickSight folder. type FolderSearchFilter struct { - // The name of the value that you want to use as a filter. For example, "Name": + // The name of a value that you want to use in the filter. For example, "Name": // "PARENT_FOLDER_ARN". Name FolderFilterAttribute - // The comparison operator that you want to use as a filter. For example, + // The comparison operator that you want to use in the filter. For example, // "Operator": "StringEquals". Operator FilterOperator @@ -1278,16 +1314,16 @@ type FolderSearchFilter struct { noSmithyDocumentSerde } -// A summary of the folder. +// A summary of information about an existing Amazon QuickSight folder. type FolderSummary struct { - // The Amazon Resource Name (ARN). + // The Amazon Resource Name (ARN) of the folder. Arn *string // The time that the folder was created. CreatedTime *time.Time - // The folder ID. + // The ID of the folder. FolderId *string // The type of folder. @@ -1383,13 +1419,13 @@ type IAMPolicyAssignment struct { // Identities. Identities map[string][]string - // The Amazon Resource Name (ARN) for the IAMpolicy. + // The Amazon Resource Name (ARN) for the IAM policy. PolicyArn *string noSmithyDocumentSerde } -// IAMpolicy assignment summary. +// IAM policy assignment summary. type IAMPolicyAssignmentSummary struct { // Assignment name. @@ -1532,6 +1568,16 @@ type JoinKeyProperties struct { noSmithyDocumentSerde } +// A structure that contains the configuration of a shareable link to the +// dashboard. +type LinkSharingConfiguration struct { + + // A structure that contains the permissions of a shareable link. + Permissions []ResourcePermission + + noSmithyDocumentSerde +} + // A logical table is a unit that joins and that data transformations operate on. A // logical table has a source, which can be either a physical table or result of a // join. When a logical table points to a physical table, the logical table acts as @@ -1617,7 +1663,7 @@ type MariaDbParameters struct { noSmithyDocumentSerde } -// An object that consists of the member Amazon Resource Name (ARN) and member ID. +// An object that consists of a member Amazon Resource Name (ARN) and a member ID. type MemberIdArnPair struct { // The Amazon Resource Name (ARN) of the member. @@ -1903,10 +1949,10 @@ type RegisteredUserDashboardEmbeddingConfiguration struct { noSmithyDocumentSerde } -// The type of experience you want to embed. For registered users, you can embed an -// Amazon QuickSight dashboard or the Amazon QuickSight console. Exactly one of the -// experience configurations is required. You can choose Dashboard or -// QuickSightConsole. You cannot choose more than one experience configuraton. +// The type of experience you want to embed. For registered users, you can embed +// Amazon QuickSight dashboards or the Amazon QuickSight console. Exactly one of +// the experience configurations is required. You can choose Dashboard or +// QuickSightConsole. You cannot choose more than one experience configuration. type RegisteredUserEmbeddingExperienceConfiguration struct { // The configuration details for providing a dashboard embedding experience. @@ -1917,23 +1963,27 @@ type RegisteredUserEmbeddingExperienceConfiguration struct { // (https://docs.aws.amazon.com/quicksight/latest/user/embedding-overview.html). QSearchBar *RegisteredUserQSearchBarEmbeddingConfiguration - // The configuration details for providing an Amazon QuickSight console embedding + // The configuration details for providing each Amazon QuickSight console embedding // experience. This can be used along with custom permissions to restrict access to // certain features. For more information, see Customizing Access to the Amazon // QuickSight Console // (https://docs.aws.amazon.com/quicksight/latest/user/customizing-permissions-to-the-quicksight-console.html) - // in the Amazon QuickSight User Guide. Use GenerateEmbedUrlForRegisteredUser where - // you want to provide an authoring portal that allows users to create data + // in the Amazon QuickSight User Guide. Use GenerateEmbedUrlForRegisteredUser + // (https://docs.aws.amazon.com/quicksight/latest/APIReference/API_GenerateEmbedUrlForRegisteredUser.html) + // where you want to provide an authoring portal that allows users to create data // sources, datasets, analyses, and dashboards. The users who accesses an embedded // Amazon QuickSight console needs to belong to the author or admin security // cohort. If you want to restrict permissions to some of these features, add a - // custom permissions profile to the user with the UpdateUser API operation. Use - // RegisterUser API operation to add a new user with a custom permission profile - // attached. For more information, see the following sections in the Amazon - // QuickSight User Guide: - // - // * Embedding the Full Functionality of the Amazon - // QuickSight Console for Authenticated Users + // custom permissions profile to the user with the UpdateUser + // (https://docs.aws.amazon.com/quicksight/latest/APIReference/API_UpdateUser.html) + // API operation. Use the RegisterUser + // (https://docs.aws.amazon.com/quicksight/latest/APIReference/API_RegisterUser.html) + // API operation to add a new user with a custom permission profile attached. For + // more information, see the following sections in the Amazon QuickSight User + // Guide: + // + // * Embedding the Full Functionality of the Amazon QuickSight Console for + // Authenticated Users // (https://docs.aws.amazon.com/quicksight/latest/user/embedded-analytics-full-console-for-authenticated-users.html) // // * @@ -2037,7 +2087,7 @@ type RenameColumnOperation struct { // Permission for the resource. type ResourcePermission struct { - // The IAMaction to grant or revoke permissions on. + // The IAM action to grant or revoke permissions on. // // This member is required. Actions []string @@ -2053,7 +2103,7 @@ type ResourcePermission struct { // theme. (This is common.) // // * The ARN of an Amazon Web Services account root: This - // is an IAMARN rather than a Amazon QuickSight ARN. Use this option only to share + // is an IAM ARN rather than a QuickSight ARN. Use this option only to share // resources (templates) across Amazon Web Services accounts. (This is less // common.) // @@ -2963,8 +3013,8 @@ type User struct { Email *string // The type of supported external login provider that provides identity to let the - // user federate into Amazon QuickSight with an associated IAMrole. The type can be - // one of the following. + // user federate into Amazon QuickSight with an associated IAM role. The type can + // be one of the following. // // * COGNITO: Amazon Cognito. The provider URL is // cognito-identity.amazonaws.com. @@ -3003,7 +3053,8 @@ type User struct { // RESTRICTED_AUTHOR: This role isn't currently available for use. Role UserRole - // The user's user name. + // The user's user name. In the output, the value for UserName is N/A when the + // value for IdentityType is IAM and the corresponding IAM user is deleted. UserName *string noSmithyDocumentSerde diff --git a/service/quicksight/types/types_exported_test.go b/service/quicksight/types/types_exported_test.go index 8ca8529f75d..8df31e146c1 100644 --- a/service/quicksight/types/types_exported_test.go +++ b/service/quicksight/types/types_exported_test.go @@ -29,6 +29,9 @@ func ExampleDataSourceParameters_outputUsage() { case *types.DataSourceParametersMemberAwsIotAnalyticsParameters: _ = v.Value // Value is types.AwsIotAnalyticsParameters + case *types.DataSourceParametersMemberExasolParameters: + _ = v.Value // Value is types.ExasolParameters + case *types.DataSourceParametersMemberJiraParameters: _ = v.Value // Value is types.JiraParameters @@ -92,6 +95,7 @@ var _ *types.OracleParameters var _ *types.JiraParameters var _ *types.TeradataParameters var _ *types.MySqlParameters +var _ *types.ExasolParameters var _ *types.SnowflakeParameters var _ *types.SqlServerParameters var _ *types.PostgreSqlParameters diff --git a/service/quicksight/validators.go b/service/quicksight/validators.go index 2fe7b8fc07a..4262bf11861 100644 --- a/service/quicksight/validators.go +++ b/service/quicksight/validators.go @@ -3234,6 +3234,11 @@ func validateDataSourceParameters(v types.DataSourceParameters) error { invalidParams.AddNested("[AwsIotAnalyticsParameters]", err.(smithy.InvalidParamsError)) } + case *types.DataSourceParametersMemberExasolParameters: + if err := validateExasolParameters(&uv.Value); err != nil { + invalidParams.AddNested("[ExasolParameters]", err.(smithy.InvalidParamsError)) + } + case *types.DataSourceParametersMemberJiraParameters: if err := validateJiraParameters(&uv.Value); err != nil { invalidParams.AddNested("[JiraParameters]", err.(smithy.InvalidParamsError)) @@ -3404,6 +3409,21 @@ func validateDecimalParameterList(v []types.DecimalParameter) error { } } +func validateExasolParameters(v *types.ExasolParameters) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ExasolParameters"} + if v.Host == nil { + invalidParams.Add(smithy.NewErrParamRequired("Host")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateFilterOperation(v *types.FilterOperation) error { if v == nil { return nil @@ -4436,6 +4456,23 @@ func validateUntagColumnOperation(v *types.UntagColumnOperation) error { } } +func validateUpdateLinkPermissionList(v []types.ResourcePermission) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateLinkPermissionList"} + for i := range v { + if err := validateResourcePermission(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateUpdateResourcePermissionList(v []types.ResourcePermission) error { if v == nil { return nil @@ -6554,6 +6591,16 @@ func validateOpUpdateDashboardPermissionsInput(v *UpdateDashboardPermissionsInpu invalidParams.AddNested("RevokePermissions", err.(smithy.InvalidParamsError)) } } + if v.GrantLinkPermissions != nil { + if err := validateUpdateLinkPermissionList(v.GrantLinkPermissions); err != nil { + invalidParams.AddNested("GrantLinkPermissions", err.(smithy.InvalidParamsError)) + } + } + if v.RevokeLinkPermissions != nil { + if err := validateUpdateLinkPermissionList(v.RevokeLinkPermissions); err != nil { + invalidParams.AddNested("RevokeLinkPermissions", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/rbin/LICENSE.txt b/service/rbin/LICENSE.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/service/rbin/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/service/rbin/api_client.go b/service/rbin/api_client.go new file mode 100644 index 00000000000..d8e2e5f272e --- /dev/null +++ b/service/rbin/api_client.go @@ -0,0 +1,296 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rbin + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/retry" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" + smithy "github.com/aws/smithy-go" + smithydocument "github.com/aws/smithy-go/document" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/http" + "time" +) + +const ServiceID = "rbin" +const ServiceAPIVersion = "2021-06-15" + +// Client provides the API client to make operations call for Amazon Recycle Bin. +type Client struct { + options Options +} + +// New returns an initialized Client based on the functional options. Provide +// additional functional options to further configure the behavior of the client, +// such as changing the client's endpoint or adding custom middleware behavior. +func New(options Options, optFns ...func(*Options)) *Client { + options = options.Copy() + + resolveDefaultLogger(&options) + + resolveRetryer(&options) + + resolveHTTPClient(&options) + + resolveHTTPSignerV4(&options) + + resolveDefaultEndpointConfiguration(&options) + + for _, fn := range optFns { + fn(&options) + } + + client := &Client{ + options: options, + } + + return client +} + +type Options struct { + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + APIOptions []func(*middleware.Stack) error + + // Configures the events that will be sent to the configured logger. + ClientLogMode aws.ClientLogMode + + // The credentials object to use when signing requests. + Credentials aws.CredentialsProvider + + // The endpoint options to be used when attempting to resolve an endpoint. + EndpointOptions EndpointResolverOptions + + // The service endpoint resolver. + EndpointResolver EndpointResolver + + // Signature Version 4 (SigV4) Signer + HTTPSignerV4 HTTPSignerV4 + + // The logger writer interface to write logging messages to. + Logger logging.Logger + + // The region to send requests to. (Required) + Region string + + // Retryer guides how HTTP requests should be retried in case of recoverable + // failures. When nil the API client will use a default retryer. + Retryer aws.Retryer + + // The HTTP client to invoke API calls with. Defaults to client's default HTTP + // implementation if nil. + HTTPClient HTTPClient +} + +// WithAPIOptions returns a functional option for setting the Client's APIOptions +// option. +func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { + return func(o *Options) { + o.APIOptions = append(o.APIOptions, optFns...) + } +} + +// WithEndpointResolver returns a functional option for setting the Client's +// EndpointResolver option. +func WithEndpointResolver(v EndpointResolver) func(*Options) { + return func(o *Options) { + o.EndpointResolver = v + } +} + +type HTTPClient interface { + Do(*http.Request) (*http.Response, error) +} + +// Copy creates a clone where the APIOptions list is deep copied. +func (o Options) Copy() Options { + to := o + to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) + copy(to.APIOptions, o.APIOptions) + return to +} +func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { + ctx = middleware.ClearStackValues(ctx) + stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) + options := c.options.Copy() + for _, fn := range optFns { + fn(&options) + } + + finalizeClientEndpointResolverOptions(&options) + + for _, fn := range stackFns { + if err := fn(stack, options); err != nil { + return nil, metadata, err + } + } + + for _, fn := range options.APIOptions { + if err := fn(stack); err != nil { + return nil, metadata, err + } + } + + handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) + result, metadata, err = handler.Handle(ctx, params) + if err != nil { + err = &smithy.OperationError{ + ServiceID: ServiceID, + OperationName: opID, + Err: err, + } + } + return result, metadata, err +} + +type noSmithyDocumentSerde = smithydocument.NoSerde + +func resolveDefaultLogger(o *Options) { + if o.Logger != nil { + return + } + o.Logger = logging.Nop{} +} + +func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { + return middleware.AddSetLoggerMiddleware(stack, o.Logger) +} + +// NewFromConfig returns a new client from the provided config. +func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { + opts := Options{ + Region: cfg.Region, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + } + resolveAWSRetryerProvider(cfg, &opts) + resolveAWSEndpointResolver(cfg, &opts) + resolveUseDualStackEndpoint(cfg, &opts) + resolveUseFIPSEndpoint(cfg, &opts) + return New(opts, optFns...) +} + +func resolveHTTPClient(o *Options) { + if o.HTTPClient != nil { + return + } + o.HTTPClient = awshttp.NewBuildableClient() +} + +func resolveRetryer(o *Options) { + if o.Retryer != nil { + return + } + o.Retryer = retry.NewStandard() +} + +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + +func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { + if cfg.EndpointResolver == nil { + return + } + o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver()) +} + +func addClientUserAgent(stack *middleware.Stack) error { + return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "rbin", goModuleVersion)(stack) +} + +func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error { + mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{ + CredentialsProvider: o.Credentials, + Signer: o.HTTPSignerV4, + LogSigning: o.ClientLogMode.IsSigning(), + }) + return stack.Finalize.Add(mw, middleware.After) +} + +type HTTPSignerV4 interface { + SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error +} + +func resolveHTTPSignerV4(o *Options) { + if o.HTTPSignerV4 != nil { + return + } + o.HTTPSignerV4 = newDefaultV4Signer(*o) +} + +func newDefaultV4Signer(o Options) *v4.Signer { + return v4.NewSigner(func(so *v4.SignerOptions) { + so.Logger = o.Logger + so.LogSigning = o.ClientLogMode.IsSigning() + }) +} + +func addRetryMiddlewares(stack *middleware.Stack, o Options) error { + mo := retry.AddRetryMiddlewaresOptions{ + Retryer: o.Retryer, + LogRetryAttempts: o.ClientLogMode.IsRetries(), + } + return retry.AddRetryMiddlewares(stack, mo) +} + +// resolves dual-stack endpoint configuration +func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseDualStackEndpoint = value + } + return nil +} + +// resolves FIPS endpoint configuration +func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseFIPSEndpoint = value + } + return nil +} + +func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { + return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) +} + +func addResponseErrorMiddleware(stack *middleware.Stack) error { + return awshttp.AddResponseErrorMiddleware(stack) +} + +func addRequestResponseLogging(stack *middleware.Stack, o Options) error { + return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ + LogRequest: o.ClientLogMode.IsRequest(), + LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), + LogResponse: o.ClientLogMode.IsResponse(), + LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), + }, middleware.After) +} diff --git a/service/rbin/api_op_CreateRule.go b/service/rbin/api_op_CreateRule.go new file mode 100644 index 00000000000..0f0e83b5b0d --- /dev/null +++ b/service/rbin/api_op_CreateRule.go @@ -0,0 +1,167 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rbin + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/rbin/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a Recycle Bin retention rule. For more information, see Create Recycle +// Bin retention rules +// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin-working-with-rules.html#recycle-bin-create-rule) +// in the Amazon EC2 User Guide. +func (c *Client) CreateRule(ctx context.Context, params *CreateRuleInput, optFns ...func(*Options)) (*CreateRuleOutput, error) { + if params == nil { + params = &CreateRuleInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateRule", params, optFns, c.addOperationCreateRuleMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateRuleOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateRuleInput struct { + + // The resource type to be retained by the retention rule. Currently, only Amazon + // EBS snapshots are supported. + // + // This member is required. + ResourceType types.ResourceType + + // Information about the retention period for which the retention rule is to retain + // resources. + // + // This member is required. + RetentionPeriod *types.RetentionPeriod + + // A brief description for the retention rule. + Description *string + + // Information about the resource tags to use to identify resources that are to be + // retained by the retention rule. The retention rule retains only deleted + // snapshots that have one or more of the specified tag key and value pairs. If a + // snapshot is deleted, but it does not have any of the specified tag key and value + // pairs, it is immediately deleted without being retained by the retention rule. + // You can add the same tag key and value pair to a maximum or five retention + // rules. + ResourceTags []types.ResourceTag + + // Information about the tags to assign to the retention rule. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type CreateRuleOutput struct { + + // The retention rule description. + Description *string + + // The unique identifier of the retention rule. + Identifier *string + + // Information about the resource tags used to identify resources that are retained + // by the retention rule. + ResourceTags []types.ResourceTag + + // The resource type retained by the retention rule. + ResourceType types.ResourceType + + // Information about the retention period for which a retention rule is to retain + // resources. + RetentionPeriod *types.RetentionPeriod + + // The state of the retention rule. Only retention rules that are in the available + // state retain snapshots. + Status types.RuleStatus + + // The tags assigned to the retention rule. + Tags []types.Tag + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateRule{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateRule{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateRuleValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateRule(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateRule(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "rbin", + OperationName: "CreateRule", + } +} diff --git a/service/rbin/api_op_DeleteRule.go b/service/rbin/api_op_DeleteRule.go new file mode 100644 index 00000000000..f7118e735e3 --- /dev/null +++ b/service/rbin/api_op_DeleteRule.go @@ -0,0 +1,119 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rbin + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a Recycle Bin retention rule. For more information, see Delete Recycle +// Bin retention rules +// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin-working-with-rules.html#recycle-bin-delete-rule) +// in the Amazon EC2 User Guide. +func (c *Client) DeleteRule(ctx context.Context, params *DeleteRuleInput, optFns ...func(*Options)) (*DeleteRuleOutput, error) { + if params == nil { + params = &DeleteRuleInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteRule", params, optFns, c.addOperationDeleteRuleMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteRuleOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteRuleInput struct { + + // The unique ID of the retention rule to delete. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type DeleteRuleOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteRule{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteRule{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteRuleValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRule(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteRule(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "rbin", + OperationName: "DeleteRule", + } +} diff --git a/service/rbin/api_op_GetRule.go b/service/rbin/api_op_GetRule.go new file mode 100644 index 00000000000..241d6af6bf1 --- /dev/null +++ b/service/rbin/api_op_GetRule.go @@ -0,0 +1,139 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rbin + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/rbin/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets information about a Recycle Bin retention rule. +func (c *Client) GetRule(ctx context.Context, params *GetRuleInput, optFns ...func(*Options)) (*GetRuleOutput, error) { + if params == nil { + params = &GetRuleInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetRule", params, optFns, c.addOperationGetRuleMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetRuleOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetRuleInput struct { + + // The unique ID of the retention rule. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type GetRuleOutput struct { + + // The description assigned to the retention rule. + Description *string + + // The unique ID of the retention rule. + Identifier *string + + // The resource tags used to identify resources that are to be retained by the + // retention rule. + ResourceTags []types.ResourceTag + + // The resource type retained by the retention rule. Currently, only Amazon EBS + // snapshots are supported. + ResourceType types.ResourceType + + // Information about the period for which the retention rule retains resources. + RetentionPeriod *types.RetentionPeriod + + // The state of the retention rule. Only retention rules that are in the available + // state retain snapshots. + Status types.RuleStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetRule{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetRule{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetRuleValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRule(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetRule(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "rbin", + OperationName: "GetRule", + } +} diff --git a/service/rbin/api_op_ListRules.go b/service/rbin/api_op_ListRules.go new file mode 100644 index 00000000000..9eab379054a --- /dev/null +++ b/service/rbin/api_op_ListRules.go @@ -0,0 +1,228 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rbin + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/rbin/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the Recycle Bin retention rules in the Region. +func (c *Client) ListRules(ctx context.Context, params *ListRulesInput, optFns ...func(*Options)) (*ListRulesOutput, error) { + if params == nil { + params = &ListRulesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListRules", params, optFns, c.addOperationListRulesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListRulesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListRulesInput struct { + + // The resource type retained by the retention rule. Only retention rules that + // retain the specified resource type are listed. + // + // This member is required. + ResourceType types.ResourceType + + // The maximum number of results to return for the request in a single page. The + // remaining results can be seen by sending another request with the returned + // nextToken value. This value can be between 5 and 500. If maxResults is given a + // larger value than 500, you receive an error. + MaxResults *int32 + + // The token to use to retrieve the next page of results. + NextToken *string + + // The tags used to identify resources that are to be retained by the retention + // rule. + ResourceTags []types.ResourceTag + + noSmithyDocumentSerde +} + +type ListRulesOutput struct { + + // The token to use to retrieve the next page of results. This value is null when + // there are no more results to return. + NextToken *string + + // Information about the retention rules. + Rules []types.RuleSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListRulesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListRules{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListRules{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListRulesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRules(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListRulesAPIClient is a client that implements the ListRules operation. +type ListRulesAPIClient interface { + ListRules(context.Context, *ListRulesInput, ...func(*Options)) (*ListRulesOutput, error) +} + +var _ ListRulesAPIClient = (*Client)(nil) + +// ListRulesPaginatorOptions is the paginator options for ListRules +type ListRulesPaginatorOptions struct { + // The maximum number of results to return for the request in a single page. The + // remaining results can be seen by sending another request with the returned + // nextToken value. This value can be between 5 and 500. If maxResults is given a + // larger value than 500, you receive an error. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListRulesPaginator is a paginator for ListRules +type ListRulesPaginator struct { + options ListRulesPaginatorOptions + client ListRulesAPIClient + params *ListRulesInput + nextToken *string + firstPage bool +} + +// NewListRulesPaginator returns a new ListRulesPaginator +func NewListRulesPaginator(client ListRulesAPIClient, params *ListRulesInput, optFns ...func(*ListRulesPaginatorOptions)) *ListRulesPaginator { + if params == nil { + params = &ListRulesInput{} + } + + options := ListRulesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListRulesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListRulesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListRules page. +func (p *ListRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListRulesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListRules(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListRules(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "rbin", + OperationName: "ListRules", + } +} diff --git a/service/rbin/api_op_ListTagsForResource.go b/service/rbin/api_op_ListTagsForResource.go new file mode 100644 index 00000000000..ecf815640be --- /dev/null +++ b/service/rbin/api_op_ListTagsForResource.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rbin + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/rbin/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the tags assigned a specific resource. +func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { + if params == nil { + params = &ListTagsForResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTagsForResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListTagsForResourceInput struct { + + // The Amazon Resource Name (ARN) of the resource for which to list the tags. + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + +type ListTagsForResourceOutput struct { + + // Information about the tags assigned to the resource. + Tags []types.Tag + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "rbin", + OperationName: "ListTagsForResource", + } +} diff --git a/service/rbin/api_op_TagResource.go b/service/rbin/api_op_TagResource.go new file mode 100644 index 00000000000..23a358fde0f --- /dev/null +++ b/service/rbin/api_op_TagResource.go @@ -0,0 +1,122 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rbin + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/rbin/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Assigns tags to the specified resource. +func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { + if params == nil { + params = &TagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TagResourceInput struct { + + // The Amazon Resource Name (ARN) of the resource to which to assign the tags. + // + // This member is required. + ResourceArn *string + + // Information about the tags to assign to the resource. + // + // This member is required. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type TagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpTagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "rbin", + OperationName: "TagResource", + } +} diff --git a/service/rbin/api_op_UntagResource.go b/service/rbin/api_op_UntagResource.go new file mode 100644 index 00000000000..7855922c803 --- /dev/null +++ b/service/rbin/api_op_UntagResource.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rbin + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Unassigns a tag from a resource. +func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { + if params == nil { + params = &UntagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UntagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UntagResourceInput struct { + + // The Amazon Resource Name (ARN) of the resource from which to unassign the tags. + // + // This member is required. + ResourceArn *string + + // Information about the tags to unassign from the resource. + // + // This member is required. + TagKeys []string + + noSmithyDocumentSerde +} + +type UntagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUntagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "rbin", + OperationName: "UntagResource", + } +} diff --git a/service/rbin/api_op_UpdateRule.go b/service/rbin/api_op_UpdateRule.go new file mode 100644 index 00000000000..e37b24dc7cc --- /dev/null +++ b/service/rbin/api_op_UpdateRule.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rbin + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/rbin/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates an existing Recycle Bin retention rule. For more information, see +// Update Recycle Bin retention rules +// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin-working-with-rules.html#recycle-bin-update-rule) +// in the Amazon EC2 User Guide. +func (c *Client) UpdateRule(ctx context.Context, params *UpdateRuleInput, optFns ...func(*Options)) (*UpdateRuleOutput, error) { + if params == nil { + params = &UpdateRuleInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateRule", params, optFns, c.addOperationUpdateRuleMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateRuleOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateRuleInput struct { + + // The unique ID of the retention rule to update. + // + // This member is required. + Identifier *string + + // The retention rule description. + Description *string + + // Information about the resource tags to use to identify resources that are to be + // retained by the retention rule. The retention rule retains only deleted + // snapshots that have one or more of the specified tag key and value pairs. If a + // snapshot is deleted, but it does not have any of the specified tag key and value + // pairs, it is immediately deleted without being retained by the retention rule. + // You can add the same tag key and value pair to a maximum or five retention + // rules. + ResourceTags []types.ResourceTag + + // The resource type to be retained by the retention rule. Currently, only Amazon + // EBS snapshots are supported. + ResourceType types.ResourceType + + // Information about the retention period for which the retention rule is to retain + // resources. + RetentionPeriod *types.RetentionPeriod + + noSmithyDocumentSerde +} + +type UpdateRuleOutput struct { + + // The retention rule description. + Description *string + + // The unique ID of the retention rule. + Identifier *string + + // Information about the resource tags used to identify resources that are retained + // by the retention rule. + ResourceTags []types.ResourceTag + + // The resource type retained by the retention rule. + ResourceType types.ResourceType + + // Information about the retention period for which a retention rule is to retain + // resources. + RetentionPeriod *types.RetentionPeriod + + // The state of the retention rule. Only retention rules that are in the available + // state retain snapshots. + Status types.RuleStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateRule{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateRule{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateRuleValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRule(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateRule(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "rbin", + OperationName: "UpdateRule", + } +} diff --git a/service/rbin/deserializers.go b/service/rbin/deserializers.go new file mode 100644 index 00000000000..5eda022f535 --- /dev/null +++ b/service/rbin/deserializers.go @@ -0,0 +1,1826 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rbin + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/rbin/types" + smithy "github.com/aws/smithy-go" + smithyio "github.com/aws/smithy-go/io" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" + "strings" +) + +type awsRestjson1_deserializeOpCreateRule struct { +} + +func (*awsRestjson1_deserializeOpCreateRule) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCreateRule(response, &metadata) + } + output := &CreateRuleOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreateRuleOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateRuleOutput(v **CreateRuleOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateRuleOutput + if *v == nil { + sv = &CreateRuleOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "Identifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleIdentifier to be of type string, got %T instead", value) + } + sv.Identifier = ptr.String(jtv) + } + + case "ResourceTags": + if err := awsRestjson1_deserializeDocumentResourceTags(&sv.ResourceTags, value); err != nil { + return err + } + + case "ResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value) + } + sv.ResourceType = types.ResourceType(jtv) + } + + case "RetentionPeriod": + if err := awsRestjson1_deserializeDocumentRetentionPeriod(&sv.RetentionPeriod, value); err != nil { + return err + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleStatus to be of type string, got %T instead", value) + } + sv.Status = types.RuleStatus(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagList(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteRule struct { +} + +func (*awsRestjson1_deserializeOpDeleteRule) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteRule(response, &metadata) + } + output := &DeleteRuleOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpGetRule struct { +} + +func (*awsRestjson1_deserializeOpGetRule) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetRule(response, &metadata) + } + output := &GetRuleOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetRuleOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetRuleOutput(v **GetRuleOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetRuleOutput + if *v == nil { + sv = &GetRuleOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "Identifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleIdentifier to be of type string, got %T instead", value) + } + sv.Identifier = ptr.String(jtv) + } + + case "ResourceTags": + if err := awsRestjson1_deserializeDocumentResourceTags(&sv.ResourceTags, value); err != nil { + return err + } + + case "ResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value) + } + sv.ResourceType = types.ResourceType(jtv) + } + + case "RetentionPeriod": + if err := awsRestjson1_deserializeDocumentRetentionPeriod(&sv.RetentionPeriod, value); err != nil { + return err + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleStatus to be of type string, got %T instead", value) + } + sv.Status = types.RuleStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListRules struct { +} + +func (*awsRestjson1_deserializeOpListRules) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListRules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListRules(response, &metadata) + } + output := &ListRulesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListRulesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListRules(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListRulesOutput(v **ListRulesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListRulesOutput + if *v == nil { + sv = &ListRulesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Rules": + if err := awsRestjson1_deserializeDocumentRuleSummaryList(&sv.Rules, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListTagsForResource struct { +} + +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) + } + output := &ListTagsForResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListTagsForResourceOutput + if *v == nil { + sv = &ListTagsForResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Tags": + if err := awsRestjson1_deserializeDocumentTagList(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpTagResource struct { +} + +func (*awsRestjson1_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) + } + output := &TagResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUntagResource struct { +} + +func (*awsRestjson1_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) + } + output := &UntagResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUpdateRule struct { +} + +func (*awsRestjson1_deserializeOpUpdateRule) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateRule(response, &metadata) + } + output := &UpdateRuleOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateRuleOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateRuleOutput(v **UpdateRuleOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateRuleOutput + if *v == nil { + sv = &UpdateRuleOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "Identifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleIdentifier to be of type string, got %T instead", value) + } + sv.Identifier = ptr.String(jtv) + } + + case "ResourceTags": + if err := awsRestjson1_deserializeDocumentResourceTags(&sv.ResourceTags, value); err != nil { + return err + } + + case "ResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value) + } + sv.ResourceType = types.ResourceType(jtv) + } + + case "RetentionPeriod": + if err := awsRestjson1_deserializeDocumentRetentionPeriod(&sv.RetentionPeriod, value); err != nil { + return err + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleStatus to be of type string, got %T instead", value) + } + sv.Status = types.RuleStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalServerException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceNotFoundException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServiceQuotaExceededException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentServiceQuotaExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ValidationException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentValidationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InternalServerException + if *v == nil { + sv = &types.InternalServerException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceNotFoundException + if *v == nil { + sv = &types.ResourceNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "Reason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceNotFoundExceptionReason to be of type string, got %T instead", value) + } + sv.Reason = types.ResourceNotFoundExceptionReason(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentResourceTag(v **types.ResourceTag, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceTag + if *v == nil { + sv = &types.ResourceTag{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ResourceTagKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceTagKey to be of type string, got %T instead", value) + } + sv.ResourceTagKey = ptr.String(jtv) + } + + case "ResourceTagValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceTagValue to be of type string, got %T instead", value) + } + sv.ResourceTagValue = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentResourceTags(v *[]types.ResourceTag, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ResourceTag + if *v == nil { + cv = []types.ResourceTag{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ResourceTag + destAddr := &col + if err := awsRestjson1_deserializeDocumentResourceTag(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRetentionPeriod(v **types.RetentionPeriod, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RetentionPeriod + if *v == nil { + sv = &types.RetentionPeriod{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "RetentionPeriodUnit": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RetentionPeriodUnit to be of type string, got %T instead", value) + } + sv.RetentionPeriodUnit = types.RetentionPeriodUnit(jtv) + } + + case "RetentionPeriodValue": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected RetentionPeriodValue to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RetentionPeriodValue = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRuleSummary(v **types.RuleSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RuleSummary + if *v == nil { + sv = &types.RuleSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "Identifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleIdentifier to be of type string, got %T instead", value) + } + sv.Identifier = ptr.String(jtv) + } + + case "RetentionPeriod": + if err := awsRestjson1_deserializeDocumentRetentionPeriod(&sv.RetentionPeriod, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRuleSummaryList(v *[]types.RuleSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.RuleSummary + if *v == nil { + cv = []types.RuleSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RuleSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentRuleSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ServiceQuotaExceededException + if *v == nil { + sv = &types.ServiceQuotaExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "Reason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceQuotaExceededExceptionReason to be of type string, got %T instead", value) + } + sv.Reason = types.ServiceQuotaExceededExceptionReason(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTag(v **types.Tag, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Tag + if *v == nil { + sv = &types.Tag{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagKey to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + case "Value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTagList(v *[]types.Tag, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Tag + if *v == nil { + cv = []types.Tag{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Tag + destAddr := &col + if err := awsRestjson1_deserializeDocumentTag(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ValidationException + if *v == nil { + sv = &types.ValidationException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "Reason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ValidationExceptionReason to be of type string, got %T instead", value) + } + sv.Reason = types.ValidationExceptionReason(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} diff --git a/service/rbin/doc.go b/service/rbin/doc.go new file mode 100644 index 00000000000..1b83272e3a9 --- /dev/null +++ b/service/rbin/doc.go @@ -0,0 +1,20 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package rbin provides the API client, operations, and parameter types for Amazon +// Recycle Bin. +// +// This is the Recycle Bin API Reference. This documentation provides descriptions +// and syntax for each of the actions and data types in Recycle Bin. Recycle Bin is +// a snapshot recovery feature that enables you to restore accidentally deleted +// snapshots. When using Recycle Bin, if your snapshots are deleted, they are +// retained in the Recycle Bin for a time period that you specify. You can restore +// a snapshot from the Recycle Bin at any time before its retention period expires. +// After you restore a snapshot from the Recycle Bin, the snapshot is removed from +// the Recycle Bin, and you can then use it in the same way you use any other +// snapshot in your account. If the retention period expires and the snapshot is +// not restored, the snapshot is permanently deleted from the Recycle Bin and is no +// longer available for recovery. For more information about Recycle Bin, see +// Recycle Bin +// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-recycle-bin.html) +// in the Amazon EC2 User Guide. +package rbin diff --git a/service/rbin/endpoints.go b/service/rbin/endpoints.go new file mode 100644 index 00000000000..42dcd01c25f --- /dev/null +++ b/service/rbin/endpoints.go @@ -0,0 +1,200 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rbin + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + internalendpoints "github.com/aws/aws-sdk-go-v2/service/rbin/internal/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/url" + "strings" +) + +// EndpointResolverOptions is the service endpoint resolver options +type EndpointResolverOptions = internalendpoints.Options + +// EndpointResolver interface for resolving service endpoints. +type EndpointResolver interface { + ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) +} + +var _ EndpointResolver = &internalendpoints.Resolver{} + +// NewDefaultEndpointResolver constructs a new service endpoint resolver +func NewDefaultEndpointResolver() *internalendpoints.Resolver { + return internalendpoints.New() +} + +// EndpointResolverFunc is a helper utility that wraps a function so it satisfies +// the EndpointResolver interface. This is useful when you want to add additional +// endpoint resolving logic, or stub out specific endpoints with custom values. +type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) + +func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + return fn(region, options) +} + +func resolveDefaultEndpointConfiguration(o *Options) { + if o.EndpointResolver != nil { + return + } + o.EndpointResolver = NewDefaultEndpointResolver() +} + +// EndpointResolverFromURL returns an EndpointResolver configured using the +// provided endpoint url. By default, the resolved endpoint resolver uses the +// client region as signing region, and the endpoint source is set to +// EndpointSourceCustom.You can provide functional options to configure endpoint +// values for the resolved endpoint. +func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { + e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} + for _, fn := range optFns { + fn(&e) + } + + return EndpointResolverFunc( + func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { + if len(e.SigningRegion) == 0 { + e.SigningRegion = region + } + return e, nil + }, + ) +} + +type ResolveEndpoint struct { + Resolver EndpointResolver + Options EndpointResolverOptions +} + +func (*ResolveEndpoint) ID() string { + return "ResolveEndpoint" +} + +func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.Resolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + eo := m.Options + eo.Logger = middleware.GetLogger(ctx) + + var endpoint aws.Endpoint + endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL, err = url.Parse(endpoint.URL) + if err != nil { + return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) + } + + if len(awsmiddleware.GetSigningName(ctx)) == 0 { + signingName := endpoint.SigningName + if len(signingName) == 0 { + signingName = "rbin" + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + } + ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) + ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) + ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) + ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) + return next.HandleSerialize(ctx, in) +} +func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { + return stack.Serialize.Insert(&ResolveEndpoint{ + Resolver: o.EndpointResolver, + Options: o.EndpointOptions, + }, "OperationSerializer", middleware.Before) +} + +func removeResolveEndpointMiddleware(stack *middleware.Stack) error { + _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) + return err +} + +type wrappedEndpointResolver struct { + awsResolver aws.EndpointResolverWithOptions + resolver EndpointResolver +} + +func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + if w.awsResolver == nil { + goto fallback + } + endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options) + if err == nil { + return endpoint, nil + } + + if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) { + return endpoint, err + } + +fallback: + if w.resolver == nil { + return endpoint, fmt.Errorf("default endpoint resolver provided was nil") + } + return w.resolver.ResolveEndpoint(region, options) +} + +type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) + +func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { + return a(service, region) +} + +var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) + +// withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. +// If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided +// fallbackResolver for resolution. +// +// fallbackResolver must not be nil +func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver { + var resolver aws.EndpointResolverWithOptions + + if awsResolverWithOptions != nil { + resolver = awsResolverWithOptions + } else if awsResolver != nil { + resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) + } + + return &wrappedEndpointResolver{ + awsResolver: resolver, + resolver: fallbackResolver, + } +} + +func finalizeClientEndpointResolverOptions(options *Options) { + options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() + + if len(options.EndpointOptions.ResolvedRegion) == 0 { + const fipsInfix = "-fips-" + const fipsPrefix = "fips-" + const fipsSuffix = "-fips" + + if strings.Contains(options.Region, fipsInfix) || + strings.Contains(options.Region, fipsPrefix) || + strings.Contains(options.Region, fipsSuffix) { + options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( + options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") + options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled + } + } + +} diff --git a/service/rbin/generated.json b/service/rbin/generated.json new file mode 100644 index 00000000000..dc4e9038ae1 --- /dev/null +++ b/service/rbin/generated.json @@ -0,0 +1,34 @@ +{ + "dependencies": { + "github.com/aws/aws-sdk-go-v2": "v1.4.0", + "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", + "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", + "github.com/aws/smithy-go": "v1.4.0" + }, + "files": [ + "api_client.go", + "api_op_CreateRule.go", + "api_op_DeleteRule.go", + "api_op_GetRule.go", + "api_op_ListRules.go", + "api_op_ListTagsForResource.go", + "api_op_TagResource.go", + "api_op_UntagResource.go", + "api_op_UpdateRule.go", + "deserializers.go", + "doc.go", + "endpoints.go", + "generated.json", + "internal/endpoints/endpoints.go", + "internal/endpoints/endpoints_test.go", + "protocol_test.go", + "serializers.go", + "types/enums.go", + "types/errors.go", + "types/types.go", + "validators.go" + ], + "go": "1.15", + "module": "github.com/aws/aws-sdk-go-v2/service/rbin", + "unstable": false +} diff --git a/service/rbin/go.mod b/service/rbin/go.mod new file mode 100644 index 00000000000..32e7bbf260e --- /dev/null +++ b/service/rbin/go.mod @@ -0,0 +1,16 @@ +module github.com/aws/aws-sdk-go-v2/service/rbin + +go 1.15 + +require ( + github.com/aws/aws-sdk-go-v2 v1.11.1 + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.1 + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.0.1 + github.com/aws/smithy-go v1.9.0 +) + +replace github.com/aws/aws-sdk-go-v2 => ../../ + +replace github.com/aws/aws-sdk-go-v2/internal/configsources => ../../internal/configsources/ + +replace github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 => ../../internal/endpoints/v2/ diff --git a/service/rbin/go.sum b/service/rbin/go.sum new file mode 100644 index 00000000000..45efc0b1e03 --- /dev/null +++ b/service/rbin/go.sum @@ -0,0 +1,14 @@ +github.com/aws/smithy-go v1.9.0 h1:c7FUdEqrQA1/UVKKCNDFQPNKGp4FQg3YW4Ck5SLTG58= +github.com/aws/smithy-go v1.9.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/service/rbin/go_module_metadata.go b/service/rbin/go_module_metadata.go new file mode 100644 index 00000000000..820ab4075bc --- /dev/null +++ b/service/rbin/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package rbin + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "tip" diff --git a/service/rbin/internal/endpoints/endpoints.go b/service/rbin/internal/endpoints/endpoints.go new file mode 100644 index 00000000000..2d06be0f83c --- /dev/null +++ b/service/rbin/internal/endpoints/endpoints.go @@ -0,0 +1,250 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "github.com/aws/aws-sdk-go-v2/aws" + endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" + "github.com/aws/smithy-go/logging" + "regexp" +) + +// Options is the endpoint resolver configuration options +type Options struct { + // Logger is a logging implementation that log events should be sent to. + Logger logging.Logger + + // LogDeprecated indicates that deprecated endpoints should be logged to the + // provided logger. + LogDeprecated bool + + // ResolvedRegion is used to override the region to be resolved, rather then the + // using the value passed to the ResolveEndpoint method. This value is used by the + // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative + // name. You must not set this value directly in your application. + ResolvedRegion string + + // DisableHTTPS informs the resolver to return an endpoint that does not use the + // HTTPS scheme. + DisableHTTPS bool + + // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. + UseDualStackEndpoint aws.DualStackEndpointState + + // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. + UseFIPSEndpoint aws.FIPSEndpointState +} + +func (o Options) GetResolvedRegion() string { + return o.ResolvedRegion +} + +func (o Options) GetDisableHTTPS() bool { + return o.DisableHTTPS +} + +func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { + return o.UseDualStackEndpoint +} + +func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { + return o.UseFIPSEndpoint +} + +func transformToSharedOptions(options Options) endpoints.Options { + return endpoints.Options{ + Logger: options.Logger, + LogDeprecated: options.LogDeprecated, + ResolvedRegion: options.ResolvedRegion, + DisableHTTPS: options.DisableHTTPS, + UseDualStackEndpoint: options.UseDualStackEndpoint, + UseFIPSEndpoint: options.UseFIPSEndpoint, + } +} + +// Resolver rbin endpoint resolver +type Resolver struct { + partitions endpoints.Partitions +} + +// ResolveEndpoint resolves the service endpoint for the given region and options +func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { + if len(region) == 0 { + return endpoint, &aws.MissingRegionError{} + } + + opt := transformToSharedOptions(options) + return r.partitions.ResolveEndpoint(region, opt) +} + +// New returns a new Resolver +func New() *Resolver { + return &Resolver{ + partitions: defaultPartitions, + } +} + +var partitionRegexp = struct { + Aws *regexp.Regexp + AwsCn *regexp.Regexp + AwsIso *regexp.Regexp + AwsIsoB *regexp.Regexp + AwsUsGov *regexp.Regexp +}{ + + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"), + AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), + AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), + AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), + AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), +} + +var defaultPartitions = endpoints.Partitions{ + { + ID: "aws", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "rbin.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "rbin-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "rbin-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "rbin.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: true, + }, + { + ID: "aws-cn", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "rbin.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "rbin-fips.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "rbin-fips.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "rbin.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsCn, + IsRegionalized: true, + }, + { + ID: "aws-iso", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "rbin-fips.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "rbin.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIso, + IsRegionalized: true, + }, + { + ID: "aws-iso-b", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "rbin-fips.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "rbin.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoB, + IsRegionalized: true, + }, + { + ID: "aws-us-gov", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "rbin.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "rbin-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "rbin-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "rbin.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: true, + }, +} diff --git a/service/rbin/internal/endpoints/endpoints_test.go b/service/rbin/internal/endpoints/endpoints_test.go new file mode 100644 index 00000000000..08e5da2d833 --- /dev/null +++ b/service/rbin/internal/endpoints/endpoints_test.go @@ -0,0 +1,11 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "testing" +) + +func TestRegexCompile(t *testing.T) { + _ = defaultPartitions +} diff --git a/service/rbin/protocol_test.go b/service/rbin/protocol_test.go new file mode 100644 index 00000000000..721c466c2a0 --- /dev/null +++ b/service/rbin/protocol_test.go @@ -0,0 +1,3 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rbin diff --git a/service/rbin/serializers.go b/service/rbin/serializers.go new file mode 100644 index 00000000000..f49ea5c68f9 --- /dev/null +++ b/service/rbin/serializers.go @@ -0,0 +1,692 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rbin + +import ( + "bytes" + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/rbin/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/encoding/httpbinding" + smithyjson "github.com/aws/smithy-go/encoding/json" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +type awsRestjson1_serializeOpCreateRule struct { +} + +func (*awsRestjson1_serializeOpCreateRule) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateRuleInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/rules") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateRuleInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateRuleInput(v *CreateRuleInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateRuleInput(v *CreateRuleInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.ResourceTags != nil { + ok := object.Key("ResourceTags") + if err := awsRestjson1_serializeDocumentResourceTags(v.ResourceTags, ok); err != nil { + return err + } + } + + if len(v.ResourceType) > 0 { + ok := object.Key("ResourceType") + ok.String(string(v.ResourceType)) + } + + if v.RetentionPeriod != nil { + ok := object.Key("RetentionPeriod") + if err := awsRestjson1_serializeDocumentRetentionPeriod(v.RetentionPeriod, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteRule struct { +} + +func (*awsRestjson1_serializeOpDeleteRule) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteRuleInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/rules/{Identifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteRuleInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteRuleInput(v *DeleteRuleInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Identifier must not be empty")} + } + if v.Identifier != nil { + if err := encoder.SetURI("Identifier").String(*v.Identifier); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetRule struct { +} + +func (*awsRestjson1_serializeOpGetRule) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetRuleInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/rules/{Identifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetRuleInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetRuleInput(v *GetRuleInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Identifier must not be empty")} + } + if v.Identifier != nil { + if err := encoder.SetURI("Identifier").String(*v.Identifier); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpListRules struct { +} + +func (*awsRestjson1_serializeOpListRules) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListRules) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListRulesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/list-rules") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentListRulesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListRulesInput(v *ListRulesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListRulesInput(v *ListRulesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.ResourceTags != nil { + ok := object.Key("ResourceTags") + if err := awsRestjson1_serializeDocumentResourceTags(v.ResourceTags, ok); err != nil { + return err + } + } + + if len(v.ResourceType) > 0 { + ok := object.Key("ResourceType") + ok.String(string(v.ResourceType)) + } + + return nil +} + +type awsRestjson1_serializeOpListTagsForResource struct { +} + +func (*awsRestjson1_serializeOpListTagsForResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListTagsForResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpTagResource struct { +} + +func (*awsRestjson1_serializeOpTagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*TagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUntagResource struct { +} + +func (*awsRestjson1_serializeOpUntagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UntagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + if v.TagKeys != nil { + for i := range v.TagKeys { + encoder.AddQuery("tagKeys").String(v.TagKeys[i]) + } + } + + return nil +} + +type awsRestjson1_serializeOpUpdateRule struct { +} + +func (*awsRestjson1_serializeOpUpdateRule) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateRuleInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/rules/{Identifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PATCH" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateRuleInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateRuleInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateRuleInput(v *UpdateRuleInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Identifier must not be empty")} + } + if v.Identifier != nil { + if err := encoder.SetURI("Identifier").String(*v.Identifier); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateRuleInput(v *UpdateRuleInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.ResourceTags != nil { + ok := object.Key("ResourceTags") + if err := awsRestjson1_serializeDocumentResourceTags(v.ResourceTags, ok); err != nil { + return err + } + } + + if len(v.ResourceType) > 0 { + ok := object.Key("ResourceType") + ok.String(string(v.ResourceType)) + } + + if v.RetentionPeriod != nil { + ok := object.Key("RetentionPeriod") + if err := awsRestjson1_serializeDocumentRetentionPeriod(v.RetentionPeriod, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentResourceTag(v *types.ResourceTag, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ResourceTagKey != nil { + ok := object.Key("ResourceTagKey") + ok.String(*v.ResourceTagKey) + } + + if v.ResourceTagValue != nil { + ok := object.Key("ResourceTagValue") + ok.String(*v.ResourceTagValue) + } + + return nil +} + +func awsRestjson1_serializeDocumentResourceTags(v []types.ResourceTag, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentResourceTag(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentRetentionPeriod(v *types.RetentionPeriod, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.RetentionPeriodUnit) > 0 { + ok := object.Key("RetentionPeriodUnit") + ok.String(string(v.RetentionPeriodUnit)) + } + + if v.RetentionPeriodValue != nil { + ok := object.Key("RetentionPeriodValue") + ok.Integer(*v.RetentionPeriodValue) + } + + return nil +} + +func awsRestjson1_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("Key") + ok.String(*v.Key) + } + + if v.Value != nil { + ok := object.Key("Value") + ok.String(*v.Value) + } + + return nil +} + +func awsRestjson1_serializeDocumentTagList(v []types.Tag, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentTag(&v[i], av); err != nil { + return err + } + } + return nil +} diff --git a/service/rbin/types/enums.go b/service/rbin/types/enums.go new file mode 100644 index 00000000000..88329a3450f --- /dev/null +++ b/service/rbin/types/enums.go @@ -0,0 +1,105 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type ResourceNotFoundExceptionReason string + +// Enum values for ResourceNotFoundExceptionReason +const ( + ResourceNotFoundExceptionReasonRuleNotFound ResourceNotFoundExceptionReason = "RULE_NOT_FOUND" +) + +// Values returns all known values for ResourceNotFoundExceptionReason. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. The ordering of this slice is not guaranteed to be stable across +// updates. +func (ResourceNotFoundExceptionReason) Values() []ResourceNotFoundExceptionReason { + return []ResourceNotFoundExceptionReason{ + "RULE_NOT_FOUND", + } +} + +type ResourceType string + +// Enum values for ResourceType +const ( + ResourceTypeEbsSnapshot ResourceType = "EBS_SNAPSHOT" +) + +// Values returns all known values for ResourceType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (ResourceType) Values() []ResourceType { + return []ResourceType{ + "EBS_SNAPSHOT", + } +} + +type RetentionPeriodUnit string + +// Enum values for RetentionPeriodUnit +const ( + RetentionPeriodUnitDays RetentionPeriodUnit = "DAYS" +) + +// Values returns all known values for RetentionPeriodUnit. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (RetentionPeriodUnit) Values() []RetentionPeriodUnit { + return []RetentionPeriodUnit{ + "DAYS", + } +} + +type RuleStatus string + +// Enum values for RuleStatus +const ( + RuleStatusPending RuleStatus = "pending" + RuleStatusAvailable RuleStatus = "available" +) + +// Values returns all known values for RuleStatus. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (RuleStatus) Values() []RuleStatus { + return []RuleStatus{ + "pending", + "available", + } +} + +type ServiceQuotaExceededExceptionReason string + +// Enum values for ServiceQuotaExceededExceptionReason +const ( + ServiceQuotaExceededExceptionReasonServiceQuotaExceeded ServiceQuotaExceededExceptionReason = "SERVICE_QUOTA_EXCEEDED" +) + +// Values returns all known values for ServiceQuotaExceededExceptionReason. Note +// that this can be expanded in the future, and so it is only as up to date as the +// client. The ordering of this slice is not guaranteed to be stable across +// updates. +func (ServiceQuotaExceededExceptionReason) Values() []ServiceQuotaExceededExceptionReason { + return []ServiceQuotaExceededExceptionReason{ + "SERVICE_QUOTA_EXCEEDED", + } +} + +type ValidationExceptionReason string + +// Enum values for ValidationExceptionReason +const ( + ValidationExceptionReasonInvalidPageToken ValidationExceptionReason = "INVALID_PAGE_TOKEN" + ValidationExceptionReasonInvalidParameterValue ValidationExceptionReason = "INVALID_PARAMETER_VALUE" +) + +// Values returns all known values for ValidationExceptionReason. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// The ordering of this slice is not guaranteed to be stable across updates. +func (ValidationExceptionReason) Values() []ValidationExceptionReason { + return []ValidationExceptionReason{ + "INVALID_PAGE_TOKEN", + "INVALID_PARAMETER_VALUE", + } +} diff --git a/service/rbin/types/errors.go b/service/rbin/types/errors.go new file mode 100644 index 00000000000..1d9ef92b731 --- /dev/null +++ b/service/rbin/types/errors.go @@ -0,0 +1,91 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "fmt" + smithy "github.com/aws/smithy-go" +) + +// The service could not respond to the request due to an internal problem. +type InternalServerException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *InternalServerException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InternalServerException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InternalServerException) ErrorCode() string { return "InternalServerException" } +func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// The specified resource was not found. +type ResourceNotFoundException struct { + Message *string + + Reason ResourceNotFoundExceptionReason + + noSmithyDocumentSerde +} + +func (e *ResourceNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceNotFoundException) ErrorCode() string { return "ResourceNotFoundException" } +func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request would cause a service quota for the number of tags per resource to +// be exceeded. +type ServiceQuotaExceededException struct { + Message *string + + Reason ServiceQuotaExceededExceptionReason + + noSmithyDocumentSerde +} + +func (e *ServiceQuotaExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceQuotaExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceQuotaExceededException) ErrorCode() string { return "ServiceQuotaExceededException" } +func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// One or more of the parameters in the request is not valid. +type ValidationException struct { + Message *string + + Reason ValidationExceptionReason + + noSmithyDocumentSerde +} + +func (e *ValidationException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ValidationException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ValidationException) ErrorCode() string { return "ValidationException" } +func (e *ValidationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/service/rbin/types/types.go b/service/rbin/types/types.go new file mode 100644 index 00000000000..b799083ecc6 --- /dev/null +++ b/service/rbin/types/types.go @@ -0,0 +1,75 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + smithydocument "github.com/aws/smithy-go/document" +) + +// Information about a resource tag used to identify resources that are to be +// retained by a Recycle Bin retention rule. +type ResourceTag struct { + + // The tag key. + // + // This member is required. + ResourceTagKey *string + + // The tag value. + ResourceTagValue *string + + noSmithyDocumentSerde +} + +// Information about the retention period for which a retention rule is to retain +// resources. +type RetentionPeriod struct { + + // The unit of time in which the retention period is measured. Currently, only DAYS + // is supported. + // + // This member is required. + RetentionPeriodUnit RetentionPeriodUnit + + // The period value for which the retention rule is to retain resources. The period + // is measured using the unit specified for RetentionPeriodUnit. + // + // This member is required. + RetentionPeriodValue *int32 + + noSmithyDocumentSerde +} + +// Information about a Recycle Bin retention rule. +type RuleSummary struct { + + // The description for the retention rule. + Description *string + + // The unique ID of the retention rule. + Identifier *string + + // Information about the retention period for which the retention rule retains + // resources + RetentionPeriod *RetentionPeriod + + noSmithyDocumentSerde +} + +// Information about the tags assigned to a Recycle Bin retention rule. +type Tag struct { + + // The tag key. + // + // This member is required. + Key *string + + // The tag value. + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + +type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/rbin/validators.go b/service/rbin/validators.go new file mode 100644 index 00000000000..6145e4130e9 --- /dev/null +++ b/service/rbin/validators.go @@ -0,0 +1,450 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rbin + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/rbin/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpCreateRule struct { +} + +func (*validateOpCreateRule) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateRuleInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateRuleInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteRule struct { +} + +func (*validateOpDeleteRule) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteRuleInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteRuleInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetRule struct { +} + +func (*validateOpGetRule) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetRuleInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetRuleInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListRules struct { +} + +func (*validateOpListRules) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListRules) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListRulesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListRulesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListTagsForResource struct { +} + +func (*validateOpListTagsForResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListTagsForResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListTagsForResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpTagResource struct { +} + +func (*validateOpTagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUntagResource struct { +} + +func (*validateOpUntagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UntagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUntagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateRule struct { +} + +func (*validateOpUpdateRule) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateRuleInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateRuleInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpCreateRuleValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateRule{}, middleware.After) +} + +func addOpDeleteRuleValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteRule{}, middleware.After) +} + +func addOpGetRuleValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetRule{}, middleware.After) +} + +func addOpListRulesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListRules{}, middleware.After) +} + +func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) +} + +func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) +} + +func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) +} + +func addOpUpdateRuleValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateRule{}, middleware.After) +} + +func validateResourceTag(v *types.ResourceTag) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResourceTag"} + if v.ResourceTagKey == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceTagKey")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResourceTags(v []types.ResourceTag) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResourceTags"} + for i := range v { + if err := validateResourceTag(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRetentionPeriod(v *types.RetentionPeriod) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RetentionPeriod"} + if v.RetentionPeriodValue == nil { + invalidParams.Add(smithy.NewErrParamRequired("RetentionPeriodValue")) + } + if len(v.RetentionPeriodUnit) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("RetentionPeriodUnit")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTag(v *types.Tag) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Tag"} + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTagList(v []types.Tag) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagList"} + for i := range v { + if err := validateTag(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateRuleInput(v *CreateRuleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateRuleInput"} + if v.RetentionPeriod == nil { + invalidParams.Add(smithy.NewErrParamRequired("RetentionPeriod")) + } else if v.RetentionPeriod != nil { + if err := validateRetentionPeriod(v.RetentionPeriod); err != nil { + invalidParams.AddNested("RetentionPeriod", err.(smithy.InvalidParamsError)) + } + } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if len(v.ResourceType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ResourceType")) + } + if v.ResourceTags != nil { + if err := validateResourceTags(v.ResourceTags); err != nil { + invalidParams.AddNested("ResourceTags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteRuleInput(v *DeleteRuleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteRuleInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetRuleInput(v *GetRuleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetRuleInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListRulesInput(v *ListRulesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListRulesInput"} + if len(v.ResourceType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ResourceType")) + } + if v.ResourceTags != nil { + if err := validateResourceTags(v.ResourceTags); err != nil { + invalidParams.AddNested("ResourceTags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpTagResourceInput(v *TagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.Tags == nil { + invalidParams.Add(smithy.NewErrParamRequired("Tags")) + } else if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUntagResourceInput(v *UntagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.TagKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateRuleInput(v *UpdateRuleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateRuleInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if v.RetentionPeriod != nil { + if err := validateRetentionPeriod(v.RetentionPeriod); err != nil { + invalidParams.AddNested("RetentionPeriod", err.(smithy.InvalidParamsError)) + } + } + if v.ResourceTags != nil { + if err := validateResourceTags(v.ResourceTags); err != nil { + invalidParams.AddNested("ResourceTags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/rds/api_op_AddRoleToDBCluster.go b/service/rds/api_op_AddRoleToDBCluster.go index 40455972f74..c49a4883cde 100644 --- a/service/rds/api_op_AddRoleToDBCluster.go +++ b/service/rds/api_op_AddRoleToDBCluster.go @@ -10,11 +10,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Associates an Identity and Access Management (IAM) role from an Amazon Aurora DB -// cluster. For more information, see Authorizing Amazon Aurora MySQL to Access -// Other Amazon Web Services Services on Your Behalf -// (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Integrating.Authorizing.html) -// in the Amazon Aurora User Guide. This action only applies to Aurora DB clusters. +// Associates an Identity and Access Management (IAM) role with a DB cluster. func (c *Client) AddRoleToDBCluster(ctx context.Context, params *AddRoleToDBClusterInput, optFns ...func(*Options)) (*AddRoleToDBClusterOutput, error) { if params == nil { params = &AddRoleToDBClusterInput{} @@ -38,7 +34,7 @@ type AddRoleToDBClusterInput struct { DBClusterIdentifier *string // The Amazon Resource Name (ARN) of the IAM role to associate with the Aurora DB - // cluster, for example, arn:aws:iam::123456789012:role/AuroraAccessRole. + // cluster, for example arn:aws:iam::123456789012:role/AuroraAccessRole. // // This member is required. RoleArn *string diff --git a/service/rds/api_op_AuthorizeDBSecurityGroupIngress.go b/service/rds/api_op_AuthorizeDBSecurityGroupIngress.go index 5a2dc8e3888..faba7f21202 100644 --- a/service/rds/api_op_AuthorizeDBSecurityGroupIngress.go +++ b/service/rds/api_op_AuthorizeDBSecurityGroupIngress.go @@ -15,7 +15,7 @@ import ( // First, EC2 or VPC security groups can be added to the DBSecurityGroup if the // application using the database is running on EC2 or VPC instances. Second, IP // ranges are available if the application accessing your database is running on -// the Internet. Required parameters for this API are one of CIDR range, +// the internet. Required parameters for this API are one of CIDR range, // EC2SecurityGroupId for VPC, or (EC2SecurityGroupOwnerId and either // EC2SecurityGroupName or EC2SecurityGroupId for non-VPC). You can't authorize // ingress from an EC2 security group in one Amazon Web Services Region to an diff --git a/service/rds/api_op_CopyDBClusterParameterGroup.go b/service/rds/api_op_CopyDBClusterParameterGroup.go index fb82e5eec5d..2fbaf73b521 100644 --- a/service/rds/api_op_CopyDBClusterParameterGroup.go +++ b/service/rds/api_op_CopyDBClusterParameterGroup.go @@ -11,8 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Copies the specified DB cluster parameter group. This action only applies to -// Aurora DB clusters. +// Copies the specified DB cluster parameter group. func (c *Client) CopyDBClusterParameterGroup(ctx context.Context, params *CopyDBClusterParameterGroupInput, optFns ...func(*Options)) (*CopyDBClusterParameterGroupOutput, error) { if params == nil { params = &CopyDBClusterParameterGroupInput{} diff --git a/service/rds/api_op_CopyDBClusterSnapshot.go b/service/rds/api_op_CopyDBClusterSnapshot.go index 9a1ec8ab9d0..c7f6ab98a9f 100644 --- a/service/rds/api_op_CopyDBClusterSnapshot.go +++ b/service/rds/api_op_CopyDBClusterSnapshot.go @@ -78,14 +78,20 @@ import ( // To cancel the copy // operation once it is in progress, delete the target DB cluster snapshot // identified by TargetDBClusterSnapshotIdentifier while that DB cluster snapshot -// is in "copying" status. For more information on copying encrypted DB cluster -// snapshots from one Amazon Web Services Region to another, see Copying a -// Snapshot +// is in "copying" status. For more information on copying encrypted Amazon Aurora +// DB cluster snapshots from one Amazon Web Services Region to another, see +// Copying a Snapshot // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_CopySnapshot.html) -// in the Amazon Aurora User Guide. For more information on Amazon Aurora, see -// What Is Amazon Aurora? +// in the Amazon Aurora User Guide. For more information on Amazon Aurora DB +// clusters, see +// +// What is Amazon Aurora? // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. This action only applies to Aurora DB clusters. +// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, +// see Multi-AZ deployments with two readable standby DB instances +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) +// in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and +// is subject to change. func (c *Client) CopyDBClusterSnapshot(ctx context.Context, params *CopyDBClusterSnapshotInput, optFns ...func(*Options)) (*CopyDBClusterSnapshotOutput, error) { if params == nil { params = &CopyDBClusterSnapshotInput{} diff --git a/service/rds/api_op_CreateCustomDBEngineVersion.go b/service/rds/api_op_CreateCustomDBEngineVersion.go index 9b2dfcc087e..ee7006f49be 100644 --- a/service/rds/api_op_CreateCustomDBEngineVersion.go +++ b/service/rds/api_op_CreateCustomDBEngineVersion.go @@ -14,32 +14,27 @@ import ( // Creates a custom DB engine version (CEV). A CEV is a binary volume snapshot of a // database engine and specific AMI. The only supported engine is Oracle Database -// 19c Enterprise Edition with the January 2021 or later RU/RUR. For more -// information, see Amazon RDS Custom requirements and limitations -// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-cev.html#custom-cev.preparing.manifest) -// in the Amazon RDS User Guide. Amazon RDS, which is a fully managed service, -// supplies the Amazon Machine Image (AMI) and database software. The Amazon RDS -// database software is preinstalled, so you need only select a DB engine and -// version, and create your database. With Amazon RDS Custom, you upload your -// database installation files in Amazon S3. For more information, see Preparing -// to create a CEV -// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-cev.html#custom-cev.html#custom-cev.preparing) -// in the Amazon RDS User Guide. When you create a custom engine version, you -// specify the files in a JSON document called a CEV manifest. This document -// describes installation .zip files stored in Amazon S3. RDS Custom creates your -// CEV from the installation files that you provided. This service model is called -// Bring Your Own Media (BYOM). Creation takes approximately two hours. If creation -// fails, RDS Custom issues RDS-EVENT-0196 with the message Creation failed for -// custom engine version, and includes details about the failure. For example, the -// event prints missing files. After you create the CEV, it is available for use. -// You can create multiple CEVs, and create multiple RDS Custom instances from any -// CEV. You can also change the status of a CEV to make it available or inactive. -// The MediaImport service that imports files from Amazon S3 to create CEVs isn't -// integrated with Amazon Web Services CloudTrail. If you turn on data logging for -// Amazon RDS in CloudTrail, calls to the CreateCustomDbEngineVersion event aren't -// logged. However, you might see calls from the API gateway that accesses your -// Amazon S3 bucket. These calls originate from the MediaImport service for the -// CreateCustomDbEngineVersion event. For more information, see Creating a CEV +// 19c Enterprise Edition with the January 2021 or later RU/RUR. Amazon RDS, which +// is a fully managed service, supplies the Amazon Machine Image (AMI) and database +// software. The Amazon RDS database software is preinstalled, so you need only +// select a DB engine and version, and create your database. With Amazon RDS +// Custom, you upload your database installation files in Amazon S3. When you +// create a custom engine version, you specify the files in a JSON document called +// a CEV manifest. This document describes installation .zip files stored in Amazon +// S3. RDS Custom creates your CEV from the installation files that you provided. +// This service model is called Bring Your Own Media (BYOM). Creation takes +// approximately two hours. If creation fails, RDS Custom issues RDS-EVENT-0196 +// with the message Creation failed for custom engine version, and includes details +// about the failure. For example, the event prints missing files. After you create +// the CEV, it is available for use. You can create multiple CEVs, and create +// multiple RDS Custom instances from any CEV. You can also change the status of a +// CEV to make it available or inactive. The MediaImport service that imports files +// from Amazon S3 to create CEVs isn't integrated with Amazon Web Services +// CloudTrail. If you turn on data logging for Amazon RDS in CloudTrail, calls to +// the CreateCustomDbEngineVersion event aren't logged. However, you might see +// calls from the API gateway that accesses your Amazon S3 bucket. These calls +// originate from the MediaImport service for the CreateCustomDbEngineVersion +// event. For more information, see Creating a CEV // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-cev.html#custom-cev.create) // in the Amazon RDS User Guide. func (c *Client) CreateCustomDBEngineVersion(ctx context.Context, params *CreateCustomDBEngineVersionInput, optFns ...func(*Options)) (*CreateCustomDBEngineVersionOutput, error) { diff --git a/service/rds/api_op_CreateDBCluster.go b/service/rds/api_op_CreateDBCluster.go index 011d5ef57d6..bd8a0d7ce6b 100644 --- a/service/rds/api_op_CreateDBCluster.go +++ b/service/rds/api_op_CreateDBCluster.go @@ -13,16 +13,18 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates a new Amazon Aurora DB cluster. You can use the -// ReplicationSourceIdentifier parameter to create the DB cluster as a read replica -// of another DB cluster or Amazon RDS MySQL or PostgreSQL DB instance. For -// cross-region replication where the DB cluster identified by -// ReplicationSourceIdentifier is encrypted, you must also specify the PreSignedUrl -// parameter. For more information on Amazon Aurora, see -// -// What Is Amazon Aurora? +// Creates a new Amazon Aurora DB cluster or Multi-AZ DB cluster. You can use the +// ReplicationSourceIdentifier parameter to create an Amazon Aurora DB cluster as a +// read replica of another DB cluster or Amazon RDS MySQL or PostgreSQL DB +// instance. For cross-Region replication where the DB cluster identified by +// ReplicationSourceIdentifier is encrypted, also specify the PreSignedUrl +// parameter. For more information on Amazon Aurora, see What is Amazon Aurora? // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. This action only applies to Aurora DB clusters. +// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, +// see Multi-AZ deployments with two readable standby DB instances +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) +// in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and +// is subject to change. func (c *Client) CreateDBCluster(ctx context.Context, params *CreateDBClusterInput, optFns ...func(*Options)) (*CreateDBClusterOutput, error) { if params == nil { params = &CreateDBClusterInput{} @@ -52,79 +54,123 @@ type CreateDBClusterInput struct { // * Can't end with a hyphen or contain two // consecutive hyphens. // - // Example: my-cluster1 + // Example: my-cluster1 Valid for: Aurora DB clusters and + // Multi-AZ DB clusters // // This member is required. DBClusterIdentifier *string // The name of the database engine to be used for this DB cluster. Valid Values: - // aurora (for MySQL 5.6-compatible Aurora), aurora-mysql (for MySQL 5.7-compatible - // Aurora), and aurora-postgresql + // + // * + // aurora (for MySQL 5.6-compatible Aurora) + // + // * aurora-mysql (for MySQL + // 5.7-compatible Aurora) + // + // * aurora-postgresql + // + // * mysql + // + // * postgres + // + // Valid for: + // Aurora DB clusters and Multi-AZ DB clusters // // This member is required. Engine *string - // A list of Availability Zones (AZs) where instances in the DB cluster can be + // The amount of storage in gibibytes (GiB) to allocate to each DB instance in the + // Multi-AZ DB cluster. This setting is required to create a Multi-AZ DB cluster. + // Valid for: Multi-AZ DB clusters only + AllocatedStorage *int32 + + // A value that indicates whether minor engine upgrades are applied automatically + // to the DB cluster during the maintenance window. By default, minor engine + // upgrades are applied automatically. Valid for: Multi-AZ DB clusters only + AutoMinorVersionUpgrade *bool + + // A list of Availability Zones (AZs) where DB instances in the DB cluster can be // created. For information on Amazon Web Services Regions and Availability Zones, // see Choosing the Regions and Availability Zones // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.RegionsAndAvailabilityZones.html) - // in the Amazon Aurora User Guide. + // in the Amazon Aurora User Guide. Valid for: Aurora DB clusters only AvailabilityZones []string // The target backtrack window, in seconds. To disable backtracking, set this value - // to 0. Currently, Backtrack is only supported for Aurora MySQL DB clusters. - // Default: 0 Constraints: + // to 0. Default: 0 Constraints: // - // * If specified, this value must be set to a number from - // 0 to 259,200 (72 hours). + // * If specified, this value must be set to a + // number from 0 to 259,200 (72 hours). + // + // Valid for: Aurora MySQL DB clusters only BacktrackWindow *int64 // The number of days for which automated backups are retained. Default: 1 // Constraints: // // * Must be a value from 1 to 35 + // + // Valid for: Aurora DB clusters and + // Multi-AZ DB clusters BackupRetentionPeriod *int32 // A value that indicates that the DB cluster should be associated with the - // specified CharacterSet. + // specified CharacterSet. Valid for: Aurora DB clusters only CharacterSetName *string // A value that indicates whether to copy all tags from the DB cluster to snapshots - // of the DB cluster. The default is not to copy them. + // of the DB cluster. The default is not to copy them. Valid for: Aurora DB + // clusters only CopyTagsToSnapshot *bool + // The compute and memory capacity of each DB instance in the Multi-AZ DB cluster, + // for example db.m6g.xlarge. Not all DB instance classes are available in all + // Amazon Web Services Regions, or for all database engines. For the full list of + // DB instance classes and availability for your engine, see DB instance class + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) + // in the Amazon RDS User Guide. This setting is required to create a Multi-AZ DB + // cluster. Valid for: Multi-AZ DB clusters only + DBClusterInstanceClass *string + // The name of the DB cluster parameter group to associate with this DB cluster. If // you do not specify a value, then the default DB cluster parameter group for the // specified DB engine and version is used. Constraints: // // * If supplied, must match // the name of an existing DB cluster parameter group. + // + // Valid for: Aurora DB + // clusters and Multi-AZ DB clusters DBClusterParameterGroupName *string - // A DB subnet group to associate with this DB cluster. Constraints: Must match the - // name of an existing DBSubnetGroup. Must not be default. Example: mySubnetgroup + // A DB subnet group to associate with this DB cluster. This setting is required to + // create a Multi-AZ DB cluster. Constraints: Must match the name of an existing + // DBSubnetGroup. Must not be default. Example: mySubnetgroup Valid for: Aurora DB + // clusters and Multi-AZ DB clusters DBSubnetGroupName *string // The name for your database of up to 64 alphanumeric characters. If you do not // provide a name, Amazon RDS doesn't create a database in the DB cluster you are - // creating. + // creating. Valid for: Aurora DB clusters and Multi-AZ DB clusters DatabaseName *string // A value that indicates whether the DB cluster has deletion protection enabled. // The database can't be deleted when deletion protection is enabled. By default, - // deletion protection is disabled. + // deletion protection isn't enabled. Valid for: Aurora DB clusters and Multi-AZ DB + // clusters DeletionProtection *bool // The Active Directory directory ID to create the DB cluster in. For Amazon Aurora - // DB clusters, Amazon RDS can use Kerberos Authentication to authenticate users + // DB clusters, Amazon RDS can use Kerberos authentication to authenticate users // that connect to the DB cluster. For more information, see Kerberos - // Authentication + // authentication // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/kerberos-authentication.html) - // in the Amazon Aurora User Guide. + // in the Amazon Aurora User Guide. Valid for: Aurora DB clusters only Domain *string // Specify the name of the IAM role to be used when making API calls to the - // Directory Service. + // Directory Service. Valid for: Aurora DB clusters only DomainIAMRoleName *string // The list of log types that need to be enabled for exporting to CloudWatch Logs. @@ -132,7 +178,8 @@ type CreateDBClusterInput struct { // see Publishing Database Logs to Amazon CloudWatch Logs // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) // in the Amazon Aurora User Guide. Aurora MySQL Possible values are audit, error, - // general, and slowquery. Aurora PostgreSQL Possible value is postgresql. + // general, and slowquery. Aurora PostgreSQL Possible value is postgresql. Valid + // for: Aurora DB clusters only EnableCloudwatchLogsExports []string // A value that indicates whether to enable this DB cluster to forward write @@ -144,7 +191,7 @@ type CreateDBClusterInput struct { // cluster and the resulting changes are replicated back to this cluster. For the // primary DB cluster of an Aurora global database, this value is used immediately // if the primary is demoted by the FailoverGlobalCluster API operation, but it - // does nothing until then. + // does nothing until then. Valid for: Aurora DB clusters only EnableGlobalWriteForwarding *bool // A value that indicates whether to enable the HTTP endpoint for an Aurora @@ -154,16 +201,22 @@ type CreateDBClusterInput struct { // from inside the RDS console with the query editor. For more information, see // Using the Data API for Aurora Serverless // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html) in - // the Amazon Aurora User Guide. + // the Amazon Aurora User Guide. Valid for: Aurora DB clusters only EnableHttpEndpoint *bool // A value that indicates whether to enable mapping of Amazon Web Services Identity // and Access Management (IAM) accounts to database accounts. By default, mapping - // is disabled. For more information, see IAM Database Authentication + // isn't enabled. For more information, see IAM Database Authentication // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.IAMDBAuth.html) - // in the Amazon Aurora User Guide. + // in the Amazon Aurora User Guide. Valid for: Aurora DB clusters only EnableIAMDatabaseAuthentication *bool + // A value that indicates whether to turn on Performance Insights for the DB + // cluster. For more information, see Using Amazon Performance Insights + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html) + // in the Amazon RDS User Guide. Valid for: Multi-AZ DB clusters only + EnablePerformanceInsights *bool + // The DB engine mode of the DB cluster, either provisioned, serverless, // parallelquery, global, or multimaster. The parallelquery engine mode isn't // required for Aurora MySQL version 1.23 and higher 1.x versions, and version 2.09 @@ -190,26 +243,56 @@ type CreateDBClusterInput struct { // * // Limitations of Multi-Master Clusters // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-multi-master.html#aurora-multi-master-limitations) + // + // Valid + // for: Aurora DB clusters only EngineMode *string // The version number of the database engine to use. To list all of the available - // engine versions for aurora (for MySQL 5.6-compatible Aurora), use the following - // command: aws rds describe-db-engine-versions --engine aurora --query + // engine versions for MySQL 5.6-compatible Aurora, use the following command: aws + // rds describe-db-engine-versions --engine aurora --query // "DBEngineVersions[].EngineVersion" To list all of the available engine versions - // for aurora-mysql (for MySQL 5.7-compatible Aurora), use the following command: - // aws rds describe-db-engine-versions --engine aurora-mysql --query + // for MySQL 5.7-compatible Aurora, use the following command: aws rds + // describe-db-engine-versions --engine aurora-mysql --query // "DBEngineVersions[].EngineVersion" To list all of the available engine versions - // for aurora-postgresql, use the following command: aws rds + // for Aurora PostgreSQL, use the following command: aws rds // describe-db-engine-versions --engine aurora-postgresql --query - // "DBEngineVersions[].EngineVersion" Aurora MySQL Example: 5.6.10a, - // 5.6.mysql_aurora.1.19.2, 5.7.12, 5.7.mysql_aurora.2.04.5 Aurora PostgreSQL - // Example: 9.6.3, 10.7 + // "DBEngineVersions[].EngineVersion" To list all of the available engine versions + // for RDS for MySQL, use the following command: aws rds + // describe-db-engine-versions --engine mysql --query + // "DBEngineVersions[].EngineVersion" To list all of the available engine versions + // for RDS for PostgreSQL, use the following command: aws rds + // describe-db-engine-versions --engine postgres --query + // "DBEngineVersions[].EngineVersion" Aurora MySQL For information, see MySQL on + // Amazon RDS Versions + // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Updates.html) + // in the Amazon Aurora User Guide. Aurora PostgreSQL For information, see Amazon + // Aurora PostgreSQL releases and engine versions + // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Updates.20180305.html) + // in the Amazon Aurora User Guide. MySQL For information, see MySQL on Amazon RDS + // Versions + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MySQL.html#MySQL.Concepts.VersionMgmt) + // in the Amazon RDS User Guide. PostgreSQL For information, see Amazon RDS for + // PostgreSQL versions and extensions + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts) + // in the Amazon RDS User Guide. Valid for: Aurora DB clusters and Multi-AZ DB + // clusters EngineVersion *string // The global cluster ID of an Aurora cluster that becomes the primary cluster in - // the new global database cluster. + // the new global database cluster. Valid for: Aurora DB clusters only GlobalClusterIdentifier *string + // The amount of Provisioned IOPS (input/output operations per second) to be + // initially allocated for each DB instance in the Multi-AZ DB cluster. For + // information about valid Iops values, see Amazon RDS Provisioned IOPS storage to + // improve performance + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS) + // in the Amazon RDS User Guide. This setting is required to create a Multi-AZ DB + // cluster. Constraints: Must be a multiple between .5 and 50 of the storage amount + // for the DB cluster. Valid for: Multi-AZ DB clusters only + Iops *int32 + // The Amazon Web Services KMS key identifier for an encrypted DB cluster. The // Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or // alias name for the KMS key. To use a KMS key in a different Amazon Web Services @@ -230,12 +313,12 @@ type CreateDBClusterInput struct { // encrypted DB cluster in another Amazon Web Services Region, you must set // KmsKeyId to a KMS key identifier that is valid in the destination Amazon Web // Services Region. This KMS key is used to encrypt the read replica in that Amazon - // Web Services Region. + // Web Services Region. Valid for: Aurora DB clusters and Multi-AZ DB clusters KmsKeyId *string // The password for the master database user. This password can contain any // printable ASCII character except "/", """, or "@". Constraints: Must contain - // from 8 to 41 characters. + // from 8 to 41 characters. Valid for: Aurora DB clusters and Multi-AZ DB clusters MasterUserPassword *string // The name of the master user for the DB cluster. Constraints: @@ -247,30 +330,63 @@ type CreateDBClusterInput struct { // // * Can't be a reserved // word for the chosen database engine. + // + // Valid for: Aurora DB clusters and Multi-AZ + // DB clusters MasterUsername *string + // The interval, in seconds, between points when Enhanced Monitoring metrics are + // collected for the DB cluster. To turn off collecting Enhanced Monitoring + // metrics, specify 0. The default is 0. If MonitoringRoleArn is specified, also + // set MonitoringInterval to a value other than 0. Valid Values: 0, 1, 5, 10, 15, + // 30, 60 Valid for: Multi-AZ DB clusters only + MonitoringInterval *int32 + + // The Amazon Resource Name (ARN) for the IAM role that permits RDS to send + // Enhanced Monitoring metrics to Amazon CloudWatch Logs. An example is + // arn:aws:iam:123456789012:role/emaccess. For information on creating a monitoring + // role, see Setting up and enabling Enhanced Monitoring + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.OS.html#USER_Monitoring.OS.Enabling) + // in the Amazon RDS User Guide. If MonitoringInterval is set to a value other than + // 0, supply a MonitoringRoleArn value. Valid for: Multi-AZ DB clusters only + MonitoringRoleArn *string + // A value that indicates that the DB cluster should be associated with the - // specified option group. Permanent options can't be removed from an option group. - // The option group can't be removed from a DB cluster once it is associated with a - // DB cluster. + // specified option group. DB clusters are associated with a default option group + // that can't be modified. OptionGroupName *string - // The port number on which the instances in the DB cluster accept connections. - // Default: 3306 if engine is set as aurora or 5432 if set to aurora-postgresql. + // The Amazon Web Services KMS key identifier for encryption of Performance + // Insights data. The Amazon Web Services KMS key identifier is the key ARN, key + // ID, alias ARN, or alias name for the KMS key. If you don't specify a value for + // PerformanceInsightsKMSKeyId, then Amazon RDS uses your default KMS key. There is + // a default KMS key for your Amazon Web Services account. Your Amazon Web Services + // account has a different default KMS key for each Amazon Web Services Region. + // Valid for: Multi-AZ DB clusters only + PerformanceInsightsKMSKeyId *string + + // The amount of time, in days, to retain Performance Insights data. Valid values + // are 7 or 731 (2 years). Valid for: Multi-AZ DB clusters only + PerformanceInsightsRetentionPeriod *int32 + + // The port number on which the instances in the DB cluster accept connections. RDS + // for MySQL and Aurora MySQL Default: 3306 Valid values: 1150-65535 RDS for + // PostgreSQL and Aurora PostgreSQL Default: 5432 Valid values: 1150-65535 Valid + // for: Aurora DB clusters and Multi-AZ DB clusters Port *int32 // A URL that contains a Signature Version 4 signed request for the CreateDBCluster // action to be called in the source Amazon Web Services Region where the DB - // cluster is replicated from. You only need to specify PreSignedUrl when you are - // performing cross-region replication from an encrypted DB cluster. The pre-signed - // URL must be a valid request for the CreateDBCluster API action that can be - // executed in the source Amazon Web Services Region that contains the encrypted DB - // cluster to be copied. The pre-signed URL request must contain the following - // parameter values: - // - // * KmsKeyId - The Amazon Web Services KMS key identifier for - // the KMS key to use to encrypt the copy of the DB cluster in the destination - // Amazon Web Services Region. This should refer to the same KMS key for both the + // cluster is replicated from. Specify PreSignedUrl only when you are performing + // cross-Region replication from an encrypted DB cluster. The pre-signed URL must + // be a valid request for the CreateDBCluster API action that can be executed in + // the source Amazon Web Services Region that contains the encrypted DB cluster to + // be copied. The pre-signed URL request must contain the following parameter + // values: + // + // * KmsKeyId - The Amazon Web Services KMS key identifier for the KMS key + // to use to encrypt the copy of the DB cluster in the destination Amazon Web + // Services Region. This should refer to the same KMS key for both the // CreateDBCluster action that is called in the destination Amazon Web Services // Region, and the action contained in the pre-signed URL. // @@ -295,7 +411,7 @@ type CreateDBClusterInput struct { // SourceRegion (or --source-region for the CLI) instead of specifying PreSignedUrl // manually. Specifying SourceRegion autogenerates a pre-signed URL that is a valid // request for the operation that can be executed in the source Amazon Web Services - // Region. + // Region. Valid for: Aurora DB clusters only PreSignedUrl *string // The daily time range during which automated backups are created if automated @@ -313,7 +429,10 @@ type CreateDBClusterInput struct { // * Must not // conflict with the preferred maintenance window. // - // * Must be at least 30 minutes. + // * Must be at least 30 + // minutes. + // + // Valid for: Aurora DB clusters and Multi-AZ DB clusters PreferredBackupWindow *string // The weekly time range during which system maintenance can occur, in Universal @@ -323,28 +442,72 @@ type CreateDBClusterInput struct { // blocks available, see Adjusting the Preferred DB Cluster Maintenance Window // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow.Aurora) // in the Amazon Aurora User Guide. Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. - // Constraints: Minimum 30-minute window. + // Constraints: Minimum 30-minute window. Valid for: Aurora DB clusters and + // Multi-AZ DB clusters PreferredMaintenanceWindow *string + // A value that indicates whether the DB cluster is publicly accessible. When the + // DB cluster is publicly accessible, its Domain Name System (DNS) endpoint + // resolves to the private IP address from within the DB cluster's virtual private + // cloud (VPC). It resolves to the public IP address from outside of the DB + // cluster's VPC. Access to the DB cluster is ultimately controlled by the security + // group it uses. That public access isn't permitted if the security group assigned + // to the DB cluster doesn't permit it. When the DB cluster isn't publicly + // accessible, it is an internal DB cluster with a DNS name that resolves to a + // private IP address. Default: The default behavior varies depending on whether + // DBSubnetGroupName is specified. If DBSubnetGroupName isn't specified, and + // PubliclyAccessible isn't specified, the following applies: + // + // * If the default VPC + // in the target Region doesn’t have an internet gateway attached to it, the DB + // cluster is private. + // + // * If the default VPC in the target Region has an internet + // gateway attached to it, the DB cluster is public. + // + // If DBSubnetGroupName is + // specified, and PubliclyAccessible isn't specified, the following applies: + // + // * If + // the subnets are part of a VPC that doesn’t have an internet gateway attached to + // it, the DB cluster is private. + // + // * If the subnets are part of a VPC that has an + // internet gateway attached to it, the DB cluster is public. + // + // Valid for: Multi-AZ + // DB clusters only + PubliclyAccessible *bool + // The Amazon Resource Name (ARN) of the source DB instance or DB cluster if this - // DB cluster is created as a read replica. + // DB cluster is created as a read replica. Valid for: Aurora DB clusters only ReplicationSourceIdentifier *string // For DB clusters in serverless DB engine mode, the scaling properties of the DB - // cluster. + // cluster. Valid for: Aurora DB clusters only ScalingConfiguration *types.ScalingConfiguration // The AWS region the resource is in. The presigned URL will be created with this // region, if the PresignURL member is empty set. SourceRegion *string - // A value that indicates whether the DB cluster is encrypted. + // A value that indicates whether the DB cluster is encrypted. Valid for: Aurora DB + // clusters and Multi-AZ DB clusters StorageEncrypted *bool - // Tags to assign to the DB cluster. + // Specifies the storage type to be associated with the DB cluster. This setting is + // required to create a Multi-AZ DB cluster. Valid values: standard | gp2 | io1 If + // you specify io1, also include a value for the Iops parameter. Default: io1 if + // the Iops parameter is specified, otherwise gp2 Valid for: Multi-AZ DB clusters + // only + StorageType *string + + // Tags to assign to the DB cluster. Valid for: Aurora DB clusters and Multi-AZ DB + // clusters Tags []types.Tag - // A list of EC2 VPC security groups to associate with this DB cluster. + // A list of EC2 VPC security groups to associate with this DB cluster. Valid for: + // Aurora DB clusters and Multi-AZ DB clusters VpcSecurityGroupIds []string // Used by the SDK's PresignURL autofill customization to specify the region the of @@ -356,9 +519,23 @@ type CreateDBClusterInput struct { type CreateDBClusterOutput struct { - // Contains the details of an Amazon Aurora DB cluster. This data type is used as a - // response element in the DescribeDBClusters, StopDBCluster, and StartDBCluster - // actions. + // Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster. For + // an Amazon Aurora DB cluster, this data type is used as a response element in the + // operations CreateDBCluster, DeleteDBCluster, DescribeDBClusters, + // FailoverDBCluster, ModifyDBCluster, PromoteReadReplicaDBCluster, + // RestoreDBClusterFromS3, RestoreDBClusterFromSnapshot, + // RestoreDBClusterToPointInTime, StartDBCluster, and StopDBCluster. For a Multi-AZ + // DB cluster, this data type is used as a response element in the operations + // CreateDBCluster, DeleteDBCluster, DescribeDBClusters, FailoverDBCluster, + // ModifyDBCluster, RebootDBCluster, RestoreDBClusterFromSnapshot, and + // RestoreDBClusterToPointInTime. For more information on Amazon Aurora DB + // clusters, see What is Amazon Aurora? + // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) + // in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, + // see Multi-AZ deployments with two readable standby DB instances + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) + // in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and + // is subject to change. DBCluster *types.DBCluster // Metadata pertaining to the operation's result. diff --git a/service/rds/api_op_CreateDBClusterEndpoint.go b/service/rds/api_op_CreateDBClusterEndpoint.go index cbf5fb56420..4e6b394490e 100644 --- a/service/rds/api_op_CreateDBClusterEndpoint.go +++ b/service/rds/api_op_CreateDBClusterEndpoint.go @@ -42,14 +42,14 @@ type CreateDBClusterEndpointInput struct { // This member is required. DBClusterIdentifier *string - // The type of the endpoint. One of: READER, WRITER, ANY. + // The type of the endpoint, one of: READER, WRITER, ANY. // // This member is required. EndpointType *string // List of DB instance identifiers that aren't part of the custom endpoint group. - // All other eligible instances are reachable through the custom endpoint. Only - // relevant if the list of static members is empty. + // All other eligible instances are reachable through the custom endpoint. This + // parameter is relevant only if the list of static members is empty. ExcludedMembers []string // List of DB instance identifiers that are part of the custom endpoint group. diff --git a/service/rds/api_op_CreateDBClusterParameterGroup.go b/service/rds/api_op_CreateDBClusterParameterGroup.go index ded4fc0fcd0..e7443597b1f 100644 --- a/service/rds/api_op_CreateDBClusterParameterGroup.go +++ b/service/rds/api_op_CreateDBClusterParameterGroup.go @@ -18,24 +18,29 @@ import ( // parameters, you must modify the group after creating it using // ModifyDBClusterParameterGroup. Once you've created a DB cluster parameter group, // you need to associate it with your DB cluster using ModifyDBCluster. When you -// associate a new DB cluster parameter group with a running DB cluster, you need -// to reboot the DB instances in the DB cluster without failover for the new DB -// cluster parameter group and associated settings to take effect. After you create -// a DB cluster parameter group, you should wait at least 5 minutes before creating -// your first DB cluster that uses that DB cluster parameter group as the default -// parameter group. This allows Amazon RDS to fully complete the create action -// before the DB cluster parameter group is used as the default for a new DB -// cluster. This is especially important for parameters that are critical when -// creating the default database for a DB cluster, such as the character set for -// the default database defined by the character_set_database parameter. You can -// use the Parameter Groups option of the Amazon RDS console -// (https://console.aws.amazon.com/rds/) or the DescribeDBClusterParameters action -// to verify that your DB cluster parameter group has been created or modified. For -// more information on Amazon Aurora, see -// -// What Is Amazon Aurora? +// associate a new DB cluster parameter group with a running Aurora DB cluster, +// reboot the DB instances in the DB cluster without failover for the new DB +// cluster parameter group and associated settings to take effect. When you +// associate a new DB cluster parameter group with a running Multi-AZ DB cluster, +// reboot the DB cluster without failover for the new DB cluster parameter group +// and associated settings to take effect. After you create a DB cluster parameter +// group, you should wait at least 5 minutes before creating your first DB cluster +// that uses that DB cluster parameter group as the default parameter group. This +// allows Amazon RDS to fully complete the create action before the DB cluster +// parameter group is used as the default for a new DB cluster. This is especially +// important for parameters that are critical when creating the default database +// for a DB cluster, such as the character set for the default database defined by +// the character_set_database parameter. You can use the Parameter Groups option of +// the Amazon RDS console (https://console.aws.amazon.com/rds/) or the +// DescribeDBClusterParameters action to verify that your DB cluster parameter +// group has been created or modified. For more information on Amazon Aurora, see +// What is Amazon Aurora? // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. This action only applies to Aurora DB clusters. +// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, +// see Multi-AZ deployments with two readable standby DB instances +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) +// in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and +// is subject to change. func (c *Client) CreateDBClusterParameterGroup(ctx context.Context, params *CreateDBClusterParameterGroupInput, optFns ...func(*Options)) (*CreateDBClusterParameterGroupOutput, error) { if params == nil { params = &CreateDBClusterParameterGroupInput{} @@ -56,11 +61,11 @@ type CreateDBClusterParameterGroupInput struct { // The name of the DB cluster parameter group. Constraints: // - // * Must match the name - // of an existing DB cluster parameter group. + // * Must not match the + // name of an existing DB cluster parameter group. // - // This value is stored as a lowercase - // string. + // This value is stored as a + // lowercase string. // // This member is required. DBClusterParameterGroupName *string @@ -69,9 +74,10 @@ type CreateDBClusterParameterGroupInput struct { // associated with one and only one DB cluster parameter group family, and can be // applied only to a DB cluster running a database engine and engine version // compatible with that DB cluster parameter group family. Aurora MySQL Example: - // aurora5.6, aurora-mysql5.7 Aurora PostgreSQL Example: aurora-postgresql9.6 To - // list all of the available parameter group families for a DB engine, use the - // following command: aws rds describe-db-engine-versions --query + // aurora5.6, aurora-mysql5.7 Aurora PostgreSQL Example: aurora-postgresql9.6 RDS + // for MySQL Example: mysql8.0 RDS for PostgreSQL Example: postgres12 To list all + // of the available parameter group families for a DB engine, use the following + // command: aws rds describe-db-engine-versions --query // "DBEngineVersions[].DBParameterGroupFamily" --engine For example, to list all // of the available parameter group families for the Aurora PostgreSQL DB engine, // use the following command: aws rds describe-db-engine-versions --query @@ -86,6 +92,10 @@ type CreateDBClusterParameterGroupInput struct { // // * aurora-postgresql // + // * mysql + // + // * postgres + // // This member is required. DBParameterGroupFamily *string diff --git a/service/rds/api_op_CreateDBClusterSnapshot.go b/service/rds/api_op_CreateDBClusterSnapshot.go index dafb6c6a3fc..ba86e16ad75 100644 --- a/service/rds/api_op_CreateDBClusterSnapshot.go +++ b/service/rds/api_op_CreateDBClusterSnapshot.go @@ -12,9 +12,13 @@ import ( ) // Creates a snapshot of a DB cluster. For more information on Amazon Aurora, see -// What Is Amazon Aurora? +// What is Amazon Aurora? // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. This action only applies to Aurora DB clusters. +// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, +// see Multi-AZ deployments with two readable standby DB instances +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) +// in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and +// is subject to change. func (c *Client) CreateDBClusterSnapshot(ctx context.Context, params *CreateDBClusterSnapshotInput, optFns ...func(*Options)) (*CreateDBClusterSnapshotOutput, error) { if params == nil { params = &CreateDBClusterSnapshotInput{} diff --git a/service/rds/api_op_CreateDBInstance.go b/service/rds/api_op_CreateDBInstance.go index facfffd1d2c..6002641866c 100644 --- a/service/rds/api_op_CreateDBInstance.go +++ b/service/rds/api_op_CreateDBInstance.go @@ -30,10 +30,10 @@ func (c *Client) CreateDBInstance(ctx context.Context, params *CreateDBInstanceI // type CreateDBInstanceInput struct { - // The compute and memory capacity of the DB instance, for example, db.m4.large. - // Not all DB instance classes are available in all Amazon Web Services Regions, or - // for all database engines. For the full list of DB instance classes, and - // availability for your engine, see DB Instance Class + // The compute and memory capacity of the DB instance, for example db.m4.large. Not + // all DB instance classes are available in all Amazon Web Services Regions, or for + // all database engines. For the full list of DB instance classes, and availability + // for your engine, see DB Instance Class // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) // in the Amazon RDS User Guide. // @@ -220,6 +220,14 @@ type CreateDBInstanceInput struct { // * Can't be set to 0 or 35 for an RDS Custom DB instance BackupRetentionPeriod *int32 + // Specifies where automated backups and manual snapshots are stored. Possible + // values are outposts (Amazon Web Services Outposts) and region (Amazon Web + // Services Region). The default is region. For more information, see Working with + // Amazon RDS on Amazon Web Services Outposts + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html) in + // the Amazon RDS User Guide. + BackupTarget *string + // For supported engines, this value indicates that the DB instance should be // associated with the specified CharacterSet. This setting doesn't apply to RDS // Custom. However, if you need to change the character set, you can change it on @@ -366,7 +374,7 @@ type CreateDBInstanceInput struct { // A value that indicates whether the DB instance has deletion protection enabled. // The database can't be deleted when deletion protection is enabled. By default, - // deletion protection is disabled. For more information, see Deleting a DB + // deletion protection isn't enabled. For more information, see Deleting a DB // Instance // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html). // Amazon Aurora Not applicable. You can enable or disable deletion protection for @@ -416,7 +424,7 @@ type CreateDBInstanceInput struct { // A value that indicates whether to enable mapping of Amazon Web Services Identity // and Access Management (IAM) accounts to database accounts. By default, mapping - // is disabled. This setting doesn't apply to RDS Custom or Amazon Aurora. In + // isn't enabled. This setting doesn't apply to RDS Custom or Amazon Aurora. In // Aurora, mapping Amazon Web Services IAM accounts to database accounts is managed // by the DB cluster. For more information, see IAM Database Authentication for // MySQL and PostgreSQL @@ -442,24 +450,27 @@ type CreateDBInstanceInput struct { // the following format: 19.customized_string . An example identifier is // 19.my_cev1. For more information, see Creating an RDS Custom DB instance // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-creating.html#custom-creating.create) - // in the Amazon RDS User Guide.. MariaDB See MariaDB on Amazon RDS Versions + // in the Amazon RDS User Guide.. MariaDB For information, see MariaDB on Amazon + // RDS Versions // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MariaDB.html#MariaDB.Concepts.VersionMgmt) - // in the Amazon RDS User Guide. Microsoft SQL Server See Microsoft SQL Server - // Versions on Amazon RDS + // in the Amazon RDS User Guide. Microsoft SQL Server For information, see + // Microsoft SQL Server Versions on Amazon RDS // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SQLServer.html#SQLServer.Concepts.General.VersionSupport) - // in the Amazon RDS User Guide. MySQL See MySQL on Amazon RDS Versions + // in the Amazon RDS User Guide. MySQL For information, see MySQL on Amazon RDS + // Versions // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MySQL.html#MySQL.Concepts.VersionMgmt) - // in the Amazon RDS User Guide. Oracle See Oracle Database Engine Release Notes + // in the Amazon RDS User Guide. Oracle For information, see Oracle Database Engine + // Release Notes // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.Oracle.PatchComposition.html) - // in the Amazon RDS User Guide. PostgreSQL See Amazon RDS for PostgreSQL versions - // and extensions + // in the Amazon RDS User Guide. PostgreSQL For information, see Amazon RDS for + // PostgreSQL versions and extensions // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts) // in the Amazon RDS User Guide. EngineVersion *string // The amount of Provisioned IOPS (input/output operations per second) to be // initially allocated for the DB instance. For information about valid Iops - // values, see Amazon RDS Provisioned IOPS Storage to Improve Performance + // values, see Amazon RDS Provisioned IOPS storage to improve performance // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS) // in the Amazon RDS User Guide. Constraints: For MariaDB, MySQL, Oracle, and // PostgreSQL DB instances, must be a multiple between .5 and 50 of the storage @@ -498,64 +509,18 @@ type CreateDBInstanceInput struct { MasterUserPassword *string // The name for the master user. Amazon Aurora Not applicable. The name for the - // master user is managed by the DB cluster. MariaDB Constraints: - // - // * Required for - // MariaDB. - // - // * Must be 1 to 16 letters or numbers. - // - // * Can't be a reserved word for - // the chosen database engine. - // - // Microsoft SQL Server Constraints: - // - // * Required for - // SQL Server. - // - // * Must be 1 to 128 letters or numbers. - // - // * The first character must - // be a letter. - // - // * Can't be a reserved word for the chosen database engine. - // - // MySQL - // Constraints: - // - // * Required for MySQL. - // - // * Must be 1 to 16 letters or numbers. + // master user is managed by the DB cluster. Amazon RDS Constraints: // // * - // First character must be a letter. - // - // * Can't be a reserved word for the chosen - // database engine. - // - // Oracle Constraints: - // - // * Required for Oracle. - // - // * Must be 1 to 30 - // letters or numbers. - // - // * First character must be a letter. - // - // * Can't be a reserved - // word for the chosen database engine. + // Required. // - // PostgreSQL Constraints: + // * Must be 1 to 16 letters, numbers, or underscores. // - // * Required for - // PostgreSQL. - // - // * Must be 1 to 63 letters or numbers. - // - // * First character must be a - // letter. + // * First + // character must be a letter. // - // * Can't be a reserved word for the chosen database engine. + // * Can't be a reserved word for the chosen database + // engine. MasterUsername *string // The upper limit in gibibytes (GiB) to which Amazon RDS can automatically scale @@ -662,33 +627,33 @@ type CreateDBInstanceInput struct { PromotionTier *int32 // A value that indicates whether the DB instance is publicly accessible. When the - // DB instance is publicly accessible, its DNS endpoint resolves to the private IP - // address from within the DB instance's VPC, and to the public IP address from - // outside of the DB instance's VPC. Access to the DB instance is ultimately - // controlled by the security group it uses, and that public access is not - // permitted if the security group assigned to the DB instance doesn't permit it. - // When the DB instance isn't publicly accessible, it is an internal DB instance - // with a DNS name that resolves to a private IP address. Default: The default - // behavior varies depending on whether DBSubnetGroupName is specified. If - // DBSubnetGroupName isn't specified, and PubliclyAccessible isn't specified, the - // following applies: - // - // * If the default VPC in the target region doesn’t have an - // Internet gateway attached to it, the DB instance is private. + // DB instance is publicly accessible, its Domain Name System (DNS) endpoint + // resolves to the private IP address from within the DB instance's virtual private + // cloud (VPC). It resolves to the public IP address from outside of the DB + // instance's VPC. Access to the DB instance is ultimately controlled by the + // security group it uses. That public access is not permitted if the security + // group assigned to the DB instance doesn't permit it. When the DB instance isn't + // publicly accessible, it is an internal DB instance with a DNS name that resolves + // to a private IP address. Default: The default behavior varies depending on + // whether DBSubnetGroupName is specified. If DBSubnetGroupName isn't specified, + // and PubliclyAccessible isn't specified, the following applies: // // * If the default - // VPC in the target region has an Internet gateway attached to it, the DB instance - // is public. + // VPC in the target Region doesn’t have an internet gateway attached to it, the DB + // instance is private. // - // If DBSubnetGroupName is specified, and PubliclyAccessible isn't - // specified, the following applies: + // * If the default VPC in the target Region has an internet + // gateway attached to it, the DB instance is public. // - // * If the subnets are part of a VPC that - // doesn’t have an Internet gateway attached to it, the DB instance is private. + // If DBSubnetGroupName is + // specified, and PubliclyAccessible isn't specified, the following applies: // - // * - // If the subnets are part of a VPC that has an Internet gateway attached to it, - // the DB instance is public. + // * If + // the subnets are part of a VPC that doesn’t have an internet gateway attached to + // it, the DB instance is private. + // + // * If the subnets are part of a VPC that has an + // internet gateway attached to it, the DB instance is public. PubliclyAccessible *bool // A value that indicates whether the DB instance is encrypted. By default, it @@ -731,7 +696,11 @@ type CreateDBInstanceInput struct { type CreateDBInstanceOutput struct { // Contains the details of an Amazon RDS DB instance. This data type is used as a - // response element in the DescribeDBInstances action. + // response element in the operations CreateDBInstance, + // CreateDBInstanceReadReplica, DeleteDBInstance, DescribeDBInstances, + // ModifyDBInstance, PromoteReadReplica, RebootDBInstance, + // RestoreDBInstanceFromDBSnapshot, RestoreDBInstanceFromS3, + // RestoreDBInstanceToPointInTime, StartDBInstance, and StopDBInstance. DBInstance *types.DBInstance // Metadata pertaining to the operation's result. diff --git a/service/rds/api_op_CreateDBInstanceReadReplica.go b/service/rds/api_op_CreateDBInstanceReadReplica.go index 4c26ed660f7..ae8e60119ae 100644 --- a/service/rds/api_op_CreateDBInstanceReadReplica.go +++ b/service/rds/api_op_CreateDBInstanceReadReplica.go @@ -70,7 +70,7 @@ type CreateDBInstanceReadReplicaInput struct { // // * Can specify a PostgreSQL DB instance only if // the source is running PostgreSQL 9.3.5 or later (9.4.7 and higher for - // cross-region replication). + // cross-Region replication). // // * The specified DB instance must have automatic // backups enabled, that is, its backup retention period must be greater than 0. @@ -123,7 +123,7 @@ type CreateDBInstanceReadReplicaInput struct { // for RDS Custom. CustomIamInstanceProfile *string - // The compute and memory capacity of the read replica, for example, db.m4.large. + // The compute and memory capacity of the read replica, for example db.m4.large. // Not all DB instance classes are available in all Amazon Web Services Regions, or // for all database engines. For the full list of DB instance classes, and // availability for your engine, see DB Instance Class @@ -133,8 +133,8 @@ type CreateDBInstanceReadReplicaInput struct { // The name of the DB parameter group to associate with this DB instance. If you do // not specify a value for DBParameterGroupName, then Amazon RDS uses the - // DBParameterGroup of source DB instance for a same region read replica, or the - // default DBParameterGroup for the specified DB engine for a cross region read + // DBParameterGroup of source DB instance for a same Region read replica, or the + // default DBParameterGroup for the specified DB engine for a cross-Region read // replica. Specifying a parameter group for this operation is only supported for // Oracle DB instances. It isn't supported for RDS Custom. Constraints: // @@ -177,7 +177,7 @@ type CreateDBInstanceReadReplicaInput struct { // A value that indicates whether the DB instance has deletion protection enabled. // The database can't be deleted when deletion protection is enabled. By default, - // deletion protection is disabled. For more information, see Deleting a DB + // deletion protection isn't enabled. For more information, see Deleting a DB // Instance // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html). DeletionProtection *bool @@ -203,7 +203,7 @@ type CreateDBInstanceReadReplicaInput struct { // A value that indicates whether to enable mapping of Amazon Web Services Identity // and Access Management (IAM) accounts to database accounts. By default, mapping - // is disabled. For more information about IAM database authentication, see IAM + // isn't enabled. For more information about IAM database authentication, see IAM // Database Authentication for MySQL and PostgreSQL // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html) // in the Amazon RDS User Guide. This setting doesn't apply to RDS Custom. @@ -338,7 +338,7 @@ type CreateDBInstanceReadReplicaInput struct { // manually. Specifying SourceRegion autogenerates a presigned URL that is a valid // request for the operation that can be executed in the source Amazon Web Services // Region. SourceRegion isn't supported for SQL Server, because SQL Server on - // Amazon RDS doesn't support cross-region read replicas. This setting doesn't + // Amazon RDS doesn't support cross-Region read replicas. This setting doesn't // apply to RDS Custom. PreSignedUrl *string @@ -347,14 +347,14 @@ type CreateDBInstanceReadReplicaInput struct { ProcessorFeatures []types.ProcessorFeature // A value that indicates whether the DB instance is publicly accessible. When the - // DB instance is publicly accessible, its DNS endpoint resolves to the private IP - // address from within the DB instance's VPC, and to the public IP address from - // outside of the DB instance's VPC. Access to the DB instance is ultimately - // controlled by the security group it uses, and that public access is not - // permitted if the security group assigned to the DB instance doesn't permit it. - // When the DB instance isn't publicly accessible, it is an internal DB instance - // with a DNS name that resolves to a private IP address. For more information, see - // CreateDBInstance. + // DB cluster is publicly accessible, its Domain Name System (DNS) endpoint + // resolves to the private IP address from within the DB cluster's virtual private + // cloud (VPC). It resolves to the public IP address from outside of the DB + // cluster's VPC. Access to the DB cluster is ultimately controlled by the security + // group it uses. That public access isn't permitted if the security group assigned + // to the DB cluster doesn't permit it. When the DB instance isn't publicly + // accessible, it is an internal DB instance with a DNS name that resolves to a + // private IP address. For more information, see CreateDBInstance. PubliclyAccessible *bool // The open mode of the replica database: mounted or read-only. This parameter is @@ -405,7 +405,11 @@ type CreateDBInstanceReadReplicaInput struct { type CreateDBInstanceReadReplicaOutput struct { // Contains the details of an Amazon RDS DB instance. This data type is used as a - // response element in the DescribeDBInstances action. + // response element in the operations CreateDBInstance, + // CreateDBInstanceReadReplica, DeleteDBInstance, DescribeDBInstances, + // ModifyDBInstance, PromoteReadReplica, RebootDBInstance, + // RestoreDBInstanceFromDBSnapshot, RestoreDBInstanceFromS3, + // RestoreDBInstanceToPointInTime, StartDBInstance, and StopDBInstance. DBInstance *types.DBInstance // Metadata pertaining to the operation's result. diff --git a/service/rds/api_op_DeleteDBCluster.go b/service/rds/api_op_DeleteDBCluster.go index 75c567fd9ce..5ef65dd6e0c 100644 --- a/service/rds/api_op_DeleteDBCluster.go +++ b/service/rds/api_op_DeleteDBCluster.go @@ -14,9 +14,13 @@ import ( // The DeleteDBCluster action deletes a previously provisioned DB cluster. When you // delete a DB cluster, all automated backups for that DB cluster are deleted and // can't be recovered. Manual DB cluster snapshots of the specified DB cluster are -// not deleted. For more information on Amazon Aurora, see What Is Amazon Aurora? +// not deleted. For more information on Amazon Aurora, see What is Amazon Aurora? // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. This action only applies to Aurora DB clusters. +// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, +// see Multi-AZ deployments with two readable standby DB instances +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) +// in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and +// is subject to change. func (c *Client) DeleteDBCluster(ctx context.Context, params *DeleteDBClusterInput, optFns ...func(*Options)) (*DeleteDBClusterOutput, error) { if params == nil { params = &DeleteDBClusterInput{} @@ -70,9 +74,23 @@ type DeleteDBClusterInput struct { type DeleteDBClusterOutput struct { - // Contains the details of an Amazon Aurora DB cluster. This data type is used as a - // response element in the DescribeDBClusters, StopDBCluster, and StartDBCluster - // actions. + // Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster. For + // an Amazon Aurora DB cluster, this data type is used as a response element in the + // operations CreateDBCluster, DeleteDBCluster, DescribeDBClusters, + // FailoverDBCluster, ModifyDBCluster, PromoteReadReplicaDBCluster, + // RestoreDBClusterFromS3, RestoreDBClusterFromSnapshot, + // RestoreDBClusterToPointInTime, StartDBCluster, and StopDBCluster. For a Multi-AZ + // DB cluster, this data type is used as a response element in the operations + // CreateDBCluster, DeleteDBCluster, DescribeDBClusters, FailoverDBCluster, + // ModifyDBCluster, RebootDBCluster, RestoreDBClusterFromSnapshot, and + // RestoreDBClusterToPointInTime. For more information on Amazon Aurora DB + // clusters, see What is Amazon Aurora? + // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) + // in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, + // see Multi-AZ deployments with two readable standby DB instances + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) + // in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and + // is subject to change. DBCluster *types.DBCluster // Metadata pertaining to the operation's result. diff --git a/service/rds/api_op_DeleteDBClusterParameterGroup.go b/service/rds/api_op_DeleteDBClusterParameterGroup.go index 678eb671f4c..5de01c26b08 100644 --- a/service/rds/api_op_DeleteDBClusterParameterGroup.go +++ b/service/rds/api_op_DeleteDBClusterParameterGroup.go @@ -12,9 +12,13 @@ import ( // Deletes a specified DB cluster parameter group. The DB cluster parameter group // to be deleted can't be associated with any DB clusters. For more information on -// Amazon Aurora, see What Is Amazon Aurora? +// Amazon Aurora, see What is Amazon Aurora? // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. This action only applies to Aurora DB clusters. +// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, +// see Multi-AZ deployments with two readable standby DB instances +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) +// in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and +// is subject to change. func (c *Client) DeleteDBClusterParameterGroup(ctx context.Context, params *DeleteDBClusterParameterGroupInput, optFns ...func(*Options)) (*DeleteDBClusterParameterGroupOutput, error) { if params == nil { params = &DeleteDBClusterParameterGroupInput{} diff --git a/service/rds/api_op_DeleteDBClusterSnapshot.go b/service/rds/api_op_DeleteDBClusterSnapshot.go index af2d0d2e028..ecef841c507 100644 --- a/service/rds/api_op_DeleteDBClusterSnapshot.go +++ b/service/rds/api_op_DeleteDBClusterSnapshot.go @@ -13,10 +13,14 @@ import ( // Deletes a DB cluster snapshot. If the snapshot is being copied, the copy // operation is terminated. The DB cluster snapshot must be in the available state -// to be deleted. For more information on Amazon Aurora, see What Is Amazon +// to be deleted. For more information on Amazon Aurora, see What is Amazon // Aurora? // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. This action only applies to Aurora DB clusters. +// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, +// see Multi-AZ deployments with two readable standby DB instances +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) +// in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and +// is subject to change. func (c *Client) DeleteDBClusterSnapshot(ctx context.Context, params *DeleteDBClusterSnapshotInput, optFns ...func(*Options)) (*DeleteDBClusterSnapshotOutput, error) { if params == nil { params = &DeleteDBClusterSnapshotInput{} diff --git a/service/rds/api_op_DeleteDBInstance.go b/service/rds/api_op_DeleteDBInstance.go index 9e40dbe2b5b..10daaf4588e 100644 --- a/service/rds/api_op_DeleteDBInstance.go +++ b/service/rds/api_op_DeleteDBInstance.go @@ -100,7 +100,11 @@ type DeleteDBInstanceInput struct { type DeleteDBInstanceOutput struct { // Contains the details of an Amazon RDS DB instance. This data type is used as a - // response element in the DescribeDBInstances action. + // response element in the operations CreateDBInstance, + // CreateDBInstanceReadReplica, DeleteDBInstance, DescribeDBInstances, + // ModifyDBInstance, PromoteReadReplica, RebootDBInstance, + // RestoreDBInstanceFromDBSnapshot, RestoreDBInstanceFromS3, + // RestoreDBInstanceToPointInTime, StartDBInstance, and StopDBInstance. DBInstance *types.DBInstance // Metadata pertaining to the operation's result. diff --git a/service/rds/api_op_DescribeDBClusterBacktracks.go b/service/rds/api_op_DescribeDBClusterBacktracks.go index f270ae1e65a..dae241b2da4 100644 --- a/service/rds/api_op_DescribeDBClusterBacktracks.go +++ b/service/rds/api_op_DescribeDBClusterBacktracks.go @@ -13,7 +13,7 @@ import ( ) // Returns information about backtracks for a DB cluster. For more information on -// Amazon Aurora, see What Is Amazon Aurora? +// Amazon Aurora, see What is Amazon Aurora? // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) // in the Amazon Aurora User Guide. This action only applies to Aurora MySQL DB // clusters. diff --git a/service/rds/api_op_DescribeDBClusterParameterGroups.go b/service/rds/api_op_DescribeDBClusterParameterGroups.go index d1e189daad1..d14682b3aab 100644 --- a/service/rds/api_op_DescribeDBClusterParameterGroups.go +++ b/service/rds/api_op_DescribeDBClusterParameterGroups.go @@ -15,9 +15,13 @@ import ( // Returns a list of DBClusterParameterGroup descriptions. If a // DBClusterParameterGroupName parameter is specified, the list will contain only // the description of the specified DB cluster parameter group. For more -// information on Amazon Aurora, see What Is Amazon Aurora? +// information on Amazon Aurora, see What is Amazon Aurora? // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. This action only applies to Aurora DB clusters. +// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, +// see Multi-AZ deployments with two readable standby DB instances +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) +// in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and +// is subject to change. func (c *Client) DescribeDBClusterParameterGroups(ctx context.Context, params *DescribeDBClusterParameterGroupsInput, optFns ...func(*Options)) (*DescribeDBClusterParameterGroupsOutput, error) { if params == nil { params = &DescribeDBClusterParameterGroupsInput{} diff --git a/service/rds/api_op_DescribeDBClusterParameters.go b/service/rds/api_op_DescribeDBClusterParameters.go index 412ec8a9a8e..3091f32a4a5 100644 --- a/service/rds/api_op_DescribeDBClusterParameters.go +++ b/service/rds/api_op_DescribeDBClusterParameters.go @@ -13,9 +13,13 @@ import ( ) // Returns the detailed parameter list for a particular DB cluster parameter group. -// For more information on Amazon Aurora, see What Is Amazon Aurora? +// For more information on Amazon Aurora, see What is Amazon Aurora? // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. This action only applies to Aurora DB clusters. +// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, +// see Multi-AZ deployments with two readable standby DB instances +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) +// in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and +// is subject to change. func (c *Client) DescribeDBClusterParameters(ctx context.Context, params *DescribeDBClusterParametersInput, optFns ...func(*Options)) (*DescribeDBClusterParametersOutput, error) { if params == nil { params = &DescribeDBClusterParametersInput{} diff --git a/service/rds/api_op_DescribeDBClusterSnapshotAttributes.go b/service/rds/api_op_DescribeDBClusterSnapshotAttributes.go index e0f77c0f927..4baa489bca9 100644 --- a/service/rds/api_op_DescribeDBClusterSnapshotAttributes.go +++ b/service/rds/api_op_DescribeDBClusterSnapshotAttributes.go @@ -20,8 +20,7 @@ import ( // and can be copied or restored by all Amazon Web Services accounts. To add or // remove access for an Amazon Web Services account to copy or restore a manual DB // cluster snapshot, or to make the manual DB cluster snapshot public or private, -// use the ModifyDBClusterSnapshotAttribute API action. This action only applies to -// Aurora DB clusters. +// use the ModifyDBClusterSnapshotAttribute API action. func (c *Client) DescribeDBClusterSnapshotAttributes(ctx context.Context, params *DescribeDBClusterSnapshotAttributesInput, optFns ...func(*Options)) (*DescribeDBClusterSnapshotAttributesOutput, error) { if params == nil { params = &DescribeDBClusterSnapshotAttributesInput{} diff --git a/service/rds/api_op_DescribeDBClusterSnapshots.go b/service/rds/api_op_DescribeDBClusterSnapshots.go index 038831226cc..053ce3630f8 100644 --- a/service/rds/api_op_DescribeDBClusterSnapshots.go +++ b/service/rds/api_op_DescribeDBClusterSnapshots.go @@ -19,9 +19,14 @@ import ( ) // Returns information about DB cluster snapshots. This API action supports -// pagination. For more information on Amazon Aurora, see What Is Amazon Aurora? +// pagination. For more information on Amazon Aurora DB clusters, see What is +// Amazon Aurora? // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. This action only applies to Aurora DB clusters. +// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, +// see Multi-AZ deployments with two readable standby DB instances +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) +// in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and +// is subject to change. func (c *Client) DescribeDBClusterSnapshots(ctx context.Context, params *DescribeDBClusterSnapshotsInput, optFns ...func(*Options)) (*DescribeDBClusterSnapshotsOutput, error) { if params == nil { params = &DescribeDBClusterSnapshotsInput{} diff --git a/service/rds/api_op_DescribeDBClusters.go b/service/rds/api_op_DescribeDBClusters.go index 605a48b43f6..777c7e0cd85 100644 --- a/service/rds/api_op_DescribeDBClusters.go +++ b/service/rds/api_op_DescribeDBClusters.go @@ -12,11 +12,16 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Returns information about provisioned Aurora DB clusters. This API supports -// pagination. For more information on Amazon Aurora, see What Is Amazon Aurora? +// Returns information about Amazon Aurora DB clusters and Multi-AZ DB clusters. +// This API supports pagination. For more information on Amazon Aurora DB clusters, +// see What is Amazon Aurora? // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. This operation can also return information for -// Amazon Neptune DB instances and Amazon DocumentDB instances. +// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, +// see Multi-AZ deployments with two readable standby DB instances +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) +// in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and +// is subject to change. This operation can also return information for Amazon +// Neptune DB instances and Amazon DocumentDB instances. func (c *Client) DescribeDBClusters(ctx context.Context, params *DescribeDBClustersInput, optFns ...func(*Options)) (*DescribeDBClustersOutput, error) { if params == nil { params = &DescribeDBClustersInput{} diff --git a/service/rds/api_op_DescribeEngineDefaultClusterParameters.go b/service/rds/api_op_DescribeEngineDefaultClusterParameters.go index a9a3009c6e3..b8e6601840b 100644 --- a/service/rds/api_op_DescribeEngineDefaultClusterParameters.go +++ b/service/rds/api_op_DescribeEngineDefaultClusterParameters.go @@ -12,7 +12,7 @@ import ( ) // Returns the default engine and system parameter information for the cluster -// database engine. For more information on Amazon Aurora, see What Is Amazon +// database engine. For more information on Amazon Aurora, see What is Amazon // Aurora? // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) // in the Amazon Aurora User Guide. diff --git a/service/rds/api_op_DescribeExportTasks.go b/service/rds/api_op_DescribeExportTasks.go index da7da5cfc9b..b6ebc69cb58 100644 --- a/service/rds/api_op_DescribeExportTasks.go +++ b/service/rds/api_op_DescribeExportTasks.go @@ -59,7 +59,10 @@ type DescribeExportTasksInput struct { // // * failed // - // * starting + // * in_progress + // + // * + // starting Filters []types.Filter // An optional pagination token provided by a previous DescribeExportTasks request. diff --git a/service/rds/api_op_DescribeGlobalClusters.go b/service/rds/api_op_DescribeGlobalClusters.go index 7b0b1cca852..a427da3eaaa 100644 --- a/service/rds/api_op_DescribeGlobalClusters.go +++ b/service/rds/api_op_DescribeGlobalClusters.go @@ -13,7 +13,7 @@ import ( ) // Returns information about Aurora global database clusters. This API supports -// pagination. For more information on Amazon Aurora, see What Is Amazon Aurora? +// pagination. For more information on Amazon Aurora, see What is Amazon Aurora? // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) // in the Amazon Aurora User Guide. This action only applies to Aurora DB clusters. func (c *Client) DescribeGlobalClusters(ctx context.Context, params *DescribeGlobalClustersInput, optFns ...func(*Options)) (*DescribeGlobalClustersOutput, error) { diff --git a/service/rds/api_op_DescribeOrderableDBInstanceOptions.go b/service/rds/api_op_DescribeOrderableDBInstanceOptions.go index 761b59fe2cb..98806658ebb 100644 --- a/service/rds/api_op_DescribeOrderableDBInstanceOptions.go +++ b/service/rds/api_op_DescribeOrderableDBInstanceOptions.go @@ -12,7 +12,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Returns a list of orderable DB instance options for the specified engine. +// Returns a list of orderable DB instance options for the specified DB engine, DB +// engine version, and DB instance class. func (c *Client) DescribeOrderableDBInstanceOptions(ctx context.Context, params *DescribeOrderableDBInstanceOptionsInput, optFns ...func(*Options)) (*DescribeOrderableDBInstanceOptionsOutput, error) { if params == nil { params = &DescribeOrderableDBInstanceOptionsInput{} diff --git a/service/rds/api_op_FailoverDBCluster.go b/service/rds/api_op_FailoverDBCluster.go index 67b1bebc3f3..d52bd794fb0 100644 --- a/service/rds/api_op_FailoverDBCluster.go +++ b/service/rds/api_op_FailoverDBCluster.go @@ -11,17 +11,25 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Forces a failover for a DB cluster. A failover for a DB cluster promotes one of -// the Aurora Replicas (read-only instances) in the DB cluster to be the primary -// instance (the cluster writer). Amazon Aurora will automatically fail over to an -// Aurora Replica, if one exists, when the primary instance fails. You can force a -// failover when you want to simulate a failure of a primary instance for testing. -// Because each instance in a DB cluster has its own endpoint address, you will -// need to clean up and re-establish any existing connections that use those -// endpoint addresses when the failover is complete. For more information on Amazon -// Aurora, see What Is Amazon Aurora? +// Forces a failover for a DB cluster. For an Aurora DB cluster, failover for a DB +// cluster promotes one of the Aurora Replicas (read-only instances) in the DB +// cluster to be the primary DB instance (the cluster writer). For a Multi-AZ DB +// cluster, failover for a DB cluster promotes one of the readable standby DB +// instances (read-only instances) in the DB cluster to be the primary DB instance +// (the cluster writer). An Amazon Aurora DB cluster automatically fails over to an +// Aurora Replica, if one exists, when the primary DB instance fails. A Multi-AZ DB +// cluster automatically fails over to a readbable standby DB instance when the +// primary DB instance fails. To simulate a failure of a primary instance for +// testing, you can force a failover. Because each instance in a DB cluster has its +// own endpoint address, make sure to clean up and re-establish any existing +// connections that use those endpoint addresses when the failover is complete. For +// more information on Amazon Aurora DB clusters, see What is Amazon Aurora? // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. This action only applies to Aurora DB clusters. +// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, +// see Multi-AZ deployments with two readable standby DB instances +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) +// in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and +// is subject to change. func (c *Client) FailoverDBCluster(ctx context.Context, params *FailoverDBClusterInput, optFns ...func(*Options)) (*FailoverDBClusterOutput, error) { if params == nil { params = &FailoverDBClusterInput{} @@ -49,9 +57,10 @@ type FailoverDBClusterInput struct { // This member is required. DBClusterIdentifier *string - // The name of the instance to promote to the primary instance. You must specify - // the instance identifier for an Aurora Replica in the DB cluster. For example, - // mydbcluster-replica1. + // The name of the DB instance to promote to the primary DB instance. Specify the + // DB instance identifier for an Aurora Replica or a Multi-AZ readable standby in + // the DB cluster, for example mydbcluster-replica1. This setting isn't supported + // for RDS for MySQL Multi-AZ DB clusters. TargetDBInstanceIdentifier *string noSmithyDocumentSerde @@ -59,9 +68,23 @@ type FailoverDBClusterInput struct { type FailoverDBClusterOutput struct { - // Contains the details of an Amazon Aurora DB cluster. This data type is used as a - // response element in the DescribeDBClusters, StopDBCluster, and StartDBCluster - // actions. + // Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster. For + // an Amazon Aurora DB cluster, this data type is used as a response element in the + // operations CreateDBCluster, DeleteDBCluster, DescribeDBClusters, + // FailoverDBCluster, ModifyDBCluster, PromoteReadReplicaDBCluster, + // RestoreDBClusterFromS3, RestoreDBClusterFromSnapshot, + // RestoreDBClusterToPointInTime, StartDBCluster, and StopDBCluster. For a Multi-AZ + // DB cluster, this data type is used as a response element in the operations + // CreateDBCluster, DeleteDBCluster, DescribeDBClusters, FailoverDBCluster, + // ModifyDBCluster, RebootDBCluster, RestoreDBClusterFromSnapshot, and + // RestoreDBClusterToPointInTime. For more information on Amazon Aurora DB + // clusters, see What is Amazon Aurora? + // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) + // in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, + // see Multi-AZ deployments with two readable standby DB instances + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) + // in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and + // is subject to change. DBCluster *types.DBCluster // Metadata pertaining to the operation's result. diff --git a/service/rds/api_op_ModifyCustomDBEngineVersion.go b/service/rds/api_op_ModifyCustomDBEngineVersion.go index ea7f9bf24bd..b8a037ddfe8 100644 --- a/service/rds/api_op_ModifyCustomDBEngineVersion.go +++ b/service/rds/api_op_ModifyCustomDBEngineVersion.go @@ -20,7 +20,7 @@ import ( // calls from the API gateway that accesses your Amazon S3 bucket. These calls // originate from the MediaImport service for the ModifyCustomDbEngineVersion // event. For more information, see Modifying CEV status -// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-cev.html#custom-cev.preparing.manifest) +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-cev.html#custom-cev.modify) // in the Amazon RDS User Guide. func (c *Client) ModifyCustomDBEngineVersion(ctx context.Context, params *ModifyCustomDBEngineVersionInput, optFns ...func(*Options)) (*ModifyCustomDBEngineVersionOutput, error) { if params == nil { diff --git a/service/rds/api_op_ModifyDBCluster.go b/service/rds/api_op_ModifyDBCluster.go index 8a27b198822..16f16e12664 100644 --- a/service/rds/api_op_ModifyDBCluster.go +++ b/service/rds/api_op_ModifyDBCluster.go @@ -11,12 +11,16 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Modify a setting for an Amazon Aurora DB cluster. You can change one or more -// database configuration parameters by specifying these parameters and the new -// values in the request. For more information on Amazon Aurora, see What Is -// Amazon Aurora? +// Modify the settings for an Amazon Aurora DB cluster or a Multi-AZ DB cluster. +// You can change one or more settings by specifying these parameters and the new +// values in the request. For more information on Amazon Aurora DB clusters, see +// What is Amazon Aurora? // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. This action only applies to Aurora DB clusters. +// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, +// see Multi-AZ deployments with two readable standby DB instances +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) +// in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and +// is subject to change. func (c *Client) ModifyDBCluster(ctx context.Context, params *ModifyDBClusterInput, optFns ...func(*Options)) (*ModifyDBClusterOutput, error) { if params == nil { params = &ModifyDBClusterInput{} @@ -37,15 +41,19 @@ type ModifyDBClusterInput struct { // The DB cluster identifier for the cluster being modified. This parameter isn't // case-sensitive. Constraints: This identifier must match the identifier of an - // existing DB cluster. + // existing DB cluster. Valid for: Aurora DB clusters and Multi-AZ DB clusters // // This member is required. DBClusterIdentifier *string + // The amount of storage in gibibytes (GiB) to allocate to each DB instance in the + // Multi-AZ DB cluster. Type: Integer Valid for: Multi-AZ DB clusters only + AllocatedStorage *int32 + // A value that indicates whether major version upgrades are allowed. Constraints: // You must allow major version upgrades when specifying a value for the // EngineVersion parameter that is a different major version than the DB cluster's - // current version. + // current version. Valid for: Aurora DB clusters only AllowMajorVersionUpgrade bool // A value that indicates whether the modifications in this request and any pending @@ -58,32 +66,52 @@ type ModifyDBClusterInput struct { // EnableIAMDatabaseAuthentication, MasterUserPassword, and NewDBClusterIdentifier // values are applied during the next maintenance window. All other changes are // applied immediately, regardless of the value of the ApplyImmediately parameter. - // By default, this parameter is disabled. + // By default, this parameter is disabled. Valid for: Aurora DB clusters and + // Multi-AZ DB clusters ApplyImmediately bool + // A value that indicates whether minor engine upgrades are applied automatically + // to the DB cluster during the maintenance window. By default, minor engine + // upgrades are applied automatically. Valid for: Multi-AZ DB clusters only + AutoMinorVersionUpgrade *bool + // The target backtrack window, in seconds. To disable backtracking, set this value - // to 0. Currently, Backtrack is only supported for Aurora MySQL DB clusters. - // Default: 0 Constraints: + // to 0. Default: 0 Constraints: // - // * If specified, this value must be set to a number from - // 0 to 259,200 (72 hours). + // * If specified, this value must be set to a + // number from 0 to 259,200 (72 hours). + // + // Valid for: Aurora MySQL DB clusters only BacktrackWindow *int64 - // The number of days for which automated backups are retained. You must specify a - // minimum value of 1. Default: 1 Constraints: + // The number of days for which automated backups are retained. Specify a minimum + // value of 1. Default: 1 Constraints: // // * Must be a value from 1 to 35 + // + // Valid for: + // Aurora DB clusters and Multi-AZ DB clusters BackupRetentionPeriod *int32 // The configuration setting for the log types to be enabled for export to - // CloudWatch Logs for a specific DB cluster. + // CloudWatch Logs for a specific DB cluster. Valid for: Aurora DB clusters only CloudwatchLogsExportConfiguration *types.CloudwatchLogsExportConfiguration // A value that indicates whether to copy all tags from the DB cluster to snapshots - // of the DB cluster. The default is not to copy them. + // of the DB cluster. The default is not to copy them. Valid for: Aurora DB + // clusters only CopyTagsToSnapshot *bool - // The name of the DB cluster parameter group to use for the DB cluster. + // The compute and memory capacity of each DB instance in the Multi-AZ DB cluster, + // for example db.m6g.xlarge. Not all DB instance classes are available in all + // Amazon Web Services Regions, or for all database engines. For the full list of + // DB instance classes and availability for your engine, see DB Instance Class + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) + // in the Amazon RDS User Guide. Valid for: Multi-AZ DB clusters only + DBClusterInstanceClass *string + + // The name of the DB cluster parameter group to use for the DB cluster. Valid for: + // Aurora DB clusters and Multi-AZ DB clusters DBClusterParameterGroupName *string // The name of the DB parameter group to apply to all instances of the DB cluster. @@ -98,22 +126,25 @@ type ModifyDBClusterInput struct { // * The // DBInstanceParameterGroupName parameter is only valid in combination with the // AllowMajorVersionUpgrade parameter. + // + // Valid for: Aurora DB clusters only DBInstanceParameterGroupName *string // A value that indicates whether the DB cluster has deletion protection enabled. // The database can't be deleted when deletion protection is enabled. By default, - // deletion protection is disabled. + // deletion protection isn't enabled. Valid for: Aurora DB clusters and Multi-AZ DB + // clusters DeletionProtection *bool // The Active Directory directory ID to move the DB cluster to. Specify none to // remove the cluster from its current domain. The domain must be created prior to // this operation. For more information, see Kerberos Authentication // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/kerberos-authentication.html) - // in the Amazon Aurora User Guide. + // in the Amazon Aurora User Guide. Valid for: Aurora DB clusters only Domain *string // Specify the name of the IAM role to be used when making API calls to the - // Directory Service. + // Directory Service. Valid for: Aurora DB clusters only DomainIAMRoleName *string // A value that indicates whether to enable this DB cluster to forward write @@ -125,7 +156,7 @@ type ModifyDBClusterInput struct { // cluster and the resulting changes are replicated back to this cluster. For the // primary DB cluster of an Aurora global database, this value is used immediately // if the primary is demoted by the FailoverGlobalCluster API operation, but it - // does nothing until then. + // does nothing until then. Valid for: Aurora DB clusters only EnableGlobalWriteForwarding *bool // A value that indicates whether to enable the HTTP endpoint for an Aurora @@ -135,35 +166,73 @@ type ModifyDBClusterInput struct { // from inside the RDS console with the query editor. For more information, see // Using the Data API for Aurora Serverless // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html) in - // the Amazon Aurora User Guide. + // the Amazon Aurora User Guide. Valid for: Aurora DB clusters only EnableHttpEndpoint *bool // A value that indicates whether to enable mapping of Amazon Web Services Identity // and Access Management (IAM) accounts to database accounts. By default, mapping - // is disabled. For more information, see IAM Database Authentication + // isn't enabled. For more information, see IAM Database Authentication // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.IAMDBAuth.html) - // in the Amazon Aurora User Guide. + // in the Amazon Aurora User Guide. Valid for: Aurora DB clusters only EnableIAMDatabaseAuthentication *bool + // A value that indicates whether to turn on Performance Insights for the DB + // cluster. For more information, see Using Amazon Performance Insights + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html) + // in the Amazon RDS User Guide. Valid for: Multi-AZ DB clusters only + EnablePerformanceInsights *bool + // The version number of the database engine to which you want to upgrade. Changing // this parameter results in an outage. The change is applied during the next // maintenance window unless ApplyImmediately is enabled. To list all of the - // available engine versions for aurora (for MySQL 5.6-compatible Aurora), use the - // following command: aws rds describe-db-engine-versions --engine aurora --query + // available engine versions for MySQL 5.6-compatible Aurora, use the following + // command: aws rds describe-db-engine-versions --engine aurora --query // "DBEngineVersions[].EngineVersion" To list all of the available engine versions - // for aurora-mysql (for MySQL 5.7-compatible Aurora), use the following command: - // aws rds describe-db-engine-versions --engine aurora-mysql --query + // for MySQL 5.7-compatible Aurora, use the following command: aws rds + // describe-db-engine-versions --engine aurora-mysql --query // "DBEngineVersions[].EngineVersion" To list all of the available engine versions - // for aurora-postgresql, use the following command: aws rds + // for Aurora PostgreSQL, use the following command: aws rds // describe-db-engine-versions --engine aurora-postgresql --query - // "DBEngineVersions[].EngineVersion" + // "DBEngineVersions[].EngineVersion" To list all of the available engine versions + // for RDS for MySQL, use the following command: aws rds + // describe-db-engine-versions --engine mysql --query + // "DBEngineVersions[].EngineVersion" To list all of the available engine versions + // for RDS for PostgreSQL, use the following command: aws rds + // describe-db-engine-versions --engine postgres --query + // "DBEngineVersions[].EngineVersion" Valid for: Aurora DB clusters and Multi-AZ DB + // clusters EngineVersion *string + // The amount of Provisioned IOPS (input/output operations per second) to be + // initially allocated for each DB instance in the Multi-AZ DB cluster. For + // information about valid Iops values, see Amazon RDS Provisioned IOPS Storage to + // Improve Performance + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS) + // in the Amazon RDS User Guide. Constraints: Must be a multiple between .5 and 50 + // of the storage amount for the DB cluster. Valid for: Multi-AZ DB clusters only + Iops *int32 + // The new password for the master database user. This password can contain any // printable ASCII character except "/", """, or "@". Constraints: Must contain - // from 8 to 41 characters. + // from 8 to 41 characters. Valid for: Aurora DB clusters and Multi-AZ DB clusters MasterUserPassword *string + // The interval, in seconds, between points when Enhanced Monitoring metrics are + // collected for the DB cluster. To turn off collecting Enhanced Monitoring + // metrics, specify 0. The default is 0. If MonitoringRoleArn is specified, also + // set MonitoringInterval to a value other than 0. Valid Values: 0, 1, 5, 10, 15, + // 30, 60 Valid for: Multi-AZ DB clusters only + MonitoringInterval *int32 + + // The Amazon Resource Name (ARN) for the IAM role that permits RDS to send + // Enhanced Monitoring metrics to Amazon CloudWatch Logs. An example is + // arn:aws:iam:123456789012:role/emaccess. For information on creating a monitoring + // role, see To create an IAM role for Amazon RDS Enhanced Monitoring + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.html#USER_Monitoring.OS.IAMRole) + // in the Amazon RDS User Guide. If MonitoringInterval is set to a value other than + // 0, supply a MonitoringRoleArn value. Valid for: Multi-AZ DB clusters only + MonitoringRoleArn *string + // The new DB cluster identifier for the DB cluster when renaming a DB cluster. // This value is stored as a lowercase string. Constraints: // @@ -176,21 +245,30 @@ type ModifyDBClusterInput struct { // Can't end with a hyphen or contain two consecutive hyphens // // Example: my-cluster2 + // Valid for: Aurora DB clusters only NewDBClusterIdentifier *string // A value that indicates that the DB cluster should be associated with the - // specified option group. Changing this parameter doesn't result in an outage - // except in the following case, and the change is applied during the next - // maintenance window unless the ApplyImmediately is enabled for this request. If - // the parameter change results in an option group that enables OEM, this change - // can cause a brief (sub-second) period during which new connections are rejected - // but existing connections are not interrupted. Permanent options can't be removed - // from an option group. The option group can't be removed from a DB cluster once - // it is associated with a DB cluster. + // specified option group. DB clusters are associated with a default option group + // that can't be modified. OptionGroupName *string + // The Amazon Web Services KMS key identifier for encryption of Performance + // Insights data. The Amazon Web Services KMS key identifier is the key ARN, key + // ID, alias ARN, or alias name for the KMS key. If you don't specify a value for + // PerformanceInsightsKMSKeyId, then Amazon RDS uses your default KMS key. There is + // a default KMS key for your Amazon Web Services account. Your Amazon Web Services + // account has a different default KMS key for each Amazon Web Services Region. + // Valid for: Multi-AZ DB clusters only + PerformanceInsightsKMSKeyId *string + + // The amount of time, in days, to retain Performance Insights data. Valid values + // are 7 or 731 (2 years). Valid for: Multi-AZ DB clusters only + PerformanceInsightsRetentionPeriod *int32 + // The port number on which the DB cluster accepts connections. Constraints: Value - // must be 1150-65535 Default: The same port as the original DB cluster. + // must be 1150-65535 Default: The same port as the original DB cluster. Valid for: + // Aurora DB clusters only Port *int32 // The daily time range during which automated backups are created if automated @@ -208,7 +286,10 @@ type ModifyDBClusterInput struct { // * Must not // conflict with the preferred maintenance window. // - // * Must be at least 30 minutes. + // * Must be at least 30 + // minutes. + // + // Valid for: Aurora DB clusters and Multi-AZ DB clusters PreferredBackupWindow *string // The weekly time range during which system maintenance can occur, in Universal @@ -218,14 +299,22 @@ type ModifyDBClusterInput struct { // blocks available, see Adjusting the Preferred DB Cluster Maintenance Window // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow.Aurora) // in the Amazon Aurora User Guide. Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. - // Constraints: Minimum 30-minute window. + // Constraints: Minimum 30-minute window. Valid for: Aurora DB clusters and + // Multi-AZ DB clusters PreferredMaintenanceWindow *string // The scaling properties of the DB cluster. You can only modify scaling properties - // for DB clusters in serverless DB engine mode. + // for DB clusters in serverless DB engine mode. Valid for: Aurora DB clusters only ScalingConfiguration *types.ScalingConfiguration - // A list of VPC security groups that the DB cluster will belong to. + // Specifies the storage type to be associated with the DB cluster. Valid values: + // standard | gp2 | io1 If you specify io1, you must also include a value for the + // Iops parameter. Default: io1 if the Iops parameter is specified, otherwise gp2 + // Valid for: Multi-AZ DB clusters only + StorageType *string + + // A list of VPC security groups that the DB cluster will belong to. Valid for: + // Aurora DB clusters and Multi-AZ DB clusters VpcSecurityGroupIds []string noSmithyDocumentSerde @@ -233,9 +322,23 @@ type ModifyDBClusterInput struct { type ModifyDBClusterOutput struct { - // Contains the details of an Amazon Aurora DB cluster. This data type is used as a - // response element in the DescribeDBClusters, StopDBCluster, and StartDBCluster - // actions. + // Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster. For + // an Amazon Aurora DB cluster, this data type is used as a response element in the + // operations CreateDBCluster, DeleteDBCluster, DescribeDBClusters, + // FailoverDBCluster, ModifyDBCluster, PromoteReadReplicaDBCluster, + // RestoreDBClusterFromS3, RestoreDBClusterFromSnapshot, + // RestoreDBClusterToPointInTime, StartDBCluster, and StopDBCluster. For a Multi-AZ + // DB cluster, this data type is used as a response element in the operations + // CreateDBCluster, DeleteDBCluster, DescribeDBClusters, FailoverDBCluster, + // ModifyDBCluster, RebootDBCluster, RestoreDBClusterFromSnapshot, and + // RestoreDBClusterToPointInTime. For more information on Amazon Aurora DB + // clusters, see What is Amazon Aurora? + // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) + // in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, + // see Multi-AZ deployments with two readable standby DB instances + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) + // in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and + // is subject to change. DBCluster *types.DBCluster // Metadata pertaining to the operation's result. diff --git a/service/rds/api_op_ModifyDBClusterParameterGroup.go b/service/rds/api_op_ModifyDBClusterParameterGroup.go index 8a55ab66492..1c5ab119d61 100644 --- a/service/rds/api_op_ModifyDBClusterParameterGroup.go +++ b/service/rds/api_op_ModifyDBClusterParameterGroup.go @@ -13,25 +13,28 @@ import ( // Modifies the parameters of a DB cluster parameter group. To modify more than one // parameter, submit a list of the following: ParameterName, ParameterValue, and -// ApplyMethod. A maximum of 20 parameters can be modified in a single request. For -// more information on Amazon Aurora, see What Is Amazon Aurora? +// ApplyMethod. A maximum of 20 parameters can be modified in a single request. +// After you create a DB cluster parameter group, you should wait at least 5 +// minutes before creating your first DB cluster that uses that DB cluster +// parameter group as the default parameter group. This allows Amazon RDS to fully +// complete the create action before the parameter group is used as the default for +// a new DB cluster. This is especially important for parameters that are critical +// when creating the default database for a DB cluster, such as the character set +// for the default database defined by the character_set_database parameter. You +// can use the Parameter Groups option of the Amazon RDS console +// (https://console.aws.amazon.com/rds/) or the DescribeDBClusterParameters action +// to verify that your DB cluster parameter group has been created or modified. If +// the modified DB cluster parameter group is used by an Aurora Serverless cluster, +// Aurora applies the update immediately. The cluster restart might interrupt your +// workload. In that case, your application must reopen any connections and retry +// any transactions that were active when the parameter changes took effect. For +// more information on Amazon Aurora DB clusters, see What is Amazon Aurora? // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. After you create a DB cluster parameter group, -// you should wait at least 5 minutes before creating your first DB cluster that -// uses that DB cluster parameter group as the default parameter group. This allows -// Amazon RDS to fully complete the create action before the parameter group is -// used as the default for a new DB cluster. This is especially important for -// parameters that are critical when creating the default database for a DB -// cluster, such as the character set for the default database defined by the -// character_set_database parameter. You can use the Parameter Groups option of the -// Amazon RDS console (https://console.aws.amazon.com/rds/) or the -// DescribeDBClusterParameters action to verify that your DB cluster parameter -// group has been created or modified. If the modified DB cluster parameter group -// is used by an Aurora Serverless cluster, Aurora applies the update immediately. -// The cluster restart might interrupt your workload. In that case, your -// application must reopen any connections and retry any transactions that were -// active when the parameter changes took effect. This action only applies to -// Aurora DB clusters. +// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, +// see Multi-AZ deployments with two readable standby DB instances +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) +// in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and +// is subject to change. func (c *Client) ModifyDBClusterParameterGroup(ctx context.Context, params *ModifyDBClusterParameterGroupInput, optFns ...func(*Options)) (*ModifyDBClusterParameterGroupOutput, error) { if params == nil { params = &ModifyDBClusterParameterGroupInput{} diff --git a/service/rds/api_op_ModifyDBClusterSnapshotAttribute.go b/service/rds/api_op_ModifyDBClusterSnapshotAttribute.go index bc1455b5c37..2568033c870 100644 --- a/service/rds/api_op_ModifyDBClusterSnapshotAttribute.go +++ b/service/rds/api_op_ModifyDBClusterSnapshotAttribute.go @@ -26,8 +26,7 @@ import ( // accounts have access to copy or restore a manual DB cluster snapshot, or whether // a manual DB cluster snapshot is public or private, use the // DescribeDBClusterSnapshotAttributes API action. The accounts are returned as -// values for the restore attribute. This action only applies to Aurora DB -// clusters. +// values for the restore attribute. func (c *Client) ModifyDBClusterSnapshotAttribute(ctx context.Context, params *ModifyDBClusterSnapshotAttributeInput, optFns ...func(*Options)) (*ModifyDBClusterSnapshotAttributeOutput, error) { if params == nil { params = &ModifyDBClusterSnapshotAttributeInput{} diff --git a/service/rds/api_op_ModifyDBInstance.go b/service/rds/api_op_ModifyDBInstance.go index 04c863ea9c0..c9344bb49ab 100644 --- a/service/rds/api_op_ModifyDBInstance.go +++ b/service/rds/api_op_ModifyDBInstance.go @@ -161,10 +161,10 @@ type ModifyDBInstanceInput struct { // more information, see ModifyDBCluster. CopyTagsToSnapshot *bool - // The new compute and memory capacity of the DB instance, for example, - // db.m4.large. Not all DB instance classes are available in all Amazon Web - // Services Regions, or for all database engines. For the full list of DB instance - // classes, and availability for your engine, see DB Instance Class + // The new compute and memory capacity of the DB instance, for example db.m4.large. + // Not all DB instance classes are available in all Amazon Web Services Regions, or + // for all database engines. For the full list of DB instance classes, and + // availability for your engine, see DB Instance Class // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) // in the Amazon RDS User Guide. If you modify the DB instance class, an outage // occurs during the change. The change is applied during the next maintenance @@ -218,7 +218,7 @@ type ModifyDBInstanceInput struct { // A value that indicates whether the DB instance has deletion protection enabled. // The database can't be deleted when deletion protection is enabled. By default, - // deletion protection is disabled. For more information, see Deleting a DB + // deletion protection isn't enabled. For more information, see Deleting a DB // Instance // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html). DeletionProtection *bool @@ -252,7 +252,7 @@ type ModifyDBInstanceInput struct { // A value that indicates whether to enable mapping of Amazon Web Services Identity // and Access Management (IAM) accounts to database accounts. By default, mapping - // is disabled. This setting doesn't apply to Amazon Aurora. Mapping Amazon Web + // isn't enabled. This setting doesn't apply to Amazon Aurora. Mapping Amazon Web // Services IAM accounts to database accounts is managed by the DB cluster. For // more information about IAM database authentication, see IAM Database // Authentication for MySQL and PostgreSQL @@ -449,18 +449,18 @@ type ModifyDBInstanceInput struct { PromotionTier *int32 // A value that indicates whether the DB instance is publicly accessible. When the - // DB instance is publicly accessible, its DNS endpoint resolves to the private IP - // address from within the DB instance's VPC, and to the public IP address from - // outside of the DB instance's VPC. Access to the DB instance is ultimately - // controlled by the security group it uses, and that public access is not - // permitted if the security group assigned to the DB instance doesn't permit it. - // When the DB instance isn't publicly accessible, it is an internal DB instance - // with a DNS name that resolves to a private IP address. PubliclyAccessible only - // applies to DB instances in a VPC. The DB instance must be part of a public - // subnet and PubliclyAccessible must be enabled for it to be publicly accessible. - // Changes to the PubliclyAccessible parameter are applied immediately regardless - // of the value of the ApplyImmediately parameter. This setting doesn't apply to - // RDS Custom. + // DB cluster is publicly accessible, its Domain Name System (DNS) endpoint + // resolves to the private IP address from within the DB cluster's virtual private + // cloud (VPC). It resolves to the public IP address from outside of the DB + // cluster's VPC. Access to the DB cluster is ultimately controlled by the security + // group it uses. That public access isn't permitted if the security group assigned + // to the DB cluster doesn't permit it. When the DB instance isn't publicly + // accessible, it is an internal DB instance with a DNS name that resolves to a + // private IP address. PubliclyAccessible only applies to DB instances in a VPC. + // The DB instance must be part of a public subnet and PubliclyAccessible must be + // enabled for it to be publicly accessible. Changes to the PubliclyAccessible + // parameter are applied immediately regardless of the value of the + // ApplyImmediately parameter. This setting doesn't apply to RDS Custom. PubliclyAccessible *bool // A value that sets the open mode of a replica database to either mounted or @@ -526,7 +526,11 @@ type ModifyDBInstanceInput struct { type ModifyDBInstanceOutput struct { // Contains the details of an Amazon RDS DB instance. This data type is used as a - // response element in the DescribeDBInstances action. + // response element in the operations CreateDBInstance, + // CreateDBInstanceReadReplica, DeleteDBInstance, DescribeDBInstances, + // ModifyDBInstance, PromoteReadReplica, RebootDBInstance, + // RestoreDBInstanceFromDBSnapshot, RestoreDBInstanceFromS3, + // RestoreDBInstanceToPointInTime, StartDBInstance, and StopDBInstance. DBInstance *types.DBInstance // Metadata pertaining to the operation's result. diff --git a/service/rds/api_op_ModifyGlobalCluster.go b/service/rds/api_op_ModifyGlobalCluster.go index 8aab89d9ddb..60e8576cf81 100644 --- a/service/rds/api_op_ModifyGlobalCluster.go +++ b/service/rds/api_op_ModifyGlobalCluster.go @@ -13,7 +13,7 @@ import ( // Modify a setting for an Amazon Aurora global cluster. You can change one or more // database configuration parameters by specifying these parameters and the new -// values in the request. For more information on Amazon Aurora, see What Is +// values in the request. For more information on Amazon Aurora, see What is // Amazon Aurora? // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) // in the Amazon Aurora User Guide. This action only applies to Aurora DB clusters. diff --git a/service/rds/api_op_PromoteReadReplica.go b/service/rds/api_op_PromoteReadReplica.go index 885710d104c..8d34913b0e7 100644 --- a/service/rds/api_op_PromoteReadReplica.go +++ b/service/rds/api_op_PromoteReadReplica.go @@ -88,7 +88,11 @@ type PromoteReadReplicaInput struct { type PromoteReadReplicaOutput struct { // Contains the details of an Amazon RDS DB instance. This data type is used as a - // response element in the DescribeDBInstances action. + // response element in the operations CreateDBInstance, + // CreateDBInstanceReadReplica, DeleteDBInstance, DescribeDBInstances, + // ModifyDBInstance, PromoteReadReplica, RebootDBInstance, + // RestoreDBInstanceFromDBSnapshot, RestoreDBInstanceFromS3, + // RestoreDBInstanceToPointInTime, StartDBInstance, and StopDBInstance. DBInstance *types.DBInstance // Metadata pertaining to the operation's result. diff --git a/service/rds/api_op_PromoteReadReplicaDBCluster.go b/service/rds/api_op_PromoteReadReplicaDBCluster.go index 72891452cac..0f27ab83d6d 100644 --- a/service/rds/api_op_PromoteReadReplicaDBCluster.go +++ b/service/rds/api_op_PromoteReadReplicaDBCluster.go @@ -11,8 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Promotes a read replica DB cluster to a standalone DB cluster. This action only -// applies to Aurora DB clusters. +// Promotes a read replica DB cluster to a standalone DB cluster. func (c *Client) PromoteReadReplicaDBCluster(ctx context.Context, params *PromoteReadReplicaDBClusterInput, optFns ...func(*Options)) (*PromoteReadReplicaDBClusterOutput, error) { if params == nil { params = &PromoteReadReplicaDBClusterInput{} @@ -47,9 +46,23 @@ type PromoteReadReplicaDBClusterInput struct { type PromoteReadReplicaDBClusterOutput struct { - // Contains the details of an Amazon Aurora DB cluster. This data type is used as a - // response element in the DescribeDBClusters, StopDBCluster, and StartDBCluster - // actions. + // Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster. For + // an Amazon Aurora DB cluster, this data type is used as a response element in the + // operations CreateDBCluster, DeleteDBCluster, DescribeDBClusters, + // FailoverDBCluster, ModifyDBCluster, PromoteReadReplicaDBCluster, + // RestoreDBClusterFromS3, RestoreDBClusterFromSnapshot, + // RestoreDBClusterToPointInTime, StartDBCluster, and StopDBCluster. For a Multi-AZ + // DB cluster, this data type is used as a response element in the operations + // CreateDBCluster, DeleteDBCluster, DescribeDBClusters, FailoverDBCluster, + // ModifyDBCluster, RebootDBCluster, RestoreDBClusterFromSnapshot, and + // RestoreDBClusterToPointInTime. For more information on Amazon Aurora DB + // clusters, see What is Amazon Aurora? + // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) + // in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, + // see Multi-AZ deployments with two readable standby DB instances + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) + // in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and + // is subject to change. DBCluster *types.DBCluster // Metadata pertaining to the operation's result. diff --git a/service/rds/api_op_RebootDBCluster.go b/service/rds/api_op_RebootDBCluster.go new file mode 100644 index 00000000000..9485dc453ad --- /dev/null +++ b/service/rds/api_op_RebootDBCluster.go @@ -0,0 +1,150 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rds + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/rds/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// You might need to reboot your DB cluster, usually for maintenance reasons. For +// example, if you make certain modifications, or if you change the DB cluster +// parameter group associated with the DB cluster, reboot the DB cluster for the +// changes to take effect. Rebooting a DB cluster restarts the database engine +// service. Rebooting a DB cluster results in a momentary outage, during which the +// DB cluster status is set to rebooting. Use this operation only for a non-Aurora +// Multi-AZ DB cluster. The Multi-AZ DB clusters feature is in preview and is +// subject to change. For more information on Multi-AZ DB clusters, see Multi-AZ +// deployments with two readable standby DB instances +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) +// in the Amazon RDS User Guide. +func (c *Client) RebootDBCluster(ctx context.Context, params *RebootDBClusterInput, optFns ...func(*Options)) (*RebootDBClusterOutput, error) { + if params == nil { + params = &RebootDBClusterInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RebootDBCluster", params, optFns, c.addOperationRebootDBClusterMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RebootDBClusterOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RebootDBClusterInput struct { + + // The DB cluster identifier. This parameter is stored as a lowercase string. + // Constraints: + // + // * Must match the identifier of an existing DBCluster. + // + // This member is required. + DBClusterIdentifier *string + + noSmithyDocumentSerde +} + +type RebootDBClusterOutput struct { + + // Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster. For + // an Amazon Aurora DB cluster, this data type is used as a response element in the + // operations CreateDBCluster, DeleteDBCluster, DescribeDBClusters, + // FailoverDBCluster, ModifyDBCluster, PromoteReadReplicaDBCluster, + // RestoreDBClusterFromS3, RestoreDBClusterFromSnapshot, + // RestoreDBClusterToPointInTime, StartDBCluster, and StopDBCluster. For a Multi-AZ + // DB cluster, this data type is used as a response element in the operations + // CreateDBCluster, DeleteDBCluster, DescribeDBClusters, FailoverDBCluster, + // ModifyDBCluster, RebootDBCluster, RestoreDBClusterFromSnapshot, and + // RestoreDBClusterToPointInTime. For more information on Amazon Aurora DB + // clusters, see What is Amazon Aurora? + // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) + // in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, + // see Multi-AZ deployments with two readable standby DB instances + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) + // in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and + // is subject to change. + DBCluster *types.DBCluster + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRebootDBClusterMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsquery_serializeOpRebootDBCluster{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRebootDBCluster{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpRebootDBClusterValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRebootDBCluster(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opRebootDBCluster(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "rds", + OperationName: "RebootDBCluster", + } +} diff --git a/service/rds/api_op_RebootDBInstance.go b/service/rds/api_op_RebootDBInstance.go index a1c4d651b2b..3fb4f371624 100644 --- a/service/rds/api_op_RebootDBInstance.go +++ b/service/rds/api_op_RebootDBInstance.go @@ -57,7 +57,11 @@ type RebootDBInstanceInput struct { type RebootDBInstanceOutput struct { // Contains the details of an Amazon RDS DB instance. This data type is used as a - // response element in the DescribeDBInstances action. + // response element in the operations CreateDBInstance, + // CreateDBInstanceReadReplica, DeleteDBInstance, DescribeDBInstances, + // ModifyDBInstance, PromoteReadReplica, RebootDBInstance, + // RestoreDBInstanceFromDBSnapshot, RestoreDBInstanceFromS3, + // RestoreDBInstanceToPointInTime, StartDBInstance, and StopDBInstance. DBInstance *types.DBInstance // Metadata pertaining to the operation's result. diff --git a/service/rds/api_op_RemoveFromGlobalCluster.go b/service/rds/api_op_RemoveFromGlobalCluster.go index 7451b0c7953..0f2d54bc601 100644 --- a/service/rds/api_op_RemoveFromGlobalCluster.go +++ b/service/rds/api_op_RemoveFromGlobalCluster.go @@ -13,7 +13,7 @@ import ( // Detaches an Aurora secondary cluster from an Aurora global database cluster. The // cluster becomes a standalone cluster with read-write capability instead of being -// read-only and receiving data from a primary cluster in a different region. This +// read-only and receiving data from a primary cluster in a different Region. This // action only applies to Aurora DB clusters. func (c *Client) RemoveFromGlobalCluster(ctx context.Context, params *RemoveFromGlobalClusterInput, optFns ...func(*Options)) (*RemoveFromGlobalClusterOutput, error) { if params == nil { diff --git a/service/rds/api_op_RemoveRoleFromDBCluster.go b/service/rds/api_op_RemoveRoleFromDBCluster.go index 525ef610b35..5631312384f 100644 --- a/service/rds/api_op_RemoveRoleFromDBCluster.go +++ b/service/rds/api_op_RemoveRoleFromDBCluster.go @@ -10,11 +10,15 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Disassociates an Amazon Web Services Identity and Access Management (IAM) role -// from an Amazon Aurora DB cluster. For more information, see Authorizing Amazon -// Aurora MySQL to Access Other Amazon Web Services Services on Your Behalf -// (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Integrating.Authorizing.html) -// in the Amazon Aurora User Guide. This action only applies to Aurora DB clusters. +// Removes the asssociation of an Amazon Web Services Identity and Access +// Management (IAM) role from a DB cluster. For more information on Amazon Aurora +// DB clusters, see What is Amazon Aurora? +// (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) +// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, +// see Multi-AZ deployments with two readable standby DB instances +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) +// in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and +// is subject to change. func (c *Client) RemoveRoleFromDBCluster(ctx context.Context, params *RemoveRoleFromDBClusterInput, optFns ...func(*Options)) (*RemoveRoleFromDBClusterOutput, error) { if params == nil { params = &RemoveRoleFromDBClusterInput{} diff --git a/service/rds/api_op_ResetDBClusterParameterGroup.go b/service/rds/api_op_ResetDBClusterParameterGroup.go index bd2e3bd2327..076e46c7763 100644 --- a/service/rds/api_op_ResetDBClusterParameterGroup.go +++ b/service/rds/api_op_ResetDBClusterParameterGroup.go @@ -19,11 +19,14 @@ import ( // parameters are set to pending-reboot to take effect on the next DB instance // restart or RebootDBInstance request. You must call RebootDBInstance for every DB // instance in your DB cluster that you want the updated static parameter to apply -// to. For more information on Amazon Aurora, see -// -// What Is Amazon Aurora? +// to. For more information on Amazon Aurora DB clusters, see What is Amazon +// Aurora? // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. This action only applies to Aurora DB clusters. +// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, +// see Multi-AZ deployments with two readable standby DB instances +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) +// in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and +// is subject to change. func (c *Client) ResetDBClusterParameterGroup(ctx context.Context, params *ResetDBClusterParameterGroupInput, optFns ...func(*Options)) (*ResetDBClusterParameterGroupOutput, error) { if params == nil { params = &ResetDBClusterParameterGroupInput{} diff --git a/service/rds/api_op_RestoreDBClusterFromS3.go b/service/rds/api_op_RestoreDBClusterFromS3.go index 7810de318b3..4ac89e6b83f 100644 --- a/service/rds/api_op_RestoreDBClusterFromS3.go +++ b/service/rds/api_op_RestoreDBClusterFromS3.go @@ -21,7 +21,7 @@ import ( // action to create DB instances for the restored DB cluster, specifying the // identifier of the restored DB cluster in DBClusterIdentifier. You can create DB // instances only after the RestoreDBClusterFromS3 action has completed and the DB -// cluster is available. For more information on Amazon Aurora, see What Is Amazon +// cluster is available. For more information on Amazon Aurora, see What is Amazon // Aurora? // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) // in the Amazon Aurora User Guide. This action only applies to Aurora DB clusters. @@ -156,7 +156,7 @@ type RestoreDBClusterFromS3Input struct { // A value that indicates whether the DB cluster has deletion protection enabled. // The database can't be deleted when deletion protection is enabled. By default, - // deletion protection is disabled. + // deletion protection isn't enabled. DeletionProtection *bool // Specify the Active Directory directory ID to restore the DB cluster in. The @@ -180,7 +180,7 @@ type RestoreDBClusterFromS3Input struct { // A value that indicates whether to enable mapping of Amazon Web Services Identity // and Access Management (IAM) accounts to database accounts. By default, mapping - // is disabled. For more information, see IAM Database Authentication + // isn't enabled. For more information, see IAM Database Authentication // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.IAMDBAuth.html) // in the Amazon Aurora User Guide. EnableIAMDatabaseAuthentication *bool @@ -269,9 +269,23 @@ type RestoreDBClusterFromS3Input struct { type RestoreDBClusterFromS3Output struct { - // Contains the details of an Amazon Aurora DB cluster. This data type is used as a - // response element in the DescribeDBClusters, StopDBCluster, and StartDBCluster - // actions. + // Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster. For + // an Amazon Aurora DB cluster, this data type is used as a response element in the + // operations CreateDBCluster, DeleteDBCluster, DescribeDBClusters, + // FailoverDBCluster, ModifyDBCluster, PromoteReadReplicaDBCluster, + // RestoreDBClusterFromS3, RestoreDBClusterFromSnapshot, + // RestoreDBClusterToPointInTime, StartDBCluster, and StopDBCluster. For a Multi-AZ + // DB cluster, this data type is used as a response element in the operations + // CreateDBCluster, DeleteDBCluster, DescribeDBClusters, FailoverDBCluster, + // ModifyDBCluster, RebootDBCluster, RestoreDBClusterFromSnapshot, and + // RestoreDBClusterToPointInTime. For more information on Amazon Aurora DB + // clusters, see What is Amazon Aurora? + // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) + // in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, + // see Multi-AZ deployments with two readable standby DB instances + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) + // in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and + // is subject to change. DBCluster *types.DBCluster // Metadata pertaining to the operation's result. diff --git a/service/rds/api_op_RestoreDBClusterFromSnapshot.go b/service/rds/api_op_RestoreDBClusterFromSnapshot.go index 2d6a585d5eb..76489100e27 100644 --- a/service/rds/api_op_RestoreDBClusterFromSnapshot.go +++ b/service/rds/api_op_RestoreDBClusterFromSnapshot.go @@ -11,18 +11,22 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates a new DB cluster from a DB snapshot or DB cluster snapshot. This action -// only applies to Aurora DB clusters. The target DB cluster is created from the -// source snapshot with a default configuration. If you don't specify a security -// group, the new DB cluster is associated with the default security group. This -// action only restores the DB cluster, not the DB instances for that DB cluster. -// You must invoke the CreateDBInstance action to create DB instances for the -// restored DB cluster, specifying the identifier of the restored DB cluster in -// DBClusterIdentifier. You can create DB instances only after the -// RestoreDBClusterFromSnapshot action has completed and the DB cluster is -// available. For more information on Amazon Aurora, see What Is Amazon Aurora? +// Creates a new DB cluster from a DB snapshot or DB cluster snapshot. The target +// DB cluster is created from the source snapshot with a default configuration. If +// you don't specify a security group, the new DB cluster is associated with the +// default security group. This action only restores the DB cluster, not the DB +// instances for that DB cluster. You must invoke the CreateDBInstance action to +// create DB instances for the restored DB cluster, specifying the identifier of +// the restored DB cluster in DBClusterIdentifier. You can create DB instances only +// after the RestoreDBClusterFromSnapshot action has completed and the DB cluster +// is available. For more information on Amazon Aurora DB clusters, see What is +// Amazon Aurora? // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. This action only applies to Aurora DB clusters. +// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, +// see Multi-AZ deployments with two readable standby DB instances +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) +// in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and +// is subject to change. func (c *Client) RestoreDBClusterFromSnapshot(ctx context.Context, params *RestoreDBClusterFromSnapshotInput, optFns ...func(*Options)) (*RestoreDBClusterFromSnapshotOutput, error) { if params == nil { params = &RestoreDBClusterFromSnapshotInput{} @@ -53,13 +57,14 @@ type RestoreDBClusterFromSnapshotInput struct { // Can't end with a hyphen or contain two consecutive hyphens // // Example: - // my-snapshot-id + // my-snapshot-id Valid for: Aurora DB clusters and Multi-AZ DB clusters // // This member is required. DBClusterIdentifier *string // The database engine to use for the new DB cluster. Default: The same as source - // Constraint: Must be compatible with the engine of the source + // Constraint: Must be compatible with the engine of the source Valid for: Aurora + // DB clusters and Multi-AZ DB clusters // // This member is required. Engine *string @@ -71,11 +76,14 @@ type RestoreDBClusterFromSnapshotInput struct { // // * Must match the identifier of an existing Snapshot. // + // Valid for: + // Aurora DB clusters and Multi-AZ DB clusters + // // This member is required. SnapshotIdentifier *string // Provides the list of Availability Zones (AZs) where instances in the restored DB - // cluster can be created. + // cluster can be created. Valid for: Aurora DB clusters only AvailabilityZones []string // The target backtrack window, in seconds. To disable backtracking, set this value @@ -84,12 +92,24 @@ type RestoreDBClusterFromSnapshotInput struct { // // * If specified, this value must be set to a number from // 0 to 259,200 (72 hours). + // + // Valid for: Aurora DB clusters only BacktrackWindow *int64 // A value that indicates whether to copy all tags from the restored DB cluster to - // snapshots of the restored DB cluster. The default is not to copy them. + // snapshots of the restored DB cluster. The default is not to copy them. Valid + // for: Aurora DB clusters only CopyTagsToSnapshot *bool + // The compute and memory capacity of the each DB instance in the Multi-AZ DB + // cluster, for example db.m6g.xlarge. Not all DB instance classes are available in + // all Amazon Web Services Regions, or for all database engines. For the full list + // of DB instance classes, and availability for your engine, see DB Instance Class + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) + // in the Amazon RDS User Guide. Valid for: Aurora DB clusters and Multi-AZ DB + // clusters + DBClusterInstanceClass *string + // The name of the DB cluster parameter group to associate with this DB cluster. If // this argument is omitted, the default DB cluster parameter group for the // specified engine is used. Constraints: @@ -104,19 +124,24 @@ type RestoreDBClusterFromSnapshotInput struct { // // * Can't end with a // hyphen or contain two consecutive hyphens. + // + // Valid for: Aurora DB clusters and + // Multi-AZ DB clusters DBClusterParameterGroupName *string // The name of the DB subnet group to use for the new DB cluster. Constraints: If // supplied, must match the name of an existing DB subnet group. Example: - // mySubnetgroup + // mySubnetgroup Valid for: Aurora DB clusters and Multi-AZ DB clusters DBSubnetGroupName *string - // The database name for the restored DB cluster. + // The database name for the restored DB cluster. Valid for: Aurora DB clusters and + // Multi-AZ DB clusters DatabaseName *string // A value that indicates whether the DB cluster has deletion protection enabled. // The database can't be deleted when deletion protection is enabled. By default, - // deletion protection is disabled. + // deletion protection isn't enabled. Valid for: Aurora DB clusters and Multi-AZ DB + // clusters DeletionProtection *bool // Specify the Active Directory directory ID to restore the DB cluster in. The @@ -124,48 +149,73 @@ type RestoreDBClusterFromSnapshotInput struct { // SQL Server, Oracle, and PostgreSQL DB instances can be created in an Active // Directory Domain. For more information, see Kerberos Authentication // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/kerberos-authentication.html) - // in the Amazon RDS User Guide. + // in the Amazon RDS User Guide. Valid for: Aurora DB clusters only Domain *string // Specify the name of the IAM role to be used when making API calls to the - // Directory Service. + // Directory Service. Valid for: Aurora DB clusters only DomainIAMRoleName *string // The list of logs that the restored DB cluster is to export to Amazon CloudWatch // Logs. The values in the list depend on the DB engine being used. For more // information, see Publishing Database Logs to Amazon CloudWatch Logs // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) - // in the Amazon Aurora User Guide. + // in the Amazon Aurora User Guide. Valid for: Aurora DB clusters only EnableCloudwatchLogsExports []string // A value that indicates whether to enable mapping of Amazon Web Services Identity // and Access Management (IAM) accounts to database accounts. By default, mapping - // is disabled. For more information, see IAM Database Authentication + // isn't enabled. For more information, see IAM Database Authentication // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.IAMDBAuth.html) - // in the Amazon Aurora User Guide. + // in the Amazon Aurora User Guide. Valid for: Aurora DB clusters only EnableIAMDatabaseAuthentication *bool // The DB engine mode of the DB cluster, either provisioned, serverless, // parallelquery, global, or multimaster. For more information, see // CreateDBCluster // (https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBCluster.html). + // Valid for: Aurora DB clusters only EngineMode *string // The version of the database engine to use for the new DB cluster. To list all of - // the available engine versions for aurora (for MySQL 5.6-compatible Aurora), use - // the following command: aws rds describe-db-engine-versions --engine aurora - // --query "DBEngineVersions[].EngineVersion" To list all of the available engine - // versions for aurora-mysql (for MySQL 5.7-compatible Aurora), use the following - // command: aws rds describe-db-engine-versions --engine aurora-mysql --query + // the available engine versions for MySQL 5.6-compatible Aurora, use the following + // command: aws rds describe-db-engine-versions --engine aurora --query + // "DBEngineVersions[].EngineVersion" To list all of the available engine versions + // for MySQL 5.7-compatible Aurora, use the following command: aws rds + // describe-db-engine-versions --engine aurora-mysql --query // "DBEngineVersions[].EngineVersion" To list all of the available engine versions - // for aurora-postgresql, use the following command: aws rds + // for Aurora PostgreSQL, use the following command: aws rds // describe-db-engine-versions --engine aurora-postgresql --query - // "DBEngineVersions[].EngineVersion" If you aren't using the default engine - // version, then you must specify the engine version. Aurora MySQL Example: - // 5.6.10a, 5.6.mysql_aurora.1.19.2, 5.7.12, 5.7.mysql_aurora.2.04.5 Aurora - // PostgreSQL Example: 9.6.3, 10.7 + // "DBEngineVersions[].EngineVersion" To list all of the available engine versions + // for RDS for MySQL, use the following command: aws rds + // describe-db-engine-versions --engine mysql --query + // "DBEngineVersions[].EngineVersion" To list all of the available engine versions + // for RDS for PostgreSQL, use the following command: aws rds + // describe-db-engine-versions --engine postgres --query + // "DBEngineVersions[].EngineVersion" Aurora MySQL See MySQL on Amazon RDS Versions + // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Updates.html) + // in the Amazon Aurora User Guide. Aurora PostgreSQL See Amazon Aurora PostgreSQL + // releases and engine versions + // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Updates.20180305.html) + // in the Amazon Aurora User Guide. MySQL See MySQL on Amazon RDS Versions + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MySQL.html#MySQL.Concepts.VersionMgmt) + // in the Amazon RDS User Guide. PostgreSQL See Amazon RDS for PostgreSQL versions + // and extensions + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts) + // in the Amazon RDS User Guide. Valid for: Aurora DB clusters and Multi-AZ DB + // clusters EngineVersion *string + // The amount of Provisioned IOPS (input/output operations per second) to be + // initially allocated for each DB instance in the Multi-AZ DB cluster. For + // information about valid Iops values, see Amazon RDS Provisioned IOPS Storage to + // Improve Performance + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS) + // in the Amazon RDS User Guide. Constraints: Must be a multiple between .5 and 50 + // of the storage amount for the DB instance. Valid for: Aurora DB clusters and + // Multi-AZ DB clusters + Iops *int32 + // The Amazon Web Services KMS key identifier to use when restoring an encrypted DB // cluster from a DB snapshot or DB cluster snapshot. The Amazon Web Services KMS // key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. @@ -180,23 +230,70 @@ type RestoreDBClusterFromSnapshotInput struct { // * // If the DB snapshot or DB cluster snapshot in SnapshotIdentifier isn't encrypted, // then the restored DB cluster isn't encrypted. + // + // Valid for: Aurora DB clusters and + // Multi-AZ DB clusters KmsKeyId *string - // The name of the option group to use for the restored DB cluster. + // The name of the option group to use for the restored DB cluster. DB clusters are + // associated with a default option group that can't be modified. OptionGroupName *string // The port number on which the new DB cluster accepts connections. Constraints: // This value must be 1150-65535 Default: The same port as the original DB cluster. + // Valid for: Aurora DB clusters and Multi-AZ DB clusters Port *int32 + // A value that indicates whether the DB cluster is publicly accessible. When the + // DB cluster is publicly accessible, its Domain Name System (DNS) endpoint + // resolves to the private IP address from within the DB cluster's virtual private + // cloud (VPC). It resolves to the public IP address from outside of the DB + // cluster's VPC. Access to the DB cluster is ultimately controlled by the security + // group it uses. That public access is not permitted if the security group + // assigned to the DB cluster doesn't permit it. When the DB cluster isn't publicly + // accessible, it is an internal DB cluster with a DNS name that resolves to a + // private IP address. Default: The default behavior varies depending on whether + // DBSubnetGroupName is specified. If DBSubnetGroupName isn't specified, and + // PubliclyAccessible isn't specified, the following applies: + // + // * If the default VPC + // in the target Region doesn’t have an internet gateway attached to it, the DB + // cluster is private. + // + // * If the default VPC in the target Region has an internet + // gateway attached to it, the DB cluster is public. + // + // If DBSubnetGroupName is + // specified, and PubliclyAccessible isn't specified, the following applies: + // + // * If + // the subnets are part of a VPC that doesn’t have an internet gateway attached to + // it, the DB cluster is private. + // + // * If the subnets are part of a VPC that has an + // internet gateway attached to it, the DB cluster is public. + // + // Valid for: Aurora DB + // clusters and Multi-AZ DB clusters + PubliclyAccessible *bool + // For DB clusters in serverless DB engine mode, the scaling properties of the DB - // cluster. + // cluster. Valid for: Aurora DB clusters only ScalingConfiguration *types.ScalingConfiguration - // The tags to be assigned to the restored DB cluster. + // Specifies the storage type to be associated with the each DB instance in the + // Multi-AZ DB cluster. Valid values: standard | gp2 | io1 If you specify io1, you + // must also include a value for the Iops parameter. Default: io1 if the Iops + // parameter is specified, otherwise gp2 Valid for: Aurora DB clusters and Multi-AZ + // DB clusters + StorageType *string + + // The tags to be assigned to the restored DB cluster. Valid for: Aurora DB + // clusters and Multi-AZ DB clusters Tags []types.Tag - // A list of VPC security groups that the new DB cluster will belong to. + // A list of VPC security groups that the new DB cluster will belong to. Valid for: + // Aurora DB clusters and Multi-AZ DB clusters VpcSecurityGroupIds []string noSmithyDocumentSerde @@ -204,9 +301,23 @@ type RestoreDBClusterFromSnapshotInput struct { type RestoreDBClusterFromSnapshotOutput struct { - // Contains the details of an Amazon Aurora DB cluster. This data type is used as a - // response element in the DescribeDBClusters, StopDBCluster, and StartDBCluster - // actions. + // Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster. For + // an Amazon Aurora DB cluster, this data type is used as a response element in the + // operations CreateDBCluster, DeleteDBCluster, DescribeDBClusters, + // FailoverDBCluster, ModifyDBCluster, PromoteReadReplicaDBCluster, + // RestoreDBClusterFromS3, RestoreDBClusterFromSnapshot, + // RestoreDBClusterToPointInTime, StartDBCluster, and StopDBCluster. For a Multi-AZ + // DB cluster, this data type is used as a response element in the operations + // CreateDBCluster, DeleteDBCluster, DescribeDBClusters, FailoverDBCluster, + // ModifyDBCluster, RebootDBCluster, RestoreDBClusterFromSnapshot, and + // RestoreDBClusterToPointInTime. For more information on Amazon Aurora DB + // clusters, see What is Amazon Aurora? + // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) + // in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, + // see Multi-AZ deployments with two readable standby DB instances + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) + // in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and + // is subject to change. DBCluster *types.DBCluster // Metadata pertaining to the operation's result. diff --git a/service/rds/api_op_RestoreDBClusterToPointInTime.go b/service/rds/api_op_RestoreDBClusterToPointInTime.go index 9bceb443d45..08ff2fab360 100644 --- a/service/rds/api_op_RestoreDBClusterToPointInTime.go +++ b/service/rds/api_op_RestoreDBClusterToPointInTime.go @@ -16,15 +16,20 @@ import ( // point in time before LatestRestorableTime for up to BackupRetentionPeriod days. // The target DB cluster is created from the source DB cluster with the same // configuration as the original DB cluster, except that the new DB cluster is -// created with the default DB security group. This action only restores the DB -// cluster, not the DB instances for that DB cluster. You must invoke the -// CreateDBInstance action to create DB instances for the restored DB cluster, -// specifying the identifier of the restored DB cluster in DBClusterIdentifier. You -// can create DB instances only after the RestoreDBClusterToPointInTime action has -// completed and the DB cluster is available. For more information on Amazon -// Aurora, see What Is Amazon Aurora? +// created with the default DB security group. For Aurora, this action only +// restores the DB cluster, not the DB instances for that DB cluster. You must +// invoke the CreateDBInstance action to create DB instances for the restored DB +// cluster, specifying the identifier of the restored DB cluster in +// DBClusterIdentifier. You can create DB instances only after the +// RestoreDBClusterToPointInTime action has completed and the DB cluster is +// available. For more information on Amazon Aurora DB clusters, see What is +// Amazon Aurora? // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) -// in the Amazon Aurora User Guide. This action only applies to Aurora DB clusters. +// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, +// see Multi-AZ deployments with two readable standby DB instances +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) +// in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and +// is subject to change. func (c *Client) RestoreDBClusterToPointInTime(ctx context.Context, params *RestoreDBClusterToPointInTimeInput, optFns ...func(*Options)) (*RestoreDBClusterToPointInTimeOutput, error) { if params == nil { params = &RestoreDBClusterToPointInTimeInput{} @@ -53,6 +58,9 @@ type RestoreDBClusterToPointInTimeInput struct { // * // Can't end with a hyphen or contain two consecutive hyphens // + // Valid for: Aurora DB + // clusters and Multi-AZ DB clusters + // // This member is required. DBClusterIdentifier *string @@ -61,21 +69,34 @@ type RestoreDBClusterToPointInTimeInput struct { // * // Must match the identifier of an existing DBCluster. // + // Valid for: Aurora DB + // clusters and Multi-AZ DB clusters + // // This member is required. SourceDBClusterIdentifier *string // The target backtrack window, in seconds. To disable backtracking, set this value - // to 0. Currently, Backtrack is only supported for Aurora MySQL DB clusters. - // Default: 0 Constraints: + // to 0. Default: 0 Constraints: // - // * If specified, this value must be set to a number from - // 0 to 259,200 (72 hours). + // * If specified, this value must be set to a + // number from 0 to 259,200 (72 hours). + // + // Valid for: Aurora MySQL DB clusters only BacktrackWindow *int64 // A value that indicates whether to copy all tags from the restored DB cluster to - // snapshots of the restored DB cluster. The default is not to copy them. + // snapshots of the restored DB cluster. The default is not to copy them. Valid + // for: Aurora DB clusters only CopyTagsToSnapshot *bool + // The compute and memory capacity of the each DB instance in the Multi-AZ DB + // cluster, for example db.m6g.xlarge. Not all DB instance classes are available in + // all Amazon Web Services Regions, or for all database engines. For the full list + // of DB instance classes, and availability for your engine, see DB instance class + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) + // in the Amazon RDS User Guide. Valid for: Multi-AZ DB clusters only + DBClusterInstanceClass *string + // The name of the DB cluster parameter group to associate with this DB cluster. If // this argument is omitted, the default DB cluster parameter group for the // specified engine is used. Constraints: @@ -90,16 +111,20 @@ type RestoreDBClusterToPointInTimeInput struct { // // * Can't end with a hyphen or // contain two consecutive hyphens. + // + // Valid for: Aurora DB clusters and Multi-AZ DB + // clusters DBClusterParameterGroupName *string // The DB subnet group name to use for the new DB cluster. Constraints: If // supplied, must match the name of an existing DBSubnetGroup. Example: - // mySubnetgroup + // mySubnetgroup Valid for: Aurora DB clusters and Multi-AZ DB clusters DBSubnetGroupName *string // A value that indicates whether the DB cluster has deletion protection enabled. // The database can't be deleted when deletion protection is enabled. By default, - // deletion protection is disabled. + // deletion protection isn't enabled. Valid for: Aurora DB clusters and Multi-AZ DB + // clusters DeletionProtection *bool // Specify the Active Directory directory ID to restore the DB cluster in. The @@ -107,25 +132,25 @@ type RestoreDBClusterToPointInTimeInput struct { // Amazon RDS can use Kerberos Authentication to authenticate users that connect to // the DB cluster. For more information, see Kerberos Authentication // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/kerberos-authentication.html) - // in the Amazon Aurora User Guide. + // in the Amazon Aurora User Guide. Valid for: Aurora DB clusters only Domain *string // Specify the name of the IAM role to be used when making API calls to the - // Directory Service. + // Directory Service. Valid for: Aurora DB clusters only DomainIAMRoleName *string // The list of logs that the restored DB cluster is to export to CloudWatch Logs. // The values in the list depend on the DB engine being used. For more information, // see Publishing Database Logs to Amazon CloudWatch Logs // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) - // in the Amazon Aurora User Guide. + // in the Amazon Aurora User Guide. Valid for: Aurora DB clusters only EnableCloudwatchLogsExports []string // A value that indicates whether to enable mapping of Amazon Web Services Identity // and Access Management (IAM) accounts to database accounts. By default, mapping - // is disabled. For more information, see IAM Database Authentication + // isn't enabled. For more information, see IAM Database Authentication // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.IAMDBAuth.html) - // in the Amazon Aurora User Guide. + // in the Amazon Aurora User Guide. Valid for: Aurora DB clusters only EnableIAMDatabaseAuthentication *bool // The engine mode of the new cluster. Specify provisioned or serverless, depending @@ -133,9 +158,18 @@ type RestoreDBClusterToPointInTimeInput struct { // clone from a provisioned cluster, or a provisioned clone from an Aurora // Serverless cluster. To create a clone that is an Aurora Serverless cluster, the // original cluster must be an Aurora Serverless cluster or an encrypted - // provisioned cluster. + // provisioned cluster. Valid for: Aurora DB clusters only EngineMode *string + // The amount of Provisioned IOPS (input/output operations per second) to be + // initially allocated for each DB instance in the Multi-AZ DB cluster. For + // information about valid Iops values, see Amazon RDS Provisioned IOPS storage to + // improve performance + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS) + // in the Amazon RDS User Guide. Constraints: Must be a multiple between .5 and 50 + // of the storage amount for the DB instance. Valid for: Multi-AZ DB clusters only + Iops *int32 + // The Amazon Web Services KMS key identifier to use when restoring an encrypted DB // cluster from an encrypted DB cluster. The Amazon Web Services KMS key identifier // is the key ARN, key ID, alias ARN, or alias name for the KMS key. To use a KMS @@ -154,16 +188,52 @@ type RestoreDBClusterToPointInTimeInput struct { // isn't encrypted. // // If DBClusterIdentifier refers to a DB cluster that isn't - // encrypted, then the restore request is rejected. + // encrypted, then the restore request is rejected. Valid for: Aurora DB clusters + // and Multi-AZ DB clusters KmsKeyId *string - // The name of the option group for the new DB cluster. + // The name of the option group for the new DB cluster. DB clusters are associated + // with a default option group that can't be modified. OptionGroupName *string // The port number on which the new DB cluster accepts connections. Constraints: A - // value from 1150-65535. Default: The default port for the engine. + // value from 1150-65535. Default: The default port for the engine. Valid for: + // Aurora DB clusters and Multi-AZ DB clusters Port *int32 + // A value that indicates whether the DB cluster is publicly accessible. When the + // DB cluster is publicly accessible, its Domain Name System (DNS) endpoint + // resolves to the private IP address from within the DB cluster's virtual private + // cloud (VPC). It resolves to the public IP address from outside of the DB + // cluster's VPC. Access to the DB cluster is ultimately controlled by the security + // group it uses. That public access is not permitted if the security group + // assigned to the DB cluster doesn't permit it. When the DB cluster isn't publicly + // accessible, it is an internal DB cluster with a DNS name that resolves to a + // private IP address. Default: The default behavior varies depending on whether + // DBSubnetGroupName is specified. If DBSubnetGroupName isn't specified, and + // PubliclyAccessible isn't specified, the following applies: + // + // * If the default VPC + // in the target Region doesn’t have an internet gateway attached to it, the DB + // cluster is private. + // + // * If the default VPC in the target Region has an internet + // gateway attached to it, the DB cluster is public. + // + // If DBSubnetGroupName is + // specified, and PubliclyAccessible isn't specified, the following applies: + // + // * If + // the subnets are part of a VPC that doesn’t have an internet gateway attached to + // it, the DB cluster is private. + // + // * If the subnets are part of a VPC that has an + // internet gateway attached to it, the DB cluster is public. + // + // Valid for: Multi-AZ + // DB clusters only + PubliclyAccessible *bool + // The date and time to restore the DB cluster to. Valid Values: Value must be a // time in Universal Coordinated Time (UTC) format Constraints: // @@ -179,7 +249,8 @@ type RestoreDBClusterToPointInTimeInput struct { // * Can't be specified if the // RestoreType parameter is copy-on-write // - // Example: 2015-03-07T23:45:00Z + // Example: 2015-03-07T23:45:00Z Valid for: + // Aurora DB clusters and Multi-AZ DB clusters RestoreToTime *time.Time // The type of restore to be performed. You can specify one of the following @@ -194,13 +265,19 @@ type RestoreDBClusterToPointInTimeInput struct { // Constraints: You can't specify copy-on-write if the // engine version of the source DB cluster is earlier than 1.11. If you don't // specify a RestoreType value, then the new DB cluster is restored as a full copy - // of the source DB cluster. + // of the source DB cluster. Valid for: Aurora DB clusters and Multi-AZ DB clusters RestoreType *string // For DB clusters in serverless DB engine mode, the scaling properties of the DB - // cluster. + // cluster. Valid for: Aurora DB clusters only ScalingConfiguration *types.ScalingConfiguration + // Specifies the storage type to be associated with the each DB instance in the + // Multi-AZ DB cluster. Valid values: standard | gp2 | io1 If you specify io1, also + // include a value for the Iops parameter. Default: io1 if the Iops parameter is + // specified, otherwise gp2 Valid for: Multi-AZ DB clusters only + StorageType *string + // A list of tags. For more information, see Tagging Amazon RDS Resources // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) in // the Amazon RDS User Guide. @@ -209,10 +286,11 @@ type RestoreDBClusterToPointInTimeInput struct { // A value that indicates whether to restore the DB cluster to the latest // restorable backup time. By default, the DB cluster isn't restored to the latest // restorable backup time. Constraints: Can't be specified if RestoreToTime - // parameter is provided. + // parameter is provided. Valid for: Aurora DB clusters and Multi-AZ DB clusters UseLatestRestorableTime bool - // A list of VPC security groups that the new DB cluster belongs to. + // A list of VPC security groups that the new DB cluster belongs to. Valid for: + // Aurora DB clusters and Multi-AZ DB clusters VpcSecurityGroupIds []string noSmithyDocumentSerde @@ -220,9 +298,23 @@ type RestoreDBClusterToPointInTimeInput struct { type RestoreDBClusterToPointInTimeOutput struct { - // Contains the details of an Amazon Aurora DB cluster. This data type is used as a - // response element in the DescribeDBClusters, StopDBCluster, and StartDBCluster - // actions. + // Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster. For + // an Amazon Aurora DB cluster, this data type is used as a response element in the + // operations CreateDBCluster, DeleteDBCluster, DescribeDBClusters, + // FailoverDBCluster, ModifyDBCluster, PromoteReadReplicaDBCluster, + // RestoreDBClusterFromS3, RestoreDBClusterFromSnapshot, + // RestoreDBClusterToPointInTime, StartDBCluster, and StopDBCluster. For a Multi-AZ + // DB cluster, this data type is used as a response element in the operations + // CreateDBCluster, DeleteDBCluster, DescribeDBClusters, FailoverDBCluster, + // ModifyDBCluster, RebootDBCluster, RestoreDBClusterFromSnapshot, and + // RestoreDBClusterToPointInTime. For more information on Amazon Aurora DB + // clusters, see What is Amazon Aurora? + // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) + // in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, + // see Multi-AZ deployments with two readable standby DB instances + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) + // in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and + // is subject to change. DBCluster *types.DBCluster // Metadata pertaining to the operation's result. diff --git a/service/rds/api_op_RestoreDBInstanceFromDBSnapshot.go b/service/rds/api_op_RestoreDBInstanceFromDBSnapshot.go index de06fc940bc..14d94faa002 100644 --- a/service/rds/api_op_RestoreDBInstanceFromDBSnapshot.go +++ b/service/rds/api_op_RestoreDBInstanceFromDBSnapshot.go @@ -85,6 +85,14 @@ type RestoreDBInstanceFromDBSnapshotInput struct { // us-east-1a AvailabilityZone *string + // Specifies where automated backups and manual snapshots are stored for the + // restored DB instance. Possible values are outposts (Amazon Web Services + // Outposts) and region (Amazon Web Services Region). The default is region. For + // more information, see Working with Amazon RDS on Amazon Web Services Outposts + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html) in + // the Amazon RDS User Guide. + BackupTarget *string + // A value that indicates whether to copy all tags from the restored DB instance to // snapshots of the DB instance. By default, tags are not copied. CopyTagsToSnapshot *bool @@ -109,7 +117,7 @@ type RestoreDBInstanceFromDBSnapshotInput struct { // for RDS Custom. CustomIamInstanceProfile *string - // The compute and memory capacity of the Amazon RDS DB instance, for example, + // The compute and memory capacity of the Amazon RDS DB instance, for example // db.m4.large. Not all DB instance classes are available in all Amazon Web // Services Regions, or for all database engines. For the full list of DB instance // classes, and availability for your engine, see DB Instance Class @@ -146,7 +154,7 @@ type RestoreDBInstanceFromDBSnapshotInput struct { // A value that indicates whether the DB instance has deletion protection enabled. // The database can't be deleted when deletion protection is enabled. By default, - // deletion protection is disabled. For more information, see Deleting a DB + // deletion protection isn't enabled. For more information, see Deleting a DB // Instance // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html). DeletionProtection *bool @@ -260,14 +268,14 @@ type RestoreDBInstanceFromDBSnapshotInput struct { ProcessorFeatures []types.ProcessorFeature // A value that indicates whether the DB instance is publicly accessible. When the - // DB instance is publicly accessible, its DNS endpoint resolves to the private IP - // address from within the DB instance's VPC, and to the public IP address from - // outside of the DB instance's VPC. Access to the DB instance is ultimately - // controlled by the security group it uses, and that public access is not - // permitted if the security group assigned to the DB instance doesn't permit it. - // When the DB instance isn't publicly accessible, it is an internal DB instance - // with a DNS name that resolves to a private IP address. For more information, see - // CreateDBInstance. + // DB instance is publicly accessible, its Domain Name System (DNS) endpoint + // resolves to the private IP address from within the DB instance's virtual private + // cloud (VPC). It resolves to the public IP address from outside of the DB + // instance's VPC. Access to the DB instance is ultimately controlled by the + // security group it uses. That public access is not permitted if the security + // group assigned to the DB instance doesn't permit it. When the DB instance isn't + // publicly accessible, it is an internal DB instance with a DNS name that resolves + // to a private IP address. For more information, see CreateDBInstance. PubliclyAccessible *bool // Specifies the storage type to be associated with the DB instance. Valid values: @@ -302,7 +310,11 @@ type RestoreDBInstanceFromDBSnapshotInput struct { type RestoreDBInstanceFromDBSnapshotOutput struct { // Contains the details of an Amazon RDS DB instance. This data type is used as a - // response element in the DescribeDBInstances action. + // response element in the operations CreateDBInstance, + // CreateDBInstanceReadReplica, DeleteDBInstance, DescribeDBInstances, + // ModifyDBInstance, PromoteReadReplica, RebootDBInstance, + // RestoreDBInstanceFromDBSnapshot, RestoreDBInstanceFromS3, + // RestoreDBInstanceToPointInTime, StartDBInstance, and StopDBInstance. DBInstance *types.DBInstance // Metadata pertaining to the operation's result. diff --git a/service/rds/api_op_RestoreDBInstanceFromS3.go b/service/rds/api_op_RestoreDBInstanceFromS3.go index 44e1c090451..84563e43c93 100644 --- a/service/rds/api_op_RestoreDBInstanceFromS3.go +++ b/service/rds/api_op_RestoreDBInstanceFromS3.go @@ -35,10 +35,10 @@ func (c *Client) RestoreDBInstanceFromS3(ctx context.Context, params *RestoreDBI type RestoreDBInstanceFromS3Input struct { - // The compute and memory capacity of the DB instance, for example, db.m4.large. - // Not all DB instance classes are available in all Amazon Web Services Regions, or - // for all database engines. For the full list of DB instance classes, and - // availability for your engine, see DB Instance Class + // The compute and memory capacity of the DB instance, for example db.m4.large. Not + // all DB instance classes are available in all Amazon Web Services Regions, or for + // all database engines. For the full list of DB instance classes, and availability + // for your engine, see DB Instance Class // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) // in the Amazon RDS User Guide. Importing from Amazon S3 isn't supported on the // db.t2.micro DB instance class. @@ -139,7 +139,7 @@ type RestoreDBInstanceFromS3Input struct { // A value that indicates whether the DB instance has deletion protection enabled. // The database can't be deleted when deletion protection is enabled. By default, - // deletion protection is disabled. For more information, see Deleting a DB + // deletion protection isn't enabled. For more information, see Deleting a DB // Instance // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html). DeletionProtection *bool @@ -153,7 +153,7 @@ type RestoreDBInstanceFromS3Input struct { // A value that indicates whether to enable mapping of Amazon Web Services Identity // and Access Management (IAM) accounts to database accounts. By default, mapping - // is disabled. For more information about IAM database authentication, see IAM + // isn't enabled. For more information about IAM database authentication, see IAM // Database Authentication for MySQL and PostgreSQL // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html) // in the Amazon RDS User Guide. @@ -295,14 +295,14 @@ type RestoreDBInstanceFromS3Input struct { ProcessorFeatures []types.ProcessorFeature // A value that indicates whether the DB instance is publicly accessible. When the - // DB instance is publicly accessible, its DNS endpoint resolves to the private IP - // address from within the DB instance's VPC, and to the public IP address from - // outside of the DB instance's VPC. Access to the DB instance is ultimately - // controlled by the security group it uses, and that public access is not - // permitted if the security group assigned to the DB instance doesn't permit it. - // When the DB instance isn't publicly accessible, it is an internal DB instance - // with a DNS name that resolves to a private IP address. For more information, see - // CreateDBInstance. + // DB instance is publicly accessible, its Domain Name System (DNS) endpoint + // resolves to the private IP address from within the DB instance's virtual private + // cloud (VPC). It resolves to the public IP address from outside of the DB + // instance's VPC. Access to the DB instance is ultimately controlled by the + // security group it uses. That public access is not permitted if the security + // group assigned to the DB instance doesn't permit it. When the DB instance isn't + // publicly accessible, it is an internal DB instance with a DNS name that resolves + // to a private IP address. For more information, see CreateDBInstance. PubliclyAccessible *bool // The prefix of your Amazon S3 bucket. @@ -335,7 +335,11 @@ type RestoreDBInstanceFromS3Input struct { type RestoreDBInstanceFromS3Output struct { // Contains the details of an Amazon RDS DB instance. This data type is used as a - // response element in the DescribeDBInstances action. + // response element in the operations CreateDBInstance, + // CreateDBInstanceReadReplica, DeleteDBInstance, DescribeDBInstances, + // ModifyDBInstance, PromoteReadReplica, RebootDBInstance, + // RestoreDBInstanceFromDBSnapshot, RestoreDBInstanceFromS3, + // RestoreDBInstanceToPointInTime, StartDBInstance, and StopDBInstance. DBInstance *types.DBInstance // Metadata pertaining to the operation's result. diff --git a/service/rds/api_op_RestoreDBInstanceToPointInTime.go b/service/rds/api_op_RestoreDBInstanceToPointInTime.go index 811778a7e9f..102f19fda49 100644 --- a/service/rds/api_op_RestoreDBInstanceToPointInTime.go +++ b/service/rds/api_op_RestoreDBInstanceToPointInTime.go @@ -65,6 +65,14 @@ type RestoreDBInstanceToPointInTimeInput struct { // us-east-1a AvailabilityZone *string + // Specifies where automated backups and manual snapshots are stored for the + // restored DB instance. Possible values are outposts (Amazon Web Services + // Outposts) and region (Amazon Web Services Region). The default is region. For + // more information, see Working with Amazon RDS on Amazon Web Services Outposts + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html) in + // the Amazon RDS User Guide. + BackupTarget *string + // A value that indicates whether to copy all tags from the restored DB instance to // snapshots of the DB instance. By default, tags are not copied. CopyTagsToSnapshot *bool @@ -89,7 +97,7 @@ type RestoreDBInstanceToPointInTimeInput struct { // for RDS Custom. CustomIamInstanceProfile *string - // The compute and memory capacity of the Amazon RDS DB instance, for example, + // The compute and memory capacity of the Amazon RDS DB instance, for example // db.m4.large. Not all DB instance classes are available in all Amazon Web // Services Regions, or for all database engines. For the full list of DB instance // classes, and availability for your engine, see DB Instance Class @@ -125,7 +133,7 @@ type RestoreDBInstanceToPointInTimeInput struct { // A value that indicates whether the DB instance has deletion protection enabled. // The database can't be deleted when deletion protection is enabled. By default, - // deletion protection is disabled. For more information, see Deleting a DB + // deletion protection isn't enabled. For more information, see Deleting a DB // Instance // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html). DeletionProtection *bool @@ -166,7 +174,7 @@ type RestoreDBInstanceToPointInTimeInput struct { // A value that indicates whether to enable mapping of Amazon Web Services Identity // and Access Management (IAM) accounts to database accounts. By default, mapping - // is disabled. This setting doesn't apply to RDS Custom. For more information + // isn't enabled. This setting doesn't apply to RDS Custom. For more information // about IAM database authentication, see IAM Database Authentication for MySQL // and PostgreSQL // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html) @@ -242,14 +250,14 @@ type RestoreDBInstanceToPointInTimeInput struct { ProcessorFeatures []types.ProcessorFeature // A value that indicates whether the DB instance is publicly accessible. When the - // DB instance is publicly accessible, its DNS endpoint resolves to the private IP - // address from within the DB instance's VPC, and to the public IP address from - // outside of the DB instance's VPC. Access to the DB instance is ultimately - // controlled by the security group it uses, and that public access is not - // permitted if the security group assigned to the DB instance doesn't permit it. - // When the DB instance isn't publicly accessible, it is an internal DB instance - // with a DNS name that resolves to a private IP address. For more information, see - // CreateDBInstance. + // DB cluster is publicly accessible, its Domain Name System (DNS) endpoint + // resolves to the private IP address from within the DB cluster's virtual private + // cloud (VPC). It resolves to the public IP address from outside of the DB + // cluster's VPC. Access to the DB cluster is ultimately controlled by the security + // group it uses. That public access isn't permitted if the security group assigned + // to the DB cluster doesn't permit it. When the DB instance isn't publicly + // accessible, it is an internal DB instance with a DNS name that resolves to a + // private IP address. For more information, see CreateDBInstance. PubliclyAccessible *bool // The date and time to restore from. Valid Values: Value must be a time in @@ -316,7 +324,11 @@ type RestoreDBInstanceToPointInTimeInput struct { type RestoreDBInstanceToPointInTimeOutput struct { // Contains the details of an Amazon RDS DB instance. This data type is used as a - // response element in the DescribeDBInstances action. + // response element in the operations CreateDBInstance, + // CreateDBInstanceReadReplica, DeleteDBInstance, DescribeDBInstances, + // ModifyDBInstance, PromoteReadReplica, RebootDBInstance, + // RestoreDBInstanceFromDBSnapshot, RestoreDBInstanceFromS3, + // RestoreDBInstanceToPointInTime, StartDBInstance, and StopDBInstance. DBInstance *types.DBInstance // Metadata pertaining to the operation's result. diff --git a/service/rds/api_op_StartDBCluster.go b/service/rds/api_op_StartDBCluster.go index a65ab91f131..a405d87025a 100644 --- a/service/rds/api_op_StartDBCluster.go +++ b/service/rds/api_op_StartDBCluster.go @@ -46,9 +46,23 @@ type StartDBClusterInput struct { type StartDBClusterOutput struct { - // Contains the details of an Amazon Aurora DB cluster. This data type is used as a - // response element in the DescribeDBClusters, StopDBCluster, and StartDBCluster - // actions. + // Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster. For + // an Amazon Aurora DB cluster, this data type is used as a response element in the + // operations CreateDBCluster, DeleteDBCluster, DescribeDBClusters, + // FailoverDBCluster, ModifyDBCluster, PromoteReadReplicaDBCluster, + // RestoreDBClusterFromS3, RestoreDBClusterFromSnapshot, + // RestoreDBClusterToPointInTime, StartDBCluster, and StopDBCluster. For a Multi-AZ + // DB cluster, this data type is used as a response element in the operations + // CreateDBCluster, DeleteDBCluster, DescribeDBClusters, FailoverDBCluster, + // ModifyDBCluster, RebootDBCluster, RestoreDBClusterFromSnapshot, and + // RestoreDBClusterToPointInTime. For more information on Amazon Aurora DB + // clusters, see What is Amazon Aurora? + // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) + // in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, + // see Multi-AZ deployments with two readable standby DB instances + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) + // in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and + // is subject to change. DBCluster *types.DBCluster // Metadata pertaining to the operation's result. diff --git a/service/rds/api_op_StartDBInstance.go b/service/rds/api_op_StartDBInstance.go index e01cf5ea09f..71e2a8fa7ab 100644 --- a/service/rds/api_op_StartDBInstance.go +++ b/service/rds/api_op_StartDBInstance.go @@ -49,7 +49,11 @@ type StartDBInstanceInput struct { type StartDBInstanceOutput struct { // Contains the details of an Amazon RDS DB instance. This data type is used as a - // response element in the DescribeDBInstances action. + // response element in the operations CreateDBInstance, + // CreateDBInstanceReadReplica, DeleteDBInstance, DescribeDBInstances, + // ModifyDBInstance, PromoteReadReplica, RebootDBInstance, + // RestoreDBInstanceFromDBSnapshot, RestoreDBInstanceFromS3, + // RestoreDBInstanceToPointInTime, StartDBInstance, and StopDBInstance. DBInstance *types.DBInstance // Metadata pertaining to the operation's result. diff --git a/service/rds/api_op_StopDBCluster.go b/service/rds/api_op_StopDBCluster.go index 7725ed8d348..b385f88b60a 100644 --- a/service/rds/api_op_StopDBCluster.go +++ b/service/rds/api_op_StopDBCluster.go @@ -47,9 +47,23 @@ type StopDBClusterInput struct { type StopDBClusterOutput struct { - // Contains the details of an Amazon Aurora DB cluster. This data type is used as a - // response element in the DescribeDBClusters, StopDBCluster, and StartDBCluster - // actions. + // Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster. For + // an Amazon Aurora DB cluster, this data type is used as a response element in the + // operations CreateDBCluster, DeleteDBCluster, DescribeDBClusters, + // FailoverDBCluster, ModifyDBCluster, PromoteReadReplicaDBCluster, + // RestoreDBClusterFromS3, RestoreDBClusterFromSnapshot, + // RestoreDBClusterToPointInTime, StartDBCluster, and StopDBCluster. For a Multi-AZ + // DB cluster, this data type is used as a response element in the operations + // CreateDBCluster, DeleteDBCluster, DescribeDBClusters, FailoverDBCluster, + // ModifyDBCluster, RebootDBCluster, RestoreDBClusterFromSnapshot, and + // RestoreDBClusterToPointInTime. For more information on Amazon Aurora DB + // clusters, see What is Amazon Aurora? + // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) + // in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, + // see Multi-AZ deployments with two readable standby DB instances + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) + // in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and + // is subject to change. DBCluster *types.DBCluster // Metadata pertaining to the operation's result. diff --git a/service/rds/api_op_StopDBInstance.go b/service/rds/api_op_StopDBInstance.go index 8cf8e49da77..c1a36aa51f6 100644 --- a/service/rds/api_op_StopDBInstance.go +++ b/service/rds/api_op_StopDBInstance.go @@ -53,7 +53,11 @@ type StopDBInstanceInput struct { type StopDBInstanceOutput struct { // Contains the details of an Amazon RDS DB instance. This data type is used as a - // response element in the DescribeDBInstances action. + // response element in the operations CreateDBInstance, + // CreateDBInstanceReadReplica, DeleteDBInstance, DescribeDBInstances, + // ModifyDBInstance, PromoteReadReplica, RebootDBInstance, + // RestoreDBInstanceFromDBSnapshot, RestoreDBInstanceFromS3, + // RestoreDBInstanceToPointInTime, StartDBInstance, and StopDBInstance. DBInstance *types.DBInstance // Metadata pertaining to the operation's result. diff --git a/service/rds/deserializers.go b/service/rds/deserializers.go index a4c2117936b..ff5ee48ef2d 100644 --- a/service/rds/deserializers.go +++ b/service/rds/deserializers.go @@ -12859,6 +12859,120 @@ func awsAwsquery_deserializeOpErrorPurchaseReservedDBInstancesOffering(response } } +type awsAwsquery_deserializeOpRebootDBCluster struct { +} + +func (*awsAwsquery_deserializeOpRebootDBCluster) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpRebootDBCluster) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsquery_deserializeOpErrorRebootDBCluster(response, &metadata) + } + output := &RebootDBClusterOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("RebootDBClusterResult") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeOpDocumentRebootDBClusterOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorRebootDBCluster(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("DBClusterNotFoundFault", errorCode): + return awsAwsquery_deserializeErrorDBClusterNotFoundFault(response, errorBody) + + case strings.EqualFold("InvalidDBClusterStateFault", errorCode): + return awsAwsquery_deserializeErrorInvalidDBClusterStateFault(response, errorBody) + + case strings.EqualFold("InvalidDBInstanceState", errorCode): + return awsAwsquery_deserializeErrorInvalidDBInstanceStateFault(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsquery_deserializeOpRebootDBInstance struct { } @@ -23217,6 +23331,22 @@ func awsAwsquery_deserializeDocumentDBCluster(v **types.DBCluster, decoder smith sv.AutomaticRestartTime = ptr.Time(t) } + case strings.EqualFold("AutoMinorVersionUpgrade", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) + } + sv.AutoMinorVersionUpgrade = xtv + } + case strings.EqualFold("AvailabilityZones", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsAwsquery_deserializeDocumentAvailabilityZones(&sv.AvailabilityZones, nodeDecoder); err != nil { @@ -23411,6 +23541,19 @@ func awsAwsquery_deserializeDocumentDBCluster(v **types.DBCluster, decoder smith sv.DBClusterIdentifier = ptr.String(xtv) } + case strings.EqualFold("DBClusterInstanceClass", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DBClusterInstanceClass = ptr.String(xtv) + } + case strings.EqualFold("DBClusterMembers", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsAwsquery_deserializeDocumentDBClusterMemberList(&sv.DBClusterMembers, nodeDecoder); err != nil { @@ -23650,6 +23793,23 @@ func awsAwsquery_deserializeDocumentDBCluster(v **types.DBCluster, decoder smith sv.IAMDatabaseAuthenticationEnabled = ptr.Bool(xtv) } + case strings.EqualFold("Iops", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Iops = ptr.Int32(int32(i64)) + } + case strings.EqualFold("KmsKeyId", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -23693,6 +23853,36 @@ func awsAwsquery_deserializeDocumentDBCluster(v **types.DBCluster, decoder smith sv.MasterUsername = ptr.String(xtv) } + case strings.EqualFold("MonitoringInterval", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MonitoringInterval = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("MonitoringRoleArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.MonitoringRoleArn = ptr.String(xtv) + } + case strings.EqualFold("MultiAZ", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -23728,6 +23918,52 @@ func awsAwsquery_deserializeDocumentDBCluster(v **types.DBCluster, decoder smith sv.PercentProgress = ptr.String(xtv) } + case strings.EqualFold("PerformanceInsightsEnabled", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected BooleanOptional to be of type *bool, got %T instead", val) + } + sv.PerformanceInsightsEnabled = ptr.Bool(xtv) + } + + case strings.EqualFold("PerformanceInsightsKMSKeyId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PerformanceInsightsKMSKeyId = ptr.String(xtv) + } + + case strings.EqualFold("PerformanceInsightsRetentionPeriod", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.PerformanceInsightsRetentionPeriod = ptr.Int32(int32(i64)) + } + case strings.EqualFold("Port", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -23771,6 +24007,22 @@ func awsAwsquery_deserializeDocumentDBCluster(v **types.DBCluster, decoder smith sv.PreferredMaintenanceWindow = ptr.String(xtv) } + case strings.EqualFold("PubliclyAccessible", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected BooleanOptional to be of type *bool, got %T instead", val) + } + sv.PubliclyAccessible = ptr.Bool(xtv) + } + case strings.EqualFold("ReaderEndpoint", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -23838,6 +24090,19 @@ func awsAwsquery_deserializeDocumentDBCluster(v **types.DBCluster, decoder smith sv.StorageEncrypted = xtv } + case strings.EqualFold("StorageType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.StorageType = ptr.String(xtv) + } + case strings.EqualFold("TagList", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsAwsquery_deserializeDocumentTagList(&sv.TagList, nodeDecoder); err != nil { @@ -26739,6 +27004,19 @@ func awsAwsquery_deserializeDocumentDBInstance(v **types.DBInstance, decoder smi sv.BackupRetentionPeriod = int32(i64) } + case strings.EqualFold("BackupTarget", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.BackupTarget = ptr.String(xtv) + } + case strings.EqualFold("CACertificateIdentifier", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -27599,6 +27877,19 @@ func awsAwsquery_deserializeDocumentDBInstanceAutomatedBackup(v **types.DBInstan sv.BackupRetentionPeriod = ptr.Int32(int32(i64)) } + case strings.EqualFold("BackupTarget", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.BackupTarget = ptr.String(xtv) + } + case strings.EqualFold("DBInstanceArn", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -31334,6 +31625,19 @@ func awsAwsquery_deserializeDocumentDBSnapshot(v **types.DBSnapshot, decoder smi sv.SnapshotCreateTime = ptr.Time(t) } + case strings.EqualFold("SnapshotTarget", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SnapshotTarget = ptr.String(xtv) + } + case strings.EqualFold("SnapshotType", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -39257,6 +39561,22 @@ func awsAwsquery_deserializeDocumentOrderableDBInstanceOption(v **types.Orderabl return err } + case strings.EqualFold("SupportsClusters", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) + } + sv.SupportsClusters = xtv + } + case strings.EqualFold("SupportsEnhancedMonitoring", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -51329,6 +51649,48 @@ func awsAwsquery_deserializeOpDocumentPurchaseReservedDBInstancesOfferingOutput( return nil } +func awsAwsquery_deserializeOpDocumentRebootDBClusterOutput(v **RebootDBClusterOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *RebootDBClusterOutput + if *v == nil { + sv = &RebootDBClusterOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("DBCluster", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentDBCluster(&sv.DBCluster, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeOpDocumentRebootDBInstanceOutput(v **RebootDBInstanceOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/rds/generated.json b/service/rds/generated.json index 72b8c2185c1..8ca1ea2b638 100644 --- a/service/rds/generated.json +++ b/service/rds/generated.json @@ -128,6 +128,7 @@ "api_op_PromoteReadReplica.go", "api_op_PromoteReadReplicaDBCluster.go", "api_op_PurchaseReservedDBInstancesOffering.go", + "api_op_RebootDBCluster.go", "api_op_RebootDBInstance.go", "api_op_RegisterDBProxyTargets.go", "api_op_RemoveFromGlobalCluster.go", diff --git a/service/rds/serializers.go b/service/rds/serializers.go index df3d2c3165a..c2eed6c6017 100644 --- a/service/rds/serializers.go +++ b/service/rds/serializers.go @@ -7372,6 +7372,70 @@ func (m *awsAwsquery_serializeOpPurchaseReservedDBInstancesOffering) HandleSeria return next.HandleSerialize(ctx, in) } +type awsAwsquery_serializeOpRebootDBCluster struct { +} + +func (*awsAwsquery_serializeOpRebootDBCluster) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpRebootDBCluster) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*RebootDBClusterInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("RebootDBCluster") + body.Key("Version").String("2014-10-31") + + if err := awsAwsquery_serializeOpDocumentRebootDBClusterInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsquery_serializeOpRebootDBInstance struct { } @@ -10062,6 +10126,16 @@ func awsAwsquery_serializeOpDocumentCreateDBClusterInput(v *CreateDBClusterInput object := value.Object() _ = object + if v.AllocatedStorage != nil { + objectKey := object.Key("AllocatedStorage") + objectKey.Integer(*v.AllocatedStorage) + } + + if v.AutoMinorVersionUpgrade != nil { + objectKey := object.Key("AutoMinorVersionUpgrade") + objectKey.Boolean(*v.AutoMinorVersionUpgrade) + } + if v.AvailabilityZones != nil { objectKey := object.Key("AvailabilityZones") if err := awsAwsquery_serializeDocumentAvailabilityZones(v.AvailabilityZones, objectKey); err != nil { @@ -10099,6 +10173,11 @@ func awsAwsquery_serializeOpDocumentCreateDBClusterInput(v *CreateDBClusterInput objectKey.String(*v.DBClusterIdentifier) } + if v.DBClusterInstanceClass != nil { + objectKey := object.Key("DBClusterInstanceClass") + objectKey.String(*v.DBClusterInstanceClass) + } + if v.DBClusterParameterGroupName != nil { objectKey := object.Key("DBClusterParameterGroupName") objectKey.String(*v.DBClusterParameterGroupName) @@ -10151,6 +10230,11 @@ func awsAwsquery_serializeOpDocumentCreateDBClusterInput(v *CreateDBClusterInput objectKey.Boolean(*v.EnableIAMDatabaseAuthentication) } + if v.EnablePerformanceInsights != nil { + objectKey := object.Key("EnablePerformanceInsights") + objectKey.Boolean(*v.EnablePerformanceInsights) + } + if v.Engine != nil { objectKey := object.Key("Engine") objectKey.String(*v.Engine) @@ -10171,6 +10255,11 @@ func awsAwsquery_serializeOpDocumentCreateDBClusterInput(v *CreateDBClusterInput objectKey.String(*v.GlobalClusterIdentifier) } + if v.Iops != nil { + objectKey := object.Key("Iops") + objectKey.Integer(*v.Iops) + } + if v.KmsKeyId != nil { objectKey := object.Key("KmsKeyId") objectKey.String(*v.KmsKeyId) @@ -10186,11 +10275,31 @@ func awsAwsquery_serializeOpDocumentCreateDBClusterInput(v *CreateDBClusterInput objectKey.String(*v.MasterUserPassword) } + if v.MonitoringInterval != nil { + objectKey := object.Key("MonitoringInterval") + objectKey.Integer(*v.MonitoringInterval) + } + + if v.MonitoringRoleArn != nil { + objectKey := object.Key("MonitoringRoleArn") + objectKey.String(*v.MonitoringRoleArn) + } + if v.OptionGroupName != nil { objectKey := object.Key("OptionGroupName") objectKey.String(*v.OptionGroupName) } + if v.PerformanceInsightsKMSKeyId != nil { + objectKey := object.Key("PerformanceInsightsKMSKeyId") + objectKey.String(*v.PerformanceInsightsKMSKeyId) + } + + if v.PerformanceInsightsRetentionPeriod != nil { + objectKey := object.Key("PerformanceInsightsRetentionPeriod") + objectKey.Integer(*v.PerformanceInsightsRetentionPeriod) + } + if v.Port != nil { objectKey := object.Key("Port") objectKey.Integer(*v.Port) @@ -10211,6 +10320,11 @@ func awsAwsquery_serializeOpDocumentCreateDBClusterInput(v *CreateDBClusterInput objectKey.String(*v.PreSignedUrl) } + if v.PubliclyAccessible != nil { + objectKey := object.Key("PubliclyAccessible") + objectKey.Boolean(*v.PubliclyAccessible) + } + if v.ReplicationSourceIdentifier != nil { objectKey := object.Key("ReplicationSourceIdentifier") objectKey.String(*v.ReplicationSourceIdentifier) @@ -10228,6 +10342,11 @@ func awsAwsquery_serializeOpDocumentCreateDBClusterInput(v *CreateDBClusterInput objectKey.Boolean(*v.StorageEncrypted) } + if v.StorageType != nil { + objectKey := object.Key("StorageType") + objectKey.String(*v.StorageType) + } + if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil { @@ -10322,6 +10441,11 @@ func awsAwsquery_serializeOpDocumentCreateDBInstanceInput(v *CreateDBInstanceInp objectKey.Integer(*v.BackupRetentionPeriod) } + if v.BackupTarget != nil { + objectKey := object.Key("BackupTarget") + objectKey.String(*v.BackupTarget) + } + if v.CharacterSetName != nil { objectKey := object.Key("CharacterSetName") objectKey.String(*v.CharacterSetName) @@ -12934,6 +13058,11 @@ func awsAwsquery_serializeOpDocumentModifyDBClusterInput(v *ModifyDBClusterInput object := value.Object() _ = object + if v.AllocatedStorage != nil { + objectKey := object.Key("AllocatedStorage") + objectKey.Integer(*v.AllocatedStorage) + } + if v.AllowMajorVersionUpgrade { objectKey := object.Key("AllowMajorVersionUpgrade") objectKey.Boolean(v.AllowMajorVersionUpgrade) @@ -12944,6 +13073,11 @@ func awsAwsquery_serializeOpDocumentModifyDBClusterInput(v *ModifyDBClusterInput objectKey.Boolean(v.ApplyImmediately) } + if v.AutoMinorVersionUpgrade != nil { + objectKey := object.Key("AutoMinorVersionUpgrade") + objectKey.Boolean(*v.AutoMinorVersionUpgrade) + } + if v.BacktrackWindow != nil { objectKey := object.Key("BacktrackWindow") objectKey.Long(*v.BacktrackWindow) @@ -12971,6 +13105,11 @@ func awsAwsquery_serializeOpDocumentModifyDBClusterInput(v *ModifyDBClusterInput objectKey.String(*v.DBClusterIdentifier) } + if v.DBClusterInstanceClass != nil { + objectKey := object.Key("DBClusterInstanceClass") + objectKey.String(*v.DBClusterInstanceClass) + } + if v.DBClusterParameterGroupName != nil { objectKey := object.Key("DBClusterParameterGroupName") objectKey.String(*v.DBClusterParameterGroupName) @@ -13011,16 +13150,36 @@ func awsAwsquery_serializeOpDocumentModifyDBClusterInput(v *ModifyDBClusterInput objectKey.Boolean(*v.EnableIAMDatabaseAuthentication) } + if v.EnablePerformanceInsights != nil { + objectKey := object.Key("EnablePerformanceInsights") + objectKey.Boolean(*v.EnablePerformanceInsights) + } + if v.EngineVersion != nil { objectKey := object.Key("EngineVersion") objectKey.String(*v.EngineVersion) } + if v.Iops != nil { + objectKey := object.Key("Iops") + objectKey.Integer(*v.Iops) + } + if v.MasterUserPassword != nil { objectKey := object.Key("MasterUserPassword") objectKey.String(*v.MasterUserPassword) } + if v.MonitoringInterval != nil { + objectKey := object.Key("MonitoringInterval") + objectKey.Integer(*v.MonitoringInterval) + } + + if v.MonitoringRoleArn != nil { + objectKey := object.Key("MonitoringRoleArn") + objectKey.String(*v.MonitoringRoleArn) + } + if v.NewDBClusterIdentifier != nil { objectKey := object.Key("NewDBClusterIdentifier") objectKey.String(*v.NewDBClusterIdentifier) @@ -13031,6 +13190,16 @@ func awsAwsquery_serializeOpDocumentModifyDBClusterInput(v *ModifyDBClusterInput objectKey.String(*v.OptionGroupName) } + if v.PerformanceInsightsKMSKeyId != nil { + objectKey := object.Key("PerformanceInsightsKMSKeyId") + objectKey.String(*v.PerformanceInsightsKMSKeyId) + } + + if v.PerformanceInsightsRetentionPeriod != nil { + objectKey := object.Key("PerformanceInsightsRetentionPeriod") + objectKey.Integer(*v.PerformanceInsightsRetentionPeriod) + } + if v.Port != nil { objectKey := object.Key("Port") objectKey.Integer(*v.Port) @@ -13053,6 +13222,11 @@ func awsAwsquery_serializeOpDocumentModifyDBClusterInput(v *ModifyDBClusterInput } } + if v.StorageType != nil { + objectKey := object.Key("StorageType") + objectKey.String(*v.StorageType) + } + if v.VpcSecurityGroupIds != nil { objectKey := object.Key("VpcSecurityGroupIds") if err := awsAwsquery_serializeDocumentVpcSecurityGroupIdList(v.VpcSecurityGroupIds, objectKey); err != nil { @@ -13723,6 +13897,18 @@ func awsAwsquery_serializeOpDocumentPurchaseReservedDBInstancesOfferingInput(v * return nil } +func awsAwsquery_serializeOpDocumentRebootDBClusterInput(v *RebootDBClusterInput, value query.Value) error { + object := value.Object() + _ = object + + if v.DBClusterIdentifier != nil { + objectKey := object.Key("DBClusterIdentifier") + objectKey.String(*v.DBClusterIdentifier) + } + + return nil +} + func awsAwsquery_serializeOpDocumentRebootDBInstanceInput(v *RebootDBInstanceInput, value query.Value) error { object := value.Object() _ = object @@ -14117,6 +14303,11 @@ func awsAwsquery_serializeOpDocumentRestoreDBClusterFromSnapshotInput(v *Restore objectKey.String(*v.DBClusterIdentifier) } + if v.DBClusterInstanceClass != nil { + objectKey := object.Key("DBClusterInstanceClass") + objectKey.String(*v.DBClusterInstanceClass) + } + if v.DBClusterParameterGroupName != nil { objectKey := object.Key("DBClusterParameterGroupName") objectKey.String(*v.DBClusterParameterGroupName) @@ -14169,6 +14360,11 @@ func awsAwsquery_serializeOpDocumentRestoreDBClusterFromSnapshotInput(v *Restore objectKey.String(*v.EngineVersion) } + if v.Iops != nil { + objectKey := object.Key("Iops") + objectKey.Integer(*v.Iops) + } + if v.KmsKeyId != nil { objectKey := object.Key("KmsKeyId") objectKey.String(*v.KmsKeyId) @@ -14184,6 +14380,11 @@ func awsAwsquery_serializeOpDocumentRestoreDBClusterFromSnapshotInput(v *Restore objectKey.Integer(*v.Port) } + if v.PubliclyAccessible != nil { + objectKey := object.Key("PubliclyAccessible") + objectKey.Boolean(*v.PubliclyAccessible) + } + if v.ScalingConfiguration != nil { objectKey := object.Key("ScalingConfiguration") if err := awsAwsquery_serializeDocumentScalingConfiguration(v.ScalingConfiguration, objectKey); err != nil { @@ -14196,6 +14397,11 @@ func awsAwsquery_serializeOpDocumentRestoreDBClusterFromSnapshotInput(v *Restore objectKey.String(*v.SnapshotIdentifier) } + if v.StorageType != nil { + objectKey := object.Key("StorageType") + objectKey.String(*v.StorageType) + } + if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil { @@ -14232,6 +14438,11 @@ func awsAwsquery_serializeOpDocumentRestoreDBClusterToPointInTimeInput(v *Restor objectKey.String(*v.DBClusterIdentifier) } + if v.DBClusterInstanceClass != nil { + objectKey := object.Key("DBClusterInstanceClass") + objectKey.String(*v.DBClusterInstanceClass) + } + if v.DBClusterParameterGroupName != nil { objectKey := object.Key("DBClusterParameterGroupName") objectKey.String(*v.DBClusterParameterGroupName) @@ -14274,6 +14485,11 @@ func awsAwsquery_serializeOpDocumentRestoreDBClusterToPointInTimeInput(v *Restor objectKey.String(*v.EngineMode) } + if v.Iops != nil { + objectKey := object.Key("Iops") + objectKey.Integer(*v.Iops) + } + if v.KmsKeyId != nil { objectKey := object.Key("KmsKeyId") objectKey.String(*v.KmsKeyId) @@ -14289,6 +14505,11 @@ func awsAwsquery_serializeOpDocumentRestoreDBClusterToPointInTimeInput(v *Restor objectKey.Integer(*v.Port) } + if v.PubliclyAccessible != nil { + objectKey := object.Key("PubliclyAccessible") + objectKey.Boolean(*v.PubliclyAccessible) + } + if v.RestoreToTime != nil { objectKey := object.Key("RestoreToTime") objectKey.String(smithytime.FormatDateTime(*v.RestoreToTime)) @@ -14311,6 +14532,11 @@ func awsAwsquery_serializeOpDocumentRestoreDBClusterToPointInTimeInput(v *Restor objectKey.String(*v.SourceDBClusterIdentifier) } + if v.StorageType != nil { + objectKey := object.Key("StorageType") + objectKey.String(*v.StorageType) + } + if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil { @@ -14347,6 +14573,11 @@ func awsAwsquery_serializeOpDocumentRestoreDBInstanceFromDBSnapshotInput(v *Rest objectKey.String(*v.AvailabilityZone) } + if v.BackupTarget != nil { + objectKey := object.Key("BackupTarget") + objectKey.String(*v.BackupTarget) + } + if v.CopyTagsToSnapshot != nil { objectKey := object.Key("CopyTagsToSnapshot") objectKey.Boolean(*v.CopyTagsToSnapshot) @@ -14749,6 +14980,11 @@ func awsAwsquery_serializeOpDocumentRestoreDBInstanceToPointInTimeInput(v *Resto objectKey.String(*v.AvailabilityZone) } + if v.BackupTarget != nil { + objectKey := object.Key("BackupTarget") + objectKey.String(*v.BackupTarget) + } + if v.CopyTagsToSnapshot != nil { objectKey := object.Key("CopyTagsToSnapshot") objectKey.Boolean(*v.CopyTagsToSnapshot) diff --git a/service/rds/types/types.go b/service/rds/types/types.go index 51cdbbac24c..df980875acd 100644 --- a/service/rds/types/types.go +++ b/service/rds/types/types.go @@ -336,9 +336,23 @@ type CustomAvailabilityZone struct { noSmithyDocumentSerde } -// Contains the details of an Amazon Aurora DB cluster. This data type is used as a -// response element in the DescribeDBClusters, StopDBCluster, and StartDBCluster -// actions. +// Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster. For +// an Amazon Aurora DB cluster, this data type is used as a response element in the +// operations CreateDBCluster, DeleteDBCluster, DescribeDBClusters, +// FailoverDBCluster, ModifyDBCluster, PromoteReadReplicaDBCluster, +// RestoreDBClusterFromS3, RestoreDBClusterFromSnapshot, +// RestoreDBClusterToPointInTime, StartDBCluster, and StopDBCluster. For a Multi-AZ +// DB cluster, this data type is used as a response element in the operations +// CreateDBCluster, DeleteDBCluster, DescribeDBClusters, FailoverDBCluster, +// ModifyDBCluster, RebootDBCluster, RestoreDBClusterFromSnapshot, and +// RestoreDBClusterToPointInTime. For more information on Amazon Aurora DB +// clusters, see What is Amazon Aurora? +// (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) +// in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, +// see Multi-AZ deployments with two readable standby DB instances +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) +// in the Amazon RDS User Guide. The Multi-AZ DB clusters feature is in preview and +// is subject to change. type DBCluster struct { // The name of the Amazon Kinesis data stream used for the database activity @@ -370,6 +384,10 @@ type DBCluster struct { // Services on your behalf. AssociatedRoles []DBClusterRole + // A value that indicates that minor version patches are applied automatically. + // This setting is only for non-Aurora Multi-AZ DB clusters. + AutoMinorVersionUpgrade bool + // The time when a stopped DB cluster is restarted automatically. AutomaticRestartTime *time.Time @@ -423,6 +441,10 @@ type DBCluster struct { // key that identifies a DB cluster. DBClusterIdentifier *string + // The name of the compute and memory capacity class of the DB instance. This + // setting is only for non-Aurora Multi-AZ DB clusters. + DBClusterInstanceClass *string + // Provides the list of instances that make up the DB cluster. DBClusterMembers []DBClusterMember @@ -509,6 +531,10 @@ type DBCluster struct { // Access Management (IAM) accounts to database accounts is enabled. IAMDatabaseAuthenticationEnabled *bool + // The Provisioned IOPS (I/O operations per second) value. This setting is only for + // non-Aurora Multi-AZ DB clusters. + Iops *int32 + // If StorageEncrypted is enabled, the Amazon Web Services KMS key identifier for // the encrypted DB cluster. The Amazon Web Services KMS key identifier is the key // ARN, key ID, alias ARN, or alias name for the KMS key. @@ -521,6 +547,16 @@ type DBCluster struct { // Contains the master username for the DB cluster. MasterUsername *string + // The interval, in seconds, between points when Enhanced Monitoring metrics are + // collected for the DB cluster. This setting is only for non-Aurora Multi-AZ DB + // clusters. + MonitoringInterval *int32 + + // The ARN for the IAM role that permits RDS to send Enhanced Monitoring metrics to + // Amazon CloudWatch Logs. This setting is only for non-Aurora Multi-AZ DB + // clusters. + MonitoringRoleArn *string + // Specifies whether the DB cluster has instances in multiple Availability Zones. MultiAZ *bool @@ -532,6 +568,21 @@ type DBCluster struct { // Specifies the progress of the operation as a percentage. PercentProgress *string + // True if Performance Insights is enabled for the DB cluster, and otherwise false. + // This setting is only for non-Aurora Multi-AZ DB clusters. + PerformanceInsightsEnabled *bool + + // The Amazon Web Services KMS key identifier for encryption of Performance + // Insights data. The Amazon Web Services KMS key identifier is the key ARN, key + // ID, alias ARN, or alias name for the KMS key. This setting is only for + // non-Aurora Multi-AZ DB clusters. + PerformanceInsightsKMSKeyId *string + + // The amount of time, in days, to retain Performance Insights data. Valid values + // are 7 or 731 (2 years). This setting is only for non-Aurora Multi-AZ DB + // clusters. + PerformanceInsightsRetentionPeriod *int32 + // Specifies the port that the database engine is listening on. Port *int32 @@ -543,6 +594,18 @@ type DBCluster struct { // Universal Coordinated Time (UTC). PreferredMaintenanceWindow *string + // Specifies the accessibility options for the DB instance. When the DB instance is + // publicly accessible, its Domain Name System (DNS) endpoint resolves to the + // private IP address from within the DB instance's virtual private cloud (VPC). It + // resolves to the public IP address from outside of the DB instance's VPC. Access + // to the DB instance is ultimately controlled by the security group it uses. That + // public access is not permitted if the security group assigned to the DB instance + // doesn't permit it. When the DB instance isn't publicly accessible, it is an + // internal DB instance with a DNS name that resolves to a private IP address. For + // more information, see CreateDBInstance. This setting is only for non-Aurora + // Multi-AZ DB clusters. + PubliclyAccessible *bool + // Contains one or more identifiers of the read replicas associated with this DB // cluster. ReadReplicaIdentifiers []string @@ -574,6 +637,10 @@ type DBCluster struct { // Specifies whether the DB cluster is encrypted. StorageEncrypted bool + // The storage type associated with DB instance. This setting is only for + // non-Aurora Multi-AZ DB clusters. + StorageType *string + // A list of tags. For more information, see Tagging Amazon RDS Resources // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) in // the Amazon RDS User Guide. @@ -995,7 +1062,11 @@ type DBEngineVersion struct { } // Contains the details of an Amazon RDS DB instance. This data type is used as a -// response element in the DescribeDBInstances action. +// response element in the operations CreateDBInstance, +// CreateDBInstanceReadReplica, DeleteDBInstance, DescribeDBInstances, +// ModifyDBInstance, PromoteReadReplica, RebootDBInstance, +// RestoreDBInstanceFromDBSnapshot, RestoreDBInstanceFromS3, +// RestoreDBInstanceToPointInTime, StartDBInstance, and StopDBInstance. type DBInstance struct { // Indicates whether engine-native audit fields are included in the database @@ -1048,6 +1119,10 @@ type DBInstance struct { // Specifies the number of days for which automatic DB snapshots are retained. BackupRetentionPeriod int32 + // Specifies where automated backups and manual snapshots are stored: Amazon Web + // Services Outposts or the Amazon Web Services Region. + BackupTarget *string + // The identifier of the CA certificate for this DB instance. CACertificateIdentifier *string @@ -1276,21 +1351,22 @@ type DBInstance struct { // in the Amazon Aurora User Guide. PromotionTier *int32 - // Specifies the accessibility options for the DB instance. When the DB instance is - // publicly accessible, its DNS endpoint resolves to the private IP address from - // within the DB instance's VPC, and to the public IP address from outside of the - // DB instance's VPC. Access to the DB instance is ultimately controlled by the - // security group it uses, and that public access is not permitted if the security - // group assigned to the DB instance doesn't permit it. When the DB instance isn't - // publicly accessible, it is an internal DB instance with a DNS name that resolves - // to a private IP address. For more information, see CreateDBInstance. + // Specifies the accessibility options for the DB instance. When the DB cluster is + // publicly accessible, its Domain Name System (DNS) endpoint resolves to the + // private IP address from within the DB cluster's virtual private cloud (VPC). It + // resolves to the public IP address from outside of the DB cluster's VPC. Access + // to the DB cluster is ultimately controlled by the security group it uses. That + // public access isn't permitted if the security group assigned to the DB cluster + // doesn't permit it. When the DB instance isn't publicly accessible, it is an + // internal DB instance with a DNS name that resolves to a private IP address. For + // more information, see CreateDBInstance. PubliclyAccessible bool // Contains one or more identifiers of Aurora DB clusters to which the RDS DB // instance is replicated as a read replica. For example, when you create an Aurora - // read replica of an RDS MySQL DB instance, the Aurora MySQL DB cluster for the - // Aurora read replica is shown. This output does not contain information about - // cross region Aurora read replicas. Currently, each RDS DB instance can have only + // read replica of an RDS for MySQL DB instance, the Aurora MySQL DB cluster for + // the Aurora read replica is shown. This output doesn't contain information about + // cross-Region Aurora read replicas. Currently, each RDS DB instance can have only // one Aurora read replica. ReadReplicaDBClusterIdentifiers []string @@ -1365,6 +1441,10 @@ type DBInstanceAutomatedBackup struct { // The retention period for the automated backups. BackupRetentionPeriod *int32 + // Specifies where automated backups are stored: Amazon Web Services Outposts or + // the Amazon Web Services Region. + BackupTarget *string + // The Amazon Resource Name (ARN) for the automated backups. DBInstanceArn *string @@ -1898,6 +1978,10 @@ type DBSnapshot struct { // Changes for the copy when the snapshot is copied. SnapshotCreateTime *time.Time + // Specifies where manual snapshots are stored: Amazon Web Services Outposts or the + // Amazon Web Services Region. + SnapshotTarget *string + // Provides the type of the DB snapshot. SnapshotType *string @@ -2804,6 +2888,14 @@ type OrderableDBInstanceOption struct { // A list of the supported DB engine modes. SupportedEngineModes []string + // Whether DB instances can be configured as a Multi-AZ DB cluster. The Multi-AZ DB + // clusters feature is in preview and is subject to change. For more information on + // Multi-AZ DB clusters, see Multi-AZ deployments with two readable standby DB + // instances + // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) + // in the Amazon RDS User Guide. + SupportsClusters bool + // Indicates whether a DB instance supports Enhanced Monitoring at intervals from 1 // to 60 seconds. SupportsEnhancedMonitoring bool diff --git a/service/rds/validators.go b/service/rds/validators.go index caed19089b2..b0b380c51c9 100644 --- a/service/rds/validators.go +++ b/service/rds/validators.go @@ -2210,6 +2210,26 @@ func (m *validateOpPurchaseReservedDBInstancesOffering) HandleInitialize(ctx con return next.HandleInitialize(ctx, in) } +type validateOpRebootDBCluster struct { +} + +func (*validateOpRebootDBCluster) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRebootDBCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RebootDBClusterInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRebootDBClusterInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpRebootDBInstance struct { } @@ -3130,6 +3150,10 @@ func addOpPurchaseReservedDBInstancesOfferingValidationMiddleware(stack *middlew return stack.Initialize.Add(&validateOpPurchaseReservedDBInstancesOffering{}, middleware.After) } +func addOpRebootDBClusterValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRebootDBCluster{}, middleware.After) +} + func addOpRebootDBInstanceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRebootDBInstance{}, middleware.After) } @@ -5232,6 +5256,21 @@ func validateOpPurchaseReservedDBInstancesOfferingInput(v *PurchaseReservedDBIns } } +func validateOpRebootDBClusterInput(v *RebootDBClusterInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RebootDBClusterInput"} + if v.DBClusterIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpRebootDBInstanceInput(v *RebootDBInstanceInput) error { if v == nil { return nil diff --git a/service/redshift/api_op_DescribeDataShares.go b/service/redshift/api_op_DescribeDataShares.go index 137358db2a2..11692dacd76 100644 --- a/service/redshift/api_op_DescribeDataShares.go +++ b/service/redshift/api_op_DescribeDataShares.go @@ -4,6 +4,7 @@ package redshift import ( "context" + "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/redshift/types" @@ -129,6 +130,96 @@ func (c *Client) addOperationDescribeDataSharesMiddlewares(stack *middleware.Sta return nil } +// DescribeDataSharesAPIClient is a client that implements the DescribeDataShares +// operation. +type DescribeDataSharesAPIClient interface { + DescribeDataShares(context.Context, *DescribeDataSharesInput, ...func(*Options)) (*DescribeDataSharesOutput, error) +} + +var _ DescribeDataSharesAPIClient = (*Client)(nil) + +// DescribeDataSharesPaginatorOptions is the paginator options for +// DescribeDataShares +type DescribeDataSharesPaginatorOptions struct { + // The maximum number of response records to return in each call. If the number of + // remaining response records exceeds the specified MaxRecords value, a value is + // returned in a marker field of the response. You can retrieve the next set of + // records by retrying the command with the returned marker value. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeDataSharesPaginator is a paginator for DescribeDataShares +type DescribeDataSharesPaginator struct { + options DescribeDataSharesPaginatorOptions + client DescribeDataSharesAPIClient + params *DescribeDataSharesInput + nextToken *string + firstPage bool +} + +// NewDescribeDataSharesPaginator returns a new DescribeDataSharesPaginator +func NewDescribeDataSharesPaginator(client DescribeDataSharesAPIClient, params *DescribeDataSharesInput, optFns ...func(*DescribeDataSharesPaginatorOptions)) *DescribeDataSharesPaginator { + if params == nil { + params = &DescribeDataSharesInput{} + } + + options := DescribeDataSharesPaginatorOptions{} + if params.MaxRecords != nil { + options.Limit = *params.MaxRecords + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeDataSharesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeDataSharesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribeDataShares page. +func (p *DescribeDataSharesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDataSharesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxRecords = limit + + result, err := p.client.DescribeDataShares(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + func newServiceMetadataMiddleware_opDescribeDataShares(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeDataSharesForConsumer.go b/service/redshift/api_op_DescribeDataSharesForConsumer.go index 562b56dc055..dc9d94fa635 100644 --- a/service/redshift/api_op_DescribeDataSharesForConsumer.go +++ b/service/redshift/api_op_DescribeDataSharesForConsumer.go @@ -4,6 +4,7 @@ package redshift import ( "context" + "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/redshift/types" @@ -135,6 +136,98 @@ func (c *Client) addOperationDescribeDataSharesForConsumerMiddlewares(stack *mid return nil } +// DescribeDataSharesForConsumerAPIClient is a client that implements the +// DescribeDataSharesForConsumer operation. +type DescribeDataSharesForConsumerAPIClient interface { + DescribeDataSharesForConsumer(context.Context, *DescribeDataSharesForConsumerInput, ...func(*Options)) (*DescribeDataSharesForConsumerOutput, error) +} + +var _ DescribeDataSharesForConsumerAPIClient = (*Client)(nil) + +// DescribeDataSharesForConsumerPaginatorOptions is the paginator options for +// DescribeDataSharesForConsumer +type DescribeDataSharesForConsumerPaginatorOptions struct { + // The maximum number of response records to return in each call. If the number of + // remaining response records exceeds the specified MaxRecords value, a value is + // returned in a marker field of the response. You can retrieve the next set of + // records by retrying the command with the returned marker value. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeDataSharesForConsumerPaginator is a paginator for +// DescribeDataSharesForConsumer +type DescribeDataSharesForConsumerPaginator struct { + options DescribeDataSharesForConsumerPaginatorOptions + client DescribeDataSharesForConsumerAPIClient + params *DescribeDataSharesForConsumerInput + nextToken *string + firstPage bool +} + +// NewDescribeDataSharesForConsumerPaginator returns a new +// DescribeDataSharesForConsumerPaginator +func NewDescribeDataSharesForConsumerPaginator(client DescribeDataSharesForConsumerAPIClient, params *DescribeDataSharesForConsumerInput, optFns ...func(*DescribeDataSharesForConsumerPaginatorOptions)) *DescribeDataSharesForConsumerPaginator { + if params == nil { + params = &DescribeDataSharesForConsumerInput{} + } + + options := DescribeDataSharesForConsumerPaginatorOptions{} + if params.MaxRecords != nil { + options.Limit = *params.MaxRecords + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeDataSharesForConsumerPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeDataSharesForConsumerPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribeDataSharesForConsumer page. +func (p *DescribeDataSharesForConsumerPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDataSharesForConsumerOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxRecords = limit + + result, err := p.client.DescribeDataSharesForConsumer(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + func newServiceMetadataMiddleware_opDescribeDataSharesForConsumer(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeDataSharesForProducer.go b/service/redshift/api_op_DescribeDataSharesForProducer.go index c77c29c4dc6..7375397bde4 100644 --- a/service/redshift/api_op_DescribeDataSharesForProducer.go +++ b/service/redshift/api_op_DescribeDataSharesForProducer.go @@ -4,6 +4,7 @@ package redshift import ( "context" + "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/redshift/types" @@ -135,6 +136,98 @@ func (c *Client) addOperationDescribeDataSharesForProducerMiddlewares(stack *mid return nil } +// DescribeDataSharesForProducerAPIClient is a client that implements the +// DescribeDataSharesForProducer operation. +type DescribeDataSharesForProducerAPIClient interface { + DescribeDataSharesForProducer(context.Context, *DescribeDataSharesForProducerInput, ...func(*Options)) (*DescribeDataSharesForProducerOutput, error) +} + +var _ DescribeDataSharesForProducerAPIClient = (*Client)(nil) + +// DescribeDataSharesForProducerPaginatorOptions is the paginator options for +// DescribeDataSharesForProducer +type DescribeDataSharesForProducerPaginatorOptions struct { + // The maximum number of response records to return in each call. If the number of + // remaining response records exceeds the specified MaxRecords value, a value is + // returned in a marker field of the response. You can retrieve the next set of + // records by retrying the command with the returned marker value. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeDataSharesForProducerPaginator is a paginator for +// DescribeDataSharesForProducer +type DescribeDataSharesForProducerPaginator struct { + options DescribeDataSharesForProducerPaginatorOptions + client DescribeDataSharesForProducerAPIClient + params *DescribeDataSharesForProducerInput + nextToken *string + firstPage bool +} + +// NewDescribeDataSharesForProducerPaginator returns a new +// DescribeDataSharesForProducerPaginator +func NewDescribeDataSharesForProducerPaginator(client DescribeDataSharesForProducerAPIClient, params *DescribeDataSharesForProducerInput, optFns ...func(*DescribeDataSharesForProducerPaginatorOptions)) *DescribeDataSharesForProducerPaginator { + if params == nil { + params = &DescribeDataSharesForProducerInput{} + } + + options := DescribeDataSharesForProducerPaginatorOptions{} + if params.MaxRecords != nil { + options.Limit = *params.MaxRecords + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeDataSharesForProducerPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeDataSharesForProducerPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribeDataSharesForProducer page. +func (p *DescribeDataSharesForProducerPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDataSharesForProducerOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxRecords = limit + + result, err := p.client.DescribeDataSharesForProducer(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + func newServiceMetadataMiddleware_opDescribeDataSharesForProducer(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeReservedNodeExchangeStatus.go b/service/redshift/api_op_DescribeReservedNodeExchangeStatus.go new file mode 100644 index 00000000000..ece99d20af3 --- /dev/null +++ b/service/redshift/api_op_DescribeReservedNodeExchangeStatus.go @@ -0,0 +1,232 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package redshift + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/redshift/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns exchange status details and associated metadata for a reserved-node +// exchange. Statuses include such values as in progress and requested. +func (c *Client) DescribeReservedNodeExchangeStatus(ctx context.Context, params *DescribeReservedNodeExchangeStatusInput, optFns ...func(*Options)) (*DescribeReservedNodeExchangeStatusOutput, error) { + if params == nil { + params = &DescribeReservedNodeExchangeStatusInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeReservedNodeExchangeStatus", params, optFns, c.addOperationDescribeReservedNodeExchangeStatusMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeReservedNodeExchangeStatusOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeReservedNodeExchangeStatusInput struct { + + // An optional pagination token provided by a previous + // DescribeReservedNodeExchangeStatus request. If this parameter is specified, the + // response includes only records beyond the marker, up to the value specified by + // the MaxRecords parameter. You can retrieve the next set of response records by + // providing the returned marker value in the Marker parameter and retrying the + // request. + Marker *string + + // The maximum number of response records to return in each call. If the number of + // remaining response records exceeds the specified MaxRecords value, a value is + // returned in a Marker field of the response. You can retrieve the next set of + // records by retrying the command with the returned marker value. + MaxRecords *int32 + + // The identifier of the reserved-node exchange request. + ReservedNodeExchangeRequestId *string + + // The identifier of the source reserved node in a reserved-node exchange request. + ReservedNodeId *string + + noSmithyDocumentSerde +} + +type DescribeReservedNodeExchangeStatusOutput struct { + + // A pagination token provided by a previous DescribeReservedNodeExchangeStatus + // request. + Marker *string + + // The details of the reserved-node exchange request, including the status, request + // time, source reserved-node identifier, and additional details. + ReservedNodeExchangeStatusDetails []types.ReservedNodeExchangeStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeReservedNodeExchangeStatusMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeReservedNodeExchangeStatus{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeReservedNodeExchangeStatus{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReservedNodeExchangeStatus(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// DescribeReservedNodeExchangeStatusAPIClient is a client that implements the +// DescribeReservedNodeExchangeStatus operation. +type DescribeReservedNodeExchangeStatusAPIClient interface { + DescribeReservedNodeExchangeStatus(context.Context, *DescribeReservedNodeExchangeStatusInput, ...func(*Options)) (*DescribeReservedNodeExchangeStatusOutput, error) +} + +var _ DescribeReservedNodeExchangeStatusAPIClient = (*Client)(nil) + +// DescribeReservedNodeExchangeStatusPaginatorOptions is the paginator options for +// DescribeReservedNodeExchangeStatus +type DescribeReservedNodeExchangeStatusPaginatorOptions struct { + // The maximum number of response records to return in each call. If the number of + // remaining response records exceeds the specified MaxRecords value, a value is + // returned in a Marker field of the response. You can retrieve the next set of + // records by retrying the command with the returned marker value. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeReservedNodeExchangeStatusPaginator is a paginator for +// DescribeReservedNodeExchangeStatus +type DescribeReservedNodeExchangeStatusPaginator struct { + options DescribeReservedNodeExchangeStatusPaginatorOptions + client DescribeReservedNodeExchangeStatusAPIClient + params *DescribeReservedNodeExchangeStatusInput + nextToken *string + firstPage bool +} + +// NewDescribeReservedNodeExchangeStatusPaginator returns a new +// DescribeReservedNodeExchangeStatusPaginator +func NewDescribeReservedNodeExchangeStatusPaginator(client DescribeReservedNodeExchangeStatusAPIClient, params *DescribeReservedNodeExchangeStatusInput, optFns ...func(*DescribeReservedNodeExchangeStatusPaginatorOptions)) *DescribeReservedNodeExchangeStatusPaginator { + if params == nil { + params = &DescribeReservedNodeExchangeStatusInput{} + } + + options := DescribeReservedNodeExchangeStatusPaginatorOptions{} + if params.MaxRecords != nil { + options.Limit = *params.MaxRecords + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeReservedNodeExchangeStatusPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeReservedNodeExchangeStatusPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribeReservedNodeExchangeStatus page. +func (p *DescribeReservedNodeExchangeStatusPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeReservedNodeExchangeStatusOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxRecords = limit + + result, err := p.client.DescribeReservedNodeExchangeStatus(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opDescribeReservedNodeExchangeStatus(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "redshift", + OperationName: "DescribeReservedNodeExchangeStatus", + } +} diff --git a/service/redshift/api_op_GetReservedNodeExchangeConfigurationOptions.go b/service/redshift/api_op_GetReservedNodeExchangeConfigurationOptions.go new file mode 100644 index 00000000000..978e64a457f --- /dev/null +++ b/service/redshift/api_op_GetReservedNodeExchangeConfigurationOptions.go @@ -0,0 +1,245 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package redshift + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/redshift/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets the configuration options for the reserved-node exchange. These options +// include information about the source reserved node and target reserved node +// offering. Details include the node type, the price, the node count, and the +// offering type. +func (c *Client) GetReservedNodeExchangeConfigurationOptions(ctx context.Context, params *GetReservedNodeExchangeConfigurationOptionsInput, optFns ...func(*Options)) (*GetReservedNodeExchangeConfigurationOptionsOutput, error) { + if params == nil { + params = &GetReservedNodeExchangeConfigurationOptionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetReservedNodeExchangeConfigurationOptions", params, optFns, c.addOperationGetReservedNodeExchangeConfigurationOptionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetReservedNodeExchangeConfigurationOptionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetReservedNodeExchangeConfigurationOptionsInput struct { + + // The action type of the reserved-node configuration. The action type can be an + // exchange initiated from either a snapshot or a resize. + // + // This member is required. + ActionType types.ReservedNodeExchangeActionType + + // The identifier for the cluster that is the source for a reserved-node exchange. + ClusterIdentifier *string + + // An optional pagination token provided by a previous + // GetReservedNodeExchangeConfigurationOptions request. If this parameter is + // specified, the response includes only records beyond the marker, up to the value + // specified by the MaxRecords parameter. You can retrieve the next set of response + // records by providing the returned marker value in the Marker parameter and + // retrying the request. + Marker *string + + // The maximum number of response records to return in each call. If the number of + // remaining response records exceeds the specified MaxRecords value, a value is + // returned in a Marker field of the response. You can retrieve the next set of + // records by retrying the command with the returned marker value. + MaxRecords *int32 + + // The identifier for the snapshot that is the source for the reserved-node + // exchange. + SnapshotIdentifier *string + + noSmithyDocumentSerde +} + +type GetReservedNodeExchangeConfigurationOptionsOutput struct { + + // A pagination token provided by a previous + // GetReservedNodeExchangeConfigurationOptions request. + Marker *string + + // the configuration options for the reserved-node exchange. These options include + // information about the source reserved node and target reserved node. Details + // include the node type, the price, the node count, and the offering type. + ReservedNodeConfigurationOptionList []types.ReservedNodeConfigurationOption + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetReservedNodeExchangeConfigurationOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetReservedNodeExchangeConfigurationOptions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetReservedNodeExchangeConfigurationOptions{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetReservedNodeExchangeConfigurationOptionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetReservedNodeExchangeConfigurationOptions(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// GetReservedNodeExchangeConfigurationOptionsAPIClient is a client that implements +// the GetReservedNodeExchangeConfigurationOptions operation. +type GetReservedNodeExchangeConfigurationOptionsAPIClient interface { + GetReservedNodeExchangeConfigurationOptions(context.Context, *GetReservedNodeExchangeConfigurationOptionsInput, ...func(*Options)) (*GetReservedNodeExchangeConfigurationOptionsOutput, error) +} + +var _ GetReservedNodeExchangeConfigurationOptionsAPIClient = (*Client)(nil) + +// GetReservedNodeExchangeConfigurationOptionsPaginatorOptions is the paginator +// options for GetReservedNodeExchangeConfigurationOptions +type GetReservedNodeExchangeConfigurationOptionsPaginatorOptions struct { + // The maximum number of response records to return in each call. If the number of + // remaining response records exceeds the specified MaxRecords value, a value is + // returned in a Marker field of the response. You can retrieve the next set of + // records by retrying the command with the returned marker value. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// GetReservedNodeExchangeConfigurationOptionsPaginator is a paginator for +// GetReservedNodeExchangeConfigurationOptions +type GetReservedNodeExchangeConfigurationOptionsPaginator struct { + options GetReservedNodeExchangeConfigurationOptionsPaginatorOptions + client GetReservedNodeExchangeConfigurationOptionsAPIClient + params *GetReservedNodeExchangeConfigurationOptionsInput + nextToken *string + firstPage bool +} + +// NewGetReservedNodeExchangeConfigurationOptionsPaginator returns a new +// GetReservedNodeExchangeConfigurationOptionsPaginator +func NewGetReservedNodeExchangeConfigurationOptionsPaginator(client GetReservedNodeExchangeConfigurationOptionsAPIClient, params *GetReservedNodeExchangeConfigurationOptionsInput, optFns ...func(*GetReservedNodeExchangeConfigurationOptionsPaginatorOptions)) *GetReservedNodeExchangeConfigurationOptionsPaginator { + if params == nil { + params = &GetReservedNodeExchangeConfigurationOptionsInput{} + } + + options := GetReservedNodeExchangeConfigurationOptionsPaginatorOptions{} + if params.MaxRecords != nil { + options.Limit = *params.MaxRecords + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetReservedNodeExchangeConfigurationOptionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetReservedNodeExchangeConfigurationOptionsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next GetReservedNodeExchangeConfigurationOptions page. +func (p *GetReservedNodeExchangeConfigurationOptionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetReservedNodeExchangeConfigurationOptionsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxRecords = limit + + result, err := p.client.GetReservedNodeExchangeConfigurationOptions(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opGetReservedNodeExchangeConfigurationOptions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "redshift", + OperationName: "GetReservedNodeExchangeConfigurationOptions", + } +} diff --git a/service/redshift/api_op_ResizeCluster.go b/service/redshift/api_op_ResizeCluster.go index f85bee43191..bbb7a131cd3 100644 --- a/service/redshift/api_op_ResizeCluster.go +++ b/service/redshift/api_op_ResizeCluster.go @@ -82,6 +82,12 @@ type ResizeClusterInput struct { // number of nodes is used. NumberOfNodes *int32 + // The identifier of the reserved node. + ReservedNodeId *string + + // The identifier of the target reserved node offering. + TargetReservedNodeOfferingId *string + noSmithyDocumentSerde } diff --git a/service/redshift/api_op_RestoreFromClusterSnapshot.go b/service/redshift/api_op_RestoreFromClusterSnapshot.go index 646dd24f426..2bfeea08012 100644 --- a/service/redshift/api_op_RestoreFromClusterSnapshot.go +++ b/service/redshift/api_op_RestoreFromClusterSnapshot.go @@ -213,6 +213,9 @@ type RestoreFromClusterSnapshotInput struct { // If true, the cluster can be accessed from a public network. PubliclyAccessible *bool + // The identifier of the target reserved node offering. + ReservedNodeId *string + // The name of the cluster the source snapshot was created from. This parameter is // required if your IAM user has a policy containing a snapshot resource element // that specifies anything other than * for the cluster name. @@ -221,6 +224,9 @@ type RestoreFromClusterSnapshotInput struct { // A unique identifier for the snapshot schedule. SnapshotScheduleIdentifier *string + // The identifier of the target reserved node offering. + TargetReservedNodeOfferingId *string + // A list of Virtual Private Cloud (VPC) security groups to be associated with the // cluster. Default: The default VPC security group is associated with the cluster. // VPC security groups only apply to clusters in VPCs. diff --git a/service/redshift/deserializers.go b/service/redshift/deserializers.go index 990fbeed31f..eea415d4085 100644 --- a/service/redshift/deserializers.go +++ b/service/redshift/deserializers.go @@ -7530,6 +7530,120 @@ func awsAwsquery_deserializeOpErrorDescribePartners(response *smithyhttp.Respons } } +type awsAwsquery_deserializeOpDescribeReservedNodeExchangeStatus struct { +} + +func (*awsAwsquery_deserializeOpDescribeReservedNodeExchangeStatus) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDescribeReservedNodeExchangeStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsquery_deserializeOpErrorDescribeReservedNodeExchangeStatus(response, &metadata) + } + output := &DescribeReservedNodeExchangeStatusOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("DescribeReservedNodeExchangeStatusResult") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeOpDocumentDescribeReservedNodeExchangeStatusOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDescribeReservedNodeExchangeStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("ReservedNodeExchangeNotFond", errorCode): + return awsAwsquery_deserializeErrorReservedNodeExchangeNotFoundFault(response, errorBody) + + case strings.EqualFold("ReservedNodeNotFound", errorCode): + return awsAwsquery_deserializeErrorReservedNodeNotFoundFault(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsAwsquery_deserializeErrorUnsupportedOperationFault(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsquery_deserializeOpDescribeReservedNodeOfferings struct { } @@ -9342,6 +9456,135 @@ func awsAwsquery_deserializeOpErrorGetClusterCredentials(response *smithyhttp.Re } } +type awsAwsquery_deserializeOpGetReservedNodeExchangeConfigurationOptions struct { +} + +func (*awsAwsquery_deserializeOpGetReservedNodeExchangeConfigurationOptions) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpGetReservedNodeExchangeConfigurationOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsquery_deserializeOpErrorGetReservedNodeExchangeConfigurationOptions(response, &metadata) + } + output := &GetReservedNodeExchangeConfigurationOptionsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("GetReservedNodeExchangeConfigurationOptionsResult") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeOpDocumentGetReservedNodeExchangeConfigurationOptionsOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorGetReservedNodeExchangeConfigurationOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("ClusterNotFound", errorCode): + return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) + + case strings.EqualFold("ClusterSnapshotNotFound", errorCode): + return awsAwsquery_deserializeErrorClusterSnapshotNotFoundFault(response, errorBody) + + case strings.EqualFold("DependentServiceUnavailableFault", errorCode): + return awsAwsquery_deserializeErrorDependentServiceUnavailableFault(response, errorBody) + + case strings.EqualFold("InvalidReservedNodeState", errorCode): + return awsAwsquery_deserializeErrorInvalidReservedNodeStateFault(response, errorBody) + + case strings.EqualFold("ReservedNodeAlreadyMigrated", errorCode): + return awsAwsquery_deserializeErrorReservedNodeAlreadyMigratedFault(response, errorBody) + + case strings.EqualFold("ReservedNodeNotFound", errorCode): + return awsAwsquery_deserializeErrorReservedNodeNotFoundFault(response, errorBody) + + case strings.EqualFold("ReservedNodeOfferingNotFound", errorCode): + return awsAwsquery_deserializeErrorReservedNodeOfferingNotFoundFault(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsAwsquery_deserializeErrorUnsupportedOperationFault(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsquery_deserializeOpGetReservedNodeExchangeOfferings struct { } @@ -11997,12 +12240,18 @@ func awsAwsquery_deserializeOpErrorResizeCluster(response *smithyhttp.Response, case strings.EqualFold("ClusterNotFound", errorCode): return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) + case strings.EqualFold("DependentServiceUnavailableFault", errorCode): + return awsAwsquery_deserializeErrorDependentServiceUnavailableFault(response, errorBody) + case strings.EqualFold("InsufficientClusterCapacity", errorCode): return awsAwsquery_deserializeErrorInsufficientClusterCapacityFault(response, errorBody) case strings.EqualFold("InvalidClusterState", errorCode): return awsAwsquery_deserializeErrorInvalidClusterStateFault(response, errorBody) + case strings.EqualFold("InvalidReservedNodeState", errorCode): + return awsAwsquery_deserializeErrorInvalidReservedNodeStateFault(response, errorBody) + case strings.EqualFold("LimitExceededFault", errorCode): return awsAwsquery_deserializeErrorLimitExceededFault(response, errorBody) @@ -12012,6 +12261,18 @@ func awsAwsquery_deserializeOpErrorResizeCluster(response *smithyhttp.Response, case strings.EqualFold("NumberOfNodesQuotaExceeded", errorCode): return awsAwsquery_deserializeErrorNumberOfNodesQuotaExceededFault(response, errorBody) + case strings.EqualFold("ReservedNodeAlreadyExists", errorCode): + return awsAwsquery_deserializeErrorReservedNodeAlreadyExistsFault(response, errorBody) + + case strings.EqualFold("ReservedNodeAlreadyMigrated", errorCode): + return awsAwsquery_deserializeErrorReservedNodeAlreadyMigratedFault(response, errorBody) + + case strings.EqualFold("ReservedNodeNotFound", errorCode): + return awsAwsquery_deserializeErrorReservedNodeNotFoundFault(response, errorBody) + + case strings.EqualFold("ReservedNodeOfferingNotFound", errorCode): + return awsAwsquery_deserializeErrorReservedNodeOfferingNotFoundFault(response, errorBody) + case strings.EqualFold("UnauthorizedOperation", errorCode): return awsAwsquery_deserializeErrorUnauthorizedOperation(response, errorBody) @@ -12150,6 +12411,9 @@ func awsAwsquery_deserializeOpErrorRestoreFromClusterSnapshot(response *smithyht case strings.EqualFold("DependentServiceRequestThrottlingFault", errorCode): return awsAwsquery_deserializeErrorDependentServiceRequestThrottlingFault(response, errorBody) + case strings.EqualFold("DependentServiceUnavailableFault", errorCode): + return awsAwsquery_deserializeErrorDependentServiceUnavailableFault(response, errorBody) + case strings.EqualFold("HsmClientCertificateNotFoundFault", errorCode): return awsAwsquery_deserializeErrorHsmClientCertificateNotFoundFault(response, errorBody) @@ -12171,6 +12435,9 @@ func awsAwsquery_deserializeOpErrorRestoreFromClusterSnapshot(response *smithyht case strings.EqualFold("InvalidElasticIpFault", errorCode): return awsAwsquery_deserializeErrorInvalidElasticIpFault(response, errorBody) + case strings.EqualFold("InvalidReservedNodeState", errorCode): + return awsAwsquery_deserializeErrorInvalidReservedNodeStateFault(response, errorBody) + case strings.EqualFold("InvalidRestore", errorCode): return awsAwsquery_deserializeErrorInvalidRestoreFault(response, errorBody) @@ -12192,6 +12459,18 @@ func awsAwsquery_deserializeOpErrorRestoreFromClusterSnapshot(response *smithyht case strings.EqualFold("NumberOfNodesQuotaExceeded", errorCode): return awsAwsquery_deserializeErrorNumberOfNodesQuotaExceededFault(response, errorBody) + case strings.EqualFold("ReservedNodeAlreadyExists", errorCode): + return awsAwsquery_deserializeErrorReservedNodeAlreadyExistsFault(response, errorBody) + + case strings.EqualFold("ReservedNodeAlreadyMigrated", errorCode): + return awsAwsquery_deserializeErrorReservedNodeAlreadyMigratedFault(response, errorBody) + + case strings.EqualFold("ReservedNodeNotFound", errorCode): + return awsAwsquery_deserializeErrorReservedNodeNotFoundFault(response, errorBody) + + case strings.EqualFold("ReservedNodeOfferingNotFound", errorCode): + return awsAwsquery_deserializeErrorReservedNodeOfferingNotFoundFault(response, errorBody) + case strings.EqualFold("SnapshotScheduleNotFound", errorCode): return awsAwsquery_deserializeErrorSnapshotScheduleNotFoundFault(response, errorBody) @@ -12201,6 +12480,9 @@ func awsAwsquery_deserializeOpErrorRestoreFromClusterSnapshot(response *smithyht case strings.EqualFold("UnauthorizedOperation", errorCode): return awsAwsquery_deserializeErrorUnauthorizedOperation(response, errorBody) + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsAwsquery_deserializeErrorUnsupportedOperationFault(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -16773,6 +17055,50 @@ func awsAwsquery_deserializeErrorReservedNodeAlreadyMigratedFault(response *smit return output } +func awsAwsquery_deserializeErrorReservedNodeExchangeNotFoundFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ReservedNodeExchangeNotFoundFault{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeDocumentReservedNodeExchangeNotFoundFault(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + func awsAwsquery_deserializeErrorReservedNodeNotFoundFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ReservedNodeNotFoundFault{} var buff [1024]byte @@ -20487,6 +20813,12 @@ func awsAwsquery_deserializeDocumentCluster(v **types.Cluster, decoder smithyxml sv.PubliclyAccessible = xtv } + case strings.EqualFold("ReservedNodeExchangeStatus", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentReservedNodeExchangeStatus(&sv.ReservedNodeExchangeStatus, nodeDecoder); err != nil { + return err + } + case strings.EqualFold("ResizeInfo", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsAwsquery_deserializeDocumentResizeInfo(&sv.ResizeInfo, nodeDecoder); err != nil { @@ -30500,6 +30832,421 @@ func awsAwsquery_deserializeDocumentReservedNodeAlreadyMigratedFault(v **types.R return nil } +func awsAwsquery_deserializeDocumentReservedNodeConfigurationOption(v **types.ReservedNodeConfigurationOption, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ReservedNodeConfigurationOption + if *v == nil { + sv = &types.ReservedNodeConfigurationOption{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("SourceReservedNode", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentReservedNode(&sv.SourceReservedNode, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("TargetReservedNodeCount", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.TargetReservedNodeCount = int32(i64) + } + + case strings.EqualFold("TargetReservedNodeOffering", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentReservedNodeOffering(&sv.TargetReservedNodeOffering, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentReservedNodeConfigurationOptionList(v *[]types.ReservedNodeConfigurationOption, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.ReservedNodeConfigurationOption + if *v == nil { + sv = make([]types.ReservedNodeConfigurationOption, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("ReservedNodeConfigurationOption", t.Name.Local): + var col types.ReservedNodeConfigurationOption + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentReservedNodeConfigurationOption(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentReservedNodeConfigurationOptionListUnwrapped(v *[]types.ReservedNodeConfigurationOption, decoder smithyxml.NodeDecoder) error { + var sv []types.ReservedNodeConfigurationOption + if *v == nil { + sv = make([]types.ReservedNodeConfigurationOption, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.ReservedNodeConfigurationOption + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentReservedNodeConfigurationOption(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentReservedNodeExchangeNotFoundFault(v **types.ReservedNodeExchangeNotFoundFault, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ReservedNodeExchangeNotFoundFault + if *v == nil { + sv = &types.ReservedNodeExchangeNotFoundFault{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentReservedNodeExchangeStatus(v **types.ReservedNodeExchangeStatus, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ReservedNodeExchangeStatus + if *v == nil { + sv = &types.ReservedNodeExchangeStatus{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("RequestTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.RequestTime = ptr.Time(t) + } + + case strings.EqualFold("ReservedNodeExchangeRequestId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ReservedNodeExchangeRequestId = ptr.String(xtv) + } + + case strings.EqualFold("SourceReservedNodeCount", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.SourceReservedNodeCount = int32(i64) + } + + case strings.EqualFold("SourceReservedNodeId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SourceReservedNodeId = ptr.String(xtv) + } + + case strings.EqualFold("SourceReservedNodeType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SourceReservedNodeType = ptr.String(xtv) + } + + case strings.EqualFold("Status", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Status = types.ReservedNodeExchangeStatusType(xtv) + } + + case strings.EqualFold("TargetReservedNodeCount", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.TargetReservedNodeCount = int32(i64) + } + + case strings.EqualFold("TargetReservedNodeOfferingId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.TargetReservedNodeOfferingId = ptr.String(xtv) + } + + case strings.EqualFold("TargetReservedNodeType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.TargetReservedNodeType = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentReservedNodeExchangeStatusList(v *[]types.ReservedNodeExchangeStatus, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.ReservedNodeExchangeStatus + if *v == nil { + sv = make([]types.ReservedNodeExchangeStatus, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("ReservedNodeExchangeStatus", t.Name.Local): + var col types.ReservedNodeExchangeStatus + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentReservedNodeExchangeStatus(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentReservedNodeExchangeStatusListUnwrapped(v *[]types.ReservedNodeExchangeStatus, decoder smithyxml.NodeDecoder) error { + var sv []types.ReservedNodeExchangeStatus + if *v == nil { + sv = make([]types.ReservedNodeExchangeStatus, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.ReservedNodeExchangeStatus + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentReservedNodeExchangeStatus(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} func awsAwsquery_deserializeDocumentReservedNodeList(v *[]types.ReservedNode, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -31035,6 +31782,32 @@ func awsAwsquery_deserializeDocumentResizeClusterMessage(v **types.ResizeCluster sv.NumberOfNodes = ptr.Int32(int32(i64)) } + case strings.EqualFold("ReservedNodeId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ReservedNodeId = ptr.String(xtv) + } + + case strings.EqualFold("TargetReservedNodeOfferingId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.TargetReservedNodeOfferingId = ptr.String(xtv) + } + default: // Do nothing and ignore the unexpected tag element err = decoder.Decoder.Skip() @@ -40387,6 +41160,61 @@ func awsAwsquery_deserializeOpDocumentDescribePartnersOutput(v **DescribePartner return nil } +func awsAwsquery_deserializeOpDocumentDescribeReservedNodeExchangeStatusOutput(v **DescribeReservedNodeExchangeStatusOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *DescribeReservedNodeExchangeStatusOutput + if *v == nil { + sv = &DescribeReservedNodeExchangeStatusOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("ReservedNodeExchangeStatusDetails", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentReservedNodeExchangeStatusList(&sv.ReservedNodeExchangeStatusDetails, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeOpDocumentDescribeReservedNodeOfferingsOutput(v **DescribeReservedNodeOfferingsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -41645,6 +42473,61 @@ func awsAwsquery_deserializeOpDocumentGetClusterCredentialsOutput(v **GetCluster return nil } +func awsAwsquery_deserializeOpDocumentGetReservedNodeExchangeConfigurationOptionsOutput(v **GetReservedNodeExchangeConfigurationOptionsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetReservedNodeExchangeConfigurationOptionsOutput + if *v == nil { + sv = &GetReservedNodeExchangeConfigurationOptionsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("ReservedNodeConfigurationOptionList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentReservedNodeConfigurationOptionList(&sv.ReservedNodeConfigurationOptionList, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeOpDocumentGetReservedNodeExchangeOfferingsOutput(v **GetReservedNodeExchangeOfferingsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/redshift/generated.json b/service/redshift/generated.json index 7b2ca9168db..ee1cdf49fe8 100644 --- a/service/redshift/generated.json +++ b/service/redshift/generated.json @@ -77,6 +77,7 @@ "api_op_DescribeNodeConfigurationOptions.go", "api_op_DescribeOrderableClusterOptions.go", "api_op_DescribePartners.go", + "api_op_DescribeReservedNodeExchangeStatus.go", "api_op_DescribeReservedNodeOfferings.go", "api_op_DescribeReservedNodes.go", "api_op_DescribeResize.go", @@ -93,6 +94,7 @@ "api_op_EnableLogging.go", "api_op_EnableSnapshotCopy.go", "api_op_GetClusterCredentials.go", + "api_op_GetReservedNodeExchangeConfigurationOptions.go", "api_op_GetReservedNodeExchangeOfferings.go", "api_op_ModifyAquaConfiguration.go", "api_op_ModifyAuthenticationProfile.go", diff --git a/service/redshift/serializers.go b/service/redshift/serializers.go index c2c1c2431f9..83103aa2a3b 100644 --- a/service/redshift/serializers.go +++ b/service/redshift/serializers.go @@ -4432,6 +4432,70 @@ func (m *awsAwsquery_serializeOpDescribePartners) HandleSerialize(ctx context.Co return next.HandleSerialize(ctx, in) } +type awsAwsquery_serializeOpDescribeReservedNodeExchangeStatus struct { +} + +func (*awsAwsquery_serializeOpDescribeReservedNodeExchangeStatus) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDescribeReservedNodeExchangeStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeReservedNodeExchangeStatusInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("DescribeReservedNodeExchangeStatus") + body.Key("Version").String("2012-12-01") + + if err := awsAwsquery_serializeOpDocumentDescribeReservedNodeExchangeStatusInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsquery_serializeOpDescribeReservedNodeOfferings struct { } @@ -5452,6 +5516,70 @@ func (m *awsAwsquery_serializeOpGetClusterCredentials) HandleSerialize(ctx conte return next.HandleSerialize(ctx, in) } +type awsAwsquery_serializeOpGetReservedNodeExchangeConfigurationOptions struct { +} + +func (*awsAwsquery_serializeOpGetReservedNodeExchangeConfigurationOptions) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetReservedNodeExchangeConfigurationOptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetReservedNodeExchangeConfigurationOptionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("GetReservedNodeExchangeConfigurationOptions") + body.Key("Version").String("2012-12-01") + + if err := awsAwsquery_serializeOpDocumentGetReservedNodeExchangeConfigurationOptionsInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsquery_serializeOpGetReservedNodeExchangeOfferings struct { } @@ -7679,6 +7807,16 @@ func awsAwsquery_serializeDocumentResizeClusterMessage(v *types.ResizeClusterMes objectKey.Integer(*v.NumberOfNodes) } + if v.ReservedNodeId != nil { + objectKey := object.Key("ReservedNodeId") + objectKey.String(*v.ReservedNodeId) + } + + if v.TargetReservedNodeOfferingId != nil { + objectKey := object.Key("TargetReservedNodeOfferingId") + objectKey.String(*v.TargetReservedNodeOfferingId) + } + return nil } @@ -9838,6 +9976,33 @@ func awsAwsquery_serializeOpDocumentDescribePartnersInput(v *DescribePartnersInp return nil } +func awsAwsquery_serializeOpDocumentDescribeReservedNodeExchangeStatusInput(v *DescribeReservedNodeExchangeStatusInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxRecords != nil { + objectKey := object.Key("MaxRecords") + objectKey.Integer(*v.MaxRecords) + } + + if v.ReservedNodeExchangeRequestId != nil { + objectKey := object.Key("ReservedNodeExchangeRequestId") + objectKey.String(*v.ReservedNodeExchangeRequestId) + } + + if v.ReservedNodeId != nil { + objectKey := object.Key("ReservedNodeId") + objectKey.String(*v.ReservedNodeId) + } + + return nil +} + func awsAwsquery_serializeOpDocumentDescribeReservedNodeOfferingsInput(v *DescribeReservedNodeOfferingsInput, value query.Value) error { object := value.Object() _ = object @@ -10273,6 +10438,38 @@ func awsAwsquery_serializeOpDocumentGetClusterCredentialsInput(v *GetClusterCred return nil } +func awsAwsquery_serializeOpDocumentGetReservedNodeExchangeConfigurationOptionsInput(v *GetReservedNodeExchangeConfigurationOptionsInput, value query.Value) error { + object := value.Object() + _ = object + + if len(v.ActionType) > 0 { + objectKey := object.Key("ActionType") + objectKey.String(string(v.ActionType)) + } + + if v.ClusterIdentifier != nil { + objectKey := object.Key("ClusterIdentifier") + objectKey.String(*v.ClusterIdentifier) + } + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxRecords != nil { + objectKey := object.Key("MaxRecords") + objectKey.Integer(*v.MaxRecords) + } + + if v.SnapshotIdentifier != nil { + objectKey := object.Key("SnapshotIdentifier") + objectKey.String(*v.SnapshotIdentifier) + } + + return nil +} + func awsAwsquery_serializeOpDocumentGetReservedNodeExchangeOfferingsInput(v *GetReservedNodeExchangeOfferingsInput, value query.Value) error { object := value.Object() _ = object @@ -10920,6 +11117,16 @@ func awsAwsquery_serializeOpDocumentResizeClusterInput(v *ResizeClusterInput, va objectKey.Integer(*v.NumberOfNodes) } + if v.ReservedNodeId != nil { + objectKey := object.Key("ReservedNodeId") + objectKey.String(*v.ReservedNodeId) + } + + if v.TargetReservedNodeOfferingId != nil { + objectKey := object.Key("TargetReservedNodeOfferingId") + objectKey.String(*v.TargetReservedNodeOfferingId) + } + return nil } @@ -11056,6 +11263,11 @@ func awsAwsquery_serializeOpDocumentRestoreFromClusterSnapshotInput(v *RestoreFr objectKey.Boolean(*v.PubliclyAccessible) } + if v.ReservedNodeId != nil { + objectKey := object.Key("ReservedNodeId") + objectKey.String(*v.ReservedNodeId) + } + if v.SnapshotClusterIdentifier != nil { objectKey := object.Key("SnapshotClusterIdentifier") objectKey.String(*v.SnapshotClusterIdentifier) @@ -11071,6 +11283,11 @@ func awsAwsquery_serializeOpDocumentRestoreFromClusterSnapshotInput(v *RestoreFr objectKey.String(*v.SnapshotScheduleIdentifier) } + if v.TargetReservedNodeOfferingId != nil { + objectKey := object.Key("TargetReservedNodeOfferingId") + objectKey.String(*v.TargetReservedNodeOfferingId) + } + if v.VpcSecurityGroupIds != nil { objectKey := object.Key("VpcSecurityGroupIds") if err := awsAwsquery_serializeDocumentVpcSecurityGroupIdList(v.VpcSecurityGroupIds, objectKey); err != nil { diff --git a/service/redshift/types/enums.go b/service/redshift/types/enums.go index a3ad85e5428..c3e61322c15 100644 --- a/service/redshift/types/enums.go +++ b/service/redshift/types/enums.go @@ -257,6 +257,52 @@ func (PartnerIntegrationStatus) Values() []PartnerIntegrationStatus { } } +type ReservedNodeExchangeActionType string + +// Enum values for ReservedNodeExchangeActionType +const ( + ReservedNodeExchangeActionTypeRestoreCluster ReservedNodeExchangeActionType = "restore-cluster" + ReservedNodeExchangeActionTypeResizeCluster ReservedNodeExchangeActionType = "resize-cluster" +) + +// Values returns all known values for ReservedNodeExchangeActionType. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. The ordering of this slice is not guaranteed to be stable across +// updates. +func (ReservedNodeExchangeActionType) Values() []ReservedNodeExchangeActionType { + return []ReservedNodeExchangeActionType{ + "restore-cluster", + "resize-cluster", + } +} + +type ReservedNodeExchangeStatusType string + +// Enum values for ReservedNodeExchangeStatusType +const ( + ReservedNodeExchangeStatusTypeRequested ReservedNodeExchangeStatusType = "REQUESTED" + ReservedNodeExchangeStatusTypePending ReservedNodeExchangeStatusType = "PENDING" + ReservedNodeExchangeStatusTypeInProgress ReservedNodeExchangeStatusType = "IN_PROGRESS" + ReservedNodeExchangeStatusTypeRetrying ReservedNodeExchangeStatusType = "RETRYING" + ReservedNodeExchangeStatusTypeSucceeded ReservedNodeExchangeStatusType = "SUCCEEDED" + ReservedNodeExchangeStatusTypeFailed ReservedNodeExchangeStatusType = "FAILED" +) + +// Values returns all known values for ReservedNodeExchangeStatusType. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. The ordering of this slice is not guaranteed to be stable across +// updates. +func (ReservedNodeExchangeStatusType) Values() []ReservedNodeExchangeStatusType { + return []ReservedNodeExchangeStatusType{ + "REQUESTED", + "PENDING", + "IN_PROGRESS", + "RETRYING", + "SUCCEEDED", + "FAILED", + } +} + type ReservedNodeOfferingType string // Enum values for ReservedNodeOfferingType diff --git a/service/redshift/types/errors.go b/service/redshift/types/errors.go index 6a00a63a8c1..65a24a0bee4 100644 --- a/service/redshift/types/errors.go +++ b/service/redshift/types/errors.go @@ -1832,6 +1832,25 @@ func (e *ReservedNodeAlreadyMigratedFault) ErrorMessage() string { func (e *ReservedNodeAlreadyMigratedFault) ErrorCode() string { return "ReservedNodeAlreadyMigrated" } func (e *ReservedNodeAlreadyMigratedFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The reserved-node exchange status wasn't found. +type ReservedNodeExchangeNotFoundFault struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *ReservedNodeExchangeNotFoundFault) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ReservedNodeExchangeNotFoundFault) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ReservedNodeExchangeNotFoundFault) ErrorCode() string { return "ReservedNodeExchangeNotFond" } +func (e *ReservedNodeExchangeNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The specified reserved compute node not found. type ReservedNodeNotFoundFault struct { Message *string diff --git a/service/redshift/types/types.go b/service/redshift/types/types.go index 4163493588b..d5108c9486a 100644 --- a/service/redshift/types/types.go +++ b/service/redshift/types/types.go @@ -327,6 +327,10 @@ type Cluster struct { // public network. PubliclyAccessible bool + // The status of the reserved-node exchange request. Statuses include in-progress + // and requested. + ReservedNodeExchangeStatus *ReservedNodeExchangeStatus + // Returns the following: // // * AllowCancelResize: a boolean value indicating if the @@ -1332,6 +1336,59 @@ type ReservedNode struct { noSmithyDocumentSerde } +// Details for a reserved-node exchange. Examples include the node type for a +// reserved node, the price for a node, the node's state, and other details. +type ReservedNodeConfigurationOption struct { + + // Describes a reserved node. You can call the DescribeReservedNodeOfferings API to + // obtain the available reserved node offerings. + SourceReservedNode *ReservedNode + + // The target reserved-node count. + TargetReservedNodeCount int32 + + // Describes a reserved node offering. + TargetReservedNodeOffering *ReservedNodeOffering + + noSmithyDocumentSerde +} + +// Reserved-node status details, such as the source reserved-node identifier, the +// target reserved-node identifier, the node type, the node count, and other +// details. +type ReservedNodeExchangeStatus struct { + + // A date and time that indicate when the reserved-node exchange was requested. + RequestTime *time.Time + + // The identifier of the reserved-node exchange request. + ReservedNodeExchangeRequestId *string + + // The source reserved-node count in the cluster. + SourceReservedNodeCount int32 + + // The identifier of the source reserved node. + SourceReservedNodeId *string + + // The source reserved-node type, for example ds2.xlarge. + SourceReservedNodeType *string + + // The status of the reserved-node exchange request. Statuses include in-progress + // and requested. + Status ReservedNodeExchangeStatusType + + // The count of target reserved nodes in the cluster. + TargetReservedNodeCount int32 + + // The identifier of the target reserved node offering. + TargetReservedNodeOfferingId *string + + // The node type of the target reserved node, for example ra3.4xlarge. + TargetReservedNodeType *string + + noSmithyDocumentSerde +} + // Describes a reserved node offering. type ReservedNodeOffering struct { @@ -1395,6 +1452,12 @@ type ResizeClusterMessage struct { // number of nodes is used. NumberOfNodes *int32 + // The identifier of the reserved node. + ReservedNodeId *string + + // The identifier of the target reserved node offering. + TargetReservedNodeOfferingId *string + noSmithyDocumentSerde } diff --git a/service/redshift/validators.go b/service/redshift/validators.go index 67ccdcf7d41..894ef9b5758 100644 --- a/service/redshift/validators.go +++ b/service/redshift/validators.go @@ -1130,6 +1130,26 @@ func (m *validateOpGetClusterCredentials) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpGetReservedNodeExchangeConfigurationOptions struct { +} + +func (*validateOpGetReservedNodeExchangeConfigurationOptions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetReservedNodeExchangeConfigurationOptions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetReservedNodeExchangeConfigurationOptionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetReservedNodeExchangeConfigurationOptionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetReservedNodeExchangeOfferings struct { } @@ -1954,6 +1974,10 @@ func addOpGetClusterCredentialsValidationMiddleware(stack *middleware.Stack) err return stack.Initialize.Add(&validateOpGetClusterCredentials{}, middleware.After) } +func addOpGetReservedNodeExchangeConfigurationOptionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetReservedNodeExchangeConfigurationOptions{}, middleware.After) +} + func addOpGetReservedNodeExchangeOfferingsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetReservedNodeExchangeOfferings{}, middleware.After) } @@ -3214,6 +3238,21 @@ func validateOpGetClusterCredentialsInput(v *GetClusterCredentialsInput) error { } } +func validateOpGetReservedNodeExchangeConfigurationOptionsInput(v *GetReservedNodeExchangeConfigurationOptionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetReservedNodeExchangeConfigurationOptionsInput"} + if len(v.ActionType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ActionType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetReservedNodeExchangeOfferingsInput(v *GetReservedNodeExchangeOfferingsInput) error { if v == nil { return nil diff --git a/service/rum/LICENSE.txt b/service/rum/LICENSE.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/service/rum/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/service/rum/api_client.go b/service/rum/api_client.go new file mode 100644 index 00000000000..ce56b2972e7 --- /dev/null +++ b/service/rum/api_client.go @@ -0,0 +1,296 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rum + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/retry" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" + smithy "github.com/aws/smithy-go" + smithydocument "github.com/aws/smithy-go/document" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/http" + "time" +) + +const ServiceID = "RUM" +const ServiceAPIVersion = "2018-05-10" + +// Client provides the API client to make operations call for CloudWatch RUM. +type Client struct { + options Options +} + +// New returns an initialized Client based on the functional options. Provide +// additional functional options to further configure the behavior of the client, +// such as changing the client's endpoint or adding custom middleware behavior. +func New(options Options, optFns ...func(*Options)) *Client { + options = options.Copy() + + resolveDefaultLogger(&options) + + resolveRetryer(&options) + + resolveHTTPClient(&options) + + resolveHTTPSignerV4(&options) + + resolveDefaultEndpointConfiguration(&options) + + for _, fn := range optFns { + fn(&options) + } + + client := &Client{ + options: options, + } + + return client +} + +type Options struct { + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + APIOptions []func(*middleware.Stack) error + + // Configures the events that will be sent to the configured logger. + ClientLogMode aws.ClientLogMode + + // The credentials object to use when signing requests. + Credentials aws.CredentialsProvider + + // The endpoint options to be used when attempting to resolve an endpoint. + EndpointOptions EndpointResolverOptions + + // The service endpoint resolver. + EndpointResolver EndpointResolver + + // Signature Version 4 (SigV4) Signer + HTTPSignerV4 HTTPSignerV4 + + // The logger writer interface to write logging messages to. + Logger logging.Logger + + // The region to send requests to. (Required) + Region string + + // Retryer guides how HTTP requests should be retried in case of recoverable + // failures. When nil the API client will use a default retryer. + Retryer aws.Retryer + + // The HTTP client to invoke API calls with. Defaults to client's default HTTP + // implementation if nil. + HTTPClient HTTPClient +} + +// WithAPIOptions returns a functional option for setting the Client's APIOptions +// option. +func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { + return func(o *Options) { + o.APIOptions = append(o.APIOptions, optFns...) + } +} + +// WithEndpointResolver returns a functional option for setting the Client's +// EndpointResolver option. +func WithEndpointResolver(v EndpointResolver) func(*Options) { + return func(o *Options) { + o.EndpointResolver = v + } +} + +type HTTPClient interface { + Do(*http.Request) (*http.Response, error) +} + +// Copy creates a clone where the APIOptions list is deep copied. +func (o Options) Copy() Options { + to := o + to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) + copy(to.APIOptions, o.APIOptions) + return to +} +func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { + ctx = middleware.ClearStackValues(ctx) + stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) + options := c.options.Copy() + for _, fn := range optFns { + fn(&options) + } + + finalizeClientEndpointResolverOptions(&options) + + for _, fn := range stackFns { + if err := fn(stack, options); err != nil { + return nil, metadata, err + } + } + + for _, fn := range options.APIOptions { + if err := fn(stack); err != nil { + return nil, metadata, err + } + } + + handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) + result, metadata, err = handler.Handle(ctx, params) + if err != nil { + err = &smithy.OperationError{ + ServiceID: ServiceID, + OperationName: opID, + Err: err, + } + } + return result, metadata, err +} + +type noSmithyDocumentSerde = smithydocument.NoSerde + +func resolveDefaultLogger(o *Options) { + if o.Logger != nil { + return + } + o.Logger = logging.Nop{} +} + +func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { + return middleware.AddSetLoggerMiddleware(stack, o.Logger) +} + +// NewFromConfig returns a new client from the provided config. +func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { + opts := Options{ + Region: cfg.Region, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + } + resolveAWSRetryerProvider(cfg, &opts) + resolveAWSEndpointResolver(cfg, &opts) + resolveUseDualStackEndpoint(cfg, &opts) + resolveUseFIPSEndpoint(cfg, &opts) + return New(opts, optFns...) +} + +func resolveHTTPClient(o *Options) { + if o.HTTPClient != nil { + return + } + o.HTTPClient = awshttp.NewBuildableClient() +} + +func resolveRetryer(o *Options) { + if o.Retryer != nil { + return + } + o.Retryer = retry.NewStandard() +} + +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + +func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { + if cfg.EndpointResolver == nil { + return + } + o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver()) +} + +func addClientUserAgent(stack *middleware.Stack) error { + return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "rum", goModuleVersion)(stack) +} + +func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error { + mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{ + CredentialsProvider: o.Credentials, + Signer: o.HTTPSignerV4, + LogSigning: o.ClientLogMode.IsSigning(), + }) + return stack.Finalize.Add(mw, middleware.After) +} + +type HTTPSignerV4 interface { + SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error +} + +func resolveHTTPSignerV4(o *Options) { + if o.HTTPSignerV4 != nil { + return + } + o.HTTPSignerV4 = newDefaultV4Signer(*o) +} + +func newDefaultV4Signer(o Options) *v4.Signer { + return v4.NewSigner(func(so *v4.SignerOptions) { + so.Logger = o.Logger + so.LogSigning = o.ClientLogMode.IsSigning() + }) +} + +func addRetryMiddlewares(stack *middleware.Stack, o Options) error { + mo := retry.AddRetryMiddlewaresOptions{ + Retryer: o.Retryer, + LogRetryAttempts: o.ClientLogMode.IsRetries(), + } + return retry.AddRetryMiddlewares(stack, mo) +} + +// resolves dual-stack endpoint configuration +func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseDualStackEndpoint = value + } + return nil +} + +// resolves FIPS endpoint configuration +func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseFIPSEndpoint = value + } + return nil +} + +func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { + return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) +} + +func addResponseErrorMiddleware(stack *middleware.Stack) error { + return awshttp.AddResponseErrorMiddleware(stack) +} + +func addRequestResponseLogging(stack *middleware.Stack, o Options) error { + return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ + LogRequest: o.ClientLogMode.IsRequest(), + LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), + LogResponse: o.ClientLogMode.IsResponse(), + LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), + }, middleware.After) +} diff --git a/service/rum/api_op_CreateAppMonitor.go b/service/rum/api_op_CreateAppMonitor.go new file mode 100644 index 00000000000..27b92e72b36 --- /dev/null +++ b/service/rum/api_op_CreateAppMonitor.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rum + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/rum/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a Amazon CloudWatch RUM app monitor, which collects telemetry data from +// your application and sends that data to RUM. The data includes performance and +// reliability information such as page load time, client-side errors, and user +// behavior. You use this operation only to create a new app monitor. To update an +// existing app monitor, use UpdateAppMonitor +// (https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_UpdateAppMonitor.html) +// instead. After you create an app monitor, sign in to the CloudWatch RUM console +// to get the JavaScript code snippet to add to your web application. For more +// information, see How do I find a code snippet that I've already generated? +// (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-find-code-snippet.html) +func (c *Client) CreateAppMonitor(ctx context.Context, params *CreateAppMonitorInput, optFns ...func(*Options)) (*CreateAppMonitorOutput, error) { + if params == nil { + params = &CreateAppMonitorInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateAppMonitor", params, optFns, c.addOperationCreateAppMonitorMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateAppMonitorOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateAppMonitorInput struct { + + // The top-level internet domain name for which your application has administrative + // authority. + // + // This member is required. + Domain *string + + // A name for the app monitor. + // + // This member is required. + Name *string + + // A structure that contains much of the configuration data for the app monitor. If + // you are using Amazon Cognito for authorization, you must include this structure + // in your request, and it must include the ID of the Amazon Cognito identity pool + // to use for authorization. If you don't include AppMonitorConfiguration, you must + // set up your own authorization method. For more information, see Authorize your + // application to send data to Amazon Web Services + // (https://docs.aws.amazon.com/monitoring/CloudWatch-RUM-get-started-authorization.html). + // If you omit this argument, the sample rate used for RUM is set to 10% of the + // user sessions. + AppMonitorConfiguration *types.AppMonitorConfiguration + + // Data collected by RUM is kept by RUM for 30 days and then deleted. This + // parameter specifies whether RUM sends a copy of this telemetry data to Amazon + // CloudWatch Logs in your account. This enables you to keep the telemetry data for + // more than 30 days, but it does incur Amazon CloudWatch Logs charges. If you omit + // this parameter, the default is false. + CwLogEnabled *bool + + // Assigns one or more tags (key-value pairs) to the app monitor. Tags can help you + // organize and categorize your resources. You can also use them to scope user + // permissions by granting a user permission to access or change only resources + // with certain tag values. Tags don't have any semantic meaning to Amazon Web + // Services and are interpreted strictly as strings of characters. You can + // associate as many as 50 tags with an app monitor. For more information, see + // Tagging Amazon Web Services resources + // (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html). + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateAppMonitorOutput struct { + + // The unique ID of the new app monitor. + Id *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateAppMonitorMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateAppMonitor{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateAppMonitor{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateAppMonitorValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAppMonitor(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateAppMonitor(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "rum", + OperationName: "CreateAppMonitor", + } +} diff --git a/service/lambda/api_op_DeleteFunctionUrlConfig.go b/service/rum/api_op_DeleteAppMonitor.go similarity index 63% rename from service/lambda/api_op_DeleteFunctionUrlConfig.go rename to service/rum/api_op_DeleteAppMonitor.go index 1dcbeea142a..6bd8088ad57 100644 --- a/service/lambda/api_op_DeleteFunctionUrlConfig.go +++ b/service/rum/api_op_DeleteAppMonitor.go @@ -1,6 +1,6 @@ // Code generated by smithy-go-codegen DO NOT EDIT. -package lambda +package rum import ( "context" @@ -10,44 +10,45 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -func (c *Client) DeleteFunctionUrlConfig(ctx context.Context, params *DeleteFunctionUrlConfigInput, optFns ...func(*Options)) (*DeleteFunctionUrlConfigOutput, error) { +// Deletes an existing app monitor. This immediately stops the collection of data. +func (c *Client) DeleteAppMonitor(ctx context.Context, params *DeleteAppMonitorInput, optFns ...func(*Options)) (*DeleteAppMonitorOutput, error) { if params == nil { - params = &DeleteFunctionUrlConfigInput{} + params = &DeleteAppMonitorInput{} } - result, metadata, err := c.invokeOperation(ctx, "DeleteFunctionUrlConfig", params, optFns, c.addOperationDeleteFunctionUrlConfigMiddlewares) + result, metadata, err := c.invokeOperation(ctx, "DeleteAppMonitor", params, optFns, c.addOperationDeleteAppMonitorMiddlewares) if err != nil { return nil, err } - out := result.(*DeleteFunctionUrlConfigOutput) + out := result.(*DeleteAppMonitorOutput) out.ResultMetadata = metadata return out, nil } -type DeleteFunctionUrlConfigInput struct { +type DeleteAppMonitorInput struct { + // The name of the app monitor to delete. + // // This member is required. - FunctionName *string - - Qualifier *string + Name *string noSmithyDocumentSerde } -type DeleteFunctionUrlConfigOutput struct { +type DeleteAppMonitorOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } -func (c *Client) addOperationDeleteFunctionUrlConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteFunctionUrlConfig{}, middleware.After) +func (c *Client) addOperationDeleteAppMonitorMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteAppMonitor{}, middleware.After) if err != nil { return err } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteFunctionUrlConfig{}, middleware.After) + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteAppMonitor{}, middleware.After) if err != nil { return err } @@ -87,10 +88,10 @@ func (c *Client) addOperationDeleteFunctionUrlConfigMiddlewares(stack *middlewar if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addOpDeleteFunctionUrlConfigValidationMiddleware(stack); err != nil { + if err = addOpDeleteAppMonitorValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteFunctionUrlConfig(options.Region), middleware.Before); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAppMonitor(options.Region), middleware.Before); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { @@ -105,11 +106,11 @@ func (c *Client) addOperationDeleteFunctionUrlConfigMiddlewares(stack *middlewar return nil } -func newServiceMetadataMiddleware_opDeleteFunctionUrlConfig(region string) *awsmiddleware.RegisterServiceMetadata { +func newServiceMetadataMiddleware_opDeleteAppMonitor(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, - SigningName: "lambda", - OperationName: "DeleteFunctionUrlConfig", + SigningName: "rum", + OperationName: "DeleteAppMonitor", } } diff --git a/service/rum/api_op_GetAppMonitor.go b/service/rum/api_op_GetAppMonitor.go new file mode 100644 index 00000000000..539fffa85a3 --- /dev/null +++ b/service/rum/api_op_GetAppMonitor.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rum + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/rum/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the complete configuration information for one app monitor. +func (c *Client) GetAppMonitor(ctx context.Context, params *GetAppMonitorInput, optFns ...func(*Options)) (*GetAppMonitorOutput, error) { + if params == nil { + params = &GetAppMonitorInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetAppMonitor", params, optFns, c.addOperationGetAppMonitorMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetAppMonitorOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetAppMonitorInput struct { + + // The app monitor to retrieve information for. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type GetAppMonitorOutput struct { + + // A structure containing all the configuration information for the app monitor. + AppMonitor *types.AppMonitor + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetAppMonitorMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetAppMonitor{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetAppMonitor{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetAppMonitorValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAppMonitor(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetAppMonitor(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "rum", + OperationName: "GetAppMonitor", + } +} diff --git a/service/rum/api_op_GetAppMonitorData.go b/service/rum/api_op_GetAppMonitorData.go new file mode 100644 index 00000000000..cb52b4c5c63 --- /dev/null +++ b/service/rum/api_op_GetAppMonitorData.go @@ -0,0 +1,225 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rum + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/rum/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the raw performance events that RUM has collected from your web +// application, so that you can do your own processing or analysis of this data. +func (c *Client) GetAppMonitorData(ctx context.Context, params *GetAppMonitorDataInput, optFns ...func(*Options)) (*GetAppMonitorDataOutput, error) { + if params == nil { + params = &GetAppMonitorDataInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetAppMonitorData", params, optFns, c.addOperationGetAppMonitorDataMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetAppMonitorDataOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetAppMonitorDataInput struct { + + // The name of the app monitor that collected the data that you want to retrieve. + // + // This member is required. + Name *string + + // A structure that defines the time range that you want to retrieve results from. + // + // This member is required. + TimeRange *types.TimeRange + + // An array of structures that you can use to filter the results to those that + // match one or more sets of key-value pairs that you specify. + Filters []types.QueryFilter + + // The maximum number of results to return in one operation. + MaxResults int32 + + // Use the token returned by the previous operation to request the next page of + // results. + NextToken *string + + noSmithyDocumentSerde +} + +type GetAppMonitorDataOutput struct { + + // The events that RUM collected that match your request. + Events []string + + // A token that you can use in a subsequent operation to retrieve the next set of + // results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetAppMonitorDataMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetAppMonitorData{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetAppMonitorData{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetAppMonitorDataValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAppMonitorData(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// GetAppMonitorDataAPIClient is a client that implements the GetAppMonitorData +// operation. +type GetAppMonitorDataAPIClient interface { + GetAppMonitorData(context.Context, *GetAppMonitorDataInput, ...func(*Options)) (*GetAppMonitorDataOutput, error) +} + +var _ GetAppMonitorDataAPIClient = (*Client)(nil) + +// GetAppMonitorDataPaginatorOptions is the paginator options for GetAppMonitorData +type GetAppMonitorDataPaginatorOptions struct { + // The maximum number of results to return in one operation. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// GetAppMonitorDataPaginator is a paginator for GetAppMonitorData +type GetAppMonitorDataPaginator struct { + options GetAppMonitorDataPaginatorOptions + client GetAppMonitorDataAPIClient + params *GetAppMonitorDataInput + nextToken *string + firstPage bool +} + +// NewGetAppMonitorDataPaginator returns a new GetAppMonitorDataPaginator +func NewGetAppMonitorDataPaginator(client GetAppMonitorDataAPIClient, params *GetAppMonitorDataInput, optFns ...func(*GetAppMonitorDataPaginatorOptions)) *GetAppMonitorDataPaginator { + if params == nil { + params = &GetAppMonitorDataInput{} + } + + options := GetAppMonitorDataPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetAppMonitorDataPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetAppMonitorDataPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next GetAppMonitorData page. +func (p *GetAppMonitorDataPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetAppMonitorDataOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.MaxResults = p.options.Limit + + result, err := p.client.GetAppMonitorData(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opGetAppMonitorData(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "rum", + OperationName: "GetAppMonitorData", + } +} diff --git a/service/rum/api_op_ListAppMonitors.go b/service/rum/api_op_ListAppMonitors.go new file mode 100644 index 00000000000..06420f3ef14 --- /dev/null +++ b/service/rum/api_op_ListAppMonitors.go @@ -0,0 +1,211 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rum + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/rum/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of the Amazon CloudWatch RUM app monitors in the account. +func (c *Client) ListAppMonitors(ctx context.Context, params *ListAppMonitorsInput, optFns ...func(*Options)) (*ListAppMonitorsOutput, error) { + if params == nil { + params = &ListAppMonitorsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAppMonitors", params, optFns, c.addOperationListAppMonitorsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAppMonitorsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAppMonitorsInput struct { + + // The maximum number of results to return in one operation. + MaxResults *int32 + + // Use the token returned by the previous operation to request the next page of + // results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListAppMonitorsOutput struct { + + // An array of structures that contain information about the returned app monitors. + AppMonitorSummaries []types.AppMonitorSummary + + // A token that you can use in a subsequent operation to retrieve the next set of + // results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListAppMonitorsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListAppMonitors{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAppMonitors{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAppMonitors(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListAppMonitorsAPIClient is a client that implements the ListAppMonitors +// operation. +type ListAppMonitorsAPIClient interface { + ListAppMonitors(context.Context, *ListAppMonitorsInput, ...func(*Options)) (*ListAppMonitorsOutput, error) +} + +var _ ListAppMonitorsAPIClient = (*Client)(nil) + +// ListAppMonitorsPaginatorOptions is the paginator options for ListAppMonitors +type ListAppMonitorsPaginatorOptions struct { + // The maximum number of results to return in one operation. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListAppMonitorsPaginator is a paginator for ListAppMonitors +type ListAppMonitorsPaginator struct { + options ListAppMonitorsPaginatorOptions + client ListAppMonitorsAPIClient + params *ListAppMonitorsInput + nextToken *string + firstPage bool +} + +// NewListAppMonitorsPaginator returns a new ListAppMonitorsPaginator +func NewListAppMonitorsPaginator(client ListAppMonitorsAPIClient, params *ListAppMonitorsInput, optFns ...func(*ListAppMonitorsPaginatorOptions)) *ListAppMonitorsPaginator { + if params == nil { + params = &ListAppMonitorsInput{} + } + + options := ListAppMonitorsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListAppMonitorsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListAppMonitorsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListAppMonitors page. +func (p *ListAppMonitorsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAppMonitorsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListAppMonitors(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListAppMonitors(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "rum", + OperationName: "ListAppMonitors", + } +} diff --git a/service/rum/api_op_ListTagsForResource.go b/service/rum/api_op_ListTagsForResource.go new file mode 100644 index 00000000000..9718ccfa780 --- /dev/null +++ b/service/rum/api_op_ListTagsForResource.go @@ -0,0 +1,127 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rum + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Displays the tags associated with a CloudWatch RUM resource. +func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { + if params == nil { + params = &ListTagsForResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTagsForResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListTagsForResourceInput struct { + + // The ARN of the resource that you want to see the tags of. + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + +type ListTagsForResourceOutput struct { + + // The ARN of the resource that you are viewing. + // + // This member is required. + ResourceArn *string + + // The list of tag keys and values associated with the resource you specified. + // + // This member is required. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "rum", + OperationName: "ListTagsForResource", + } +} diff --git a/service/rum/api_op_PutRumEvents.go b/service/rum/api_op_PutRumEvents.go new file mode 100644 index 00000000000..8c5f2fa730d --- /dev/null +++ b/service/rum/api_op_PutRumEvents.go @@ -0,0 +1,173 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rum + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/rum/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Sends telemetry events about your application performance and user behavior to +// CloudWatch RUM. The code snippet that RUM generates for you to add to your +// application includes PutRumEvents operations to send this data to RUM. Each +// PutRumEvents operation can send a batch of events from one user session. +func (c *Client) PutRumEvents(ctx context.Context, params *PutRumEventsInput, optFns ...func(*Options)) (*PutRumEventsOutput, error) { + if params == nil { + params = &PutRumEventsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutRumEvents", params, optFns, c.addOperationPutRumEventsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutRumEventsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutRumEventsInput struct { + + // A structure that contains information about the app monitor that collected this + // telemetry information. + // + // This member is required. + AppMonitorDetails *types.AppMonitorDetails + + // A unique identifier for this batch of RUM event data. + // + // This member is required. + BatchId *string + + // The ID of the app monitor that is sending this data. + // + // This member is required. + Id *string + + // An array of structures that contain the telemetry event data. + // + // This member is required. + RumEvents []types.RumEvent + + // A structure that contains information about the user session that this batch of + // events was collected from. + // + // This member is required. + UserDetails *types.UserDetails + + noSmithyDocumentSerde +} + +type PutRumEventsOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutRumEventsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpPutRumEvents{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutRumEvents{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addEndpointPrefix_opPutRumEventsMiddleware(stack); err != nil { + return err + } + if err = addOpPutRumEventsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutRumEvents(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type endpointPrefix_opPutRumEventsMiddleware struct { +} + +func (*endpointPrefix_opPutRumEventsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opPutRumEventsMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "dataplane." + req.URL.Host + + return next.HandleSerialize(ctx, in) +} +func addEndpointPrefix_opPutRumEventsMiddleware(stack *middleware.Stack) error { + return stack.Serialize.Insert(&endpointPrefix_opPutRumEventsMiddleware{}, `OperationSerializer`, middleware.After) +} + +func newServiceMetadataMiddleware_opPutRumEvents(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "rum", + OperationName: "PutRumEvents", + } +} diff --git a/service/rum/api_op_TagResource.go b/service/rum/api_op_TagResource.go new file mode 100644 index 00000000000..d841f7b8dde --- /dev/null +++ b/service/rum/api_op_TagResource.go @@ -0,0 +1,133 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rum + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Assigns one or more tags (key-value pairs) to the specified CloudWatch RUM +// resource. Currently, the only resources that can be tagged app monitors. Tags +// can help you organize and categorize your resources. You can also use them to +// scope user permissions by granting a user permission to access or change only +// resources with certain tag values. Tags don't have any semantic meaning to +// Amazon Web Services and are interpreted strictly as strings of characters. You +// can use the TagResource action with a resource that already has tags. If you +// specify a new tag key for the resource, this tag is appended to the list of tags +// associated with the alarm. If you specify a tag key that is already associated +// with the resource, the new tag value that you specify replaces the previous +// value for that tag. You can associate as many as 50 tags with a resource. For +// more information, see Tagging Amazon Web Services resources +// (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html). +func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { + if params == nil { + params = &TagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TagResourceInput struct { + + // The ARN of the CloudWatch RUM resource that you're adding tags to. + // + // This member is required. + ResourceArn *string + + // The list of key-value pairs to associate with the resource. + // + // This member is required. + Tags map[string]string + + noSmithyDocumentSerde +} + +type TagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpTagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "rum", + OperationName: "TagResource", + } +} diff --git a/service/rum/api_op_UntagResource.go b/service/rum/api_op_UntagResource.go new file mode 100644 index 00000000000..dd490111e24 --- /dev/null +++ b/service/rum/api_op_UntagResource.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rum + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes one or more tags from the specified resource. +func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { + if params == nil { + params = &UntagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UntagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UntagResourceInput struct { + + // The ARN of the CloudWatch RUM resource that you're removing tags from. + // + // This member is required. + ResourceArn *string + + // The list of tag keys to remove from the resource. + // + // This member is required. + TagKeys []string + + noSmithyDocumentSerde +} + +type UntagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUntagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "rum", + OperationName: "UntagResource", + } +} diff --git a/service/rum/api_op_UpdateAppMonitor.go b/service/rum/api_op_UpdateAppMonitor.go new file mode 100644 index 00000000000..75008aae633 --- /dev/null +++ b/service/rum/api_op_UpdateAppMonitor.go @@ -0,0 +1,147 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rum + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/rum/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the configuration of an existing app monitor. When you use this +// operation, only the parts of the app monitor configuration that you specify in +// this operation are changed. For any parameters that you omit, the existing +// values are kept. You can't use this operation to change the tags of an existing +// app monitor. To change the tags of an existing app monitor, use TagResource +// (https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_TagResource.html). +// To create a new app monitor, use CreateAppMonitor +// (https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_CreateAppMonitor.html). +// After you update an app monitor, sign in to the CloudWatch RUM console to get +// the updated JavaScript code snippet to add to your web application. For more +// information, see How do I find a code snippet that I've already generated? +// (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-find-code-snippet.html) +func (c *Client) UpdateAppMonitor(ctx context.Context, params *UpdateAppMonitorInput, optFns ...func(*Options)) (*UpdateAppMonitorOutput, error) { + if params == nil { + params = &UpdateAppMonitorInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateAppMonitor", params, optFns, c.addOperationUpdateAppMonitorMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateAppMonitorOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateAppMonitorInput struct { + + // The name of the app monitor to update. + // + // This member is required. + Name *string + + // A structure that contains much of the configuration data for the app monitor. If + // you are using Amazon Cognito for authorization, you must include this structure + // in your request, and it must include the ID of the Amazon Cognito identity pool + // to use for authorization. If you don't include AppMonitorConfiguration, you must + // set up your own authorization method. For more information, see Authorize your + // application to send data to Amazon Web Services + // (https://docs.aws.amazon.com/monitoring/CloudWatch-RUM-get-started-authorization.html). + AppMonitorConfiguration *types.AppMonitorConfiguration + + // Data collected by RUM is kept by RUM for 30 days and then deleted. This + // parameter specifies whether RUM sends a copy of this telemetry data to Amazon + // CloudWatch Logs in your account. This enables you to keep the telemetry data for + // more than 30 days, but it does incur Amazon CloudWatch Logs charges. + CwLogEnabled *bool + + // The top-level internet domain name for which your application has administrative + // authority. + Domain *string + + noSmithyDocumentSerde +} + +type UpdateAppMonitorOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateAppMonitorMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateAppMonitor{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateAppMonitor{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateAppMonitorValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAppMonitor(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateAppMonitor(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "rum", + OperationName: "UpdateAppMonitor", + } +} diff --git a/service/rum/deserializers.go b/service/rum/deserializers.go new file mode 100644 index 00000000000..011f8000d76 --- /dev/null +++ b/service/rum/deserializers.go @@ -0,0 +1,2558 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rum + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/rum/types" + smithy "github.com/aws/smithy-go" + smithyio "github.com/aws/smithy-go/io" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" + "math" + "strconv" + "strings" +) + +type awsRestjson1_deserializeOpCreateAppMonitor struct { +} + +func (*awsRestjson1_deserializeOpCreateAppMonitor) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateAppMonitor) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCreateAppMonitor(response, &metadata) + } + output := &CreateAppMonitorOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreateAppMonitorOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateAppMonitor(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateAppMonitorOutput(v **CreateAppMonitorOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateAppMonitorOutput + if *v == nil { + sv = &CreateAppMonitorOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AppMonitorId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteAppMonitor struct { +} + +func (*awsRestjson1_deserializeOpDeleteAppMonitor) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteAppMonitor) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteAppMonitor(response, &metadata) + } + output := &DeleteAppMonitorOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteAppMonitor(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpGetAppMonitor struct { +} + +func (*awsRestjson1_deserializeOpGetAppMonitor) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetAppMonitor) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetAppMonitor(response, &metadata) + } + output := &GetAppMonitorOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetAppMonitorOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetAppMonitor(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetAppMonitorOutput(v **GetAppMonitorOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetAppMonitorOutput + if *v == nil { + sv = &GetAppMonitorOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AppMonitor": + if err := awsRestjson1_deserializeDocumentAppMonitor(&sv.AppMonitor, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetAppMonitorData struct { +} + +func (*awsRestjson1_deserializeOpGetAppMonitorData) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetAppMonitorData) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetAppMonitorData(response, &metadata) + } + output := &GetAppMonitorDataOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetAppMonitorDataOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetAppMonitorData(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetAppMonitorDataOutput(v **GetAppMonitorDataOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetAppMonitorDataOutput + if *v == nil { + sv = &GetAppMonitorDataOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Events": + if err := awsRestjson1_deserializeDocumentEventDataList(&sv.Events, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Token to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListAppMonitors struct { +} + +func (*awsRestjson1_deserializeOpListAppMonitors) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListAppMonitors) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListAppMonitors(response, &metadata) + } + output := &ListAppMonitorsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListAppMonitorsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListAppMonitors(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListAppMonitorsOutput(v **ListAppMonitorsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListAppMonitorsOutput + if *v == nil { + sv = &ListAppMonitorsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AppMonitorSummaries": + if err := awsRestjson1_deserializeDocumentAppMonitorSummaryList(&sv.AppMonitorSummaries, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListTagsForResource struct { +} + +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) + } + output := &ListTagsForResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListTagsForResourceOutput + if *v == nil { + sv = &ListTagsForResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ResourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.ResourceArn = ptr.String(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPutRumEvents struct { +} + +func (*awsRestjson1_deserializeOpPutRumEvents) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutRumEvents) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorPutRumEvents(response, &metadata) + } + output := &PutRumEventsOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPutRumEvents(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpTagResource struct { +} + +func (*awsRestjson1_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) + } + output := &TagResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUntagResource struct { +} + +func (*awsRestjson1_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) + } + output := &UntagResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUpdateAppMonitor struct { +} + +func (*awsRestjson1_deserializeOpUpdateAppMonitor) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateAppMonitor) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateAppMonitor(response, &metadata) + } + output := &UpdateAppMonitorOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateAppMonitor(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsInternalServerException(v *types.InternalServerException, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("Retry-After"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + vv, err := strconv.ParseInt(headerValues[0], 0, 32) + if err != nil { + return err + } + v.RetryAfterSeconds = ptr.Int32(int32(vv)) + } + + return nil +} +func awsRestjson1_deserializeOpHttpBindingsThrottlingException(v *types.ThrottlingException, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("Retry-After"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + vv, err := strconv.ParseInt(headerValues[0], 0, 32) + if err != nil { + return err + } + v.RetryAfterSeconds = ptr.Int32(int32(vv)) + } + + return nil +} +func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDeniedException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ConflictException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentConflictException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalServerException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + if err := awsRestjson1_deserializeOpHttpBindingsInternalServerException(output, response); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response error with invalid HTTP bindings, %w", err)} + } + + return output +} + +func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceNotFoundException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServiceQuotaExceededException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentServiceQuotaExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ThrottlingException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentThrottlingException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + if err := awsRestjson1_deserializeOpHttpBindingsThrottlingException(output, response); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response error with invalid HTTP bindings, %w", err)} + } + + return output +} + +func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ValidationException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentValidationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAppMonitor(v **types.AppMonitor, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AppMonitor + if *v == nil { + sv = &types.AppMonitor{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AppMonitorConfiguration": + if err := awsRestjson1_deserializeDocumentAppMonitorConfiguration(&sv.AppMonitorConfiguration, value); err != nil { + return err + } + + case "Created": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ISOTimestampString to be of type string, got %T instead", value) + } + sv.Created = ptr.String(jtv) + } + + case "DataStorage": + if err := awsRestjson1_deserializeDocumentDataStorage(&sv.DataStorage, value); err != nil { + return err + } + + case "Domain": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AppMonitorDomain to be of type string, got %T instead", value) + } + sv.Domain = ptr.String(jtv) + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AppMonitorId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "LastModified": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ISOTimestampString to be of type string, got %T instead", value) + } + sv.LastModified = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AppMonitorName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StateEnum to be of type string, got %T instead", value) + } + sv.State = types.StateEnum(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAppMonitorConfiguration(v **types.AppMonitorConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AppMonitorConfiguration + if *v == nil { + sv = &types.AppMonitorConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AllowCookies": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.AllowCookies = ptr.Bool(jtv) + } + + case "EnableXRay": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.EnableXRay = ptr.Bool(jtv) + } + + case "ExcludedPages": + if err := awsRestjson1_deserializeDocumentPages(&sv.ExcludedPages, value); err != nil { + return err + } + + case "FavoritePages": + if err := awsRestjson1_deserializeDocumentFavoritePages(&sv.FavoritePages, value); err != nil { + return err + } + + case "GuestRoleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.GuestRoleArn = ptr.String(jtv) + } + + case "IdentityPoolId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdentityPoolId to be of type string, got %T instead", value) + } + sv.IdentityPoolId = ptr.String(jtv) + } + + case "IncludedPages": + if err := awsRestjson1_deserializeDocumentPages(&sv.IncludedPages, value); err != nil { + return err + } + + case "SessionSampleRate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.SessionSampleRate = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.SessionSampleRate = f64 + + default: + return fmt.Errorf("expected SessionSampleRate to be a JSON Number, got %T instead", value) + + } + } + + case "Telemetries": + if err := awsRestjson1_deserializeDocumentTelemetries(&sv.Telemetries, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAppMonitorSummary(v **types.AppMonitorSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AppMonitorSummary + if *v == nil { + sv = &types.AppMonitorSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Created": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ISOTimestampString to be of type string, got %T instead", value) + } + sv.Created = ptr.String(jtv) + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AppMonitorId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "LastModified": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ISOTimestampString to be of type string, got %T instead", value) + } + sv.LastModified = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AppMonitorName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StateEnum to be of type string, got %T instead", value) + } + sv.State = types.StateEnum(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAppMonitorSummaryList(v *[]types.AppMonitorSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.AppMonitorSummary + if *v == nil { + cv = []types.AppMonitorSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AppMonitorSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentAppMonitorSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConflictException + if *v == nil { + sv = &types.ConflictException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "resourceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceName = ptr.String(jtv) + } + + case "resourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCwLog(v **types.CwLog, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CwLog + if *v == nil { + sv = &types.CwLog{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CwLogEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.CwLogEnabled = ptr.Bool(jtv) + } + + case "CwLogGroup": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CwLogGroup = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDataStorage(v **types.DataStorage, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DataStorage + if *v == nil { + sv = &types.DataStorage{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CwLog": + if err := awsRestjson1_deserializeDocumentCwLog(&sv.CwLog, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEventDataList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventData to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentFavoritePages(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InternalServerException + if *v == nil { + sv = &types.InternalServerException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "retryAfterSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RetryAfterSeconds = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPages(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Url to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceNotFoundException + if *v == nil { + sv = &types.ResourceNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "resourceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceName = ptr.String(jtv) + } + + case "resourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ServiceQuotaExceededException + if *v == nil { + sv = &types.ServiceQuotaExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTagMap(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentTelemetries(v *[]types.Telemetry, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Telemetry + if *v == nil { + cv = []types.Telemetry{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Telemetry + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Telemetry to be of type string, got %T instead", value) + } + col = types.Telemetry(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ThrottlingException + if *v == nil { + sv = &types.ThrottlingException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "quotaCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.QuotaCode = ptr.String(jtv) + } + + case "retryAfterSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RetryAfterSeconds = ptr.Int32(int32(i64)) + } + + case "serviceCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ServiceCode = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ValidationException + if *v == nil { + sv = &types.ValidationException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} diff --git a/service/rum/doc.go b/service/rum/doc.go new file mode 100644 index 00000000000..cdd6e30634f --- /dev/null +++ b/service/rum/doc.go @@ -0,0 +1,17 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package rum provides the API client, operations, and parameter types for +// CloudWatch RUM. +// +// With Amazon CloudWatch RUM, you can perform real-user monitoring to collect +// client-side data about your web application performance from actual user +// sessions in real time. The data collected includes page load times, client-side +// errors, and user behavior. When you view this data, you can see it all +// aggregated together and also see breakdowns by the browsers and devices that +// your customers use. You can use the collected data to quickly identify and debug +// client-side performance issues. CloudWatch RUM helps you visualize anomalies in +// your application performance and find relevant debugging data such as error +// messages, stack traces, and user sessions. You can also use RUM to understand +// the range of end-user impact including the number of users, geolocations, and +// browsers used. +package rum diff --git a/service/rum/endpoints.go b/service/rum/endpoints.go new file mode 100644 index 00000000000..68be284e9b4 --- /dev/null +++ b/service/rum/endpoints.go @@ -0,0 +1,200 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rum + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + internalendpoints "github.com/aws/aws-sdk-go-v2/service/rum/internal/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/url" + "strings" +) + +// EndpointResolverOptions is the service endpoint resolver options +type EndpointResolverOptions = internalendpoints.Options + +// EndpointResolver interface for resolving service endpoints. +type EndpointResolver interface { + ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) +} + +var _ EndpointResolver = &internalendpoints.Resolver{} + +// NewDefaultEndpointResolver constructs a new service endpoint resolver +func NewDefaultEndpointResolver() *internalendpoints.Resolver { + return internalendpoints.New() +} + +// EndpointResolverFunc is a helper utility that wraps a function so it satisfies +// the EndpointResolver interface. This is useful when you want to add additional +// endpoint resolving logic, or stub out specific endpoints with custom values. +type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) + +func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + return fn(region, options) +} + +func resolveDefaultEndpointConfiguration(o *Options) { + if o.EndpointResolver != nil { + return + } + o.EndpointResolver = NewDefaultEndpointResolver() +} + +// EndpointResolverFromURL returns an EndpointResolver configured using the +// provided endpoint url. By default, the resolved endpoint resolver uses the +// client region as signing region, and the endpoint source is set to +// EndpointSourceCustom.You can provide functional options to configure endpoint +// values for the resolved endpoint. +func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { + e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} + for _, fn := range optFns { + fn(&e) + } + + return EndpointResolverFunc( + func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { + if len(e.SigningRegion) == 0 { + e.SigningRegion = region + } + return e, nil + }, + ) +} + +type ResolveEndpoint struct { + Resolver EndpointResolver + Options EndpointResolverOptions +} + +func (*ResolveEndpoint) ID() string { + return "ResolveEndpoint" +} + +func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.Resolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + eo := m.Options + eo.Logger = middleware.GetLogger(ctx) + + var endpoint aws.Endpoint + endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL, err = url.Parse(endpoint.URL) + if err != nil { + return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) + } + + if len(awsmiddleware.GetSigningName(ctx)) == 0 { + signingName := endpoint.SigningName + if len(signingName) == 0 { + signingName = "rum" + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + } + ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) + ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) + ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) + ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) + return next.HandleSerialize(ctx, in) +} +func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { + return stack.Serialize.Insert(&ResolveEndpoint{ + Resolver: o.EndpointResolver, + Options: o.EndpointOptions, + }, "OperationSerializer", middleware.Before) +} + +func removeResolveEndpointMiddleware(stack *middleware.Stack) error { + _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) + return err +} + +type wrappedEndpointResolver struct { + awsResolver aws.EndpointResolverWithOptions + resolver EndpointResolver +} + +func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + if w.awsResolver == nil { + goto fallback + } + endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options) + if err == nil { + return endpoint, nil + } + + if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) { + return endpoint, err + } + +fallback: + if w.resolver == nil { + return endpoint, fmt.Errorf("default endpoint resolver provided was nil") + } + return w.resolver.ResolveEndpoint(region, options) +} + +type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) + +func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { + return a(service, region) +} + +var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) + +// withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. +// If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided +// fallbackResolver for resolution. +// +// fallbackResolver must not be nil +func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver { + var resolver aws.EndpointResolverWithOptions + + if awsResolverWithOptions != nil { + resolver = awsResolverWithOptions + } else if awsResolver != nil { + resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) + } + + return &wrappedEndpointResolver{ + awsResolver: resolver, + resolver: fallbackResolver, + } +} + +func finalizeClientEndpointResolverOptions(options *Options) { + options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() + + if len(options.EndpointOptions.ResolvedRegion) == 0 { + const fipsInfix = "-fips-" + const fipsPrefix = "fips-" + const fipsSuffix = "-fips" + + if strings.Contains(options.Region, fipsInfix) || + strings.Contains(options.Region, fipsPrefix) || + strings.Contains(options.Region, fipsSuffix) { + options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( + options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") + options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled + } + } + +} diff --git a/service/rum/generated.json b/service/rum/generated.json new file mode 100644 index 00000000000..c05ecd80bfb --- /dev/null +++ b/service/rum/generated.json @@ -0,0 +1,36 @@ +{ + "dependencies": { + "github.com/aws/aws-sdk-go-v2": "v1.4.0", + "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", + "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", + "github.com/aws/smithy-go": "v1.4.0" + }, + "files": [ + "api_client.go", + "api_op_CreateAppMonitor.go", + "api_op_DeleteAppMonitor.go", + "api_op_GetAppMonitor.go", + "api_op_GetAppMonitorData.go", + "api_op_ListAppMonitors.go", + "api_op_ListTagsForResource.go", + "api_op_PutRumEvents.go", + "api_op_TagResource.go", + "api_op_UntagResource.go", + "api_op_UpdateAppMonitor.go", + "deserializers.go", + "doc.go", + "endpoints.go", + "generated.json", + "internal/endpoints/endpoints.go", + "internal/endpoints/endpoints_test.go", + "protocol_test.go", + "serializers.go", + "types/enums.go", + "types/errors.go", + "types/types.go", + "validators.go" + ], + "go": "1.15", + "module": "github.com/aws/aws-sdk-go-v2/service/rum", + "unstable": false +} diff --git a/service/rum/go.mod b/service/rum/go.mod new file mode 100644 index 00000000000..61aacbe451a --- /dev/null +++ b/service/rum/go.mod @@ -0,0 +1,16 @@ +module github.com/aws/aws-sdk-go-v2/service/rum + +go 1.15 + +require ( + github.com/aws/aws-sdk-go-v2 v1.11.1 + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.1 + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.0.1 + github.com/aws/smithy-go v1.9.0 +) + +replace github.com/aws/aws-sdk-go-v2 => ../../ + +replace github.com/aws/aws-sdk-go-v2/internal/configsources => ../../internal/configsources/ + +replace github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 => ../../internal/endpoints/v2/ diff --git a/service/rum/go.sum b/service/rum/go.sum new file mode 100644 index 00000000000..45efc0b1e03 --- /dev/null +++ b/service/rum/go.sum @@ -0,0 +1,14 @@ +github.com/aws/smithy-go v1.9.0 h1:c7FUdEqrQA1/UVKKCNDFQPNKGp4FQg3YW4Ck5SLTG58= +github.com/aws/smithy-go v1.9.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/service/rum/go_module_metadata.go b/service/rum/go_module_metadata.go new file mode 100644 index 00000000000..6676ca6deb5 --- /dev/null +++ b/service/rum/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package rum + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "tip" diff --git a/service/rum/internal/endpoints/endpoints.go b/service/rum/internal/endpoints/endpoints.go new file mode 100644 index 00000000000..b27e7b47d77 --- /dev/null +++ b/service/rum/internal/endpoints/endpoints.go @@ -0,0 +1,250 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "github.com/aws/aws-sdk-go-v2/aws" + endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" + "github.com/aws/smithy-go/logging" + "regexp" +) + +// Options is the endpoint resolver configuration options +type Options struct { + // Logger is a logging implementation that log events should be sent to. + Logger logging.Logger + + // LogDeprecated indicates that deprecated endpoints should be logged to the + // provided logger. + LogDeprecated bool + + // ResolvedRegion is used to override the region to be resolved, rather then the + // using the value passed to the ResolveEndpoint method. This value is used by the + // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative + // name. You must not set this value directly in your application. + ResolvedRegion string + + // DisableHTTPS informs the resolver to return an endpoint that does not use the + // HTTPS scheme. + DisableHTTPS bool + + // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. + UseDualStackEndpoint aws.DualStackEndpointState + + // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. + UseFIPSEndpoint aws.FIPSEndpointState +} + +func (o Options) GetResolvedRegion() string { + return o.ResolvedRegion +} + +func (o Options) GetDisableHTTPS() bool { + return o.DisableHTTPS +} + +func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { + return o.UseDualStackEndpoint +} + +func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { + return o.UseFIPSEndpoint +} + +func transformToSharedOptions(options Options) endpoints.Options { + return endpoints.Options{ + Logger: options.Logger, + LogDeprecated: options.LogDeprecated, + ResolvedRegion: options.ResolvedRegion, + DisableHTTPS: options.DisableHTTPS, + UseDualStackEndpoint: options.UseDualStackEndpoint, + UseFIPSEndpoint: options.UseFIPSEndpoint, + } +} + +// Resolver RUM endpoint resolver +type Resolver struct { + partitions endpoints.Partitions +} + +// ResolveEndpoint resolves the service endpoint for the given region and options +func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { + if len(region) == 0 { + return endpoint, &aws.MissingRegionError{} + } + + opt := transformToSharedOptions(options) + return r.partitions.ResolveEndpoint(region, opt) +} + +// New returns a new Resolver +func New() *Resolver { + return &Resolver{ + partitions: defaultPartitions, + } +} + +var partitionRegexp = struct { + Aws *regexp.Regexp + AwsCn *regexp.Regexp + AwsIso *regexp.Regexp + AwsIsoB *regexp.Regexp + AwsUsGov *regexp.Regexp +}{ + + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"), + AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), + AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), + AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), + AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), +} + +var defaultPartitions = endpoints.Partitions{ + { + ID: "aws", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "rum.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "rum-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "rum-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "rum.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: true, + }, + { + ID: "aws-cn", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "rum.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "rum-fips.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "rum-fips.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "rum.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsCn, + IsRegionalized: true, + }, + { + ID: "aws-iso", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "rum-fips.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "rum.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIso, + IsRegionalized: true, + }, + { + ID: "aws-iso-b", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "rum-fips.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "rum.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoB, + IsRegionalized: true, + }, + { + ID: "aws-us-gov", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "rum.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "rum-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "rum-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "rum.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: true, + }, +} diff --git a/service/rum/internal/endpoints/endpoints_test.go b/service/rum/internal/endpoints/endpoints_test.go new file mode 100644 index 00000000000..08e5da2d833 --- /dev/null +++ b/service/rum/internal/endpoints/endpoints_test.go @@ -0,0 +1,11 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "testing" +) + +func TestRegexCompile(t *testing.T) { + _ = defaultPartitions +} diff --git a/service/rum/protocol_test.go b/service/rum/protocol_test.go new file mode 100644 index 00000000000..6cab9c8181e --- /dev/null +++ b/service/rum/protocol_test.go @@ -0,0 +1,3 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rum diff --git a/service/rum/serializers.go b/service/rum/serializers.go new file mode 100644 index 00000000000..69e2f3674dc --- /dev/null +++ b/service/rum/serializers.go @@ -0,0 +1,1043 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rum + +import ( + "bytes" + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/rum/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/encoding/httpbinding" + smithyjson "github.com/aws/smithy-go/encoding/json" + "github.com/aws/smithy-go/middleware" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + "math" +) + +type awsRestjson1_serializeOpCreateAppMonitor struct { +} + +func (*awsRestjson1_serializeOpCreateAppMonitor) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateAppMonitor) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateAppMonitorInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/appmonitor") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateAppMonitorInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateAppMonitorInput(v *CreateAppMonitorInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateAppMonitorInput(v *CreateAppMonitorInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AppMonitorConfiguration != nil { + ok := object.Key("AppMonitorConfiguration") + if err := awsRestjson1_serializeDocumentAppMonitorConfiguration(v.AppMonitorConfiguration, ok); err != nil { + return err + } + } + + if v.CwLogEnabled != nil { + ok := object.Key("CwLogEnabled") + ok.Boolean(*v.CwLogEnabled) + } + + if v.Domain != nil { + ok := object.Key("Domain") + ok.String(*v.Domain) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteAppMonitor struct { +} + +func (*awsRestjson1_serializeOpDeleteAppMonitor) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteAppMonitor) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteAppMonitorInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/appmonitor/{Name}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteAppMonitorInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteAppMonitorInput(v *DeleteAppMonitorInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("Name").String(*v.Name); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetAppMonitor struct { +} + +func (*awsRestjson1_serializeOpGetAppMonitor) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetAppMonitor) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetAppMonitorInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/appmonitor/{Name}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetAppMonitorInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetAppMonitorInput(v *GetAppMonitorInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("Name").String(*v.Name); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetAppMonitorData struct { +} + +func (*awsRestjson1_serializeOpGetAppMonitorData) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetAppMonitorData) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetAppMonitorDataInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/appmonitor/{Name}/data") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetAppMonitorDataInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentGetAppMonitorDataInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetAppMonitorDataInput(v *GetAppMonitorDataInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("Name").String(*v.Name); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentGetAppMonitorDataInput(v *GetAppMonitorDataInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsRestjson1_serializeDocumentQueryFilters(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != 0 { + ok := object.Key("MaxResults") + ok.Integer(v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.TimeRange != nil { + ok := object.Key("TimeRange") + if err := awsRestjson1_serializeDocumentTimeRange(v.TimeRange, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpListAppMonitors struct { +} + +func (*awsRestjson1_serializeOpListAppMonitors) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListAppMonitors) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListAppMonitorsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/appmonitors") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListAppMonitorsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListAppMonitorsInput(v *ListAppMonitorsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListTagsForResource struct { +} + +func (*awsRestjson1_serializeOpListTagsForResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListTagsForResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpPutRumEvents struct { +} + +func (*awsRestjson1_serializeOpPutRumEvents) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPutRumEvents) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutRumEventsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/appmonitors/{Id}/") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsPutRumEventsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPutRumEventsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsPutRumEventsInput(v *PutRumEventsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentPutRumEventsInput(v *PutRumEventsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AppMonitorDetails != nil { + ok := object.Key("AppMonitorDetails") + if err := awsRestjson1_serializeDocumentAppMonitorDetails(v.AppMonitorDetails, ok); err != nil { + return err + } + } + + if v.BatchId != nil { + ok := object.Key("BatchId") + ok.String(*v.BatchId) + } + + if v.RumEvents != nil { + ok := object.Key("RumEvents") + if err := awsRestjson1_serializeDocumentRumEventList(v.RumEvents, ok); err != nil { + return err + } + } + + if v.UserDetails != nil { + ok := object.Key("UserDetails") + if err := awsRestjson1_serializeDocumentUserDetails(v.UserDetails, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpTagResource struct { +} + +func (*awsRestjson1_serializeOpTagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*TagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUntagResource struct { +} + +func (*awsRestjson1_serializeOpUntagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UntagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + if v.TagKeys != nil { + for i := range v.TagKeys { + encoder.AddQuery("tagKeys").String(v.TagKeys[i]) + } + } + + return nil +} + +type awsRestjson1_serializeOpUpdateAppMonitor struct { +} + +func (*awsRestjson1_serializeOpUpdateAppMonitor) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateAppMonitor) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateAppMonitorInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/appmonitor/{Name}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PATCH" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateAppMonitorInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateAppMonitorInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateAppMonitorInput(v *UpdateAppMonitorInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("Name").String(*v.Name); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateAppMonitorInput(v *UpdateAppMonitorInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AppMonitorConfiguration != nil { + ok := object.Key("AppMonitorConfiguration") + if err := awsRestjson1_serializeDocumentAppMonitorConfiguration(v.AppMonitorConfiguration, ok); err != nil { + return err + } + } + + if v.CwLogEnabled != nil { + ok := object.Key("CwLogEnabled") + ok.Boolean(*v.CwLogEnabled) + } + + if v.Domain != nil { + ok := object.Key("Domain") + ok.String(*v.Domain) + } + + return nil +} + +func awsRestjson1_serializeDocumentAppMonitorConfiguration(v *types.AppMonitorConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AllowCookies != nil { + ok := object.Key("AllowCookies") + ok.Boolean(*v.AllowCookies) + } + + if v.EnableXRay != nil { + ok := object.Key("EnableXRay") + ok.Boolean(*v.EnableXRay) + } + + if v.ExcludedPages != nil { + ok := object.Key("ExcludedPages") + if err := awsRestjson1_serializeDocumentPages(v.ExcludedPages, ok); err != nil { + return err + } + } + + if v.FavoritePages != nil { + ok := object.Key("FavoritePages") + if err := awsRestjson1_serializeDocumentFavoritePages(v.FavoritePages, ok); err != nil { + return err + } + } + + if v.GuestRoleArn != nil { + ok := object.Key("GuestRoleArn") + ok.String(*v.GuestRoleArn) + } + + if v.IdentityPoolId != nil { + ok := object.Key("IdentityPoolId") + ok.String(*v.IdentityPoolId) + } + + if v.IncludedPages != nil { + ok := object.Key("IncludedPages") + if err := awsRestjson1_serializeDocumentPages(v.IncludedPages, ok); err != nil { + return err + } + } + + if v.SessionSampleRate != 0 { + ok := object.Key("SessionSampleRate") + switch { + case math.IsNaN(v.SessionSampleRate): + ok.String("NaN") + + case math.IsInf(v.SessionSampleRate, 1): + ok.String("Infinity") + + case math.IsInf(v.SessionSampleRate, -1): + ok.String("-Infinity") + + default: + ok.Double(v.SessionSampleRate) + + } + } + + if v.Telemetries != nil { + ok := object.Key("Telemetries") + if err := awsRestjson1_serializeDocumentTelemetries(v.Telemetries, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentAppMonitorDetails(v *types.AppMonitorDetails, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Id != nil { + ok := object.Key("id") + ok.String(*v.Id) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Version != nil { + ok := object.Key("version") + ok.String(*v.Version) + } + + return nil +} + +func awsRestjson1_serializeDocumentFavoritePages(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentPages(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentQueryFilter(v *types.QueryFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsRestjson1_serializeDocumentQueryFilterValueList(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentQueryFilters(v []types.QueryFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentQueryFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentQueryFilterValueList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentRumEvent(v *types.RumEvent, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Details != nil { + ok := object.Key("details") + ok.String(*v.Details) + } + + if v.Id != nil { + ok := object.Key("id") + ok.String(*v.Id) + } + + if v.Metadata != nil { + ok := object.Key("metadata") + ok.String(*v.Metadata) + } + + if v.Timestamp != nil { + ok := object.Key("timestamp") + ok.Double(smithytime.FormatEpochSeconds(*v.Timestamp)) + } + + if v.Type != nil { + ok := object.Key("type") + ok.String(*v.Type) + } + + return nil +} + +func awsRestjson1_serializeDocumentRumEventList(v []types.RumEvent, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentRumEvent(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentTagMap(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + +func awsRestjson1_serializeDocumentTelemetries(v []types.Telemetry, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsRestjson1_serializeDocumentTimeRange(v *types.TimeRange, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + { + ok := object.Key("After") + ok.Long(v.After) + } + + if v.Before != 0 { + ok := object.Key("Before") + ok.Long(v.Before) + } + + return nil +} + +func awsRestjson1_serializeDocumentUserDetails(v *types.UserDetails, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SessionId != nil { + ok := object.Key("sessionId") + ok.String(*v.SessionId) + } + + if v.UserId != nil { + ok := object.Key("userId") + ok.String(*v.UserId) + } + + return nil +} diff --git a/service/rum/types/enums.go b/service/rum/types/enums.go new file mode 100644 index 00000000000..5c8c69b0ecd --- /dev/null +++ b/service/rum/types/enums.go @@ -0,0 +1,46 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type StateEnum string + +// Enum values for StateEnum +const ( + StateEnumCreated StateEnum = "CREATED" + StateEnumDeleting StateEnum = "DELETING" + StateEnumActive StateEnum = "ACTIVE" +) + +// Values returns all known values for StateEnum. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (StateEnum) Values() []StateEnum { + return []StateEnum{ + "CREATED", + "DELETING", + "ACTIVE", + } +} + +type Telemetry string + +// Enum values for Telemetry +const ( + // Includes JS error event plugin + TelemetryErrors Telemetry = "errors" + // Includes navigation, paint, resource and web vital event plugins + TelemetryPerformance Telemetry = "performance" + // Includes X-Ray Xhr and X-Ray Fetch plugin + TelemetryHttp Telemetry = "http" +) + +// Values returns all known values for Telemetry. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (Telemetry) Values() []Telemetry { + return []Telemetry{ + "errors", + "performance", + "http", + } +} diff --git a/service/rum/types/errors.go b/service/rum/types/errors.go new file mode 100644 index 00000000000..fe719db6372 --- /dev/null +++ b/service/rum/types/errors.go @@ -0,0 +1,153 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "fmt" + smithy "github.com/aws/smithy-go" +) + +// You don't have sufficient permissions to perform this action. +type AccessDeniedException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *AccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AccessDeniedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AccessDeniedException) ErrorCode() string { return "AccessDeniedException" } +func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// This operation attempted to create a resource that already exists. +type ConflictException struct { + Message *string + + ResourceName *string + ResourceType *string + + noSmithyDocumentSerde +} + +func (e *ConflictException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ConflictException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ConflictException) ErrorCode() string { return "ConflictException" } +func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Internal service exception. +type InternalServerException struct { + Message *string + + RetryAfterSeconds *int32 + + noSmithyDocumentSerde +} + +func (e *InternalServerException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InternalServerException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InternalServerException) ErrorCode() string { return "InternalServerException" } +func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// Resource not found. +type ResourceNotFoundException struct { + Message *string + + ResourceName *string + ResourceType *string + + noSmithyDocumentSerde +} + +func (e *ResourceNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceNotFoundException) ErrorCode() string { return "ResourceNotFoundException" } +func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// This request exceeds a service quota. +type ServiceQuotaExceededException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *ServiceQuotaExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceQuotaExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceQuotaExceededException) ErrorCode() string { return "ServiceQuotaExceededException" } +func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request was throttled because of quota limits. +type ThrottlingException struct { + Message *string + + ServiceCode *string + QuotaCode *string + RetryAfterSeconds *int32 + + noSmithyDocumentSerde +} + +func (e *ThrottlingException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ThrottlingException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ThrottlingException) ErrorCode() string { return "ThrottlingException" } +func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// One of the arguments for the request is not valid. +type ValidationException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *ValidationException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ValidationException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ValidationException) ErrorCode() string { return "ValidationException" } +func (e *ValidationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/service/rum/types/types.go b/service/rum/types/types.go new file mode 100644 index 00000000000..b9e25d47ed3 --- /dev/null +++ b/service/rum/types/types.go @@ -0,0 +1,262 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + smithydocument "github.com/aws/smithy-go/document" + "time" +) + +// A RUM app monitor collects telemetry data from your application and sends that +// data to RUM. The data includes performance and reliability information such as +// page load time, client-side errors, and user behavior. +type AppMonitor struct { + + // A structure that contains much of the configuration data for the app monitor. + AppMonitorConfiguration *AppMonitorConfiguration + + // The date and time that this app monitor was created. + Created *string + + // A structure that contains information about whether this app monitor stores a + // copy of the telemetry data that RUM collects using CloudWatch Logs. + DataStorage *DataStorage + + // The top-level internet domain name for which your application has administrative + // authority. + Domain *string + + // The unique ID of this app monitor. + Id *string + + // The date and time of the most recent changes to this app monitor's + // configuration. + LastModified *string + + // The name of the app monitor. + Name *string + + // The current state of the app monitor. + State StateEnum + + // The list of tag keys and values associated with this app monitor. + Tags map[string]string + + noSmithyDocumentSerde +} + +// This structure contains much of the configuration data for the app monitor. +type AppMonitorConfiguration struct { + + // If you set this to true, the RUM web client sets two cookies, a session cookie + // and a user cookie. The cookies allow the RUM web client to collect data relating + // to the number of users an application has and the behavior of the application + // across a sequence of events. Cookies are stored in the top-level domain of the + // current page. + AllowCookies *bool + + // If you set this to true, RUM enables X-Ray tracing for the user sessions that + // RUM samples. RUM adds an X-Ray trace header to allowed HTTP requests. It also + // records an X-Ray segment for allowed HTTP requests. You can see traces and + // segments from these user sessions in the X-Ray console and the CloudWatch + // ServiceLens console. For more information, see What is X-Ray? + // (https://docs.aws.amazon.com/xray/latest/devguide/aws-xray.html) + EnableXRay *bool + + // A list of URLs in your website or application to exclude from RUM data + // collection. You can't include both ExcludedPages and IncludedPages in the same + // operation. + ExcludedPages []string + + // A list of pages in the CloudWatch RUM console that are to be displayed with a + // "favorite" icon. + FavoritePages []string + + // The ARN of the guest IAM role that is attached to the Amazon Cognito identity + // pool that is used to authorize the sending of data to RUM. + GuestRoleArn *string + + // The ID of the Amazon Cognito identity pool that is used to authorize the sending + // of data to RUM. + IdentityPoolId *string + + // If this app monitor is to collect data from only certain pages in your + // application, this structure lists those pages. You can't include both + // ExcludedPages and IncludedPages in the same operation. + IncludedPages []string + + // Specifies the percentage of user sessions to use for RUM data collection. + // Choosing a higher percentage gives you more data but also incurs more costs. The + // number you specify is the percentage of user sessions that will be used. If you + // omit this parameter, the default of 10 is used. + SessionSampleRate float64 + + // An array that lists the types of telemetry data that this app monitor is to + // collect. + // + // * errors indicates that RUM collects data about unhandled JavaScript + // errors raised by your application. + // + // * performance indicates that RUM collects + // performance data about how your application and its resources are loaded and + // rendered. This includes Core Web Vitals. + // + // * http indicates that RUM collects + // data about HTTP errors thrown by your application. + Telemetries []Telemetry + + noSmithyDocumentSerde +} + +// A structure that contains information about the RUM app monitor. +type AppMonitorDetails struct { + + // The unique ID of the app monitor. + Id *string + + // The name of the app monitor. + Name *string + + // The version of the app monitor. + Version *string + + noSmithyDocumentSerde +} + +// A structure that includes some data about app monitors and their settings. +type AppMonitorSummary struct { + + // The date and time that the app monitor was created. + Created *string + + // The unique ID of this app monitor. + Id *string + + // The date and time of the most recent changes to this app monitor's + // configuration. + LastModified *string + + // The name of this app monitor. + Name *string + + // The current state of this app monitor. + State StateEnum + + noSmithyDocumentSerde +} + +// A structure that contains the information about whether the app monitor stores +// copies of the data that RUM collects in CloudWatch Logs. If it does, this +// structure also contains the name of the log group. +type CwLog struct { + + // Indicated whether the app monitor stores copies of the data that RUM collects in + // CloudWatch Logs. + CwLogEnabled *bool + + // The name of the log group where the copies are stored. + CwLogGroup *string + + noSmithyDocumentSerde +} + +// A structure that contains information about whether this app monitor stores a +// copy of the telemetry data that RUM collects using CloudWatch Logs. +type DataStorage struct { + + // A structure that contains the information about whether the app monitor stores + // copies of the data that RUM collects in CloudWatch Logs. If it does, this + // structure also contains the name of the log group. + CwLog *CwLog + + noSmithyDocumentSerde +} + +// A structure that defines a key and values that you can use to filter the +// results. The only performance events that are returned are those that have +// values matching the ones that you specify in one of your QueryFilter structures. +// For example, you could specify Browser as the Name and specify Chrome,Firefox as +// the Values to return events generated only from those browsers. Specifying +// Invert as the Name works as a "not equal to" filter. For example, specify Invert +// as the Name and specify Chrome as the value to return all events except events +// from user sessions with the Chrome browser. +type QueryFilter struct { + + // The name of a key to search for. The filter returns only the events that match + // the Name and Values that you specify. Valid values for Name are Browser | Device + // | Country | Page | OS | EventType | Invert + Name *string + + // The values of the Name that are to be be included in the returned results. + Values []string + + noSmithyDocumentSerde +} + +// A structure that contains the information for one performance event that RUM +// collects from a user session with your application. +type RumEvent struct { + + // A string containing details about the event. + // + // This value conforms to the media type: application/json + // + // This member is required. + Details *string + + // A unique ID for this event. + // + // This member is required. + Id *string + + // The exact time that this event occurred. + // + // This member is required. + Timestamp *time.Time + + // The JSON schema that denotes the type of event this is, such as a page load or a + // new session. + // + // This member is required. + Type *string + + // Metadata about this event, which contains a JSON serialization of the identity + // of the user for this session. The user information comes from information such + // as the HTTP user-agent request header and document interface. + // + // This value conforms to the media type: application/json + Metadata *string + + noSmithyDocumentSerde +} + +// A structure that defines the time range that you want to retrieve results from. +type TimeRange struct { + + // The beginning of the time range to retrieve performance events from. + // + // This member is required. + After int64 + + // The end of the time range to retrieve performance events from. If you omit this, + // the time range extends to the time that this operation is performed. + Before int64 + + noSmithyDocumentSerde +} + +// A structure that contains information about the user session that this batch of +// events was collected from. +type UserDetails struct { + + // The session ID that the performance events are from. + SessionId *string + + // The ID of the user for this user session. This ID is generated by RUM and does + // not include any personally identifiable information about the user. + UserId *string + + noSmithyDocumentSerde +} + +type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/rum/validators.go b/service/rum/validators.go new file mode 100644 index 00000000000..d387ca3a984 --- /dev/null +++ b/service/rum/validators.go @@ -0,0 +1,447 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package rum + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/rum/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpCreateAppMonitor struct { +} + +func (*validateOpCreateAppMonitor) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateAppMonitor) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateAppMonitorInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateAppMonitorInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteAppMonitor struct { +} + +func (*validateOpDeleteAppMonitor) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteAppMonitor) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteAppMonitorInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteAppMonitorInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetAppMonitorData struct { +} + +func (*validateOpGetAppMonitorData) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetAppMonitorData) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetAppMonitorDataInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetAppMonitorDataInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetAppMonitor struct { +} + +func (*validateOpGetAppMonitor) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetAppMonitor) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetAppMonitorInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetAppMonitorInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListTagsForResource struct { +} + +func (*validateOpListTagsForResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListTagsForResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListTagsForResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutRumEvents struct { +} + +func (*validateOpPutRumEvents) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutRumEvents) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutRumEventsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutRumEventsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpTagResource struct { +} + +func (*validateOpTagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUntagResource struct { +} + +func (*validateOpUntagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UntagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUntagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateAppMonitor struct { +} + +func (*validateOpUpdateAppMonitor) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateAppMonitor) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateAppMonitorInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateAppMonitorInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpCreateAppMonitorValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateAppMonitor{}, middleware.After) +} + +func addOpDeleteAppMonitorValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteAppMonitor{}, middleware.After) +} + +func addOpGetAppMonitorDataValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetAppMonitorData{}, middleware.After) +} + +func addOpGetAppMonitorValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetAppMonitor{}, middleware.After) +} + +func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) +} + +func addOpPutRumEventsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutRumEvents{}, middleware.After) +} + +func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) +} + +func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) +} + +func addOpUpdateAppMonitorValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateAppMonitor{}, middleware.After) +} + +func validateRumEvent(v *types.RumEvent) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RumEvent"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if v.Timestamp == nil { + invalidParams.Add(smithy.NewErrParamRequired("Timestamp")) + } + if v.Type == nil { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if v.Details == nil { + invalidParams.Add(smithy.NewErrParamRequired("Details")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRumEventList(v []types.RumEvent) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RumEventList"} + for i := range v { + if err := validateRumEvent(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTimeRange(v *types.TimeRange) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TimeRange"} + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateAppMonitorInput(v *CreateAppMonitorInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateAppMonitorInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Domain == nil { + invalidParams.Add(smithy.NewErrParamRequired("Domain")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteAppMonitorInput(v *DeleteAppMonitorInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteAppMonitorInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetAppMonitorDataInput(v *GetAppMonitorDataInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetAppMonitorDataInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.TimeRange == nil { + invalidParams.Add(smithy.NewErrParamRequired("TimeRange")) + } else if v.TimeRange != nil { + if err := validateTimeRange(v.TimeRange); err != nil { + invalidParams.AddNested("TimeRange", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetAppMonitorInput(v *GetAppMonitorInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetAppMonitorInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutRumEventsInput(v *PutRumEventsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutRumEventsInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if v.BatchId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BatchId")) + } + if v.AppMonitorDetails == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppMonitorDetails")) + } + if v.UserDetails == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserDetails")) + } + if v.RumEvents == nil { + invalidParams.Add(smithy.NewErrParamRequired("RumEvents")) + } else if v.RumEvents != nil { + if err := validateRumEventList(v.RumEvents); err != nil { + invalidParams.AddNested("RumEvents", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpTagResourceInput(v *TagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.Tags == nil { + invalidParams.Add(smithy.NewErrParamRequired("Tags")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUntagResourceInput(v *UntagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.TagKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateAppMonitorInput(v *UpdateAppMonitorInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateAppMonitorInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/s3/api_op_CompleteMultipartUpload.go b/service/s3/api_op_CompleteMultipartUpload.go index 5fc95403acf..12f9a080fa1 100644 --- a/service/s3/api_op_CompleteMultipartUpload.go +++ b/service/s3/api_op_CompleteMultipartUpload.go @@ -31,10 +31,13 @@ import ( // determine whether the request succeeded. Note that if CompleteMultipartUpload // fails, applications should be prepared to retry the failed requests. For more // information, see Amazon S3 Error Best Practices -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/ErrorBestPractices.html). For -// more information about multipart uploads, see Uploading Objects Using Multipart -// Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html). -// For information about permissions required to use the multipart upload API, see +// (https://docs.aws.amazon.com/AmazonS3/latest/dev/ErrorBestPractices.html). You +// cannot use Content-Type: application/x-www-form-urlencoded with Complete +// Multipart Upload requests. Also, if you do not provide a Content-Type header, +// CompleteMultipartUpload returns a 200 OK response. For more information about +// multipart uploads, see Uploading Objects Using Multipart Upload +// (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html). For +// information about permissions required to use the multipart upload API, see // Multipart Upload and Permissions // (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html). // CompleteMultipartUpload has the following special errors: diff --git a/service/s3/api_op_GetBucketNotificationConfiguration.go b/service/s3/api_op_GetBucketNotificationConfiguration.go index 93edf8b6d64..a6bdeaa035b 100644 --- a/service/s3/api_op_GetBucketNotificationConfiguration.go +++ b/service/s3/api_op_GetBucketNotificationConfiguration.go @@ -60,6 +60,9 @@ type GetBucketNotificationConfigurationInput struct { // element is empty, notifications are turned off for the bucket. type GetBucketNotificationConfigurationOutput struct { + // Enables delivery of events to Amazon EventBridge. + EventBridgeConfiguration *types.EventBridgeConfiguration + // Describes the Lambda functions to invoke and the events for which to invoke // them. LambdaFunctionConfigurations []types.LambdaFunctionConfiguration diff --git a/service/s3/api_op_GetObject.go b/service/s3/api_op_GetObject.go index 81264633167..d3575b259a0 100644 --- a/service/s3/api_op_GetObject.go +++ b/service/s3/api_op_GetObject.go @@ -84,15 +84,17 @@ import ( // Versioning By default, the GET action returns the current version of an // object. To return a different version, use the versionId subresource. // -// * You -// need the s3:GetObjectVersion permission to access a specific version of an -// object. +// * If you +// supply a versionId, you need the s3:GetObjectVersion permission to access a +// specific version of an object. If you request a specific version, you do not +// need to have the s3:GetObject permission. // -// * If the current version of the object is a delete marker, Amazon S3 -// behaves as if the object was deleted and includes x-amz-delete-marker: true in -// the response. +// * If the current version of the +// object is a delete marker, Amazon S3 behaves as if the object was deleted and +// includes x-amz-delete-marker: true in the response. // -// For more information about versioning, see PutBucketVersioning +// For more information about +// versioning, see PutBucketVersioning // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html). // Overriding Response Header Values There are times when you want to override // certain response header values in a GET response. For example, you might diff --git a/service/s3/api_op_PutBucketNotificationConfiguration.go b/service/s3/api_op_PutBucketNotificationConfiguration.go index 6322b1081d1..bd9bc06f343 100644 --- a/service/s3/api_op_PutBucketNotificationConfiguration.go +++ b/service/s3/api_op_PutBucketNotificationConfiguration.go @@ -79,6 +79,10 @@ type PutBucketNotificationConfigurationInput struct { // different account, the request will fail with an HTTP 403 (Access Denied) error. ExpectedBucketOwner *string + // Skips validation of Amazon SQS, Amazon SNS, and Lambda destinations. True or + // false value. + SkipDestinationValidation bool + noSmithyDocumentSerde } diff --git a/service/s3/deserializers.go b/service/s3/deserializers.go index 8867bf45195..f6c10a61d8c 100644 --- a/service/s3/deserializers.go +++ b/service/s3/deserializers.go @@ -3954,6 +3954,12 @@ func awsRestxml_deserializeOpDocumentGetBucketNotificationConfigurationOutput(v originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { + case strings.EqualFold("EventBridgeConfiguration", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentEventBridgeConfiguration(&sv.EventBridgeConfiguration, nodeDecoder); err != nil { + return err + } + case strings.EqualFold("CloudFunctionConfiguration", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsRestxml_deserializeDocumentLambdaFunctionConfigurationListUnwrapped(&sv.LambdaFunctionConfigurations, nodeDecoder); err != nil { @@ -14336,6 +14342,42 @@ func awsRestxml_deserializeDocumentErrorsUnwrapped(v *[]types.Error, decoder smi *v = sv return nil } +func awsRestxml_deserializeDocumentEventBridgeConfiguration(v **types.EventBridgeConfiguration, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.EventBridgeConfiguration + if *v == nil { + sv = &types.EventBridgeConfiguration{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsRestxml_deserializeDocumentEventList(v *[]types.Event, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -16225,6 +16267,40 @@ func awsRestxml_deserializeDocumentLifecycleRuleAndOperator(v **types.LifecycleR originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { + case strings.EqualFold("ObjectSizeGreaterThan", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.ObjectSizeGreaterThan = i64 + } + + case strings.EqualFold("ObjectSizeLessThan", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.ObjectSizeLessThan = i64 + } + case strings.EqualFold("Prefix", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -16291,6 +16367,46 @@ func awsRestxml_deserializeDocumentLifecycleRuleFilter(v *types.LifecycleRuleFil uv = &types.LifecycleRuleFilterMemberAnd{Value: mv} memberFound = true + case strings.EqualFold("ObjectSizeGreaterThan", t.Name.Local): + var mv int64 + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + mv = i64 + } + uv = &types.LifecycleRuleFilterMemberObjectSizeGreaterThan{Value: mv} + memberFound = true + + case strings.EqualFold("ObjectSizeLessThan", t.Name.Local): + var mv int64 + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + mv = i64 + } + uv = &types.LifecycleRuleFilterMemberObjectSizeLessThan{Value: mv} + memberFound = true + case strings.EqualFold("Prefix", t.Name.Local): var mv string val, err := decoder.Value() @@ -16992,6 +17108,23 @@ func awsRestxml_deserializeDocumentNoncurrentVersionExpiration(v **types.Noncurr originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { + case strings.EqualFold("NewerNoncurrentVersions", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.NewerNoncurrentVersions = int32(i64) + } + case strings.EqualFold("NoncurrentDays", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -17045,6 +17178,23 @@ func awsRestxml_deserializeDocumentNoncurrentVersionTransition(v **types.Noncurr originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { + case strings.EqualFold("NewerNoncurrentVersions", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.NewerNoncurrentVersions = int32(i64) + } + case strings.EqualFold("NoncurrentDays", t.Name.Local): val, err := decoder.Value() if err != nil { diff --git a/service/s3/serializers.go b/service/s3/serializers.go index ca2281b2e37..72cdb28ba78 100644 --- a/service/s3/serializers.go +++ b/service/s3/serializers.go @@ -5840,6 +5840,11 @@ func awsRestxml_serializeOpHttpBindingsPutBucketNotificationConfigurationInput(v encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } + if v.SkipDestinationValidation { + locationName := "X-Amz-Skip-Destination-Validation" + encoder.SetHeader(locationName).Boolean(v.SkipDestinationValidation) + } + return nil } @@ -9110,6 +9115,11 @@ func awsRestxml_serializeDocumentErrorDocument(v *types.ErrorDocument, value smi return nil } +func awsRestxml_serializeDocumentEventBridgeConfiguration(v *types.EventBridgeConfiguration, value smithyxml.Value) error { + defer value.Close() + return nil +} + func awsRestxml_serializeDocumentEventList(v []types.Event, value smithyxml.Value) error { var array *smithyxml.Array if !value.IsFlattened() { @@ -10020,6 +10030,28 @@ func awsRestxml_serializeDocumentLifecycleRule(v *types.LifecycleRule, value smi func awsRestxml_serializeDocumentLifecycleRuleAndOperator(v *types.LifecycleRuleAndOperator, value smithyxml.Value) error { defer value.Close() + if v.ObjectSizeGreaterThan != 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ObjectSizeGreaterThan", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Long(v.ObjectSizeGreaterThan) + } + if v.ObjectSizeLessThan != 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ObjectSizeLessThan", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Long(v.ObjectSizeLessThan) + } if v.Prefix != nil { rootAttr := []smithyxml.Attr{} root := smithyxml.StartElement{ @@ -10063,6 +10095,28 @@ func awsRestxml_serializeDocumentLifecycleRuleFilter(v types.LifecycleRuleFilter return err } + case *types.LifecycleRuleFilterMemberObjectSizeGreaterThan: + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ObjectSizeGreaterThan", + }, + Attr: customMemberNameAttr, + } + av := value.MemberElement(customMemberName) + av.Long(uv.Value) + + case *types.LifecycleRuleFilterMemberObjectSizeLessThan: + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ObjectSizeLessThan", + }, + Attr: customMemberNameAttr, + } + av := value.MemberElement(customMemberName) + av.Long(uv.Value) + case *types.LifecycleRuleFilterMemberPrefix: customMemberNameAttr := []smithyxml.Attr{} customMemberName := smithyxml.StartElement{ @@ -10334,6 +10388,17 @@ func awsRestxml_serializeDocumentMetricsFilter(v types.MetricsFilter, value smit func awsRestxml_serializeDocumentNoncurrentVersionExpiration(v *types.NoncurrentVersionExpiration, value smithyxml.Value) error { defer value.Close() + if v.NewerNoncurrentVersions != 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "NewerNoncurrentVersions", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(v.NewerNoncurrentVersions) + } if v.NoncurrentDays != 0 { rootAttr := []smithyxml.Attr{} root := smithyxml.StartElement{ @@ -10350,6 +10415,17 @@ func awsRestxml_serializeDocumentNoncurrentVersionExpiration(v *types.Noncurrent func awsRestxml_serializeDocumentNoncurrentVersionTransition(v *types.NoncurrentVersionTransition, value smithyxml.Value) error { defer value.Close() + if v.NewerNoncurrentVersions != 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "NewerNoncurrentVersions", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(v.NewerNoncurrentVersions) + } if v.NoncurrentDays != 0 { rootAttr := []smithyxml.Attr{} root := smithyxml.StartElement{ @@ -10392,6 +10468,19 @@ func awsRestxml_serializeDocumentNoncurrentVersionTransitionList(v []types.Noncu func awsRestxml_serializeDocumentNotificationConfiguration(v *types.NotificationConfiguration, value smithyxml.Value) error { defer value.Close() + if v.EventBridgeConfiguration != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "EventBridgeConfiguration", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentEventBridgeConfiguration(v.EventBridgeConfiguration, el); err != nil { + return err + } + } if v.LambdaFunctionConfigurations != nil { rootAttr := []smithyxml.Attr{} root := smithyxml.StartElement{ diff --git a/service/s3/types/enums.go b/service/s3/types/enums.go index 5ead56140e5..fa137deb791 100644 --- a/service/s3/types/enums.go +++ b/service/s3/types/enums.go @@ -257,6 +257,16 @@ func (Event) Values() []Event { "s3:Replication:OperationNotTracked", "s3:Replication:OperationMissedThreshold", "s3:Replication:OperationReplicatedAfterThreshold", + "s3:ObjectRestore:Delete", + "s3:LifecycleTransition", + "s3:IntelligentTiering", + "s3:ObjectAcl:Put", + "s3:LifecycleExpiration:*", + "s3:LifecycleExpiration:Delete", + "s3:LifecycleExpiration:DeleteMarkerCreated", + "s3:ObjectTagging:*", + "s3:ObjectTagging:Put", + "s3:ObjectTagging:Delete", } } diff --git a/service/s3/types/types.go b/service/s3/types/types.go index 9bb2e28bb0d..1ad7932e50e 100644 --- a/service/s3/types/types.go +++ b/service/s3/types/types.go @@ -231,7 +231,8 @@ type CommonPrefix struct { // The container for the completed multipart upload details. type CompletedMultipartUpload struct { - // Array of CompletedPart data types. + // Array of CompletedPart data types. If you do not supply a valid Part with your + // request, the service sends back an HTTP 400 response. Parts []CompletedPart noSmithyDocumentSerde @@ -1620,6 +1621,11 @@ type ErrorDocument struct { noSmithyDocumentSerde } +// A container for specifying the configuration for Amazon EventBridge. +type EventBridgeConfiguration struct { + noSmithyDocumentSerde +} + // Optional configuration to replicate existing source bucket objects. For more // information, see Replicating Existing Objects // (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-what-is-isnot-replicated.html#existing-object-replication) @@ -2094,6 +2100,12 @@ type LifecycleRule struct { // predicates configured inside the And operator. type LifecycleRuleAndOperator struct { + // Minimum object size to which the rule applies. + ObjectSizeGreaterThan int64 + + // Maximum object size to which the rule applies. + ObjectSizeLessThan int64 + // Prefix identifying one or more objects to which the rule applies. Prefix *string @@ -2109,6 +2121,8 @@ type LifecycleRuleAndOperator struct { // // The following types satisfy this interface: // LifecycleRuleFilterMemberAnd +// LifecycleRuleFilterMemberObjectSizeGreaterThan +// LifecycleRuleFilterMemberObjectSizeLessThan // LifecycleRuleFilterMemberPrefix // LifecycleRuleFilterMemberTag type LifecycleRuleFilter interface { @@ -2126,6 +2140,24 @@ type LifecycleRuleFilterMemberAnd struct { func (*LifecycleRuleFilterMemberAnd) isLifecycleRuleFilter() {} +// Minimum object size to which the rule applies. +type LifecycleRuleFilterMemberObjectSizeGreaterThan struct { + Value int64 + + noSmithyDocumentSerde +} + +func (*LifecycleRuleFilterMemberObjectSizeGreaterThan) isLifecycleRuleFilter() {} + +// Maximum object size to which the rule applies. +type LifecycleRuleFilterMemberObjectSizeLessThan struct { + Value int64 + + noSmithyDocumentSerde +} + +func (*LifecycleRuleFilterMemberObjectSizeLessThan) isLifecycleRuleFilter() {} + // Prefix identifying one or more objects to which the rule applies. Replacement // must be made for object keys containing special characters (such as carriage // returns) when using XML requests. For more information, see XML related object @@ -2327,6 +2359,14 @@ type MultipartUpload struct { // the object's lifetime. type NoncurrentVersionExpiration struct { + // Specifies how many noncurrent versions Amazon S3 will retain. If there are this + // many more recent noncurrent versions, Amazon S3 will take the associated action. + // For more information about noncurrent versions, see Lifecycle configuration + // elements + // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html) + // in the Amazon S3 User Guide. + NewerNoncurrentVersions int32 + // Specifies the number of days an object is noncurrent before Amazon S3 can // perform the associated action. For information about the noncurrent days // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent @@ -2346,6 +2386,14 @@ type NoncurrentVersionExpiration struct { // lifetime. type NoncurrentVersionTransition struct { + // Specifies how many noncurrent versions Amazon S3 will retain. If there are this + // many more recent noncurrent versions, Amazon S3 will take the associated action. + // For more information about noncurrent versions, see Lifecycle configuration + // elements + // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html) + // in the Amazon S3 User Guide. + NewerNoncurrentVersions int32 + // Specifies the number of days an object is noncurrent before Amazon S3 can // perform the associated action. For information about the noncurrent days // calculations, see How Amazon S3 Calculates How Long an Object Has Been @@ -2364,6 +2412,9 @@ type NoncurrentVersionTransition struct { // element is empty, notifications are turned off for the bucket. type NotificationConfiguration struct { + // Enables delivery of events to Amazon EventBridge. + EventBridgeConfiguration *EventBridgeConfiguration + // Describes the Lambda functions to invoke and the events for which to invoke // them. LambdaFunctionConfigurations []LambdaFunctionConfiguration diff --git a/service/s3/types/types_exported_test.go b/service/s3/types/types_exported_test.go index 4205ccc0c28..9fa7e2c355f 100644 --- a/service/s3/types/types_exported_test.go +++ b/service/s3/types/types_exported_test.go @@ -40,6 +40,12 @@ func ExampleLifecycleRuleFilter_outputUsage() { case *types.LifecycleRuleFilterMemberAnd: _ = v.Value // Value is types.LifecycleRuleAndOperator + case *types.LifecycleRuleFilterMemberObjectSizeGreaterThan: + _ = v.Value // Value is int64 + + case *types.LifecycleRuleFilterMemberObjectSizeLessThan: + _ = v.Value // Value is int64 + case *types.LifecycleRuleFilterMemberPrefix: _ = v.Value // Value is string @@ -57,6 +63,8 @@ func ExampleLifecycleRuleFilter_outputUsage() { var _ *string var _ *types.LifecycleRuleAndOperator +var _ int64 +var _ int64 var _ *types.Tag func ExampleMetricsFilter_outputUsage() { diff --git a/service/s3control/deserializers.go b/service/s3control/deserializers.go index 0ff964902c1..7afd860bd52 100644 --- a/service/s3control/deserializers.go +++ b/service/s3control/deserializers.go @@ -8395,6 +8395,58 @@ func awsRestxml_deserializeDocumentBucketsUnwrapped(v *[]string, decoder smithyx *v = sv return nil } +func awsRestxml_deserializeDocumentCloudWatchMetrics(v **types.CloudWatchMetrics, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CloudWatchMetrics + if *v == nil { + sv = &types.CloudWatchMetrics{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("IsEnabled", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected IsEnabled to be of type *bool, got %T instead", val) + } + sv.IsEnabled = xtv + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsRestxml_deserializeDocumentCreateMultiRegionAccessPointInput(v **types.CreateMultiRegionAccessPointInput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -14639,6 +14691,12 @@ func awsRestxml_deserializeDocumentStorageLensDataExport(v **types.StorageLensDa originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { + case strings.EqualFold("CloudWatchMetrics", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCloudWatchMetrics(&sv.CloudWatchMetrics, nodeDecoder); err != nil { + return err + } + case strings.EqualFold("S3BucketDestination", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsRestxml_deserializeDocumentS3BucketDestination(&sv.S3BucketDestination, nodeDecoder); err != nil { diff --git a/service/s3control/serializers.go b/service/s3control/serializers.go index aeb3384e6e1..6dd43fdd83b 100644 --- a/service/s3control/serializers.go +++ b/service/s3control/serializers.go @@ -4460,6 +4460,22 @@ func awsRestxml_serializeDocumentBuckets(v []string, value smithyxml.Value) erro return nil } +func awsRestxml_serializeDocumentCloudWatchMetrics(v *types.CloudWatchMetrics, value smithyxml.Value) error { + defer value.Close() + { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "IsEnabled", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(v.IsEnabled) + } + return nil +} + func awsRestxml_serializeDocumentCreateBucketConfiguration(v *types.CreateBucketConfiguration, value smithyxml.Value) error { defer value.Close() if len(v.LocationConstraint) > 0 { @@ -6550,6 +6566,19 @@ func awsRestxml_serializeDocumentStorageLensConfiguration(v *types.StorageLensCo func awsRestxml_serializeDocumentStorageLensDataExport(v *types.StorageLensDataExport, value smithyxml.Value) error { defer value.Close() + if v.CloudWatchMetrics != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CloudWatchMetrics", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentCloudWatchMetrics(v.CloudWatchMetrics, el); err != nil { + return err + } + } if v.S3BucketDestination != nil { rootAttr := []smithyxml.Attr{} root := smithyxml.StartElement{ diff --git a/service/s3control/types/types.go b/service/s3control/types/types.go index 71845ee9858..1e8bcc7c236 100644 --- a/service/s3control/types/types.go +++ b/service/s3control/types/types.go @@ -179,6 +179,23 @@ type BucketLevel struct { noSmithyDocumentSerde } +// A container for enabling Amazon CloudWatch publishing for S3 Storage Lens +// metrics. For more information about publishing S3 Storage Lens metrics to +// CloudWatch, see Monitor S3 Storage Lens metrics in CloudWatch +// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage_lens_view_metrics_cloudwatch.html) +// in the Amazon S3 User Guide. +type CloudWatchMetrics struct { + + // A container that indicates whether CloudWatch publishing for S3 Storage Lens + // metrics is enabled. A value of true indicates that CloudWatch publishing for S3 + // Storage Lens metrics is enabled. + // + // This member is required. + IsEnabled bool + + noSmithyDocumentSerde +} + // The container for the bucket configuration. This is not supported by Amazon S3 // on Outposts buckets. type CreateBucketConfiguration struct { @@ -1480,11 +1497,13 @@ type StorageLensConfiguration struct { // including the destination, schema, and format. type StorageLensDataExport struct { + // A container for enabling Amazon CloudWatch publishing for S3 Storage Lens + // metrics. + CloudWatchMetrics *CloudWatchMetrics + // A container for the bucket where the S3 Storage Lens metrics export will be // located. This bucket must be located in the same Region as the storage lens // configuration. - // - // This member is required. S3BucketDestination *S3BucketDestination noSmithyDocumentSerde diff --git a/service/s3control/validators.go b/service/s3control/validators.go index 6819a8e44e7..05f86f0b27a 100644 --- a/service/s3control/validators.go +++ b/service/s3control/validators.go @@ -1429,6 +1429,18 @@ func validateBucketLevel(v *types.BucketLevel) error { } } +func validateCloudWatchMetrics(v *types.CloudWatchMetrics) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CloudWatchMetrics"} + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateCreateMultiRegionAccessPointInput(v *types.CreateMultiRegionAccessPointInput) error { if v == nil { return nil @@ -2075,13 +2087,16 @@ func validateStorageLensDataExport(v *types.StorageLensDataExport) error { return nil } invalidParams := smithy.InvalidParamsError{Context: "StorageLensDataExport"} - if v.S3BucketDestination == nil { - invalidParams.Add(smithy.NewErrParamRequired("S3BucketDestination")) - } else if v.S3BucketDestination != nil { + if v.S3BucketDestination != nil { if err := validateS3BucketDestination(v.S3BucketDestination); err != nil { invalidParams.AddNested("S3BucketDestination", err.(smithy.InvalidParamsError)) } } + if v.CloudWatchMetrics != nil { + if err := validateCloudWatchMetrics(v.CloudWatchMetrics); err != nil { + invalidParams.AddNested("CloudWatchMetrics", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -3189,12 +3204,12 @@ func validateOpPutPublicAccessBlockInput(v *PutPublicAccessBlockInput) error { return nil } invalidParams := smithy.InvalidParamsError{Context: "PutPublicAccessBlockInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } if v.PublicAccessBlockConfiguration == nil { invalidParams.Add(smithy.NewErrParamRequired("PublicAccessBlockConfiguration")) } + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/sqs/api_op_AddPermission.go b/service/sqs/api_op_AddPermission.go index ef127b52ea9..3194eb8f46f 100644 --- a/service/sqs/api_op_AddPermission.go +++ b/service/sqs/api_op_AddPermission.go @@ -58,10 +58,10 @@ func (c *Client) AddPermission(ctx context.Context, params *AddPermissionInput, // type AddPermissionInput struct { - // The account numbers of the principals + // The Amazon Web Services account numbers of the principals // (https://docs.aws.amazon.com/general/latest/gr/glos-chap.html#P) who are to - // receive permission. For information about locating the account identification, - // see Your Amazon Web Services Identifiers + // receive permission. For information about locating the Amazon Web Services + // account identification, see Your Amazon Web Services Identifiers // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-making-api-requests.html#sqs-api-request-authentication) // in the Amazon SQS Developer Guide. // diff --git a/service/sqs/api_op_CreateQueue.go b/service/sqs/api_op_CreateQueue.go index 9cb9d65f291..6d9171e347c 100644 --- a/service/sqs/api_op_CreateQueue.go +++ b/service/sqs/api_op_CreateQueue.go @@ -115,6 +115,26 @@ type CreateQueueInput struct { // seconds, for which a ReceiveMessage action waits for a message to arrive. Valid // values: An integer from 0 to 20 (seconds). Default: 0. // + // * RedrivePolicy – The + // string that includes the parameters for the dead-letter queue functionality of + // the source queue as a JSON object. For more information about the redrive policy + // and dead-letter queues, see Using Amazon SQS Dead-Letter Queues + // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) + // in the Amazon SQS Developer Guide. + // + // * deadLetterTargetArn – The Amazon Resource + // Name (ARN) of the dead-letter queue to which Amazon SQS moves messages after the + // value of maxReceiveCount is exceeded. + // + // * maxReceiveCount – The number of times a + // message is delivered to the source queue before being moved to the dead-letter + // queue. When the ReceiveCount for a message exceeds the maxReceiveCount for a + // queue, Amazon SQS moves the message to the dead-letter-queue. + // + // The dead-letter + // queue of a FIFO queue must also be a FIFO queue. Similarly, the dead-letter + // queue of a standard queue must also be a standard queue. + // // * VisibilityTimeout – // The visibility timeout for the queue, in seconds. Valid values: An integer from // 0 to 43,200 (12 hours). Default: 30. For more information about the visibility @@ -123,53 +143,7 @@ type CreateQueueInput struct { // in the Amazon SQS Developer Guide. // // The following attributes apply only to - // dead-letter queues: - // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) - // - // * - // RedrivePolicy – The string that includes the parameters for the dead-letter - // queue functionality of the source queue as a JSON object. The parameters are as - // follows: - // - // * deadLetterTargetArn – The Amazon Resource Name (ARN) of the - // dead-letter queue to which Amazon SQS moves messages after the value of - // maxReceiveCount is exceeded. - // - // * maxReceiveCount – The number of times a message - // is delivered to the source queue before being moved to the dead-letter queue. - // When the ReceiveCount for a message exceeds the maxReceiveCount for a queue, - // Amazon SQS moves the message to the dead-letter-queue. - // - // * RedriveAllowPolicy – - // The string that includes the parameters for the permissions for the dead-letter - // queue redrive permission and which source queues can specify dead-letter queues - // as a JSON object. The parameters are as follows: - // - // * redrivePermission – The - // permission type that defines which source queues can specify the current queue - // as the dead-letter queue. Valid values are: - // - // * allowAll – (Default) Any source - // queues in this Amazon Web Services account in the same Region can specify this - // queue as the dead-letter queue. - // - // * denyAll – No source queues can specify this - // queue as the dead-letter queue. - // - // * byQueue – Only queues specified by the - // sourceQueueArns parameter can specify this queue as the dead-letter queue. - // - // * - // sourceQueueArns – The Amazon Resource Names (ARN)s of the source queues that can - // specify this queue as the dead-letter queue and redrive messages. You can - // specify this parameter only when the redrivePermission parameter is set to - // byQueue. You can specify up to 10 source queue ARNs. To allow more than 10 - // source queues to specify dead-letter queues, set the redrivePermission parameter - // to allowAll. - // - // The dead-letter queue of a FIFO queue must also be a FIFO queue. - // Similarly, the dead-letter queue of a standard queue must also be a standard - // queue. The following attributes apply only to server-side-encryption + // server-side-encryption // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html): // // * @@ -192,6 +166,14 @@ type CreateQueueInput struct { // information, see How Does the Data Key Reuse Period Work? // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work). // + // * + // SqsManagedSseEnabled – Enables server-side queue encryption using SQS owned + // encryption keys. Only one server-side encryption option is supported per queue + // (e.g. SSE-KMS + // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html) + // or SSE-SQS + // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html)). + // // The // following attributes apply only to FIFO (first-in-first-out) queues // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html): diff --git a/service/sqs/api_op_GetQueueAttributes.go b/service/sqs/api_op_GetQueueAttributes.go index c0d1c707f58..140aa1e14ad 100644 --- a/service/sqs/api_op_GetQueueAttributes.go +++ b/service/sqs/api_op_GetQueueAttributes.go @@ -93,6 +93,23 @@ type GetQueueAttributesInput struct { // ReceiveMessageWaitTimeSeconds – Returns the length of time, in seconds, for // which the ReceiveMessage action waits for a message to arrive. // + // * RedrivePolicy + // – The string that includes the parameters for the dead-letter queue + // functionality of the source queue as a JSON object. For more information about + // the redrive policy and dead-letter queues, see Using Amazon SQS Dead-Letter + // Queues + // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) + // in the Amazon SQS Developer Guide. + // + // * deadLetterTargetArn – The Amazon Resource + // Name (ARN) of the dead-letter queue to which Amazon SQS moves messages after the + // value of maxReceiveCount is exceeded. + // + // * maxReceiveCount – The number of times a + // message is delivered to the source queue before being moved to the dead-letter + // queue. When the ReceiveCount for a message exceeds the maxReceiveCount for a + // queue, Amazon SQS moves the message to the dead-letter-queue. + // // * // VisibilityTimeout – Returns the visibility timeout for the queue. For more // information about the visibility timeout, see Visibility Timeout @@ -100,53 +117,7 @@ type GetQueueAttributesInput struct { // in the Amazon SQS Developer Guide. // // The following attributes apply only to - // dead-letter queues: - // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) - // - // * - // RedrivePolicy – The string that includes the parameters for the dead-letter - // queue functionality of the source queue as a JSON object. The parameters are as - // follows: - // - // * deadLetterTargetArn – The Amazon Resource Name (ARN) of the - // dead-letter queue to which Amazon SQS moves messages after the value of - // maxReceiveCount is exceeded. - // - // * maxReceiveCount – The number of times a message - // is delivered to the source queue before being moved to the dead-letter queue. - // When the ReceiveCount for a message exceeds the maxReceiveCount for a queue, - // Amazon SQS moves the message to the dead-letter-queue. - // - // * RedriveAllowPolicy – - // The string that includes the parameters for the permissions for the dead-letter - // queue redrive permission and which source queues can specify dead-letter queues - // as a JSON object. The parameters are as follows: - // - // * redrivePermission – The - // permission type that defines which source queues can specify the current queue - // as the dead-letter queue. Valid values are: - // - // * allowAll – (Default) Any source - // queues in this Amazon Web Services account in the same Region can specify this - // queue as the dead-letter queue. - // - // * denyAll – No source queues can specify this - // queue as the dead-letter queue. - // - // * byQueue – Only queues specified by the - // sourceQueueArns parameter can specify this queue as the dead-letter queue. - // - // * - // sourceQueueArns – The Amazon Resource Names (ARN)s of the source queues that can - // specify this queue as the dead-letter queue and redrive messages. You can - // specify this parameter only when the redrivePermission parameter is set to - // byQueue. You can specify up to 10 source queue ARNs. To allow more than 10 - // source queues to specify dead-letter queues, set the redrivePermission parameter - // to allowAll. - // - // The dead-letter queue of a FIFO queue must also be a FIFO queue. - // Similarly, the dead-letter queue of a standard queue must also be a standard - // queue. The following attributes apply only to server-side-encryption + // server-side-encryption // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html): // // * @@ -161,6 +132,14 @@ type GetQueueAttributesInput struct { // KMS again. For more information, see How Does the Data Key Reuse Period Work? // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work). // + // * + // SqsManagedSseEnabled – Returns information about whether the queue is using + // SSE-SQS encryption using SQS owned encryption keys. Only one server-side + // encryption option is supported per queue (e.g. SSE-KMS + // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html) + // or SSE-SQS + // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html)). + // // The // following attributes apply only to FIFO (first-in-first-out) queues // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html): diff --git a/service/sqs/api_op_GetQueueUrl.go b/service/sqs/api_op_GetQueueUrl.go index ec27a4f2e1c..db11c4accce 100644 --- a/service/sqs/api_op_GetQueueUrl.go +++ b/service/sqs/api_op_GetQueueUrl.go @@ -42,7 +42,7 @@ type GetQueueUrlInput struct { // This member is required. QueueName *string - // The account ID of the account that created the queue. + // The Amazon Web Services account ID of the account that created the queue. QueueOwnerAWSAccountId *string noSmithyDocumentSerde diff --git a/service/sqs/api_op_ReceiveMessage.go b/service/sqs/api_op_ReceiveMessage.go index a0bd363ae61..37726c7a47b 100644 --- a/service/sqs/api_op_ReceiveMessage.go +++ b/service/sqs/api_op_ReceiveMessage.go @@ -109,6 +109,14 @@ type ReceiveMessageInput struct { // (http://en.wikipedia.org/wiki/Unix_time) in milliseconds). // // * + // SqsManagedSseEnabled – Enables server-side queue encryption using SQS owned + // encryption keys. Only one server-side encryption option is supported per queue + // (e.g. SSE-KMS + // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html) + // or SSE-SQS + // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html)). + // + // * // MessageDeduplicationId – Returns the value provided by the producer that calls // the SendMessage action. // diff --git a/service/sqs/api_op_SetQueueAttributes.go b/service/sqs/api_op_SetQueueAttributes.go index e71426732c8..95b58905170 100644 --- a/service/sqs/api_op_SetQueueAttributes.go +++ b/service/sqs/api_op_SetQueueAttributes.go @@ -74,60 +74,35 @@ type SetQueueAttributesInput struct { // message to arrive. Valid values: An integer from 0 to 20 (seconds). Default: // 0. // - // * VisibilityTimeout – The visibility timeout for the queue, in seconds. - // Valid values: An integer from 0 to 43,200 (12 hours). Default: 30. For more - // information about the visibility timeout, see Visibility Timeout - // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) - // in the Amazon SQS Developer Guide. - // - // The following attributes apply only to - // dead-letter queues: + // * RedrivePolicy – The string that includes the parameters for the + // dead-letter queue functionality of the source queue as a JSON object. For more + // information about the redrive policy and dead-letter queues, see Using Amazon + // SQS Dead-Letter Queues // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) + // in the Amazon SQS Developer Guide. // - // * - // RedrivePolicy – The string that includes the parameters for the dead-letter - // queue functionality of the source queue as a JSON object. The parameters are as - // follows: - // - // * deadLetterTargetArn – The Amazon Resource Name (ARN) of the - // dead-letter queue to which Amazon SQS moves messages after the value of - // maxReceiveCount is exceeded. - // - // * maxReceiveCount – The number of times a message - // is delivered to the source queue before being moved to the dead-letter queue. - // When the ReceiveCount for a message exceeds the maxReceiveCount for a queue, - // Amazon SQS moves the message to the dead-letter-queue. - // - // * RedriveAllowPolicy – - // The string that includes the parameters for the permissions for the dead-letter - // queue redrive permission and which source queues can specify dead-letter queues - // as a JSON object. The parameters are as follows: - // - // * redrivePermission – The - // permission type that defines which source queues can specify the current queue - // as the dead-letter queue. Valid values are: + // * deadLetterTargetArn – The Amazon Resource + // Name (ARN) of the dead-letter queue to which Amazon SQS moves messages after the + // value of maxReceiveCount is exceeded. // - // * allowAll – (Default) Any source - // queues in this Amazon Web Services account in the same Region can specify this - // queue as the dead-letter queue. + // * maxReceiveCount – The number of times a + // message is delivered to the source queue before being moved to the dead-letter + // queue. When the ReceiveCount for a message exceeds the maxReceiveCount for a + // queue, Amazon SQS moves the message to the dead-letter-queue. // - // * denyAll – No source queues can specify this - // queue as the dead-letter queue. + // The dead-letter + // queue of a FIFO queue must also be a FIFO queue. Similarly, the dead-letter + // queue of a standard queue must also be a standard queue. // - // * byQueue – Only queues specified by the - // sourceQueueArns parameter can specify this queue as the dead-letter queue. + // * VisibilityTimeout – + // The visibility timeout for the queue, in seconds. Valid values: An integer from + // 0 to 43,200 (12 hours). Default: 30. For more information about the visibility + // timeout, see Visibility Timeout + // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) + // in the Amazon SQS Developer Guide. // - // * - // sourceQueueArns – The Amazon Resource Names (ARN)s of the source queues that can - // specify this queue as the dead-letter queue and redrive messages. You can - // specify this parameter only when the redrivePermission parameter is set to - // byQueue. You can specify up to 10 source queue ARNs. To allow more than 10 - // source queues to specify dead-letter queues, set the redrivePermission parameter - // to allowAll. - // - // The dead-letter queue of a FIFO queue must also be a FIFO queue. - // Similarly, the dead-letter queue of a standard queue must also be a standard - // queue. The following attributes apply only to server-side-encryption + // The following attributes apply only to + // server-side-encryption // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html): // // * @@ -150,6 +125,14 @@ type SetQueueAttributesInput struct { // information, see How Does the Data Key Reuse Period Work? // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work). // + // * + // SqsManagedSseEnabled – Enables server-side queue encryption using SQS owned + // encryption keys. Only one server-side encryption option is supported per queue + // (e.g. SSE-KMS + // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sse-existing-queue.html) + // or SSE-SQS + // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-sqs-sse-queue.html)). + // // The // following attribute applies only to FIFO (first-in-first-out) queues // (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html): diff --git a/service/sqs/types/enums.go b/service/sqs/types/enums.go index 1ce1f0e1ca6..a34481e80e6 100644 --- a/service/sqs/types/enums.go +++ b/service/sqs/types/enums.go @@ -74,6 +74,7 @@ const ( QueueAttributeNameDeduplicationScope QueueAttributeName = "DeduplicationScope" QueueAttributeNameFifoThroughputLimit QueueAttributeName = "FifoThroughputLimit" QueueAttributeNameRedriveAllowPolicy QueueAttributeName = "RedriveAllowPolicy" + QueueAttributeNameSqsManagedSseEnabled QueueAttributeName = "SqsManagedSseEnabled" ) // Values returns all known values for QueueAttributeName. Note that this can be @@ -102,5 +103,6 @@ func (QueueAttributeName) Values() []QueueAttributeName { "DeduplicationScope", "FifoThroughputLimit", "RedriveAllowPolicy", + "SqsManagedSseEnabled", } } diff --git a/service/sqs/types/types.go b/service/sqs/types/types.go index 679c1cda261..c5f10b4bba8 100644 --- a/service/sqs/types/types.go +++ b/service/sqs/types/types.go @@ -150,7 +150,7 @@ type Message struct { MessageAttributes map[string]MessageAttributeValue // A unique identifier for the message. A MessageIdis considered unique across all - // accounts for an extended period of time. + // Amazon Web Services accounts for an extended period of time. MessageId *string // An identifier associated with the act of receiving the message. A new receipt diff --git a/service/ssm/api_op_AddTagsToResource.go b/service/ssm/api_op_AddTagsToResource.go index 2ca36fec03b..9ec4a079944 100644 --- a/service/ssm/api_op_AddTagsToResource.go +++ b/service/ssm/api_op_AddTagsToResource.go @@ -12,36 +12,35 @@ import ( ) // Adds or overwrites one or more tags for the specified resource. Tags are -// metadata that you can assign to your documents, managed instances, maintenance +// metadata that you can assign to your documents, managed nodes, maintenance // windows, Parameter Store parameters, and patch baselines. Tags enable you to // categorize your resources in different ways, for example, by purpose, owner, or // environment. Each tag consists of a key and an optional value, both of which you // define. For example, you could define a set of tags for your account's managed -// instances that helps you track each instance's owner and stack level. For -// example: +// nodes that helps you track each node's owner and stack level. For example: // -// * Key=Owner,Value=DbAdmin +// * +// Key=Owner,Value=DbAdmin // // * Key=Owner,Value=SysAdmin // +// * Key=Owner,Value=Dev +// // * -// Key=Owner,Value=Dev +// Key=Stack,Value=Production // -// * Key=Stack,Value=Production +// * Key=Stack,Value=Pre-Production // // * -// Key=Stack,Value=Pre-Production -// -// * Key=Stack,Value=Test +// Key=Stack,Value=Test // -// Each resource can have a -// maximum of 50 tags. We recommend that you devise a set of tag keys that meets -// your needs for each resource type. Using a consistent set of tag keys makes it -// easier for you to manage your resources. You can search and filter the resources -// based on the tags you add. Tags don't have any semantic meaning to and are -// interpreted strictly as a string of characters. For more information about using -// tags with Amazon Elastic Compute Cloud (Amazon EC2) instances, see Tagging your -// Amazon EC2 resources +// Each resource can have a maximum of 50 tags. We recommend +// that you devise a set of tag keys that meets your needs for each resource type. +// Using a consistent set of tag keys makes it easier for you to manage your +// resources. You can search and filter the resources based on the tags you add. +// Tags don't have any semantic meaning to and are interpreted strictly as a string +// of characters. For more information about using tags with Amazon Elastic Compute +// Cloud (Amazon EC2) instances, see Tagging your Amazon EC2 resources // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) in the // Amazon EC2 User Guide. func (c *Client) AddTagsToResource(ctx context.Context, params *AddTagsToResourceInput, optFns ...func(*Options)) (*AddTagsToResourceOutput, error) { @@ -71,17 +70,16 @@ type AddTagsToResourceInput struct { // ResourceID of either aws/ssm/MyGroup/appmanager or /aws/ssm/MyGroup/appmanager. // For the Document and Parameter values, use the name of the resource. // ManagedInstance: mi-012345abcde The ManagedInstance type for this API operation - // is only for on-premises managed instances. You must specify the name of the - // managed instance in the following format: mi-ID_number . For example, - // mi-1a2b3c4d5e6f. + // is only for on-premises managed nodes. You must specify the name of the managed + // node in the following format: mi-ID_number . For example, mi-1a2b3c4d5e6f. // // This member is required. ResourceId *string // Specifies the type of resource you are tagging. The ManagedInstance type for - // this API operation is for on-premises managed instances. You must specify the - // name of the managed instance in the following format: mi-ID_number . For - // example, mi-1a2b3c4d5e6f. + // this API operation is for on-premises managed nodes. You must specify the name + // of the managed node in the following format: mi-ID_number . For example, + // mi-1a2b3c4d5e6f. // // This member is required. ResourceType types.ResourceTypeForTagging diff --git a/service/ssm/api_op_CancelCommand.go b/service/ssm/api_op_CancelCommand.go index 553ab4646cf..e7ecb2de06e 100644 --- a/service/ssm/api_op_CancelCommand.go +++ b/service/ssm/api_op_CancelCommand.go @@ -36,8 +36,8 @@ type CancelCommandInput struct { // This member is required. CommandId *string - // (Optional) A list of instance IDs on which you want to cancel the command. If - // not provided, the command is canceled on every instance on which it was + // (Optional) A list of managed node IDs on which you want to cancel the command. + // If not provided, the command is canceled on every node on which it was // requested. InstanceIds []string diff --git a/service/ssm/api_op_CreateActivation.go b/service/ssm/api_op_CreateActivation.go index 5f4e8530c09..5568f471ebf 100644 --- a/service/ssm/api_op_CreateActivation.go +++ b/service/ssm/api_op_CreateActivation.go @@ -13,18 +13,17 @@ import ( ) // Generates an activation code and activation ID you can use to register your -// on-premises server or virtual machine (VM) with Amazon Web Services Systems -// Manager. Registering these machines with Systems Manager makes it possible to -// manage them using Systems Manager capabilities. You use the activation code and -// ID when installing SSM Agent on machines in your hybrid environment. For more -// information about requirements for managing on-premises instances and VMs using -// Systems Manager, see Setting up Amazon Web Services Systems Manager for hybrid -// environments +// on-premises servers, edge devices, or virtual machine (VM) with Amazon Web +// Services Systems Manager. Registering these machines with Systems Manager makes +// it possible to manage them using Systems Manager capabilities. You use the +// activation code and ID when installing SSM Agent on machines in your hybrid +// environment. For more information about requirements for managing on-premises +// machines using Systems Manager, see Setting up Amazon Web Services Systems +// Manager for hybrid environments // (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-managedinstances.html) -// in the Amazon Web Services Systems Manager User Guide. On-premises servers or -// VMs that are registered with Systems Manager and Amazon Elastic Compute Cloud -// (Amazon EC2) instances that you manage with Systems Manager are all called -// managed instances. +// in the Amazon Web Services Systems Manager User Guide. Amazon Elastic Compute +// Cloud (Amazon EC2) instances, edge devices, and on-premises servers and VMs that +// are configured for Systems Manager are all called managed nodes. func (c *Client) CreateActivation(ctx context.Context, params *CreateActivationInput, optFns ...func(*Options)) (*CreateActivationOutput, error) { if params == nil { params = &CreateActivationInput{} @@ -43,17 +42,16 @@ func (c *Client) CreateActivation(ctx context.Context, params *CreateActivationI type CreateActivationInput struct { // The name of the Identity and Access Management (IAM) role that you want to - // assign to the managed instance. This IAM role must provide AssumeRole - // permissions for the Amazon Web Services Systems Manager service principal - // ssm.amazonaws.com. For more information, see Create an IAM service role for a - // hybrid environment + // assign to the managed node. This IAM role must provide AssumeRole permissions + // for the Amazon Web Services Systems Manager service principal ssm.amazonaws.com. + // For more information, see Create an IAM service role for a hybrid environment // (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-service-role.html) // in the Amazon Web Services Systems Manager User Guide. // // This member is required. IamRole *string - // The name of the registered, managed instance as it will appear in the Amazon Web + // The name of the registered, managed node as it will appear in the Amazon Web // Services Systems Manager console or when you use the Amazon Web Services command // line tools to list Systems Manager resources. Don't enter personally // identifiable information in this field. @@ -69,10 +67,13 @@ type CreateActivationInput struct { // hours. ExpirationDate *time.Time - // Specify the maximum number of managed instances you want to register. The - // default value is 1. + // Specify the maximum number of managed nodes you want to register. The default + // value is 1. RegistrationLimit int32 + // Reserved for internal use. + RegistrationMetadata []types.RegistrationMetadataItem + // Optional metadata that you assign to a resource. Tags enable you to categorize a // resource in different ways, such as by purpose, owner, or environment. For // example, you might want to tag an activation to identify which servers or @@ -89,12 +90,12 @@ type CreateActivationInput struct { // code. When you specify the activation ID and code, tags assigned to the // activation are automatically applied to the on-premises servers or VMs. You // can't add tags to or delete tags from an existing activation. You can tag your - // on-premises servers and VMs after they connect to Systems Manager for the first - // time and are assigned a managed instance ID. This means they are listed in the - // Amazon Web Services Systems Manager console with an ID that is prefixed with - // "mi-". For information about how to add tags to your managed instances, see - // AddTagsToResource. For information about how to remove tags from your managed - // instances, see RemoveTagsFromResource. + // on-premises servers, edge devices, and VMs after they connect to Systems Manager + // for the first time and are assigned a managed node ID. This means they are + // listed in the Amazon Web Services Systems Manager console with an ID that is + // prefixed with "mi-". For information about how to add tags to your managed + // nodes, see AddTagsToResource. For information about how to remove tags from your + // managed nodes, see RemoveTagsFromResource. Tags []types.Tag noSmithyDocumentSerde diff --git a/service/ssm/api_op_CreateAssociation.go b/service/ssm/api_op_CreateAssociation.go index e590ec1eea1..1d70a893c54 100644 --- a/service/ssm/api_op_CreateAssociation.go +++ b/service/ssm/api_op_CreateAssociation.go @@ -12,16 +12,16 @@ import ( ) // A State Manager association defines the state that you want to maintain on your -// instances. For example, an association can specify that anti-virus software must -// be installed and running on your instances, or that certain ports must be -// closed. For static targets, the association specifies a schedule for when the +// managed nodes. For example, an association can specify that anti-virus software +// must be installed and running on your managed nodes, or that certain ports must +// be closed. For static targets, the association specifies a schedule for when the // configuration is reapplied. For dynamic targets, such as an Amazon Web Services // resource group or an Amazon Web Services autoscaling group, State Manager, a // capability of Amazon Web Services Systems Manager applies the configuration when -// new instances are added to the group. The association also specifies actions to -// take when applying the configuration. For example, an association for anti-virus -// software might run once a day. If the software isn't installed, then State -// Manager installs it. If the software is installed, but the service isn't +// new managed nodes are added to the group. The association also specifies actions +// to take when applying the configuration. For example, an association for +// anti-virus software might run once a day. If the software isn't installed, then +// State Manager installs it. If the software is installed, but the service isn't // running, then the association might instruct State Manager to start the service. func (c *Client) CreateAssociation(ctx context.Context, params *CreateAssociationInput, optFns ...func(*Options)) (*CreateAssociationOutput, error) { if params == nil { @@ -41,7 +41,7 @@ func (c *Client) CreateAssociation(ctx context.Context, params *CreateAssociatio type CreateAssociationInput struct { // The name of the SSM Command document or Automation runbook that contains the - // configuration information for the instance. You can specify Amazon Web + // configuration information for the managed node. You can specify Amazon Web // Services-predefined documents, documents you created, or a document that is // shared with you from another account. For Systems Manager documents (SSM // documents) that are shared with you from other Amazon Web Services accounts, you @@ -84,10 +84,10 @@ type CreateAssociationInput struct { // version or the default version. DocumentVersion *string - // The instance ID. InstanceId has been deprecated. To specify an instance ID for - // an association, use the Targets parameter. Requests that include the parameter - // InstanceID with Systems Manager documents (SSM documents) that use schema - // version 2.0 or later will fail. In addition, if you use the parameter + // The managed node ID. InstanceId has been deprecated. To specify a managed node + // ID for an association, use the Targets parameter. Requests that include the + // parameter InstanceID with Systems Manager documents (SSM documents) that use + // schema version 2.0 or later will fail. In addition, if you use the parameter // InstanceId, you can't use the parameters AssociationName, DocumentVersion, // MaxErrors, MaxConcurrency, OutputLocation, or ScheduleExpression. To use these // parameters, you must use the Targets parameter. @@ -96,10 +96,10 @@ type CreateAssociationInput struct { // The maximum number of targets allowed to run the association at the same time. // You can specify a number, for example 10, or a percentage of the target set, for // example 10%. The default value is 100%, which means all targets run the - // association at the same time. If a new instance starts and attempts to run an - // association while Systems Manager is running MaxConcurrency associations, the + // association at the same time. If a new managed node starts and attempts to run + // an association while Systems Manager is running MaxConcurrency associations, the // association is allowed to run. During the next association interval, the new - // instance will process its association within the limit specified for + // managed node will process its association within the limit specified for // MaxConcurrency. MaxConcurrency *string @@ -109,7 +109,7 @@ type CreateAssociationInput struct { // 10%. If you specify 3, for example, the system stops sending requests when the // fourth error is received. If you specify 0, then the system stops sending // requests after the first error is returned. If you run an association on 50 - // instances and set MaxError to 10%, then the system stops sending the request + // managed nodes and set MaxError to 10%, then the system stops sending the request // when the sixth error is received. Executions that are already running an // association when MaxErrors is reached are allowed to complete, but some of these // executions may fail as well. If you need to ensure that there won't be more than @@ -143,12 +143,12 @@ type CreateAssociationInput struct { // create an association in multiple Regions and multiple accounts. TargetLocations []types.TargetLocation - // The targets for the association. You can target instances by using tags, Amazon - // Web Services resource groups, all instances in an Amazon Web Services account, - // or individual instance IDs. You can target all instances in an Amazon Web - // Services account by specifying the InstanceIds key with a value of *. For more - // information about choosing targets for an association, see Using targets and - // rate controls with State Manager associations + // The targets for the association. You can target managed nodes by using tags, + // Amazon Web Services resource groups, all managed nodes in an Amazon Web Services + // account, or individual managed node IDs. You can target all managed nodes in an + // Amazon Web Services account by specifying the InstanceIds key with a value of *. + // For more information about choosing targets for an association, see Using + // targets and rate controls with State Manager associations // (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-state-manager-targets-and-rate-controls.html) // in the Amazon Web Services Systems Manager User Guide. Targets []types.Target diff --git a/service/ssm/api_op_CreateAssociationBatch.go b/service/ssm/api_op_CreateAssociationBatch.go index e9f1913e0c5..c3f728706fb 100644 --- a/service/ssm/api_op_CreateAssociationBatch.go +++ b/service/ssm/api_op_CreateAssociationBatch.go @@ -12,11 +12,11 @@ import ( ) // Associates the specified Amazon Web Services Systems Manager document (SSM -// document) with the specified instances or targets. When you associate a document -// with one or more instances using instance IDs or tags, Amazon Web Services -// Systems Manager Agent (SSM Agent) running on the instance processes the document -// and configures the instance as specified. If you associate a document with an -// instance that already has an associated document, the system returns the +// document) with the specified managed nodes or targets. When you associate a +// document with one or more managed nodes using IDs or tags, Amazon Web Services +// Systems Manager Agent (SSM Agent) running on the managed node processes the +// document and configures the node as specified. If you associate a document with +// a managed node that already has an associated document, the system returns the // AssociationAlreadyExists exception. func (c *Client) CreateAssociationBatch(ctx context.Context, params *CreateAssociationBatchInput, optFns ...func(*Options)) (*CreateAssociationBatchOutput, error) { if params == nil { diff --git a/service/ssm/api_op_CreateDocument.go b/service/ssm/api_op_CreateDocument.go index 3e1952ebdae..d59029901fc 100644 --- a/service/ssm/api_op_CreateDocument.go +++ b/service/ssm/api_op_CreateDocument.go @@ -12,7 +12,7 @@ import ( ) // Creates a Amazon Web Services Systems Manager (SSM document). An SSM document -// defines the actions that Systems Manager performs on your managed instances. For +// defines the actions that Systems Manager performs on your managed nodes. For // more information about SSM documents, including information about supported // schemas, features, and syntax, see Amazon Web Services Systems Manager Documents // (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-ssm-docs.html) diff --git a/service/ssm/api_op_CreateMaintenanceWindow.go b/service/ssm/api_op_CreateMaintenanceWindow.go index 6678cd32f27..289b7a8d3b2 100644 --- a/service/ssm/api_op_CreateMaintenanceWindow.go +++ b/service/ssm/api_op_CreateMaintenanceWindow.go @@ -36,9 +36,9 @@ func (c *Client) CreateMaintenanceWindow(ctx context.Context, params *CreateMain type CreateMaintenanceWindowInput struct { - // Enables a maintenance window task to run on managed instances, even if you - // haven't registered those instances as targets. If enabled, then you must specify - // the unregistered instances (by instance ID) when you register a task with the + // Enables a maintenance window task to run on managed nodes, even if you haven't + // registered those nodes as targets. If enabled, then you must specify the + // unregistered managed nodes (by node ID) when you register a task with the // maintenance window. If you don't enable this option, then you must specify // previously-registered targets when you register a task with the maintenance // window. diff --git a/service/ssm/api_op_CreatePatchBaseline.go b/service/ssm/api_op_CreatePatchBaseline.go index 91e1fcd0caf..8bbf9fe0a5d 100644 --- a/service/ssm/api_op_CreatePatchBaseline.go +++ b/service/ssm/api_op_CreatePatchBaseline.go @@ -52,8 +52,8 @@ type CreatePatchBaselineInput struct { ApprovedPatchesComplianceLevel types.PatchComplianceLevel // Indicates whether the list of approved patches includes non-security updates - // that should be applied to the instances. The default value is false. Applies to - // Linux instances only. + // that should be applied to the managed nodes. The default value is false. Applies + // to Linux managed nodes only. ApprovedPatchesEnableNonSecurity bool // User-provided idempotency token. @@ -91,8 +91,9 @@ type CreatePatchBaselineInput struct { // patch baseline, and its status is reported as InstalledRejected. RejectedPatchesAction types.PatchAction - // Information about the patches to use to update the instances, including target - // operating systems and source repositories. Applies to Linux instances only. + // Information about the patches to use to update the managed nodes, including + // target operating systems and source repositories. Applies to Linux managed nodes + // only. Sources []types.PatchSource // Optional metadata that you assign to a resource. Tags enable you to categorize a diff --git a/service/ssm/api_op_DeleteActivation.go b/service/ssm/api_op_DeleteActivation.go index e408ce8e00d..4359b7f0b76 100644 --- a/service/ssm/api_op_DeleteActivation.go +++ b/service/ssm/api_op_DeleteActivation.go @@ -12,8 +12,8 @@ import ( // Deletes an activation. You aren't required to delete an activation. If you // delete an activation, you can no longer use it to register additional managed -// instances. Deleting an activation doesn't de-register managed instances. You -// must manually de-register managed instances. +// nodes. Deleting an activation doesn't de-register managed nodes. You must +// manually de-register managed nodes. func (c *Client) DeleteActivation(ctx context.Context, params *DeleteActivationInput, optFns ...func(*Options)) (*DeleteActivationOutput, error) { if params == nil { params = &DeleteActivationInput{} diff --git a/service/ssm/api_op_DeleteAssociation.go b/service/ssm/api_op_DeleteAssociation.go index 95381010ce7..89dab0b165b 100644 --- a/service/ssm/api_op_DeleteAssociation.go +++ b/service/ssm/api_op_DeleteAssociation.go @@ -11,12 +11,12 @@ import ( ) // Disassociates the specified Amazon Web Services Systems Manager document (SSM -// document) from the specified instance. If you created the association by using -// the Targets parameter, then you must delete the association by using the -// association ID. When you disassociate a document from an instance, it doesn't -// change the configuration of the instance. To change the configuration state of -// an instance after you disassociate a document, you must create a new document -// with the desired configuration and associate it with the instance. +// document) from the specified managed node. If you created the association by +// using the Targets parameter, then you must delete the association by using the +// association ID. When you disassociate a document from a managed node, it doesn't +// change the configuration of the node. To change the configuration state of a +// managed node after you disassociate a document, you must create a new document +// with the desired configuration and associate it with the node. func (c *Client) DeleteAssociation(ctx context.Context, params *DeleteAssociationInput, optFns ...func(*Options)) (*DeleteAssociationOutput, error) { if params == nil { params = &DeleteAssociationInput{} @@ -37,10 +37,10 @@ type DeleteAssociationInput struct { // The association ID that you want to delete. AssociationId *string - // The instance ID. InstanceId has been deprecated. To specify an instance ID for - // an association, use the Targets parameter. Requests that include the parameter - // InstanceID with Systems Manager documents (SSM documents) that use schema - // version 2.0 or later will fail. In addition, if you use the parameter + // The managed node ID. InstanceId has been deprecated. To specify a managed node + // ID for an association, use the Targets parameter. Requests that include the + // parameter InstanceID with Systems Manager documents (SSM documents) that use + // schema version 2.0 or later will fail. In addition, if you use the parameter // InstanceId, you can't use the parameters AssociationName, DocumentVersion, // MaxErrors, MaxConcurrency, OutputLocation, or ScheduleExpression. To use these // parameters, you must use the Targets parameter. diff --git a/service/ssm/api_op_DeleteDocument.go b/service/ssm/api_op_DeleteDocument.go index ea4c1aa8f89..02fc4ae9657 100644 --- a/service/ssm/api_op_DeleteDocument.go +++ b/service/ssm/api_op_DeleteDocument.go @@ -11,9 +11,9 @@ import ( ) // Deletes the Amazon Web Services Systems Manager document (SSM document) and all -// instance associations to the document. Before you delete the document, we -// recommend that you use DeleteAssociation to disassociate all instances that are -// associated with the document. +// managed node associations to the document. Before you delete the document, we +// recommend that you use DeleteAssociation to disassociate all managed nodes that +// are associated with the document. func (c *Client) DeleteDocument(ctx context.Context, params *DeleteDocumentInput, optFns ...func(*Options)) (*DeleteDocumentOutput, error) { if params == nil { params = &DeleteDocumentInput{} diff --git a/service/ssm/api_op_DeleteResourceDataSync.go b/service/ssm/api_op_DeleteResourceDataSync.go index d41c21ac0a2..f64ed8d0bdd 100644 --- a/service/ssm/api_op_DeleteResourceDataSync.go +++ b/service/ssm/api_op_DeleteResourceDataSync.go @@ -11,7 +11,7 @@ import ( ) // Deletes a resource data sync configuration. After the configuration is deleted, -// changes to data on managed instances are no longer synced to or from the target. +// changes to data on managed nodes are no longer synced to or from the target. // Deleting a sync configuration doesn't delete data. func (c *Client) DeleteResourceDataSync(ctx context.Context, params *DeleteResourceDataSyncInput, optFns ...func(*Options)) (*DeleteResourceDataSyncOutput, error) { if params == nil { diff --git a/service/ssm/api_op_DeregisterManagedInstance.go b/service/ssm/api_op_DeregisterManagedInstance.go index 74120167638..5936086fe07 100644 --- a/service/ssm/api_op_DeregisterManagedInstance.go +++ b/service/ssm/api_op_DeregisterManagedInstance.go @@ -11,8 +11,8 @@ import ( ) // Removes the server or virtual machine from the list of registered servers. You -// can reregister the instance again at any time. If you don't plan to use Run -// Command on the server, we suggest uninstalling SSM Agent first. +// can reregister the node again at any time. If you don't plan to use Run Command +// on the server, we suggest uninstalling SSM Agent first. func (c *Client) DeregisterManagedInstance(ctx context.Context, params *DeregisterManagedInstanceInput, optFns ...func(*Options)) (*DeregisterManagedInstanceOutput, error) { if params == nil { params = &DeregisterManagedInstanceInput{} @@ -30,8 +30,8 @@ func (c *Client) DeregisterManagedInstance(ctx context.Context, params *Deregist type DeregisterManagedInstanceInput struct { - // The ID assigned to the managed instance when you registered it using the - // activation process. + // The ID assigned to the managed node when you registered it using the activation + // process. // // This member is required. InstanceId *string diff --git a/service/ssm/api_op_DescribeActivations.go b/service/ssm/api_op_DescribeActivations.go index 936ac8d40f0..61de6b24c22 100644 --- a/service/ssm/api_op_DescribeActivations.go +++ b/service/ssm/api_op_DescribeActivations.go @@ -14,7 +14,7 @@ import ( // Describes details about the activation, such as the date and time the activation // was created, its expiration date, the Identity and Access Management (IAM) role -// assigned to the instances in the activation, and the number of instances +// assigned to the managed nodes in the activation, and the number of nodes // registered by using this activation. func (c *Client) DescribeActivations(ctx context.Context, params *DescribeActivationsInput, optFns ...func(*Options)) (*DescribeActivationsOutput, error) { if params == nil { diff --git a/service/ssm/api_op_DescribeAssociation.go b/service/ssm/api_op_DescribeAssociation.go index de3a686e3dc..01e17d3fd9c 100644 --- a/service/ssm/api_op_DescribeAssociation.go +++ b/service/ssm/api_op_DescribeAssociation.go @@ -11,9 +11,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Describes the association for the specified target or instance. If you created -// the association by using the Targets parameter, then you must retrieve the -// association by using the association ID. +// Describes the association for the specified target or managed node. If you +// created the association by using the Targets parameter, then you must retrieve +// the association by using the association ID. func (c *Client) DescribeAssociation(ctx context.Context, params *DescribeAssociationInput, optFns ...func(*Options)) (*DescribeAssociationOutput, error) { if params == nil { params = &DescribeAssociationInput{} @@ -36,11 +36,11 @@ type DescribeAssociationInput struct { // Specify the association version to retrieve. To view the latest version, either // specify $LATEST for this parameter, or omit this parameter. To view a list of - // all associations for an instance, use ListAssociations. To get a list of + // all associations for a managed node, use ListAssociations. To get a list of // versions for a specific association, use ListAssociationVersions. AssociationVersion *string - // The instance ID. + // The managed node ID. InstanceId *string // The name of the SSM document. diff --git a/service/ssm/api_op_DescribeAvailablePatches.go b/service/ssm/api_op_DescribeAvailablePatches.go index 4e7ed4675b9..81c7846adaf 100644 --- a/service/ssm/api_op_DescribeAvailablePatches.go +++ b/service/ssm/api_op_DescribeAvailablePatches.go @@ -31,7 +31,7 @@ func (c *Client) DescribeAvailablePatches(ctx context.Context, params *DescribeA type DescribeAvailablePatchesInput struct { // Each element in the array is a structure containing a key-value pair. Windows - // Server Supported keys for Windows Server instance patches include the + // Server Supported keys for Windows Server managed node patches include the // following: // // * PATCH_SET Sample values: OS | APPLICATION @@ -56,7 +56,7 @@ type DescribeAvailablePatchesInput struct { // (CLI), the following command fails: aws ssm describe-available-patches --filters // Key=CVE_ID,Values=CVE-2018-3615 However, the following command succeeds: aws ssm // describe-available-patches --filters Key=PRODUCT,Values=AmazonLinux2018.03 - // Key=CVE_ID,Values=CVE-2018-3615 Supported keys for Linux instance patches + // Key=CVE_ID,Values=CVE-2018-3615 Supported keys for Linux managed node patches // include the following: // // * PRODUCT Sample values: AmazonLinux2018.03 | diff --git a/service/ssm/api_op_DescribeEffectiveInstanceAssociations.go b/service/ssm/api_op_DescribeEffectiveInstanceAssociations.go index 079e19f002c..28ef47cbfe3 100644 --- a/service/ssm/api_op_DescribeEffectiveInstanceAssociations.go +++ b/service/ssm/api_op_DescribeEffectiveInstanceAssociations.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// All associations for the instance(s). +// All associations for the managed node(s). func (c *Client) DescribeEffectiveInstanceAssociations(ctx context.Context, params *DescribeEffectiveInstanceAssociationsInput, optFns ...func(*Options)) (*DescribeEffectiveInstanceAssociationsOutput, error) { if params == nil { params = &DescribeEffectiveInstanceAssociationsInput{} @@ -30,7 +30,7 @@ func (c *Client) DescribeEffectiveInstanceAssociations(ctx context.Context, para type DescribeEffectiveInstanceAssociationsInput struct { - // The instance ID for which you want to view all associations. + // The managed node ID for which you want to view all associations. // // This member is required. InstanceId *string @@ -48,7 +48,7 @@ type DescribeEffectiveInstanceAssociationsInput struct { type DescribeEffectiveInstanceAssociationsOutput struct { - // The associations for the requested instance. + // The associations for the requested managed node. Associations []types.InstanceAssociation // The token to use when requesting the next set of items. If there are no diff --git a/service/ssm/api_op_DescribeInstanceAssociationsStatus.go b/service/ssm/api_op_DescribeInstanceAssociationsStatus.go index 52ab5cc0ede..3e1be1fcc8e 100644 --- a/service/ssm/api_op_DescribeInstanceAssociationsStatus.go +++ b/service/ssm/api_op_DescribeInstanceAssociationsStatus.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// The status of the associations for the instance(s). +// The status of the associations for the managed node(s). func (c *Client) DescribeInstanceAssociationsStatus(ctx context.Context, params *DescribeInstanceAssociationsStatusInput, optFns ...func(*Options)) (*DescribeInstanceAssociationsStatusOutput, error) { if params == nil { params = &DescribeInstanceAssociationsStatusInput{} @@ -30,7 +30,7 @@ func (c *Client) DescribeInstanceAssociationsStatus(ctx context.Context, params type DescribeInstanceAssociationsStatusInput struct { - // The instance IDs for which you want association status information. + // The managed node IDs for which you want association status information. // // This member is required. InstanceId *string diff --git a/service/ssm/api_op_DescribeInstanceInformation.go b/service/ssm/api_op_DescribeInstanceInformation.go index fef6cdd16b5..ac9c86c3462 100644 --- a/service/ssm/api_op_DescribeInstanceInformation.go +++ b/service/ssm/api_op_DescribeInstanceInformation.go @@ -12,15 +12,15 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Describes one or more of your instances, including information about the -// operating system platform, the version of SSM Agent installed on the instance, -// instance status, and so on. If you specify one or more instance IDs, it returns -// information for those instances. If you don't specify instance IDs, it returns -// information for all your instances. If you specify an instance ID that isn't -// valid or an instance that you don't own, you receive an error. The IamRole field -// for this API operation is the Identity and Access Management (IAM) role assigned -// to on-premises instances. This call doesn't return the IAM role for EC2 -// instances. +// Describes one or more of your managed nodes, including information about the +// operating system platform, the version of SSM Agent installed on the managed +// node, node status, and so on. If you specify one or more managed node IDs, it +// returns information for those managed nodes. If you don't specify node IDs, it +// returns information for all your managed nodes. If you specify a node ID that +// isn't valid or a node that you don't own, you receive an error. The IamRole +// field for this API operation is the Identity and Access Management (IAM) role +// assigned to on-premises managed nodes. This call doesn't return the IAM role for +// EC2 instances. func (c *Client) DescribeInstanceInformation(ctx context.Context, params *DescribeInstanceInformationInput, optFns ...func(*Options)) (*DescribeInstanceInformationOutput, error) { if params == nil { params = &DescribeInstanceInformationInput{} @@ -38,14 +38,14 @@ func (c *Client) DescribeInstanceInformation(ctx context.Context, params *Descri type DescribeInstanceInformationInput struct { - // One or more filters. Use a filter to return a more specific list of instances. - // You can filter based on tags applied to EC2 instances. Use this Filters data - // type instead of InstanceInformationFilterList, which is deprecated. + // One or more filters. Use a filter to return a more specific list of managed + // nodes. You can filter based on tags applied to EC2 instances. Use this Filters + // data type instead of InstanceInformationFilterList, which is deprecated. Filters []types.InstanceInformationStringFilter // This is a legacy method. We recommend that you don't use this method. Instead, - // use the Filters data type. Filters enables you to return instance information by - // filtering based on tags applied to managed instances. Attempting to use + // use the Filters data type. Filters enables you to return node information by + // filtering based on tags applied to managed nodes. Attempting to use // InstanceInformationFilterList and Filters leads to an exception error. InstanceInformationFilterList []types.InstanceInformationFilter @@ -62,7 +62,7 @@ type DescribeInstanceInformationInput struct { type DescribeInstanceInformationOutput struct { - // The instance information list. + // The managed node information list. InstanceInformationList []types.InstanceInformation // The token to use when requesting the next set of items. If there are no diff --git a/service/ssm/api_op_DescribeInstancePatchStates.go b/service/ssm/api_op_DescribeInstancePatchStates.go index ea6e74547d4..52bc967bbeb 100644 --- a/service/ssm/api_op_DescribeInstancePatchStates.go +++ b/service/ssm/api_op_DescribeInstancePatchStates.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves the high-level patch state of one or more instances. +// Retrieves the high-level patch state of one or more managed nodes. func (c *Client) DescribeInstancePatchStates(ctx context.Context, params *DescribeInstancePatchStatesInput, optFns ...func(*Options)) (*DescribeInstancePatchStatesOutput, error) { if params == nil { params = &DescribeInstancePatchStatesInput{} @@ -30,12 +30,13 @@ func (c *Client) DescribeInstancePatchStates(ctx context.Context, params *Descri type DescribeInstancePatchStatesInput struct { - // The ID of the instance for which patch state information should be retrieved. + // The ID of the managed node for which patch state information should be + // retrieved. // // This member is required. InstanceIds []string - // The maximum number of instances to return (per page). + // The maximum number of managed nodes to return (per page). MaxResults int32 // The token for the next set of items to return. (You received this token from a @@ -47,7 +48,7 @@ type DescribeInstancePatchStatesInput struct { type DescribeInstancePatchStatesOutput struct { - // The high-level patch state for the requested instances. + // The high-level patch state for the requested managed nodes. InstancePatchStates []types.InstancePatchState // The token to use when requesting the next set of items. If there are no @@ -134,7 +135,7 @@ var _ DescribeInstancePatchStatesAPIClient = (*Client)(nil) // DescribeInstancePatchStatesPaginatorOptions is the paginator options for // DescribeInstancePatchStates type DescribeInstancePatchStatesPaginatorOptions struct { - // The maximum number of instances to return (per page). + // The maximum number of managed nodes to return (per page). Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/ssm/api_op_DescribeInstancePatchStatesForPatchGroup.go b/service/ssm/api_op_DescribeInstancePatchStatesForPatchGroup.go index a967a09570e..7f25d654ee8 100644 --- a/service/ssm/api_op_DescribeInstancePatchStatesForPatchGroup.go +++ b/service/ssm/api_op_DescribeInstancePatchStatesForPatchGroup.go @@ -12,8 +12,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves the high-level patch state for the instances in the specified patch -// group. +// Retrieves the high-level patch state for the managed nodes in the specified +// patch group. func (c *Client) DescribeInstancePatchStatesForPatchGroup(ctx context.Context, params *DescribeInstancePatchStatesForPatchGroupInput, optFns ...func(*Options)) (*DescribeInstancePatchStatesForPatchGroupOutput, error) { if params == nil { params = &DescribeInstancePatchStatesForPatchGroupInput{} @@ -60,7 +60,7 @@ type DescribeInstancePatchStatesForPatchGroupInput struct { type DescribeInstancePatchStatesForPatchGroupOutput struct { - // The high-level patch state for the requested instances. + // The high-level patch state for the requested managed nodes. InstancePatchStates []types.InstancePatchState // The token to use when requesting the next set of items. If there are no diff --git a/service/ssm/api_op_DescribeInstancePatches.go b/service/ssm/api_op_DescribeInstancePatches.go index 66b2a5528b9..666e17e299c 100644 --- a/service/ssm/api_op_DescribeInstancePatches.go +++ b/service/ssm/api_op_DescribeInstancePatches.go @@ -12,8 +12,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves information about the patches on the specified instance and their -// state relative to the patch baseline being used for the instance. +// Retrieves information about the patches on the specified managed node and their +// state relative to the patch baseline being used for the node. func (c *Client) DescribeInstancePatches(ctx context.Context, params *DescribeInstancePatchesInput, optFns ...func(*Options)) (*DescribeInstancePatchesOutput, error) { if params == nil { params = &DescribeInstancePatchesInput{} @@ -31,7 +31,7 @@ func (c *Client) DescribeInstancePatches(ctx context.Context, params *DescribeIn type DescribeInstancePatchesInput struct { - // The ID of the instance whose patch state information should be retrieved. + // The ID of the managed node whose patch state information should be retrieved. // // This member is required. InstanceId *string diff --git a/service/ssm/api_op_DescribeMaintenanceWindowSchedule.go b/service/ssm/api_op_DescribeMaintenanceWindowSchedule.go index 08ca5c3de74..83a7081b728 100644 --- a/service/ssm/api_op_DescribeMaintenanceWindowSchedule.go +++ b/service/ssm/api_op_DescribeMaintenanceWindowSchedule.go @@ -47,7 +47,7 @@ type DescribeMaintenanceWindowScheduleInput struct { // INSTANCE. ResourceType types.MaintenanceWindowResourceType - // The instance ID or key-value pair to retrieve information about. + // The managed node ID or key-value pair to retrieve information about. Targets []types.Target // The ID of the maintenance window to retrieve information about. diff --git a/service/ssm/api_op_DescribeMaintenanceWindowsForTarget.go b/service/ssm/api_op_DescribeMaintenanceWindowsForTarget.go index f496e6a19e0..1d2ffb8ef2f 100644 --- a/service/ssm/api_op_DescribeMaintenanceWindowsForTarget.go +++ b/service/ssm/api_op_DescribeMaintenanceWindowsForTarget.go @@ -12,8 +12,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves information about the maintenance window targets or tasks that an -// instance is associated with. +// Retrieves information about the maintenance window targets or tasks that a +// managed node is associated with. func (c *Client) DescribeMaintenanceWindowsForTarget(ctx context.Context, params *DescribeMaintenanceWindowsForTargetInput, optFns ...func(*Options)) (*DescribeMaintenanceWindowsForTargetOutput, error) { if params == nil { params = &DescribeMaintenanceWindowsForTargetInput{} @@ -37,7 +37,7 @@ type DescribeMaintenanceWindowsForTargetInput struct { // This member is required. ResourceType types.MaintenanceWindowResourceType - // The instance ID or key-value pair to retrieve information about. + // The managed node ID or key-value pair to retrieve information about. // // This member is required. Targets []types.Target @@ -59,7 +59,7 @@ type DescribeMaintenanceWindowsForTargetOutput struct { // call.) NextToken *string - // Information about the maintenance window targets and tasks an instance is + // Information about the maintenance window targets and tasks a managed node is // associated with. WindowIdentities []types.MaintenanceWindowIdentityForTarget diff --git a/service/ssm/api_op_DescribePatchGroupState.go b/service/ssm/api_op_DescribePatchGroupState.go index 5f3abcc86df..d011b21c66f 100644 --- a/service/ssm/api_op_DescribePatchGroupState.go +++ b/service/ssm/api_op_DescribePatchGroupState.go @@ -39,59 +39,59 @@ type DescribePatchGroupStateInput struct { type DescribePatchGroupStateOutput struct { - // The number of instances in the patch group. + // The number of managed nodes in the patch group. Instances int32 - // The number of instances where patches that are specified as Critical for + // The number of managed nodes where patches that are specified as Critical for // compliance reporting in the patch baseline aren't installed. These patches might // be missing, have failed installation, were rejected, or were installed but - // awaiting a required instance reboot. The status of these instances is + // awaiting a required managed node reboot. The status of these managed nodes is // NON_COMPLIANT. InstancesWithCriticalNonCompliantPatches int32 - // The number of instances with patches from the patch baseline that failed to + // The number of managed nodes with patches from the patch baseline that failed to // install. InstancesWithFailedPatches int32 - // The number of instances with patches installed that aren't defined in the patch - // baseline. + // The number of managed nodes with patches installed that aren't defined in the + // patch baseline. InstancesWithInstalledOtherPatches int32 - // The number of instances with installed patches. + // The number of managed nodes with installed patches. InstancesWithInstalledPatches int32 - // The number of instances with patches installed by Patch Manager that haven't - // been rebooted after the patch installation. The status of these instances is + // The number of managed nodes with patches installed by Patch Manager that haven't + // been rebooted after the patch installation. The status of these managed nodes is // NON_COMPLIANT. InstancesWithInstalledPendingRebootPatches int32 - // The number of instances with patches installed that are specified in a + // The number of managed nodes with patches installed that are specified in a // RejectedPatches list. Patches with a status of INSTALLED_REJECTED were typically // installed before they were added to a RejectedPatches list. If // ALLOW_AS_DEPENDENCY is the specified option for RejectedPatchesAction, the value // of InstancesWithInstalledRejectedPatches will always be 0 (zero). InstancesWithInstalledRejectedPatches int32 - // The number of instances with missing patches from the patch baseline. + // The number of managed nodes with missing patches from the patch baseline. InstancesWithMissingPatches int32 - // The number of instances with patches that aren't applicable. + // The number of managed nodes with patches that aren't applicable. InstancesWithNotApplicablePatches int32 - // The number of instances with patches installed that are specified as other than - // Critical or Security but aren't compliant with the patch baseline. The status of - // these instances is NON_COMPLIANT. + // The number of managed nodes with patches installed that are specified as other + // than Critical or Security but aren't compliant with the patch baseline. The + // status of these managed nodes is NON_COMPLIANT. InstancesWithOtherNonCompliantPatches int32 - // The number of instances where patches that are specified as Security in a patch - // advisory aren't installed. These patches might be missing, have failed - // installation, were rejected, or were installed but awaiting a required instance - // reboot. The status of these instances is NON_COMPLIANT. + // The number of managed nodes where patches that are specified as Security in a + // patch advisory aren't installed. These patches might be missing, have failed + // installation, were rejected, or were installed but awaiting a required managed + // node reboot. The status of these managed nodes is NON_COMPLIANT. InstancesWithSecurityNonCompliantPatches int32 - // The number of instances with NotApplicable patches beyond the supported limit, - // which aren't reported by name to Inventory. Inventory is a capability of Amazon - // Web Services Systems Manager. + // The number of managed nodes with NotApplicable patches beyond the supported + // limit, which aren't reported by name to Inventory. Inventory is a capability of + // Amazon Web Services Systems Manager. InstancesWithUnreportedNotApplicablePatches int32 // Metadata pertaining to the operation's result. diff --git a/service/ssm/api_op_GetCommandInvocation.go b/service/ssm/api_op_GetCommandInvocation.go index cf071692a56..93258dbbd97 100644 --- a/service/ssm/api_op_GetCommandInvocation.go +++ b/service/ssm/api_op_GetCommandInvocation.go @@ -19,9 +19,9 @@ import ( // Returns detailed information about command execution for an invocation or // plugin. GetCommandInvocation only gives the execution status of a plugin in a -// document. To get the command execution status on a specific instance, use -// ListCommandInvocations. To get the command execution status across instances, -// use ListCommands. +// document. To get the command execution status on a specific managed node, use +// ListCommandInvocations. To get the command execution status across managed +// nodes, use ListCommands. func (c *Client) GetCommandInvocation(ctx context.Context, params *GetCommandInvocationInput, optFns ...func(*Options)) (*GetCommandInvocationOutput, error) { if params == nil { params = &GetCommandInvocationInput{} @@ -44,10 +44,10 @@ type GetCommandInvocationInput struct { // This member is required. CommandId *string - // (Required) The ID of the managed instance targeted by the command. A managed - // instance can be an Amazon Elastic Compute Cloud (Amazon EC2) instance or an - // instance in your hybrid environment that is configured for Amazon Web Services - // Systems Manager. + // (Required) The ID of the managed node targeted by the command. A managed node + // can be an Amazon Elastic Compute Cloud (Amazon EC2) instance, edge device, and + // on-premises server or VM in your hybrid environment that is configured for + // Amazon Web Services Systems Manager. // // This member is required. InstanceId *string @@ -101,9 +101,10 @@ type GetCommandInvocationOutput struct { // the plugin hasn't started to run, the string is empty. ExecutionStartDateTime *string - // The ID of the managed instance targeted by the command. A managed instance can - // be an EC2 instance or an instance in your hybrid environment that is configured - // for Systems Manager. + // The ID of the managed node targeted by the command. A managed node can be an + // Amazon Elastic Compute Cloud (Amazon EC2) instance, edge device, or on-premises + // server or VM in your hybrid environment that is configured for Amazon Web + // Services Systems Manager. InstanceId *string // The name of the plugin, or step name, for which details are reported. For @@ -111,8 +112,8 @@ type GetCommandInvocationOutput struct { PluginName *string // The error level response code for the plugin script. If the response code is -1, - // then the command hasn't started running on the instance, or it wasn't received - // by the instance. + // then the command hasn't started running on the managed node, or it wasn't + // received by the node. ResponseCode int32 // The first 8,000 characters written by the plugin to stderr. If the command @@ -146,43 +147,43 @@ type GetCommandInvocationOutput struct { // in the Amazon Web Services Systems Manager User Guide. StatusDetails can be one // of the following values: // - // * Pending: The command hasn't been sent to the - // instance. + // * Pending: The command hasn't been sent to the managed + // node. // - // * In Progress: The command has been sent to the instance but hasn't + // * In Progress: The command has been sent to the managed node but hasn't // reached a terminal state. // // * Delayed: The system attempted to send the command - // to the target, but the target wasn't available. The instance might not be - // available because of network issues, because the instance was stopped, or for + // to the target, but the target wasn't available. The managed node might not be + // available because of network issues, because the node was stopped, or for // similar reasons. The system will try to send the command again. // // * Success: The // command or plugin ran successfully. This is a terminal state. // // * Delivery Timed - // Out: The command wasn't delivered to the instance before the delivery timeout - // expired. Delivery timeouts don't count against the parent command's MaxErrors - // limit, but they do contribute to whether the parent command status is Success or - // Incomplete. This is a terminal state. + // Out: The command wasn't delivered to the managed node before the delivery + // timeout expired. Delivery timeouts don't count against the parent command's + // MaxErrors limit, but they do contribute to whether the parent command status is + // Success or Incomplete. This is a terminal state. // - // * Execution Timed Out: The command - // started to run on the instance, but the execution wasn't complete before the - // timeout expired. Execution timeouts count against the MaxErrors limit of the - // parent command. This is a terminal state. + // * Execution Timed Out: The + // command started to run on the managed node, but the execution wasn't complete + // before the timeout expired. Execution timeouts count against the MaxErrors limit + // of the parent command. This is a terminal state. // - // * Failed: The command wasn't run - // successfully on the instance. For a plugin, this indicates that the result code - // wasn't zero. For a command invocation, this indicates that the result code for - // one or more plugins wasn't zero. Invocation failures count against the MaxErrors - // limit of the parent command. This is a terminal state. - // - // * Canceled: The command - // was terminated before it was completed. This is a terminal state. + // * Failed: The command wasn't + // run successfully on the managed node. For a plugin, this indicates that the + // result code wasn't zero. For a command invocation, this indicates that the + // result code for one or more plugins wasn't zero. Invocation failures count + // against the MaxErrors limit of the parent command. This is a terminal state. // // * - // Undeliverable: The command can't be delivered to the instance. The instance - // might not exist or might not be responding. Undeliverable invocations don't + // Canceled: The command was terminated before it was completed. This is a terminal + // state. + // + // * Undeliverable: The command can't be delivered to the managed node. The + // node might not exist or might not be responding. Undeliverable invocations don't // count against the parent command's MaxErrors limit and don't contribute to // whether the parent command status is Success or Incomplete. This is a terminal // state. diff --git a/service/ssm/api_op_GetConnectionStatus.go b/service/ssm/api_op_GetConnectionStatus.go index 326266fa27c..7a8dc4fc843 100644 --- a/service/ssm/api_op_GetConnectionStatus.go +++ b/service/ssm/api_op_GetConnectionStatus.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves the Session Manager connection status for an instance to determine +// Retrieves the Session Manager connection status for a managed node to determine // whether it is running and ready to receive Session Manager connections. func (c *Client) GetConnectionStatus(ctx context.Context, params *GetConnectionStatusInput, optFns ...func(*Options)) (*GetConnectionStatusOutput, error) { if params == nil { @@ -30,7 +30,7 @@ func (c *Client) GetConnectionStatus(ctx context.Context, params *GetConnectionS type GetConnectionStatusInput struct { - // The instance ID. + // The managed node ID. // // This member is required. Target *string @@ -40,11 +40,11 @@ type GetConnectionStatusInput struct { type GetConnectionStatusOutput struct { - // The status of the connection to the instance. For example, 'Connected' or 'Not - // Connected'. + // The status of the connection to the managed node. For example, 'Connected' or + // 'Not Connected'. Status types.ConnectionStatus - // The ID of the instance to check connection status. + // The ID of the managed node to check connection status. Target *string // Metadata pertaining to the operation's result. diff --git a/service/ssm/api_op_GetDeployablePatchSnapshotForInstance.go b/service/ssm/api_op_GetDeployablePatchSnapshotForInstance.go index bc44af42984..36120491408 100644 --- a/service/ssm/api_op_GetDeployablePatchSnapshotForInstance.go +++ b/service/ssm/api_op_GetDeployablePatchSnapshotForInstance.go @@ -11,15 +11,15 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves the current snapshot for the patch baseline the instance uses. This -// API is primarily used by the AWS-RunPatchBaseline Systems Manager document (SSM -// document). If you run the command locally, such as with the Command Line +// Retrieves the current snapshot for the patch baseline the managed node uses. +// This API is primarily used by the AWS-RunPatchBaseline Systems Manager document +// (SSM document). If you run the command locally, such as with the Command Line // Interface (CLI), the system attempts to use your local Amazon Web Services // credentials and the operation fails. To avoid this, you can run the command in // the Amazon Web Services Systems Manager console. Use Run Command, a capability // of Amazon Web Services Systems Manager, with an SSM document that enables you to -// target an instance with a script or command. For example, run the command using -// the AWS-RunShellScript document or the AWS-RunPowerShellScript document. +// target a managed node with a script or command. For example, run the command +// using the AWS-RunShellScript document or the AWS-RunPowerShellScript document. func (c *Client) GetDeployablePatchSnapshotForInstance(ctx context.Context, params *GetDeployablePatchSnapshotForInstanceInput, optFns ...func(*Options)) (*GetDeployablePatchSnapshotForInstanceOutput, error) { if params == nil { params = &GetDeployablePatchSnapshotForInstanceInput{} @@ -37,7 +37,7 @@ func (c *Client) GetDeployablePatchSnapshotForInstance(ctx context.Context, para type GetDeployablePatchSnapshotForInstanceInput struct { - // The ID of the instance for which the appropriate patch snapshot should be + // The ID of the managed node for which the appropriate patch snapshot should be // retrieved. // // This member is required. @@ -56,11 +56,11 @@ type GetDeployablePatchSnapshotForInstanceInput struct { type GetDeployablePatchSnapshotForInstanceOutput struct { - // The instance ID. + // The managed node ID. InstanceId *string // Returns the specific operating system (for example Windows Server 2012 or Amazon - // Linux 2015.09) on the instance for the specified patch snapshot. + // Linux 2015.09) on the managed node for the specified patch snapshot. Product *string // A pre-signed Amazon Simple Storage Service (Amazon S3) URL that can be used to diff --git a/service/ssm/api_op_GetInventory.go b/service/ssm/api_op_GetInventory.go index 15fea19b0b2..ed6dbbd3459 100644 --- a/service/ssm/api_op_GetInventory.go +++ b/service/ssm/api_op_GetInventory.go @@ -12,8 +12,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Query inventory information. This includes instance status, such as Stopped or -// Terminated. +// Query inventory information. This includes managed node status, such as Stopped +// or Terminated. func (c *Client) GetInventory(ctx context.Context, params *GetInventoryInput, optFns ...func(*Options)) (*GetInventoryOutput, error) { if params == nil { params = &GetInventoryInput{} @@ -34,7 +34,7 @@ type GetInventoryInput struct { // Returns counts of inventory types based on one or more expressions. For example, // if you aggregate by using an expression that uses the // AWS:InstanceInformation.PlatformType type, you can see a count of how many - // Windows and Linux instances exist in your inventoried fleet. + // Windows and Linux managed nodes exist in your inventoried fleet. Aggregators []types.InventoryAggregator // One or more filters. Use a filter to return a more specific list of results. @@ -56,7 +56,7 @@ type GetInventoryInput struct { type GetInventoryOutput struct { - // Collection of inventory entities such as a collection of instance inventory. + // Collection of inventory entities such as a collection of managed node inventory. Entities []types.InventoryResultEntity // The token to use when requesting the next set of items. If there are no diff --git a/service/ssm/api_op_GetPatchBaseline.go b/service/ssm/api_op_GetPatchBaseline.go index 72c528a52af..7f9018ea582 100644 --- a/service/ssm/api_op_GetPatchBaseline.go +++ b/service/ssm/api_op_GetPatchBaseline.go @@ -56,8 +56,8 @@ type GetPatchBaselineOutput struct { ApprovedPatchesComplianceLevel types.PatchComplianceLevel // Indicates whether the list of approved patches includes non-security updates - // that should be applied to the instances. The default value is false. Applies to - // Linux instances only. + // that should be applied to the managed nodes. The default value is false. Applies + // to Linux managed nodes only. ApprovedPatchesEnableNonSecurity bool // The ID of the retrieved patch baseline. @@ -92,8 +92,9 @@ type GetPatchBaselineOutput struct { // entirely along with packages that include it as a dependency. RejectedPatchesAction types.PatchAction - // Information about the patches to use to update the instances, including target - // operating systems and source repositories. Applies to Linux instances only. + // Information about the patches to use to update the managed nodes, including + // target operating systems and source repositories. Applies to Linux managed nodes + // only. Sources []types.PatchSource // Metadata pertaining to the operation's result. diff --git a/service/ssm/api_op_ListAssociations.go b/service/ssm/api_op_ListAssociations.go index eec9f19e367..588f2f0c6a5 100644 --- a/service/ssm/api_op_ListAssociations.go +++ b/service/ssm/api_op_ListAssociations.go @@ -14,7 +14,7 @@ import ( // Returns all State Manager associations in the current Amazon Web Services // account and Amazon Web Services Region. You can limit the results to a specific -// State Manager association document or instance by specifying a filter. State +// State Manager association document or managed node by specifying a filter. State // Manager is a capability of Amazon Web Services Systems Manager. func (c *Client) ListAssociations(ctx context.Context, params *ListAssociationsInput, optFns ...func(*Options)) (*ListAssociationsOutput, error) { if params == nil { @@ -36,7 +36,7 @@ type ListAssociationsInput struct { // One or more filters. Use a filter to return a more specific list of results. // Filtering associations using the InstanceID attribute only returns legacy // associations created using the InstanceID attribute. Associations targeting the - // instance that are part of the Target Attributes ResourceGroup or Tags aren't + // managed node that are part of the Target Attributes ResourceGroup or Tags aren't // returned. AssociationFilterList []types.AssociationFilter diff --git a/service/ssm/api_op_ListCommandInvocations.go b/service/ssm/api_op_ListCommandInvocations.go index 55f2efc68f4..cde59f2c150 100644 --- a/service/ssm/api_op_ListCommandInvocations.go +++ b/service/ssm/api_op_ListCommandInvocations.go @@ -12,11 +12,11 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// An invocation is copy of a command sent to a specific instance. A command can -// apply to one or more instances. A command invocation applies to one instance. -// For example, if a user runs SendCommand against three instances, then a command -// invocation is created for each requested instance ID. ListCommandInvocations -// provide status about command execution. +// An invocation is copy of a command sent to a specific managed node. A command +// can apply to one or more managed nodes. A command invocation applies to one +// managed node. For example, if a user runs SendCommand against three managed +// nodes, then a command invocation is created for each requested managed node ID. +// ListCommandInvocations provide status about command execution. func (c *Client) ListCommandInvocations(ctx context.Context, params *ListCommandInvocationsInput, optFns ...func(*Options)) (*ListCommandInvocationsOutput, error) { if params == nil { params = &ListCommandInvocationsInput{} @@ -45,7 +45,7 @@ type ListCommandInvocationsInput struct { // results. Filters []types.CommandFilter - // (Optional) The command execution details for a specific instance ID. + // (Optional) The command execution details for a specific managed node ID. InstanceId *string // (Optional) The maximum number of items to return for this call. The call also diff --git a/service/ssm/api_op_ListCommands.go b/service/ssm/api_op_ListCommands.go index f38e6f29157..1f6697bac53 100644 --- a/service/ssm/api_op_ListCommands.go +++ b/service/ssm/api_op_ListCommands.go @@ -37,9 +37,9 @@ type ListCommandsInput struct { // results. Filters []types.CommandFilter - // (Optional) Lists commands issued against this instance ID. You can't specify an - // instance ID in the same command that you specify Status = Pending. This is - // because the command hasn't reached the instance yet. + // (Optional) Lists commands issued against this managed node ID. You can't specify + // a managed node ID in the same command that you specify Status = Pending. This is + // because the command hasn't reached the managed node yet. InstanceId *string // (Optional) The maximum number of items to return for this call. The call also diff --git a/service/ssm/api_op_ListInventoryEntries.go b/service/ssm/api_op_ListInventoryEntries.go index 6f9be5a0441..8c9dce4bc5a 100644 --- a/service/ssm/api_op_ListInventoryEntries.go +++ b/service/ssm/api_op_ListInventoryEntries.go @@ -29,7 +29,7 @@ func (c *Client) ListInventoryEntries(ctx context.Context, params *ListInventory type ListInventoryEntriesInput struct { - // The instance ID for which you want inventory information. + // The managed node ID for which you want inventory information. // // This member is required. InstanceId *string @@ -55,20 +55,20 @@ type ListInventoryEntriesInput struct { type ListInventoryEntriesOutput struct { - // The time that inventory information was collected for the instance(s). + // The time that inventory information was collected for the managed node(s). CaptureTime *string - // A list of inventory items on the instance(s). + // A list of inventory items on the managed node(s). Entries []map[string]string - // The instance ID targeted by the request to query inventory information. + // The managed node ID targeted by the request to query inventory information. InstanceId *string // The token to use when requesting the next set of items. If there are no // additional items to return, the string is empty. NextToken *string - // The inventory schema version used by the instance(s). + // The inventory schema version used by the managed node(s). SchemaVersion *string // The type of inventory item returned by the request. diff --git a/service/ssm/api_op_ListResourceComplianceSummaries.go b/service/ssm/api_op_ListResourceComplianceSummaries.go index 253a82cf18f..cc716dae9d8 100644 --- a/service/ssm/api_op_ListResourceComplianceSummaries.go +++ b/service/ssm/api_op_ListResourceComplianceSummaries.go @@ -51,10 +51,9 @@ type ListResourceComplianceSummariesOutput struct { // set of results. NextToken *string - // A summary count for specified or targeted managed instances. Summary count - // includes information about compliant and non-compliant State Manager - // associations, patch status, or custom items according to the filter criteria - // that you specify. + // A summary count for specified or targeted managed nodes. Summary count includes + // information about compliant and non-compliant State Manager associations, patch + // status, or custom items according to the filter criteria that you specify. ResourceComplianceSummaryItems []types.ResourceComplianceSummaryItem // Metadata pertaining to the operation's result. diff --git a/service/ssm/api_op_PutComplianceItems.go b/service/ssm/api_op_PutComplianceItems.go index 348e005486b..419bbac7786 100644 --- a/service/ssm/api_op_PutComplianceItems.go +++ b/service/ssm/api_op_PutComplianceItems.go @@ -25,7 +25,7 @@ import ( // // * // ExecutionTime. The time the patch, association, or custom compliance item was -// applied to the instance. +// applied to the managed node. // // * Id: The patch, association, or custom compliance // ID. @@ -98,8 +98,7 @@ type PutComplianceItemsInput struct { // This member is required. Items []types.ComplianceItemEntry - // Specify an ID for this resource. For a managed instance, this is the instance - // ID. + // Specify an ID for this resource. For a managed node, this is the node ID. // // This member is required. ResourceId *string diff --git a/service/ssm/api_op_PutInventory.go b/service/ssm/api_op_PutInventory.go index 1aa14305806..81a095a7473 100644 --- a/service/ssm/api_op_PutInventory.go +++ b/service/ssm/api_op_PutInventory.go @@ -11,9 +11,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Bulk update custom inventory items on one more instance. The request adds an -// inventory item, if it doesn't already exist, or updates an inventory item, if it -// does exist. +// Bulk update custom inventory items on one or more managed nodes. The request +// adds an inventory item, if it doesn't already exist, or updates an inventory +// item, if it does exist. func (c *Client) PutInventory(ctx context.Context, params *PutInventoryInput, optFns ...func(*Options)) (*PutInventoryOutput, error) { if params == nil { params = &PutInventoryInput{} @@ -31,12 +31,12 @@ func (c *Client) PutInventory(ctx context.Context, params *PutInventoryInput, op type PutInventoryInput struct { - // An instance ID where you want to add or update inventory items. + // An managed node ID where you want to add or update inventory items. // // This member is required. InstanceId *string - // The inventory items that you want to add or update on instances. + // The inventory items that you want to add or update on managed nodes. // // This member is required. Items []types.InventoryItem diff --git a/service/ssm/api_op_PutParameter.go b/service/ssm/api_op_PutParameter.go index 8d25d2853c8..0f052b8f7ee 100644 --- a/service/ssm/api_op_PutParameter.go +++ b/service/ssm/api_op_PutParameter.go @@ -128,15 +128,15 @@ type PutParameterInput struct { // update the expiration date and time by updating the policy. Updating the // parameter doesn't affect the expiration date and time. When the expiration time // is reached, Parameter Store deletes the parameter. ExpirationNotification: This - // policy triggers an event in Amazon CloudWatch Events that notifies you about the - // expiration. By using this policy, you can receive notification before or after - // the expiration time is reached, in units of days or hours. NoChangeNotification: - // This policy triggers a CloudWatch Events event if a parameter hasn't been - // modified for a specified period of time. This policy type is useful when, for - // example, a secret needs to be changed within a period of time, but it hasn't - // been changed. All existing policies are preserved until you send new policies or - // an empty policy. For more information about parameter policies, see Assigning - // parameter policies + // policy initiates an event in Amazon CloudWatch Events that notifies you about + // the expiration. By using this policy, you can receive notification before or + // after the expiration time is reached, in units of days or hours. + // NoChangeNotification: This policy initiates a CloudWatch Events event if a + // parameter hasn't been modified for a specified period of time. This policy type + // is useful when, for example, a secret needs to be changed within a period of + // time, but it hasn't been changed. All existing policies are preserved until you + // send new policies or an empty policy. For more information about parameter + // policies, see Assigning parameter policies // (https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html). Policies *string diff --git a/service/ssm/api_op_RegisterTargetWithMaintenanceWindow.go b/service/ssm/api_op_RegisterTargetWithMaintenanceWindow.go index de775c97ab1..2c0c72dac85 100644 --- a/service/ssm/api_op_RegisterTargetWithMaintenanceWindow.go +++ b/service/ssm/api_op_RegisterTargetWithMaintenanceWindow.go @@ -35,23 +35,20 @@ type RegisterTargetWithMaintenanceWindowInput struct { // This member is required. ResourceType types.MaintenanceWindowResourceType - // The targets to register with the maintenance window. In other words, the - // instances to run commands on when the maintenance window runs. If a single + // The targets to register with the maintenance window. In other words, the managed + // nodes to run commands on when the maintenance window runs. If a single // maintenance window task is registered with multiple targets, its task // invocations occur sequentially and not in parallel. If your task must run on // multiple targets at the same time, register a task for each target individually // and assign each task the same priority level. You can specify targets using - // instance IDs, resource group names, or tags that have been applied to instances. - // Example 1: Specify instance IDs - // Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3 Example 2: Use - // tag key-pairs applied to instances - // Key=tag:my-tag-key,Values=my-tag-value-1,my-tag-value-2 Example 3: Use tag-keys - // applied to instances Key=tag-key,Values=my-tag-key-1,my-tag-key-2 Example 4: - // Use resource group names Key=resource-groups:Name,Values=resource-group-name - // Example 5: Use filters for resource group types - // Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2 - // For Key=resource-groups:ResourceTypeFilters, specify resource types in the - // following format + // managed node IDs, resource group names, or tags that have been applied to + // managed nodes. Example 1: Specify managed node IDs Key=InstanceIds,Values=,, + // Example 2: Use tag key-pairs applied to managed nodes Key=tag:,Values=, Example + // 3: Use tag-keys applied to managed nodes Key=tag-key,Values=, Example 4: Use + // resource group names Key=resource-groups:Name,Values= Example 5: Use filters for + // resource group types Key=resource-groups:ResourceTypeFilters,Values=, For + // Key=resource-groups:ResourceTypeFilters, specify resource types in the following + // format // Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC // For more information about these examples formats, including the best use case // for each one, see Examples: Register targets with a maintenance window diff --git a/service/ssm/api_op_RegisterTaskWithMaintenanceWindow.go b/service/ssm/api_op_RegisterTaskWithMaintenanceWindow.go index ace0c73fd31..3adaaf39138 100644 --- a/service/ssm/api_op_RegisterTaskWithMaintenanceWindow.go +++ b/service/ssm/api_op_RegisterTaskWithMaintenanceWindow.go @@ -74,7 +74,7 @@ type RegisterTaskWithMaintenanceWindowInput struct { Description *string // A structure containing information about an Amazon Simple Storage Service - // (Amazon S3) bucket to write instance-level logs to. LoggingInfo has been + // (Amazon S3) bucket to write managed node-level logs to. LoggingInfo has been // deprecated. To specify an Amazon Simple Storage Service (Amazon S3) bucket to // contain logs, instead use the OutputS3BucketName and OutputS3KeyPrefix options // in the TaskInvocationParameters structure. For information about how Amazon Web @@ -119,15 +119,15 @@ type RegisterTaskWithMaintenanceWindowInput struct { // (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html#maintenance-window-tasks-service-role) ServiceRoleArn *string - // The targets (either instances or maintenance window targets). One or more + // The targets (either managed nodes or maintenance window targets). One or more // targets must be specified for maintenance window Run Command-type tasks. // Depending on the task, targets are optional for other maintenance window task // types (Automation, Lambda, and Step Functions). For more information about // running tasks that don't specify targets, see Registering maintenance window // tasks without targets // (https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html) - // in the Amazon Web Services Systems Manager User Guide. Specify instances using - // the following format: Key=InstanceIds,Values=, Specify maintenance window + // in the Amazon Web Services Systems Manager User Guide. Specify managed nodes + // using the following format: Key=InstanceIds,Values=, Specify maintenance window // targets using the following format: Key=WindowTargetIds,Values=, Targets []types.Target diff --git a/service/ssm/api_op_RemoveTagsFromResource.go b/service/ssm/api_op_RemoveTagsFromResource.go index a767a60b1ed..68099632e6a 100644 --- a/service/ssm/api_op_RemoveTagsFromResource.go +++ b/service/ssm/api_op_RemoveTagsFromResource.go @@ -39,16 +39,16 @@ type RemoveTagsFromResourceInput struct { // ResourceID of either aws/ssm/MyGroup/appmanager or /aws/ssm/MyGroup/appmanager. // For the Document and Parameter values, use the name of the resource. The // ManagedInstance type for this API operation is only for on-premises managed - // instances. Specify the name of the managed instance in the following format: + // nodes. Specify the name of the managed node in the following format: // mi-ID_number. For example, mi-1a2b3c4d5e6f. // // This member is required. ResourceId *string // The type of resource from which you want to remove a tag. The ManagedInstance - // type for this API operation is only for on-premises managed instances. Specify - // the name of the managed instance in the following format: mi-ID_number . For - // example, mi-1a2b3c4d5e6f. + // type for this API operation is only for on-premises managed nodes. Specify the + // name of the managed node in the following format: mi-ID_number . For example, + // mi-1a2b3c4d5e6f. // // This member is required. ResourceType types.ResourceTypeForTagging diff --git a/service/ssm/api_op_ResumeSession.go b/service/ssm/api_op_ResumeSession.go index 3f3cd964273..3cc45eb83bb 100644 --- a/service/ssm/api_op_ResumeSession.go +++ b/service/ssm/api_op_ResumeSession.go @@ -10,10 +10,11 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Reconnects a session to an instance after it has been disconnected. Connections -// can be resumed for disconnected sessions, but not terminated sessions. This -// command is primarily for use by client machines to automatically reconnect -// during intermittent network issues. It isn't intended for any other use. +// Reconnects a session to a managed node after it has been disconnected. +// Connections can be resumed for disconnected sessions, but not terminated +// sessions. This command is primarily for use by client machines to automatically +// reconnect during intermittent network issues. It isn't intended for any other +// use. func (c *Client) ResumeSession(ctx context.Context, params *ResumeSessionInput, optFns ...func(*Options)) (*ResumeSessionOutput, error) { if params == nil { params = &ResumeSessionInput{} @@ -44,8 +45,8 @@ type ResumeSessionOutput struct { // The ID of the session. SessionId *string - // A URL back to SSM Agent on the instance that the Session Manager client uses to - // send commands and receive output from the instance. Format: + // A URL back to SSM Agent on the managed node that the Session Manager client uses + // to send commands and receive output from the managed node. Format: // wss://ssmmessages.region.amazonaws.com/v1/data-channel/session-id?stream=(input|output). // region represents the Region identifier for an Amazon Web Services Region // supported by Amazon Web Services Systems Manager, such as us-east-2 for the US @@ -57,7 +58,7 @@ type ResumeSessionOutput struct { StreamUrl *string // An encrypted token value containing session and caller information. Used to - // authenticate the connection to the instance. + // authenticate the connection to the managed node. TokenValue *string // Metadata pertaining to the operation's result. diff --git a/service/ssm/api_op_SendCommand.go b/service/ssm/api_op_SendCommand.go index 7e99ac2dcbc..8bb19426bed 100644 --- a/service/ssm/api_op_SendCommand.go +++ b/service/ssm/api_op_SendCommand.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Runs commands on one or more managed instances. +// Runs commands on one or more managed nodes. func (c *Client) SendCommand(ctx context.Context, params *SendCommandInput, optFns ...func(*Options)) (*SendCommandOutput, error) { if params == nil { params = &SendCommandInput{} @@ -66,21 +66,21 @@ type SendCommandInput struct { // --document-version "\$LATEST" --document-version "3" DocumentVersion *string - // The IDs of the instances where the command should run. Specifying instance IDs - // is most useful when you are targeting a limited number of instances, though you - // can specify up to 50 IDs. To target a larger number of instances, or if you - // prefer not to list individual instance IDs, we recommend using the Targets - // option instead. Using Targets, which accepts tag key-value pairs to identify the - // instances to send commands to, you can a send command to tens, hundreds, or - // thousands of instances at once. For more information about how to use targets, - // see Using targets and rate controls to send commands to a fleet + // The IDs of the managed nodes where the command should run. Specifying managed + // node IDs is most useful when you are targeting a limited number of managed + // nodes, though you can specify up to 50 IDs. To target a larger number of managed + // nodes, or if you prefer not to list individual node IDs, we recommend using the + // Targets option instead. Using Targets, which accepts tag key-value pairs to + // identify the managed nodes to send commands to, you can a send command to tens, + // hundreds, or thousands of nodes at once. For more information about how to use + // targets, see Using targets and rate controls to send commands to a fleet // (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html) // in the Amazon Web Services Systems Manager User Guide. InstanceIds []string - // (Optional) The maximum number of instances that are allowed to run the command - // at the same time. You can specify a number such as 10 or a percentage such as - // 10%. The default value is 50. For more information about how to use + // (Optional) The maximum number of managed nodes that are allowed to run the + // command at the same time. You can specify a number such as 10 or a percentage + // such as 10%. The default value is 50. For more information about how to use // MaxConcurrency, see Using concurrency controls // (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-velocity) // in the Amazon Web Services Systems Manager User Guide. @@ -118,13 +118,13 @@ type SendCommandInput struct { // Command commands. ServiceRoleArn *string - // An array of search criteria that targets instances using a Key,Value combination - // that you specify. Specifying targets is most useful when you want to send a - // command to a large number of instances at once. Using Targets, which accepts tag - // key-value pairs to identify instances, you can send a command to tens, hundreds, - // or thousands of instances at once. To send a command to a smaller number of - // instances, you can use the InstanceIds option instead. For more information - // about how to use targets, see Sending commands to a fleet + // An array of search criteria that targets managed nodes using a Key,Value + // combination that you specify. Specifying targets is most useful when you want to + // send a command to a large number of managed nodes at once. Using Targets, which + // accepts tag key-value pairs to identify managed nodes, you can send a command to + // tens, hundreds, or thousands of nodes at once. To send a command to a smaller + // number of managed nodes, you can use the InstanceIds option instead. For more + // information about how to use targets, see Sending commands to a fleet // (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html) // in the Amazon Web Services Systems Manager User Guide. Targets []types.Target diff --git a/service/ssm/api_op_StartSession.go b/service/ssm/api_op_StartSession.go index f0518620d28..1381efd0428 100644 --- a/service/ssm/api_op_StartSession.go +++ b/service/ssm/api_op_StartSession.go @@ -10,7 +10,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Initiates a connection to a target (for example, an instance) for a Session +// Initiates a connection to a target (for example, a managed node) for a Session // Manager session. Returns a URL and token that can be used to open a WebSocket // connection for sending input and receiving outputs. Amazon Web Services CLI // usage: start-session is an interactive command that requires the Session Manager @@ -37,7 +37,7 @@ func (c *Client) StartSession(ctx context.Context, params *StartSessionInput, op type StartSessionInput struct { - // The instance to connect to for the session. + // The managed node to connect to for the session. // // This member is required. Target *string @@ -45,8 +45,8 @@ type StartSessionInput struct { // The name of the SSM document to define the parameters and plugin settings for // the session. For example, SSM-SessionManagerRunShell. You can call the // GetDocument API to verify the document exists before attempting to start a - // session. If no document name is provided, a shell to the instance is launched by - // default. + // session. If no document name is provided, a shell to the managed node is + // launched by default. DocumentName *string // Reserved for future use. @@ -64,8 +64,8 @@ type StartSessionOutput struct { // The ID of the session. SessionId *string - // A URL back to SSM Agent on the instance that the Session Manager client uses to - // send commands and receive output from the instance. Format: + // A URL back to SSM Agent on the managed node that the Session Manager client uses + // to send commands and receive output from the node. Format: // wss://ssmmessages.region.amazonaws.com/v1/data-channel/session-id?stream=(input|output) // region represents the Region identifier for an Amazon Web Services Region // supported by Amazon Web Services Systems Manager, such as us-east-2 for the US @@ -77,7 +77,7 @@ type StartSessionOutput struct { StreamUrl *string // An encrypted token value containing session and caller information. Used to - // authenticate the connection to the instance. + // authenticate the connection to the managed node. TokenValue *string // Metadata pertaining to the operation's result. diff --git a/service/ssm/api_op_TerminateSession.go b/service/ssm/api_op_TerminateSession.go index 50a014470b8..0dee686daed 100644 --- a/service/ssm/api_op_TerminateSession.go +++ b/service/ssm/api_op_TerminateSession.go @@ -11,7 +11,7 @@ import ( ) // Permanently ends a session and closes the data connection between the Session -// Manager client and SSM Agent on the instance. A terminated session isn't be +// Manager client and SSM Agent on the managed node. A terminated session isn't be // resumed. func (c *Client) TerminateSession(ctx context.Context, params *TerminateSessionInput, optFns ...func(*Options)) (*TerminateSessionOutput, error) { if params == nil { diff --git a/service/ssm/api_op_UpdateAssociation.go b/service/ssm/api_op_UpdateAssociation.go index a56971d5d8d..17fa86acb18 100644 --- a/service/ssm/api_op_UpdateAssociation.go +++ b/service/ssm/api_op_UpdateAssociation.go @@ -83,10 +83,10 @@ type UpdateAssociationInput struct { // The maximum number of targets allowed to run the association at the same time. // You can specify a number, for example 10, or a percentage of the target set, for // example 10%. The default value is 100%, which means all targets run the - // association at the same time. If a new instance starts and attempts to run an - // association while Systems Manager is running MaxConcurrency associations, the + // association at the same time. If a new managed node starts and attempts to run + // an association while Systems Manager is running MaxConcurrency associations, the // association is allowed to run. During the next association interval, the new - // instance will process its association within the limit specified for + // managed node will process its association within the limit specified for // MaxConcurrency. MaxConcurrency *string @@ -96,7 +96,7 @@ type UpdateAssociationInput struct { // 10%. If you specify 3, for example, the system stops sending requests when the // fourth error is received. If you specify 0, then the system stops sending // requests after the first error is returned. If you run an association on 50 - // instances and set MaxError to 10%, then the system stops sending the request + // managed nodes and set MaxError to 10%, then the system stops sending the request // when the sixth error is received. Executions that are already running an // association when MaxErrors is reached are allowed to complete, but some of these // executions may fail as well. If you need to ensure that there won't be more than @@ -105,7 +105,7 @@ type UpdateAssociationInput struct { MaxErrors *string // The name of the SSM Command document or Automation runbook that contains the - // configuration information for the instance. You can specify Amazon Web + // configuration information for the managed node. You can specify Amazon Web // Services-predefined documents, documents you created, or a document that is // shared with you from another account. For Systems Manager document (SSM // document) that are shared with you from other Amazon Web Services accounts, you diff --git a/service/ssm/api_op_UpdateAssociationStatus.go b/service/ssm/api_op_UpdateAssociationStatus.go index 7bd77fbe436..d5ac7998025 100644 --- a/service/ssm/api_op_UpdateAssociationStatus.go +++ b/service/ssm/api_op_UpdateAssociationStatus.go @@ -12,7 +12,7 @@ import ( ) // Updates the status of the Amazon Web Services Systems Manager document (SSM -// document) associated with the specified instance. UpdateAssociationStatus is +// document) associated with the specified managed node. UpdateAssociationStatus is // primarily used by the Amazon Web Services Systems Manager Agent (SSM Agent) to // report status updates about your associations and is only used for associations // created with the InstanceId legacy parameter. @@ -38,7 +38,7 @@ type UpdateAssociationStatusInput struct { // This member is required. AssociationStatus *types.AssociationStatus - // The instance ID. + // The managed node ID. // // This member is required. InstanceId *string diff --git a/service/ssm/api_op_UpdateMaintenanceWindowTask.go b/service/ssm/api_op_UpdateMaintenanceWindowTask.go index 27b7de2e6a4..9b7130f60f3 100644 --- a/service/ssm/api_op_UpdateMaintenanceWindowTask.go +++ b/service/ssm/api_op_UpdateMaintenanceWindowTask.go @@ -153,13 +153,14 @@ type UpdateMaintenanceWindowTaskInput struct { // (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html#maintenance-window-tasks-service-role) ServiceRoleArn *string - // The targets (either instances or tags) to modify. Instances are specified using - // the format Key=instanceids,Values=instanceID_1,instanceID_2. Tags are specified - // using the format Key=tag_name,Values=tag_value. One or more targets must be - // specified for maintenance window Run Command-type tasks. Depending on the task, - // targets are optional for other maintenance window task types (Automation, - // Lambda, and Step Functions). For more information about running tasks that don't - // specify targets, see Registering maintenance window tasks without targets + // The targets (either managed nodes or tags) to modify. Managed nodes are + // specified using the format Key=instanceids,Values=instanceID_1,instanceID_2. + // Tags are specified using the format Key=tag_name,Values=tag_value. One or more + // targets must be specified for maintenance window Run Command-type tasks. + // Depending on the task, targets are optional for other maintenance window task + // types (Automation, Lambda, and Step Functions). For more information about + // running tasks that don't specify targets, see Registering maintenance window + // tasks without targets // (https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html) // in the Amazon Web Services Systems Manager User Guide. Targets []types.Target diff --git a/service/ssm/api_op_UpdateManagedInstanceRole.go b/service/ssm/api_op_UpdateManagedInstanceRole.go index 73c73066581..8fdc2c2043b 100644 --- a/service/ssm/api_op_UpdateManagedInstanceRole.go +++ b/service/ssm/api_op_UpdateManagedInstanceRole.go @@ -11,9 +11,9 @@ import ( ) // Changes the Identity and Access Management (IAM) role that is assigned to the -// on-premises instance or virtual machines (VM). IAM roles are first assigned to -// these hybrid instances during the activation process. For more information, see -// CreateActivation. +// on-premises server, edge device, or virtual machines (VM). IAM roles are first +// assigned to these hybrid nodes during the activation process. For more +// information, see CreateActivation. func (c *Client) UpdateManagedInstanceRole(ctx context.Context, params *UpdateManagedInstanceRoleInput, optFns ...func(*Options)) (*UpdateManagedInstanceRoleOutput, error) { if params == nil { params = &UpdateManagedInstanceRoleInput{} @@ -36,7 +36,7 @@ type UpdateManagedInstanceRoleInput struct { // This member is required. IamRole *string - // The ID of the managed instance where you want to update the role. + // The ID of the managed node where you want to update the role. // // This member is required. InstanceId *string diff --git a/service/ssm/api_op_UpdatePatchBaseline.go b/service/ssm/api_op_UpdatePatchBaseline.go index 9cd0d23ce3a..46b1517bf36 100644 --- a/service/ssm/api_op_UpdatePatchBaseline.go +++ b/service/ssm/api_op_UpdatePatchBaseline.go @@ -51,8 +51,8 @@ type UpdatePatchBaselineInput struct { ApprovedPatchesComplianceLevel types.PatchComplianceLevel // Indicates whether the list of approved patches includes non-security updates - // that should be applied to the instances. The default value is false. Applies to - // Linux instances only. + // that should be applied to the managed nodes. The default value is false. Applies + // to Linux managed nodes only. ApprovedPatchesEnableNonSecurity bool // A description of the patch baseline. @@ -91,8 +91,9 @@ type UpdatePatchBaselineInput struct { // are set to null. Replace bool - // Information about the patches to use to update the instances, including target - // operating systems and source repositories. Applies to Linux instances only. + // Information about the patches to use to update the managed nodes, including + // target operating systems and source repositories. Applies to Linux managed nodes + // only. Sources []types.PatchSource noSmithyDocumentSerde @@ -111,8 +112,8 @@ type UpdatePatchBaselineOutput struct { ApprovedPatchesComplianceLevel types.PatchComplianceLevel // Indicates whether the list of approved patches includes non-security updates - // that should be applied to the instances. The default value is false. Applies to - // Linux instances only. + // that should be applied to the managed nodes. The default value is false. Applies + // to Linux managed nodes only. ApprovedPatchesEnableNonSecurity bool // The ID of the deleted patch baseline. @@ -144,8 +145,9 @@ type UpdatePatchBaselineOutput struct { // entirely along with packages that include it as a dependency. RejectedPatchesAction types.PatchAction - // Information about the patches to use to update the instances, including target - // operating systems and source repositories. Applies to Linux instances only. + // Information about the patches to use to update the managed nodes, including + // target operating systems and source repositories. Applies to Linux managed nodes + // only. Sources []types.PatchSource // Metadata pertaining to the operation's result. diff --git a/service/ssm/deserializers.go b/service/ssm/deserializers.go index 74c079786d5..a3391e94830 100644 --- a/service/ssm/deserializers.go +++ b/service/ssm/deserializers.go @@ -601,6 +601,9 @@ func awsAwsjson11_deserializeOpErrorCreateActivation(response *smithyhttp.Respon case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + case strings.EqualFold("InvalidParameters", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameters(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -27062,6 +27065,24 @@ func awsAwsjson11_deserializeDocumentInstanceInformation(v **types.InstanceInfor sv.ResourceType = types.ResourceType(jtv) } + case "SourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SourceId to be of type string, got %T instead", value) + } + sv.SourceId = ptr.String(jtv) + } + + case "SourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SourceType to be of type string, got %T instead", value) + } + sv.SourceType = types.SourceType(jtv) + } + default: _, _ = key, value diff --git a/service/ssm/doc.go b/service/ssm/doc.go index 8fdb2f51c9a..5cb929ac36a 100644 --- a/service/ssm/doc.go +++ b/service/ssm/doc.go @@ -8,13 +8,16 @@ // operating system (OS) patches, automating the creation of Amazon Machine Images // (AMIs), and configuring operating systems (OSs) and applications at scale. // Systems Manager lets you remotely and securely manage the configuration of your -// managed instances. A managed instance is any Amazon Elastic Compute Cloud -// instance (EC2 instance), or any on-premises server or virtual machine (VM) in -// your hybrid environment that has been configured for Systems Manager. This -// reference is intended to be used with the Amazon Web Services Systems Manager -// User Guide (https://docs.aws.amazon.com/systems-manager/latest/userguide/). To -// get started, verify prerequisites and configure managed instances. For more -// information, see Setting up Amazon Web Services Systems Manager +// managed nodes. A managed node is any Amazon Elastic Compute Cloud (Amazon EC2) +// instance, edge device, or on-premises server or virtual machine (VM) that has +// been configured for Systems Manager. With support for IoT Greengrass Version 2 +// devices, the phrase managed instance has been changed to managed node in most of +// the Systems Manager documentation. The Systems Manager console, API calls, error +// messages, and SSM documents still use the term instance. This reference is +// intended to be used with the Amazon Web Services Systems Manager User Guide +// (https://docs.aws.amazon.com/systems-manager/latest/userguide/). To get started, +// verify prerequisites and configure managed nodes. For more information, see +// Setting up Amazon Web Services Systems Manager // (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-setting-up.html) // in the Amazon Web Services Systems Manager User Guide. Related resources // diff --git a/service/ssm/serializers.go b/service/ssm/serializers.go index b6dad3c01cc..001fe61bcf1 100644 --- a/service/ssm/serializers.go +++ b/service/ssm/serializers.go @@ -9749,6 +9749,36 @@ func awsAwsjson11_serializeDocumentRegions(v []string, value smithyjson.Value) e return nil } +func awsAwsjson11_serializeDocumentRegistrationMetadataItem(v *types.RegistrationMetadataItem, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("Key") + ok.String(*v.Key) + } + + if v.Value != nil { + ok := object.Key("Value") + ok.String(*v.Value) + } + + return nil +} + +func awsAwsjson11_serializeDocumentRegistrationMetadataList(v []types.RegistrationMetadataItem, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentRegistrationMetadataItem(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsAwsjson11_serializeDocumentRelatedOpsItem(v *types.RelatedOpsItem, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -10416,6 +10446,13 @@ func awsAwsjson11_serializeOpDocumentCreateActivationInput(v *CreateActivationIn ok.Integer(v.RegistrationLimit) } + if v.RegistrationMetadata != nil { + ok := object.Key("RegistrationMetadata") + if err := awsAwsjson11_serializeDocumentRegistrationMetadataList(v.RegistrationMetadata, ok); err != nil { + return err + } + } + if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { diff --git a/service/ssm/types/enums.go b/service/ssm/types/enums.go index 81014b871a7..6a516600318 100644 --- a/service/ssm/types/enums.go +++ b/service/ssm/types/enums.go @@ -1688,6 +1688,7 @@ type PlatformType string const ( PlatformTypeWindows PlatformType = "Windows" PlatformTypeLinux PlatformType = "Linux" + PlatformTypeMacos PlatformType = "MacOS" ) // Values returns all known values for PlatformType. Note that this can be expanded @@ -1697,6 +1698,7 @@ func (PlatformType) Values() []PlatformType { return []PlatformType{ "Windows", "Linux", + "MacOS", } } @@ -1898,6 +1900,26 @@ func (SignalType) Values() []SignalType { } } +type SourceType string + +// Enum values for SourceType +const ( + SourceTypeAwsEc2Instance SourceType = "AWS::EC2::Instance" + SourceTypeAwsIotThing SourceType = "AWS::IoT::Thing" + SourceTypeAwsSsmManagedinstance SourceType = "AWS::SSM::ManagedInstance" +) + +// Values returns all known values for SourceType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. The ordering of +// this slice is not guaranteed to be stable across updates. +func (SourceType) Values() []SourceType { + return []SourceType{ + "AWS::EC2::Instance", + "AWS::IoT::Thing", + "AWS::SSM::ManagedInstance", + } +} + type StepExecutionFilterKey string // Enum values for StepExecutionFilterKey diff --git a/service/ssm/types/errors.go b/service/ssm/types/errors.go index 2e388916b0a..adcf8724b0b 100644 --- a/service/ssm/types/errors.go +++ b/service/ssm/types/errors.go @@ -27,7 +27,8 @@ func (e *AlreadyExistsException) ErrorMessage() string { func (e *AlreadyExistsException) ErrorCode() string { return "AlreadyExistsException" } func (e *AlreadyExistsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// You must disassociate a document from all instances before you can delete it. +// You must disassociate a document from all managed nodes before you can delete +// it. type AssociatedInstances struct { Message *string @@ -477,7 +478,7 @@ func (e *DuplicateDocumentVersionName) ErrorMessage() string { func (e *DuplicateDocumentVersionName) ErrorCode() string { return "DuplicateDocumentVersionName" } func (e *DuplicateDocumentVersionName) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// You can't specify an instance ID in more than one association. +// You can't specify a managed node ID in more than one association. type DuplicateInstanceId struct { Message *string @@ -1072,7 +1073,7 @@ func (e *InvalidFilterValue) ErrorFault() smithy.ErrorFault { return smithy.Faul // The following problems can cause this exception: // // * You don't have permission to -// access the instance. +// access the managed node. // // * Amazon Web Services Systems Manager Agent(SSM Agent) // isn't running. Verify that SSM Agent is running. @@ -1080,7 +1081,7 @@ func (e *InvalidFilterValue) ErrorFault() smithy.ErrorFault { return smithy.Faul // * SSM Agent isn't registered // with the SSM endpoint. Try reinstalling SSM Agent. // -// * The instance isn't in +// * The managed node isn't in // valid state. Valid states are: Running, Pending, Stopped, and Stopping. Invalid // states are: Shutting-down and Terminated. type InvalidInstanceId struct { @@ -1446,8 +1447,8 @@ func (e *InvalidResourceId) ErrorMessage() string { func (e *InvalidResourceId) ErrorCode() string { return "InvalidResourceId" } func (e *InvalidResourceId) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The resource type isn't valid. For example, if you are attempting to tag an -// instance, the instance must be a registered, managed instance. +// The resource type isn't valid. For example, if you are attempting to tag an EC2 +// instance, the instance must be a registered managed node. type InvalidResourceType struct { Message *string @@ -1588,8 +1589,8 @@ func (e *InvalidUpdate) ErrorMessage() string { func (e *InvalidUpdate) ErrorCode() string { return "InvalidUpdate" } func (e *InvalidUpdate) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The command ID and instance ID you specified didn't match any invocations. -// Verify the command ID and the instance ID and try again. +// The command ID and managed node ID you specified didn't match any invocations. +// Verify the command ID and the managed node ID and try again. type InvocationDoesNotExist struct { Message *string @@ -2365,13 +2366,13 @@ func (e *TargetInUseException) ErrorMessage() string { func (e *TargetInUseException) ErrorCode() string { return "TargetInUseException" } func (e *TargetInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The specified target instance for the session isn't fully configured for use +// The specified target managed node for the session isn't fully configured for use // with Session Manager. For more information, see Getting started with Session // Manager // (https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html) // in the Amazon Web Services Systems Manager User Guide. This error is also -// returned if you attempt to start a session on an instance that is located in a -// different account or Region +// returned if you attempt to start a session on a managed node that is located in +// a different account or Region type TargetNotConnected struct { Message *string @@ -2588,8 +2589,8 @@ func (e *UnsupportedParameterType) ErrorMessage() string { func (e *UnsupportedParameterType) ErrorCode() string { return "UnsupportedParameterType" } func (e *UnsupportedParameterType) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The document doesn't support the platform type of the given instance ID(s). For -// example, you sent an document for a Windows instance to a Linux instance. +// The document doesn't support the platform type of the given managed node ID(s). +// For example, you sent an document for a Windows managed node to a Linux node. type UnsupportedPlatformType struct { Message *string diff --git a/service/ssm/types/types.go b/service/ssm/types/types.go index ce959a883c0..43196883966 100644 --- a/service/ssm/types/types.go +++ b/service/ssm/types/types.go @@ -23,7 +23,7 @@ type AccountSharingInfo struct { // An activation registers one or more on-premises servers or virtual machines // (VMs) with Amazon Web Services so that you can configure those servers or VMs // using Run Command. A server or VM that has been registered with Amazon Web -// Services Systems Manager is called a managed instance. +// Services Systems Manager is called a managed node. type Activation struct { // The ID created by Systems Manager when you submitted the activation. @@ -32,27 +32,26 @@ type Activation struct { // The date the activation was created. CreatedDate *time.Time - // A name for the managed instance when it is created. + // A name for the managed node when it is created. DefaultInstanceName *string // A user defined description of the activation. Description *string - // The date when this activation can no longer be used to register managed - // instances. + // The date when this activation can no longer be used to register managed nodes. ExpirationDate *time.Time // Whether or not the activation is expired. Expired bool - // The Identity and Access Management (IAM) role to assign to the managed instance. + // The Identity and Access Management (IAM) role to assign to the managed node. IamRole *string - // The maximum number of managed instances that can be registered using this + // The maximum number of managed nodes that can be registered using this // activation. RegistrationLimit int32 - // The number of managed instances already registered with this activation. + // The number of managed nodes already registered with this activation. RegistrationsCount int32 // Tags assigned to the activation. @@ -62,7 +61,7 @@ type Activation struct { } // Describes an association of a Amazon Web Services Systems Manager document (SSM -// document) and an instance. +// document) and a managed node. type Association struct { // The ID created by the system when you create an association. An association is a @@ -78,7 +77,7 @@ type Association struct { // The version of the document used in the association. DocumentVersion *string - // The instance ID. + // The managed node ID. InstanceId *string // The date on which the association was last run. @@ -94,9 +93,9 @@ type Association struct { // schedule runs in Coordinated Universal Time (UTC). ScheduleExpression *string - // The instances targeted by the request to create an association. You can target - // all instances in an Amazon Web Services account by specifying the InstanceIds - // key with a value of *. + // The managed nodes targeted by the request to create an association. You can + // target all managed nodes in an Amazon Web Services account by specifying the + // InstanceIds key with a value of *. Targets []Target noSmithyDocumentSerde @@ -142,7 +141,7 @@ type AssociationDescription struct { // The document version. DocumentVersion *string - // The instance ID. + // The managed node ID. InstanceId *string // The date on which the association was last run. @@ -157,10 +156,10 @@ type AssociationDescription struct { // The maximum number of targets allowed to run the association at the same time. // You can specify a number, for example 10, or a percentage of the target set, for // example 10%. The default value is 100%, which means all targets run the - // association at the same time. If a new instance starts and attempts to run an - // association while Systems Manager is running MaxConcurrency associations, the + // association at the same time. If a new managed node starts and attempts to run + // an association while Systems Manager is running MaxConcurrency associations, the // association is allowed to run. During the next association interval, the new - // instance will process its association within the limit specified for + // managed node will process its association within the limit specified for // MaxConcurrency. MaxConcurrency *string @@ -170,7 +169,7 @@ type AssociationDescription struct { // 10%. If you specify 3, for example, the system stops sending requests when the // fourth error is received. If you specify 0, then the system stops sending // requests after the first error is returned. If you run an association on 50 - // instances and set MaxError to 10%, then the system stops sending the request + // managed nodes and set MaxError to 10%, then the system stops sending the request // when the sixth error is received. Executions that are already running an // association when MaxErrors is reached are allowed to complete, but some of these // executions may fail as well. If you need to ensure that there won't be more than @@ -211,7 +210,7 @@ type AssociationDescription struct { // where you want to run the association. TargetLocations []TargetLocation - // The instances targeted by the request. + // The managed nodes targeted by the request. Targets []Target noSmithyDocumentSerde @@ -289,10 +288,10 @@ type AssociationExecutionTarget struct { // The location where the association details are saved. OutputSource *OutputSource - // The resource ID, for example, the instance ID where the association ran. + // The resource ID, for example, the managed node ID where the association ran. ResourceId *string - // The resource type, for example, instance. + // The resource type, for example, EC2. ResourceType *string // The association execution status. @@ -337,8 +336,8 @@ type AssociationFilter struct { type AssociationOverview struct { // Returns the number of targets for the association status. For example, if you - // created an association with two instances, and one of them was successful, this - // would return the count of instances by status. + // created an association with two managed nodes, and one of them was successful, + // this would return the count of managed nodes by status. AssociationStatusAggregatedCount map[string]int32 // A detailed status of the association. @@ -413,10 +412,10 @@ type AssociationVersionInfo struct { // The maximum number of targets allowed to run the association at the same time. // You can specify a number, for example 10, or a percentage of the target set, for // example 10%. The default value is 100%, which means all targets run the - // association at the same time. If a new instance starts and attempts to run an - // association while Systems Manager is running MaxConcurrency associations, the + // association at the same time. If a new managed node starts and attempts to run + // an association while Systems Manager is running MaxConcurrency associations, the // association is allowed to run. During the next association interval, the new - // instance will process its association within the limit specified for + // managed node will process its association within the limit specified for // MaxConcurrency. MaxConcurrency *string @@ -426,7 +425,7 @@ type AssociationVersionInfo struct { // 10%. If you specify 3, for example, the system stops sending requests when the // fourth error is received. If you specify 0, then the system stops sending // requests after the first error is returned. If you run an association on 50 - // instances and set MaxError to 10%, then the system stops sending the request + // managed nodes and set MaxError to 10%, then the system stops sending the request // when the sixth error is received. Executions that are already running an // association when MaxErrors is reached are allowed to complete, but some of these // executions may fail as well. If you need to ensure that there won't be more than @@ -788,8 +787,8 @@ type BaselineOverride struct { ApprovedPatchesComplianceLevel PatchComplianceLevel // Indicates whether the list of approved patches includes non-security updates - // that should be applied to the instances. The default value is false. Applies to - // Linux instances only. + // that should be applied to the managed nodes. The default value is false. Applies + // to Linux managed nodes only. ApprovedPatchesEnableNonSecurity bool // A set of patch filters, typically used for approval rules. @@ -810,8 +809,9 @@ type BaselineOverride struct { // blocked entirely along with packages that include it as a dependency. RejectedPatchesAction PatchAction - // Information about the patches to use to update the instances, including target - // operating systems and source repositories. Applies to Linux instances only. + // Information about the patches to use to update the managed nodes, including + // target operating systems and source repositories. Applies to Linux managed nodes + // only. Sources []PatchSource noSmithyDocumentSerde @@ -868,13 +868,14 @@ type Command struct { // SendCommand API operation. ExpiresAfter *time.Time - // The instance IDs against which this command was requested. + // The managed node IDs against which this command was requested. InstanceIds []string - // The maximum number of instances that are allowed to run the command at the same - // time. You can specify a number of instances, such as 10, or a percentage of - // instances, such as 10%. The default value is 50. For more information about how - // to use MaxConcurrency, see Running commands using Systems Manager Run Command + // The maximum number of managed nodes that are allowed to run the command at the + // same time. You can specify a number of managed nodes, such as 10, or a + // percentage of nodes, such as 10%. The default value is 50. For more information + // about how to use MaxConcurrency, see Running commands using Systems Manager Run + // Command // (https://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html) // in the Amazon Web Services Systems Manager User Guide. MaxConcurrency *string @@ -927,11 +928,11 @@ type Command struct { // in the Amazon Web Services Systems Manager User Guide. StatusDetails can be one // of the following values: // - // * Pending: The command hasn't been sent to any - // instances. + // * Pending: The command hasn't been sent to any managed + // nodes. // - // * In Progress: The command has been sent to at least one instance - // but hasn't reached a final state on all instances. + // * In Progress: The command has been sent to at least one managed node + // but hasn't reached a final state on all managed nodes. // // * Success: The command // successfully ran on all invocations. This is a terminal state. @@ -948,25 +949,25 @@ type Command struct { // invocations shows a status of Failed. This is a terminal state. // // * Incomplete: - // The command was attempted on all instances and one or more invocations doesn't - // have a value of Success but not enough invocations failed for the status to be - // Failed. This is a terminal state. + // The command was attempted on all managed nodes and one or more invocations + // doesn't have a value of Success but not enough invocations failed for the status + // to be Failed. This is a terminal state. // - // * Canceled: The command was terminated before - // it was completed. This is a terminal state. + // * Canceled: The command was terminated + // before it was completed. This is a terminal state. // - // * Rate Exceeded: The number of - // instances targeted by the command exceeded the account limit for pending + // * Rate Exceeded: The number + // of managed nodes targeted by the command exceeded the account limit for pending // invocations. The system has canceled the command before running it on any - // instance. This is a terminal state. + // managed node. This is a terminal state. StatusDetails *string // The number of targets for the command. TargetCount int32 - // An array of search criteria that targets instances using a Key,Value combination - // that you specify. Targets is required if you don't provide one or more instance - // IDs in the call. + // An array of search criteria that targets managed nodes using a Key,Value + // combination that you specify. Targets is required if you don't provide one or + // more managed node IDs in the call. Targets []Target // The TimeoutSeconds value specified for a command. @@ -975,11 +976,12 @@ type Command struct { noSmithyDocumentSerde } -// Describes a command filter. An instance ID can't be specified when a command -// status is Pending because the command hasn't run on the instance yet. +// Describes a command filter. A managed node ID can't be specified when a command +// status is Pending because the command hasn't run on the node yet. type CommandFilter struct { - // The name of the filter. + // The name of the filter. The ExecutionStage filter can't be used with the + // ListCommandInvocations operation, only with ListCommands. // // This member is required. Key CommandFilterKey @@ -1062,16 +1064,17 @@ type CommandFilter struct { // * DocumentName: Specify name of the Amazon Web Services Systems // Manager document (SSM document) for which you want to see command execution // results. For example, specify AWS-RunPatchBaseline to see command executions - // that used this SSM document to perform security patching operations on - // instances. + // that used this SSM document to perform security patching operations on managed + // nodes. // - // * ExecutionStage: Specify one of the following values: + // * ExecutionStage: Specify one of the following values (ListCommands + // operations only): // - // * Executing: - // Returns a list of command executions that are currently still running. + // * Executing: Returns a list of command executions that are + // currently still running. // - // * - // Complete: Returns a list of command executions that have already completed. + // * Complete: Returns a list of command executions that + // have already completed. // // This member is required. Value *string @@ -1079,11 +1082,12 @@ type CommandFilter struct { noSmithyDocumentSerde } -// An invocation is copy of a command sent to a specific instance. A command can -// apply to one or more instances. A command invocation applies to one instance. -// For example, if a user runs SendCommand against three instances, then a command -// invocation is created for each requested instance ID. A command invocation -// returns status and detail information about a command you ran. +// An invocation is a copy of a command sent to a specific managed node. A command +// can apply to one or more managed nodes. A command invocation applies to one +// managed node. For example, if a user runs SendCommand against three managed +// nodes, then a command invocation is created for each requested managed node ID. +// A command invocation returns status and detail information about a command you +// ran. type CommandInvocation struct { // Amazon CloudWatch Logs information where you want Amazon Web Services Systems @@ -1106,22 +1110,23 @@ type CommandInvocation struct { // The Systems Manager document (SSM document) version. DocumentVersion *string - // The instance ID in which this invocation was requested. + // The managed node ID in which this invocation was requested. InstanceId *string - // The fully qualified host name of the managed instance. + // The fully qualified host name of the managed node. InstanceName *string // Configurations for sending notifications about command status changes on a per - // instance basis. + // managed node basis. NotificationConfig *NotificationConfig - // The time and date the request was sent to this instance. + // The time and date the request was sent to this managed node. RequestedDateTime *time.Time // The Identity and Access Management (IAM) service role that Run Command, a // capability of Amazon Web Services Systems Manager, uses to act on your behalf - // when sending notifications about command status changes on a per instance basis. + // when sending notifications about command status changes on a per managed node + // basis. ServiceRole *string // The URL to the plugin's StdErr file in Amazon Simple Storage Service (Amazon @@ -1139,47 +1144,47 @@ type CommandInvocation struct { // Whether or not the invocation succeeded, failed, or is pending. Status CommandInvocationStatus - // A detailed status of the command execution for each invocation (each instance - // targeted by the command). StatusDetails includes more information than Status - // because it includes states resulting from error and concurrency control + // A detailed status of the command execution for each invocation (each managed + // node targeted by the command). StatusDetails includes more information than + // Status because it includes states resulting from error and concurrency control // parameters. StatusDetails can show different results than Status. For more // information about these statuses, see Understanding command statuses // (https://docs.aws.amazon.com/systems-manager/latest/userguide/monitor-commands.html) // in the Amazon Web Services Systems Manager User Guide. StatusDetails can be one // of the following values: // - // * Pending: The command hasn't been sent to the - // instance. + // * Pending: The command hasn't been sent to the managed + // node. // - // * In Progress: The command has been sent to the instance but hasn't + // * In Progress: The command has been sent to the managed node but hasn't // reached a terminal state. // // * Success: The execution of the command or plugin was // successfully completed. This is a terminal state. // // * Delivery Timed Out: The - // command wasn't delivered to the instance before the delivery timeout expired. - // Delivery timeouts don't count against the parent command's MaxErrors limit, but - // they do contribute to whether the parent command status is Success or + // command wasn't delivered to the managed node before the delivery timeout + // expired. Delivery timeouts don't count against the parent command's MaxErrors + // limit, but they do contribute to whether the parent command status is Success or // Incomplete. This is a terminal state. // // * Execution Timed Out: Command execution - // started on the instance, but the execution wasn't complete before the execution - // timeout expired. Execution timeouts count against the MaxErrors limit of the - // parent command. This is a terminal state. + // started on the managed node, but the execution wasn't complete before the + // execution timeout expired. Execution timeouts count against the MaxErrors limit + // of the parent command. This is a terminal state. // // * Failed: The command wasn't - // successful on the instance. For a plugin, this indicates that the result code - // wasn't zero. For a command invocation, this indicates that the result code for - // one or more plugins wasn't zero. Invocation failures count against the MaxErrors - // limit of the parent command. This is a terminal state. + // successful on the managed node. For a plugin, this indicates that the result + // code wasn't zero. For a command invocation, this indicates that the result code + // for one or more plugins wasn't zero. Invocation failures count against the + // MaxErrors limit of the parent command. This is a terminal state. // - // * Canceled: The command - // was terminated before it was completed. This is a terminal state. + // * Canceled: + // The command was terminated before it was completed. This is a terminal state. // // * - // Undeliverable: The command can't be delivered to the instance. The instance - // might not exist or might not be responding. Undeliverable invocations don't + // Undeliverable: The command can't be delivered to the managed node. The managed + // node might not exist or might not be responding. Undeliverable invocations don't // count against the parent command's MaxErrors limit and don't contribute to // whether the parent command status is Success or Incomplete. This is a terminal // state. @@ -1211,8 +1216,8 @@ type CommandPlugin struct { // response: // doc-example-bucket/ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix/i-02573cafcfEXAMPLE/awsrunShellScriptdoc-example-bucket // is the name of the S3 bucket; ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix is the - // name of the S3 prefix; i-02573cafcfEXAMPLE is the instance ID; awsrunShellScript - // is the name of the plugin. + // name of the S3 prefix; i-02573cafcfEXAMPLE is the managed node ID; + // awsrunShellScript is the name of the plugin. OutputS3BucketName *string // The S3 directory path inside the bucket where the responses to the command @@ -1220,8 +1225,8 @@ type CommandPlugin struct { // example, in the following response: // doc-example-bucket/ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix/i-02573cafcfEXAMPLE/awsrunShellScriptdoc-example-bucket // is the name of the S3 bucket; ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix is the - // name of the S3 prefix; i-02573cafcfEXAMPLE is the instance ID; awsrunShellScript - // is the name of the plugin. + // name of the S3 prefix; i-02573cafcfEXAMPLE is the managed node ID; + // awsrunShellScript is the name of the plugin. OutputS3KeyPrefix *string // (Deprecated) You can no longer specify this parameter. The system ignores it. @@ -1259,45 +1264,45 @@ type CommandPlugin struct { // in the Amazon Web Services Systems Manager User Guide. StatusDetails can be one // of the following values: // - // * Pending: The command hasn't been sent to the - // instance. + // * Pending: The command hasn't been sent to the managed + // node. // - // * In Progress: The command has been sent to the instance but hasn't + // * In Progress: The command has been sent to the managed node but hasn't // reached a terminal state. // // * Success: The execution of the command or plugin was // successfully completed. This is a terminal state. // // * Delivery Timed Out: The - // command wasn't delivered to the instance before the delivery timeout expired. - // Delivery timeouts don't count against the parent command's MaxErrors limit, but - // they do contribute to whether the parent command status is Success or + // command wasn't delivered to the managed node before the delivery timeout + // expired. Delivery timeouts don't count against the parent command's MaxErrors + // limit, but they do contribute to whether the parent command status is Success or // Incomplete. This is a terminal state. // // * Execution Timed Out: Command execution - // started on the instance, but the execution wasn't complete before the execution - // timeout expired. Execution timeouts count against the MaxErrors limit of the - // parent command. This is a terminal state. + // started on the managed node, but the execution wasn't complete before the + // execution timeout expired. Execution timeouts count against the MaxErrors limit + // of the parent command. This is a terminal state. // // * Failed: The command wasn't - // successful on the instance. For a plugin, this indicates that the result code - // wasn't zero. For a command invocation, this indicates that the result code for - // one or more plugins wasn't zero. Invocation failures count against the MaxErrors - // limit of the parent command. This is a terminal state. + // successful on the managed node. For a plugin, this indicates that the result + // code wasn't zero. For a command invocation, this indicates that the result code + // for one or more plugins wasn't zero. Invocation failures count against the + // MaxErrors limit of the parent command. This is a terminal state. // - // * Canceled: The command - // was terminated before it was completed. This is a terminal state. + // * Canceled: + // The command was terminated before it was completed. This is a terminal state. // // * - // Undeliverable: The command can't be delivered to the instance. The instance - // might not exist, or it might not be responding. Undeliverable invocations don't - // count against the parent command's MaxErrors limit, and they don't contribute to - // whether the parent command status is Success or Incomplete. This is a terminal - // state. - // - // * Terminated: The parent command exceeded its MaxErrors limit and - // subsequent command invocations were canceled by the system. This is a terminal - // state. + // Undeliverable: The command can't be delivered to the managed node. The managed + // node might not exist, or it might not be responding. Undeliverable invocations + // don't count against the parent command's MaxErrors limit, and they don't + // contribute to whether the parent command status is Success or Incomplete. This + // is a terminal state. + // + // * Terminated: The parent command exceeded its MaxErrors + // limit and subsequent command invocations were canceled by the system. This is a + // terminal state. StatusDetails *string noSmithyDocumentSerde @@ -1344,7 +1349,7 @@ type ComplianceItem struct { // patch, the ID could be the number of the KB article; for example: KB4010320. Id *string - // An ID for the resource. For a managed instance, this is the instance ID. + // An ID for the resource. For a managed node, this is the node ID. ResourceId *string // The type of resource. ManagedInstance is currently the only supported resource @@ -1442,15 +1447,15 @@ type CompliantSummary struct { } // Describes the association of a Amazon Web Services Systems Manager document (SSM -// document) and an instance. +// document) and a managed node. type CreateAssociationBatchRequestEntry struct { // The name of the SSM document that contains the configuration information for the - // instance. You can specify Command or Automation runbooks. You can specify Amazon - // Web Services-predefined documents, documents you created, or a document that is - // shared with you from another account. For SSM documents that are shared with you - // from other Amazon Web Services accounts, you must specify the complete SSM - // document ARN, in the following format: + // managed node. You can specify Command or Automation runbooks. You can specify + // Amazon Web Services-predefined documents, documents you created, or a document + // that is shared with you from another account. For SSM documents that are shared + // with you from other Amazon Web Services accounts, you must specify the complete + // SSM document ARN, in the following format: // arn:aws:ssm:region:account-id:document/document-name For example: // arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document For Amazon Web // Services-predefined documents and SSM documents you created in your account, you @@ -1487,10 +1492,10 @@ type CreateAssociationBatchRequestEntry struct { // The document version. DocumentVersion *string - // The instance ID. InstanceId has been deprecated. To specify an instance ID for - // an association, use the Targets parameter. Requests that include the parameter - // InstanceID with Systems Manager documents (SSM documents) that use schema - // version 2.0 or later will fail. In addition, if you use the parameter + // The managed node ID. InstanceId has been deprecated. To specify a managed node + // ID for an association, use the Targets parameter. Requests that include the + // parameter InstanceID with Systems Manager documents (SSM documents) that use + // schema version 2.0 or later will fail. In addition, if you use the parameter // InstanceId, you can't use the parameters AssociationName, DocumentVersion, // MaxErrors, MaxConcurrency, OutputLocation, or ScheduleExpression. To use these // parameters, you must use the Targets parameter. @@ -1499,10 +1504,10 @@ type CreateAssociationBatchRequestEntry struct { // The maximum number of targets allowed to run the association at the same time. // You can specify a number, for example 10, or a percentage of the target set, for // example 10%. The default value is 100%, which means all targets run the - // association at the same time. If a new instance starts and attempts to run an - // association while Systems Manager is running MaxConcurrency associations, the + // association at the same time. If a new managed node starts and attempts to run + // an association while Systems Manager is running MaxConcurrency associations, the // association is allowed to run. During the next association interval, the new - // instance will process its association within the limit specified for + // managed node will process its association within the limit specified for // MaxConcurrency. MaxConcurrency *string @@ -1512,7 +1517,7 @@ type CreateAssociationBatchRequestEntry struct { // 10%. If you specify 3, for example, the system stops sending requests when the // fourth error is received. If you specify 0, then the system stops sending // requests after the first error is returned. If you run an association on 50 - // instances and set MaxError to 10%, then the system stops sending the request + // managed nodes and set MaxError to 10%, then the system stops sending the request // when the sixth error is received. Executions that are already running an // association when MaxErrors is reached are allowed to complete, but some of these // executions may fail as well. If you need to ensure that there won't be more than @@ -1544,7 +1549,7 @@ type CreateAssociationBatchRequestEntry struct { // accounts. TargetLocations []TargetLocation - // The instances targeted by the request. + // The managed nodes targeted by the request. Targets []Target noSmithyDocumentSerde @@ -2035,25 +2040,25 @@ type InstanceAggregatedAssociationOverview struct { // Detailed status information about the aggregated associations. DetailedStatus *string - // The number of associations for the instance(s). + // The number of associations for the managed node(s). InstanceAssociationStatusAggregatedCount map[string]int32 noSmithyDocumentSerde } -// One or more association documents on the instance. +// One or more association documents on the managed node. type InstanceAssociation struct { // The association ID. AssociationId *string - // Version information for the association on the instance. + // Version information for the association on the managed node. AssociationVersion *string - // The content of the association document for the instance(s). + // The content of the association document for the managed node(s). Content *string - // The instance ID. + // The managed node ID. InstanceId *string noSmithyDocumentSerde @@ -2081,19 +2086,19 @@ type InstanceAssociationOutputUrl struct { noSmithyDocumentSerde } -// Status information about the instance association. +// Status information about the association. type InstanceAssociationStatusInfo struct { // The association ID. AssociationId *string - // The name of the association applied to the instance. + // The name of the association applied to the managed node. AssociationName *string - // The version of the association applied to the instance. + // The version of the association applied to the managed node. AssociationVersion *string - // Detailed status information about the instance association. + // Detailed status information about the association. DetailedStatus *string // The association document versions. @@ -2102,13 +2107,13 @@ type InstanceAssociationStatusInfo struct { // An error code returned by the request to create the association. ErrorCode *string - // The date the instance association ran. + // The date the association ran. ExecutionDate *time.Time // Summary information about association execution. ExecutionSummary *string - // The instance ID where the association was created. + // The managed node ID where the association was created. InstanceId *string // The name of the association. @@ -2117,20 +2122,20 @@ type InstanceAssociationStatusInfo struct { // A URL for an S3 bucket where you want to store the results of this request. OutputUrl *InstanceAssociationOutputUrl - // Status information about the instance association. + // Status information about the association. Status *string noSmithyDocumentSerde } -// Describes a filter for a specific list of instances. +// Describes a filter for a specific list of managed nodes. type InstanceInformation struct { // The activation ID created by Amazon Web Services Systems Manager when the server // or virtual machine (VM) was registered. ActivationId *string - // The version of SSM Agent running on your Linux instance. + // The version of SSM Agent running on your Linux managed node. AgentVersion *string // Information about the association. @@ -2139,30 +2144,30 @@ type InstanceInformation struct { // The status of the association. AssociationStatus *string - // The fully qualified host name of the managed instance. + // The fully qualified host name of the managed node. ComputerName *string - // The IP address of the managed instance. + // The IP address of the managed node. IPAddress *string // The Identity and Access Management (IAM) role assigned to the on-premises - // Systems Manager managed instance. This call doesn't return the IAM role for - // Amazon Elastic Compute Cloud (Amazon EC2) instances. To retrieve the IAM role - // for an EC2 instance, use the Amazon EC2 DescribeInstances operation. For - // information, see DescribeInstances + // Systems Manager managed node. This call doesn't return the IAM role for Amazon + // Elastic Compute Cloud (Amazon EC2) instances. To retrieve the IAM role for an + // EC2 instance, use the Amazon EC2 DescribeInstances operation. For information, + // see DescribeInstances // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html) // in the Amazon EC2 API Reference or describe-instances // (https://docs.aws.amazon.com/cli/latest/ec2/describe-instances.html) in the // Amazon Web Services CLI Command Reference. IamRole *string - // The instance ID. + // The managed node ID. InstanceId *string // Indicates whether the latest version of SSM Agent is running on your Linux - // Managed Instance. This field doesn't indicate whether or not the latest version - // is installed on Windows managed instances, because some older versions of - // Windows Server use the EC2Config service to process Systems Manager requests. + // managed node. This field doesn't indicate whether or not the latest version is + // installed on Windows managed nodes, because some older versions of Windows + // Server use the EC2Config service to process Systems Manager requests. IsLatestVersion bool // The date the association was last run. @@ -2174,11 +2179,11 @@ type InstanceInformation struct { // The last date the association was successfully run. LastSuccessfulAssociationExecutionDate *time.Time - // The name assigned to an on-premises server or virtual machine (VM) when it is - // activated as a Systems Manager managed instance. The name is specified as the - // DefaultInstanceName property using the CreateActivation command. It is applied - // to the managed instance by specifying the Activation Code and Activation ID when - // you install SSM Agent on the instance, as explained in Install SSM Agent for a + // The name assigned to an on-premises server, edge device, or virtual machine (VM) + // when it is activated as a Systems Manager managed node. The name is specified as + // the DefaultInstanceName property using the CreateActivation command. It is + // applied to the managed node by specifying the Activation Code and Activation ID + // when you install SSM Agent on the node, as explained in Install SSM Agent for a // hybrid environment (Linux) // (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-install-managed-linux.html) // and Install SSM Agent for a hybrid environment (Windows) @@ -2195,26 +2200,34 @@ type InstanceInformation struct { // no longer in use. PingStatus PingStatus - // The name of the operating system platform running on your instance. + // The name of the operating system platform running on your managed node. PlatformName *string // The operating system platform type. PlatformType PlatformType - // The version of the OS platform running on your instance. + // The version of the OS platform running on your managed node. PlatformVersion *string // The date the server or VM was registered with Amazon Web Services as a managed - // instance. + // node. RegistrationDate *time.Time // The type of instance. Instances are either EC2 instances or managed instances. ResourceType ResourceType + // The ID of the source resource. For IoT Greengrass devices, SourceId is the Thing + // name. + SourceId *string + + // The type of the source resource. For IoT Greengrass devices, SourceType is + // AWS::IoT::Thing. + SourceType SourceType + noSmithyDocumentSerde } -// Describes a filter for a specific list of instances. You can filter instances +// Describes a filter for a specific list of managed nodes. You can filter node // information by using tags. You specify tags by using a key-value mapping. Use // this operation instead of the // DescribeInstanceInformationRequest$InstanceInformationFilterList method. The @@ -2235,10 +2248,10 @@ type InstanceInformationFilter struct { noSmithyDocumentSerde } -// The filters to describe or get information about your managed instances. +// The filters to describe or get information about your managed nodes. type InstanceInformationStringFilter struct { - // The filter key name to describe your instances. For example: + // The filter key name to describe your managed nodes. For example: // "InstanceIds"|"AgentVersion"|"PingStatus"|"PlatformTypes"|"ActivationIds"|"IamRole"|"ResourceType"|"AssociationStatus"|"Tag // Key" Tag key isn't a valid filter. You must specify either tag-key or // tag:keyname and a string. Here are some valid examples: tag-key, tag:123, @@ -2256,18 +2269,18 @@ type InstanceInformationStringFilter struct { noSmithyDocumentSerde } -// Defines the high-level patch compliance state for a managed instance, providing +// Defines the high-level patch compliance state for a managed node, providing // information about the number of installed, missing, not applicable, and failed // patches along with metadata about the operation when this information was -// gathered for the instance. +// gathered for the managed node. type InstancePatchState struct { - // The ID of the patch baseline used to patch the instance. + // The ID of the patch baseline used to patch the managed node. // // This member is required. BaselineId *string - // The ID of the managed instance the high-level patch compliance information was + // The ID of the managed node the high-level patch compliance information was // collected for. // // This member is required. @@ -2283,25 +2296,25 @@ type InstancePatchState struct { // This member is required. Operation PatchOperationType - // The time the most recent patching operation completed on the instance. + // The time the most recent patching operation completed on the managed node. // // This member is required. OperationEndTime *time.Time - // The time the most recent patching operation was started on the instance. + // The time the most recent patching operation was started on the managed node. // // This member is required. OperationStartTime *time.Time - // The name of the patch group the managed instance belongs to. + // The name of the patch group the managed node belongs to. // // This member is required. PatchGroup *string - // The number of instances where patches that are specified as Critical for + // The number of managed nodes where patches that are specified as Critical for // compliance reporting in the patch baseline aren't installed. These patches might // be missing, have failed installation, were rejected, or were installed but - // awaiting a required instance reboot. The status of these instances is + // awaiting a required managed node reboot. The status of these managed nodes is // NON_COMPLIANT. CriticalNonCompliantCount int32 @@ -2319,42 +2332,42 @@ type InstancePatchState struct { // SSM document in the Amazon Web Services Systems Manager User Guide. InstallOverrideList *string - // The number of patches from the patch baseline that are installed on the - // instance. + // The number of patches from the patch baseline that are installed on the managed + // node. InstalledCount int32 // The number of patches not specified in the patch baseline that are installed on - // the instance. + // the managed node. InstalledOtherCount int32 - // The number of patches installed by Patch Manager since the last time the - // instance was rebooted. + // The number of patches installed by Patch Manager since the last time the managed + // node was rebooted. InstalledPendingRebootCount int32 - // The number of patches installed on an instance that are specified in a + // The number of patches installed on a managed node that are specified in a // RejectedPatches list. Patches with a status of InstalledRejected were typically // installed before they were added to a RejectedPatches list. If // ALLOW_AS_DEPENDENCY is the specified option for RejectedPatchesAction, the value // of InstalledRejectedCount will always be 0 (zero). InstalledRejectedCount int32 - // The time of the last attempt to patch the instance with NoReboot specified as - // the reboot option. + // The time of the last attempt to patch the managed node with NoReboot specified + // as the reboot option. LastNoRebootInstallOperationTime *time.Time // The number of patches from the patch baseline that are applicable for the - // instance but aren't currently installed. + // managed node but aren't currently installed. MissingCount int32 // The number of patches from the patch baseline that aren't applicable for the - // instance and therefore aren't installed on the instance. This number may be + // managed node and therefore aren't installed on the node. This number may be // truncated if the list of patch names is very large. The number of patches beyond // this limit are reported in UnreportedNotApplicableCount. NotApplicableCount int32 - // The number of instances with patches installed that are specified as other than - // Critical or Security but aren't compliant with the patch baseline. The status of - // these instances is NON_COMPLIANT. + // The number of managed nodes with patches installed that are specified as other + // than Critical or Security but aren't compliant with the patch baseline. The + // status of these managed nodes is NON_COMPLIANT. OtherNonCompliantCount int32 // Placeholder information. This field will always be empty in the current release @@ -2365,20 +2378,20 @@ type InstancePatchState struct { // apply to Install operations only. Reboots aren't attempted for Patch Manager // Scan operations. // - // * RebootIfNeeded: Patch Manager tries to reboot the instance - // if it installed any patches, or if any patches are detected with a status of - // InstalledPendingReboot. + // * RebootIfNeeded: Patch Manager tries to reboot the managed + // node if it installed any patches, or if any patches are detected with a status + // of InstalledPendingReboot. // - // * NoReboot: Patch Manager attempts to install missing - // packages without trying to reboot the system. Patches installed with this option - // are assigned a status of InstalledPendingReboot. These patches might not be in - // effect until a reboot is performed. + // * NoReboot: Patch Manager attempts to install + // missing packages without trying to reboot the system. Patches installed with + // this option are assigned a status of InstalledPendingReboot. These patches might + // not be in effect until a reboot is performed. RebootOption RebootOption - // The number of instances where patches that are specified as Security in a patch - // advisory aren't installed. These patches might be missing, have failed - // installation, were rejected, or were installed but awaiting a required instance - // reboot. The status of these instances is NON_COMPLIANT. + // The number of managed nodes where patches that are specified as Security in a + // patch advisory aren't installed. These patches might be missing, have failed + // installation, were rejected, or were installed but awaiting a required managed + // node reboot. The status of these managed nodes is NON_COMPLIANT. SecurityNonCompliantCount int32 // The ID of the patch baseline snapshot used during the patching operation when @@ -2394,8 +2407,8 @@ type InstancePatchState struct { } // Defines a filter used in DescribeInstancePatchStatesForPatchGroup to scope down -// the information returned by the API. Example: To filter for all instances in a -// patch group having more than three patches with a FailedCount status, use the +// the information returned by the API. Example: To filter for all managed nodes in +// a patch group having more than three patches with a FailedCount status, use the // following for the filter: // // * Value for Key: FailedCount @@ -2530,7 +2543,7 @@ type InventoryFilter struct { // This member is required. Key *string - // Inventory filter values. Example: inventory filter where instance IDs are + // Inventory filter values. Example: inventory filter where managed node IDs are // specified as values Key=AWS:InstanceInformation.InstanceId,Values= // i-a12b3c4d5e6g, i-1a2b3c4d5e6,Type=Equal. // @@ -2566,8 +2579,7 @@ type InventoryGroup struct { noSmithyDocumentSerde } -// Information collected from managed instances based on your inventory policy -// document +// Information collected from managed nodes based on your inventory policy document type InventoryItem struct { // The time the inventory information was collected. @@ -2655,9 +2667,9 @@ type InventoryResultEntity struct { // The data section in the inventory result entity JSON. Data map[string]InventoryResultItem - // ID of the inventory result entity. For example, for managed instance inventory - // the result will be the managed instance ID. For EC2 instance inventory, the - // result will be the instance ID. + // ID of the inventory result entity. For example, for managed node inventory the + // result will be the managed node ID. For EC2 instance inventory, the result will + // be the instance ID. Id *string noSmithyDocumentSerde @@ -2695,12 +2707,12 @@ type InventoryResultItem struct { } // Information about an Amazon Simple Storage Service (Amazon S3) bucket to write -// instance-level logs to. LoggingInfo has been deprecated. To specify an Amazon -// Simple Storage Service (Amazon S3) bucket to contain logs, instead use the -// OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters -// structure. For information about how Amazon Web Services Systems Manager handles -// these options for the supported maintenance window task types, see -// MaintenanceWindowTaskInvocationParameters. +// managed node-level logs to. LoggingInfo has been deprecated. To specify an +// Amazon Simple Storage Service (Amazon S3) bucket to contain logs, instead use +// the OutputS3BucketName and OutputS3KeyPrefix options in the +// TaskInvocationParameters structure. For information about how Amazon Web +// Services Systems Manager handles these options for the supported maintenance +// window task types, see MaintenanceWindowTaskInvocationParameters. type LoggingInfo struct { // The name of an S3 bucket where execution logs are stored . @@ -3012,7 +3024,7 @@ type MaintenanceWindowRunCommandParameters struct { DocumentVersion *string // Configurations for sending notifications about command status changes on a - // per-instance basis. + // per-managed node basis. NotificationConfig *NotificationConfig // The name of the Amazon Simple Storage Service (Amazon S3) bucket. @@ -3078,9 +3090,9 @@ type MaintenanceWindowTarget struct { // The type of target that is being registered with the maintenance window. ResourceType MaintenanceWindowResourceType - // The targets, either instances or tags. Specify instances using the following - // format: Key=instanceids,Values=, Tags are specified using the following format: - // Key=,Values=. + // The targets, either managed nodes or tags. Specify managed nodes using the + // following format: Key=instanceids,Values=, Tags are specified using the + // following format: Key=,Values=. Targets []Target // The ID of the maintenance window to register the target with. @@ -3129,7 +3141,7 @@ type MaintenanceWindowTask struct { // notifications for maintenance window Run Command tasks. ServiceRoleArn *string - // The targets (either instances or tags). Instances are specified using + // The targets (either managed nodes or tags). Managed nodes are specified using // Key=instanceids,Values=,. Tags are specified using Key=,Values=. Targets []Target @@ -3228,8 +3240,8 @@ type NotificationConfig struct { // * Command: Receive notification when the status of a // command changes. // - // * Invocation: For commands sent to multiple instances, receive - // notification on a per-instance basis when the status of a command changes. + // * Invocation: For commands sent to multiple managed nodes, + // receive notification on a per-node basis when the status of a command changes. NotificationType NotificationType noSmithyDocumentSerde @@ -3909,20 +3921,20 @@ type ParameterStringFilter struct { type Patch struct { // The Advisory ID of the patch. For example, RHSA-2020:3779. Applies to - // Linux-based instances only. + // Linux-based managed nodes only. AdvisoryIds []string // The architecture of the patch. For example, in // example-pkg-0.710.10-2.7.abcd.x86_64, the architecture is indicated by x86_64. - // Applies to Linux-based instances only. + // Applies to Linux-based managed nodes only. Arch *string // The Bugzilla ID of the patch. For example, 1600646. Applies to Linux-based - // instances only. + // managed nodes only. BugzillaIds []string // The Common Vulnerabilities and Exposures (CVE) ID of the patch. For example, - // CVE-2011-3192. Applies to Linux-based instances only. + // CVE-2011-3192. Applies to Linux-based managed nodes only. CVEIds []string // The classification of the patch. For example, SecurityUpdates, Updates, or @@ -3936,7 +3948,7 @@ type Patch struct { Description *string // The epoch of the patch. For example in pkg-example-EE-20180914-2.2.amzn1.noarch, - // the epoch value is 20180914-2. Applies to Linux-based instances only. + // the epoch value is 20180914-2. Applies to Linux-based managed nodes only. Epoch int32 // The ID of the patch. Applies to Windows patches only. This ID isn't the same as @@ -3957,7 +3969,7 @@ type Patch struct { // Windows patches only. MsrcSeverity *string - // The name of the patch. Applies to Linux-based instances only. + // The name of the patch. Applies to Linux-based managed nodes only. Name *string // The specific product the patch is applicable for. For example, WindowsServer2016 @@ -3970,7 +3982,7 @@ type Patch struct { // The particular release of a patch. For example, in // pkg-example-EE-20180914-2.2.amzn1.noarch, the release is 2.amaz1. Applies to - // Linux-based instances only. + // Linux-based managed nodes only. Release *string // The date the patch was released. @@ -3978,7 +3990,7 @@ type Patch struct { // The source patch repository for the operating system and version, such as // trusty-security for Ubuntu Server 14.04 LTE and focal-security for Ubuntu Server - // 20.04 LTE. Applies to Linux-based instances only. + // 20.04 LTE. Applies to Linux-based managed nodes only. Repository *string // The severity level of the patch. For example, CRITICAL or MODERATE. @@ -3992,7 +4004,7 @@ type Patch struct { // The version number of the patch. For example, in // example-pkg-1.710.10-2.7.abcd.x86_64, the version number is indicated by -1. - // Applies to Linux-based instances only. + // Applies to Linux-based managed nodes only. Version *string noSmithyDocumentSerde @@ -4022,8 +4034,8 @@ type PatchBaselineIdentity struct { noSmithyDocumentSerde } -// Information about the state of a patch on a particular instance as it relates to -// the patch baseline used to patch the instance. +// Information about the state of a patch on a particular managed node as it +// relates to the patch baseline used to patch the node. type PatchComplianceData struct { // The classification of the patch, such as SecurityUpdates, Updates, and @@ -4032,8 +4044,8 @@ type PatchComplianceData struct { // This member is required. Classification *string - // The date/time the patch was installed on the instance. Not all operating systems - // provide this level of information. + // The date/time the patch was installed on the managed node. Not all operating + // systems provide this level of information. // // This member is required. InstalledTime *time.Time @@ -4048,7 +4060,7 @@ type PatchComplianceData struct { // This member is required. Severity *string - // The state of the patch on the instance, such as INSTALLED or FAILED. For + // The state of the patch on the managed node, such as INSTALLED or FAILED. For // descriptions of each patch state, see About patch compliance // (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-compliance-about.html#sysman-compliance-monitor-patch) // in the Amazon Web Services Systems Manager User Guide. @@ -4166,9 +4178,9 @@ type PatchRule struct { // A compliance severity level for all approved patches in a patch baseline. ComplianceLevel PatchComplianceLevel - // For instances identified by the approval rule filters, enables a patch baseline - // to apply non-security updates available in the specified repository. The default - // value is false. Applies to Linux instances only. + // For managed nodes identified by the approval rule filters, enables a patch + // baseline to apply non-security updates available in the specified repository. + // The default value is false. Applies to Linux managed nodes only. EnableNonSecurity bool noSmithyDocumentSerde @@ -4185,8 +4197,9 @@ type PatchRuleGroup struct { noSmithyDocumentSerde } -// Information about the patches to use to update the instances, including target -// operating systems and source repository. Applies to Linux instances only. +// Information about the patches to use to update the managed nodes, including +// target operating systems and source repository. Applies to Linux managed nodes +// only. type PatchSource struct { // The value of the yum repo configuration. For example: [main] @@ -4264,6 +4277,22 @@ type ProgressCounters struct { noSmithyDocumentSerde } +// Reserved for internal use. +type RegistrationMetadataItem struct { + + // Reserved for internal use. + // + // This member is required. + Key *string + + // Reserved for internal use. + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + // An OpsItems that shares something in common with the current OpsItem. For // example, related OpsItems can include OpsItems with similar error messages, // impacted resources, or statuses for the impacted resource. @@ -4672,7 +4701,7 @@ type ServiceSetting struct { noSmithyDocumentSerde } -// Information about a Session Manager connection to an instance. +// Information about a Session Manager connection to a managed node. type Session struct { // Reserved for future use. @@ -4706,7 +4735,7 @@ type Session struct { // The status of the session. For example, "Connected" or "Terminated". Status SessionStatus - // The instance that the Session Manager session connected to. + // The managed node that the Session Manager session connected to. Target *string noSmithyDocumentSerde @@ -4731,7 +4760,7 @@ type SessionFilter struct { // 2018-08-29T00:00:00Z to see sessions that started before August 29, 2018. // // * - // Target: Specify an instance to which session connections have been made. + // Target: Specify a managed node to which session connections have been made. // // * // Owner: Specify an Amazon Web Services user account to see a list of sessions @@ -4774,8 +4803,8 @@ type SessionManagerOutputUrl struct { noSmithyDocumentSerde } -// The number of managed instances found for each patch severity level defined in -// the request filter. +// The number of managed nodes found for each patch severity level defined in the +// request filter. type SeveritySummary struct { // The total number of resources or compliance items that have a severity level of @@ -4913,8 +4942,8 @@ type StepExecutionFilter struct { // Metadata that you assign to your Amazon Web Services resources. Tags enable you // to categorize your resources in different ways, for example, by purpose, owner, // or environment. In Amazon Web Services Systems Manager, you can apply tags to -// Systems Manager documents (SSM documents), managed instances, maintenance -// windows, parameters, patch baselines, OpsItems, and OpsMetadata. +// Systems Manager documents (SSM documents), managed nodes, maintenance windows, +// parameters, patch baselines, OpsItems, and OpsMetadata. type Tag struct { // The name of the tag. @@ -4930,9 +4959,9 @@ type Tag struct { noSmithyDocumentSerde } -// An array of search criteria that targets instances using a key-value pair that -// you specify. One or more targets must be specified for maintenance window Run -// Command-type tasks. Depending on the task, targets are optional for other +// An array of search criteria that targets managed nodes using a key-value pair +// that you specify. One or more targets must be specified for maintenance window +// Run Command-type tasks. Depending on the task, targets are optional for other // maintenance window task types (Automation, Lambda, and Step Functions). For more // information about running tasks that don't specify targets, see Registering // maintenance window tasks without targets @@ -4940,27 +4969,23 @@ type Tag struct { // in the Amazon Web Services Systems Manager User Guide. Supported formats include // the following. // -// * -// Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3 +// * Key=InstanceIds,Values=,, // -// * -// Key=tag:my-tag-key,Values=my-tag-value-1,my-tag-value-2 +// * Key=tag:,Values=, // // * -// Key=tag-key,Values=my-tag-key-1,my-tag-key-2 +// Key=tag-key,Values=, // -// * Run Command and Maintenance -// window targets only: Key=resource-groups:Name,Values=resource-group-name +// * Run Command and Maintenance window targets only: +// Key=resource-groups:Name,Values= // -// * -// Maintenance window targets only: -// Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2 +// * Maintenance window targets only: +// Key=resource-groups:ResourceTypeFilters,Values=, // -// * -// Automation targets only: Key=ResourceGroup;Values=resource-group-name +// * Automation targets only: +// Key=ResourceGroup;Values= // -// For -// example: +// For example: // // * // Key=InstanceIds,Values=i-02573cafcfEXAMPLE,i-0471e04240EXAMPLE,i-07782c72faEXAMPLE @@ -4986,18 +5011,19 @@ type Tag struct { // targets only: Key=ResourceGroup,Values=MyResourceGroup // // * State Manager -// association targets only: Key=InstanceIds,Values=* This example demonstrates -// how to target all managed instances in the Amazon Web Services Region where the +// association targets only: Key=InstanceIds,Values=* This example demonstrates how +// to target all managed instances in the Amazon Web Services Region where the // association was created. // // For more information about how to send commands that -// target instances using Key,Value parameters, see Targeting multiple instances +// target managed nodes using Key,Value parameters, see Targeting multiple +// instances // (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-targeting) // in the Amazon Web Services Systems Manager User Guide. type Target struct { - // User-defined criteria for sending commands that target instances that meet the - // criteria. + // User-defined criteria for sending commands that target managed nodes that meet + // the criteria. Key *string // User-defined criteria that maps to Key. For example, if you specified diff --git a/service/ssm/validators.go b/service/ssm/validators.go index 5cdd17fed22..3f7dd7a704e 100644 --- a/service/ssm/validators.go +++ b/service/ssm/validators.go @@ -4026,6 +4026,41 @@ func validatePatchSourceList(v []types.PatchSource) error { } } +func validateRegistrationMetadataItem(v *types.RegistrationMetadataItem) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RegistrationMetadataItem"} + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRegistrationMetadataList(v []types.RegistrationMetadataItem) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RegistrationMetadataList"} + for i := range v { + if err := validateRegistrationMetadataItem(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateRelatedOpsItem(v *types.RelatedOpsItem) error { if v == nil { return nil @@ -4378,6 +4413,11 @@ func validateOpCreateActivationInput(v *CreateActivationInput) error { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } + if v.RegistrationMetadata != nil { + if err := validateRegistrationMetadataList(v.RegistrationMetadata); err != nil { + invalidParams.AddNested("RegistrationMetadata", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/sts/api_op_AssumeRole.go b/service/sts/api_op_AssumeRole.go index 08dbe47b27d..a0cdc90775a 100644 --- a/service/sts/api_op_AssumeRole.go +++ b/service/sts/api_op_AssumeRole.go @@ -19,13 +19,13 @@ import ( // that produce temporary credentials, see Requesting Temporary Security // Credentials // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) -// and Comparing the STS API operations +// and Comparing the Amazon Web Services STS API operations // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) // in the IAM User Guide. Permissions The temporary security credentials created by // AssumeRole can be used to make API calls to any Amazon Web Services service with -// the following exception: You cannot call the STS GetFederationToken or -// GetSessionToken API operations. (Optional) You can pass inline or managed -// session policies +// the following exception: You cannot call the Amazon Web Services STS +// GetFederationToken or GetSessionToken API operations. (Optional) You can pass +// inline or managed session policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an // inline session policy. You can also specify up to 10 managed policies to use as @@ -39,25 +39,30 @@ import ( // identity-based policy of the role that is being assumed. For more information, // see Session Policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) -// in the IAM User Guide. To assume a role from a different account, your account -// must be trusted by the role. The trust relationship is defined in the role's -// trust policy when the role is created. That trust policy states which accounts -// are allowed to delegate that access to users in the account. A user who wants to -// access a role in a different account must also have permissions that are -// delegated from the user account administrator. The administrator must attach a -// policy that allows the user to call AssumeRole for the ARN of the role in the -// other account. If the user is in the same account as the role, then you can do -// either of the following: +// in the IAM User Guide. When you create a role, you create two policies: A role +// trust policy that specifies who can assume the role and a permissions policy +// that specifies what can be done with the role. You specify the trusted principal +// who is allowed to assume the role in the role trust policy. To assume a role +// from a different account, your Amazon Web Services account must be trusted by +// the role. The trust relationship is defined in the role's trust policy when the +// role is created. That trust policy states which accounts are allowed to delegate +// that access to users in the account. A user who wants to access a role in a +// different account must also have permissions that are delegated from the user +// account administrator. The administrator must attach a policy that allows the +// user to call AssumeRole for the ARN of the role in the other account. To allow a +// user to assume a role in the same account, you can do either of the +// following: // -// * Attach a policy to the user (identical to the -// previous user in a different account). +// * Attach a policy to the user that allows the user to call +// AssumeRole (as long as the role's trust policy trusts the account). // -// * Add the user as a principal directly -// in the role's trust policy. +// * Add the +// user as a principal directly in the role's trust policy. // -// In this case, the trust policy acts as an IAM -// resource-based policy. Users in the same account as the role do not need -// explicit permission to assume the role. For more information about trust +// You can do either +// because the role’s trust policy acts as an IAM resource-based policy. When a +// resource-based policy grants access to a principal in the same account, no +// additional identity-based policy is required. For more information about trust // policies and resource-based policies, see IAM Policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html) in the // IAM User Guide. Tags (Optional) You can pass tag key-value pairs to your @@ -125,14 +130,21 @@ type AssumeRoleInput struct { // This member is required. RoleSessionName *string - // The duration, in seconds, of the role session. The value specified can can range - // from 900 seconds (15 minutes) up to the maximum session duration that is set for - // the role. The maximum session duration setting can have a value from 1 hour to - // 12 hours. If you specify a value higher than this setting or the administrator + // The duration, in seconds, of the role session. The value specified can range + // from 900 seconds (15 minutes) up to the maximum session duration set for the + // role. The maximum session duration setting can have a value from 1 hour to 12 + // hours. If you specify a value higher than this setting or the administrator // setting (whichever is lower), the operation fails. For example, if you specify a // session duration of 12 hours, but your administrator set the maximum session - // duration to 6 hours, your operation fails. To learn how to view the maximum - // value for your role, see View the Maximum Session Duration Setting for a Role + // duration to 6 hours, your operation fails. Role chaining limits your Amazon Web + // Services CLI or Amazon Web Services API role session to a maximum of one hour. + // When you use the AssumeRole API operation to assume a role, you can specify the + // duration of your role session with the DurationSeconds parameter. You can + // specify a parameter value of up to 43200 seconds (12 hours), depending on the + // maximum session duration setting for your role. However, if you assume a role + // using role chaining and provide a DurationSeconds parameter value greater than + // one hour, the operation fails. To learn how to view the maximum value for your + // role, see View the Maximum Session Duration Setting for a Role // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session) // in the IAM User Guide. By default, the value is set to 3600 seconds. The // DurationSeconds parameter is separate from the duration of a console session @@ -140,7 +152,7 @@ type AssumeRoleInput struct { // federation endpoint for a console sign-in token takes a SessionDuration // parameter that specifies the maximum length of the console session. For more // information, see Creating a URL that Enables Federated Users to Access the - // Management Console + // Amazon Web Services Management Console // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html) // in the IAM User Guide. DurationSeconds *int32 @@ -237,7 +249,7 @@ type AssumeRoleInput struct { // A list of session tags that you want to pass. Each session tag consists of a key // name and an associated value. For more information about session tags, see - // Tagging STS Sessions + // Tagging Amazon Web Services STS Sessions // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) in the // IAM User Guide. This parameter is optional. You can pass up to 50 session tags. // The plaintext session tag keys can’t exceed 128 characters, and the values can’t diff --git a/service/sts/api_op_AssumeRoleWithSAML.go b/service/sts/api_op_AssumeRoleWithSAML.go index f0ac2071f03..e12315e4c14 100644 --- a/service/sts/api_op_AssumeRoleWithSAML.go +++ b/service/sts/api_op_AssumeRoleWithSAML.go @@ -17,7 +17,7 @@ import ( // For a comparison of AssumeRoleWithSAML with the other API operations that // produce temporary credentials, see Requesting Temporary Security Credentials // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) -// and Comparing the STS API operations +// and Comparing the Amazon Web Services STS API operations // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) // in the IAM User Guide. The temporary security credentials returned by this // operation consist of an access key ID, a secret access key, and a security @@ -174,7 +174,7 @@ type AssumeRoleWithSAMLInput struct { // federation endpoint for a console sign-in token takes a SessionDuration // parameter that specifies the maximum length of the console session. For more // information, see Creating a URL that Enables Federated Users to Access the - // Management Console + // Amazon Web Services Management Console // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html) // in the IAM User Guide. DurationSeconds *int32 diff --git a/service/sts/api_op_AssumeRoleWithWebIdentity.go b/service/sts/api_op_AssumeRoleWithWebIdentity.go index 99c26b2d9f6..240fa1b8827 100644 --- a/service/sts/api_op_AssumeRoleWithWebIdentity.go +++ b/service/sts/api_op_AssumeRoleWithWebIdentity.go @@ -36,7 +36,7 @@ import ( // AssumeRoleWithWebIdentity with the other API operations that produce temporary // credentials, see Requesting Temporary Security Credentials // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) -// and Comparing the STS API operations +// and Comparing the Amazon Web Services STS API operations // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) // in the IAM User Guide. The temporary security credentials returned by this API // consist of an access key ID, a secret access key, and a security token. @@ -193,7 +193,7 @@ type AssumeRoleWithWebIdentityInput struct { // federation endpoint for a console sign-in token takes a SessionDuration // parameter that specifies the maximum length of the console session. For more // information, see Creating a URL that Enables Federated Users to Access the - // Management Console + // Amazon Web Services Management Console // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html) // in the IAM User Guide. DurationSeconds *int32 diff --git a/service/sts/api_op_DecodeAuthorizationMessage.go b/service/sts/api_op_DecodeAuthorizationMessage.go index 81718f51853..b7a637d420c 100644 --- a/service/sts/api_op_DecodeAuthorizationMessage.go +++ b/service/sts/api_op_DecodeAuthorizationMessage.go @@ -19,16 +19,18 @@ import ( // certain Amazon Web Services operations return an encoded authorization message. // The documentation for an individual operation indicates whether that operation // returns an encoded message in addition to returning an HTTP code. The message is -// encoded because the details of the authorization status can constitute -// privileged information that the user who requested the operation should not see. -// To decode an authorization status message, a user must be granted permissions -// via an IAM policy to request the DecodeAuthorizationMessage -// (sts:DecodeAuthorizationMessage) action. The decoded message includes the -// following type of information: +// encoded because the details of the authorization status can contain privileged +// information that the user who requested the operation should not see. To decode +// an authorization status message, a user must be granted permissions through an +// IAM policy +// (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html) to +// request the DecodeAuthorizationMessage (sts:DecodeAuthorizationMessage) action. +// The decoded message includes the following type of information: // -// * Whether the request was denied due to an -// explicit deny or due to the absence of an explicit allow. For more information, -// see Determining Whether a Request is Allowed or Denied +// * Whether the +// request was denied due to an explicit deny or due to the absence of an explicit +// allow. For more information, see Determining Whether a Request is Allowed or +// Denied // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-denyallow) // in the IAM User Guide. // @@ -71,7 +73,7 @@ type DecodeAuthorizationMessageInput struct { // Web Services request. type DecodeAuthorizationMessageOutput struct { - // An XML document that contains the decoded message. + // The API returns a response with the decoded message. DecodedMessage *string // Metadata pertaining to the operation's result. diff --git a/service/sts/api_op_GetFederationToken.go b/service/sts/api_op_GetFederationToken.go index b52d77cb109..01a3d411b2c 100644 --- a/service/sts/api_op_GetFederationToken.go +++ b/service/sts/api_op_GetFederationToken.go @@ -21,7 +21,7 @@ import ( // GetFederationToken with the other API operations that produce temporary // credentials, see Requesting Temporary Security Credentials // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) -// and Comparing the STS API operations +// and Comparing the Amazon Web Services STS API operations // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) // in the IAM User Guide. You can create a mobile-based or browser-based app that // can authenticate users using a web identity provider like Login with Amazon, @@ -40,16 +40,16 @@ import ( // IAM User Guide. Session duration The temporary credentials are valid for the // specified duration, from 900 seconds (15 minutes) up to a maximum of 129,600 // seconds (36 hours). The default session duration is 43,200 seconds (12 hours). -// Temporary credentials that are obtained by using Amazon Web Services account -// root user credentials have a maximum duration of 3,600 seconds (1 hour). -// Permissions You can use the temporary credentials created by GetFederationToken -// in any Amazon Web Services service except the following: +// Temporary credentials obtained by using the Amazon Web Services account root +// user credentials have a maximum duration of 3,600 seconds (1 hour). Permissions +// You can use the temporary credentials created by GetFederationToken in any +// Amazon Web Services service except the following: // -// * You cannot call any -// IAM operations using the CLI or the Amazon Web Services API. +// * You cannot call any IAM +// operations using the CLI or the Amazon Web Services API. // -// * You cannot call -// any STS operations except GetCallerIdentity. +// * You cannot call any +// STS operations except GetCallerIdentity. // // You must pass an inline or managed // session policy @@ -85,56 +85,8 @@ import ( // or AssumeRoleWithWebIdentity. For more information, see Federation Through a // Web-based Identity Provider // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity) -// in the IAM User Guide. You can also call GetFederationToken using the security -// credentials of an Amazon Web Services account root user, but we do not recommend -// it. Instead, we recommend that you create an IAM user for the purpose of the -// proxy application. Then attach a policy to the IAM user that limits federated -// users to only the actions and resources that they need to access. For more -// information, see IAM Best Practices -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html) in the -// IAM User Guide. Session duration The temporary credentials are valid for the -// specified duration, from 900 seconds (15 minutes) up to a maximum of 129,600 -// seconds (36 hours). The default session duration is 43,200 seconds (12 hours). -// Temporary credentials that are obtained by using Amazon Web Services account -// root user credentials have a maximum duration of 3,600 seconds (1 hour). -// Permissions You can use the temporary credentials created by GetFederationToken -// in any Amazon Web Services service except the following: -// -// * You cannot call any -// IAM operations using the CLI or the Amazon Web Services API. -// -// * You cannot call -// any STS operations except GetCallerIdentity. -// -// You must pass an inline or managed -// session policy -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) -// to this operation. You can pass a single JSON policy document to use as an -// inline session policy. You can also specify up to 10 managed policies to use as -// managed session policies. The plain text that you use for both inline and -// managed session policies can't exceed 2,048 characters. Though the session -// policy parameters are optional, if you do not pass a policy, then the resulting -// federated user session has no permissions. When you pass session policies, the -// session permissions are the intersection of the IAM user policies and the -// session policies that you pass. This gives you a way to further restrict the -// permissions for a federated user. You cannot use session policies to grant more -// permissions than those that are defined in the permissions policy of the IAM -// user. For more information, see Session Policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) -// in the IAM User Guide. For information about using GetFederationToken to create -// temporary security credentials, see GetFederationToken—Federation Through a -// Custom Identity Broker -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken). -// You can use the credentials to access a resource that has a resource-based -// policy. If that policy specifically references the federated user session in the -// Principal element of the policy, the session has the permissions allowed by the -// policy. These permissions are granted in addition to the permissions granted by -// the session policies. Tags (Optional) You can pass tag key-value pairs to your -// session. These are called session tags. For more information about session tags, -// see Passing Session Tags in STS -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) in the -// IAM User Guide. An administrator must grant you the permissions necessary to -// pass session tags. The administrator can also create granular permissions to +// in the IAM User Guide. An administrator must grant you the permissions necessary +// to pass session tags. The administrator can also create granular permissions to // allow you to pass only specific session tags. For more information, see // Tutorial: Using Tags for Attribute-Based Access Control // (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html) diff --git a/service/sts/api_op_GetSessionToken.go b/service/sts/api_op_GetSessionToken.go index 61d0da7c930..b292f208a0e 100644 --- a/service/sts/api_op_GetSessionToken.go +++ b/service/sts/api_op_GetSessionToken.go @@ -24,7 +24,7 @@ import ( // operations that produce temporary credentials, see Requesting Temporary Security // Credentials // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) -// and Comparing the STS API operations +// and Comparing the Amazon Web Services STS API operations // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) // in the IAM User Guide. Session Duration The GetSessionToken operation must be // called by using the long-term Amazon Web Services security credentials of the @@ -90,11 +90,11 @@ type GetSessionTokenInput struct { // policy that requires MFA authentication. The value is either the serial number // for a hardware device (such as GAHT12345678) or an Amazon Resource Name (ARN) // for a virtual device (such as arn:aws:iam::123456789012:mfa/user). You can find - // the device for an IAM user by going to the Management Console and viewing the - // user's security credentials. The regex used to validate this parameter is a - // string of characters consisting of upper- and lower-case alphanumeric characters - // with no spaces. You can also include underscores or any of the following - // characters: =,.@:/- + // the device for an IAM user by going to the Amazon Web Services Management + // Console and viewing the user's security credentials. The regex used to validate + // this parameter is a string of characters consisting of upper- and lower-case + // alphanumeric characters with no spaces. You can also include underscores or any + // of the following characters: =,.@:/- SerialNumber *string // The value provided by the MFA device, if MFA is required. If any policy requires diff --git a/service/sts/types/errors.go b/service/sts/types/errors.go index fec4e40ac07..b109fe5fc18 100644 --- a/service/sts/types/errors.go +++ b/service/sts/types/errors.go @@ -148,7 +148,7 @@ func (e *MalformedPolicyDocumentException) ErrorFault() smithy.ErrorFault { retu // IAM User Guide. You could receive this error even though you meet other defined // session policy and session tag limits. For more information, see IAM and STS // Entity Character Limits -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) +// (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length) // in the IAM User Guide. type PackedPolicyTooLargeException struct { Message *string diff --git a/service/sts/types/types.go b/service/sts/types/types.go index 5bcc356523d..86e509905be 100644 --- a/service/sts/types/types.go +++ b/service/sts/types/types.go @@ -94,7 +94,8 @@ type PolicyDescriptorType struct { // You can pass custom key-value pair attributes when you assume a role or federate // a user. These are called session tags. You can then use the session tags to -// control access to resources. For more information, see Tagging STS Sessions +// control access to resources. For more information, see Tagging Amazon Web +// Services STS Sessions // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) in the // IAM User Guide. type Tag struct { diff --git a/service/textract/api_op_AnalyzeExpense.go b/service/textract/api_op_AnalyzeExpense.go index 24479b7fd9a..7c80017baed 100644 --- a/service/textract/api_op_AnalyzeExpense.go +++ b/service/textract/api_op_AnalyzeExpense.go @@ -11,16 +11,16 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Analyzes an input document for financially related relationships between text. -// Information is returned as ExpenseDocuments and seperated as follows. +// AnalyzeExpense synchronously analyzes an input document for financially related +// relationships between text. Information is returned as ExpenseDocuments and +// seperated as follows. // -// * -// LineItemGroups- A data set containing LineItems which store information about -// the lines of text, such as an item purchased and its price on a receipt. +// * LineItemGroups- A data set containing LineItems which +// store information about the lines of text, such as an item purchased and its +// price on a receipt. // -// * -// SummaryFields- Contains all other information a receipt, such as header -// information or the vendors name. +// * SummaryFields- Contains all other information a receipt, +// such as header information or the vendors name. func (c *Client) AnalyzeExpense(ctx context.Context, params *AnalyzeExpenseInput, optFns ...func(*Options)) (*AnalyzeExpenseOutput, error) { if params == nil { params = &AnalyzeExpenseInput{} diff --git a/service/textract/api_op_AnalyzeID.go b/service/textract/api_op_AnalyzeID.go new file mode 100644 index 00000000000..17d1a783115 --- /dev/null +++ b/service/textract/api_op_AnalyzeID.go @@ -0,0 +1,130 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package textract + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/textract/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Analyzes identity documents for relevant information. This information is +// extracted and returned as IdentityDocumentFields, which records both the +// normalized field and value of the extracted text. +func (c *Client) AnalyzeID(ctx context.Context, params *AnalyzeIDInput, optFns ...func(*Options)) (*AnalyzeIDOutput, error) { + if params == nil { + params = &AnalyzeIDInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AnalyzeID", params, optFns, c.addOperationAnalyzeIDMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AnalyzeIDOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AnalyzeIDInput struct { + + // The document being passed to AnalyzeID. + // + // This member is required. + DocumentPages []types.Document + + noSmithyDocumentSerde +} + +type AnalyzeIDOutput struct { + + // The version of the AnalyzeIdentity API being used to process documents. + AnalyzeIDModelVersion *string + + // Information about the input document. + DocumentMetadata *types.DocumentMetadata + + // The list of documents processed by AnalyzeID. Includes a number denoting their + // place in the list and the response structure for the document. + IdentityDocuments []types.IdentityDocument + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAnalyzeIDMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpAnalyzeID{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpAnalyzeID{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpAnalyzeIDValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAnalyzeID(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opAnalyzeID(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "textract", + OperationName: "AnalyzeID", + } +} diff --git a/service/textract/deserializers.go b/service/textract/deserializers.go index bc53830f3e9..34bf60998ac 100644 --- a/service/textract/deserializers.go +++ b/service/textract/deserializers.go @@ -292,6 +292,141 @@ func awsAwsjson11_deserializeOpErrorAnalyzeExpense(response *smithyhttp.Response } } +type awsAwsjson11_deserializeOpAnalyzeID struct { +} + +func (*awsAwsjson11_deserializeOpAnalyzeID) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpAnalyzeID) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorAnalyzeID(response, &metadata) + } + output := &AnalyzeIDOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentAnalyzeIDOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorAnalyzeID(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("BadDocumentException", errorCode): + return awsAwsjson11_deserializeErrorBadDocumentException(response, errorBody) + + case strings.EqualFold("DocumentTooLargeException", errorCode): + return awsAwsjson11_deserializeErrorDocumentTooLargeException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidS3ObjectException", errorCode): + return awsAwsjson11_deserializeErrorInvalidS3ObjectException(response, errorBody) + + case strings.EqualFold("ProvisionedThroughputExceededException", errorCode): + return awsAwsjson11_deserializeErrorProvisionedThroughputExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnsupportedDocumentException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedDocumentException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpDetectDocumentText struct { } @@ -1794,6 +1929,85 @@ func awsAwsjson11_deserializeDocumentAccessDeniedException(v **types.AccessDenie return nil } +func awsAwsjson11_deserializeDocumentAnalyzeIDDetections(v **types.AnalyzeIDDetections, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AnalyzeIDDetections + if *v == nil { + sv = &types.AnalyzeIDDetections{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Confidence": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Confidence = ptr.Float32(float32(f64)) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Confidence = ptr.Float32(float32(f64)) + + default: + return fmt.Errorf("expected Percent to be a JSON Number, got %T instead", value) + + } + } + + case "NormalizedValue": + if err := awsAwsjson11_deserializeDocumentNormalizedValue(&sv.NormalizedValue, value); err != nil { + return err + } + + case "Text": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Text = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentBadDocumentException(v **types.BadDocumentException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -2953,6 +3167,164 @@ func awsAwsjson11_deserializeDocumentIdempotentParameterMismatchException(v **ty return nil } +func awsAwsjson11_deserializeDocumentIdentityDocument(v **types.IdentityDocument, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.IdentityDocument + if *v == nil { + sv = &types.IdentityDocument{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DocumentIndex": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected UInteger to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DocumentIndex = ptr.Int32(int32(i64)) + } + + case "IdentityDocumentFields": + if err := awsAwsjson11_deserializeDocumentIdentityDocumentFieldList(&sv.IdentityDocumentFields, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentIdentityDocumentField(v **types.IdentityDocumentField, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.IdentityDocumentField + if *v == nil { + sv = &types.IdentityDocumentField{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Type": + if err := awsAwsjson11_deserializeDocumentAnalyzeIDDetections(&sv.Type, value); err != nil { + return err + } + + case "ValueDetection": + if err := awsAwsjson11_deserializeDocumentAnalyzeIDDetections(&sv.ValueDetection, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentIdentityDocumentFieldList(v *[]types.IdentityDocumentField, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.IdentityDocumentField + if *v == nil { + cv = []types.IdentityDocumentField{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.IdentityDocumentField + destAddr := &col + if err := awsAwsjson11_deserializeDocumentIdentityDocumentField(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentIdentityDocumentList(v *[]types.IdentityDocument, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.IdentityDocument + if *v == nil { + cv = []types.IdentityDocument{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.IdentityDocument + destAddr := &col + if err := awsAwsjson11_deserializeDocumentIdentityDocument(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentIdList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -3436,6 +3808,55 @@ func awsAwsjson11_deserializeDocumentLineItemList(v *[]types.LineItemFields, val return nil } +func awsAwsjson11_deserializeDocumentNormalizedValue(v **types.NormalizedValue, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.NormalizedValue + if *v == nil { + sv = &types.NormalizedValue{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + case "ValueType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ValueType to be of type string, got %T instead", value) + } + sv.ValueType = types.ValueType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentPages(v *[]int32, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -4010,6 +4431,56 @@ func awsAwsjson11_deserializeOpDocumentAnalyzeExpenseOutput(v **AnalyzeExpenseOu return nil } +func awsAwsjson11_deserializeOpDocumentAnalyzeIDOutput(v **AnalyzeIDOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *AnalyzeIDOutput + if *v == nil { + sv = &AnalyzeIDOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AnalyzeIDModelVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.AnalyzeIDModelVersion = ptr.String(jtv) + } + + case "DocumentMetadata": + if err := awsAwsjson11_deserializeDocumentDocumentMetadata(&sv.DocumentMetadata, value); err != nil { + return err + } + + case "IdentityDocuments": + if err := awsAwsjson11_deserializeDocumentIdentityDocumentList(&sv.IdentityDocuments, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentDetectDocumentTextOutput(v **DetectDocumentTextOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/textract/generated.json b/service/textract/generated.json index cd115dca6ad..057061b5347 100644 --- a/service/textract/generated.json +++ b/service/textract/generated.json @@ -9,6 +9,7 @@ "api_client.go", "api_op_AnalyzeDocument.go", "api_op_AnalyzeExpense.go", + "api_op_AnalyzeID.go", "api_op_DetectDocumentText.go", "api_op_GetDocumentAnalysis.go", "api_op_GetDocumentTextDetection.go", diff --git a/service/textract/serializers.go b/service/textract/serializers.go index b77bf1e9127..bc78ac637b1 100644 --- a/service/textract/serializers.go +++ b/service/textract/serializers.go @@ -125,6 +125,61 @@ func (m *awsAwsjson11_serializeOpAnalyzeExpense) HandleSerialize(ctx context.Con return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpAnalyzeID struct { +} + +func (*awsAwsjson11_serializeOpAnalyzeID) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpAnalyzeID) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*AnalyzeIDInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Textract.AnalyzeID") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentAnalyzeIDInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpDetectDocumentText struct { } @@ -553,6 +608,19 @@ func awsAwsjson11_serializeDocumentDocumentLocation(v *types.DocumentLocation, v return nil } +func awsAwsjson11_serializeDocumentDocumentPages(v []types.Document, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentDocument(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsAwsjson11_serializeDocumentFeatureTypes(v []types.FeatureType, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -700,6 +768,20 @@ func awsAwsjson11_serializeOpDocumentAnalyzeExpenseInput(v *AnalyzeExpenseInput, return nil } +func awsAwsjson11_serializeOpDocumentAnalyzeIDInput(v *AnalyzeIDInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DocumentPages != nil { + ok := object.Key("DocumentPages") + if err := awsAwsjson11_serializeDocumentDocumentPages(v.DocumentPages, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDetectDocumentTextInput(v *DetectDocumentTextInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/textract/types/enums.go b/service/textract/types/enums.go index 59f8a504a18..78646986ef9 100644 --- a/service/textract/types/enums.go +++ b/service/textract/types/enums.go @@ -161,3 +161,19 @@ func (TextType) Values() []TextType { "PRINTED", } } + +type ValueType string + +// Enum values for ValueType +const ( + ValueTypeDate ValueType = "DATE" +) + +// Values returns all known values for ValueType. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (ValueType) Values() []ValueType { + return []ValueType{ + "DATE", + } +} diff --git a/service/textract/types/errors.go b/service/textract/types/errors.go index 4bfd634dcd5..86783cde77e 100644 --- a/service/textract/types/errors.go +++ b/service/textract/types/errors.go @@ -316,8 +316,8 @@ func (e *ThrottlingException) ErrorCode() string { return "Throttlin func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } // The format of the input document isn't supported. Documents for synchronous -// operations can be in PNG or JPEG format. Documents for asynchronous operations -// can also be in PDF format. +// operations can be in PNG or JPEG format only. Documents for asynchronous +// operations can be in PDF format. type UnsupportedDocumentException struct { Message *string diff --git a/service/textract/types/types.go b/service/textract/types/types.go index d5bb50cca8d..793de5d37c5 100644 --- a/service/textract/types/types.go +++ b/service/textract/types/types.go @@ -6,6 +6,24 @@ import ( smithydocument "github.com/aws/smithy-go/document" ) +// Used to contain the information detected by an AnalyzeID operation. +type AnalyzeIDDetections struct { + + // Text of either the normalized field or value associated with it. + // + // This member is required. + Text *string + + // The confidence score of the detected text. + Confidence *float32 + + // Only returned for dates, returns the type of value detected and the date written + // in a more machine readable way. + NormalizedValue *NormalizedValue + + noSmithyDocumentSerde +} + // A Block represents items that are recognized in a document within a group of // pixels close to each other. The information returned in a Block object depends // on the type of operation. In text detection for documents (for example @@ -254,7 +272,7 @@ type ExpenseDocument struct { } // Breakdown of detected information, seperated into the catagories Type, -// LableDetection, and ValueDetection +// LabelDetection, and ValueDetection type ExpenseField struct { // The explicitly stated label of a detected element. @@ -352,6 +370,33 @@ type HumanLoopDataAttributes struct { noSmithyDocumentSerde } +// The structure that lists each document processed in an AnalyzeID operation. +type IdentityDocument struct { + + // Denotes the placement of a document in the IdentityDocument list. The first + // document is marked 1, the second 2 and so on. + DocumentIndex *int32 + + // The structure used to record information extracted from identity documents. + // Contains both normalized field and value of the extracted text. + IdentityDocumentFields []IdentityDocumentField + + noSmithyDocumentSerde +} + +// Structure containing both the normalized type of the extracted information and +// the text associated with it. These are extracted as Type and Value respectively. +type IdentityDocumentField struct { + + // Used to contain the information detected by an AnalyzeID operation. + Type *AnalyzeIDDetections + + // Used to contain the information detected by an AnalyzeID operation. + ValueDetection *AnalyzeIDDetections + + noSmithyDocumentSerde +} + // A structure that holds information about the different lines found in a // document's tables. type LineItemFields struct { @@ -376,6 +421,19 @@ type LineItemGroup struct { noSmithyDocumentSerde } +// Contains information relating to dates in a document, including the type of +// value, and the value. +type NormalizedValue struct { + + // The value of the date, written as Year-Month-DayTHour:Minute:Second. + Value *string + + // The normalized type of the value detected. In this case, DATE. + ValueType ValueType + + noSmithyDocumentSerde +} + // The Amazon Simple Notification Service (Amazon SNS) topic to which Amazon // Textract publishes the completion status of an asynchronous document operation, // such as StartDocumentTextDetection. diff --git a/service/textract/validators.go b/service/textract/validators.go index 26897e22f46..3a7e1bbc22d 100644 --- a/service/textract/validators.go +++ b/service/textract/validators.go @@ -50,6 +50,26 @@ func (m *validateOpAnalyzeExpense) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } +type validateOpAnalyzeID struct { +} + +func (*validateOpAnalyzeID) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAnalyzeID) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AnalyzeIDInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAnalyzeIDInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDetectDocumentText struct { } @@ -198,6 +218,10 @@ func addOpAnalyzeExpenseValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAnalyzeExpense{}, middleware.After) } +func addOpAnalyzeIDValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAnalyzeID{}, middleware.After) +} + func addOpDetectDocumentTextValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDetectDocumentText{}, middleware.After) } @@ -315,6 +339,21 @@ func validateOpAnalyzeExpenseInput(v *AnalyzeExpenseInput) error { } } +func validateOpAnalyzeIDInput(v *AnalyzeIDInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AnalyzeIDInput"} + if v.DocumentPages == nil { + invalidParams.Add(smithy.NewErrParamRequired("DocumentPages")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDetectDocumentTextInput(v *DetectDocumentTextInput) error { if v == nil { return nil diff --git a/service/timestreamquery/api_op_CancelQuery.go b/service/timestreamquery/api_op_CancelQuery.go index c5667c7aa35..0e37b153e14 100644 --- a/service/timestreamquery/api_op_CancelQuery.go +++ b/service/timestreamquery/api_op_CancelQuery.go @@ -12,11 +12,13 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Cancels a query that has been issued. Cancellation is guaranteed only if the -// query has not completed execution before the cancellation request was issued. -// Because cancellation is an idempotent operation, subsequent cancellation -// requests will return a CancellationMessage, indicating that the query has -// already been canceled. +// Cancels a query that has been issued. Cancellation is provided only if the query +// has not completed running before the cancellation request was issued. Because +// cancellation is an idempotent operation, subsequent cancellation requests will +// return a CancellationMessage, indicating that the query has already been +// canceled. See code sample +// (https://docs.aws.amazon.com/Timestream/latest/developerguide/code-samples.cancel-query.html) +// for details. func (c *Client) CancelQuery(ctx context.Context, params *CancelQueryInput, optFns ...func(*Options)) (*CancelQueryOutput, error) { if params == nil { params = &CancelQueryInput{} @@ -34,8 +36,8 @@ func (c *Client) CancelQuery(ctx context.Context, params *CancelQueryInput, optF type CancelQueryInput struct { - // The id of the query that needs to be cancelled. QueryID is returned as part of - // QueryResult. + // The ID of the query that needs to be cancelled. QueryID is returned as part of + // the query result. // // This member is required. QueryId *string diff --git a/service/timestreamquery/api_op_CreateScheduledQuery.go b/service/timestreamquery/api_op_CreateScheduledQuery.go new file mode 100644 index 00000000000..907d7dc6817 --- /dev/null +++ b/service/timestreamquery/api_op_CreateScheduledQuery.go @@ -0,0 +1,280 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package timestreamquery + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalEndpointDiscovery "github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery" + "github.com/aws/aws-sdk-go-v2/service/timestreamquery/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Create a scheduled query that will be run on your behalf at the configured +// schedule. Timestream assumes the execution role provided as part of the +// ScheduledQueryExecutionRoleArn parameter to run the query. You can use the +// NotificationConfiguration parameter to configure notification for your scheduled +// query operations. +func (c *Client) CreateScheduledQuery(ctx context.Context, params *CreateScheduledQueryInput, optFns ...func(*Options)) (*CreateScheduledQueryOutput, error) { + if params == nil { + params = &CreateScheduledQueryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateScheduledQuery", params, optFns, c.addOperationCreateScheduledQueryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateScheduledQueryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateScheduledQueryInput struct { + + // Configuration for error reporting. Error reports will be generated when a + // problem is encountered when writing the query results. + // + // This member is required. + ErrorReportConfiguration *types.ErrorReportConfiguration + + // Name of the scheduled query. + // + // This member is required. + Name *string + + // Notification configuration for the scheduled query. A notification is sent by + // Timestream when a query run finishes, when the state is updated or when you + // delete it. + // + // This member is required. + NotificationConfiguration *types.NotificationConfiguration + + // The query string to run. Parameter names can be specified in the query string @ + // character followed by an identifier. The named Parameter @scheduled_runtime is + // reserved and can be used in the query to get the time at which the query is + // scheduled to run. The timestamp calculated according to the + // ScheduleConfiguration parameter, will be the value of @scheduled_runtime + // paramater for each query run. For example, consider an instance of a scheduled + // query executing on 2021-12-01 00:00:00. For this instance, the + // @scheduled_runtime parameter is initialized to the timestamp 2021-12-01 00:00:00 + // when invoking the query. + // + // This member is required. + QueryString *string + + // The schedule configuration for the query. + // + // This member is required. + ScheduleConfiguration *types.ScheduleConfiguration + + // The ARN for the IAM role that Timestream will assume when running the scheduled + // query. + // + // This member is required. + ScheduledQueryExecutionRoleArn *string + + // Using a ClientToken makes the call to CreateScheduledQuery idempotent, in other + // words, making the same request repeatedly will produce the same result. Making + // multiple identical CreateScheduledQuery requests has the same effect as making a + // single request. + // + // * If CreateScheduledQuery is called without a ClientToken, the + // Query SDK generates a ClientToken on your behalf. + // + // * After 8 hours, any request + // with the same ClientToken is treated as a new request. + ClientToken *string + + // The Amazon KMS key used to encrypt the scheduled query resource, at-rest. If the + // Amazon KMS key is not specified, the scheduled query resource will be encrypted + // with a Timestream owned Amazon KMS key. To specify a KMS key, use the key ID, + // key ARN, alias name, or alias ARN. When using an alias name, prefix the name + // with alias/ If ErrorReportConfiguration uses SSE_KMS as encryption type, the + // same KmsKeyId is used to encrypt the error report at rest. + KmsKeyId *string + + // A list of key-value pairs to label the scheduled query. + Tags []types.Tag + + // Configuration used for writing the result of a query. + TargetConfiguration *types.TargetConfiguration + + noSmithyDocumentSerde +} + +type CreateScheduledQueryOutput struct { + + // ARN for the created scheduled query. + // + // This member is required. + Arn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateScheduledQueryMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpCreateScheduledQuery{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpCreateScheduledQuery{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateScheduledQueryDiscoverEndpointMiddleware(stack, options, c); err != nil { + return err + } + if err = addIdempotencyToken_opCreateScheduledQueryMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateScheduledQueryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateScheduledQuery(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func addOpCreateScheduledQueryDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { + return stack.Serialize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ + Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ + func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { + opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS + opt.Logger = o.Logger + opt.EndpointResolverUsedForDiscovery = o.EndpointDiscovery.EndpointResolverUsedForDiscovery + }, + }, + DiscoverOperation: c.fetchOpCreateScheduledQueryDiscoverEndpoint, + EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, + EndpointDiscoveryRequired: true, + }, "ResolveEndpoint", middleware.After) +} + +func (c *Client) fetchOpCreateScheduledQueryDiscoverEndpoint(ctx context.Context, input interface{}, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { + in, ok := input.(*CreateScheduledQueryInput) + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) + } + _ = in + + identifierMap := make(map[string]string, 0) + + key := fmt.Sprintf("Timestream Query.%v", identifierMap) + + if v, ok := c.endpointCache.Get(key); ok { + return v, nil + } + + discoveryOperationInput := &DescribeEndpointsInput{} + + opt := internalEndpointDiscovery.DiscoverEndpointOptions{} + for _, fn := range optFns { + fn(&opt) + } + + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + if err != nil { + return internalEndpointDiscovery.WeightedAddress{}, err + } + + weighted, ok := endpoint.GetValidAddress() + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("no valid endpoint address returned by the endpoint discovery api") + } + return weighted, nil +} + +type idempotencyToken_initializeOpCreateScheduledQuery struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateScheduledQuery) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateScheduledQuery) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*CreateScheduledQueryInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateScheduledQueryInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateScheduledQueryMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateScheduledQuery{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateScheduledQuery(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "timestream", + OperationName: "CreateScheduledQuery", + } +} diff --git a/service/timestreamquery/api_op_DeleteScheduledQuery.go b/service/timestreamquery/api_op_DeleteScheduledQuery.go new file mode 100644 index 00000000000..25429948794 --- /dev/null +++ b/service/timestreamquery/api_op_DeleteScheduledQuery.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package timestreamquery + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalEndpointDiscovery "github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a given scheduled query. This is an irreversible operation. +func (c *Client) DeleteScheduledQuery(ctx context.Context, params *DeleteScheduledQueryInput, optFns ...func(*Options)) (*DeleteScheduledQueryOutput, error) { + if params == nil { + params = &DeleteScheduledQueryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteScheduledQuery", params, optFns, c.addOperationDeleteScheduledQueryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteScheduledQueryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteScheduledQueryInput struct { + + // The ARN of the scheduled query. + // + // This member is required. + ScheduledQueryArn *string + + noSmithyDocumentSerde +} + +type DeleteScheduledQueryOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteScheduledQueryMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpDeleteScheduledQuery{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDeleteScheduledQuery{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteScheduledQueryDiscoverEndpointMiddleware(stack, options, c); err != nil { + return err + } + if err = addOpDeleteScheduledQueryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteScheduledQuery(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func addOpDeleteScheduledQueryDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { + return stack.Serialize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ + Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ + func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { + opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS + opt.Logger = o.Logger + opt.EndpointResolverUsedForDiscovery = o.EndpointDiscovery.EndpointResolverUsedForDiscovery + }, + }, + DiscoverOperation: c.fetchOpDeleteScheduledQueryDiscoverEndpoint, + EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, + EndpointDiscoveryRequired: true, + }, "ResolveEndpoint", middleware.After) +} + +func (c *Client) fetchOpDeleteScheduledQueryDiscoverEndpoint(ctx context.Context, input interface{}, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { + in, ok := input.(*DeleteScheduledQueryInput) + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) + } + _ = in + + identifierMap := make(map[string]string, 0) + + key := fmt.Sprintf("Timestream Query.%v", identifierMap) + + if v, ok := c.endpointCache.Get(key); ok { + return v, nil + } + + discoveryOperationInput := &DescribeEndpointsInput{} + + opt := internalEndpointDiscovery.DiscoverEndpointOptions{} + for _, fn := range optFns { + fn(&opt) + } + + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + if err != nil { + return internalEndpointDiscovery.WeightedAddress{}, err + } + + weighted, ok := endpoint.GetValidAddress() + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("no valid endpoint address returned by the endpoint discovery api") + } + return weighted, nil +} + +func newServiceMetadataMiddleware_opDeleteScheduledQuery(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "timestream", + OperationName: "DeleteScheduledQuery", + } +} diff --git a/service/timestreamquery/api_op_DescribeEndpoints.go b/service/timestreamquery/api_op_DescribeEndpoints.go index dd7ac1d9192..00f6ac0fc2a 100644 --- a/service/timestreamquery/api_op_DescribeEndpoints.go +++ b/service/timestreamquery/api_op_DescribeEndpoints.go @@ -12,20 +12,25 @@ import ( ) // DescribeEndpoints returns a list of available endpoints to make Timestream API -// calls against. This API is available through both Write and Query. Because -// Timestream’s SDKs are designed to transparently work with the service’s +// calls against. This API is available through both Write and Query. Because the +// Timestream SDKs are designed to transparently work with the service’s // architecture, including the management and mapping of the service endpoints, it // is not recommended that you use this API unless: // -// * Your application uses a -// programming language that does not yet have SDK support +// * You are using VPC endpoints +// (Amazon Web Services PrivateLink) with Timestream +// (https://docs.aws.amazon.com/Timestream/latest/developerguide/VPCEndpoints) // -// * You require better -// control over the client-side implementation +// * +// Your application uses a programming language that does not yet have SDK +// support // -// For detailed information on how to -// use DescribeEndpoints, see The Endpoint Discovery Pattern and REST APIs -// (https://docs.aws.amazon.com/timestream/latest/developerguide/Using-API.endpoint-discovery.html). +// * You require better control over the client-side implementation +// +// For +// detailed information on how and when to use and implement DescribeEndpoints, see +// The Endpoint Discovery Pattern +// (https://docs.aws.amazon.com/Timestream/latest/developerguide/Using.API.html#Using-API.endpoint-discovery). func (c *Client) DescribeEndpoints(ctx context.Context, params *DescribeEndpointsInput, optFns ...func(*Options)) (*DescribeEndpointsOutput, error) { if params == nil { params = &DescribeEndpointsInput{} diff --git a/service/timestreamquery/api_op_DescribeScheduledQuery.go b/service/timestreamquery/api_op_DescribeScheduledQuery.go new file mode 100644 index 00000000000..1955dacf330 --- /dev/null +++ b/service/timestreamquery/api_op_DescribeScheduledQuery.go @@ -0,0 +1,177 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package timestreamquery + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalEndpointDiscovery "github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery" + "github.com/aws/aws-sdk-go-v2/service/timestreamquery/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Provides detailed information about a scheduled query. +func (c *Client) DescribeScheduledQuery(ctx context.Context, params *DescribeScheduledQueryInput, optFns ...func(*Options)) (*DescribeScheduledQueryOutput, error) { + if params == nil { + params = &DescribeScheduledQueryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeScheduledQuery", params, optFns, c.addOperationDescribeScheduledQueryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeScheduledQueryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeScheduledQueryInput struct { + + // The ARN of the scheduled query. + // + // This member is required. + ScheduledQueryArn *string + + noSmithyDocumentSerde +} + +type DescribeScheduledQueryOutput struct { + + // The scheduled query. + // + // This member is required. + ScheduledQuery *types.ScheduledQueryDescription + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeScheduledQueryMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpDescribeScheduledQuery{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDescribeScheduledQuery{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDescribeScheduledQueryDiscoverEndpointMiddleware(stack, options, c); err != nil { + return err + } + if err = addOpDescribeScheduledQueryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeScheduledQuery(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func addOpDescribeScheduledQueryDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { + return stack.Serialize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ + Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ + func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { + opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS + opt.Logger = o.Logger + opt.EndpointResolverUsedForDiscovery = o.EndpointDiscovery.EndpointResolverUsedForDiscovery + }, + }, + DiscoverOperation: c.fetchOpDescribeScheduledQueryDiscoverEndpoint, + EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, + EndpointDiscoveryRequired: true, + }, "ResolveEndpoint", middleware.After) +} + +func (c *Client) fetchOpDescribeScheduledQueryDiscoverEndpoint(ctx context.Context, input interface{}, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { + in, ok := input.(*DescribeScheduledQueryInput) + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) + } + _ = in + + identifierMap := make(map[string]string, 0) + + key := fmt.Sprintf("Timestream Query.%v", identifierMap) + + if v, ok := c.endpointCache.Get(key); ok { + return v, nil + } + + discoveryOperationInput := &DescribeEndpointsInput{} + + opt := internalEndpointDiscovery.DiscoverEndpointOptions{} + for _, fn := range optFns { + fn(&opt) + } + + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + if err != nil { + return internalEndpointDiscovery.WeightedAddress{}, err + } + + weighted, ok := endpoint.GetValidAddress() + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("no valid endpoint address returned by the endpoint discovery api") + } + return weighted, nil +} + +func newServiceMetadataMiddleware_opDescribeScheduledQuery(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "timestream", + OperationName: "DescribeScheduledQuery", + } +} diff --git a/service/timestreamquery/api_op_ExecuteScheduledQuery.go b/service/timestreamquery/api_op_ExecuteScheduledQuery.go new file mode 100644 index 00000000000..9da27cafc06 --- /dev/null +++ b/service/timestreamquery/api_op_ExecuteScheduledQuery.go @@ -0,0 +1,215 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package timestreamquery + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalEndpointDiscovery "github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// You can use this API to run a scheduled query manually. +func (c *Client) ExecuteScheduledQuery(ctx context.Context, params *ExecuteScheduledQueryInput, optFns ...func(*Options)) (*ExecuteScheduledQueryOutput, error) { + if params == nil { + params = &ExecuteScheduledQueryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ExecuteScheduledQuery", params, optFns, c.addOperationExecuteScheduledQueryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ExecuteScheduledQueryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ExecuteScheduledQueryInput struct { + + // The timestamp in UTC. Query will be run as if it was invoked at this timestamp. + // + // This member is required. + InvocationTime *time.Time + + // ARN of the scheduled query. + // + // This member is required. + ScheduledQueryArn *string + + // Not used. + ClientToken *string + + noSmithyDocumentSerde +} + +type ExecuteScheduledQueryOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationExecuteScheduledQueryMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpExecuteScheduledQuery{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpExecuteScheduledQuery{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpExecuteScheduledQueryDiscoverEndpointMiddleware(stack, options, c); err != nil { + return err + } + if err = addIdempotencyToken_opExecuteScheduledQueryMiddleware(stack, options); err != nil { + return err + } + if err = addOpExecuteScheduledQueryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opExecuteScheduledQuery(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func addOpExecuteScheduledQueryDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { + return stack.Serialize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ + Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ + func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { + opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS + opt.Logger = o.Logger + opt.EndpointResolverUsedForDiscovery = o.EndpointDiscovery.EndpointResolverUsedForDiscovery + }, + }, + DiscoverOperation: c.fetchOpExecuteScheduledQueryDiscoverEndpoint, + EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, + EndpointDiscoveryRequired: true, + }, "ResolveEndpoint", middleware.After) +} + +func (c *Client) fetchOpExecuteScheduledQueryDiscoverEndpoint(ctx context.Context, input interface{}, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { + in, ok := input.(*ExecuteScheduledQueryInput) + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) + } + _ = in + + identifierMap := make(map[string]string, 0) + + key := fmt.Sprintf("Timestream Query.%v", identifierMap) + + if v, ok := c.endpointCache.Get(key); ok { + return v, nil + } + + discoveryOperationInput := &DescribeEndpointsInput{} + + opt := internalEndpointDiscovery.DiscoverEndpointOptions{} + for _, fn := range optFns { + fn(&opt) + } + + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + if err != nil { + return internalEndpointDiscovery.WeightedAddress{}, err + } + + weighted, ok := endpoint.GetValidAddress() + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("no valid endpoint address returned by the endpoint discovery api") + } + return weighted, nil +} + +type idempotencyToken_initializeOpExecuteScheduledQuery struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpExecuteScheduledQuery) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpExecuteScheduledQuery) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*ExecuteScheduledQueryInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *ExecuteScheduledQueryInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opExecuteScheduledQueryMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpExecuteScheduledQuery{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opExecuteScheduledQuery(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "timestream", + OperationName: "ExecuteScheduledQuery", + } +} diff --git a/service/timestreamquery/api_op_ListScheduledQueries.go b/service/timestreamquery/api_op_ListScheduledQueries.go new file mode 100644 index 00000000000..aa0cdf44cd1 --- /dev/null +++ b/service/timestreamquery/api_op_ListScheduledQueries.go @@ -0,0 +1,273 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package timestreamquery + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalEndpointDiscovery "github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery" + "github.com/aws/aws-sdk-go-v2/service/timestreamquery/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a list of all scheduled queries in the caller's Amazon account and Region. +// ListScheduledQueries is eventually consistent. +func (c *Client) ListScheduledQueries(ctx context.Context, params *ListScheduledQueriesInput, optFns ...func(*Options)) (*ListScheduledQueriesOutput, error) { + if params == nil { + params = &ListScheduledQueriesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListScheduledQueries", params, optFns, c.addOperationListScheduledQueriesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListScheduledQueriesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListScheduledQueriesInput struct { + + // The maximum number of items to return in the output. If the total number of + // items available is more than the value specified, a NextToken is provided in the + // output. To resume pagination, provide the NextToken value as the argument to the + // subsequent call to ListScheduledQueriesRequest. + MaxResults *int32 + + // A pagination token to resume pagination. + NextToken *string + + noSmithyDocumentSerde +} + +type ListScheduledQueriesOutput struct { + + // A list of scheduled queries. + // + // This member is required. + ScheduledQueries []types.ScheduledQuery + + // A token to specify where to start paginating. This is the NextToken from a + // previously truncated response. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListScheduledQueriesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListScheduledQueries{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListScheduledQueries{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListScheduledQueriesDiscoverEndpointMiddleware(stack, options, c); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListScheduledQueries(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func addOpListScheduledQueriesDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { + return stack.Serialize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ + Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ + func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { + opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS + opt.Logger = o.Logger + opt.EndpointResolverUsedForDiscovery = o.EndpointDiscovery.EndpointResolverUsedForDiscovery + }, + }, + DiscoverOperation: c.fetchOpListScheduledQueriesDiscoverEndpoint, + EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, + EndpointDiscoveryRequired: true, + }, "ResolveEndpoint", middleware.After) +} + +func (c *Client) fetchOpListScheduledQueriesDiscoverEndpoint(ctx context.Context, input interface{}, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { + in, ok := input.(*ListScheduledQueriesInput) + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) + } + _ = in + + identifierMap := make(map[string]string, 0) + + key := fmt.Sprintf("Timestream Query.%v", identifierMap) + + if v, ok := c.endpointCache.Get(key); ok { + return v, nil + } + + discoveryOperationInput := &DescribeEndpointsInput{} + + opt := internalEndpointDiscovery.DiscoverEndpointOptions{} + for _, fn := range optFns { + fn(&opt) + } + + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + if err != nil { + return internalEndpointDiscovery.WeightedAddress{}, err + } + + weighted, ok := endpoint.GetValidAddress() + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("no valid endpoint address returned by the endpoint discovery api") + } + return weighted, nil +} + +// ListScheduledQueriesAPIClient is a client that implements the +// ListScheduledQueries operation. +type ListScheduledQueriesAPIClient interface { + ListScheduledQueries(context.Context, *ListScheduledQueriesInput, ...func(*Options)) (*ListScheduledQueriesOutput, error) +} + +var _ ListScheduledQueriesAPIClient = (*Client)(nil) + +// ListScheduledQueriesPaginatorOptions is the paginator options for +// ListScheduledQueries +type ListScheduledQueriesPaginatorOptions struct { + // The maximum number of items to return in the output. If the total number of + // items available is more than the value specified, a NextToken is provided in the + // output. To resume pagination, provide the NextToken value as the argument to the + // subsequent call to ListScheduledQueriesRequest. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListScheduledQueriesPaginator is a paginator for ListScheduledQueries +type ListScheduledQueriesPaginator struct { + options ListScheduledQueriesPaginatorOptions + client ListScheduledQueriesAPIClient + params *ListScheduledQueriesInput + nextToken *string + firstPage bool +} + +// NewListScheduledQueriesPaginator returns a new ListScheduledQueriesPaginator +func NewListScheduledQueriesPaginator(client ListScheduledQueriesAPIClient, params *ListScheduledQueriesInput, optFns ...func(*ListScheduledQueriesPaginatorOptions)) *ListScheduledQueriesPaginator { + if params == nil { + params = &ListScheduledQueriesInput{} + } + + options := ListScheduledQueriesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListScheduledQueriesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListScheduledQueriesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListScheduledQueries page. +func (p *ListScheduledQueriesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListScheduledQueriesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListScheduledQueries(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListScheduledQueries(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "timestream", + OperationName: "ListScheduledQueries", + } +} diff --git a/service/timestreamquery/api_op_ListTagsForResource.go b/service/timestreamquery/api_op_ListTagsForResource.go new file mode 100644 index 00000000000..5c4d17886c0 --- /dev/null +++ b/service/timestreamquery/api_op_ListTagsForResource.go @@ -0,0 +1,275 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package timestreamquery + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalEndpointDiscovery "github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery" + "github.com/aws/aws-sdk-go-v2/service/timestreamquery/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List all tags on a Timestream query resource. +func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { + if params == nil { + params = &ListTagsForResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTagsForResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListTagsForResourceInput struct { + + // The Timestream resource with tags to be listed. This value is an Amazon Resource + // Name (ARN). + // + // This member is required. + ResourceARN *string + + // The maximum number of tags to return. + MaxResults *int32 + + // A pagination token to resume pagination. + NextToken *string + + noSmithyDocumentSerde +} + +type ListTagsForResourceOutput struct { + + // The tags currently associated with the Timestream resource. + // + // This member is required. + Tags []types.Tag + + // A pagination token to resume pagination with a subsequent call to + // ListTagsForResourceResponse. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListTagsForResourceDiscoverEndpointMiddleware(stack, options, c); err != nil { + return err + } + if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func addOpListTagsForResourceDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { + return stack.Serialize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ + Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ + func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { + opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS + opt.Logger = o.Logger + opt.EndpointResolverUsedForDiscovery = o.EndpointDiscovery.EndpointResolverUsedForDiscovery + }, + }, + DiscoverOperation: c.fetchOpListTagsForResourceDiscoverEndpoint, + EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, + EndpointDiscoveryRequired: true, + }, "ResolveEndpoint", middleware.After) +} + +func (c *Client) fetchOpListTagsForResourceDiscoverEndpoint(ctx context.Context, input interface{}, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { + in, ok := input.(*ListTagsForResourceInput) + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) + } + _ = in + + identifierMap := make(map[string]string, 0) + + key := fmt.Sprintf("Timestream Query.%v", identifierMap) + + if v, ok := c.endpointCache.Get(key); ok { + return v, nil + } + + discoveryOperationInput := &DescribeEndpointsInput{} + + opt := internalEndpointDiscovery.DiscoverEndpointOptions{} + for _, fn := range optFns { + fn(&opt) + } + + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + if err != nil { + return internalEndpointDiscovery.WeightedAddress{}, err + } + + weighted, ok := endpoint.GetValidAddress() + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("no valid endpoint address returned by the endpoint discovery api") + } + return weighted, nil +} + +// ListTagsForResourceAPIClient is a client that implements the ListTagsForResource +// operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + +// ListTagsForResourcePaginatorOptions is the paginator options for +// ListTagsForResource +type ListTagsForResourcePaginatorOptions struct { + // The maximum number of tags to return. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListTagsForResourcePaginator is a paginator for ListTagsForResource +type ListTagsForResourcePaginator struct { + options ListTagsForResourcePaginatorOptions + client ListTagsForResourceAPIClient + params *ListTagsForResourceInput + nextToken *string + firstPage bool +} + +// NewListTagsForResourcePaginator returns a new ListTagsForResourcePaginator +func NewListTagsForResourcePaginator(client ListTagsForResourceAPIClient, params *ListTagsForResourceInput, optFns ...func(*ListTagsForResourcePaginatorOptions)) *ListTagsForResourcePaginator { + if params == nil { + params = &ListTagsForResourceInput{} + } + + options := ListTagsForResourcePaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListTagsForResourcePaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListTagsForResourcePaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListTagsForResource page. +func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "timestream", + OperationName: "ListTagsForResource", + } +} diff --git a/service/timestreamquery/api_op_PrepareQuery.go b/service/timestreamquery/api_op_PrepareQuery.go new file mode 100644 index 00000000000..c988b5500df --- /dev/null +++ b/service/timestreamquery/api_op_PrepareQuery.go @@ -0,0 +1,196 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package timestreamquery + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalEndpointDiscovery "github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery" + "github.com/aws/aws-sdk-go-v2/service/timestreamquery/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// A synchronous operation that allows you to submit a query with parameters to be +// stored by Timestream for later running. Timestream only supports using this +// operation with the PrepareQueryRequest$ValidateOnly set to true. +func (c *Client) PrepareQuery(ctx context.Context, params *PrepareQueryInput, optFns ...func(*Options)) (*PrepareQueryOutput, error) { + if params == nil { + params = &PrepareQueryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PrepareQuery", params, optFns, c.addOperationPrepareQueryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PrepareQueryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PrepareQueryInput struct { + + // The Timestream query string that you want to use as a prepared statement. + // Parameter names can be specified in the query string @ character followed by an + // identifier. + // + // This member is required. + QueryString *string + + // By setting this value to true, Timestream will only validate that the query + // string is a valid Timestream query, and not store the prepared query for later + // use. + ValidateOnly *bool + + noSmithyDocumentSerde +} + +type PrepareQueryOutput struct { + + // A list of SELECT clause columns of the submitted query string. + // + // This member is required. + Columns []types.SelectColumn + + // A list of parameters used in the submitted query string. + // + // This member is required. + Parameters []types.ParameterMapping + + // The query string that you want prepare. + // + // This member is required. + QueryString *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPrepareQueryMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpPrepareQuery{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpPrepareQuery{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpPrepareQueryDiscoverEndpointMiddleware(stack, options, c); err != nil { + return err + } + if err = addOpPrepareQueryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPrepareQuery(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func addOpPrepareQueryDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { + return stack.Serialize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ + Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ + func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { + opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS + opt.Logger = o.Logger + opt.EndpointResolverUsedForDiscovery = o.EndpointDiscovery.EndpointResolverUsedForDiscovery + }, + }, + DiscoverOperation: c.fetchOpPrepareQueryDiscoverEndpoint, + EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, + EndpointDiscoveryRequired: true, + }, "ResolveEndpoint", middleware.After) +} + +func (c *Client) fetchOpPrepareQueryDiscoverEndpoint(ctx context.Context, input interface{}, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { + in, ok := input.(*PrepareQueryInput) + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) + } + _ = in + + identifierMap := make(map[string]string, 0) + + key := fmt.Sprintf("Timestream Query.%v", identifierMap) + + if v, ok := c.endpointCache.Get(key); ok { + return v, nil + } + + discoveryOperationInput := &DescribeEndpointsInput{} + + opt := internalEndpointDiscovery.DiscoverEndpointOptions{} + for _, fn := range optFns { + fn(&opt) + } + + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + if err != nil { + return internalEndpointDiscovery.WeightedAddress{}, err + } + + weighted, ok := endpoint.GetValidAddress() + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("no valid endpoint address returned by the endpoint discovery api") + } + return weighted, nil +} + +func newServiceMetadataMiddleware_opPrepareQuery(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "timestream", + OperationName: "PrepareQuery", + } +} diff --git a/service/timestreamquery/api_op_Query.go b/service/timestreamquery/api_op_Query.go index c855c43f9ea..e77466db15a 100644 --- a/service/timestreamquery/api_op_Query.go +++ b/service/timestreamquery/api_op_Query.go @@ -13,11 +13,29 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Query is a synchronous operation that enables you to execute a query. Query will -// timeout after 60 seconds. You must update the default timeout in the SDK to -// support a timeout of 60 seconds. The result set will be truncated to 1MB. -// Service quotas apply. For more information, see Quotas in the Timestream -// Developer Guide. +// Query is a synchronous operation that enables you to run a query against your +// Amazon Timestream data. Query will time out after 60 seconds. You must update +// the default timeout in the SDK to support a timeout of 60 seconds. See the code +// sample +// (https://docs.aws.amazon.com/Timestream/latest/developerguide/code-samples.run-query.html) +// for details. Your query request will fail in the following cases: +// +// * If you +// submit a Query request with the same client token outside of the 5-minute +// idempotency window. +// +// * If you submit a Query request with the same client token, +// but change other parameters, within the 5-minute idempotency window. +// +// * If the +// size of the row (including the query metadata) exceeds 1 MB, then the query will +// fail with the following error message: Query aborted as max page response size +// has been exceeded by the output result row +// +// * If the IAM principal of the query +// initiator and the result reader are not the same and/or the query initiator and +// the result reader do not have the same query string in the query requests, the +// query will fail with an Invalid pagination token error. func (c *Client) Query(ctx context.Context, params *QueryInput, optFns ...func(*Options)) (*QueryOutput, error) { if params == nil { params = &QueryInput{} @@ -35,34 +53,81 @@ func (c *Client) Query(ctx context.Context, params *QueryInput, optFns ...func(* type QueryInput struct { - // The query to be executed by Timestream. + // The query to be run by Timestream. // // This member is required. QueryString *string - // Unique, case-sensitive string of up to 64 ASCII characters that you specify when - // you make a Query request. Providing a ClientToken makes the call to Query - // idempotent, meaning that multiple identical calls have the same effect as one - // single call. Your query request will fail in the following cases: + // Unique, case-sensitive string of up to 64 ASCII characters specified when a + // Query request is made. Providing a ClientToken makes the call to Query + // idempotent. This means that running the same query repeatedly will produce the + // same result. In other words, making multiple identical Query requests has the + // same effect as making a single request. When using ClientToken in a query, note + // the following: // - // * If you - // submit a request with the same client token outside the 5-minute idepotency - // window. + // * If the Query API is instantiated without a ClientToken, the + // Query SDK generates a ClientToken on your behalf. // - // * If you submit a request with the same client token but a change in - // other parameters within the 5-minute idempotency window. + // * If the Query invocation + // only contains the ClientToken but does not include a NextToken, that invocation + // of Query is assumed to be a new query run. // - // After 4 hours, any - // request with the same client token is treated as a new request. + // * If the invocation contains + // NextToken, that particular invocation is assumed to be a subsequent invocation + // of a prior call to the Query API, and a result set is returned. + // + // * After 4 + // hours, any request with the same ClientToken is treated as a new request. ClientToken *string - // The total number of rows to return in the output. If the total number of rows - // available is more than the value specified, a NextToken is provided in the - // command's output. To resume pagination, provide the NextToken value in the - // starting-token argument of a subsequent command. + // The total number of rows to be returned in the Query output. The initial run of + // Query with a MaxRows value specified will return the result set of the query in + // two cases: + // + // * The size of the result is less than 1MB. + // + // * The number of rows in + // the result set is less than the value of maxRows. + // + // Otherwise, the initial + // invocation of Query only returns a NextToken, which can then be used in + // subsequent calls to fetch the result set. To resume pagination, provide the + // NextToken value in the subsequent command. If the row size is large (e.g. a row + // has many columns), Timestream may return fewer rows to keep the response size + // from exceeding the 1 MB limit. If MaxRows is not provided, Timestream will send + // the necessary number of rows to meet the 1 MB limit. MaxRows *int32 - // A pagination token passed to get a set of results. + // A pagination token used to return a set of results. When the Query API is + // invoked using NextToken, that particular invocation is assumed to be a + // subsequent invocation of a prior call to Query, and a result set is returned. + // However, if the Query invocation only contains the ClientToken, that invocation + // of Query is assumed to be a new query run. Note the following when using + // NextToken in a query: + // + // * A pagination token can be used for up to five Query + // invocations, OR for a duration of up to 1 hour – whichever comes first. + // + // * Using + // the same NextToken will return the same set of records. To keep paginating + // through the result set, you must to use the most recent nextToken. + // + // * Suppose a + // Query invocation returns two NextToken values, TokenA and TokenB. If TokenB is + // used in a subsequent Query invocation, then TokenA is invalidated and cannot be + // reused. + // + // * To request a previous result set from a query after pagination has + // begun, you must re-invoke the Query API. + // + // * The latest NextToken should be used + // to paginate until null is returned, at which point a new NextToken should be + // used. + // + // * If the IAM principal of the query initiator and the result reader are + // not the same and/or the query initiator and the result reader do not have the + // same query string in the query requests, the query will fail with an Invalid + // pagination token error. NextToken *string noSmithyDocumentSerde @@ -89,8 +154,7 @@ type QueryOutput struct { // results. NextToken *string - // Information about the status of the query, including progress and bytes - // scannned. + // Information about the status of the query, including progress and bytes scanned. QueryStatus *types.QueryStatus // Metadata pertaining to the operation's result. @@ -226,10 +290,22 @@ var _ QueryAPIClient = (*Client)(nil) // QueryPaginatorOptions is the paginator options for Query type QueryPaginatorOptions struct { - // The total number of rows to return in the output. If the total number of rows - // available is more than the value specified, a NextToken is provided in the - // command's output. To resume pagination, provide the NextToken value in the - // starting-token argument of a subsequent command. + // The total number of rows to be returned in the Query output. The initial run of + // Query with a MaxRows value specified will return the result set of the query in + // two cases: + // + // * The size of the result is less than 1MB. + // + // * The number of rows in + // the result set is less than the value of maxRows. + // + // Otherwise, the initial + // invocation of Query only returns a NextToken, which can then be used in + // subsequent calls to fetch the result set. To resume pagination, provide the + // NextToken value in the subsequent command. If the row size is large (e.g. a row + // has many columns), Timestream may return fewer rows to keep the response size + // from exceeding the 1 MB limit. If MaxRows is not provided, Timestream will send + // the necessary number of rows to meet the 1 MB limit. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/timestreamquery/api_op_TagResource.go b/service/timestreamquery/api_op_TagResource.go new file mode 100644 index 00000000000..1f3f73d0aad --- /dev/null +++ b/service/timestreamquery/api_op_TagResource.go @@ -0,0 +1,179 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package timestreamquery + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalEndpointDiscovery "github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery" + "github.com/aws/aws-sdk-go-v2/service/timestreamquery/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Associate a set of tags with a Timestream resource. You can then activate these +// user-defined tags so that they appear on the Billing and Cost Management console +// for cost allocation tracking. +func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { + if params == nil { + params = &TagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TagResourceInput struct { + + // Identifies the Timestream resource to which tags should be added. This value is + // an Amazon Resource Name (ARN). + // + // This member is required. + ResourceARN *string + + // The tags to be assigned to the Timestream resource. + // + // This member is required. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type TagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpTagResourceDiscoverEndpointMiddleware(stack, options, c); err != nil { + return err + } + if err = addOpTagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func addOpTagResourceDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { + return stack.Serialize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ + Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ + func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { + opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS + opt.Logger = o.Logger + opt.EndpointResolverUsedForDiscovery = o.EndpointDiscovery.EndpointResolverUsedForDiscovery + }, + }, + DiscoverOperation: c.fetchOpTagResourceDiscoverEndpoint, + EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, + EndpointDiscoveryRequired: true, + }, "ResolveEndpoint", middleware.After) +} + +func (c *Client) fetchOpTagResourceDiscoverEndpoint(ctx context.Context, input interface{}, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { + in, ok := input.(*TagResourceInput) + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) + } + _ = in + + identifierMap := make(map[string]string, 0) + + key := fmt.Sprintf("Timestream Query.%v", identifierMap) + + if v, ok := c.endpointCache.Get(key); ok { + return v, nil + } + + discoveryOperationInput := &DescribeEndpointsInput{} + + opt := internalEndpointDiscovery.DiscoverEndpointOptions{} + for _, fn := range optFns { + fn(&opt) + } + + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + if err != nil { + return internalEndpointDiscovery.WeightedAddress{}, err + } + + weighted, ok := endpoint.GetValidAddress() + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("no valid endpoint address returned by the endpoint discovery api") + } + return weighted, nil +} + +func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "timestream", + OperationName: "TagResource", + } +} diff --git a/service/timestreamquery/api_op_UntagResource.go b/service/timestreamquery/api_op_UntagResource.go new file mode 100644 index 00000000000..ec1ae711adc --- /dev/null +++ b/service/timestreamquery/api_op_UntagResource.go @@ -0,0 +1,177 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package timestreamquery + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalEndpointDiscovery "github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes the association of tags from a Timestream query resource. +func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { + if params == nil { + params = &UntagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UntagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UntagResourceInput struct { + + // The Timestream resource that the tags will be removed from. This value is an + // Amazon Resource Name (ARN). + // + // This member is required. + ResourceARN *string + + // A list of tags keys. Existing tags of the resource whose keys are members of + // this list will be removed from the Timestream resource. + // + // This member is required. + TagKeys []string + + noSmithyDocumentSerde +} + +type UntagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUntagResourceDiscoverEndpointMiddleware(stack, options, c); err != nil { + return err + } + if err = addOpUntagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func addOpUntagResourceDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { + return stack.Serialize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ + Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ + func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { + opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS + opt.Logger = o.Logger + opt.EndpointResolverUsedForDiscovery = o.EndpointDiscovery.EndpointResolverUsedForDiscovery + }, + }, + DiscoverOperation: c.fetchOpUntagResourceDiscoverEndpoint, + EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, + EndpointDiscoveryRequired: true, + }, "ResolveEndpoint", middleware.After) +} + +func (c *Client) fetchOpUntagResourceDiscoverEndpoint(ctx context.Context, input interface{}, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { + in, ok := input.(*UntagResourceInput) + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) + } + _ = in + + identifierMap := make(map[string]string, 0) + + key := fmt.Sprintf("Timestream Query.%v", identifierMap) + + if v, ok := c.endpointCache.Get(key); ok { + return v, nil + } + + discoveryOperationInput := &DescribeEndpointsInput{} + + opt := internalEndpointDiscovery.DiscoverEndpointOptions{} + for _, fn := range optFns { + fn(&opt) + } + + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + if err != nil { + return internalEndpointDiscovery.WeightedAddress{}, err + } + + weighted, ok := endpoint.GetValidAddress() + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("no valid endpoint address returned by the endpoint discovery api") + } + return weighted, nil +} + +func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "timestream", + OperationName: "UntagResource", + } +} diff --git a/service/timestreamquery/api_op_UpdateScheduledQuery.go b/service/timestreamquery/api_op_UpdateScheduledQuery.go new file mode 100644 index 00000000000..2f4c96ceca6 --- /dev/null +++ b/service/timestreamquery/api_op_UpdateScheduledQuery.go @@ -0,0 +1,176 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package timestreamquery + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalEndpointDiscovery "github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery" + "github.com/aws/aws-sdk-go-v2/service/timestreamquery/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Update a scheduled query. +func (c *Client) UpdateScheduledQuery(ctx context.Context, params *UpdateScheduledQueryInput, optFns ...func(*Options)) (*UpdateScheduledQueryOutput, error) { + if params == nil { + params = &UpdateScheduledQueryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateScheduledQuery", params, optFns, c.addOperationUpdateScheduledQueryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateScheduledQueryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateScheduledQueryInput struct { + + // ARN of the scheuled query. + // + // This member is required. + ScheduledQueryArn *string + + // State of the scheduled query. + // + // This member is required. + State types.ScheduledQueryState + + noSmithyDocumentSerde +} + +type UpdateScheduledQueryOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateScheduledQueryMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateScheduledQuery{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateScheduledQuery{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateScheduledQueryDiscoverEndpointMiddleware(stack, options, c); err != nil { + return err + } + if err = addOpUpdateScheduledQueryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateScheduledQuery(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func addOpUpdateScheduledQueryDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { + return stack.Serialize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ + Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ + func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { + opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS + opt.Logger = o.Logger + opt.EndpointResolverUsedForDiscovery = o.EndpointDiscovery.EndpointResolverUsedForDiscovery + }, + }, + DiscoverOperation: c.fetchOpUpdateScheduledQueryDiscoverEndpoint, + EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, + EndpointDiscoveryRequired: true, + }, "ResolveEndpoint", middleware.After) +} + +func (c *Client) fetchOpUpdateScheduledQueryDiscoverEndpoint(ctx context.Context, input interface{}, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { + in, ok := input.(*UpdateScheduledQueryInput) + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) + } + _ = in + + identifierMap := make(map[string]string, 0) + + key := fmt.Sprintf("Timestream Query.%v", identifierMap) + + if v, ok := c.endpointCache.Get(key); ok { + return v, nil + } + + discoveryOperationInput := &DescribeEndpointsInput{} + + opt := internalEndpointDiscovery.DiscoverEndpointOptions{} + for _, fn := range optFns { + fn(&opt) + } + + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, key, opt) + if err != nil { + return internalEndpointDiscovery.WeightedAddress{}, err + } + + weighted, ok := endpoint.GetValidAddress() + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("no valid endpoint address returned by the endpoint discovery api") + } + return weighted, nil +} + +func newServiceMetadataMiddleware_opUpdateScheduledQuery(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "timestream", + OperationName: "UpdateScheduledQuery", + } +} diff --git a/service/timestreamquery/deserializers.go b/service/timestreamquery/deserializers.go index 8fb7920947b..7bdef62ec09 100644 --- a/service/timestreamquery/deserializers.go +++ b/service/timestreamquery/deserializers.go @@ -13,8 +13,10 @@ import ( smithyio "github.com/aws/smithy-go/io" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" + smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "io" + "io/ioutil" "math" "strings" ) @@ -142,14 +144,14 @@ func awsAwsjson10_deserializeOpErrorCancelQuery(response *smithyhttp.Response, m } } -type awsAwsjson10_deserializeOpDescribeEndpoints struct { +type awsAwsjson10_deserializeOpCreateScheduledQuery struct { } -func (*awsAwsjson10_deserializeOpDescribeEndpoints) ID() string { +func (*awsAwsjson10_deserializeOpCreateScheduledQuery) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDescribeEndpoints) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateScheduledQuery) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -163,9 +165,9 @@ func (m *awsAwsjson10_deserializeOpDescribeEndpoints) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDescribeEndpoints(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateScheduledQuery(response, &metadata) } - output := &DescribeEndpointsOutput{} + output := &CreateScheduledQueryOutput{} out.Result = output var buff [1024]byte @@ -185,7 +187,7 @@ func (m *awsAwsjson10_deserializeOpDescribeEndpoints) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDescribeEndpointsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateScheduledQueryOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -199,7 +201,7 @@ func (m *awsAwsjson10_deserializeOpDescribeEndpoints) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDescribeEndpoints(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateScheduledQuery(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -240,9 +242,21 @@ func awsAwsjson10_deserializeOpErrorDescribeEndpoints(response *smithyhttp.Respo } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("InvalidEndpointException", errorCode): + return awsAwsjson10_deserializeErrorInvalidEndpointException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -259,14 +273,14 @@ func awsAwsjson10_deserializeOpErrorDescribeEndpoints(response *smithyhttp.Respo } } -type awsAwsjson10_deserializeOpQuery struct { +type awsAwsjson10_deserializeOpDeleteScheduledQuery struct { } -func (*awsAwsjson10_deserializeOpQuery) ID() string { +func (*awsAwsjson10_deserializeOpDeleteScheduledQuery) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpQuery) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteScheduledQuery) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -280,43 +294,21 @@ func (m *awsAwsjson10_deserializeOpQuery) HandleDeserialize(ctx context.Context, } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorQuery(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteScheduledQuery(response, &metadata) } - output := &QueryOutput{} + output := &DeleteScheduledQueryOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson10_deserializeOpDocumentQueryOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), } - return out, metadata, err } return out, metadata, err } -func awsAwsjson10_deserializeOpErrorQuery(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteScheduledQuery(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -360,17 +352,14 @@ func awsAwsjson10_deserializeOpErrorQuery(response *smithyhttp.Response, metadat case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("InvalidEndpointException", errorCode): return awsAwsjson10_deserializeErrorInvalidEndpointException(response, errorBody) - case strings.EqualFold("QueryExecutionException", errorCode): - return awsAwsjson10_deserializeErrorQueryExecutionException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -388,46 +377,36 @@ func awsAwsjson10_deserializeOpErrorQuery(response *smithyhttp.Response, metadat } } -func awsAwsjson10_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } +type awsAwsjson10_deserializeOpDescribeEndpoints struct { +} - output := &types.AccessDeniedException{} - err := awsAwsjson10_deserializeDocumentAccessDeniedException(&output, shape) +func (*awsAwsjson10_deserializeOpDescribeEndpoints) ID() string { + return "OperationDeserializer" +} +func (m *awsAwsjson10_deserializeOpDescribeEndpoints) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output -} + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorDescribeEndpoints(response, &metadata) + } + output := &DescribeEndpointsOutput{} + out.Result = output -func awsAwsjson10_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -438,12 +417,10 @@ func awsAwsjson10_deserializeErrorConflictException(response *smithyhttp.Respons Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.ConflictException{} - err := awsAwsjson10_deserializeDocumentConflictException(&output, shape) - + err = awsAwsjson10_deserializeOpDocumentDescribeEndpointsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -451,34 +428,34 @@ func awsAwsjson10_deserializeErrorConflictException(response *smithyhttp.Respons Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson10_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson10_deserializeOpErrorDescribeEndpoints(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - output := &types.InternalServerException{} - err := awsAwsjson10_deserializeDocumentInternalServerException(&output, shape) - + code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -490,49 +467,63 @@ func awsAwsjson10_deserializeErrorInternalServerException(response *smithyhttp.R } errorBody.Seek(0, io.SeekStart) - return output -} + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } -func awsAwsjson10_deserializeErrorInvalidEndpointException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - output := &types.InvalidEndpointException{} - err := awsAwsjson10_deserializeDocumentInvalidEndpointException(&output, shape) +type awsAwsjson10_deserializeOpDescribeScheduledQuery struct { +} +func (*awsAwsjson10_deserializeOpDescribeScheduledQuery) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpDescribeScheduledQuery) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output -} + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorDescribeScheduledQuery(response, &metadata) + } + output := &DescribeScheduledQueryOutput{} + out.Result = output -func awsAwsjson10_deserializeErrorQueryExecutionException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -543,12 +534,10 @@ func awsAwsjson10_deserializeErrorQueryExecutionException(response *smithyhttp.R Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.QueryExecutionException{} - err := awsAwsjson10_deserializeDocumentQueryExecutionException(&output, shape) - + err = awsAwsjson10_deserializeOpDocumentDescribeScheduledQueryOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -556,34 +545,1328 @@ func awsAwsjson10_deserializeErrorQueryExecutionException(response *smithyhttp.R Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson10_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson10_deserializeOpErrorDescribeScheduledQuery(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - output := &types.ThrottlingException{} - err := awsAwsjson10_deserializeDocumentThrottlingException(&output, shape) - + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidEndpointException", errorCode): + return awsAwsjson10_deserializeErrorInvalidEndpointException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpExecuteScheduledQuery struct { +} + +func (*awsAwsjson10_deserializeOpExecuteScheduledQuery) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpExecuteScheduledQuery) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorExecuteScheduledQuery(response, &metadata) + } + output := &ExecuteScheduledQueryOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorExecuteScheduledQuery(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidEndpointException", errorCode): + return awsAwsjson10_deserializeErrorInvalidEndpointException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpListScheduledQueries struct { +} + +func (*awsAwsjson10_deserializeOpListScheduledQueries) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpListScheduledQueries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorListScheduledQueries(response, &metadata) + } + output := &ListScheduledQueriesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentListScheduledQueriesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorListScheduledQueries(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidEndpointException", errorCode): + return awsAwsjson10_deserializeErrorInvalidEndpointException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpListTagsForResource struct { +} + +func (*awsAwsjson10_deserializeOpListTagsForResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorListTagsForResource(response, &metadata) + } + output := &ListTagsForResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidEndpointException", errorCode): + return awsAwsjson10_deserializeErrorInvalidEndpointException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpPrepareQuery struct { +} + +func (*awsAwsjson10_deserializeOpPrepareQuery) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpPrepareQuery) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorPrepareQuery(response, &metadata) + } + output := &PrepareQueryOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentPrepareQueryOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorPrepareQuery(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidEndpointException", errorCode): + return awsAwsjson10_deserializeErrorInvalidEndpointException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpQuery struct { +} + +func (*awsAwsjson10_deserializeOpQuery) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpQuery) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorQuery(response, &metadata) + } + output := &QueryOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentQueryOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorQuery(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidEndpointException", errorCode): + return awsAwsjson10_deserializeErrorInvalidEndpointException(response, errorBody) + + case strings.EqualFold("QueryExecutionException", errorCode): + return awsAwsjson10_deserializeErrorQueryExecutionException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpTagResource struct { +} + +func (*awsAwsjson10_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorTagResource(response, &metadata) + } + output := &TagResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentTagResourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidEndpointException", errorCode): + return awsAwsjson10_deserializeErrorInvalidEndpointException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUntagResource struct { +} + +func (*awsAwsjson10_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorUntagResource(response, &metadata) + } + output := &UntagResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentUntagResourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidEndpointException", errorCode): + return awsAwsjson10_deserializeErrorInvalidEndpointException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUpdateScheduledQuery struct { +} + +func (*awsAwsjson10_deserializeOpUpdateScheduledQuery) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdateScheduledQuery) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorUpdateScheduledQuery(response, &metadata) + } + output := &UpdateScheduledQueryOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorUpdateScheduledQuery(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidEndpointException", errorCode): + return awsAwsjson10_deserializeErrorInvalidEndpointException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsAwsjson10_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.AccessDeniedException{} + err := awsAwsjson10_deserializeDocumentAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ConflictException{} + err := awsAwsjson10_deserializeDocumentConflictException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InternalServerException{} + err := awsAwsjson10_deserializeDocumentInternalServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorInvalidEndpointException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidEndpointException{} + err := awsAwsjson10_deserializeDocumentInvalidEndpointException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorQueryExecutionException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.QueryExecutionException{} + err := awsAwsjson10_deserializeDocumentQueryExecutionException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ResourceNotFoundException{} + err := awsAwsjson10_deserializeDocumentResourceNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ServiceQuotaExceededException{} + err := awsAwsjson10_deserializeDocumentServiceQuotaExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ThrottlingException{} + err := awsAwsjson10_deserializeDocumentThrottlingException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ValidationException{} + err := awsAwsjson10_deserializeDocumentValidationException(&output, shape) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -598,42 +1881,1759 @@ func awsAwsjson10_deserializeErrorThrottlingException(response *smithyhttp.Respo return output } -func awsAwsjson10_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) +func awsAwsjson10_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentColumnInfo(v **types.ColumnInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ColumnInfo + if *v == nil { + sv = &types.ColumnInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Type": + if err := awsAwsjson10_deserializeDocumentType(&sv.Type, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentColumnInfoList(v *[]types.ColumnInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ColumnInfo + if *v == nil { + cv = []types.ColumnInfo{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ColumnInfo + destAddr := &col + if err := awsAwsjson10_deserializeDocumentColumnInfo(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConflictException + if *v == nil { + sv = &types.ConflictException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentDatum(v **types.Datum, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Datum + if *v == nil { + sv = &types.Datum{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ArrayValue": + if err := awsAwsjson10_deserializeDocumentDatumList(&sv.ArrayValue, value); err != nil { + return err + } + + case "NullValue": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected NullableBoolean to be of type *bool, got %T instead", value) + } + sv.NullValue = ptr.Bool(jtv) + } + + case "RowValue": + if err := awsAwsjson10_deserializeDocumentRow(&sv.RowValue, value); err != nil { + return err + } + + case "ScalarValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScalarValue to be of type string, got %T instead", value) + } + sv.ScalarValue = ptr.String(jtv) + } + + case "TimeSeriesValue": + if err := awsAwsjson10_deserializeDocumentTimeSeriesDataPointList(&sv.TimeSeriesValue, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentDatumList(v *[]types.Datum, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Datum + if *v == nil { + cv = []types.Datum{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Datum + destAddr := &col + if err := awsAwsjson10_deserializeDocumentDatum(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentDimensionMapping(v **types.DimensionMapping, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DimensionMapping + if *v == nil { + sv = &types.DimensionMapping{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DimensionValueType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DimensionValueType to be of type string, got %T instead", value) + } + sv.DimensionValueType = types.DimensionValueType(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SchemaName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentDimensionMappingList(v *[]types.DimensionMapping, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.DimensionMapping + if *v == nil { + cv = []types.DimensionMapping{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DimensionMapping + destAddr := &col + if err := awsAwsjson10_deserializeDocumentDimensionMapping(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentEndpoint(v **types.Endpoint, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Endpoint + if *v == nil { + sv = &types.Endpoint{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Address": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Address = ptr.String(jtv) + } + + case "CachePeriodInMinutes": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CachePeriodInMinutes = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentEndpoints(v *[]types.Endpoint, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Endpoint + if *v == nil { + cv = []types.Endpoint{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Endpoint + destAddr := &col + if err := awsAwsjson10_deserializeDocumentEndpoint(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentErrorReportConfiguration(v **types.ErrorReportConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ErrorReportConfiguration + if *v == nil { + sv = &types.ErrorReportConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "S3Configuration": + if err := awsAwsjson10_deserializeDocumentS3Configuration(&sv.S3Configuration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentErrorReportLocation(v **types.ErrorReportLocation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ErrorReportLocation + if *v == nil { + sv = &types.ErrorReportLocation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "S3ReportLocation": + if err := awsAwsjson10_deserializeDocumentS3ReportLocation(&sv.S3ReportLocation, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentExecutionStats(v **types.ExecutionStats, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ExecutionStats + if *v == nil { + sv = &types.ExecutionStats{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BytesMetered": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BytesMetered = i64 + } + + case "DataWrites": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DataWrites = i64 + } + + case "ExecutionTimeInMillis": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ExecutionTimeInMillis = i64 + } + + case "QueryResultRows": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.QueryResultRows = i64 + } + + case "RecordsIngested": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RecordsIngested = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InternalServerException + if *v == nil { + sv = &types.InternalServerException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentInvalidEndpointException(v **types.InvalidEndpointException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidEndpointException + if *v == nil { + sv = &types.InvalidEndpointException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentMixedMeasureMapping(v **types.MixedMeasureMapping, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MixedMeasureMapping + if *v == nil { + sv = &types.MixedMeasureMapping{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "MeasureName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SchemaName to be of type string, got %T instead", value) + } + sv.MeasureName = ptr.String(jtv) + } + + case "MeasureValueType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MeasureValueType to be of type string, got %T instead", value) + } + sv.MeasureValueType = types.MeasureValueType(jtv) + } + + case "MultiMeasureAttributeMappings": + if err := awsAwsjson10_deserializeDocumentMultiMeasureAttributeMappingList(&sv.MultiMeasureAttributeMappings, value); err != nil { + return err + } + + case "SourceColumn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SchemaName to be of type string, got %T instead", value) + } + sv.SourceColumn = ptr.String(jtv) + } + + case "TargetMeasureName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SchemaName to be of type string, got %T instead", value) + } + sv.TargetMeasureName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentMixedMeasureMappingList(v *[]types.MixedMeasureMapping, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.MixedMeasureMapping + if *v == nil { + cv = []types.MixedMeasureMapping{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MixedMeasureMapping + destAddr := &col + if err := awsAwsjson10_deserializeDocumentMixedMeasureMapping(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentMultiMeasureAttributeMapping(v **types.MultiMeasureAttributeMapping, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MultiMeasureAttributeMapping + if *v == nil { + sv = &types.MultiMeasureAttributeMapping{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "MeasureValueType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScalarMeasureValueType to be of type string, got %T instead", value) + } + sv.MeasureValueType = types.ScalarMeasureValueType(jtv) + } + + case "SourceColumn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SchemaName to be of type string, got %T instead", value) + } + sv.SourceColumn = ptr.String(jtv) + } + + case "TargetMultiMeasureAttributeName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SchemaName to be of type string, got %T instead", value) + } + sv.TargetMultiMeasureAttributeName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentMultiMeasureAttributeMappingList(v *[]types.MultiMeasureAttributeMapping, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.MultiMeasureAttributeMapping + if *v == nil { + cv = []types.MultiMeasureAttributeMapping{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MultiMeasureAttributeMapping + destAddr := &col + if err := awsAwsjson10_deserializeDocumentMultiMeasureAttributeMapping(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentMultiMeasureMappings(v **types.MultiMeasureMappings, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MultiMeasureMappings + if *v == nil { + sv = &types.MultiMeasureMappings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "MultiMeasureAttributeMappings": + if err := awsAwsjson10_deserializeDocumentMultiMeasureAttributeMappingList(&sv.MultiMeasureAttributeMappings, value); err != nil { + return err + } + + case "TargetMultiMeasureName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SchemaName to be of type string, got %T instead", value) + } + sv.TargetMultiMeasureName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentNotificationConfiguration(v **types.NotificationConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.NotificationConfiguration + if *v == nil { + sv = &types.NotificationConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "SnsConfiguration": + if err := awsAwsjson10_deserializeDocumentSnsConfiguration(&sv.SnsConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentParameterMapping(v **types.ParameterMapping, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ParameterMapping + if *v == nil { + sv = &types.ParameterMapping{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Type": + if err := awsAwsjson10_deserializeDocumentType(&sv.Type, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentParameterMappingList(v *[]types.ParameterMapping, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ParameterMapping + if *v == nil { + cv = []types.ParameterMapping{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ParameterMapping + destAddr := &col + if err := awsAwsjson10_deserializeDocumentParameterMapping(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentQueryExecutionException(v **types.QueryExecutionException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.QueryExecutionException + if *v == nil { + sv = &types.QueryExecutionException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentQueryStatus(v **types.QueryStatus, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.QueryStatus + if *v == nil { + sv = &types.QueryStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CumulativeBytesMetered": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CumulativeBytesMetered = i64 + } + + case "CumulativeBytesScanned": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CumulativeBytesScanned = i64 + } + + case "ProgressPercentage": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ProgressPercentage = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.ProgressPercentage = f64 + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceNotFoundException + if *v == nil { + sv = &types.ResourceNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "ScheduledQueryArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AmazonResourceName to be of type string, got %T instead", value) + } + sv.ScheduledQueryArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentRow(v **types.Row, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Row + if *v == nil { + sv = &types.Row{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Data": + if err := awsAwsjson10_deserializeDocumentDatumList(&sv.Data, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentRowList(v *[]types.Row, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Row + if *v == nil { + cv = []types.Row{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Row + destAddr := &col + if err := awsAwsjson10_deserializeDocumentRow(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentS3Configuration(v **types.S3Configuration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.S3Configuration + if *v == nil { + sv = &types.S3Configuration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BucketName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3BucketName to be of type string, got %T instead", value) + } + sv.BucketName = ptr.String(jtv) + } + + case "EncryptionOption": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3EncryptionOption to be of type string, got %T instead", value) + } + sv.EncryptionOption = types.S3EncryptionOption(jtv) + } + + case "ObjectKeyPrefix": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3ObjectKeyPrefix to be of type string, got %T instead", value) + } + sv.ObjectKeyPrefix = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentS3ReportLocation(v **types.S3ReportLocation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.S3ReportLocation + if *v == nil { + sv = &types.S3ReportLocation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BucketName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3BucketName to be of type string, got %T instead", value) + } + sv.BucketName = ptr.String(jtv) + } + + case "ObjectKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3ObjectKey to be of type string, got %T instead", value) + } + sv.ObjectKey = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentScheduleConfiguration(v **types.ScheduleConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ScheduleConfiguration + if *v == nil { + sv = &types.ScheduleConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ScheduleExpression": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduleExpression to be of type string, got %T instead", value) + } + sv.ScheduleExpression = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentScheduledQuery(v **types.ScheduledQuery, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ScheduledQuery + if *v == nil { + sv = &types.ScheduledQuery{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AmazonResourceName to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "CreationTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Time to be a JSON Number, got %T instead", value) + + } + } + + case "ErrorReportConfiguration": + if err := awsAwsjson10_deserializeDocumentErrorReportConfiguration(&sv.ErrorReportConfiguration, value); err != nil { + return err + } + + case "LastRunStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduledQueryRunStatus to be of type string, got %T instead", value) + } + sv.LastRunStatus = types.ScheduledQueryRunStatus(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduledQueryName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "NextInvocationTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.NextInvocationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Time to be a JSON Number, got %T instead", value) + + } + } + + case "PreviousInvocationTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.PreviousInvocationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Time to be a JSON Number, got %T instead", value) + + } + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduledQueryState to be of type string, got %T instead", value) + } + sv.State = types.ScheduledQueryState(jtv) + } + + case "TargetDestination": + if err := awsAwsjson10_deserializeDocumentTargetDestination(&sv.TargetDestination, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentScheduledQueryDescription(v **types.ScheduledQueryDescription, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + var sv *types.ScheduledQueryDescription + if *v == nil { + sv = &types.ScheduledQueryDescription{} + } else { + sv = *v } - output := &types.ValidationException{} - err := awsAwsjson10_deserializeDocumentValidationException(&output, shape) + for key, value := range shape { + switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AmazonResourceName to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "CreationTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Time to be a JSON Number, got %T instead", value) + + } + } + + case "ErrorReportConfiguration": + if err := awsAwsjson10_deserializeDocumentErrorReportConfiguration(&sv.ErrorReportConfiguration, value); err != nil { + return err + } + + case "KmsKeyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringValue2048 to be of type string, got %T instead", value) + } + sv.KmsKeyId = ptr.String(jtv) + } + + case "LastRunSummary": + if err := awsAwsjson10_deserializeDocumentScheduledQueryRunSummary(&sv.LastRunSummary, value); err != nil { + return err + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduledQueryName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "NextInvocationTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.NextInvocationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Time to be a JSON Number, got %T instead", value) + + } + } + + case "NotificationConfiguration": + if err := awsAwsjson10_deserializeDocumentNotificationConfiguration(&sv.NotificationConfiguration, value); err != nil { + return err + } + + case "PreviousInvocationTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.PreviousInvocationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Time to be a JSON Number, got %T instead", value) + + } + } + + case "QueryString": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QueryString to be of type string, got %T instead", value) + } + sv.QueryString = ptr.String(jtv) + } + + case "RecentlyFailedRuns": + if err := awsAwsjson10_deserializeDocumentScheduledQueryRunSummaryList(&sv.RecentlyFailedRuns, value); err != nil { + return err + } + + case "ScheduleConfiguration": + if err := awsAwsjson10_deserializeDocumentScheduleConfiguration(&sv.ScheduleConfiguration, value); err != nil { + return err + } + + case "ScheduledQueryExecutionRoleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AmazonResourceName to be of type string, got %T instead", value) + } + sv.ScheduledQueryExecutionRoleArn = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduledQueryState to be of type string, got %T instead", value) + } + sv.State = types.ScheduledQueryState(jtv) + } + + case "TargetConfiguration": + if err := awsAwsjson10_deserializeDocumentTargetConfiguration(&sv.TargetConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), } - return err } + *v = sv + return nil +} - errorBody.Seek(0, io.SeekStart) - return output +func awsAwsjson10_deserializeDocumentScheduledQueryList(v *[]types.ScheduledQuery, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ScheduledQuery + if *v == nil { + cv = []types.ScheduledQuery{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ScheduledQuery + destAddr := &col + if err := awsAwsjson10_deserializeDocumentScheduledQuery(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil } -func awsAwsjson10_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { +func awsAwsjson10_deserializeDocumentScheduledQueryRunSummary(v **types.ScheduledQueryRunSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -646,22 +3646,73 @@ func awsAwsjson10_deserializeDocumentAccessDeniedException(v **types.AccessDenie return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AccessDeniedException + var sv *types.ScheduledQueryRunSummary if *v == nil { - sv = &types.AccessDeniedException{} + sv = &types.ScheduledQueryRunSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "Message": + case "ErrorReportLocation": + if err := awsAwsjson10_deserializeDocumentErrorReportLocation(&sv.ErrorReportLocation, value); err != nil { + return err + } + + case "ExecutionStats": + if err := awsAwsjson10_deserializeDocumentExecutionStats(&sv.ExecutionStats, value); err != nil { + return err + } + + case "FailureReason": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ServiceErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.FailureReason = ptr.String(jtv) + } + + case "InvocationTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.InvocationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Time to be a JSON Number, got %T instead", value) + + } + } + + case "RunStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduledQueryRunStatus to be of type string, got %T instead", value) + } + sv.RunStatus = types.ScheduledQueryRunStatus(jtv) + } + + case "TriggerTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.TriggerTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Time to be a JSON Number, got %T instead", value) + } - sv.Message = ptr.String(jtv) } default: @@ -673,7 +3724,41 @@ func awsAwsjson10_deserializeDocumentAccessDeniedException(v **types.AccessDenie return nil } -func awsAwsjson10_deserializeDocumentColumnInfo(v **types.ColumnInfo, value interface{}) error { +func awsAwsjson10_deserializeDocumentScheduledQueryRunSummaryList(v *[]types.ScheduledQueryRunSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ScheduledQueryRunSummary + if *v == nil { + cv = []types.ScheduledQueryRunSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ScheduledQueryRunSummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentScheduledQueryRunSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentSelectColumn(v **types.SelectColumn, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -686,15 +3771,33 @@ func awsAwsjson10_deserializeDocumentColumnInfo(v **types.ColumnInfo, value inte return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ColumnInfo + var sv *types.SelectColumn if *v == nil { - sv = &types.ColumnInfo{} + sv = &types.SelectColumn{} } else { sv = *v } - for key, value := range shape { - switch key { + for key, value := range shape { + switch key { + case "Aliased": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected NullableBoolean to be of type *bool, got %T instead", value) + } + sv.Aliased = ptr.Bool(jtv) + } + + case "DatabaseName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + } + sv.DatabaseName = ptr.String(jtv) + } + case "Name": if value != nil { jtv, ok := value.(string) @@ -704,6 +3807,15 @@ func awsAwsjson10_deserializeDocumentColumnInfo(v **types.ColumnInfo, value inte sv.Name = ptr.String(jtv) } + case "TableName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + } + sv.TableName = ptr.String(jtv) + } + case "Type": if err := awsAwsjson10_deserializeDocumentType(&sv.Type, value); err != nil { return err @@ -718,7 +3830,7 @@ func awsAwsjson10_deserializeDocumentColumnInfo(v **types.ColumnInfo, value inte return nil } -func awsAwsjson10_deserializeDocumentColumnInfoList(v *[]types.ColumnInfo, value interface{}) error { +func awsAwsjson10_deserializeDocumentSelectColumnList(v *[]types.SelectColumn, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -731,17 +3843,17 @@ func awsAwsjson10_deserializeDocumentColumnInfoList(v *[]types.ColumnInfo, value return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ColumnInfo + var cv []types.SelectColumn if *v == nil { - cv = []types.ColumnInfo{} + cv = []types.SelectColumn{} } else { cv = *v } for _, value := range shape { - var col types.ColumnInfo + var col types.SelectColumn destAddr := &col - if err := awsAwsjson10_deserializeDocumentColumnInfo(&destAddr, value); err != nil { + if err := awsAwsjson10_deserializeDocumentSelectColumn(&destAddr, value); err != nil { return err } col = *destAddr @@ -752,7 +3864,7 @@ func awsAwsjson10_deserializeDocumentColumnInfoList(v *[]types.ColumnInfo, value return nil } -func awsAwsjson10_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { +func awsAwsjson10_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -765,9 +3877,9 @@ func awsAwsjson10_deserializeDocumentConflictException(v **types.ConflictExcepti return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ConflictException + var sv *types.ServiceQuotaExceededException if *v == nil { - sv = &types.ConflictException{} + sv = &types.ServiceQuotaExceededException{} } else { sv = *v } @@ -792,7 +3904,7 @@ func awsAwsjson10_deserializeDocumentConflictException(v **types.ConflictExcepti return nil } -func awsAwsjson10_deserializeDocumentDatum(v **types.Datum, value interface{}) error { +func awsAwsjson10_deserializeDocumentSnsConfiguration(v **types.SnsConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -805,46 +3917,71 @@ func awsAwsjson10_deserializeDocumentDatum(v **types.Datum, value interface{}) e return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Datum + var sv *types.SnsConfiguration if *v == nil { - sv = &types.Datum{} + sv = &types.SnsConfiguration{} } else { sv = *v } for key, value := range shape { switch key { - case "ArrayValue": - if err := awsAwsjson10_deserializeDocumentDatumList(&sv.ArrayValue, value); err != nil { - return err - } - - case "NullValue": + case "TopicArn": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NullableBoolean to be of type *bool, got %T instead", value) + return fmt.Errorf("expected AmazonResourceName to be of type string, got %T instead", value) } - sv.NullValue = ptr.Bool(jtv) + sv.TopicArn = ptr.String(jtv) } - case "RowValue": - if err := awsAwsjson10_deserializeDocumentRow(&sv.RowValue, value); err != nil { - return err - } + default: + _, _ = key, value - case "ScalarValue": + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentTag(v **types.Tag, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Tag + if *v == nil { + sv = &types.Tag{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Key": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ScalarValue to be of type string, got %T instead", value) + return fmt.Errorf("expected TagKey to be of type string, got %T instead", value) } - sv.ScalarValue = ptr.String(jtv) + sv.Key = ptr.String(jtv) } - case "TimeSeriesValue": - if err := awsAwsjson10_deserializeDocumentTimeSeriesDataPointList(&sv.TimeSeriesValue, value); err != nil { - return err + case "Value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) } default: @@ -856,7 +3993,7 @@ func awsAwsjson10_deserializeDocumentDatum(v **types.Datum, value interface{}) e return nil } -func awsAwsjson10_deserializeDocumentDatumList(v *[]types.Datum, value interface{}) error { +func awsAwsjson10_deserializeDocumentTagList(v *[]types.Tag, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -869,17 +4006,17 @@ func awsAwsjson10_deserializeDocumentDatumList(v *[]types.Datum, value interface return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.Datum + var cv []types.Tag if *v == nil { - cv = []types.Datum{} + cv = []types.Tag{} } else { cv = *v } for _, value := range shape { - var col types.Datum + var col types.Tag destAddr := &col - if err := awsAwsjson10_deserializeDocumentDatum(&destAddr, value); err != nil { + if err := awsAwsjson10_deserializeDocumentTag(&destAddr, value); err != nil { return err } col = *destAddr @@ -890,7 +4027,7 @@ func awsAwsjson10_deserializeDocumentDatumList(v *[]types.Datum, value interface return nil } -func awsAwsjson10_deserializeDocumentEndpoint(v **types.Endpoint, value interface{}) error { +func awsAwsjson10_deserializeDocumentTargetConfiguration(v **types.TargetConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -903,35 +4040,18 @@ func awsAwsjson10_deserializeDocumentEndpoint(v **types.Endpoint, value interfac return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Endpoint + var sv *types.TargetConfiguration if *v == nil { - sv = &types.Endpoint{} + sv = &types.TargetConfiguration{} } else { sv = *v } for key, value := range shape { switch key { - case "Address": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Address = ptr.String(jtv) - } - - case "CachePeriodInMinutes": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected Long to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.CachePeriodInMinutes = i64 + case "TimestreamConfiguration": + if err := awsAwsjson10_deserializeDocumentTimestreamConfiguration(&sv.TimestreamConfiguration, value); err != nil { + return err } default: @@ -943,7 +4063,7 @@ func awsAwsjson10_deserializeDocumentEndpoint(v **types.Endpoint, value interfac return nil } -func awsAwsjson10_deserializeDocumentEndpoints(v *[]types.Endpoint, value interface{}) error { +func awsAwsjson10_deserializeDocumentTargetDestination(v **types.TargetDestination, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -951,33 +4071,35 @@ func awsAwsjson10_deserializeDocumentEndpoints(v *[]types.Endpoint, value interf return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.Endpoint + var sv *types.TargetDestination if *v == nil { - cv = []types.Endpoint{} + sv = &types.TargetDestination{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.Endpoint - destAddr := &col - if err := awsAwsjson10_deserializeDocumentEndpoint(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "TimestreamDestination": + if err := awsAwsjson10_deserializeDocumentTimestreamDestination(&sv.TimestreamDestination, value); err != nil { + return err + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsAwsjson10_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { +func awsAwsjson10_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -990,9 +4112,9 @@ func awsAwsjson10_deserializeDocumentInternalServerException(v **types.InternalS return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InternalServerException + var sv *types.ThrottlingException if *v == nil { - sv = &types.InternalServerException{} + sv = &types.ThrottlingException{} } else { sv = *v } @@ -1017,7 +4139,7 @@ func awsAwsjson10_deserializeDocumentInternalServerException(v **types.InternalS return nil } -func awsAwsjson10_deserializeDocumentInvalidEndpointException(v **types.InvalidEndpointException, value interface{}) error { +func awsAwsjson10_deserializeDocumentTimeSeriesDataPoint(v **types.TimeSeriesDataPoint, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1030,22 +4152,27 @@ func awsAwsjson10_deserializeDocumentInvalidEndpointException(v **types.InvalidE return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidEndpointException + var sv *types.TimeSeriesDataPoint if *v == nil { - sv = &types.InvalidEndpointException{} + sv = &types.TimeSeriesDataPoint{} } else { sv = *v } for key, value := range shape { switch key { - case "Message": + case "Time": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.Time = ptr.String(jtv) + } + + case "Value": + if err := awsAwsjson10_deserializeDocumentDatum(&sv.Value, value); err != nil { + return err } default: @@ -1057,7 +4184,7 @@ func awsAwsjson10_deserializeDocumentInvalidEndpointException(v **types.InvalidE return nil } -func awsAwsjson10_deserializeDocumentQueryExecutionException(v **types.QueryExecutionException, value interface{}) error { +func awsAwsjson10_deserializeDocumentTimeSeriesDataPointList(v *[]types.TimeSeriesDataPoint, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1065,39 +4192,33 @@ func awsAwsjson10_deserializeDocumentQueryExecutionException(v **types.QueryExec return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.QueryExecutionException + var cv []types.TimeSeriesDataPoint if *v == nil { - sv = &types.QueryExecutionException{} + cv = []types.TimeSeriesDataPoint{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - + for _, value := range shape { + var col types.TimeSeriesDataPoint + destAddr := &col + if err := awsAwsjson10_deserializeDocumentTimeSeriesDataPoint(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson10_deserializeDocumentQueryStatus(v **types.QueryStatus, value interface{}) error { +func awsAwsjson10_deserializeDocumentTimestreamConfiguration(v **types.TimestreamConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1110,73 +4231,113 @@ func awsAwsjson10_deserializeDocumentQueryStatus(v **types.QueryStatus, value in return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.QueryStatus + var sv *types.TimestreamConfiguration if *v == nil { - sv = &types.QueryStatus{} + sv = &types.TimestreamConfiguration{} } else { sv = *v } for key, value := range shape { switch key { - case "CumulativeBytesMetered": + case "DatabaseName": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.CumulativeBytesMetered = i64 + sv.DatabaseName = ptr.String(jtv) } - case "CumulativeBytesScanned": + case "DimensionMappings": + if err := awsAwsjson10_deserializeDocumentDimensionMappingList(&sv.DimensionMappings, value); err != nil { + return err + } + + case "MeasureNameColumn": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Long to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected SchemaName to be of type string, got %T instead", value) } - sv.CumulativeBytesScanned = i64 + sv.MeasureNameColumn = ptr.String(jtv) } - case "ProgressPercentage": + case "MixedMeasureMappings": + if err := awsAwsjson10_deserializeDocumentMixedMeasureMappingList(&sv.MixedMeasureMappings, value); err != nil { + return err + } + + case "MultiMeasureMappings": + if err := awsAwsjson10_deserializeDocumentMultiMeasureMappings(&sv.MultiMeasureMappings, value); err != nil { + return err + } + + case "TableName": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.ProgressPercentage = f64 + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + } + sv.TableName = ptr.String(jtv) + } - case string: - var f64 float64 - switch { - case strings.EqualFold(jtv, "NaN"): - f64 = math.NaN() + case "TimeColumn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SchemaName to be of type string, got %T instead", value) + } + sv.TimeColumn = ptr.String(jtv) + } - case strings.EqualFold(jtv, "Infinity"): - f64 = math.Inf(1) + default: + _, _ = key, value - case strings.EqualFold(jtv, "-Infinity"): - f64 = math.Inf(-1) + } + } + *v = sv + return nil +} - default: - return fmt.Errorf("unknown JSON number value: %s", jtv) +func awsAwsjson10_deserializeDocumentTimestreamDestination(v **types.TimestreamDestination, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - } - sv.ProgressPercentage = f64 + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - default: - return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + var sv *types.TimestreamDestination + if *v == nil { + sv = &types.TimestreamDestination{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DatabaseName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + } + sv.DatabaseName = ptr.String(jtv) + } + case "TableName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } + sv.TableName = ptr.String(jtv) } default: @@ -1188,7 +4349,7 @@ func awsAwsjson10_deserializeDocumentQueryStatus(v **types.QueryStatus, value in return nil } -func awsAwsjson10_deserializeDocumentRow(v **types.Row, value interface{}) error { +func awsAwsjson10_deserializeDocumentType(v **types.Type, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1201,17 +4362,36 @@ func awsAwsjson10_deserializeDocumentRow(v **types.Row, value interface{}) error return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Row + var sv *types.Type if *v == nil { - sv = &types.Row{} + sv = &types.Type{} } else { sv = *v } for key, value := range shape { switch key { - case "Data": - if err := awsAwsjson10_deserializeDocumentDatumList(&sv.Data, value); err != nil { + case "ArrayColumnInfo": + if err := awsAwsjson10_deserializeDocumentColumnInfo(&sv.ArrayColumnInfo, value); err != nil { + return err + } + + case "RowColumnInfo": + if err := awsAwsjson10_deserializeDocumentColumnInfoList(&sv.RowColumnInfo, value); err != nil { + return err + } + + case "ScalarType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScalarType to be of type string, got %T instead", value) + } + sv.ScalarType = types.ScalarType(jtv) + } + + case "TimeSeriesMeasureValueColumnInfo": + if err := awsAwsjson10_deserializeDocumentColumnInfo(&sv.TimeSeriesMeasureValueColumnInfo, value); err != nil { return err } @@ -1224,7 +4404,7 @@ func awsAwsjson10_deserializeDocumentRow(v **types.Row, value interface{}) error return nil } -func awsAwsjson10_deserializeDocumentRowList(v *[]types.Row, value interface{}) error { +func awsAwsjson10_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1232,33 +4412,39 @@ func awsAwsjson10_deserializeDocumentRowList(v *[]types.Row, value interface{}) return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.Row + var sv *types.ValidationException if *v == nil { - cv = []types.Row{} + sv = &types.ValidationException{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.Row - destAddr := &col - if err := awsAwsjson10_deserializeDocumentRow(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } -func awsAwsjson10_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentCancelQueryOutput(v **CancelQueryOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1271,22 +4457,22 @@ func awsAwsjson10_deserializeDocumentThrottlingException(v **types.ThrottlingExc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ThrottlingException + var sv *CancelQueryOutput if *v == nil { - sv = &types.ThrottlingException{} + sv = &CancelQueryOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Message": + case "CancellationMessage": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.CancellationMessage = ptr.String(jtv) } default: @@ -1298,7 +4484,7 @@ func awsAwsjson10_deserializeDocumentThrottlingException(v **types.ThrottlingExc return nil } -func awsAwsjson10_deserializeDocumentTimeSeriesDataPoint(v **types.TimeSeriesDataPoint, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentCreateScheduledQueryOutput(v **CreateScheduledQueryOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1311,27 +4497,22 @@ func awsAwsjson10_deserializeDocumentTimeSeriesDataPoint(v **types.TimeSeriesDat return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.TimeSeriesDataPoint + var sv *CreateScheduledQueryOutput if *v == nil { - sv = &types.TimeSeriesDataPoint{} + sv = &CreateScheduledQueryOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Time": + case "Arn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + return fmt.Errorf("expected AmazonResourceName to be of type string, got %T instead", value) } - sv.Time = ptr.String(jtv) - } - - case "Value": - if err := awsAwsjson10_deserializeDocumentDatum(&sv.Value, value); err != nil { - return err + sv.Arn = ptr.String(jtv) } default: @@ -1343,7 +4524,7 @@ func awsAwsjson10_deserializeDocumentTimeSeriesDataPoint(v **types.TimeSeriesDat return nil } -func awsAwsjson10_deserializeDocumentTimeSeriesDataPointList(v *[]types.TimeSeriesDataPoint, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentDescribeEndpointsOutput(v **DescribeEndpointsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1351,33 +4532,35 @@ func awsAwsjson10_deserializeDocumentTimeSeriesDataPointList(v *[]types.TimeSeri return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.TimeSeriesDataPoint + var sv *DescribeEndpointsOutput if *v == nil { - cv = []types.TimeSeriesDataPoint{} + sv = &DescribeEndpointsOutput{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.TimeSeriesDataPoint - destAddr := &col - if err := awsAwsjson10_deserializeDocumentTimeSeriesDataPoint(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "Endpoints": + if err := awsAwsjson10_deserializeDocumentEndpoints(&sv.Endpoints, value); err != nil { + return err + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsAwsjson10_deserializeDocumentType(v **types.Type, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentDescribeScheduledQueryOutput(v **DescribeScheduledQueryOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1390,36 +4573,17 @@ func awsAwsjson10_deserializeDocumentType(v **types.Type, value interface{}) err return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Type + var sv *DescribeScheduledQueryOutput if *v == nil { - sv = &types.Type{} + sv = &DescribeScheduledQueryOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ArrayColumnInfo": - if err := awsAwsjson10_deserializeDocumentColumnInfo(&sv.ArrayColumnInfo, value); err != nil { - return err - } - - case "RowColumnInfo": - if err := awsAwsjson10_deserializeDocumentColumnInfoList(&sv.RowColumnInfo, value); err != nil { - return err - } - - case "ScalarType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ScalarType to be of type string, got %T instead", value) - } - sv.ScalarType = types.ScalarType(jtv) - } - - case "TimeSeriesMeasureValueColumnInfo": - if err := awsAwsjson10_deserializeDocumentColumnInfo(&sv.TimeSeriesMeasureValueColumnInfo, value); err != nil { + case "ScheduledQuery": + if err := awsAwsjson10_deserializeDocumentScheduledQueryDescription(&sv.ScheduledQuery, value); err != nil { return err } @@ -1432,7 +4596,7 @@ func awsAwsjson10_deserializeDocumentType(v **types.Type, value interface{}) err return nil } -func awsAwsjson10_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentListScheduledQueriesOutput(v **ListScheduledQueriesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1445,22 +4609,27 @@ func awsAwsjson10_deserializeDocumentValidationException(v **types.ValidationExc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ValidationException + var sv *ListScheduledQueriesOutput if *v == nil { - sv = &types.ValidationException{} + sv = &ListScheduledQueriesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Message": + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected NextScheduledQueriesResultsToken to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) + } + + case "ScheduledQueries": + if err := awsAwsjson10_deserializeDocumentScheduledQueryList(&sv.ScheduledQueries, value); err != nil { + return err } default: @@ -1472,7 +4641,7 @@ func awsAwsjson10_deserializeDocumentValidationException(v **types.ValidationExc return nil } -func awsAwsjson10_deserializeOpDocumentCancelQueryOutput(v **CancelQueryOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1485,22 +4654,27 @@ func awsAwsjson10_deserializeOpDocumentCancelQueryOutput(v **CancelQueryOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CancelQueryOutput + var sv *ListTagsForResourceOutput if *v == nil { - sv = &CancelQueryOutput{} + sv = &ListTagsForResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "CancellationMessage": + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected NextTagsForResourceResultsToken to be of type string, got %T instead", value) } - sv.CancellationMessage = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) + } + + case "Tags": + if err := awsAwsjson10_deserializeDocumentTagList(&sv.Tags, value); err != nil { + return err } default: @@ -1512,7 +4686,7 @@ func awsAwsjson10_deserializeOpDocumentCancelQueryOutput(v **CancelQueryOutput, return nil } -func awsAwsjson10_deserializeOpDocumentDescribeEndpointsOutput(v **DescribeEndpointsOutput, value interface{}) error { +func awsAwsjson10_deserializeOpDocumentPrepareQueryOutput(v **PrepareQueryOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1525,20 +4699,34 @@ func awsAwsjson10_deserializeOpDocumentDescribeEndpointsOutput(v **DescribeEndpo return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeEndpointsOutput + var sv *PrepareQueryOutput if *v == nil { - sv = &DescribeEndpointsOutput{} + sv = &PrepareQueryOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Endpoints": - if err := awsAwsjson10_deserializeDocumentEndpoints(&sv.Endpoints, value); err != nil { + case "Columns": + if err := awsAwsjson10_deserializeDocumentSelectColumnList(&sv.Columns, value); err != nil { + return err + } + + case "Parameters": + if err := awsAwsjson10_deserializeDocumentParameterMappingList(&sv.Parameters, value); err != nil { return err } + case "QueryString": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QueryString to be of type string, got %T instead", value) + } + sv.QueryString = ptr.String(jtv) + } + default: _, _ = key, value @@ -1579,7 +4767,7 @@ func awsAwsjson10_deserializeOpDocumentQueryOutput(v **QueryOutput, value interf if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } @@ -1611,3 +4799,65 @@ func awsAwsjson10_deserializeOpDocumentQueryOutput(v **QueryOutput, value interf *v = sv return nil } + +func awsAwsjson10_deserializeOpDocumentTagResourceOutput(v **TagResourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *TagResourceOutput + if *v == nil { + sv = &TagResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentUntagResourceOutput(v **UntagResourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UntagResourceOutput + if *v == nil { + sv = &UntagResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} diff --git a/service/timestreamquery/doc.go b/service/timestreamquery/doc.go index ae75d9af34c..070d329da70 100644 --- a/service/timestreamquery/doc.go +++ b/service/timestreamquery/doc.go @@ -3,5 +3,5 @@ // Package timestreamquery provides the API client, operations, and parameter types // for Amazon Timestream Query. // -// +// Amazon Timestream Query package timestreamquery diff --git a/service/timestreamquery/generated.json b/service/timestreamquery/generated.json index 658524ae211..0ea56d6046d 100644 --- a/service/timestreamquery/generated.json +++ b/service/timestreamquery/generated.json @@ -9,8 +9,18 @@ "files": [ "api_client.go", "api_op_CancelQuery.go", + "api_op_CreateScheduledQuery.go", + "api_op_DeleteScheduledQuery.go", "api_op_DescribeEndpoints.go", + "api_op_DescribeScheduledQuery.go", + "api_op_ExecuteScheduledQuery.go", + "api_op_ListScheduledQueries.go", + "api_op_ListTagsForResource.go", + "api_op_PrepareQuery.go", "api_op_Query.go", + "api_op_TagResource.go", + "api_op_UntagResource.go", + "api_op_UpdateScheduledQuery.go", "deserializers.go", "doc.go", "endpoints.go", diff --git a/service/timestreamquery/serializers.go b/service/timestreamquery/serializers.go index a8c5ca2d92c..c008e262f8c 100644 --- a/service/timestreamquery/serializers.go +++ b/service/timestreamquery/serializers.go @@ -6,10 +6,12 @@ import ( "bytes" "context" "fmt" + "github.com/aws/aws-sdk-go-v2/service/timestreamquery/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" + smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "path" ) @@ -69,6 +71,116 @@ func (m *awsAwsjson10_serializeOpCancelQuery) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpCreateScheduledQuery struct { +} + +func (*awsAwsjson10_serializeOpCreateScheduledQuery) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpCreateScheduledQuery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateScheduledQueryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Timestream_20181101.CreateScheduledQuery") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentCreateScheduledQueryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpDeleteScheduledQuery struct { +} + +func (*awsAwsjson10_serializeOpDeleteScheduledQuery) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpDeleteScheduledQuery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteScheduledQueryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Timestream_20181101.DeleteScheduledQuery") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentDeleteScheduledQueryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpDescribeEndpoints struct { } @@ -124,14 +236,14 @@ func (m *awsAwsjson10_serializeOpDescribeEndpoints) HandleSerialize(ctx context. return next.HandleSerialize(ctx, in) } -type awsAwsjson10_serializeOpQuery struct { +type awsAwsjson10_serializeOpDescribeScheduledQuery struct { } -func (*awsAwsjson10_serializeOpQuery) ID() string { +func (*awsAwsjson10_serializeOpDescribeScheduledQuery) ID() string { return "OperationSerializer" } -func (m *awsAwsjson10_serializeOpQuery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson10_serializeOpDescribeScheduledQuery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -139,7 +251,7 @@ func (m *awsAwsjson10_serializeOpQuery) HandleSerialize(ctx context.Context, in return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*QueryInput) + input, ok := in.Parameters.(*DescribeScheduledQueryInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -160,10 +272,10 @@ func (m *awsAwsjson10_serializeOpQuery) HandleSerialize(ctx context.Context, in return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") - httpBindingEncoder.SetHeader("X-Amz-Target").String("Timestream_20181101.Query") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Timestream_20181101.DescribeScheduledQuery") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson10_serializeOpDocumentQueryInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson10_serializeOpDocumentDescribeScheduledQueryInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -178,47 +290,1019 @@ func (m *awsAwsjson10_serializeOpQuery) HandleSerialize(ctx context.Context, in return next.HandleSerialize(ctx, in) } -func awsAwsjson10_serializeOpDocumentCancelQueryInput(v *CancelQueryInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - if v.QueryId != nil { - ok := object.Key("QueryId") - ok.String(*v.QueryId) +type awsAwsjson10_serializeOpExecuteScheduledQuery struct { +} + +func (*awsAwsjson10_serializeOpExecuteScheduledQuery) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpExecuteScheduledQuery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - return nil + input, ok := in.Parameters.(*ExecuteScheduledQueryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Timestream_20181101.ExecuteScheduledQuery") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentExecuteScheduledQueryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) } -func awsAwsjson10_serializeOpDocumentDescribeEndpointsInput(v *DescribeEndpointsInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() +type awsAwsjson10_serializeOpListScheduledQueries struct { +} - return nil +func (*awsAwsjson10_serializeOpListScheduledQueries) ID() string { + return "OperationSerializer" } -func awsAwsjson10_serializeOpDocumentQueryInput(v *QueryInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() +func (m *awsAwsjson10_serializeOpListScheduledQueries) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } - if v.ClientToken != nil { - ok := object.Key("ClientToken") - ok.String(*v.ClientToken) + input, ok := in.Parameters.(*ListScheduledQueriesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - if v.MaxRows != nil { - ok := object.Key("MaxRows") - ok.Integer(*v.MaxRows) + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Timestream_20181101.ListScheduledQueries") - if v.NextToken != nil { - ok := object.Key("NextToken") - ok.String(*v.NextToken) + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListScheduledQueriesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} } - if v.QueryString != nil { - ok := object.Key("QueryString") - ok.String(*v.QueryString) + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpListTagsForResource struct { +} + +func (*awsAwsjson10_serializeOpListTagsForResource) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListTagsForResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Timestream_20181101.ListTagsForResource") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListTagsForResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpPrepareQuery struct { +} + +func (*awsAwsjson10_serializeOpPrepareQuery) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpPrepareQuery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PrepareQueryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Timestream_20181101.PrepareQuery") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentPrepareQueryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpQuery struct { +} + +func (*awsAwsjson10_serializeOpQuery) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpQuery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*QueryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Timestream_20181101.Query") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentQueryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpTagResource struct { +} + +func (*awsAwsjson10_serializeOpTagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*TagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Timestream_20181101.TagResource") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpUntagResource struct { +} + +func (*awsAwsjson10_serializeOpUntagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UntagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Timestream_20181101.UntagResource") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentUntagResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpUpdateScheduledQuery struct { +} + +func (*awsAwsjson10_serializeOpUpdateScheduledQuery) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpUpdateScheduledQuery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateScheduledQueryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Timestream_20181101.UpdateScheduledQuery") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentUpdateScheduledQueryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsAwsjson10_serializeDocumentDimensionMapping(v *types.DimensionMapping, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.DimensionValueType) > 0 { + ok := object.Key("DimensionValueType") + ok.String(string(v.DimensionValueType)) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + return nil +} + +func awsAwsjson10_serializeDocumentDimensionMappingList(v []types.DimensionMapping, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentDimensionMapping(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentErrorReportConfiguration(v *types.ErrorReportConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.S3Configuration != nil { + ok := object.Key("S3Configuration") + if err := awsAwsjson10_serializeDocumentS3Configuration(v.S3Configuration, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeDocumentMixedMeasureMapping(v *types.MixedMeasureMapping, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MeasureName != nil { + ok := object.Key("MeasureName") + ok.String(*v.MeasureName) + } + + if len(v.MeasureValueType) > 0 { + ok := object.Key("MeasureValueType") + ok.String(string(v.MeasureValueType)) + } + + if v.MultiMeasureAttributeMappings != nil { + ok := object.Key("MultiMeasureAttributeMappings") + if err := awsAwsjson10_serializeDocumentMultiMeasureAttributeMappingList(v.MultiMeasureAttributeMappings, ok); err != nil { + return err + } + } + + if v.SourceColumn != nil { + ok := object.Key("SourceColumn") + ok.String(*v.SourceColumn) + } + + if v.TargetMeasureName != nil { + ok := object.Key("TargetMeasureName") + ok.String(*v.TargetMeasureName) + } + + return nil +} + +func awsAwsjson10_serializeDocumentMixedMeasureMappingList(v []types.MixedMeasureMapping, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentMixedMeasureMapping(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentMultiMeasureAttributeMapping(v *types.MultiMeasureAttributeMapping, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.MeasureValueType) > 0 { + ok := object.Key("MeasureValueType") + ok.String(string(v.MeasureValueType)) + } + + if v.SourceColumn != nil { + ok := object.Key("SourceColumn") + ok.String(*v.SourceColumn) + } + + if v.TargetMultiMeasureAttributeName != nil { + ok := object.Key("TargetMultiMeasureAttributeName") + ok.String(*v.TargetMultiMeasureAttributeName) + } + + return nil +} + +func awsAwsjson10_serializeDocumentMultiMeasureAttributeMappingList(v []types.MultiMeasureAttributeMapping, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentMultiMeasureAttributeMapping(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentMultiMeasureMappings(v *types.MultiMeasureMappings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MultiMeasureAttributeMappings != nil { + ok := object.Key("MultiMeasureAttributeMappings") + if err := awsAwsjson10_serializeDocumentMultiMeasureAttributeMappingList(v.MultiMeasureAttributeMappings, ok); err != nil { + return err + } + } + + if v.TargetMultiMeasureName != nil { + ok := object.Key("TargetMultiMeasureName") + ok.String(*v.TargetMultiMeasureName) + } + + return nil +} + +func awsAwsjson10_serializeDocumentNotificationConfiguration(v *types.NotificationConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SnsConfiguration != nil { + ok := object.Key("SnsConfiguration") + if err := awsAwsjson10_serializeDocumentSnsConfiguration(v.SnsConfiguration, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeDocumentS3Configuration(v *types.S3Configuration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BucketName != nil { + ok := object.Key("BucketName") + ok.String(*v.BucketName) + } + + if len(v.EncryptionOption) > 0 { + ok := object.Key("EncryptionOption") + ok.String(string(v.EncryptionOption)) + } + + if v.ObjectKeyPrefix != nil { + ok := object.Key("ObjectKeyPrefix") + ok.String(*v.ObjectKeyPrefix) + } + + return nil +} + +func awsAwsjson10_serializeDocumentScheduleConfiguration(v *types.ScheduleConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ScheduleExpression != nil { + ok := object.Key("ScheduleExpression") + ok.String(*v.ScheduleExpression) + } + + return nil +} + +func awsAwsjson10_serializeDocumentSnsConfiguration(v *types.SnsConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TopicArn != nil { + ok := object.Key("TopicArn") + ok.String(*v.TopicArn) + } + + return nil +} + +func awsAwsjson10_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("Key") + ok.String(*v.Key) + } + + if v.Value != nil { + ok := object.Key("Value") + ok.String(*v.Value) + } + + return nil +} + +func awsAwsjson10_serializeDocumentTagKeyList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson10_serializeDocumentTagList(v []types.Tag, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentTag(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentTargetConfiguration(v *types.TargetConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TimestreamConfiguration != nil { + ok := object.Key("TimestreamConfiguration") + if err := awsAwsjson10_serializeDocumentTimestreamConfiguration(v.TimestreamConfiguration, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeDocumentTimestreamConfiguration(v *types.TimestreamConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DatabaseName != nil { + ok := object.Key("DatabaseName") + ok.String(*v.DatabaseName) + } + + if v.DimensionMappings != nil { + ok := object.Key("DimensionMappings") + if err := awsAwsjson10_serializeDocumentDimensionMappingList(v.DimensionMappings, ok); err != nil { + return err + } + } + + if v.MeasureNameColumn != nil { + ok := object.Key("MeasureNameColumn") + ok.String(*v.MeasureNameColumn) + } + + if v.MixedMeasureMappings != nil { + ok := object.Key("MixedMeasureMappings") + if err := awsAwsjson10_serializeDocumentMixedMeasureMappingList(v.MixedMeasureMappings, ok); err != nil { + return err + } + } + + if v.MultiMeasureMappings != nil { + ok := object.Key("MultiMeasureMappings") + if err := awsAwsjson10_serializeDocumentMultiMeasureMappings(v.MultiMeasureMappings, ok); err != nil { + return err + } + } + + if v.TableName != nil { + ok := object.Key("TableName") + ok.String(*v.TableName) + } + + if v.TimeColumn != nil { + ok := object.Key("TimeColumn") + ok.String(*v.TimeColumn) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentCancelQueryInput(v *CancelQueryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.QueryId != nil { + ok := object.Key("QueryId") + ok.String(*v.QueryId) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentCreateScheduledQueryInput(v *CreateScheduledQueryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if v.ErrorReportConfiguration != nil { + ok := object.Key("ErrorReportConfiguration") + if err := awsAwsjson10_serializeDocumentErrorReportConfiguration(v.ErrorReportConfiguration, ok); err != nil { + return err + } + } + + if v.KmsKeyId != nil { + ok := object.Key("KmsKeyId") + ok.String(*v.KmsKeyId) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.NotificationConfiguration != nil { + ok := object.Key("NotificationConfiguration") + if err := awsAwsjson10_serializeDocumentNotificationConfiguration(v.NotificationConfiguration, ok); err != nil { + return err + } + } + + if v.QueryString != nil { + ok := object.Key("QueryString") + ok.String(*v.QueryString) + } + + if v.ScheduleConfiguration != nil { + ok := object.Key("ScheduleConfiguration") + if err := awsAwsjson10_serializeDocumentScheduleConfiguration(v.ScheduleConfiguration, ok); err != nil { + return err + } + } + + if v.ScheduledQueryExecutionRoleArn != nil { + ok := object.Key("ScheduledQueryExecutionRoleArn") + ok.String(*v.ScheduledQueryExecutionRoleArn) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsAwsjson10_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + if v.TargetConfiguration != nil { + ok := object.Key("TargetConfiguration") + if err := awsAwsjson10_serializeDocumentTargetConfiguration(v.TargetConfiguration, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentDeleteScheduledQueryInput(v *DeleteScheduledQueryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ScheduledQueryArn != nil { + ok := object.Key("ScheduledQueryArn") + ok.String(*v.ScheduledQueryArn) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentDescribeEndpointsInput(v *DescribeEndpointsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + return nil +} + +func awsAwsjson10_serializeOpDocumentDescribeScheduledQueryInput(v *DescribeScheduledQueryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ScheduledQueryArn != nil { + ok := object.Key("ScheduledQueryArn") + ok.String(*v.ScheduledQueryArn) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentExecuteScheduledQueryInput(v *ExecuteScheduledQueryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if v.InvocationTime != nil { + ok := object.Key("InvocationTime") + ok.Double(smithytime.FormatEpochSeconds(*v.InvocationTime)) + } + + if v.ScheduledQueryArn != nil { + ok := object.Key("ScheduledQueryArn") + ok.String(*v.ScheduledQueryArn) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentListScheduledQueriesInput(v *ListScheduledQueriesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentListTagsForResourceInput(v *ListTagsForResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.ResourceARN != nil { + ok := object.Key("ResourceARN") + ok.String(*v.ResourceARN) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentPrepareQueryInput(v *PrepareQueryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.QueryString != nil { + ok := object.Key("QueryString") + ok.String(*v.QueryString) + } + + if v.ValidateOnly != nil { + ok := object.Key("ValidateOnly") + ok.Boolean(*v.ValidateOnly) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentQueryInput(v *QueryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if v.MaxRows != nil { + ok := object.Key("MaxRows") + ok.Integer(*v.MaxRows) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.QueryString != nil { + ok := object.Key("QueryString") + ok.String(*v.QueryString) + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ResourceARN != nil { + ok := object.Key("ResourceARN") + ok.String(*v.ResourceARN) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsAwsjson10_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentUntagResourceInput(v *UntagResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ResourceARN != nil { + ok := object.Key("ResourceARN") + ok.String(*v.ResourceARN) + } + + if v.TagKeys != nil { + ok := object.Key("TagKeys") + if err := awsAwsjson10_serializeDocumentTagKeyList(v.TagKeys, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentUpdateScheduledQueryInput(v *UpdateScheduledQueryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ScheduledQueryArn != nil { + ok := object.Key("ScheduledQueryArn") + ok.String(*v.ScheduledQueryArn) + } + + if len(v.State) > 0 { + ok := object.Key("State") + ok.String(string(v.State)) } return nil diff --git a/service/timestreamquery/types/enums.go b/service/timestreamquery/types/enums.go index 763041e72b4..de93180d3dd 100644 --- a/service/timestreamquery/types/enums.go +++ b/service/timestreamquery/types/enums.go @@ -2,6 +2,86 @@ package types +type DimensionValueType string + +// Enum values for DimensionValueType +const ( + DimensionValueTypeVarchar DimensionValueType = "VARCHAR" +) + +// Values returns all known values for DimensionValueType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (DimensionValueType) Values() []DimensionValueType { + return []DimensionValueType{ + "VARCHAR", + } +} + +type MeasureValueType string + +// Enum values for MeasureValueType +const ( + MeasureValueTypeBigint MeasureValueType = "BIGINT" + MeasureValueTypeBoolean MeasureValueType = "BOOLEAN" + MeasureValueTypeDouble MeasureValueType = "DOUBLE" + MeasureValueTypeVarchar MeasureValueType = "VARCHAR" + MeasureValueTypeMulti MeasureValueType = "MULTI" +) + +// Values returns all known values for MeasureValueType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (MeasureValueType) Values() []MeasureValueType { + return []MeasureValueType{ + "BIGINT", + "BOOLEAN", + "DOUBLE", + "VARCHAR", + "MULTI", + } +} + +type S3EncryptionOption string + +// Enum values for S3EncryptionOption +const ( + S3EncryptionOptionSseS3 S3EncryptionOption = "SSE_S3" + S3EncryptionOptionSseKms S3EncryptionOption = "SSE_KMS" +) + +// Values returns all known values for S3EncryptionOption. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (S3EncryptionOption) Values() []S3EncryptionOption { + return []S3EncryptionOption{ + "SSE_S3", + "SSE_KMS", + } +} + +type ScalarMeasureValueType string + +// Enum values for ScalarMeasureValueType +const ( + ScalarMeasureValueTypeBigint ScalarMeasureValueType = "BIGINT" + ScalarMeasureValueTypeBoolean ScalarMeasureValueType = "BOOLEAN" + ScalarMeasureValueTypeDouble ScalarMeasureValueType = "DOUBLE" + ScalarMeasureValueTypeVarchar ScalarMeasureValueType = "VARCHAR" +) + +// Values returns all known values for ScalarMeasureValueType. Note that this can +// be expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ScalarMeasureValueType) Values() []ScalarMeasureValueType { + return []ScalarMeasureValueType{ + "BIGINT", + "BOOLEAN", + "DOUBLE", + "VARCHAR", + } +} + type ScalarType string // Enum values for ScalarType @@ -37,3 +117,43 @@ func (ScalarType) Values() []ScalarType { "INTEGER", } } + +type ScheduledQueryRunStatus string + +// Enum values for ScheduledQueryRunStatus +const ( + ScheduledQueryRunStatusAutoTriggerSuccess ScheduledQueryRunStatus = "AUTO_TRIGGER_SUCCESS" + ScheduledQueryRunStatusAutoTriggerFailure ScheduledQueryRunStatus = "AUTO_TRIGGER_FAILURE" + ScheduledQueryRunStatusManualTriggerSuccess ScheduledQueryRunStatus = "MANUAL_TRIGGER_SUCCESS" + ScheduledQueryRunStatusManualTriggerFailure ScheduledQueryRunStatus = "MANUAL_TRIGGER_FAILURE" +) + +// Values returns all known values for ScheduledQueryRunStatus. Note that this can +// be expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ScheduledQueryRunStatus) Values() []ScheduledQueryRunStatus { + return []ScheduledQueryRunStatus{ + "AUTO_TRIGGER_SUCCESS", + "AUTO_TRIGGER_FAILURE", + "MANUAL_TRIGGER_SUCCESS", + "MANUAL_TRIGGER_FAILURE", + } +} + +type ScheduledQueryState string + +// Enum values for ScheduledQueryState +const ( + ScheduledQueryStateEnabled ScheduledQueryState = "ENABLED" + ScheduledQueryStateDisabled ScheduledQueryState = "DISABLED" +) + +// Values returns all known values for ScheduledQueryState. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ScheduledQueryState) Values() []ScheduledQueryState { + return []ScheduledQueryState{ + "ENABLED", + "DISABLED", + } +} diff --git a/service/timestreamquery/types/errors.go b/service/timestreamquery/types/errors.go index f77a25bba19..f810ac4d564 100644 --- a/service/timestreamquery/types/errors.go +++ b/service/timestreamquery/types/errors.go @@ -65,7 +65,7 @@ func (e *InternalServerException) ErrorMessage() string { func (e *InternalServerException) ErrorCode() string { return "InternalServerException" } func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } -// The requested endpoint was invalid. +// The requested endpoint was not valid. type InvalidEndpointException struct { Message *string @@ -103,6 +103,46 @@ func (e *QueryExecutionException) ErrorMessage() string { func (e *QueryExecutionException) ErrorCode() string { return "QueryExecutionException" } func (e *QueryExecutionException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The requested resource could not be found. +type ResourceNotFoundException struct { + Message *string + + ScheduledQueryArn *string + + noSmithyDocumentSerde +} + +func (e *ResourceNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceNotFoundException) ErrorCode() string { return "ResourceNotFoundException" } +func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You have exceeded the service quota. +type ServiceQuotaExceededException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *ServiceQuotaExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceQuotaExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceQuotaExceededException) ErrorCode() string { return "ServiceQuotaExceededException" } +func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The request was denied due to request throttling. type ThrottlingException struct { Message *string diff --git a/service/timestreamquery/types/types.go b/service/timestreamquery/types/types.go index b4a128e9d39..04330040b89 100644 --- a/service/timestreamquery/types/types.go +++ b/service/timestreamquery/types/types.go @@ -4,14 +4,15 @@ package types import ( smithydocument "github.com/aws/smithy-go/document" + "time" ) -// Contains the meta data for query results such as the column names, data types, +// Contains the metadata for query results such as the column names, data types, // and other attributes. type ColumnInfo struct { // The data type of the result set column. The data type can be a scalar or - // complex. Scalar data types are integers, strings, doubles, booleans, and others. + // complex. Scalar data types are integers, strings, doubles, Booleans, and others. // Complex data types are types such as arrays, rows, and others. // // This member is required. @@ -37,16 +38,33 @@ type Datum struct { RowValue *Row // Indicates if the data point is a scalar value such as integer, string, double, - // or boolean. + // or Boolean. ScalarValue *string - // Indicates if the data point is of timeseries data type. + // Indicates if the data point is a timeseries data type. TimeSeriesValue []TimeSeriesDataPoint noSmithyDocumentSerde } -// Represents an available endpoint against which to make API calls agaisnt, as +// This type is used to map column(s) from the query result to a dimension in the +// destination table. +type DimensionMapping struct { + + // Type for the dimension. + // + // This member is required. + DimensionValueType DimensionValueType + + // Column name from query result. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +// Represents an available endpoint against which to make API calls against, as // well as the TTL for that endpoint. type Endpoint struct { @@ -63,14 +81,157 @@ type Endpoint struct { noSmithyDocumentSerde } -// Information about the status of the query, including progress and bytes -// scannned. +// Configuration required for error reporting. +type ErrorReportConfiguration struct { + + // The S3 configuration for the error reports. + // + // This member is required. + S3Configuration *S3Configuration + + noSmithyDocumentSerde +} + +// This contains the location of the error report for a single scheduled query +// call. +type ErrorReportLocation struct { + + // The S3 location where error reports are written. + S3ReportLocation *S3ReportLocation + + noSmithyDocumentSerde +} + +// Statistics for a single scheduled query run. +type ExecutionStats struct { + + // Bytes metered for a single scheduled query run. + BytesMetered int64 + + // Data writes metered for records ingested in a single scheduled query run. + DataWrites int64 + + // Total time, measured in milliseconds, that was needed for the scheduled query + // run to complete. + ExecutionTimeInMillis int64 + + // Number of rows present in the output from running a query before ingestion to + // destination data source. + QueryResultRows int64 + + // The number of records ingested for a single scheduled query run. + RecordsIngested int64 + + noSmithyDocumentSerde +} + +// MixedMeasureMappings are mappings that can be used to ingest data into a mixture +// of narrow and multi measures in the derived table. +type MixedMeasureMapping struct { + + // Type of the value that is to be read from sourceColumn. If the mapping is for + // MULTI, use MeasureValueType.MULTI. + // + // This member is required. + MeasureValueType MeasureValueType + + // Refers to the value of measure_name in a result row. This field is required if + // MeasureNameColumn is provided. + MeasureName *string + + // Required when measureValueType is MULTI. Attribute mappings for MULTI value + // measures. + MultiMeasureAttributeMappings []MultiMeasureAttributeMapping + + // This field refers to the source column from which measure-value is to be read + // for result materialization. + SourceColumn *string + + // Target measure name to be used. If not provided, the target measure name by + // default would be measure-name if provided, or sourceColumn otherwise. + TargetMeasureName *string + + noSmithyDocumentSerde +} + +// Attribute mapping for MULTI value measures. +type MultiMeasureAttributeMapping struct { + + // Type of the attribute to be read from the source column. + // + // This member is required. + MeasureValueType ScalarMeasureValueType + + // Source column from where the attribute value is to be read. + // + // This member is required. + SourceColumn *string + + // Custom name to be used for attribute name in derived table. If not provided, + // source column name would be used. + TargetMultiMeasureAttributeName *string + + noSmithyDocumentSerde +} + +// Only one of MixedMeasureMappings or MultiMeasureMappings is to be provided. +// MultiMeasureMappings can be used to ingest data as multi measures in the derived +// table. +type MultiMeasureMappings struct { + + // Required. Attribute mappings to be used for mapping query results to ingest data + // for multi-measure attributes. + // + // This member is required. + MultiMeasureAttributeMappings []MultiMeasureAttributeMapping + + // The name of the target multi-measure name in the derived table. This input is + // required when measureNameColumn is not provided. If MeasureNameColumn is + // provided, then value from that column will be used as multi-measure name. + TargetMultiMeasureName *string + + noSmithyDocumentSerde +} + +// Notification configuration for a scheduled query. A notification is sent by +// Timestream when a scheduled query is created, its state is updated or when it is +// deleted. +type NotificationConfiguration struct { + + // Details on SNS configuration. + // + // This member is required. + SnsConfiguration *SnsConfiguration + + noSmithyDocumentSerde +} + +// Mapping for named parameters. +type ParameterMapping struct { + + // Parameter name. + // + // This member is required. + Name *string + + // Contains the data type of a column in a query result set. The data type can be + // scalar or complex. The supported scalar data types are integers, Boolean, + // string, double, timestamp, date, time, and intervals. The supported complex data + // types are arrays, rows, and timeseries. + // + // This member is required. + Type *Type + + noSmithyDocumentSerde +} + +// Information about the status of the query, including progress and bytes scanned. type QueryStatus struct { // The amount of data scanned by the query in bytes that you will be charged for. // This is a cumulative sum and represents the total amount of data that you will // be charged for since the query was started. The charge is applied only once and - // is either applied when the query completes execution or when the query is + // is either applied when the query completes running or when the query is // cancelled. CumulativeBytesMetered int64 @@ -95,10 +256,256 @@ type Row struct { noSmithyDocumentSerde } -// The timeseries datatype represents the values of a measure over time. A time +// Details on S3 location for error reports that result from running a query. +type S3Configuration struct { + + // Name of the S3 bucket under which error reports will be created. + // + // This member is required. + BucketName *string + + // Encryption at rest options for the error reports. If no encryption option is + // specified, Timestream will choose SSE_S3 as default. + EncryptionOption S3EncryptionOption + + // Prefix for the error report key. Timestream by default adds the following prefix + // to the error report path. + ObjectKeyPrefix *string + + noSmithyDocumentSerde +} + +// S3 report location for the scheduled query run. +type S3ReportLocation struct { + + // S3 bucket name. + BucketName *string + + // S3 key. + ObjectKey *string + + noSmithyDocumentSerde +} + +// Configuration of the schedule of the query. +type ScheduleConfiguration struct { + + // An expression that denotes when to trigger the scheduled query run. This can be + // a cron expression or a rate expression. + // + // This member is required. + ScheduleExpression *string + + noSmithyDocumentSerde +} + +// Scheduled Query +type ScheduledQuery struct { + + // The Amazon Resource Name. + // + // This member is required. + Arn *string + + // The name of the scheduled query. + // + // This member is required. + Name *string + + // State of scheduled query. + // + // This member is required. + State ScheduledQueryState + + // The creation time of the scheduled query. + CreationTime *time.Time + + // Configuration for scheduled query error reporting. + ErrorReportConfiguration *ErrorReportConfiguration + + // Status of the last scheduled query run. + LastRunStatus ScheduledQueryRunStatus + + // The next time the scheduled query is to be run. + NextInvocationTime *time.Time + + // The last time the scheduled query was run. + PreviousInvocationTime *time.Time + + // Target data source where final scheduled query result will be written. + TargetDestination *TargetDestination + + noSmithyDocumentSerde +} + +// Structure that describes scheduled query. +type ScheduledQueryDescription struct { + + // Scheduled query ARN. + // + // This member is required. + Arn *string + + // Name of the scheduled query. + // + // This member is required. + Name *string + + // Notification configuration. + // + // This member is required. + NotificationConfiguration *NotificationConfiguration + + // The query to be run. + // + // This member is required. + QueryString *string + + // Schedule configuration. + // + // This member is required. + ScheduleConfiguration *ScheduleConfiguration + + // State of the scheduled query. + // + // This member is required. + State ScheduledQueryState + + // Creation time of the scheduled query. + CreationTime *time.Time + + // Error-reporting configuration for the scheduled query. + ErrorReportConfiguration *ErrorReportConfiguration + + // A customer provided KMS key used to encrypt the scheduled query resource. + KmsKeyId *string + + // Runtime summary for the last scheduled query run. + LastRunSummary *ScheduledQueryRunSummary + + // The next time the scheduled query is scheduled to run. + NextInvocationTime *time.Time + + // Last time the query was run. + PreviousInvocationTime *time.Time + + // Runtime summary for the last five failed scheduled query runs. + RecentlyFailedRuns []ScheduledQueryRunSummary + + // IAM role that Timestream uses to run the schedule query. + ScheduledQueryExecutionRoleArn *string + + // Scheduled query target store configuration. + TargetConfiguration *TargetConfiguration + + noSmithyDocumentSerde +} + +// Run summary for the scheduled query +type ScheduledQueryRunSummary struct { + + // S3 location for error report. + ErrorReportLocation *ErrorReportLocation + + // Runtime statistics for a scheduled run. + ExecutionStats *ExecutionStats + + // Error message for the scheduled query in case of failure. You might have to look + // at the error report to get more detailed error reasons. + FailureReason *string + + // InvocationTime for this run. This is the time at which the query is scheduled to + // run. Parameter @scheduled_runtime can be used in the query to get the value. + InvocationTime *time.Time + + // The status of a scheduled query run. + RunStatus ScheduledQueryRunStatus + + // The actual time when the query was run. + TriggerTime *time.Time + + noSmithyDocumentSerde +} + +// Details of the column that is returned by the query. +type SelectColumn struct { + + // True, if the column name was aliased by the query. False otherwise. + Aliased *bool + + // Database that has this column. + DatabaseName *string + + // Name of the column. + Name *string + + // Table within the database that has this column. + TableName *string + + // Contains the data type of a column in a query result set. The data type can be + // scalar or complex. The supported scalar data types are integers, Boolean, + // string, double, timestamp, date, time, and intervals. The supported complex data + // types are arrays, rows, and timeseries. + Type *Type + + noSmithyDocumentSerde +} + +// Details on SNS that are required to send the notification. +type SnsConfiguration struct { + + // SNS topic ARN that the scheduled query status notifications will be sent to. + // + // This member is required. + TopicArn *string + + noSmithyDocumentSerde +} + +// A tag is a label that you assign to a Timestream database and/or table. Each tag +// consists of a key and an optional value, both of which you define. Tags enable +// you to categorize databases and/or tables, for example, by purpose, owner, or +// environment. +type Tag struct { + + // The key of the tag. Tag keys are case sensitive. + // + // This member is required. + Key *string + + // The value of the tag. Tag values are case sensitive and can be null. + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + +// Configuration used for writing the output of a query. +type TargetConfiguration struct { + + // Configuration needed to write data into the Timestream database and table. + // + // This member is required. + TimestreamConfiguration *TimestreamConfiguration + + noSmithyDocumentSerde +} + +// Destination details to write data for a target data source. Current supported +// data source is Timestream. +type TargetDestination struct { + + // Query result destination details for Timestream data source. + TimestreamDestination *TimestreamDestination + + noSmithyDocumentSerde +} + +// The timeseries data type represents the values of a measure over time. A time // series is an array of rows of timestamps and measure values, with rows sorted in // ascending order of time. A TimeSeriesDataPoint is a single data point in the -// timeseries. It represents a tuple of (time, measure value) in a timeseries. +// time series. It represents a tuple of (time, measure value) in a time series. type TimeSeriesDataPoint struct { // The timestamp when the measure value was collected. @@ -114,8 +521,60 @@ type TimeSeriesDataPoint struct { noSmithyDocumentSerde } +// Configuration to write data into Timestream database and table. This +// configuration allows the user to map the query result select columns into the +// destination table columns. +type TimestreamConfiguration struct { + + // Name of Timestream database to which the query result will be written. + // + // This member is required. + DatabaseName *string + + // This is to allow mapping column(s) from the query result to the dimension in the + // destination table. + // + // This member is required. + DimensionMappings []DimensionMapping + + // Name of Timestream table that the query result will be written to. The table + // should be within the same database that is provided in Timestream configuration. + // + // This member is required. + TableName *string + + // Column from query result that should be used as the time column in destination + // table. Column type for this should be TIMESTAMP. + // + // This member is required. + TimeColumn *string + + // Name of the measure column. + MeasureNameColumn *string + + // Specifies how to map measures to multi-measure records. + MixedMeasureMappings []MixedMeasureMapping + + // Multi-measure mappings. + MultiMeasureMappings *MultiMeasureMappings + + noSmithyDocumentSerde +} + +// Destination for scheduled query. +type TimestreamDestination struct { + + // Timestream database name. + DatabaseName *string + + // Timestream table name. + TableName *string + + noSmithyDocumentSerde +} + // Contains the data type of a column in a query result set. The data type can be -// scalar or complex. The supported scalar data types are integers, boolean, +// scalar or complex. The supported scalar data types are integers, Boolean, // string, double, timestamp, date, time, and intervals. The supported complex data // types are arrays, rows, and timeseries. type Type struct { @@ -126,7 +585,7 @@ type Type struct { // Indicates if the column is a row. RowColumnInfo []ColumnInfo - // Indicates if the column is of type string, integer, boolean, double, timestamp, + // Indicates if the column is of type string, integer, Boolean, double, timestamp, // date, time. ScalarType ScalarType diff --git a/service/timestreamquery/validators.go b/service/timestreamquery/validators.go index 879a2acfd15..e52d7d901c9 100644 --- a/service/timestreamquery/validators.go +++ b/service/timestreamquery/validators.go @@ -5,6 +5,7 @@ package timestreamquery import ( "context" "fmt" + "github.com/aws/aws-sdk-go-v2/service/timestreamquery/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" ) @@ -29,6 +30,126 @@ func (m *validateOpCancelQuery) HandleInitialize(ctx context.Context, in middlew return next.HandleInitialize(ctx, in) } +type validateOpCreateScheduledQuery struct { +} + +func (*validateOpCreateScheduledQuery) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateScheduledQuery) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateScheduledQueryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateScheduledQueryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteScheduledQuery struct { +} + +func (*validateOpDeleteScheduledQuery) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteScheduledQuery) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteScheduledQueryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteScheduledQueryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeScheduledQuery struct { +} + +func (*validateOpDescribeScheduledQuery) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeScheduledQuery) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeScheduledQueryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeScheduledQueryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpExecuteScheduledQuery struct { +} + +func (*validateOpExecuteScheduledQuery) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpExecuteScheduledQuery) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ExecuteScheduledQueryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpExecuteScheduledQueryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListTagsForResource struct { +} + +func (*validateOpListTagsForResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListTagsForResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListTagsForResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPrepareQuery struct { +} + +func (*validateOpPrepareQuery) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPrepareQuery) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PrepareQueryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPrepareQueryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpQuery struct { } @@ -49,14 +170,411 @@ func (m *validateOpQuery) HandleInitialize(ctx context.Context, in middleware.In return next.HandleInitialize(ctx, in) } +type validateOpTagResource struct { +} + +func (*validateOpTagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUntagResource struct { +} + +func (*validateOpUntagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UntagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUntagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateScheduledQuery struct { +} + +func (*validateOpUpdateScheduledQuery) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateScheduledQuery) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateScheduledQueryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateScheduledQueryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + func addOpCancelQueryValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCancelQuery{}, middleware.After) } +func addOpCreateScheduledQueryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateScheduledQuery{}, middleware.After) +} + +func addOpDeleteScheduledQueryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteScheduledQuery{}, middleware.After) +} + +func addOpDescribeScheduledQueryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeScheduledQuery{}, middleware.After) +} + +func addOpExecuteScheduledQueryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpExecuteScheduledQuery{}, middleware.After) +} + +func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) +} + +func addOpPrepareQueryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPrepareQuery{}, middleware.After) +} + func addOpQueryValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpQuery{}, middleware.After) } +func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) +} + +func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) +} + +func addOpUpdateScheduledQueryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateScheduledQuery{}, middleware.After) +} + +func validateDimensionMapping(v *types.DimensionMapping) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DimensionMapping"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if len(v.DimensionValueType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("DimensionValueType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDimensionMappingList(v []types.DimensionMapping) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DimensionMappingList"} + for i := range v { + if err := validateDimensionMapping(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateErrorReportConfiguration(v *types.ErrorReportConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ErrorReportConfiguration"} + if v.S3Configuration == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3Configuration")) + } else if v.S3Configuration != nil { + if err := validateS3Configuration(v.S3Configuration); err != nil { + invalidParams.AddNested("S3Configuration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMixedMeasureMapping(v *types.MixedMeasureMapping) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MixedMeasureMapping"} + if len(v.MeasureValueType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("MeasureValueType")) + } + if v.MultiMeasureAttributeMappings != nil { + if err := validateMultiMeasureAttributeMappingList(v.MultiMeasureAttributeMappings); err != nil { + invalidParams.AddNested("MultiMeasureAttributeMappings", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMixedMeasureMappingList(v []types.MixedMeasureMapping) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MixedMeasureMappingList"} + for i := range v { + if err := validateMixedMeasureMapping(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMultiMeasureAttributeMapping(v *types.MultiMeasureAttributeMapping) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MultiMeasureAttributeMapping"} + if v.SourceColumn == nil { + invalidParams.Add(smithy.NewErrParamRequired("SourceColumn")) + } + if len(v.MeasureValueType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("MeasureValueType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMultiMeasureAttributeMappingList(v []types.MultiMeasureAttributeMapping) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MultiMeasureAttributeMappingList"} + for i := range v { + if err := validateMultiMeasureAttributeMapping(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMultiMeasureMappings(v *types.MultiMeasureMappings) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MultiMeasureMappings"} + if v.MultiMeasureAttributeMappings == nil { + invalidParams.Add(smithy.NewErrParamRequired("MultiMeasureAttributeMappings")) + } else if v.MultiMeasureAttributeMappings != nil { + if err := validateMultiMeasureAttributeMappingList(v.MultiMeasureAttributeMappings); err != nil { + invalidParams.AddNested("MultiMeasureAttributeMappings", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateNotificationConfiguration(v *types.NotificationConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "NotificationConfiguration"} + if v.SnsConfiguration == nil { + invalidParams.Add(smithy.NewErrParamRequired("SnsConfiguration")) + } else if v.SnsConfiguration != nil { + if err := validateSnsConfiguration(v.SnsConfiguration); err != nil { + invalidParams.AddNested("SnsConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateS3Configuration(v *types.S3Configuration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "S3Configuration"} + if v.BucketName == nil { + invalidParams.Add(smithy.NewErrParamRequired("BucketName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateScheduleConfiguration(v *types.ScheduleConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ScheduleConfiguration"} + if v.ScheduleExpression == nil { + invalidParams.Add(smithy.NewErrParamRequired("ScheduleExpression")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSnsConfiguration(v *types.SnsConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SnsConfiguration"} + if v.TopicArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("TopicArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTag(v *types.Tag) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Tag"} + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTagList(v []types.Tag) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagList"} + for i := range v { + if err := validateTag(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTargetConfiguration(v *types.TargetConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TargetConfiguration"} + if v.TimestreamConfiguration == nil { + invalidParams.Add(smithy.NewErrParamRequired("TimestreamConfiguration")) + } else if v.TimestreamConfiguration != nil { + if err := validateTimestreamConfiguration(v.TimestreamConfiguration); err != nil { + invalidParams.AddNested("TimestreamConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTimestreamConfiguration(v *types.TimestreamConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TimestreamConfiguration"} + if v.DatabaseName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DatabaseName")) + } + if v.TableName == nil { + invalidParams.Add(smithy.NewErrParamRequired("TableName")) + } + if v.TimeColumn == nil { + invalidParams.Add(smithy.NewErrParamRequired("TimeColumn")) + } + if v.DimensionMappings == nil { + invalidParams.Add(smithy.NewErrParamRequired("DimensionMappings")) + } else if v.DimensionMappings != nil { + if err := validateDimensionMappingList(v.DimensionMappings); err != nil { + invalidParams.AddNested("DimensionMappings", err.(smithy.InvalidParamsError)) + } + } + if v.MultiMeasureMappings != nil { + if err := validateMultiMeasureMappings(v.MultiMeasureMappings); err != nil { + invalidParams.AddNested("MultiMeasureMappings", err.(smithy.InvalidParamsError)) + } + } + if v.MixedMeasureMappings != nil { + if err := validateMixedMeasureMappingList(v.MixedMeasureMappings); err != nil { + invalidParams.AddNested("MixedMeasureMappings", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCancelQueryInput(v *CancelQueryInput) error { if v == nil { return nil @@ -72,6 +590,136 @@ func validateOpCancelQueryInput(v *CancelQueryInput) error { } } +func validateOpCreateScheduledQueryInput(v *CreateScheduledQueryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateScheduledQueryInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.QueryString == nil { + invalidParams.Add(smithy.NewErrParamRequired("QueryString")) + } + if v.ScheduleConfiguration == nil { + invalidParams.Add(smithy.NewErrParamRequired("ScheduleConfiguration")) + } else if v.ScheduleConfiguration != nil { + if err := validateScheduleConfiguration(v.ScheduleConfiguration); err != nil { + invalidParams.AddNested("ScheduleConfiguration", err.(smithy.InvalidParamsError)) + } + } + if v.NotificationConfiguration == nil { + invalidParams.Add(smithy.NewErrParamRequired("NotificationConfiguration")) + } else if v.NotificationConfiguration != nil { + if err := validateNotificationConfiguration(v.NotificationConfiguration); err != nil { + invalidParams.AddNested("NotificationConfiguration", err.(smithy.InvalidParamsError)) + } + } + if v.TargetConfiguration != nil { + if err := validateTargetConfiguration(v.TargetConfiguration); err != nil { + invalidParams.AddNested("TargetConfiguration", err.(smithy.InvalidParamsError)) + } + } + if v.ScheduledQueryExecutionRoleArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ScheduledQueryExecutionRoleArn")) + } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if v.ErrorReportConfiguration == nil { + invalidParams.Add(smithy.NewErrParamRequired("ErrorReportConfiguration")) + } else if v.ErrorReportConfiguration != nil { + if err := validateErrorReportConfiguration(v.ErrorReportConfiguration); err != nil { + invalidParams.AddNested("ErrorReportConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteScheduledQueryInput(v *DeleteScheduledQueryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteScheduledQueryInput"} + if v.ScheduledQueryArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ScheduledQueryArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeScheduledQueryInput(v *DescribeScheduledQueryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeScheduledQueryInput"} + if v.ScheduledQueryArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ScheduledQueryArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpExecuteScheduledQueryInput(v *ExecuteScheduledQueryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ExecuteScheduledQueryInput"} + if v.ScheduledQueryArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ScheduledQueryArn")) + } + if v.InvocationTime == nil { + invalidParams.Add(smithy.NewErrParamRequired("InvocationTime")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} + if v.ResourceARN == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPrepareQueryInput(v *PrepareQueryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PrepareQueryInput"} + if v.QueryString == nil { + invalidParams.Add(smithy.NewErrParamRequired("QueryString")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpQueryInput(v *QueryInput) error { if v == nil { return nil @@ -86,3 +734,61 @@ func validateOpQueryInput(v *QueryInput) error { return nil } } + +func validateOpTagResourceInput(v *TagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} + if v.ResourceARN == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) + } + if v.Tags == nil { + invalidParams.Add(smithy.NewErrParamRequired("Tags")) + } else if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUntagResourceInput(v *UntagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} + if v.ResourceARN == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) + } + if v.TagKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateScheduledQueryInput(v *UpdateScheduledQueryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateScheduledQueryInput"} + if v.ScheduledQueryArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ScheduledQueryArn")) + } + if len(v.State) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("State")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/timestreamwrite/api_op_CreateDatabase.go b/service/timestreamwrite/api_op_CreateDatabase.go index 96a48699f57..2d90bc1f01c 100644 --- a/service/timestreamwrite/api_op_CreateDatabase.go +++ b/service/timestreamwrite/api_op_CreateDatabase.go @@ -15,11 +15,13 @@ import ( // Creates a new Timestream database. If the KMS key is not specified, the database // will be encrypted with a Timestream managed KMS key located in your account. -// Refer to AWS managed KMS keys +// Refer to Amazon Web Services managed KMS keys // (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk) -// for more info. Service quotas apply. For more information, see Access Management -// (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) in -// the Timestream Developer Guide. +// for more info. Service quotas apply +// (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html). +// See code sample +// (https://docs.aws.amazon.com/timestream/latest/developerguide/code-samples.create-db.html) +// for details. func (c *Client) CreateDatabase(ctx context.Context, params *CreateDatabaseInput, optFns ...func(*Options)) (*CreateDatabaseOutput, error) { if params == nil { params = &CreateDatabaseInput{} @@ -44,7 +46,7 @@ type CreateDatabaseInput struct { // The KMS key for the database. If the KMS key is not specified, the database will // be encrypted with a Timestream managed KMS key located in your account. Refer to - // AWS managed KMS keys + // Amazon Web Services managed KMS keys // (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk) // for more info. KmsKeyId *string diff --git a/service/timestreamwrite/api_op_CreateTable.go b/service/timestreamwrite/api_op_CreateTable.go index ce957b639dc..7c0ff1580da 100644 --- a/service/timestreamwrite/api_op_CreateTable.go +++ b/service/timestreamwrite/api_op_CreateTable.go @@ -14,13 +14,15 @@ import ( ) // The CreateTable operation adds a new table to an existing database in your -// account. In an AWS account, table names must be at least unique within each -// Region if they are in the same database. You may have identical table names in -// the same Region if the tables are in seperate databases. While creating the -// table, you must specify the table name, database name, and the retention -// properties. Service quotas apply. For more information, see Access Management -// (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) in -// the Timestream Developer Guide. +// account. In an Amazon Web Services account, table names must be at least unique +// within each Region if they are in the same database. You may have identical +// table names in the same Region if the tables are in separate databases. While +// creating the table, you must specify the table name, database name, and the +// retention properties. Service quotas apply +// (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html). +// See code sample +// (https://docs.aws.amazon.com/timestream/latest/developerguide/code-samples.create-table.html) +// for details. func (c *Client) CreateTable(ctx context.Context, params *CreateTableInput, optFns ...func(*Options)) (*CreateTableOutput, error) { if params == nil { params = &CreateTableInput{} @@ -48,6 +50,9 @@ type CreateTableInput struct { // This member is required. TableName *string + // Contains properties to set on the table when enabling magnetic store writes. + MagneticStoreWriteProperties *types.MagneticStoreWriteProperties + // The duration for which your time series data must be stored in the memory store // and the magnetic store. RetentionProperties *types.RetentionProperties diff --git a/service/timestreamwrite/api_op_DeleteDatabase.go b/service/timestreamwrite/api_op_DeleteDatabase.go index 4629879014c..47edd4069bc 100644 --- a/service/timestreamwrite/api_op_DeleteDatabase.go +++ b/service/timestreamwrite/api_op_DeleteDatabase.go @@ -17,7 +17,9 @@ import ( // All tables in the database must be deleted first, or a ValidationException error // will be thrown. Due to the nature of distributed retries, the operation can // return either success or a ResourceNotFoundException. Clients should consider -// them equivalent. +// them equivalent. See code sample +// (https://docs.aws.amazon.com/timestream/latest/developerguide/code-samples.delete-db.html) +// for details. func (c *Client) DeleteDatabase(ctx context.Context, params *DeleteDatabaseInput, optFns ...func(*Options)) (*DeleteDatabaseOutput, error) { if params == nil { params = &DeleteDatabaseInput{} diff --git a/service/timestreamwrite/api_op_DeleteTable.go b/service/timestreamwrite/api_op_DeleteTable.go index 2c323418077..f44cce8ba6d 100644 --- a/service/timestreamwrite/api_op_DeleteTable.go +++ b/service/timestreamwrite/api_op_DeleteTable.go @@ -16,7 +16,9 @@ import ( // Timestream database table is deleted, the time series data stored in the table // cannot be recovered. Due to the nature of distributed retries, the operation can // return either success or a ResourceNotFoundException. Clients should consider -// them equivalent. +// them equivalent. See code sample +// (https://docs.aws.amazon.com/timestream/latest/developerguide/code-samples.delete-table.html) +// for details. func (c *Client) DeleteTable(ctx context.Context, params *DeleteTableInput, optFns ...func(*Options)) (*DeleteTableOutput, error) { if params == nil { params = &DeleteTableInput{} diff --git a/service/timestreamwrite/api_op_DescribeDatabase.go b/service/timestreamwrite/api_op_DescribeDatabase.go index 05c006bb45e..69cb6ab3ef1 100644 --- a/service/timestreamwrite/api_op_DescribeDatabase.go +++ b/service/timestreamwrite/api_op_DescribeDatabase.go @@ -15,9 +15,11 @@ import ( // Returns information about the database, including the database name, time that // the database was created, and the total number of tables found within the -// database. Service quotas apply. For more information, see Access Management -// (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) in -// the Timestream Developer Guide. +// database. Service quotas apply +// (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html). +// See code sample +// (https://docs.aws.amazon.com/timestream/latest/developerguide/code-samples.describe-db.html) +// for details. func (c *Client) DescribeDatabase(ctx context.Context, params *DescribeDatabaseInput, optFns ...func(*Options)) (*DescribeDatabaseOutput, error) { if params == nil { params = &DescribeDatabaseInput{} diff --git a/service/timestreamwrite/api_op_DescribeEndpoints.go b/service/timestreamwrite/api_op_DescribeEndpoints.go index 75c4702707a..12d1343defd 100644 --- a/service/timestreamwrite/api_op_DescribeEndpoints.go +++ b/service/timestreamwrite/api_op_DescribeEndpoints.go @@ -12,20 +12,25 @@ import ( ) // DescribeEndpoints returns a list of available endpoints to make Timestream API -// calls against. This API is available through both Write and Query. Because -// Timestream’s SDKs are designed to transparently work with the service’s +// calls against. This API is available through both Write and Query. Because the +// Timestream SDKs are designed to transparently work with the service’s // architecture, including the management and mapping of the service endpoints, it // is not recommended that you use this API unless: // -// * Your application uses a -// programming language that does not yet have SDK support +// * You are using VPC endpoints +// (Amazon Web Services PrivateLink) with Timestream +// (https://docs.aws.amazon.com/timestream/latest/developerguide/VPCEndpoints) // -// * You require better -// control over the client-side implementation +// * +// Your application uses a programming language that does not yet have SDK +// support // -// For detailed information on how to -// use DescribeEndpoints, see The Endpoint Discovery Pattern and REST APIs -// (https://docs.aws.amazon.com/timestream/latest/developerguide/Using-API.endpoint-discovery.html). +// * You require better control over the client-side implementation +// +// For +// detailed information on how and when to use and implement DescribeEndpoints, see +// The Endpoint Discovery Pattern +// (https://docs.aws.amazon.com/timestream/latest/developerguide/Using.API.html#Using-API.endpoint-discovery). func (c *Client) DescribeEndpoints(ctx context.Context, params *DescribeEndpointsInput, optFns ...func(*Options)) (*DescribeEndpointsOutput, error) { if params == nil { params = &DescribeEndpointsInput{} diff --git a/service/timestreamwrite/api_op_DescribeTable.go b/service/timestreamwrite/api_op_DescribeTable.go index d75cd87dce8..4620b393acd 100644 --- a/service/timestreamwrite/api_op_DescribeTable.go +++ b/service/timestreamwrite/api_op_DescribeTable.go @@ -15,9 +15,11 @@ import ( // Returns information about the table, including the table name, database name, // retention duration of the memory store and the magnetic store. Service quotas -// apply. For more information, see Access Management -// (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) in -// the Timestream Developer Guide. +// apply +// (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html). +// See code sample +// (https://docs.aws.amazon.com/timestream/latest/developerguide/code-samples.describe-table.html) +// for details. func (c *Client) DescribeTable(ctx context.Context, params *DescribeTableInput, optFns ...func(*Options)) (*DescribeTableOutput, error) { if params == nil { params = &DescribeTableInput{} diff --git a/service/timestreamwrite/api_op_ListDatabases.go b/service/timestreamwrite/api_op_ListDatabases.go index 9b73254ae85..f619b5aaaf3 100644 --- a/service/timestreamwrite/api_op_ListDatabases.go +++ b/service/timestreamwrite/api_op_ListDatabases.go @@ -13,10 +13,11 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Returns a list of your Timestream databases. Service quotas apply. For more -// information, see Access Management -// (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) in -// the Timestream Developer Guide. +// Returns a list of your Timestream databases. Service quotas apply +// (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html). +// See code sample +// (https://docs.aws.amazon.com/timestream/latest/developerguide/code-samples.list-db.html) +// for details. func (c *Client) ListDatabases(ctx context.Context, params *ListDatabasesInput, optFns ...func(*Options)) (*ListDatabasesOutput, error) { if params == nil { params = &ListDatabasesInput{} diff --git a/service/timestreamwrite/api_op_ListTables.go b/service/timestreamwrite/api_op_ListTables.go index 7bec930d9f2..66b813238f8 100644 --- a/service/timestreamwrite/api_op_ListTables.go +++ b/service/timestreamwrite/api_op_ListTables.go @@ -14,7 +14,9 @@ import ( ) // A list of tables, along with the name, status and retention properties of each -// table. +// table. See code sample +// (https://docs.aws.amazon.com/timestream/latest/developerguide/code-samples.list-table.html) +// for details. func (c *Client) ListTables(ctx context.Context, params *ListTablesInput, optFns ...func(*Options)) (*ListTablesOutput, error) { if params == nil { params = &ListTablesInput{} diff --git a/service/timestreamwrite/api_op_UpdateDatabase.go b/service/timestreamwrite/api_op_UpdateDatabase.go index f371648bf0f..3840ef805f9 100644 --- a/service/timestreamwrite/api_op_UpdateDatabase.go +++ b/service/timestreamwrite/api_op_UpdateDatabase.go @@ -16,7 +16,9 @@ import ( // Modifies the KMS key for an existing database. While updating the database, you // must specify the database name and the identifier of the new KMS key to be used // (KmsKeyId). If there are any concurrent UpdateDatabase requests, first writer -// wins. +// wins. See code sample +// (https://docs.aws.amazon.com/timestream/latest/developerguide/code-samples.update-db.html) +// for details. func (c *Client) UpdateDatabase(ctx context.Context, params *UpdateDatabaseInput, optFns ...func(*Options)) (*UpdateDatabaseOutput, error) { if params == nil { params = &UpdateDatabaseInput{} diff --git a/service/timestreamwrite/api_op_UpdateTable.go b/service/timestreamwrite/api_op_UpdateTable.go index 9f581174200..7a63de62115 100644 --- a/service/timestreamwrite/api_op_UpdateTable.go +++ b/service/timestreamwrite/api_op_UpdateTable.go @@ -19,10 +19,9 @@ import ( // initially set to 2 hours and then changed to 24 hours, the memory store will be // capable of holding 24 hours of data, but will be populated with 24 hours of data // 22 hours after this change was made. Timestream does not retrieve data from the -// magnetic store to populate the memory store. Service quotas apply. For more -// information, see Access Management -// (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) in -// the Timestream Developer Guide. +// magnetic store to populate the memory store. See code sample +// (https://docs.aws.amazon.com/timestream/latest/developerguide/code-samples.update-table.html) +// for details. func (c *Client) UpdateTable(ctx context.Context, params *UpdateTableInput, optFns ...func(*Options)) (*UpdateTableOutput, error) { if params == nil { params = &UpdateTableInput{} @@ -45,16 +44,17 @@ type UpdateTableInput struct { // This member is required. DatabaseName *string - // The retention duration of the memory store and the magnetic store. - // - // This member is required. - RetentionProperties *types.RetentionProperties - - // The name of the Timesream table. + // The name of the Timestream table. // // This member is required. TableName *string + // Contains properties to set on the table when enabling magnetic store writes. + MagneticStoreWriteProperties *types.MagneticStoreWriteProperties + + // The retention duration of the memory store and the magnetic store. + RetentionProperties *types.RetentionProperties + noSmithyDocumentSerde } diff --git a/service/timestreamwrite/api_op_WriteRecords.go b/service/timestreamwrite/api_op_WriteRecords.go index 2e4f32984d1..ae4065cd925 100644 --- a/service/timestreamwrite/api_op_WriteRecords.go +++ b/service/timestreamwrite/api_op_WriteRecords.go @@ -23,10 +23,31 @@ import ( // of data into Timestream, the query results might not reflect the results of a // recently completed write operation. The results may also include some stale // data. If you repeat the query request after a short time, the results should -// return the latest data. Service quotas apply. For more information, see Access -// Management -// (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) in -// the Timestream Developer Guide. +// return the latest data. Service quotas apply +// (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html). +// See code sample +// (https://docs.aws.amazon.com/timestream/latest/developerguide/code-samples.write.html) +// for details. Upserts You can use the Version parameter in a WriteRecords request +// to update data points. Timestream tracks a version number with each record. +// Version defaults to 1 when not specified for the record in the request. +// Timestream will update an existing record’s measure value along with its Version +// upon receiving a write request with a higher Version number for that record. +// Upon receiving an update request where the measure value is the same as that of +// the existing record, Timestream still updates Version, if it is greater than the +// existing value of Version. You can update a data point as many times as desired, +// as long as the value of Version continuously increases. For example, suppose you +// write a new record without indicating Version in the request. Timestream will +// store this record, and set Version to 1. Now, suppose you try to update this +// record with a WriteRecords request of the same record with a different measure +// value but, like before, do not provide Version. In this case, Timestream will +// reject this update with a RejectedRecordsException since the updated record’s +// version is not greater than the existing value of Version. However, if you were +// to resend the update request with Version set to 2, Timestream would then +// succeed in updating the record’s value, and the Version would be set to 2. Next, +// suppose you sent a WriteRecords request with this same record and an identical +// measure value, but with Version set to 3. In this case, Timestream would only +// update Version to 3. Any further updates would need to send a version number +// greater than 3, or the update requests would receive a RejectedRecordsException. func (c *Client) WriteRecords(ctx context.Context, params *WriteRecordsInput, optFns ...func(*Options)) (*WriteRecordsOutput, error) { if params == nil { params = &WriteRecordsInput{} @@ -49,27 +70,33 @@ type WriteRecordsInput struct { // This member is required. DatabaseName *string - // An array of records containing the unique dimension and measure attributes for - // each time series data point. + // An array of records containing the unique measure, dimension, time, and version + // attributes for each time series data point. // // This member is required. Records []types.Record - // The name of the Timesream table. + // The name of the Timestream table. // // This member is required. TableName *string - // A record containing the common measure and dimension attributes shared across - // all the records in the request. The measure and dimension attributes specified - // in here will be merged with the measure and dimension attributes in the records - // object when the data is written into Timestream. + // A record containing the common measure, dimension, time, and version attributes + // shared across all the records in the request. The measure and dimension + // attributes specified will be merged with the measure and dimension attributes in + // the records object when the data is written into Timestream. Dimensions may not + // overlap, or a ValidationException will be thrown. In other words, a record must + // contain dimensions with unique names. CommonAttributes *types.Record noSmithyDocumentSerde } type WriteRecordsOutput struct { + + // Information on the records ingested by this request. + RecordsIngested *types.RecordsIngested + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/timestreamwrite/deserializers.go b/service/timestreamwrite/deserializers.go index 9976b7a3c21..1f55353bad2 100644 --- a/service/timestreamwrite/deserializers.go +++ b/service/timestreamwrite/deserializers.go @@ -1754,10 +1754,32 @@ func (m *awsAwsjson10_deserializeOpWriteRecords) HandleDeserialize(ctx context.C output := &WriteRecordsOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentWriteRecordsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err } return out, metadata, err @@ -2534,6 +2556,157 @@ func awsAwsjson10_deserializeDocumentInvalidEndpointException(v **types.InvalidE return nil } +func awsAwsjson10_deserializeDocumentMagneticStoreRejectedDataLocation(v **types.MagneticStoreRejectedDataLocation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MagneticStoreRejectedDataLocation + if *v == nil { + sv = &types.MagneticStoreRejectedDataLocation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "S3Configuration": + if err := awsAwsjson10_deserializeDocumentS3Configuration(&sv.S3Configuration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentMagneticStoreWriteProperties(v **types.MagneticStoreWriteProperties, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MagneticStoreWriteProperties + if *v == nil { + sv = &types.MagneticStoreWriteProperties{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EnableMagneticStoreWrites": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.EnableMagneticStoreWrites = ptr.Bool(jtv) + } + + case "MagneticStoreRejectedDataLocation": + if err := awsAwsjson10_deserializeDocumentMagneticStoreRejectedDataLocation(&sv.MagneticStoreRejectedDataLocation, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentRecordsIngested(v **types.RecordsIngested, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RecordsIngested + if *v == nil { + sv = &types.RecordsIngested{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "MagneticStore": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MagneticStore = int32(i64) + } + + case "MemoryStore": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MemoryStore = int32(i64) + } + + case "Total": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Total = int32(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeDocumentRejectedRecord(v **types.RejectedRecord, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -2776,6 +2949,73 @@ func awsAwsjson10_deserializeDocumentRetentionProperties(v **types.RetentionProp return nil } +func awsAwsjson10_deserializeDocumentS3Configuration(v **types.S3Configuration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.S3Configuration + if *v == nil { + sv = &types.S3Configuration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BucketName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3BucketName to be of type string, got %T instead", value) + } + sv.BucketName = ptr.String(jtv) + } + + case "EncryptionOption": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3EncryptionOption to be of type string, got %T instead", value) + } + sv.EncryptionOption = types.S3EncryptionOption(jtv) + } + + case "KmsKeyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StringValue2048 to be of type string, got %T instead", value) + } + sv.KmsKeyId = ptr.String(jtv) + } + + case "ObjectKeyPrefix": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3ObjectKeyPrefix to be of type string, got %T instead", value) + } + sv.ObjectKeyPrefix = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -2888,6 +3128,11 @@ func awsAwsjson10_deserializeDocumentTable(v **types.Table, value interface{}) e } } + case "MagneticStoreWriteProperties": + if err := awsAwsjson10_deserializeDocumentMagneticStoreWriteProperties(&sv.MagneticStoreWriteProperties, value); err != nil { + return err + } + case "RetentionProperties": if err := awsAwsjson10_deserializeDocumentRetentionProperties(&sv.RetentionProperties, value); err != nil { return err @@ -3556,3 +3801,39 @@ func awsAwsjson10_deserializeOpDocumentUpdateTableOutput(v **UpdateTableOutput, *v = sv return nil } + +func awsAwsjson10_deserializeOpDocumentWriteRecordsOutput(v **WriteRecordsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *WriteRecordsOutput + if *v == nil { + sv = &WriteRecordsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "RecordsIngested": + if err := awsAwsjson10_deserializeDocumentRecordsIngested(&sv.RecordsIngested, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} diff --git a/service/timestreamwrite/doc.go b/service/timestreamwrite/doc.go index 0f427e10577..5293f233193 100644 --- a/service/timestreamwrite/doc.go +++ b/service/timestreamwrite/doc.go @@ -3,17 +3,17 @@ // Package timestreamwrite provides the API client, operations, and parameter types // for Amazon Timestream Write. // -// Amazon Timestream is a fast, scalable, fully managed time series database -// service that makes it easy to store and analyze trillions of time series data -// points per day. With Timestream, you can easily store and analyze IoT sensor -// data to derive insights from your IoT applications. You can analyze industrial -// telemetry to streamline equipment management and maintenance. You can also store -// and analyze log data and metrics to improve the performance and availability of -// your applications. Timestream is built from the ground up to effectively ingest, -// process, and store time series data. It organizes data to optimize query -// processing. It automatically scales based on the volume of data ingested and on -// the query volume to ensure you receive optimal performance while inserting and -// querying data. As your data grows over time, Timestream’s adaptive query -// processing engine spans across storage tiers to provide fast analysis while -// reducing costs. +// Amazon Timestream Write Amazon Timestream is a fast, scalable, fully managed +// time series database service that makes it easy to store and analyze trillions +// of time series data points per day. With Timestream, you can easily store and +// analyze IoT sensor data to derive insights from your IoT applications. You can +// analyze industrial telemetry to streamline equipment management and maintenance. +// You can also store and analyze log data and metrics to improve the performance +// and availability of your applications. Timestream is built from the ground up to +// effectively ingest, process, and store time series data. It organizes data to +// optimize query processing. It automatically scales based on the volume of data +// ingested and on the query volume to ensure you receive optimal performance while +// inserting and querying data. As your data grows over time, Timestream’s adaptive +// query processing engine spans across storage tiers to provide fast analysis +// while reducing costs. package timestreamwrite diff --git a/service/timestreamwrite/serializers.go b/service/timestreamwrite/serializers.go index 302235c21c9..b47329f793f 100644 --- a/service/timestreamwrite/serializers.go +++ b/service/timestreamwrite/serializers.go @@ -874,6 +874,74 @@ func awsAwsjson10_serializeDocumentDimensions(v []types.Dimension, value smithyj return nil } +func awsAwsjson10_serializeDocumentMagneticStoreRejectedDataLocation(v *types.MagneticStoreRejectedDataLocation, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.S3Configuration != nil { + ok := object.Key("S3Configuration") + if err := awsAwsjson10_serializeDocumentS3Configuration(v.S3Configuration, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeDocumentMagneticStoreWriteProperties(v *types.MagneticStoreWriteProperties, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EnableMagneticStoreWrites != nil { + ok := object.Key("EnableMagneticStoreWrites") + ok.Boolean(*v.EnableMagneticStoreWrites) + } + + if v.MagneticStoreRejectedDataLocation != nil { + ok := object.Key("MagneticStoreRejectedDataLocation") + if err := awsAwsjson10_serializeDocumentMagneticStoreRejectedDataLocation(v.MagneticStoreRejectedDataLocation, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeDocumentMeasureValue(v *types.MeasureValue, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if len(v.Type) > 0 { + ok := object.Key("Type") + ok.String(string(v.Type)) + } + + if v.Value != nil { + ok := object.Key("Value") + ok.String(*v.Value) + } + + return nil +} + +func awsAwsjson10_serializeDocumentMeasureValues(v []types.MeasureValue, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentMeasureValue(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsAwsjson10_serializeDocumentRecord(v *types.Record, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -895,6 +963,13 @@ func awsAwsjson10_serializeDocumentRecord(v *types.Record, value smithyjson.Valu ok.String(*v.MeasureValue) } + if v.MeasureValues != nil { + ok := object.Key("MeasureValues") + if err := awsAwsjson10_serializeDocumentMeasureValues(v.MeasureValues, ok); err != nil { + return err + } + } + if len(v.MeasureValueType) > 0 { ok := object.Key("MeasureValueType") ok.String(string(v.MeasureValueType)) @@ -948,6 +1023,33 @@ func awsAwsjson10_serializeDocumentRetentionProperties(v *types.RetentionPropert return nil } +func awsAwsjson10_serializeDocumentS3Configuration(v *types.S3Configuration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BucketName != nil { + ok := object.Key("BucketName") + ok.String(*v.BucketName) + } + + if len(v.EncryptionOption) > 0 { + ok := object.Key("EncryptionOption") + ok.String(string(v.EncryptionOption)) + } + + if v.KmsKeyId != nil { + ok := object.Key("KmsKeyId") + ok.String(*v.KmsKeyId) + } + + if v.ObjectKeyPrefix != nil { + ok := object.Key("ObjectKeyPrefix") + ok.String(*v.ObjectKeyPrefix) + } + + return nil +} + func awsAwsjson10_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1022,6 +1124,13 @@ func awsAwsjson10_serializeOpDocumentCreateTableInput(v *CreateTableInput, value ok.String(*v.DatabaseName) } + if v.MagneticStoreWriteProperties != nil { + ok := object.Key("MagneticStoreWriteProperties") + if err := awsAwsjson10_serializeDocumentMagneticStoreWriteProperties(v.MagneticStoreWriteProperties, ok); err != nil { + return err + } + } + if v.RetentionProperties != nil { ok := object.Key("RetentionProperties") if err := awsAwsjson10_serializeDocumentRetentionProperties(v.RetentionProperties, ok); err != nil { @@ -1224,6 +1333,13 @@ func awsAwsjson10_serializeOpDocumentUpdateTableInput(v *UpdateTableInput, value ok.String(*v.DatabaseName) } + if v.MagneticStoreWriteProperties != nil { + ok := object.Key("MagneticStoreWriteProperties") + if err := awsAwsjson10_serializeDocumentMagneticStoreWriteProperties(v.MagneticStoreWriteProperties, ok); err != nil { + return err + } + } + if v.RetentionProperties != nil { ok := object.Key("RetentionProperties") if err := awsAwsjson10_serializeDocumentRetentionProperties(v.RetentionProperties, ok); err != nil { diff --git a/service/timestreamwrite/types/enums.go b/service/timestreamwrite/types/enums.go index 8fa1f7e73d3..44bfbfb3c92 100644 --- a/service/timestreamwrite/types/enums.go +++ b/service/timestreamwrite/types/enums.go @@ -22,10 +22,12 @@ type MeasureValueType string // Enum values for MeasureValueType const ( - MeasureValueTypeDouble MeasureValueType = "DOUBLE" - MeasureValueTypeBigint MeasureValueType = "BIGINT" - MeasureValueTypeVarchar MeasureValueType = "VARCHAR" - MeasureValueTypeBoolean MeasureValueType = "BOOLEAN" + MeasureValueTypeDouble MeasureValueType = "DOUBLE" + MeasureValueTypeBigint MeasureValueType = "BIGINT" + MeasureValueTypeVarchar MeasureValueType = "VARCHAR" + MeasureValueTypeBoolean MeasureValueType = "BOOLEAN" + MeasureValueTypeTimestamp MeasureValueType = "TIMESTAMP" + MeasureValueTypeMulti MeasureValueType = "MULTI" ) // Values returns all known values for MeasureValueType. Note that this can be @@ -37,6 +39,26 @@ func (MeasureValueType) Values() []MeasureValueType { "BIGINT", "VARCHAR", "BOOLEAN", + "TIMESTAMP", + "MULTI", + } +} + +type S3EncryptionOption string + +// Enum values for S3EncryptionOption +const ( + S3EncryptionOptionSseS3 S3EncryptionOption = "SSE_S3" + S3EncryptionOptionSseKms S3EncryptionOption = "SSE_KMS" +) + +// Values returns all known values for S3EncryptionOption. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (S3EncryptionOption) Values() []S3EncryptionOption { + return []S3EncryptionOption{ + "SSE_S3", + "SSE_KMS", } } diff --git a/service/timestreamwrite/types/errors.go b/service/timestreamwrite/types/errors.go index fd41caa33c3..f31be071f4f 100644 --- a/service/timestreamwrite/types/errors.go +++ b/service/timestreamwrite/types/errors.go @@ -89,7 +89,18 @@ func (e *InvalidEndpointException) ErrorFault() smithy.ErrorFault { return smith // // * Records with // duplicate data where there are multiple records with the same dimensions, -// timestamps, and measure names but different measure values. +// timestamps, and measure names but: +// +// * Measure values are different +// +// * Version is +// not present in the request or the value of version in the new record is equal to +// or lower than the existing value +// +// In this case, if Timestream rejects data, the +// ExistingVersion field in the RejectedRecords response will indicate the current +// record’s version. To force an update, you can resend the request with a version +// for the record set to a value greater than the ExistingVersion. // // * Records with // timestamps that lie outside the retention duration of the memory store @@ -98,7 +109,7 @@ func (e *InvalidEndpointException) ErrorFault() smithy.ErrorFault { return smith // Records with dimensions or measures that exceed the Timestream defined // limits. // -// For more information, see Access Management +// For more information, see Quotas // (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) in // the Timestream Developer Guide. type RejectedRecordsException struct { diff --git a/service/timestreamwrite/types/types.go b/service/timestreamwrite/types/types.go index 0fa54659d83..96d9d60444b 100644 --- a/service/timestreamwrite/types/types.go +++ b/service/timestreamwrite/types/types.go @@ -75,6 +75,60 @@ type Endpoint struct { noSmithyDocumentSerde } +// The location to write error reports for records rejected, asynchronously, during +// magnetic store writes. +type MagneticStoreRejectedDataLocation struct { + + // Configuration of an S3 location to write error reports for records rejected, + // asynchronously, during magnetic store writes. + S3Configuration *S3Configuration + + noSmithyDocumentSerde +} + +// The set of properties on a table for configuring magnetic store writes. +type MagneticStoreWriteProperties struct { + + // A flag to enable magnetic store writes. + // + // This member is required. + EnableMagneticStoreWrites *bool + + // The location to write error reports for records rejected asynchronously during + // magnetic store writes. + MagneticStoreRejectedDataLocation *MagneticStoreRejectedDataLocation + + noSmithyDocumentSerde +} + +// MeasureValue represents the data attribute of the time series. For example, the +// CPU utilization of an EC2 instance or the RPM of a wind turbine are measures. +// MeasureValue has both name and value. MeasureValue is only allowed for type +// MULTI. Using MULTI type, you can pass multiple data attributes associated with +// the same time series in a single record +type MeasureValue struct { + + // Name of the MeasureValue. For constraints on MeasureValue names, refer to + // Naming Constraints + // (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html#limits.naming) + // in the Timestream developer guide. + // + // This member is required. + Name *string + + // Contains the data type of the MeasureValue for the time series data point. + // + // This member is required. + Type MeasureValueType + + // Value for the MeasureValue. + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + // Record represents a time series data point being written into Timestream. Each // record contains an array of dimensions. Dimensions represent the meta data // attributes of a time series data point such as the instance name or availability @@ -83,7 +137,12 @@ type Endpoint struct { // instance. A record also contains the measure value and the value type which is // the data type of the measure value. In addition, the record contains the // timestamp when the measure was collected that the timestamp unit which -// represents the granularity of the timestamp. +// represents the granularity of the timestamp. Records have a Version field, which +// is a 64-bit long that you can use for updating data points. Writes of a +// duplicate record with the same dimension, timestamp, and measure name but +// different measure value will only succeed if the Version attribute of the record +// in the write request is higher than that of the existing record. Timestream +// defaults to a Version of 1 for records without the Version field. type Record struct { // Contains the list of dimensions for time series data points. @@ -97,8 +156,14 @@ type Record struct { MeasureValue *string // Contains the data type of the measure value for the time series data point. + // Default type is DOUBLE. MeasureValueType MeasureValueType + // Contains the list of MeasureValue for time series data points. This is only + // allowed for type MULTI. For scalar values, use MeasureValue attribute of the + // Record directly. + MeasureValues []MeasureValue + // Contains the time at which the measure value for the data point was collected. // The time value plus the unit provides the time elapsed since the epoch. For // example, if the time value is 12345 and the unit is ms, then 12345 ms have @@ -106,18 +171,35 @@ type Record struct { Time *string // The granularity of the timestamp unit. It indicates if the time value is in - // seconds, milliseconds, nanoseconds or other supported values. + // seconds, milliseconds, nanoseconds or other supported values. Default is + // MILLISECONDS. TimeUnit TimeUnit // 64-bit attribute used for record updates. Write requests for duplicate data with // a higher version number will update the existing measure value and version. In // cases where the measure value is the same, Version will still be updated . - // Default value is to 1. + // Default value is 1. Version must be 1 or greater, or you will receive a + // ValidationException error. Version int64 noSmithyDocumentSerde } +// Information on the records ingested by this request. +type RecordsIngested struct { + + // Count of records ingested into the magnetic store. + MagneticStore int32 + + // Count of records ingested into the memory store. + MemoryStore int32 + + // Total count of successfully ingested records. + Total int32 + + noSmithyDocumentSerde +} + // Records that were not successfully inserted into Timestream due to data // validation issues that must be resolved prior to reinserting time series data // into the system. @@ -132,15 +214,26 @@ type RejectedRecord struct { // causes of failure include: // // * Records with duplicate data where there are - // multiple records with the same dimensions, timestamps, and measure names but - // different measure values. - // - // * Records with timestamps that lie outside the - // retention duration of the memory store When the retention window is updated, you - // will receive a RejectedRecords exception if you immediately try to ingest data - // within the new window. To avoid a RejectedRecords exception, wait until the - // duration of the new window to ingest new data. For further information, see - // Best Practices for Configuring Timestream + // multiple records with the same dimensions, timestamps, and measure names but: + // + // * + // Measure values are different + // + // * Version is not present in the request or the + // value of version in the new record is equal to or lower than the existing + // value + // + // If Timestream rejects data for this case, the ExistingVersion field in + // the RejectedRecords response will indicate the current record’s version. To + // force an update, you can resend the request with a version for the record set to + // a value greater than the ExistingVersion. + // + // * Records with timestamps that lie + // outside the retention duration of the memory store When the retention window is + // updated, you will receive a RejectedRecords exception if you immediately try to + // ingest data within the new window. To avoid a RejectedRecords exception, wait + // until the duration of the new window to ingest new data. For further + // information, see Best Practices for Configuring Timestream // (https://docs.aws.amazon.com/timestream/latest/developerguide/best-practices.html#configuration) // and the explanation of how storage works in Timestream // (https://docs.aws.amazon.com/timestream/latest/developerguide/storage.html). @@ -178,6 +271,25 @@ type RetentionProperties struct { noSmithyDocumentSerde } +// Configuration specifing an S3 location. +type S3Configuration struct { + + // >Bucket name of the customer S3 bucket. + BucketName *string + + // Encryption option for the customer s3 location. Options are S3 server side + // encryption with an S3-managed key or KMS managed key. + EncryptionOption S3EncryptionOption + + // KMS key id for the customer s3 location when encrypting with a KMS managed key. + KmsKeyId *string + + // Object key preview for the customer S3 location. + ObjectKeyPrefix *string + + noSmithyDocumentSerde +} + // Table represents a database table in Timestream. Tables contain one or more // related time series. You can modify the retention duration of the memory store // and the magnetic store for a table. @@ -195,6 +307,9 @@ type Table struct { // The time when the Timestream table was last updated. LastUpdatedTime *time.Time + // Contains properties to set on the table when enabling magnetic store writes. + MagneticStoreWriteProperties *MagneticStoreWriteProperties + // The retention duration for the memory store and magnetic store. RetentionProperties *RetentionProperties diff --git a/service/timestreamwrite/validators.go b/service/timestreamwrite/validators.go index 587e9b6bc28..8d3d5874aa1 100644 --- a/service/timestreamwrite/validators.go +++ b/service/timestreamwrite/validators.go @@ -333,6 +333,59 @@ func validateDimensions(v []types.Dimension) error { } } +func validateMagneticStoreWriteProperties(v *types.MagneticStoreWriteProperties) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MagneticStoreWriteProperties"} + if v.EnableMagneticStoreWrites == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnableMagneticStoreWrites")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMeasureValue(v *types.MeasureValue) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MeasureValue"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMeasureValues(v []types.MeasureValue) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MeasureValues"} + for i := range v { + if err := validateMeasureValue(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateRecord(v *types.Record) error { if v == nil { return nil @@ -343,6 +396,11 @@ func validateRecord(v *types.Record) error { invalidParams.AddNested("Dimensions", err.(smithy.InvalidParamsError)) } } + if v.MeasureValues != nil { + if err := validateMeasureValues(v.MeasureValues); err != nil { + invalidParams.AddNested("MeasureValues", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -455,6 +513,11 @@ func validateOpCreateTableInput(v *CreateTableInput) error { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } + if v.MagneticStoreWriteProperties != nil { + if err := validateMagneticStoreWriteProperties(v.MagneticStoreWriteProperties); err != nil { + invalidParams.AddNested("MagneticStoreWriteProperties", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -612,13 +675,16 @@ func validateOpUpdateTableInput(v *UpdateTableInput) error { if v.TableName == nil { invalidParams.Add(smithy.NewErrParamRequired("TableName")) } - if v.RetentionProperties == nil { - invalidParams.Add(smithy.NewErrParamRequired("RetentionProperties")) - } else if v.RetentionProperties != nil { + if v.RetentionProperties != nil { if err := validateRetentionProperties(v.RetentionProperties); err != nil { invalidParams.AddNested("RetentionProperties", err.(smithy.InvalidParamsError)) } } + if v.MagneticStoreWriteProperties != nil { + if err := validateMagneticStoreWriteProperties(v.MagneticStoreWriteProperties); err != nil { + invalidParams.AddNested("MagneticStoreWriteProperties", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/transcribestreaming/api_op_StartStreamTranscription.go b/service/transcribestreaming/api_op_StartStreamTranscription.go index b4b2d35663f..41e22aec8b6 100644 --- a/service/transcribestreaming/api_op_StartStreamTranscription.go +++ b/service/transcribestreaming/api_op_StartStreamTranscription.go @@ -49,18 +49,13 @@ func (c *Client) StartStreamTranscription(ctx context.Context, params *StartStre type StartStreamTranscriptionInput struct { - // Indicates the source language used in the input audio stream. - // - // This member is required. - LanguageCode types.LanguageCode - // The encoding used for the input audio. // // This member is required. MediaEncoding types.MediaEncoding - // The sample rate, in Hertz, of the input audio. We suggest that you use 8,000 Hz - // for low quality audio and 16,000 Hz for high quality audio. + // The sample rate, in Hertz (Hz), of the input audio. We suggest that you use + // 8,000 Hz for low quality audio and 16,000 Hz or higher for high quality audio. // // This member is required. MediaSampleRateHertz *int32 @@ -79,8 +74,8 @@ type StartStreamTranscriptionInput struct { // returns a BadRequestException. ContentRedactionType types.ContentRedactionType - // When true, instructs Amazon Transcribe to process each audio channel separately - // and then merge the transcription output of each channel into a single + // When true, instructs Amazon Transcribe to process each audio channel separately, + // then merges the transcription output of each channel into a single // transcription. Amazon Transcribe also produces a transcription of each item. An // item includes the start time, end time, and any alternative transcriptions. You // can't set both ShowSpeakerLabel and EnableChannelIdentification in the same @@ -94,9 +89,24 @@ type StartStreamTranscriptionInput struct { // in another partial result. EnablePartialResultsStabilization bool + // Optional. Set this value to true to enable language identification for your + // media stream. + IdentifyLanguage bool + + // The language code of the input audio stream. + LanguageCode types.LanguageCode + // The name of the language model you want to use. LanguageModelName *string + // An object containing a list of languages that might be present in your audio. + // You must provide two or more language codes to help Amazon Transcribe identify + // the correct language of your media stream with the highest possible accuracy. + // You can only select one variant per language; for example, you can't include + // both en-US and en-UK in the same request. You can only use this parameter if + // you've set IdentifyLanguage to truein your request. + LanguageOptions *string + // The number of channels that are in your audio stream. NumberOfChannels *int32 @@ -108,23 +118,30 @@ type StartStreamTranscriptionInput struct { // List the PII entity types you want to identify or redact. In order to specify // entity types, you must have either ContentIdentificationType or - // ContentRedactionType enabled. PiiEntityTypes is an optional parameter with a - // default value of ALL. + // ContentRedactionType enabled. PIIEntityTypes must be comma-separated; the + // available values are: BANK_ACCOUNT_NUMBER, BANK_ROUTING, CREDIT_DEBIT_NUMBER, + // CREDIT_DEBIT_CVV, CREDIT_DEBIT_EXPIRY, PIN, EMAIL, ADDRESS, NAME, PHONE, SSN, + // and ALL. PiiEntityTypes is an optional parameter with a default value of ALL. PiiEntityTypes *string + // Optional. From the subset of languages codes you provided for LanguageOptions, + // you can select one preferred language for your transcription. You can only use + // this parameter if you've set IdentifyLanguage to truein your request. + PreferredLanguage types.LanguageCode + // A identifier for the transcription session. Use this parameter when you want to // retry a session. If you don't provide a session ID, Amazon Transcribe will // generate one for you and return it in the response. SessionId *string - // When true, enables speaker identification in your real-time stream. + // When true, enables speaker identification in your media stream. ShowSpeakerLabel bool // The manner in which you use your vocabulary filter to filter words in your // transcript. Remove removes filtered words from your transcription results. Mask // masks filtered words with a *** in your transcription results. Tag keeps the // filtered words in your transcription results and tags them. The tag appears as - // VocabularyFilterMatch equal to True + // VocabularyFilterMatch equal to True. VocabularyFilterMethod types.VocabularyFilterMethod // The name of the vocabulary filter you've created that is unique to your account. @@ -151,16 +168,24 @@ type StartStreamTranscriptionOutput struct { // Shows whether partial results stabilization has been enabled in the stream. EnablePartialResultsStabilization bool - // The language code for the input audio stream. + // The language code of the language identified in your media stream. + IdentifyLanguage bool + + // The language code of the input audio stream. LanguageCode types.LanguageCode + // The name of the language model used in your media stream. LanguageModelName *string + // The language codes used in the identification of your media stream's predominant + // language. + LanguageOptions *string + // The encoding used for the input audio stream. MediaEncoding types.MediaEncoding - // The sample rate for the input audio stream. Use 8,000 Hz for low quality audio - // and 16,000 Hz for high quality audio. + // The sample rate, in Hertz (Hz), for the input audio stream. Use 8,000 Hz for low + // quality audio and 16,000 Hz or higher for high quality audio. MediaSampleRateHertz *int32 // The number of channels identified in the stream. @@ -173,6 +198,9 @@ type StartStreamTranscriptionOutput struct { // Lists the PII entity types you specified in your request. PiiEntityTypes *string + // The preferred language you specified in your request. + PreferredLanguage types.LanguageCode + // An identifier for the streaming transcription. RequestId *string @@ -182,10 +210,10 @@ type StartStreamTranscriptionOutput struct { // Shows whether speaker identification was enabled in the stream. ShowSpeakerLabel bool - // The vocabulary filtering method used in the real-time stream. + // The vocabulary filtering method used in the media stream. VocabularyFilterMethod types.VocabularyFilterMethod - // The name of the vocabulary filter used in your real-time stream. + // The name of the vocabulary filter used in your media stream. VocabularyFilterName *string // The name of the vocabulary used when processing the stream. diff --git a/service/transcribestreaming/deserializers.go b/service/transcribestreaming/deserializers.go index 53f38ba59ea..6a2da591835 100644 --- a/service/transcribestreaming/deserializers.go +++ b/service/transcribestreaming/deserializers.go @@ -339,6 +339,15 @@ func awsRestjson1_deserializeOpHttpBindingsStartStreamTranscriptionOutput(v *Sta v.EnablePartialResultsStabilization = vv } + if headerValues := response.Header.Values("x-amzn-transcribe-identify-language"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + vv, err := strconv.ParseBool(headerValues[0]) + if err != nil { + return err + } + v.IdentifyLanguage = vv + } + if headerValues := response.Header.Values("x-amzn-transcribe-language-code"); len(headerValues) != 0 { headerValues[0] = strings.TrimSpace(headerValues[0]) v.LanguageCode = types.LanguageCode(headerValues[0]) @@ -349,6 +358,11 @@ func awsRestjson1_deserializeOpHttpBindingsStartStreamTranscriptionOutput(v *Sta v.LanguageModelName = ptr.String(headerValues[0]) } + if headerValues := response.Header.Values("x-amzn-transcribe-language-options"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.LanguageOptions = ptr.String(headerValues[0]) + } + if headerValues := response.Header.Values("x-amzn-transcribe-media-encoding"); len(headerValues) != 0 { headerValues[0] = strings.TrimSpace(headerValues[0]) v.MediaEncoding = types.MediaEncoding(headerValues[0]) @@ -382,6 +396,11 @@ func awsRestjson1_deserializeOpHttpBindingsStartStreamTranscriptionOutput(v *Sta v.PiiEntityTypes = ptr.String(headerValues[0]) } + if headerValues := response.Header.Values("x-amzn-transcribe-preferred-language"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.PreferredLanguage = types.LanguageCode(headerValues[0]) + } + if headerValues := response.Header.Values("x-amzn-request-id"); len(headerValues) != 0 { headerValues[0] = strings.TrimSpace(headerValues[0]) v.RequestId = ptr.String(headerValues[0]) @@ -2225,6 +2244,114 @@ func awsRestjson1_deserializeDocumentItemList(v *[]types.Item, value interface{} return nil } +func awsRestjson1_deserializeDocumentLanguageIdentification(v *[]types.LanguageWithScore, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.LanguageWithScore + if *v == nil { + cv = []types.LanguageWithScore{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.LanguageWithScore + destAddr := &col + if err := awsRestjson1_deserializeDocumentLanguageWithScore(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentLanguageWithScore(v **types.LanguageWithScore, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LanguageWithScore + if *v == nil { + sv = &types.LanguageWithScore{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LanguageCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LanguageCode to be of type string, got %T instead", value) + } + sv.LanguageCode = types.LanguageCode(jtv) + } + + case "Score": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Score = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Score = f64 + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentResult(v **types.Result, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -2304,6 +2431,20 @@ func awsRestjson1_deserializeDocumentResult(v **types.Result, value interface{}) sv.IsPartial = jtv } + case "LanguageCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LanguageCode to be of type string, got %T instead", value) + } + sv.LanguageCode = types.LanguageCode(jtv) + } + + case "LanguageIdentification": + if err := awsRestjson1_deserializeDocumentLanguageIdentification(&sv.LanguageIdentification, value); err != nil { + return err + } + case "ResultId": if value != nil { jtv, ok := value.(string) diff --git a/service/transcribestreaming/serializers.go b/service/transcribestreaming/serializers.go index c569f0ee1ef..0fd80758163 100644 --- a/service/transcribestreaming/serializers.go +++ b/service/transcribestreaming/serializers.go @@ -188,6 +188,11 @@ func awsRestjson1_serializeOpHttpBindingsStartStreamTranscriptionInput(v *StartS encoder.SetHeader(locationName).Boolean(v.EnablePartialResultsStabilization) } + if v.IdentifyLanguage { + locationName := "X-Amzn-Transcribe-Identify-Language" + encoder.SetHeader(locationName).Boolean(v.IdentifyLanguage) + } + if len(v.LanguageCode) > 0 { locationName := "X-Amzn-Transcribe-Language-Code" encoder.SetHeader(locationName).String(string(v.LanguageCode)) @@ -198,6 +203,11 @@ func awsRestjson1_serializeOpHttpBindingsStartStreamTranscriptionInput(v *StartS encoder.SetHeader(locationName).String(*v.LanguageModelName) } + if v.LanguageOptions != nil && len(*v.LanguageOptions) > 0 { + locationName := "X-Amzn-Transcribe-Language-Options" + encoder.SetHeader(locationName).String(*v.LanguageOptions) + } + if len(v.MediaEncoding) > 0 { locationName := "X-Amzn-Transcribe-Media-Encoding" encoder.SetHeader(locationName).String(string(v.MediaEncoding)) @@ -223,6 +233,11 @@ func awsRestjson1_serializeOpHttpBindingsStartStreamTranscriptionInput(v *StartS encoder.SetHeader(locationName).String(*v.PiiEntityTypes) } + if len(v.PreferredLanguage) > 0 { + locationName := "X-Amzn-Transcribe-Preferred-Language" + encoder.SetHeader(locationName).String(string(v.PreferredLanguage)) + } + if v.SessionId != nil && len(*v.SessionId) > 0 { locationName := "X-Amzn-Transcribe-Session-Id" encoder.SetHeader(locationName).String(*v.SessionId) diff --git a/service/transcribestreaming/types/types.go b/service/transcribestreaming/types/types.go index 3a673f6e2ff..ef4bc09cae9 100644 --- a/service/transcribestreaming/types/types.go +++ b/service/transcribestreaming/types/types.go @@ -65,7 +65,7 @@ func (*AudioStreamMemberAudioEvent) isAudioStream() {} // The entity identified as personally identifiable information (PII). type Entity struct { - // The category of of information identified in this entity; for example, PII. + // The category of information identified in this entity; for example, PII. Category *string // A value between zero and one that Amazon Transcribe assigns to PII identified in @@ -92,7 +92,7 @@ type Entity struct { // A word, phrase, or punctuation mark that is transcribed from the input audio. type Item struct { - // A value between 0 and 1 for an item that is a confidence score that Amazon + // A value between zero and one for an item that is a confidence score that Amazon // Transcribe assigns to each word or phrase that it transcribes. Confidence *float64 @@ -103,8 +103,8 @@ type Item struct { // resulted in the item. EndTime float64 - // If speaker identification is enabled, shows the speakers identified in the - // real-time stream. + // If speaker identification is enabled, shows the speakers identified in the media + // stream. Speaker *string // If partial result stabilization has been enabled, indicates whether the word or @@ -121,13 +121,29 @@ type Item struct { Type ItemType // Indicates whether a word in the item matches a word in the vocabulary filter - // you've chosen for your real-time stream. If true then a word in the item matches + // you've chosen for your media stream. If true then a word in the item matches // your vocabulary filter. VocabularyFilterMatch bool noSmithyDocumentSerde } +// The language codes of the identified languages and their associated confidence +// scores. The confidence score is a value between zero and one; a larger value +// indicates a higher confidence in the identified language. +type LanguageWithScore struct { + + // The language code of the language identified by Amazon Transcribe. + LanguageCode LanguageCode + + // The confidence score for the associated language code. Confidence scores are + // values between zero and one; larger values indicate a higher confidence in the + // identified language. + Score float64 + + noSmithyDocumentSerde +} + // A list of possible transcriptions for the audio. type MedicalAlternative struct { @@ -302,6 +318,12 @@ type Result struct { // transcription result for the segment. IsPartial bool + // The language code of the identified language in your media stream. + LanguageCode LanguageCode + + // The language code of the dominant language identified in your media. + LanguageIdentification []LanguageWithScore + // A unique identifier for the result. ResultId *string diff --git a/service/transcribestreaming/validators.go b/service/transcribestreaming/validators.go index 0f159e086e2..938f77e7455 100644 --- a/service/transcribestreaming/validators.go +++ b/service/transcribestreaming/validators.go @@ -89,9 +89,6 @@ func validateOpStartStreamTranscriptionInput(v *StartStreamTranscriptionInput) e return nil } invalidParams := smithy.InvalidParamsError{Context: "StartStreamTranscriptionInput"} - if len(v.LanguageCode) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("LanguageCode")) - } if v.MediaSampleRateHertz == nil { invalidParams.Add(smithy.NewErrParamRequired("MediaSampleRateHertz")) } diff --git a/service/translate/api_op_GetParallelData.go b/service/translate/api_op_GetParallelData.go index ed0c52a6daa..1bc3f181ec1 100644 --- a/service/translate/api_op_GetParallelData.go +++ b/service/translate/api_op_GetParallelData.go @@ -47,14 +47,13 @@ type GetParallelDataOutput struct { // The Amazon S3 location of the most recent parallel data input file that was // successfully imported into Amazon Translate. The location is returned as a - // presigned URL that has a 30 minute expiration. Amazon Translate doesn't scan - // parallel data input files for the risk of CSV injection attacks. CSV injection - // occurs when a .csv or .tsv file is altered so that a record contains malicious - // code. The record begins with a special character, such as =, +, -, or @. When - // the file is opened in a spreadsheet program, the program might interpret the - // record as a formula and run the code within it. Before you download a parallel - // data input file from Amazon S3, ensure that you recognize the file and trust its - // creator. + // presigned URL that has a 30 minute expiration. Amazon Translate doesn't scan all + // input files for the risk of CSV injection attacks. CSV injection occurs when a + // .csv or .tsv file is altered so that a record contains malicious code. The + // record begins with a special character, such as =, +, -, or @. When the file is + // opened in a spreadsheet program, the program might interpret the record as a + // formula and run the code within it. Before you download an input file from + // Amazon S3, ensure that you recognize the file and trust its creator. DataLocation *types.ParallelDataDataLocation // The Amazon S3 location of a file that provides any errors or warnings that were diff --git a/service/translate/api_op_GetTerminology.go b/service/translate/api_op_GetTerminology.go index e4016c10ad8..0f9c0fb5974 100644 --- a/service/translate/api_op_GetTerminology.go +++ b/service/translate/api_op_GetTerminology.go @@ -53,8 +53,15 @@ type GetTerminologyOutput struct { // presigned URL to that has a 30 minute expiration. AuxiliaryDataLocation *types.TerminologyDataLocation - // The data location of the custom terminology being retrieved. The custom - // terminology file is returned in a presigned url that has a 30 minute expiration. + // The Amazon S3 location of the most recent custom terminology input file that was + // successfully imported into Amazon Translate. The location is returned as a + // presigned URL that has a 30 minute expiration. Amazon Translate doesn't scan all + // input files for the risk of CSV injection attacks. CSV injection occurs when a + // .csv or .tsv file is altered so that a record contains malicious code. The + // record begins with a special character, such as =, +, -, or @. When the file is + // opened in a spreadsheet program, the program might interpret the record as a + // formula and run the code within it. Before you download an input file from + // Amazon S3, ensure that you recognize the file and trust its creator. TerminologyDataLocation *types.TerminologyDataLocation // The properties of the custom terminology being retrieved. diff --git a/service/translate/api_op_StartTextTranslationJob.go b/service/translate/api_op_StartTextTranslationJob.go index bb42645ae14..efa49ca8718 100644 --- a/service/translate/api_op_StartTextTranslationJob.go +++ b/service/translate/api_op_StartTextTranslationJob.go @@ -86,6 +86,10 @@ type StartTextTranslationJobInput struct { // information, see customizing-translations-parallel-data. ParallelDataNames []string + // Settings to configure your translation output, including the option to mask + // profane words and phrases. + Settings *types.TranslationSettings + // The name of a custom terminology resource to add to the translation job. This // resource lists examples source terms and the desired translation for each term. // This parameter accepts only one custom terminology resource. For a list of diff --git a/service/translate/api_op_TranslateText.go b/service/translate/api_op_TranslateText.go index 52e0592699e..ba9a518c6a6 100644 --- a/service/translate/api_op_TranslateText.go +++ b/service/translate/api_op_TranslateText.go @@ -53,6 +53,10 @@ type TranslateTextInput struct { // This member is required. Text *string + // Settings to configure your translation output, including the option to mask + // profane words and phrases. + Settings *types.TranslationSettings + // The name of the terminology list file to be used in the TranslateText request. // You can use 1 terminology list at most in a TranslateText request. Terminology // lists can contain a maximum of 256 terms. @@ -78,6 +82,9 @@ type TranslateTextOutput struct { // This member is required. TranslatedText *string + // Settings that configure the translation output. + AppliedSettings *types.TranslationSettings + // The names of the custom terminologies applied to the input text by Amazon // Translate for the translated text response. AppliedTerminologies []types.AppliedTerminology diff --git a/service/translate/deserializers.go b/service/translate/deserializers.go index 95eca98c793..7a3976220b4 100644 --- a/service/translate/deserializers.go +++ b/service/translate/deserializers.go @@ -3791,6 +3791,11 @@ func awsAwsjson11_deserializeDocumentTextTranslationJobProperties(v **types.Text return err } + case "Settings": + if err := awsAwsjson11_deserializeDocumentTranslationSettings(&sv.Settings, value); err != nil { + return err + } + case "SourceLanguageCode": if value != nil { jtv, ok := value.(string) @@ -3909,6 +3914,46 @@ func awsAwsjson11_deserializeDocumentTooManyRequestsException(v **types.TooManyR return nil } +func awsAwsjson11_deserializeDocumentTranslationSettings(v **types.TranslationSettings, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.TranslationSettings + if *v == nil { + sv = &types.TranslationSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Profanity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Profanity to be of type string, got %T instead", value) + } + sv.Profanity = types.Profanity(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentUnsupportedLanguagePairException(v **types.UnsupportedLanguagePairException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -4494,6 +4539,11 @@ func awsAwsjson11_deserializeOpDocumentTranslateTextOutput(v **TranslateTextOutp for key, value := range shape { switch key { + case "AppliedSettings": + if err := awsAwsjson11_deserializeDocumentTranslationSettings(&sv.AppliedSettings, value); err != nil { + return err + } + case "AppliedTerminologies": if err := awsAwsjson11_deserializeDocumentAppliedTerminologyList(&sv.AppliedTerminologies, value); err != nil { return err diff --git a/service/translate/serializers.go b/service/translate/serializers.go index c672c3ebfde..87b8a4efd11 100644 --- a/service/translate/serializers.go +++ b/service/translate/serializers.go @@ -926,6 +926,18 @@ func awsAwsjson11_serializeDocumentTextTranslationJobFilter(v *types.TextTransla return nil } +func awsAwsjson11_serializeDocumentTranslationSettings(v *types.TranslationSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Profanity) > 0 { + ok := object.Key("Profanity") + ok.String(string(v.Profanity)) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentCreateParallelDataInput(v *CreateParallelDataInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1161,6 +1173,13 @@ func awsAwsjson11_serializeOpDocumentStartTextTranslationJobInput(v *StartTextTr } } + if v.Settings != nil { + ok := object.Key("Settings") + if err := awsAwsjson11_serializeDocumentTranslationSettings(v.Settings, ok); err != nil { + return err + } + } + if v.SourceLanguageCode != nil { ok := object.Key("SourceLanguageCode") ok.String(*v.SourceLanguageCode) @@ -1199,6 +1218,13 @@ func awsAwsjson11_serializeOpDocumentTranslateTextInput(v *TranslateTextInput, v object := value.Object() defer object.Close() + if v.Settings != nil { + ok := object.Key("Settings") + if err := awsAwsjson11_serializeDocumentTranslationSettings(v.Settings, ok); err != nil { + return err + } + } + if v.SourceLanguageCode != nil { ok := object.Key("SourceLanguageCode") ok.String(*v.SourceLanguageCode) diff --git a/service/translate/types/enums.go b/service/translate/types/enums.go index 0ed584c603c..caa605d82c5 100644 --- a/service/translate/types/enums.go +++ b/service/translate/types/enums.go @@ -124,6 +124,22 @@ func (ParallelDataStatus) Values() []ParallelDataStatus { } } +type Profanity string + +// Enum values for Profanity +const ( + ProfanityMask Profanity = "MASK" +) + +// Values returns all known values for Profanity. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (Profanity) Values() []Profanity { + return []Profanity{ + "MASK", + } +} + type TerminologyDataFormat string // Enum values for TerminologyDataFormat diff --git a/service/translate/types/types.go b/service/translate/types/types.go index 1930018b680..8c8a90ab7d1 100644 --- a/service/translate/types/types.go +++ b/service/translate/types/types.go @@ -29,14 +29,13 @@ type AppliedTerminology struct { // The encryption key used to encrypt this object. type EncryptionKey struct { - // The Amazon Resource Name (ARN) of the encryption key being used to encrypt the - // custom terminology. + // The Amazon Resource Name (ARN) of the encryption key being used to encrypt this + // object. // // This member is required. Id *string - // The type of encryption key used by Amazon Translate to encrypt custom - // terminologies. + // The type of encryption key used by Amazon Translate to encrypt this object. // // This member is required. Type EncryptionKeyType @@ -147,13 +146,12 @@ type ParallelDataDataLocation struct { // The Amazon S3 location of the parallel data input file. The location is returned // as a presigned URL to that has a 30 minute expiration. Amazon Translate doesn't - // scan parallel data input files for the risk of CSV injection attacks. CSV - // injection occurs when a .csv or .tsv file is altered so that a record contains - // malicious code. The record begins with a special character, such as =, +, -, or - // @. When the file is opened in a spreadsheet program, the program might interpret - // the record as a formula and run the code within it. Before you download a - // parallel data input file from Amazon S3, ensure that you recognize the file and - // trust its creator. + // scan all input files for the risk of CSV injection attacks. CSV injection occurs + // when a .csv or .tsv file is altered so that a record contains malicious code. + // The record begins with a special character, such as =, +, -, or @. When the file + // is opened in a spreadsheet program, the program might interpret the record as a + // formula and run the code within it. Before you download an input file from + // Amazon S3, ensure that you recognize the file and trust its creator. // // This member is required. Location *string @@ -278,7 +276,15 @@ type TerminologyData struct { // The location of the custom terminology data. type TerminologyDataLocation struct { - // The location of the custom terminology data. + // The Amazon S3 location of the most recent custom terminology input file that was + // successfully imported into Amazon Translate. The location is returned as a + // presigned URL that has a 30 minute expiration. Amazon Translate doesn't scan all + // input files for the risk of CSV injection attacks. CSV injection occurs when a + // .csv or .tsv file is altered so that a record contains malicious code. The + // record begins with a special character, such as =, +, -, or @. When the file is + // opened in a spreadsheet program, the program might interpret the record as a + // formula and run the code within it. Before you download an input file from + // Amazon S3, ensure that you recognize the file and trust its creator. // // This member is required. Location *string @@ -408,6 +414,9 @@ type TextTranslationJobProperties struct { // translation job. ParallelDataNames []string + // Settings that configure the translation output. + Settings *TranslationSettings + // The language code of the language of the source text. The language must be a // language supported by Amazon Translate. SourceLanguageCode *string @@ -427,4 +436,20 @@ type TextTranslationJobProperties struct { noSmithyDocumentSerde } +// Settings that configure the translation output. +type TranslationSettings struct { + + // Enable the profanity setting if you want Amazon Translate to mask profane words + // and phrases in your translation output. To mask profane words and phrases, + // Amazon Translate replaces them with the grawlix string “?$#@$“. This 5-character + // sequence is used for each profane word or phrase, regardless of the length or + // number of words. Amazon Translate does not detect profanity in all of its + // supported languages. For languages that support profanity detection, see + // Supported Languages and Language Codes in the Amazon Translate Developer Guide + // (https://docs.aws.amazon.com/translate/latest/dg/what-is.html#what-is-languages). + Profanity Profanity + + noSmithyDocumentSerde +} + type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/wellarchitected/api_op_AssociateLenses.go b/service/wellarchitected/api_op_AssociateLenses.go index 73e1d771ed3..7fec5c49cb2 100644 --- a/service/wellarchitected/api_op_AssociateLenses.go +++ b/service/wellarchitected/api_op_AssociateLenses.go @@ -10,7 +10,12 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Associate a lens to a workload. +// Associate a lens to a workload. Up to 10 lenses can be associated with a +// workload in a single API operation. A maximum of 20 lenses can be associated +// with a workload. Disclaimer By accessing and/or applying custom lenses created +// by another Amazon Web Services user or account, you acknowledge that custom +// lenses created by other users and shared with you are Third Party Content as +// defined in the Amazon Web Services Customer Agreement. func (c *Client) AssociateLenses(ctx context.Context, params *AssociateLensesInput, optFns ...func(*Options)) (*AssociateLensesOutput, error) { if params == nil { params = &AssociateLensesInput{} @@ -29,13 +34,14 @@ func (c *Client) AssociateLenses(ctx context.Context, params *AssociateLensesInp // Input to associate lens reviews. type AssociateLensesInput struct { - // List of lens aliases to associate or disassociate with a workload. Identify a - // lens using its LensSummary$LensAlias. + // List of lens aliases to associate or disassociate with a workload. Up to 10 + // lenses can be specified. Identify a lens using its LensSummary$LensAlias. // // This member is required. LensAliases []string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. // // This member is required. WorkloadId *string diff --git a/service/wellarchitected/api_op_CreateLensShare.go b/service/wellarchitected/api_op_CreateLensShare.go new file mode 100644 index 00000000000..3f080bbcd40 --- /dev/null +++ b/service/wellarchitected/api_op_CreateLensShare.go @@ -0,0 +1,183 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package wellarchitected + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Create a lens share. The owner of a lens can share it with other Amazon Web +// Services accounts and IAM users in the same Amazon Web Services Region. Shared +// access to a lens is not removed until the lens invitation is deleted. Disclaimer +// By sharing your custom lenses with other Amazon Web Services accounts, you +// acknowledge that Amazon Web Services will make your custom lenses available to +// those other accounts. Those other accounts may continue to access and use your +// shared custom lenses even if you delete the custom lenses from your own Amazon +// Web Services account or terminate your Amazon Web Services account. +func (c *Client) CreateLensShare(ctx context.Context, params *CreateLensShareInput, optFns ...func(*Options)) (*CreateLensShareOutput, error) { + if params == nil { + params = &CreateLensShareInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateLensShare", params, optFns, c.addOperationCreateLensShareMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateLensShareOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateLensShareInput struct { + + // A unique case-sensitive string used to ensure that this request is idempotent + // (executes only once). You should not reuse the same token for other requests. If + // you retry a request with the same client request token and the same parameters + // after it has completed successfully, the result of the original request is + // returned. This token is listed as required, however, if you do not specify it, + // the Amazon Web Services SDKs automatically generate one for you. If you are not + // using the Amazon Web Services SDK or the CLI, you must provide this token or the + // request will fail. + // + // This member is required. + ClientRequestToken *string + + // The alias of the lens, for example, serverless. Each lens is identified by its + // LensSummary$LensAlias. + // + // This member is required. + LensAlias *string + + // The Amazon Web Services account ID or IAM role with which the workload is + // shared. + // + // This member is required. + SharedWith *string + + noSmithyDocumentSerde +} + +type CreateLensShareOutput struct { + + // The ID associated with the workload share. + ShareId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateLensShareMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateLensShare{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateLensShare{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opCreateLensShareMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateLensShareValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLensShare(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateLensShare struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateLensShare) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateLensShare) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*CreateLensShareInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateLensShareInput ") + } + + if input.ClientRequestToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientRequestToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateLensShareMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateLensShare{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateLensShare(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "wellarchitected", + OperationName: "CreateLensShare", + } +} diff --git a/service/wellarchitected/api_op_CreateLensVersion.go b/service/wellarchitected/api_op_CreateLensVersion.go new file mode 100644 index 00000000000..3ebd133b8cc --- /dev/null +++ b/service/wellarchitected/api_op_CreateLensVersion.go @@ -0,0 +1,184 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package wellarchitected + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Create a new lens version. A lens can have up to 100 versions. After a lens has +// been imported, create a new lens version to publish it. The owner of a lens can +// share the lens with other Amazon Web Services accounts and IAM users in the same +// Amazon Web Services Region. Only the owner of a lens can delete it. +func (c *Client) CreateLensVersion(ctx context.Context, params *CreateLensVersionInput, optFns ...func(*Options)) (*CreateLensVersionOutput, error) { + if params == nil { + params = &CreateLensVersionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateLensVersion", params, optFns, c.addOperationCreateLensVersionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateLensVersionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateLensVersionInput struct { + + // A unique case-sensitive string used to ensure that this request is idempotent + // (executes only once). You should not reuse the same token for other requests. If + // you retry a request with the same client request token and the same parameters + // after it has completed successfully, the result of the original request is + // returned. This token is listed as required, however, if you do not specify it, + // the Amazon Web Services SDKs automatically generate one for you. If you are not + // using the Amazon Web Services SDK or the CLI, you must provide this token or the + // request will fail. + // + // This member is required. + ClientRequestToken *string + + // The alias of the lens, for example, serverless. Each lens is identified by its + // LensSummary$LensAlias. + // + // This member is required. + LensAlias *string + + // The version of the lens being created. + // + // This member is required. + LensVersion *string + + // Set to true if this new major lens version. + IsMajorVersion bool + + noSmithyDocumentSerde +} + +type CreateLensVersionOutput struct { + + // The ARN for the lens. + LensArn *string + + // The version of the lens. + LensVersion *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateLensVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateLensVersion{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateLensVersion{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opCreateLensVersionMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateLensVersionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLensVersion(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateLensVersion struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateLensVersion) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateLensVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*CreateLensVersionInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateLensVersionInput ") + } + + if input.ClientRequestToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientRequestToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateLensVersionMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateLensVersion{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateLensVersion(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "wellarchitected", + OperationName: "CreateLensVersion", + } +} diff --git a/service/wellarchitected/api_op_CreateMilestone.go b/service/wellarchitected/api_op_CreateMilestone.go index 0ae1257a736..88506cee7b8 100644 --- a/service/wellarchitected/api_op_CreateMilestone.go +++ b/service/wellarchitected/api_op_CreateMilestone.go @@ -35,8 +35,9 @@ type CreateMilestoneInput struct { // you retry a request with the same client request token and the same parameters // after it has completed successfully, the result of the original request is // returned. This token is listed as required, however, if you do not specify it, - // the AWS SDKs automatically generate one for you. If you are not using the AWS - // SDK or the AWS CLI, you must provide this token or the request will fail. + // the Amazon Web Services SDKs automatically generate one for you. If you are not + // using the Amazon Web Services SDK or the CLI, you must provide this token or the + // request will fail. // // This member is required. ClientRequestToken *string @@ -47,7 +48,8 @@ type CreateMilestoneInput struct { // This member is required. MilestoneName *string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. // // This member is required. WorkloadId *string @@ -61,7 +63,8 @@ type CreateMilestoneOutput struct { // The milestone number. A workload can have a maximum of 100 milestones. MilestoneNumber int32 - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. WorkloadId *string // Metadata pertaining to the operation's result. diff --git a/service/wellarchitected/api_op_CreateWorkload.go b/service/wellarchitected/api_op_CreateWorkload.go index e7d44b4e4d9..9e5efa5107a 100644 --- a/service/wellarchitected/api_op_CreateWorkload.go +++ b/service/wellarchitected/api_op_CreateWorkload.go @@ -13,10 +13,11 @@ import ( ) // Create a new workload. The owner of a workload can share the workload with other -// AWS accounts and IAM users in the same AWS Region. Only the owner of a workload -// can delete it. For more information, see Defining a Workload +// Amazon Web Services accounts and IAM users in the same Amazon Web Services +// Region. Only the owner of a workload can delete it. For more information, see +// Defining a Workload // (https://docs.aws.amazon.com/wellarchitected/latest/userguide/define-workload.html) -// in the AWS Well-Architected Tool User Guide. +// in the Well-Architected Tool User Guide. func (c *Client) CreateWorkload(ctx context.Context, params *CreateWorkloadInput, optFns ...func(*Options)) (*CreateWorkloadOutput, error) { if params == nil { params = &CreateWorkloadInput{} @@ -40,8 +41,9 @@ type CreateWorkloadInput struct { // you retry a request with the same client request token and the same parameters // after it has completed successfully, the result of the original request is // returned. This token is listed as required, however, if you do not specify it, - // the AWS SDKs automatically generate one for you. If you are not using the AWS - // SDK or the AWS CLI, you must provide this token or the request will fail. + // the Amazon Web Services SDKs automatically generate one for you. If you are not + // using the Amazon Web Services SDK or the CLI, you must provide this token or the + // request will fail. // // This member is required. ClientRequestToken *string @@ -68,20 +70,21 @@ type CreateWorkloadInput struct { // This member is required. ReviewOwner *string - // The name of the workload. The name must be unique within an account within a - // Region. Spaces and capitalization are ignored when checking for uniqueness. + // The name of the workload. The name must be unique within an account within an + // Amazon Web Services Region. Spaces and capitalization are ignored when checking + // for uniqueness. // // This member is required. WorkloadName *string - // The list of AWS account IDs associated with the workload. + // The list of Amazon Web Services account IDs associated with the workload. AccountIds []string // The URL of the architectural design for the workload. ArchitecturalDesign *string - // The list of AWS Regions associated with the workload, for example, us-east-2, or - // ca-central-1. + // The list of Amazon Web Services Regions associated with the workload, for + // example, us-east-2, or ca-central-1. AwsRegions []string // The industry for the workload. @@ -152,7 +155,7 @@ type CreateWorkloadInput struct { // Other IndustryType *string - // The list of non-AWS Regions associated with the workload. + // The list of non-Amazon Web Services Regions associated with the workload. NonAwsRegions []string // The notes associated with the workload. @@ -174,7 +177,8 @@ type CreateWorkloadOutput struct { // The ARN for the workload. WorkloadArn *string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. WorkloadId *string // Metadata pertaining to the operation's result. diff --git a/service/wellarchitected/api_op_CreateWorkloadShare.go b/service/wellarchitected/api_op_CreateWorkloadShare.go index 2419d295cdb..45cc516cce4 100644 --- a/service/wellarchitected/api_op_CreateWorkloadShare.go +++ b/service/wellarchitected/api_op_CreateWorkloadShare.go @@ -12,12 +12,12 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Create a workload share. The owner of a workload can share it with other AWS -// accounts and IAM users in the same AWS Region. Shared access to a workload is -// not removed until the workload invitation is deleted. For more information, see -// Sharing a Workload +// Create a workload share. The owner of a workload can share it with other Amazon +// Web Services accounts and IAM users in the same Amazon Web Services Region. +// Shared access to a workload is not removed until the workload invitation is +// deleted. For more information, see Sharing a Workload // (https://docs.aws.amazon.com/wellarchitected/latest/userguide/workloads-sharing.html) -// in the AWS Well-Architected Tool User Guide. +// in the Well-Architected Tool User Guide. func (c *Client) CreateWorkloadShare(ctx context.Context, params *CreateWorkloadShareInput, optFns ...func(*Options)) (*CreateWorkloadShareOutput, error) { if params == nil { params = &CreateWorkloadShareInput{} @@ -41,8 +41,9 @@ type CreateWorkloadShareInput struct { // you retry a request with the same client request token and the same parameters // after it has completed successfully, the result of the original request is // returned. This token is listed as required, however, if you do not specify it, - // the AWS SDKs automatically generate one for you. If you are not using the AWS - // SDK or the AWS CLI, you must provide this token or the request will fail. + // the Amazon Web Services SDKs automatically generate one for you. If you are not + // using the Amazon Web Services SDK or the CLI, you must provide this token or the + // request will fail. // // This member is required. ClientRequestToken *string @@ -52,12 +53,14 @@ type CreateWorkloadShareInput struct { // This member is required. PermissionType types.PermissionType - // The AWS account ID or IAM role with which the workload is shared. + // The Amazon Web Services account ID or IAM role with which the workload is + // shared. // // This member is required. SharedWith *string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. // // This member is required. WorkloadId *string @@ -71,7 +74,8 @@ type CreateWorkloadShareOutput struct { // The ID associated with the workload share. ShareId *string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. WorkloadId *string // Metadata pertaining to the operation's result. diff --git a/service/wellarchitected/api_op_DeleteLens.go b/service/wellarchitected/api_op_DeleteLens.go new file mode 100644 index 00000000000..4813b6740d8 --- /dev/null +++ b/service/wellarchitected/api_op_DeleteLens.go @@ -0,0 +1,180 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package wellarchitected + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/wellarchitected/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Delete an existing lens. Only the owner of a lens can delete it. After the lens +// is deleted, Amazon Web Services accounts and IAM users that you shared the lens +// with can continue to use it, but they will no longer be able to apply it to new +// workloads. Disclaimer By sharing your custom lenses with other Amazon Web +// Services accounts, you acknowledge that Amazon Web Services will make your +// custom lenses available to those other accounts. Those other accounts may +// continue to access and use your shared custom lenses even if you delete the +// custom lenses from your own Amazon Web Services account or terminate your Amazon +// Web Services account. +func (c *Client) DeleteLens(ctx context.Context, params *DeleteLensInput, optFns ...func(*Options)) (*DeleteLensOutput, error) { + if params == nil { + params = &DeleteLensInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteLens", params, optFns, c.addOperationDeleteLensMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteLensOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteLensInput struct { + + // A unique case-sensitive string used to ensure that this request is idempotent + // (executes only once). You should not reuse the same token for other requests. If + // you retry a request with the same client request token and the same parameters + // after it has completed successfully, the result of the original request is + // returned. This token is listed as required, however, if you do not specify it, + // the Amazon Web Services SDKs automatically generate one for you. If you are not + // using the Amazon Web Services SDK or the CLI, you must provide this token or the + // request will fail. + // + // This member is required. + ClientRequestToken *string + + // The alias of the lens, for example, serverless. Each lens is identified by its + // LensSummary$LensAlias. + // + // This member is required. + LensAlias *string + + // The status of the lens to be deleted. + // + // This member is required. + LensStatus types.LensStatusType + + noSmithyDocumentSerde +} + +type DeleteLensOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteLensMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteLens{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteLens{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opDeleteLensMiddleware(stack, options); err != nil { + return err + } + if err = addOpDeleteLensValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLens(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpDeleteLens struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpDeleteLens) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpDeleteLens) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*DeleteLensInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *DeleteLensInput ") + } + + if input.ClientRequestToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientRequestToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opDeleteLensMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteLens{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opDeleteLens(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "wellarchitected", + OperationName: "DeleteLens", + } +} diff --git a/service/wellarchitected/api_op_DeleteLensShare.go b/service/wellarchitected/api_op_DeleteLensShare.go new file mode 100644 index 00000000000..a6742e28907 --- /dev/null +++ b/service/wellarchitected/api_op_DeleteLensShare.go @@ -0,0 +1,178 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package wellarchitected + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Delete a lens share. After the lens share is deleted, Amazon Web Services +// accounts and IAM users that you shared the lens with can continue to use it, but +// they will no longer be able to apply it to new workloads. Disclaimer By sharing +// your custom lenses with other Amazon Web Services accounts, you acknowledge that +// Amazon Web Services will make your custom lenses available to those other +// accounts. Those other accounts may continue to access and use your shared custom +// lenses even if you delete the custom lenses from your own Amazon Web Services +// account or terminate your Amazon Web Services account. +func (c *Client) DeleteLensShare(ctx context.Context, params *DeleteLensShareInput, optFns ...func(*Options)) (*DeleteLensShareOutput, error) { + if params == nil { + params = &DeleteLensShareInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteLensShare", params, optFns, c.addOperationDeleteLensShareMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteLensShareOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteLensShareInput struct { + + // A unique case-sensitive string used to ensure that this request is idempotent + // (executes only once). You should not reuse the same token for other requests. If + // you retry a request with the same client request token and the same parameters + // after it has completed successfully, the result of the original request is + // returned. This token is listed as required, however, if you do not specify it, + // the Amazon Web Services SDKs automatically generate one for you. If you are not + // using the Amazon Web Services SDK or the CLI, you must provide this token or the + // request will fail. + // + // This member is required. + ClientRequestToken *string + + // The alias of the lens, for example, serverless. Each lens is identified by its + // LensSummary$LensAlias. + // + // This member is required. + LensAlias *string + + // The ID associated with the workload share. + // + // This member is required. + ShareId *string + + noSmithyDocumentSerde +} + +type DeleteLensShareOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteLensShareMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteLensShare{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteLensShare{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opDeleteLensShareMiddleware(stack, options); err != nil { + return err + } + if err = addOpDeleteLensShareValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLensShare(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpDeleteLensShare struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpDeleteLensShare) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpDeleteLensShare) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*DeleteLensShareInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *DeleteLensShareInput ") + } + + if input.ClientRequestToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientRequestToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opDeleteLensShareMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteLensShare{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opDeleteLensShare(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "wellarchitected", + OperationName: "DeleteLensShare", + } +} diff --git a/service/wellarchitected/api_op_DeleteWorkload.go b/service/wellarchitected/api_op_DeleteWorkload.go index 08eff9206bc..f8a0344a4af 100644 --- a/service/wellarchitected/api_op_DeleteWorkload.go +++ b/service/wellarchitected/api_op_DeleteWorkload.go @@ -35,13 +35,15 @@ type DeleteWorkloadInput struct { // you retry a request with the same client request token and the same parameters // after it has completed successfully, the result of the original request is // returned. This token is listed as required, however, if you do not specify it, - // the AWS SDKs automatically generate one for you. If you are not using the AWS - // SDK or the AWS CLI, you must provide this token or the request will fail. + // the Amazon Web Services SDKs automatically generate one for you. If you are not + // using the Amazon Web Services SDK or the CLI, you must provide this token or the + // request will fail. // // This member is required. ClientRequestToken *string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. // // This member is required. WorkloadId *string diff --git a/service/wellarchitected/api_op_DeleteWorkloadShare.go b/service/wellarchitected/api_op_DeleteWorkloadShare.go index 2bed3e5eed9..6e38c9b8725 100644 --- a/service/wellarchitected/api_op_DeleteWorkloadShare.go +++ b/service/wellarchitected/api_op_DeleteWorkloadShare.go @@ -35,8 +35,9 @@ type DeleteWorkloadShareInput struct { // you retry a request with the same client request token and the same parameters // after it has completed successfully, the result of the original request is // returned. This token is listed as required, however, if you do not specify it, - // the AWS SDKs automatically generate one for you. If you are not using the AWS - // SDK or the AWS CLI, you must provide this token or the request will fail. + // the Amazon Web Services SDKs automatically generate one for you. If you are not + // using the Amazon Web Services SDK or the CLI, you must provide this token or the + // request will fail. // // This member is required. ClientRequestToken *string @@ -46,7 +47,8 @@ type DeleteWorkloadShareInput struct { // This member is required. ShareId *string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. // // This member is required. WorkloadId *string diff --git a/service/wellarchitected/api_op_DisassociateLenses.go b/service/wellarchitected/api_op_DisassociateLenses.go index 92440f14df2..99f62d521b0 100644 --- a/service/wellarchitected/api_op_DisassociateLenses.go +++ b/service/wellarchitected/api_op_DisassociateLenses.go @@ -10,8 +10,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Disassociate a lens from a workload. The AWS Well-Architected Framework lens -// (wellarchitected) cannot be removed from a workload. +// Disassociate a lens from a workload. Up to 10 lenses can be disassociated from a +// workload in a single API operation. The Amazon Web Services Well-Architected +// Framework lens (wellarchitected) cannot be removed from a workload. func (c *Client) DisassociateLenses(ctx context.Context, params *DisassociateLensesInput, optFns ...func(*Options)) (*DisassociateLensesOutput, error) { if params == nil { params = &DisassociateLensesInput{} @@ -30,13 +31,14 @@ func (c *Client) DisassociateLenses(ctx context.Context, params *DisassociateLen // Input to disassociate lens reviews. type DisassociateLensesInput struct { - // List of lens aliases to associate or disassociate with a workload. Identify a - // lens using its LensSummary$LensAlias. + // List of lens aliases to associate or disassociate with a workload. Up to 10 + // lenses can be specified. Identify a lens using its LensSummary$LensAlias. // // This member is required. LensAliases []string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. // // This member is required. WorkloadId *string diff --git a/service/wellarchitected/api_op_ExportLens.go b/service/wellarchitected/api_op_ExportLens.go new file mode 100644 index 00000000000..30128adb7df --- /dev/null +++ b/service/wellarchitected/api_op_ExportLens.go @@ -0,0 +1,133 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package wellarchitected + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Export an existing lens. Lenses are defined in JSON. For more information, see +// JSON format specification +// (https://docs.aws.amazon.com/wellarchitected/latest/userguide/lenses-format-specification.html) +// in the Well-Architected Tool User Guide. Only the owner of a lens can export it. +// Disclaimer Do not include or gather personal identifiable information (PII) of +// end users or other identifiable individuals in or via your custom lenses. If +// your custom lens or those shared with you and used in your account do include or +// collect PII you are responsible for: ensuring that the included PII is processed +// in accordance with applicable law, providing adequate privacy notices, and +// obtaining necessary consents for processing such data. +func (c *Client) ExportLens(ctx context.Context, params *ExportLensInput, optFns ...func(*Options)) (*ExportLensOutput, error) { + if params == nil { + params = &ExportLensInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ExportLens", params, optFns, c.addOperationExportLensMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ExportLensOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ExportLensInput struct { + + // The alias of the lens, for example, serverless. Each lens is identified by its + // LensSummary$LensAlias. + // + // This member is required. + LensAlias *string + + // The lens version to be exported. + LensVersion *string + + noSmithyDocumentSerde +} + +type ExportLensOutput struct { + + // The JSON for the lens. + LensJSON *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationExportLensMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpExportLens{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpExportLens{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpExportLensValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opExportLens(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opExportLens(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "wellarchitected", + OperationName: "ExportLens", + } +} diff --git a/service/wellarchitected/api_op_GetAnswer.go b/service/wellarchitected/api_op_GetAnswer.go index c3cc8d322d8..802ad987a4f 100644 --- a/service/wellarchitected/api_op_GetAnswer.go +++ b/service/wellarchitected/api_op_GetAnswer.go @@ -41,7 +41,8 @@ type GetAnswerInput struct { // This member is required. QuestionId *string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. // // This member is required. WorkloadId *string @@ -62,10 +63,14 @@ type GetAnswerOutput struct { // LensSummary$LensAlias. LensAlias *string + // The ARN for the lens. + LensArn *string + // The milestone number. A workload can have a maximum of 100 milestones. MilestoneNumber int32 - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. WorkloadId *string // Metadata pertaining to the operation's result. diff --git a/service/wellarchitected/api_op_GetLens.go b/service/wellarchitected/api_op_GetLens.go new file mode 100644 index 00000000000..f7eba104528 --- /dev/null +++ b/service/wellarchitected/api_op_GetLens.go @@ -0,0 +1,125 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package wellarchitected + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/wellarchitected/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Get an existing lens. +func (c *Client) GetLens(ctx context.Context, params *GetLensInput, optFns ...func(*Options)) (*GetLensOutput, error) { + if params == nil { + params = &GetLensInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetLens", params, optFns, c.addOperationGetLensMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetLensOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetLensInput struct { + + // The alias of the lens, for example, serverless. Each lens is identified by its + // LensSummary$LensAlias. + // + // This member is required. + LensAlias *string + + // The lens version to be retrieved. + LensVersion *string + + noSmithyDocumentSerde +} + +type GetLensOutput struct { + + // A lens return object. + Lens *types.Lens + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetLensMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetLens{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetLens{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetLensValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLens(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetLens(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "wellarchitected", + OperationName: "GetLens", + } +} diff --git a/service/wellarchitected/api_op_GetLensReview.go b/service/wellarchitected/api_op_GetLensReview.go index 0d087cfcc86..fe680741a6f 100644 --- a/service/wellarchitected/api_op_GetLensReview.go +++ b/service/wellarchitected/api_op_GetLensReview.go @@ -36,7 +36,8 @@ type GetLensReviewInput struct { // This member is required. LensAlias *string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. // // This member is required. WorkloadId *string @@ -56,7 +57,8 @@ type GetLensReviewOutput struct { // The milestone number. A workload can have a maximum of 100 milestones. MilestoneNumber int32 - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. WorkloadId *string // Metadata pertaining to the operation's result. diff --git a/service/wellarchitected/api_op_GetLensReviewReport.go b/service/wellarchitected/api_op_GetLensReviewReport.go index f813650bf65..f1eb6b03e3f 100644 --- a/service/wellarchitected/api_op_GetLensReviewReport.go +++ b/service/wellarchitected/api_op_GetLensReviewReport.go @@ -36,7 +36,8 @@ type GetLensReviewReportInput struct { // This member is required. LensAlias *string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. // // This member is required. WorkloadId *string @@ -56,7 +57,8 @@ type GetLensReviewReportOutput struct { // The milestone number. A workload can have a maximum of 100 milestones. MilestoneNumber int32 - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. WorkloadId *string // Metadata pertaining to the operation's result. diff --git a/service/wellarchitected/api_op_GetLensVersionDifference.go b/service/wellarchitected/api_op_GetLensVersionDifference.go index 229be3a071d..8f383667003 100644 --- a/service/wellarchitected/api_op_GetLensVersionDifference.go +++ b/service/wellarchitected/api_op_GetLensVersionDifference.go @@ -29,17 +29,18 @@ func (c *Client) GetLensVersionDifference(ctx context.Context, params *GetLensVe type GetLensVersionDifferenceInput struct { - // The base version of the lens. - // - // This member is required. - BaseLensVersion *string - // The alias of the lens, for example, serverless. Each lens is identified by its // LensSummary$LensAlias. // // This member is required. LensAlias *string + // The base version of the lens. + BaseLensVersion *string + + // The lens version to target a difference for. + TargetLensVersion *string + noSmithyDocumentSerde } @@ -55,6 +56,12 @@ type GetLensVersionDifferenceOutput struct { // LensSummary$LensAlias. LensAlias *string + // The ARN for the lens. + LensArn *string + + // The target lens version for the lens. + TargetLensVersion *string + // The differences between the base and latest versions of the lens. VersionDifferences *types.VersionDifferences diff --git a/service/wellarchitected/api_op_GetMilestone.go b/service/wellarchitected/api_op_GetMilestone.go index 5f712313134..1704c602f46 100644 --- a/service/wellarchitected/api_op_GetMilestone.go +++ b/service/wellarchitected/api_op_GetMilestone.go @@ -35,7 +35,8 @@ type GetMilestoneInput struct { // This member is required. MilestoneNumber int32 - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. // // This member is required. WorkloadId *string @@ -49,7 +50,8 @@ type GetMilestoneOutput struct { // A milestone return object. Milestone *types.Milestone - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. WorkloadId *string // Metadata pertaining to the operation's result. diff --git a/service/wellarchitected/api_op_GetWorkload.go b/service/wellarchitected/api_op_GetWorkload.go index f303bd03529..0a77bbba885 100644 --- a/service/wellarchitected/api_op_GetWorkload.go +++ b/service/wellarchitected/api_op_GetWorkload.go @@ -30,7 +30,8 @@ func (c *Client) GetWorkload(ctx context.Context, params *GetWorkloadInput, optF // Input to get a workload. type GetWorkloadInput struct { - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. // // This member is required. WorkloadId *string diff --git a/service/wellarchitected/api_op_ImportLens.go b/service/wellarchitected/api_op_ImportLens.go new file mode 100644 index 00000000000..659e305bcac --- /dev/null +++ b/service/wellarchitected/api_op_ImportLens.go @@ -0,0 +1,190 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package wellarchitected + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/wellarchitected/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Import a new lens. The lens cannot be applied to workloads or shared with other +// Amazon Web Services accounts until it's published with CreateLensVersion Lenses +// are defined in JSON. For more information, see JSON format specification +// (https://docs.aws.amazon.com/wellarchitected/latest/userguide/lenses-format-specification.html) +// in the Well-Architected Tool User Guide. A custom lens cannot exceed 500 KB in +// size. Disclaimer Do not include or gather personal identifiable information +// (PII) of end users or other identifiable individuals in or via your custom +// lenses. If your custom lens or those shared with you and used in your account do +// include or collect PII you are responsible for: ensuring that the included PII +// is processed in accordance with applicable law, providing adequate privacy +// notices, and obtaining necessary consents for processing such data. +func (c *Client) ImportLens(ctx context.Context, params *ImportLensInput, optFns ...func(*Options)) (*ImportLensOutput, error) { + if params == nil { + params = &ImportLensInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ImportLens", params, optFns, c.addOperationImportLensMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ImportLensOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ImportLensInput struct { + + // A unique case-sensitive string used to ensure that this request is idempotent + // (executes only once). You should not reuse the same token for other requests. If + // you retry a request with the same client request token and the same parameters + // after it has completed successfully, the result of the original request is + // returned. This token is listed as required, however, if you do not specify it, + // the Amazon Web Services SDKs automatically generate one for you. If you are not + // using the Amazon Web Services SDK or the CLI, you must provide this token or the + // request will fail. + // + // This member is required. + ClientRequestToken *string + + // The JSON representation of a lens. + // + // This member is required. + JSONString *string + + // The alias of the lens, for example, serverless. Each lens is identified by its + // LensSummary$LensAlias. + LensAlias *string + + // Tags to associate to a lens. + Tags map[string]string + + noSmithyDocumentSerde +} + +type ImportLensOutput struct { + + // The ARN for the lens. + LensArn *string + + // The status of the imported lens. + Status types.ImportLensStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationImportLensMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpImportLens{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpImportLens{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opImportLensMiddleware(stack, options); err != nil { + return err + } + if err = addOpImportLensValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opImportLens(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpImportLens struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpImportLens) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpImportLens) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*ImportLensInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *ImportLensInput ") + } + + if input.ClientRequestToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientRequestToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opImportLensMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpImportLens{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opImportLens(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "wellarchitected", + OperationName: "ImportLens", + } +} diff --git a/service/wellarchitected/api_op_ListAnswers.go b/service/wellarchitected/api_op_ListAnswers.go index b28a2e0bc51..be2d128e4f7 100644 --- a/service/wellarchitected/api_op_ListAnswers.go +++ b/service/wellarchitected/api_op_ListAnswers.go @@ -37,7 +37,8 @@ type ListAnswersInput struct { // This member is required. LensAlias *string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. // // This member is required. WorkloadId *string @@ -68,13 +69,17 @@ type ListAnswersOutput struct { // LensSummary$LensAlias. LensAlias *string + // The ARN for the lens. + LensArn *string + // The milestone number. A workload can have a maximum of 100 milestones. MilestoneNumber int32 // The token to use to retrieve the next set of results. NextToken *string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. WorkloadId *string // Metadata pertaining to the operation's result. diff --git a/service/wellarchitected/api_op_ListLensReviewImprovements.go b/service/wellarchitected/api_op_ListLensReviewImprovements.go index cc90b549bb7..bccbab2ce7e 100644 --- a/service/wellarchitected/api_op_ListLensReviewImprovements.go +++ b/service/wellarchitected/api_op_ListLensReviewImprovements.go @@ -37,7 +37,8 @@ type ListLensReviewImprovementsInput struct { // This member is required. LensAlias *string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. // // This member is required. WorkloadId *string @@ -68,13 +69,17 @@ type ListLensReviewImprovementsOutput struct { // LensSummary$LensAlias. LensAlias *string + // The ARN for the lens. + LensArn *string + // The milestone number. A workload can have a maximum of 100 milestones. MilestoneNumber int32 // The token to use to retrieve the next set of results. NextToken *string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. WorkloadId *string // Metadata pertaining to the operation's result. diff --git a/service/wellarchitected/api_op_ListLensReviews.go b/service/wellarchitected/api_op_ListLensReviews.go index b0707755d65..4a1594dee61 100644 --- a/service/wellarchitected/api_op_ListLensReviews.go +++ b/service/wellarchitected/api_op_ListLensReviews.go @@ -31,7 +31,8 @@ func (c *Client) ListLensReviews(ctx context.Context, params *ListLensReviewsInp // Input to list lens reviews. type ListLensReviewsInput struct { - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. // // This member is required. WorkloadId *string @@ -60,7 +61,8 @@ type ListLensReviewsOutput struct { // The token to use to retrieve the next set of results. NextToken *string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. WorkloadId *string // Metadata pertaining to the operation's result. diff --git a/service/wellarchitected/api_op_ListLensShares.go b/service/wellarchitected/api_op_ListLensShares.go new file mode 100644 index 00000000000..cef24ebbf6b --- /dev/null +++ b/service/wellarchitected/api_op_ListLensShares.go @@ -0,0 +1,217 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package wellarchitected + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/wellarchitected/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List the lens shares associated with the lens. +func (c *Client) ListLensShares(ctx context.Context, params *ListLensSharesInput, optFns ...func(*Options)) (*ListLensSharesOutput, error) { + if params == nil { + params = &ListLensSharesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListLensShares", params, optFns, c.addOperationListLensSharesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListLensSharesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListLensSharesInput struct { + + // The alias of the lens, for example, serverless. Each lens is identified by its + // LensSummary$LensAlias. + // + // This member is required. + LensAlias *string + + // The maximum number of results to return for this request. + MaxResults int32 + + // The token to use to retrieve the next set of results. + NextToken *string + + // The Amazon Web Services account ID or IAM role with which the lens is shared. + SharedWithPrefix *string + + noSmithyDocumentSerde +} + +type ListLensSharesOutput struct { + + // A list of lens share summaries. + LensShareSummaries []types.LensShareSummary + + // The token to use to retrieve the next set of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListLensSharesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListLensShares{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListLensShares{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListLensSharesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLensShares(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListLensSharesAPIClient is a client that implements the ListLensShares +// operation. +type ListLensSharesAPIClient interface { + ListLensShares(context.Context, *ListLensSharesInput, ...func(*Options)) (*ListLensSharesOutput, error) +} + +var _ ListLensSharesAPIClient = (*Client)(nil) + +// ListLensSharesPaginatorOptions is the paginator options for ListLensShares +type ListLensSharesPaginatorOptions struct { + // The maximum number of results to return for this request. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListLensSharesPaginator is a paginator for ListLensShares +type ListLensSharesPaginator struct { + options ListLensSharesPaginatorOptions + client ListLensSharesAPIClient + params *ListLensSharesInput + nextToken *string + firstPage bool +} + +// NewListLensSharesPaginator returns a new ListLensSharesPaginator +func NewListLensSharesPaginator(client ListLensSharesAPIClient, params *ListLensSharesInput, optFns ...func(*ListLensSharesPaginatorOptions)) *ListLensSharesPaginator { + if params == nil { + params = &ListLensSharesInput{} + } + + options := ListLensSharesPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListLensSharesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListLensSharesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListLensShares page. +func (p *ListLensSharesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListLensSharesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.MaxResults = p.options.Limit + + result, err := p.client.ListLensShares(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListLensShares(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "wellarchitected", + OperationName: "ListLensShares", + } +} diff --git a/service/wellarchitected/api_op_ListLenses.go b/service/wellarchitected/api_op_ListLenses.go index b897c38adf1..96eefc1cd76 100644 --- a/service/wellarchitected/api_op_ListLenses.go +++ b/service/wellarchitected/api_op_ListLenses.go @@ -31,6 +31,15 @@ func (c *Client) ListLenses(ctx context.Context, params *ListLensesInput, optFns // Input to list lenses. type ListLensesInput struct { + // The full name of the lens. + LensName *string + + // The status of lenses to be returned. + LensStatus types.LensStatusType + + // The type of lenses to be returned. + LensType types.LensType + // The maximum number of results to return for this request. MaxResults int32 diff --git a/service/wellarchitected/api_op_ListMilestones.go b/service/wellarchitected/api_op_ListMilestones.go index 146e0d8a5bf..0d418c2c9bb 100644 --- a/service/wellarchitected/api_op_ListMilestones.go +++ b/service/wellarchitected/api_op_ListMilestones.go @@ -31,7 +31,8 @@ func (c *Client) ListMilestones(ctx context.Context, params *ListMilestonesInput // Input to list all milestones for a workload. type ListMilestonesInput struct { - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. // // This member is required. WorkloadId *string @@ -54,7 +55,8 @@ type ListMilestonesOutput struct { // The token to use to retrieve the next set of results. NextToken *string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. WorkloadId *string // Metadata pertaining to the operation's result. diff --git a/service/wellarchitected/api_op_ListNotifications.go b/service/wellarchitected/api_op_ListNotifications.go index 7c7dc8b65cd..c9f19fb135f 100644 --- a/service/wellarchitected/api_op_ListNotifications.go +++ b/service/wellarchitected/api_op_ListNotifications.go @@ -36,7 +36,8 @@ type ListNotificationsInput struct { // The token to use to retrieve the next set of results. NextToken *string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. WorkloadId *string noSmithyDocumentSerde diff --git a/service/wellarchitected/api_op_ListShareInvitations.go b/service/wellarchitected/api_op_ListShareInvitations.go index 295b17067d1..af850715666 100644 --- a/service/wellarchitected/api_op_ListShareInvitations.go +++ b/service/wellarchitected/api_op_ListShareInvitations.go @@ -31,12 +31,19 @@ func (c *Client) ListShareInvitations(ctx context.Context, params *ListShareInvi // Input for List Share Invitations type ListShareInvitationsInput struct { + // An optional string added to the beginning of each lens name returned in the + // results. + LensNamePrefix *string + // The maximum number of results to return for this request. MaxResults int32 // The token to use to retrieve the next set of results. NextToken *string + // The type of share invitations to be returned. + ShareResourceType types.ShareResourceType + // An optional string added to the beginning of each workload name returned in the // results. WorkloadNamePrefix *string diff --git a/service/wellarchitected/api_op_ListWorkloadShares.go b/service/wellarchitected/api_op_ListWorkloadShares.go index 340da98e679..a701560e902 100644 --- a/service/wellarchitected/api_op_ListWorkloadShares.go +++ b/service/wellarchitected/api_op_ListWorkloadShares.go @@ -31,7 +31,8 @@ func (c *Client) ListWorkloadShares(ctx context.Context, params *ListWorkloadSha // Input for List Workload Share type ListWorkloadSharesInput struct { - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. // // This member is required. WorkloadId *string @@ -42,7 +43,8 @@ type ListWorkloadSharesInput struct { // The token to use to retrieve the next set of results. NextToken *string - // The AWS account ID or IAM role with which the workload is shared. + // The Amazon Web Services account ID or IAM role with which the workload is + // shared. SharedWithPrefix *string noSmithyDocumentSerde @@ -54,7 +56,8 @@ type ListWorkloadSharesOutput struct { // The token to use to retrieve the next set of results. NextToken *string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. WorkloadId *string // A list of workload share summaries. diff --git a/service/wellarchitected/api_op_UpdateAnswer.go b/service/wellarchitected/api_op_UpdateAnswer.go index 16f9a00175e..6d54aaeed8c 100644 --- a/service/wellarchitected/api_op_UpdateAnswer.go +++ b/service/wellarchitected/api_op_UpdateAnswer.go @@ -41,7 +41,8 @@ type UpdateAnswerInput struct { // This member is required. QuestionId *string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. // // This member is required. WorkloadId *string @@ -76,7 +77,11 @@ type UpdateAnswerOutput struct { // LensSummary$LensAlias. LensAlias *string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ARN for the lens. + LensArn *string + + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. WorkloadId *string // Metadata pertaining to the operation's result. diff --git a/service/wellarchitected/api_op_UpdateLensReview.go b/service/wellarchitected/api_op_UpdateLensReview.go index 034e5749dc1..5a37554b559 100644 --- a/service/wellarchitected/api_op_UpdateLensReview.go +++ b/service/wellarchitected/api_op_UpdateLensReview.go @@ -36,7 +36,8 @@ type UpdateLensReviewInput struct { // This member is required. LensAlias *string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. // // This member is required. WorkloadId *string @@ -56,7 +57,8 @@ type UpdateLensReviewOutput struct { // A lens review of a question. LensReview *types.LensReview - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. WorkloadId *string // Metadata pertaining to the operation's result. diff --git a/service/wellarchitected/api_op_UpdateWorkload.go b/service/wellarchitected/api_op_UpdateWorkload.go index 4e4d495a21a..ec122289d7a 100644 --- a/service/wellarchitected/api_op_UpdateWorkload.go +++ b/service/wellarchitected/api_op_UpdateWorkload.go @@ -30,19 +30,20 @@ func (c *Client) UpdateWorkload(ctx context.Context, params *UpdateWorkloadInput // Input to update a workload. type UpdateWorkloadInput struct { - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. // // This member is required. WorkloadId *string - // The list of AWS account IDs associated with the workload. + // The list of Amazon Web Services account IDs associated with the workload. AccountIds []string // The URL of the architectural design for the workload. ArchitecturalDesign *string - // The list of AWS Regions associated with the workload, for example, us-east-2, or - // ca-central-1. + // The list of Amazon Web Services Regions associated with the workload, for + // example, us-east-2, or ca-central-1. AwsRegions []string // The description for the workload. @@ -128,7 +129,7 @@ type UpdateWorkloadInput struct { // is added. IsReviewOwnerUpdateAcknowledged bool - // The list of non-AWS Regions associated with the workload. + // The list of non-Amazon Web Services Regions associated with the workload. NonAwsRegions []string // The notes associated with the workload. @@ -142,8 +143,9 @@ type UpdateWorkloadInput struct { // primary group or individual that owns the workload review process. ReviewOwner *string - // The name of the workload. The name must be unique within an account within a - // Region. Spaces and capitalization are ignored when checking for uniqueness. + // The name of the workload. The name must be unique within an account within an + // Amazon Web Services Region. Spaces and capitalization are ignored when checking + // for uniqueness. WorkloadName *string noSmithyDocumentSerde diff --git a/service/wellarchitected/api_op_UpdateWorkloadShare.go b/service/wellarchitected/api_op_UpdateWorkloadShare.go index 8bb3185bed5..d6b46b50817 100644 --- a/service/wellarchitected/api_op_UpdateWorkloadShare.go +++ b/service/wellarchitected/api_op_UpdateWorkloadShare.go @@ -40,7 +40,8 @@ type UpdateWorkloadShareInput struct { // This member is required. ShareId *string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. // // This member is required. WorkloadId *string @@ -51,7 +52,8 @@ type UpdateWorkloadShareInput struct { // Input for Update Workload Share type UpdateWorkloadShareOutput struct { - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. WorkloadId *string // A workload share return object. diff --git a/service/wellarchitected/api_op_UpgradeLensReview.go b/service/wellarchitected/api_op_UpgradeLensReview.go index eb48ad54128..f3b0d547ad8 100644 --- a/service/wellarchitected/api_op_UpgradeLensReview.go +++ b/service/wellarchitected/api_op_UpgradeLensReview.go @@ -40,7 +40,8 @@ type UpgradeLensReviewInput struct { // This member is required. MilestoneName *string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. // // This member is required. WorkloadId *string @@ -50,8 +51,9 @@ type UpgradeLensReviewInput struct { // you retry a request with the same client request token and the same parameters // after it has completed successfully, the result of the original request is // returned. This token is listed as required, however, if you do not specify it, - // the AWS SDKs automatically generate one for you. If you are not using the AWS - // SDK or the AWS CLI, you must provide this token or the request will fail. + // the Amazon Web Services SDKs automatically generate one for you. If you are not + // using the Amazon Web Services SDK or the CLI, you must provide this token or the + // request will fail. ClientRequestToken *string noSmithyDocumentSerde diff --git a/service/wellarchitected/deserializers.go b/service/wellarchitected/deserializers.go index db53abe7938..aea4464e9a8 100644 --- a/service/wellarchitected/deserializers.go +++ b/service/wellarchitected/deserializers.go @@ -124,14 +124,14 @@ func awsRestjson1_deserializeOpErrorAssociateLenses(response *smithyhttp.Respons } } -type awsRestjson1_deserializeOpCreateMilestone struct { +type awsRestjson1_deserializeOpCreateLensShare struct { } -func (*awsRestjson1_deserializeOpCreateMilestone) ID() string { +func (*awsRestjson1_deserializeOpCreateLensShare) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateMilestone) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateLensShare) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -145,9 +145,9 @@ func (m *awsRestjson1_deserializeOpCreateMilestone) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateMilestone(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateLensShare(response, &metadata) } - output := &CreateMilestoneOutput{} + output := &CreateLensShareOutput{} out.Result = output var buff [1024]byte @@ -168,7 +168,7 @@ func (m *awsRestjson1_deserializeOpCreateMilestone) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateMilestoneOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateLensShareOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -181,7 +181,7 @@ func (m *awsRestjson1_deserializeOpCreateMilestone) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateMilestone(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateLensShare(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -253,7 +253,7 @@ func awsRestjson1_deserializeOpErrorCreateMilestone(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpDocumentCreateMilestoneOutput(v **CreateMilestoneOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateLensShareOutput(v **CreateLensShareOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -266,35 +266,22 @@ func awsRestjson1_deserializeOpDocumentCreateMilestoneOutput(v **CreateMilestone return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateMilestoneOutput + var sv *CreateLensShareOutput if *v == nil { - sv = &CreateMilestoneOutput{} + sv = &CreateLensShareOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "MilestoneNumber": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected MilestoneNumber to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.MilestoneNumber = int32(i64) - } - - case "WorkloadId": + case "ShareId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected WorkloadId to be of type string, got %T instead", value) + return fmt.Errorf("expected ShareId to be of type string, got %T instead", value) } - sv.WorkloadId = ptr.String(jtv) + sv.ShareId = ptr.String(jtv) } default: @@ -306,14 +293,14 @@ func awsRestjson1_deserializeOpDocumentCreateMilestoneOutput(v **CreateMilestone return nil } -type awsRestjson1_deserializeOpCreateWorkload struct { +type awsRestjson1_deserializeOpCreateLensVersion struct { } -func (*awsRestjson1_deserializeOpCreateWorkload) ID() string { +func (*awsRestjson1_deserializeOpCreateLensVersion) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateWorkload) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateLensVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -327,9 +314,9 @@ func (m *awsRestjson1_deserializeOpCreateWorkload) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateWorkload(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateLensVersion(response, &metadata) } - output := &CreateWorkloadOutput{} + output := &CreateLensVersionOutput{} out.Result = output var buff [1024]byte @@ -350,7 +337,7 @@ func (m *awsRestjson1_deserializeOpCreateWorkload) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateWorkloadOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateLensVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -363,7 +350,7 @@ func (m *awsRestjson1_deserializeOpCreateWorkload) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateWorkload(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateLensVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -413,6 +400,9 @@ func awsRestjson1_deserializeOpErrorCreateWorkload(response *smithyhttp.Response case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) @@ -432,7 +422,7 @@ func awsRestjson1_deserializeOpErrorCreateWorkload(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentCreateWorkloadOutput(v **CreateWorkloadOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateLensVersionOutput(v **CreateLensVersionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -445,31 +435,31 @@ func awsRestjson1_deserializeOpDocumentCreateWorkloadOutput(v **CreateWorkloadOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateWorkloadOutput + var sv *CreateLensVersionOutput if *v == nil { - sv = &CreateWorkloadOutput{} + sv = &CreateLensVersionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "WorkloadArn": + case "LensArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected WorkloadArn to be of type string, got %T instead", value) + return fmt.Errorf("expected LensArn to be of type string, got %T instead", value) } - sv.WorkloadArn = ptr.String(jtv) + sv.LensArn = ptr.String(jtv) } - case "WorkloadId": + case "LensVersion": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected WorkloadId to be of type string, got %T instead", value) + return fmt.Errorf("expected LensVersion to be of type string, got %T instead", value) } - sv.WorkloadId = ptr.String(jtv) + sv.LensVersion = ptr.String(jtv) } default: @@ -481,14 +471,14 @@ func awsRestjson1_deserializeOpDocumentCreateWorkloadOutput(v **CreateWorkloadOu return nil } -type awsRestjson1_deserializeOpCreateWorkloadShare struct { +type awsRestjson1_deserializeOpCreateMilestone struct { } -func (*awsRestjson1_deserializeOpCreateWorkloadShare) ID() string { +func (*awsRestjson1_deserializeOpCreateMilestone) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateWorkloadShare) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateMilestone) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -502,9 +492,9 @@ func (m *awsRestjson1_deserializeOpCreateWorkloadShare) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateWorkloadShare(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateMilestone(response, &metadata) } - output := &CreateWorkloadShareOutput{} + output := &CreateMilestoneOutput{} out.Result = output var buff [1024]byte @@ -525,7 +515,7 @@ func (m *awsRestjson1_deserializeOpCreateWorkloadShare) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateWorkloadShareOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateMilestoneOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -538,7 +528,7 @@ func (m *awsRestjson1_deserializeOpCreateWorkloadShare) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateWorkloadShare(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateMilestone(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -610,7 +600,7 @@ func awsRestjson1_deserializeOpErrorCreateWorkloadShare(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentCreateWorkloadShareOutput(v **CreateWorkloadShareOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateMilestoneOutput(v **CreateMilestoneOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -623,22 +613,26 @@ func awsRestjson1_deserializeOpDocumentCreateWorkloadShareOutput(v **CreateWorkl return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateWorkloadShareOutput + var sv *CreateMilestoneOutput if *v == nil { - sv = &CreateWorkloadShareOutput{} + sv = &CreateMilestoneOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ShareId": + case "MilestoneNumber": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected ShareId to be of type string, got %T instead", value) + return fmt.Errorf("expected MilestoneNumber to be json.Number, got %T instead", value) } - sv.ShareId = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MilestoneNumber = int32(i64) } case "WorkloadId": @@ -659,14 +653,14 @@ func awsRestjson1_deserializeOpDocumentCreateWorkloadShareOutput(v **CreateWorkl return nil } -type awsRestjson1_deserializeOpDeleteWorkload struct { +type awsRestjson1_deserializeOpCreateWorkload struct { } -func (*awsRestjson1_deserializeOpDeleteWorkload) ID() string { +func (*awsRestjson1_deserializeOpCreateWorkload) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteWorkload) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateWorkload) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -680,21 +674,43 @@ func (m *awsRestjson1_deserializeOpDeleteWorkload) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteWorkload(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateWorkload(response, &metadata) } - output := &DeleteWorkloadOutput{} + output := &CreateWorkloadOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreateWorkloadOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteWorkload(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateWorkload(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -744,8 +760,8 @@ func awsRestjson1_deserializeOpErrorDeleteWorkload(response *smithyhttp.Response case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -763,14 +779,63 @@ func awsRestjson1_deserializeOpErrorDeleteWorkload(response *smithyhttp.Response } } -type awsRestjson1_deserializeOpDeleteWorkloadShare struct { +func awsRestjson1_deserializeOpDocumentCreateWorkloadOutput(v **CreateWorkloadOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateWorkloadOutput + if *v == nil { + sv = &CreateWorkloadOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "WorkloadArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkloadArn to be of type string, got %T instead", value) + } + sv.WorkloadArn = ptr.String(jtv) + } + + case "WorkloadId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkloadId to be of type string, got %T instead", value) + } + sv.WorkloadId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpDeleteWorkloadShare) ID() string { +type awsRestjson1_deserializeOpCreateWorkloadShare struct { +} + +func (*awsRestjson1_deserializeOpCreateWorkloadShare) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteWorkloadShare) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateWorkloadShare) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -784,21 +849,43 @@ func (m *awsRestjson1_deserializeOpDeleteWorkloadShare) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteWorkloadShare(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateWorkloadShare(response, &metadata) } - output := &DeleteWorkloadShareOutput{} + output := &CreateWorkloadShareOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreateWorkloadShareOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteWorkloadShare(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateWorkloadShare(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -851,6 +938,9 @@ func awsRestjson1_deserializeOpErrorDeleteWorkloadShare(response *smithyhttp.Res case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -867,42 +957,1154 @@ func awsRestjson1_deserializeOpErrorDeleteWorkloadShare(response *smithyhttp.Res } } -type awsRestjson1_deserializeOpDisassociateLenses struct { -} - -func (*awsRestjson1_deserializeOpDisassociateLenses) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpDisassociateLenses) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err +func awsRestjson1_deserializeOpDocumentCreateWorkloadShareOutput(v **CreateWorkloadShareOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil } - response, ok := out.RawResponse.(*smithyhttp.Response) + shape, ok := value.(map[string]interface{}) if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + return fmt.Errorf("unexpected JSON type %v", value) } - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDisassociateLenses(response, &metadata) + var sv *CreateWorkloadShareOutput + if *v == nil { + sv = &CreateWorkloadShareOutput{} + } else { + sv = *v } - output := &DisassociateLensesOutput{} - out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + for key, value := range shape { + switch key { + case "ShareId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShareId to be of type string, got %T instead", value) + } + sv.ShareId = ptr.String(jtv) + } + + case "WorkloadId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkloadId to be of type string, got %T instead", value) + } + sv.WorkloadId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteLens struct { +} + +func (*awsRestjson1_deserializeOpDeleteLens) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteLens) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteLens(response, &metadata) + } + output := &DeleteLensOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteLens(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteLensShare struct { +} + +func (*awsRestjson1_deserializeOpDeleteLensShare) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteLensShare) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteLensShare(response, &metadata) + } + output := &DeleteLensShareOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteLensShare(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteWorkload struct { +} + +func (*awsRestjson1_deserializeOpDeleteWorkload) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteWorkload) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteWorkload(response, &metadata) + } + output := &DeleteWorkloadOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteWorkload(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteWorkloadShare struct { +} + +func (*awsRestjson1_deserializeOpDeleteWorkloadShare) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteWorkloadShare) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteWorkloadShare(response, &metadata) + } + output := &DeleteWorkloadShareOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteWorkloadShare(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDisassociateLenses struct { +} + +func (*awsRestjson1_deserializeOpDisassociateLenses) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDisassociateLenses) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDisassociateLenses(response, &metadata) + } + output := &DisassociateLensesOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDisassociateLenses(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpExportLens struct { +} + +func (*awsRestjson1_deserializeOpExportLens) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpExportLens) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorExportLens(response, &metadata) + } + output := &ExportLensOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentExportLensOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorExportLens(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentExportLensOutput(v **ExportLensOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ExportLensOutput + if *v == nil { + sv = &ExportLensOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LensJSON": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LensJSON to be of type string, got %T instead", value) + } + sv.LensJSON = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetAnswer struct { +} + +func (*awsRestjson1_deserializeOpGetAnswer) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetAnswer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetAnswer(response, &metadata) + } + output := &GetAnswerOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetAnswerOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetAnswer(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetAnswerOutput(v **GetAnswerOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetAnswerOutput + if *v == nil { + sv = &GetAnswerOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Answer": + if err := awsRestjson1_deserializeDocumentAnswer(&sv.Answer, value); err != nil { + return err + } + + case "LensAlias": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LensAlias to be of type string, got %T instead", value) + } + sv.LensAlias = ptr.String(jtv) + } + + case "LensArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LensArn to be of type string, got %T instead", value) + } + sv.LensArn = ptr.String(jtv) + } + + case "MilestoneNumber": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MilestoneNumber to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MilestoneNumber = int32(i64) + } + + case "WorkloadId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkloadId to be of type string, got %T instead", value) + } + sv.WorkloadId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetLens struct { +} + +func (*awsRestjson1_deserializeOpGetLens) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetLens) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetLens(response, &metadata) + } + output := &GetLensOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetLensOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetLens(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetLensOutput(v **GetLensOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetLensOutput + if *v == nil { + sv = &GetLensOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Lens": + if err := awsRestjson1_deserializeDocumentLens(&sv.Lens, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetLensReview struct { +} + +func (*awsRestjson1_deserializeOpGetLensReview) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetLensReview) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetLensReview(response, &metadata) + } + output := &GetLensReviewOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetLensReviewOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } return out, metadata, err } -func awsRestjson1_deserializeOpErrorDisassociateLenses(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetLensReview(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -946,9 +2148,6 @@ func awsRestjson1_deserializeOpErrorDisassociateLenses(response *smithyhttp.Resp case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -971,14 +2170,72 @@ func awsRestjson1_deserializeOpErrorDisassociateLenses(response *smithyhttp.Resp } } -type awsRestjson1_deserializeOpGetAnswer struct { +func awsRestjson1_deserializeOpDocumentGetLensReviewOutput(v **GetLensReviewOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetLensReviewOutput + if *v == nil { + sv = &GetLensReviewOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LensReview": + if err := awsRestjson1_deserializeDocumentLensReview(&sv.LensReview, value); err != nil { + return err + } + + case "MilestoneNumber": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MilestoneNumber to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MilestoneNumber = int32(i64) + } + + case "WorkloadId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkloadId to be of type string, got %T instead", value) + } + sv.WorkloadId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpGetAnswer) ID() string { +type awsRestjson1_deserializeOpGetLensReviewReport struct { +} + +func (*awsRestjson1_deserializeOpGetLensReviewReport) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetAnswer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetLensReviewReport) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -992,9 +2249,9 @@ func (m *awsRestjson1_deserializeOpGetAnswer) HandleDeserialize(ctx context.Cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetAnswer(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetLensReviewReport(response, &metadata) } - output := &GetAnswerOutput{} + output := &GetLensReviewReportOutput{} out.Result = output var buff [1024]byte @@ -1015,7 +2272,7 @@ func (m *awsRestjson1_deserializeOpGetAnswer) HandleDeserialize(ctx context.Cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetAnswerOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetLensReviewReportOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1028,7 +2285,7 @@ func (m *awsRestjson1_deserializeOpGetAnswer) HandleDeserialize(ctx context.Cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetAnswer(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetLensReviewReport(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1094,7 +2351,7 @@ func awsRestjson1_deserializeOpErrorGetAnswer(response *smithyhttp.Response, met } } -func awsRestjson1_deserializeOpDocumentGetAnswerOutput(v **GetAnswerOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetLensReviewReportOutput(v **GetLensReviewReportOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1107,29 +2364,20 @@ func awsRestjson1_deserializeOpDocumentGetAnswerOutput(v **GetAnswerOutput, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetAnswerOutput + var sv *GetLensReviewReportOutput if *v == nil { - sv = &GetAnswerOutput{} + sv = &GetLensReviewReportOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Answer": - if err := awsRestjson1_deserializeDocumentAnswer(&sv.Answer, value); err != nil { + case "LensReviewReport": + if err := awsRestjson1_deserializeDocumentLensReviewReport(&sv.LensReviewReport, value); err != nil { return err } - case "LensAlias": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LensAlias to be of type string, got %T instead", value) - } - sv.LensAlias = ptr.String(jtv) - } - case "MilestoneNumber": if value != nil { jtv, ok := value.(json.Number) @@ -1161,14 +2409,14 @@ func awsRestjson1_deserializeOpDocumentGetAnswerOutput(v **GetAnswerOutput, valu return nil } -type awsRestjson1_deserializeOpGetLensReview struct { +type awsRestjson1_deserializeOpGetLensVersionDifference struct { } -func (*awsRestjson1_deserializeOpGetLensReview) ID() string { +func (*awsRestjson1_deserializeOpGetLensVersionDifference) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetLensReview) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetLensVersionDifference) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1182,9 +2430,9 @@ func (m *awsRestjson1_deserializeOpGetLensReview) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetLensReview(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetLensVersionDifference(response, &metadata) } - output := &GetLensReviewOutput{} + output := &GetLensVersionDifferenceOutput{} out.Result = output var buff [1024]byte @@ -1205,7 +2453,7 @@ func (m *awsRestjson1_deserializeOpGetLensReview) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetLensReviewOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetLensVersionDifferenceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1218,7 +2466,7 @@ func (m *awsRestjson1_deserializeOpGetLensReview) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetLensReview(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetLensVersionDifference(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1284,7 +2532,7 @@ func awsRestjson1_deserializeOpErrorGetLensReview(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentGetLensReviewOutput(v **GetLensReviewOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetLensVersionDifferenceOutput(v **GetLensVersionDifferenceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1297,40 +2545,63 @@ func awsRestjson1_deserializeOpDocumentGetLensReviewOutput(v **GetLensReviewOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetLensReviewOutput + var sv *GetLensVersionDifferenceOutput if *v == nil { - sv = &GetLensReviewOutput{} + sv = &GetLensVersionDifferenceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "LensReview": - if err := awsRestjson1_deserializeDocumentLensReview(&sv.LensReview, value); err != nil { - return err + case "BaseLensVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LensVersion to be of type string, got %T instead", value) + } + sv.BaseLensVersion = ptr.String(jtv) } - case "MilestoneNumber": + case "LatestLensVersion": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected MilestoneNumber to be json.Number, got %T instead", value) + return fmt.Errorf("expected LensVersion to be of type string, got %T instead", value) } - i64, err := jtv.Int64() - if err != nil { - return err + sv.LatestLensVersion = ptr.String(jtv) + } + + case "LensAlias": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LensAlias to be of type string, got %T instead", value) } - sv.MilestoneNumber = int32(i64) + sv.LensAlias = ptr.String(jtv) } - case "WorkloadId": + case "LensArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected WorkloadId to be of type string, got %T instead", value) + return fmt.Errorf("expected LensArn to be of type string, got %T instead", value) } - sv.WorkloadId = ptr.String(jtv) + sv.LensArn = ptr.String(jtv) + } + + case "TargetLensVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LensVersion to be of type string, got %T instead", value) + } + sv.TargetLensVersion = ptr.String(jtv) + } + + case "VersionDifferences": + if err := awsRestjson1_deserializeDocumentVersionDifferences(&sv.VersionDifferences, value); err != nil { + return err } default: @@ -1342,14 +2613,14 @@ func awsRestjson1_deserializeOpDocumentGetLensReviewOutput(v **GetLensReviewOutp return nil } -type awsRestjson1_deserializeOpGetLensReviewReport struct { +type awsRestjson1_deserializeOpGetMilestone struct { } -func (*awsRestjson1_deserializeOpGetLensReviewReport) ID() string { +func (*awsRestjson1_deserializeOpGetMilestone) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetLensReviewReport) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetMilestone) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1363,9 +2634,9 @@ func (m *awsRestjson1_deserializeOpGetLensReviewReport) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetLensReviewReport(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetMilestone(response, &metadata) } - output := &GetLensReviewReportOutput{} + output := &GetMilestoneOutput{} out.Result = output var buff [1024]byte @@ -1386,7 +2657,7 @@ func (m *awsRestjson1_deserializeOpGetLensReviewReport) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetLensReviewReportOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetMilestoneOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1399,7 +2670,7 @@ func (m *awsRestjson1_deserializeOpGetLensReviewReport) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetLensReviewReport(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetMilestone(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1465,7 +2736,7 @@ func awsRestjson1_deserializeOpErrorGetLensReviewReport(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentGetLensReviewReportOutput(v **GetLensReviewReportOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetMilestoneOutput(v **GetMilestoneOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1478,33 +2749,20 @@ func awsRestjson1_deserializeOpDocumentGetLensReviewReportOutput(v **GetLensRevi return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetLensReviewReportOutput + var sv *GetMilestoneOutput if *v == nil { - sv = &GetLensReviewReportOutput{} + sv = &GetMilestoneOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "LensReviewReport": - if err := awsRestjson1_deserializeDocumentLensReviewReport(&sv.LensReviewReport, value); err != nil { + case "Milestone": + if err := awsRestjson1_deserializeDocumentMilestone(&sv.Milestone, value); err != nil { return err } - case "MilestoneNumber": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected MilestoneNumber to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.MilestoneNumber = int32(i64) - } - case "WorkloadId": if value != nil { jtv, ok := value.(string) @@ -1523,14 +2781,14 @@ func awsRestjson1_deserializeOpDocumentGetLensReviewReportOutput(v **GetLensRevi return nil } -type awsRestjson1_deserializeOpGetLensVersionDifference struct { +type awsRestjson1_deserializeOpGetWorkload struct { } -func (*awsRestjson1_deserializeOpGetLensVersionDifference) ID() string { +func (*awsRestjson1_deserializeOpGetWorkload) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetLensVersionDifference) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetWorkload) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1544,9 +2802,9 @@ func (m *awsRestjson1_deserializeOpGetLensVersionDifference) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetLensVersionDifference(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetWorkload(response, &metadata) } - output := &GetLensVersionDifferenceOutput{} + output := &GetWorkloadOutput{} out.Result = output var buff [1024]byte @@ -1567,7 +2825,7 @@ func (m *awsRestjson1_deserializeOpGetLensVersionDifference) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetLensVersionDifferenceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetWorkloadOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1580,7 +2838,7 @@ func (m *awsRestjson1_deserializeOpGetLensVersionDifference) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetLensVersionDifference(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetWorkload(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1646,7 +2904,7 @@ func awsRestjson1_deserializeOpErrorGetLensVersionDifference(response *smithyhtt } } -func awsRestjson1_deserializeOpDocumentGetLensVersionDifferenceOutput(v **GetLensVersionDifferenceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetWorkloadOutput(v **GetWorkloadOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1659,44 +2917,17 @@ func awsRestjson1_deserializeOpDocumentGetLensVersionDifferenceOutput(v **GetLen return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetLensVersionDifferenceOutput - if *v == nil { - sv = &GetLensVersionDifferenceOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "BaseLensVersion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LensVersion to be of type string, got %T instead", value) - } - sv.BaseLensVersion = ptr.String(jtv) - } - - case "LatestLensVersion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LensVersion to be of type string, got %T instead", value) - } - sv.LatestLensVersion = ptr.String(jtv) - } - - case "LensAlias": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LensAlias to be of type string, got %T instead", value) - } - sv.LensAlias = ptr.String(jtv) - } - - case "VersionDifferences": - if err := awsRestjson1_deserializeDocumentVersionDifferences(&sv.VersionDifferences, value); err != nil { + var sv *GetWorkloadOutput + if *v == nil { + sv = &GetWorkloadOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Workload": + if err := awsRestjson1_deserializeDocumentWorkload(&sv.Workload, value); err != nil { return err } @@ -1709,14 +2940,14 @@ func awsRestjson1_deserializeOpDocumentGetLensVersionDifferenceOutput(v **GetLen return nil } -type awsRestjson1_deserializeOpGetMilestone struct { +type awsRestjson1_deserializeOpImportLens struct { } -func (*awsRestjson1_deserializeOpGetMilestone) ID() string { +func (*awsRestjson1_deserializeOpImportLens) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetMilestone) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpImportLens) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1730,9 +2961,9 @@ func (m *awsRestjson1_deserializeOpGetMilestone) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetMilestone(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorImportLens(response, &metadata) } - output := &GetMilestoneOutput{} + output := &ImportLensOutput{} out.Result = output var buff [1024]byte @@ -1753,7 +2984,7 @@ func (m *awsRestjson1_deserializeOpGetMilestone) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetMilestoneOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentImportLensOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1766,7 +2997,7 @@ func (m *awsRestjson1_deserializeOpGetMilestone) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetMilestone(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorImportLens(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1810,12 +3041,18 @@ func awsRestjson1_deserializeOpErrorGetMilestone(response *smithyhttp.Response, case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -1832,7 +3069,7 @@ func awsRestjson1_deserializeOpErrorGetMilestone(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentGetMilestoneOutput(v **GetMilestoneOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentImportLensOutput(v **ImportLensOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1845,27 +3082,31 @@ func awsRestjson1_deserializeOpDocumentGetMilestoneOutput(v **GetMilestoneOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetMilestoneOutput + var sv *ImportLensOutput if *v == nil { - sv = &GetMilestoneOutput{} + sv = &ImportLensOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Milestone": - if err := awsRestjson1_deserializeDocumentMilestone(&sv.Milestone, value); err != nil { - return err + case "LensArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LensArn to be of type string, got %T instead", value) + } + sv.LensArn = ptr.String(jtv) } - case "WorkloadId": + case "Status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected WorkloadId to be of type string, got %T instead", value) + return fmt.Errorf("expected ImportLensStatus to be of type string, got %T instead", value) } - sv.WorkloadId = ptr.String(jtv) + sv.Status = types.ImportLensStatus(jtv) } default: @@ -1877,14 +3118,14 @@ func awsRestjson1_deserializeOpDocumentGetMilestoneOutput(v **GetMilestoneOutput return nil } -type awsRestjson1_deserializeOpGetWorkload struct { +type awsRestjson1_deserializeOpListAnswers struct { } -func (*awsRestjson1_deserializeOpGetWorkload) ID() string { +func (*awsRestjson1_deserializeOpListAnswers) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetWorkload) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListAnswers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1898,9 +3139,9 @@ func (m *awsRestjson1_deserializeOpGetWorkload) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetWorkload(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListAnswers(response, &metadata) } - output := &GetWorkloadOutput{} + output := &ListAnswersOutput{} out.Result = output var buff [1024]byte @@ -1921,7 +3162,7 @@ func (m *awsRestjson1_deserializeOpGetWorkload) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetWorkloadOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListAnswersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1934,7 +3175,7 @@ func (m *awsRestjson1_deserializeOpGetWorkload) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetWorkload(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListAnswers(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2000,7 +3241,7 @@ func awsRestjson1_deserializeOpErrorGetWorkload(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpDocumentGetWorkloadOutput(v **GetWorkloadOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListAnswersOutput(v **ListAnswersOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2013,20 +3254,69 @@ func awsRestjson1_deserializeOpDocumentGetWorkloadOutput(v **GetWorkloadOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetWorkloadOutput + var sv *ListAnswersOutput if *v == nil { - sv = &GetWorkloadOutput{} + sv = &ListAnswersOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Workload": - if err := awsRestjson1_deserializeDocumentWorkload(&sv.Workload, value); err != nil { + case "AnswerSummaries": + if err := awsRestjson1_deserializeDocumentAnswerSummaries(&sv.AnswerSummaries, value); err != nil { return err } + case "LensAlias": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LensAlias to be of type string, got %T instead", value) + } + sv.LensAlias = ptr.String(jtv) + } + + case "LensArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LensArn to be of type string, got %T instead", value) + } + sv.LensArn = ptr.String(jtv) + } + + case "MilestoneNumber": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MilestoneNumber to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MilestoneNumber = int32(i64) + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "WorkloadId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkloadId to be of type string, got %T instead", value) + } + sv.WorkloadId = ptr.String(jtv) + } + default: _, _ = key, value @@ -2036,14 +3326,14 @@ func awsRestjson1_deserializeOpDocumentGetWorkloadOutput(v **GetWorkloadOutput, return nil } -type awsRestjson1_deserializeOpListAnswers struct { +type awsRestjson1_deserializeOpListLenses struct { } -func (*awsRestjson1_deserializeOpListAnswers) ID() string { +func (*awsRestjson1_deserializeOpListLenses) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListAnswers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListLenses) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2057,9 +3347,9 @@ func (m *awsRestjson1_deserializeOpListAnswers) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListAnswers(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListLenses(response, &metadata) } - output := &ListAnswersOutput{} + output := &ListLensesOutput{} out.Result = output var buff [1024]byte @@ -2080,7 +3370,7 @@ func (m *awsRestjson1_deserializeOpListAnswers) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListAnswersOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListLensesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2093,7 +3383,7 @@ func (m *awsRestjson1_deserializeOpListAnswers) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListAnswers(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListLenses(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2140,9 +3430,6 @@ func awsRestjson1_deserializeOpErrorListAnswers(response *smithyhttp.Response, m case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -2159,7 +3446,7 @@ func awsRestjson1_deserializeOpErrorListAnswers(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpDocumentListAnswersOutput(v **ListAnswersOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListLensesOutput(v **ListLensesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2172,42 +3459,20 @@ func awsRestjson1_deserializeOpDocumentListAnswersOutput(v **ListAnswersOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListAnswersOutput + var sv *ListLensesOutput if *v == nil { - sv = &ListAnswersOutput{} + sv = &ListLensesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AnswerSummaries": - if err := awsRestjson1_deserializeDocumentAnswerSummaries(&sv.AnswerSummaries, value); err != nil { + case "LensSummaries": + if err := awsRestjson1_deserializeDocumentLensSummaries(&sv.LensSummaries, value); err != nil { return err } - case "LensAlias": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LensAlias to be of type string, got %T instead", value) - } - sv.LensAlias = ptr.String(jtv) - } - - case "MilestoneNumber": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected MilestoneNumber to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.MilestoneNumber = int32(i64) - } - case "NextToken": if value != nil { jtv, ok := value.(string) @@ -2217,15 +3482,6 @@ func awsRestjson1_deserializeOpDocumentListAnswersOutput(v **ListAnswersOutput, sv.NextToken = ptr.String(jtv) } - case "WorkloadId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected WorkloadId to be of type string, got %T instead", value) - } - sv.WorkloadId = ptr.String(jtv) - } - default: _, _ = key, value @@ -2235,14 +3491,14 @@ func awsRestjson1_deserializeOpDocumentListAnswersOutput(v **ListAnswersOutput, return nil } -type awsRestjson1_deserializeOpListLenses struct { +type awsRestjson1_deserializeOpListLensReviewImprovements struct { } -func (*awsRestjson1_deserializeOpListLenses) ID() string { +func (*awsRestjson1_deserializeOpListLensReviewImprovements) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListLenses) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListLensReviewImprovements) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2256,9 +3512,9 @@ func (m *awsRestjson1_deserializeOpListLenses) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListLenses(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListLensReviewImprovements(response, &metadata) } - output := &ListLensesOutput{} + output := &ListLensReviewImprovementsOutput{} out.Result = output var buff [1024]byte @@ -2279,7 +3535,7 @@ func (m *awsRestjson1_deserializeOpListLenses) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListLensesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListLensReviewImprovementsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2292,7 +3548,7 @@ func (m *awsRestjson1_deserializeOpListLenses) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorListLenses(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListLensReviewImprovements(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2339,6 +3595,9 @@ func awsRestjson1_deserializeOpErrorListLenses(response *smithyhttp.Response, me case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -2355,7 +3614,7 @@ func awsRestjson1_deserializeOpErrorListLenses(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentListLensesOutput(v **ListLensesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListLensReviewImprovementsOutput(v **ListLensReviewImprovementsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2368,20 +3627,51 @@ func awsRestjson1_deserializeOpDocumentListLensesOutput(v **ListLensesOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListLensesOutput + var sv *ListLensReviewImprovementsOutput if *v == nil { - sv = &ListLensesOutput{} + sv = &ListLensReviewImprovementsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "LensSummaries": - if err := awsRestjson1_deserializeDocumentLensSummaries(&sv.LensSummaries, value); err != nil { + case "ImprovementSummaries": + if err := awsRestjson1_deserializeDocumentImprovementSummaries(&sv.ImprovementSummaries, value); err != nil { return err } + case "LensAlias": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LensAlias to be of type string, got %T instead", value) + } + sv.LensAlias = ptr.String(jtv) + } + + case "LensArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LensArn to be of type string, got %T instead", value) + } + sv.LensArn = ptr.String(jtv) + } + + case "MilestoneNumber": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MilestoneNumber to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MilestoneNumber = int32(i64) + } + case "NextToken": if value != nil { jtv, ok := value.(string) @@ -2391,6 +3681,15 @@ func awsRestjson1_deserializeOpDocumentListLensesOutput(v **ListLensesOutput, va sv.NextToken = ptr.String(jtv) } + case "WorkloadId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkloadId to be of type string, got %T instead", value) + } + sv.WorkloadId = ptr.String(jtv) + } + default: _, _ = key, value @@ -2400,14 +3699,14 @@ func awsRestjson1_deserializeOpDocumentListLensesOutput(v **ListLensesOutput, va return nil } -type awsRestjson1_deserializeOpListLensReviewImprovements struct { +type awsRestjson1_deserializeOpListLensReviews struct { } -func (*awsRestjson1_deserializeOpListLensReviewImprovements) ID() string { +func (*awsRestjson1_deserializeOpListLensReviews) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListLensReviewImprovements) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListLensReviews) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2421,9 +3720,9 @@ func (m *awsRestjson1_deserializeOpListLensReviewImprovements) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListLensReviewImprovements(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListLensReviews(response, &metadata) } - output := &ListLensReviewImprovementsOutput{} + output := &ListLensReviewsOutput{} out.Result = output var buff [1024]byte @@ -2444,7 +3743,7 @@ func (m *awsRestjson1_deserializeOpListLensReviewImprovements) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListLensReviewImprovementsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListLensReviewsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2457,7 +3756,7 @@ func (m *awsRestjson1_deserializeOpListLensReviewImprovements) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorListLensReviewImprovements(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListLensReviews(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2523,7 +3822,7 @@ func awsRestjson1_deserializeOpErrorListLensReviewImprovements(response *smithyh } } -func awsRestjson1_deserializeOpDocumentListLensReviewImprovementsOutput(v **ListLensReviewImprovementsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListLensReviewsOutput(v **ListLensReviewsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2536,29 +3835,20 @@ func awsRestjson1_deserializeOpDocumentListLensReviewImprovementsOutput(v **List return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListLensReviewImprovementsOutput + var sv *ListLensReviewsOutput if *v == nil { - sv = &ListLensReviewImprovementsOutput{} + sv = &ListLensReviewsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ImprovementSummaries": - if err := awsRestjson1_deserializeDocumentImprovementSummaries(&sv.ImprovementSummaries, value); err != nil { + case "LensReviewSummaries": + if err := awsRestjson1_deserializeDocumentLensReviewSummaries(&sv.LensReviewSummaries, value); err != nil { return err } - case "LensAlias": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LensAlias to be of type string, got %T instead", value) - } - sv.LensAlias = ptr.String(jtv) - } - case "MilestoneNumber": if value != nil { jtv, ok := value.(json.Number) @@ -2599,14 +3889,14 @@ func awsRestjson1_deserializeOpDocumentListLensReviewImprovementsOutput(v **List return nil } -type awsRestjson1_deserializeOpListLensReviews struct { +type awsRestjson1_deserializeOpListLensShares struct { } -func (*awsRestjson1_deserializeOpListLensReviews) ID() string { +func (*awsRestjson1_deserializeOpListLensShares) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListLensReviews) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListLensShares) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2620,9 +3910,9 @@ func (m *awsRestjson1_deserializeOpListLensReviews) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListLensReviews(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListLensShares(response, &metadata) } - output := &ListLensReviewsOutput{} + output := &ListLensSharesOutput{} out.Result = output var buff [1024]byte @@ -2643,7 +3933,7 @@ func (m *awsRestjson1_deserializeOpListLensReviews) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListLensReviewsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListLensSharesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2656,7 +3946,7 @@ func (m *awsRestjson1_deserializeOpListLensReviews) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorListLensReviews(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListLensShares(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2722,7 +4012,7 @@ func awsRestjson1_deserializeOpErrorListLensReviews(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpDocumentListLensReviewsOutput(v **ListLensReviewsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListLensSharesOutput(v **ListLensSharesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2735,33 +4025,20 @@ func awsRestjson1_deserializeOpDocumentListLensReviewsOutput(v **ListLensReviews return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListLensReviewsOutput + var sv *ListLensSharesOutput if *v == nil { - sv = &ListLensReviewsOutput{} + sv = &ListLensSharesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "LensReviewSummaries": - if err := awsRestjson1_deserializeDocumentLensReviewSummaries(&sv.LensReviewSummaries, value); err != nil { + case "LensShareSummaries": + if err := awsRestjson1_deserializeDocumentLensShareSummaries(&sv.LensShareSummaries, value); err != nil { return err } - case "MilestoneNumber": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected MilestoneNumber to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.MilestoneNumber = int32(i64) - } - case "NextToken": if value != nil { jtv, ok := value.(string) @@ -2771,15 +4048,6 @@ func awsRestjson1_deserializeOpDocumentListLensReviewsOutput(v **ListLensReviews sv.NextToken = ptr.String(jtv) } - case "WorkloadId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected WorkloadId to be of type string, got %T instead", value) - } - sv.WorkloadId = ptr.String(jtv) - } - default: _, _ = key, value @@ -4122,6 +5390,15 @@ func awsRestjson1_deserializeOpDocumentUpdateAnswerOutput(v **UpdateAnswerOutput sv.LensAlias = ptr.String(jtv) } + case "LensArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LensArn to be of type string, got %T instead", value) + } + sv.LensArn = ptr.String(jtv) + } + case "WorkloadId": if value != nil { jtv, ok := value.(string) @@ -5234,6 +6511,15 @@ func awsRestjson1_deserializeDocumentAnswer(v **types.Answer, value interface{}) return err } + case "HelpfulResourceDisplayText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DisplayText to be of type string, got %T instead", value) + } + sv.HelpfulResourceDisplayText = ptr.String(jtv) + } + case "HelpfulResourceUrl": if value != nil { jtv, ok := value.(string) @@ -5512,6 +6798,16 @@ func awsRestjson1_deserializeDocumentChoice(v **types.Choice, value interface{}) sv.Description = ptr.String(jtv) } + case "HelpfulResource": + if err := awsRestjson1_deserializeDocumentChoiceContent(&sv.HelpfulResource, value); err != nil { + return err + } + + case "ImprovementPlan": + if err := awsRestjson1_deserializeDocumentChoiceContent(&sv.ImprovementPlan, value); err != nil { + return err + } + case "Title": if value != nil { jtv, ok := value.(string) @@ -5723,6 +7019,147 @@ func awsRestjson1_deserializeDocumentChoiceAnswerSummary(v **types.ChoiceAnswerS return nil } +func awsRestjson1_deserializeDocumentChoiceContent(v **types.ChoiceContent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ChoiceContent + if *v == nil { + sv = &types.ChoiceContent{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DisplayText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChoiceContentDisplayText to be of type string, got %T instead", value) + } + sv.DisplayText = ptr.String(jtv) + } + + case "Url": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChoiceContentUrl to be of type string, got %T instead", value) + } + sv.Url = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentChoiceImprovementPlan(v **types.ChoiceImprovementPlan, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ChoiceImprovementPlan + if *v == nil { + sv = &types.ChoiceImprovementPlan{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChoiceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChoiceId to be of type string, got %T instead", value) + } + sv.ChoiceId = ptr.String(jtv) + } + + case "DisplayText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DisplayText to be of type string, got %T instead", value) + } + sv.DisplayText = ptr.String(jtv) + } + + case "ImprovementPlanUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImprovementPlanUrl to be of type string, got %T instead", value) + } + sv.ImprovementPlanUrl = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentChoiceImprovementPlans(v *[]types.ChoiceImprovementPlan, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ChoiceImprovementPlan + if *v == nil { + cv = []types.ChoiceImprovementPlan{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ChoiceImprovementPlan + destAddr := &col + if err := awsRestjson1_deserializeDocumentChoiceImprovementPlan(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentChoices(v *[]types.Choice, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -5871,6 +7308,11 @@ func awsRestjson1_deserializeDocumentImprovementSummary(v **types.ImprovementSum for key, value := range shape { switch key { + case "ImprovementPlans": + if err := awsRestjson1_deserializeDocumentChoiceImprovementPlans(&sv.ImprovementPlans, value); err != nil { + return err + } + case "ImprovementPlanUrl": if value != nil { jtv, ok := value.(string) @@ -5933,27 +7375,112 @@ func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalS return nil } - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InternalServerException + if *v == nil { + sv = &types.InternalServerException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentLens(v **types.Lens, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Lens + if *v == nil { + sv = &types.Lens{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LensDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "LensArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LensArn to be of type string, got %T instead", value) + } + sv.LensArn = ptr.String(jtv) + } + + case "LensVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LensVersion to be of type string, got %T instead", value) + } + sv.LensVersion = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LensName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } - var sv *types.InternalServerException - if *v == nil { - sv = &types.InternalServerException{} - } else { - sv = *v - } + case "Owner": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LensOwner to be of type string, got %T instead", value) + } + sv.Owner = ptr.String(jtv) + } - for key, value := range shape { - switch key { - case "Message": + case "ShareInvitationId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected ShareInvitationId to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.ShareInvitationId = ptr.String(jtv) } default: @@ -5996,6 +7523,15 @@ func awsRestjson1_deserializeDocumentLensReview(v **types.LensReview, value inte sv.LensAlias = ptr.String(jtv) } + case "LensArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LensArn to be of type string, got %T instead", value) + } + sv.LensArn = ptr.String(jtv) + } + case "LensName": if value != nil { jtv, ok := value.(string) @@ -6116,6 +7652,15 @@ func awsRestjson1_deserializeDocumentLensReviewReport(v **types.LensReviewReport sv.LensAlias = ptr.String(jtv) } + case "LensArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LensArn to be of type string, got %T instead", value) + } + sv.LensArn = ptr.String(jtv) + } + default: _, _ = key, value @@ -6190,6 +7735,15 @@ func awsRestjson1_deserializeDocumentLensReviewSummary(v **types.LensReviewSumma sv.LensAlias = ptr.String(jtv) } + case "LensArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LensArn to be of type string, got %T instead", value) + } + sv.LensArn = ptr.String(jtv) + } + case "LensName": if value != nil { jtv, ok := value.(string) @@ -6247,6 +7801,98 @@ func awsRestjson1_deserializeDocumentLensReviewSummary(v **types.LensReviewSumma return nil } +func awsRestjson1_deserializeDocumentLensShareSummaries(v *[]types.LensShareSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.LensShareSummary + if *v == nil { + cv = []types.LensShareSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.LensShareSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentLensShareSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentLensShareSummary(v **types.LensShareSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LensShareSummary + if *v == nil { + sv = &types.LensShareSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "SharedWith": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SharedWith to be of type string, got %T instead", value) + } + sv.SharedWith = ptr.String(jtv) + } + + case "ShareId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShareId to be of type string, got %T instead", value) + } + sv.ShareId = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShareStatus to be of type string, got %T instead", value) + } + sv.Status = types.ShareStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentLensSummaries(v *[]types.LensSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6303,6 +7949,22 @@ func awsRestjson1_deserializeDocumentLensSummary(v **types.LensSummary, value in for key, value := range shape { switch key { + case "CreatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + case "Description": if value != nil { jtv, ok := value.(string) @@ -6321,6 +7983,15 @@ func awsRestjson1_deserializeDocumentLensSummary(v **types.LensSummary, value in sv.LensAlias = ptr.String(jtv) } + case "LensArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LensArn to be of type string, got %T instead", value) + } + sv.LensArn = ptr.String(jtv) + } + case "LensName": if value != nil { jtv, ok := value.(string) @@ -6330,6 +8001,24 @@ func awsRestjson1_deserializeDocumentLensSummary(v **types.LensSummary, value in sv.LensName = ptr.String(jtv) } + case "LensStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LensStatus to be of type string, got %T instead", value) + } + sv.LensStatus = types.LensStatus(jtv) + } + + case "LensType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LensType to be of type string, got %T instead", value) + } + sv.LensType = types.LensType(jtv) + } + case "LensVersion": if value != nil { jtv, ok := value.(string) @@ -6339,6 +8028,31 @@ func awsRestjson1_deserializeDocumentLensSummary(v **types.LensSummary, value in sv.LensVersion = ptr.String(jtv) } + case "Owner": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + } + sv.Owner = ptr.String(jtv) + } + + case "UpdatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + default: _, _ = key, value @@ -6397,6 +8111,15 @@ func awsRestjson1_deserializeDocumentLensUpgradeSummary(v **types.LensUpgradeSum sv.LensAlias = ptr.String(jtv) } + case "LensArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LensArn to be of type string, got %T instead", value) + } + sv.LensArn = ptr.String(jtv) + } + case "WorkloadId": if value != nil { jtv, ok := value.(string) @@ -6725,6 +8448,15 @@ func awsRestjson1_deserializeDocumentPillarDifference(v **types.PillarDifference sv.PillarId = ptr.String(jtv) } + case "PillarName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PillarName to be of type string, got %T instead", value) + } + sv.PillarName = ptr.String(jtv) + } + case "QuestionDifferences": if err := awsRestjson1_deserializeDocumentQuestionDifferences(&sv.QuestionDifferences, value); err != nil { return err @@ -7194,6 +8926,24 @@ func awsRestjson1_deserializeDocumentShareInvitation(v **types.ShareInvitation, for key, value := range shape { switch key { + case "LensAlias": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LensAlias to be of type string, got %T instead", value) + } + sv.LensAlias = ptr.String(jtv) + } + + case "LensArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LensArn to be of type string, got %T instead", value) + } + sv.LensArn = ptr.String(jtv) + } + case "ShareInvitationId": if value != nil { jtv, ok := value.(string) @@ -7203,6 +8953,15 @@ func awsRestjson1_deserializeDocumentShareInvitation(v **types.ShareInvitation, sv.ShareInvitationId = ptr.String(jtv) } + case "ShareResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShareResourceType to be of type string, got %T instead", value) + } + sv.ShareResourceType = types.ShareResourceType(jtv) + } + case "WorkloadId": if value != nil { jtv, ok := value.(string) @@ -7277,6 +9036,24 @@ func awsRestjson1_deserializeDocumentShareInvitationSummary(v **types.ShareInvit for key, value := range shape { switch key { + case "LensArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LensArn to be of type string, got %T instead", value) + } + sv.LensArn = ptr.String(jtv) + } + + case "LensName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LensName to be of type string, got %T instead", value) + } + sv.LensName = ptr.String(jtv) + } + case "PermissionType": if value != nil { jtv, ok := value.(string) @@ -7313,6 +9090,15 @@ func awsRestjson1_deserializeDocumentShareInvitationSummary(v **types.ShareInvit sv.ShareInvitationId = ptr.String(jtv) } + case "ShareResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShareResourceType to be of type string, got %T instead", value) + } + sv.ShareResourceType = types.ShareResourceType(jtv) + } + case "WorkloadId": if value != nil { jtv, ok := value.(string) diff --git a/service/wellarchitected/doc.go b/service/wellarchitected/doc.go index 2232217fc73..a40af065553 100644 --- a/service/wellarchitected/doc.go +++ b/service/wellarchitected/doc.go @@ -3,11 +3,10 @@ // Package wellarchitected provides the API client, operations, and parameter types // for AWS Well-Architected Tool. // -// AWS Well-Architected Tool This is the AWS Well-Architected Tool API Reference. -// The AWS Well-Architected Tool API provides programmatic access to the AWS -// Well-Architected Tool (http://aws.amazon.com/well-architected-tool) in the AWS +// Well-Architected Tool This is the Well-Architected Tool API Reference. The WA +// Tool API provides programmatic access to the Well-Architected Tool +// (http://aws.amazon.com/well-architected-tool) in the Amazon Web Services // Management Console (https://console.aws.amazon.com/wellarchitected). For -// information about the AWS Well-Architected Tool, see the AWS Well-Architected -// Tool User Guide -// (https://docs.aws.amazon.com/wellarchitected/latest/userguide/intro.html). +// information about the Well-Architected Tool, see the Well-Architected Tool User +// Guide (https://docs.aws.amazon.com/wellarchitected/latest/userguide/intro.html). package wellarchitected diff --git a/service/wellarchitected/generated.json b/service/wellarchitected/generated.json index ea25985d4d7..8098f4534b1 100644 --- a/service/wellarchitected/generated.json +++ b/service/wellarchitected/generated.json @@ -8,21 +8,29 @@ "files": [ "api_client.go", "api_op_AssociateLenses.go", + "api_op_CreateLensShare.go", + "api_op_CreateLensVersion.go", "api_op_CreateMilestone.go", "api_op_CreateWorkload.go", "api_op_CreateWorkloadShare.go", + "api_op_DeleteLens.go", + "api_op_DeleteLensShare.go", "api_op_DeleteWorkload.go", "api_op_DeleteWorkloadShare.go", "api_op_DisassociateLenses.go", + "api_op_ExportLens.go", "api_op_GetAnswer.go", + "api_op_GetLens.go", "api_op_GetLensReview.go", "api_op_GetLensReviewReport.go", "api_op_GetLensVersionDifference.go", "api_op_GetMilestone.go", "api_op_GetWorkload.go", + "api_op_ImportLens.go", "api_op_ListAnswers.go", "api_op_ListLensReviewImprovements.go", "api_op_ListLensReviews.go", + "api_op_ListLensShares.go", "api_op_ListLenses.go", "api_op_ListMilestones.go", "api_op_ListNotifications.go", diff --git a/service/wellarchitected/serializers.go b/service/wellarchitected/serializers.go index 9b4bfab2ee4..01f5a85d899 100644 --- a/service/wellarchitected/serializers.go +++ b/service/wellarchitected/serializers.go @@ -97,6 +97,183 @@ func awsRestjson1_serializeOpDocumentAssociateLensesInput(v *AssociateLensesInpu return nil } +type awsRestjson1_serializeOpCreateLensShare struct { +} + +func (*awsRestjson1_serializeOpCreateLensShare) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateLensShare) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateLensShareInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/lenses/{LensAlias}/shares") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateLensShareInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateLensShareInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateLensShareInput(v *CreateLensShareInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.LensAlias == nil || len(*v.LensAlias) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member LensAlias must not be empty")} + } + if v.LensAlias != nil { + if err := encoder.SetURI("LensAlias").String(*v.LensAlias); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateLensShareInput(v *CreateLensShareInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientRequestToken != nil { + ok := object.Key("ClientRequestToken") + ok.String(*v.ClientRequestToken) + } + + if v.SharedWith != nil { + ok := object.Key("SharedWith") + ok.String(*v.SharedWith) + } + + return nil +} + +type awsRestjson1_serializeOpCreateLensVersion struct { +} + +func (*awsRestjson1_serializeOpCreateLensVersion) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateLensVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateLensVersionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/lenses/{LensAlias}/versions") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateLensVersionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateLensVersionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateLensVersionInput(v *CreateLensVersionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.LensAlias == nil || len(*v.LensAlias) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member LensAlias must not be empty")} + } + if v.LensAlias != nil { + if err := encoder.SetURI("LensAlias").String(*v.LensAlias); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateLensVersionInput(v *CreateLensVersionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientRequestToken != nil { + ok := object.Key("ClientRequestToken") + ok.String(*v.ClientRequestToken) + } + + if v.IsMajorVersion { + ok := object.Key("IsMajorVersion") + ok.Boolean(v.IsMajorVersion) + } + + if v.LensVersion != nil { + ok := object.Key("LensVersion") + ok.String(*v.LensVersion) + } + + return nil +} + type awsRestjson1_serializeOpCreateMilestone struct { } @@ -424,6 +601,143 @@ func awsRestjson1_serializeOpDocumentCreateWorkloadShareInput(v *CreateWorkloadS return nil } +type awsRestjson1_serializeOpDeleteLens struct { +} + +func (*awsRestjson1_serializeOpDeleteLens) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteLens) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteLensInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/lenses/{LensAlias}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteLensInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteLensInput(v *DeleteLensInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ClientRequestToken != nil { + encoder.SetQuery("ClientRequestToken").String(*v.ClientRequestToken) + } + + if v.LensAlias == nil || len(*v.LensAlias) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member LensAlias must not be empty")} + } + if v.LensAlias != nil { + if err := encoder.SetURI("LensAlias").String(*v.LensAlias); err != nil { + return err + } + } + + if len(v.LensStatus) > 0 { + encoder.SetQuery("LensStatus").String(string(v.LensStatus)) + } + + return nil +} + +type awsRestjson1_serializeOpDeleteLensShare struct { +} + +func (*awsRestjson1_serializeOpDeleteLensShare) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteLensShare) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteLensShareInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/lenses/{LensAlias}/shares/{ShareId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteLensShareInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteLensShareInput(v *DeleteLensShareInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ClientRequestToken != nil { + encoder.SetQuery("ClientRequestToken").String(*v.ClientRequestToken) + } + + if v.LensAlias == nil || len(*v.LensAlias) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member LensAlias must not be empty")} + } + if v.LensAlias != nil { + if err := encoder.SetURI("LensAlias").String(*v.LensAlias); err != nil { + return err + } + } + + if v.ShareId == nil || len(*v.ShareId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ShareId must not be empty")} + } + if v.ShareId != nil { + if err := encoder.SetURI("ShareId").String(*v.ShareId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDeleteWorkload struct { } @@ -640,6 +954,68 @@ func awsRestjson1_serializeOpDocumentDisassociateLensesInput(v *DisassociateLens return nil } +type awsRestjson1_serializeOpExportLens struct { +} + +func (*awsRestjson1_serializeOpExportLens) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpExportLens) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ExportLensInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/lenses/{LensAlias}/export") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsExportLensInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsExportLensInput(v *ExportLensInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.LensAlias == nil || len(*v.LensAlias) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member LensAlias must not be empty")} + } + if v.LensAlias != nil { + if err := encoder.SetURI("LensAlias").String(*v.LensAlias); err != nil { + return err + } + } + + if v.LensVersion != nil { + encoder.SetQuery("LensVersion").String(*v.LensVersion) + } + + return nil +} + type awsRestjson1_serializeOpGetAnswer struct { } @@ -720,6 +1096,68 @@ func awsRestjson1_serializeOpHttpBindingsGetAnswerInput(v *GetAnswerInput, encod return nil } +type awsRestjson1_serializeOpGetLens struct { +} + +func (*awsRestjson1_serializeOpGetLens) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetLens) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetLensInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/lenses/{LensAlias}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetLensInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetLensInput(v *GetLensInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.LensAlias == nil || len(*v.LensAlias) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member LensAlias must not be empty")} + } + if v.LensAlias != nil { + if err := encoder.SetURI("LensAlias").String(*v.LensAlias); err != nil { + return err + } + } + + if v.LensVersion != nil { + encoder.SetQuery("LensVersion").String(*v.LensVersion) + } + + return nil +} + type awsRestjson1_serializeOpGetLensReview struct { } @@ -921,6 +1359,10 @@ func awsRestjson1_serializeOpHttpBindingsGetLensVersionDifferenceInput(v *GetLen } } + if v.TargetLensVersion != nil { + encoder.SetQuery("TargetLensVersion").String(*v.TargetLensVersion) + } + return nil } @@ -1046,6 +1488,91 @@ func awsRestjson1_serializeOpHttpBindingsGetWorkloadInput(v *GetWorkloadInput, e return nil } +type awsRestjson1_serializeOpImportLens struct { +} + +func (*awsRestjson1_serializeOpImportLens) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpImportLens) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ImportLensInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/importLens") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentImportLensInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsImportLensInput(v *ImportLensInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentImportLensInput(v *ImportLensInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientRequestToken != nil { + ok := object.Key("ClientRequestToken") + ok.String(*v.ClientRequestToken) + } + + if v.JSONString != nil { + ok := object.Key("JSONString") + ok.String(*v.JSONString) + } + + if v.LensAlias != nil { + ok := object.Key("LensAlias") + ok.String(*v.LensAlias) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpListAnswers struct { } @@ -1175,6 +1702,18 @@ func awsRestjson1_serializeOpHttpBindingsListLensesInput(v *ListLensesInput, enc return fmt.Errorf("unsupported serialization of nil %T", v) } + if v.LensName != nil { + encoder.SetQuery("LensName").String(*v.LensName) + } + + if len(v.LensStatus) > 0 { + encoder.SetQuery("LensStatus").String(string(v.LensStatus)) + } + + if len(v.LensType) > 0 { + encoder.SetQuery("LensType").String(string(v.LensType)) + } + if v.MaxResults != 0 { encoder.SetQuery("MaxResults").Integer(v.MaxResults) } @@ -1339,6 +1878,76 @@ func awsRestjson1_serializeOpHttpBindingsListLensReviewsInput(v *ListLensReviews return nil } +type awsRestjson1_serializeOpListLensShares struct { +} + +func (*awsRestjson1_serializeOpListLensShares) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListLensShares) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListLensSharesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/lenses/{LensAlias}/shares") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListLensSharesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListLensSharesInput(v *ListLensSharesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.LensAlias == nil || len(*v.LensAlias) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member LensAlias must not be empty")} + } + if v.LensAlias != nil { + if err := encoder.SetURI("LensAlias").String(*v.LensAlias); err != nil { + return err + } + } + + if v.MaxResults != 0 { + encoder.SetQuery("MaxResults").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("NextToken").String(*v.NextToken) + } + + if v.SharedWithPrefix != nil { + encoder.SetQuery("SharedWithPrefix").String(*v.SharedWithPrefix) + } + + return nil +} + type awsRestjson1_serializeOpListMilestones struct { } @@ -1549,6 +2158,10 @@ func awsRestjson1_serializeOpHttpBindingsListShareInvitationsInput(v *ListShareI return fmt.Errorf("unsupported serialization of nil %T", v) } + if v.LensNamePrefix != nil { + encoder.SetQuery("LensNamePrefix").String(*v.LensNamePrefix) + } + if v.MaxResults != 0 { encoder.SetQuery("MaxResults").Integer(v.MaxResults) } @@ -1557,6 +2170,10 @@ func awsRestjson1_serializeOpHttpBindingsListShareInvitationsInput(v *ListShareI encoder.SetQuery("NextToken").String(*v.NextToken) } + if len(v.ShareResourceType) > 0 { + encoder.SetQuery("ShareResourceType").String(string(v.ShareResourceType)) + } + if v.WorkloadNamePrefix != nil { encoder.SetQuery("WorkloadNamePrefix").String(*v.WorkloadNamePrefix) } diff --git a/service/wellarchitected/types/enums.go b/service/wellarchitected/types/enums.go index 8d9f5825bb0..bff40a2a1fb 100644 --- a/service/wellarchitected/types/enums.go +++ b/service/wellarchitected/types/enums.go @@ -90,6 +90,26 @@ func (DifferenceStatus) Values() []DifferenceStatus { } } +type ImportLensStatus string + +// Enum values for ImportLensStatus +const ( + ImportLensStatusInProgress ImportLensStatus = "IN_PROGRESS" + ImportLensStatusComplete ImportLensStatus = "COMPLETE" + ImportLensStatusError ImportLensStatus = "ERROR" +) + +// Values returns all known values for ImportLensStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ImportLensStatus) Values() []ImportLensStatus { + return []ImportLensStatus{ + "IN_PROGRESS", + "COMPLETE", + "ERROR", + } +} + type LensStatus string // Enum values for LensStatus @@ -97,6 +117,8 @@ const ( LensStatusCurrent LensStatus = "CURRENT" LensStatusNotCurrent LensStatus = "NOT_CURRENT" LensStatusDeprecated LensStatus = "DEPRECATED" + LensStatusDeleted LensStatus = "DELETED" + LensStatusUnshared LensStatus = "UNSHARED" ) // Values returns all known values for LensStatus. Note that this can be expanded @@ -107,6 +129,48 @@ func (LensStatus) Values() []LensStatus { "CURRENT", "NOT_CURRENT", "DEPRECATED", + "DELETED", + "UNSHARED", + } +} + +type LensStatusType string + +// Enum values for LensStatusType +const ( + LensStatusTypeAll LensStatusType = "ALL" + LensStatusTypeDraft LensStatusType = "DRAFT" + LensStatusTypePublished LensStatusType = "PUBLISHED" +) + +// Values returns all known values for LensStatusType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (LensStatusType) Values() []LensStatusType { + return []LensStatusType{ + "ALL", + "DRAFT", + "PUBLISHED", + } +} + +type LensType string + +// Enum values for LensType +const ( + LensTypeAwsOfficial LensType = "AWS_OFFICIAL" + LensTypeCustomShared LensType = "CUSTOM_SHARED" + LensTypeCustomSelf LensType = "CUSTOM_SELF" +) + +// Values returns all known values for LensType. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (LensType) Values() []LensType { + return []LensType{ + "AWS_OFFICIAL", + "CUSTOM_SHARED", + "CUSTOM_SELF", } } @@ -188,6 +252,24 @@ func (ShareInvitationAction) Values() []ShareInvitationAction { } } +type ShareResourceType string + +// Enum values for ShareResourceType +const ( + ShareResourceTypeWorkload ShareResourceType = "WORKLOAD" + ShareResourceTypeLens ShareResourceType = "LENS" +) + +// Values returns all known values for ShareResourceType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ShareResourceType) Values() []ShareResourceType { + return []ShareResourceType{ + "WORKLOAD", + "LENS", + } +} + type ShareStatus string // Enum values for ShareStatus diff --git a/service/wellarchitected/types/errors.go b/service/wellarchitected/types/errors.go index b114a1dcb21..92fdd8c0e2e 100644 --- a/service/wellarchitected/types/errors.go +++ b/service/wellarchitected/types/errors.go @@ -48,7 +48,7 @@ func (e *ConflictException) ErrorMessage() string { func (e *ConflictException) ErrorCode() string { return "ConflictException" } func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// There is a problem with the AWS Well-Architected Tool API service. +// There is a problem with the Well-Architected Tool API service. type InternalServerException struct { Message *string diff --git a/service/wellarchitected/types/types.go b/service/wellarchitected/types/types.go index bcec30111cb..c07071893fe 100644 --- a/service/wellarchitected/types/types.go +++ b/service/wellarchitected/types/types.go @@ -16,6 +16,9 @@ type Answer struct { // List of choices available for a question. Choices []Choice + // The helpful resource text to be displayed. + HelpfulResourceDisplayText *string + // The helpful resource URL for a question. HelpfulResourceUrl *string @@ -99,6 +102,12 @@ type Choice struct { // The description of a choice. Description *string + // The choice level helpful resource. + HelpfulResource *ChoiceContent + + // The choice level improvement plan. + ImprovementPlan *ChoiceContent + // The title of a choice. Title *string @@ -138,6 +147,34 @@ type ChoiceAnswerSummary struct { noSmithyDocumentSerde } +// The choice content. +type ChoiceContent struct { + + // The display text for the choice content. + DisplayText *string + + // The URL for the choice content. + Url *string + + noSmithyDocumentSerde +} + +// The choice level improvement plan. +type ChoiceImprovementPlan struct { + + // The ID of a choice. + ChoiceId *string + + // The display text for the improvement plan. + DisplayText *string + + // The improvement plan URL for a question. This value is only available if the + // question has been answered. + ImprovementPlanUrl *string + + noSmithyDocumentSerde +} + // A list of choices to be updated. type ChoiceUpdate struct { @@ -162,6 +199,9 @@ type ImprovementSummary struct { // question has been answered. ImprovementPlanUrl *string + // The improvement plan details. + ImprovementPlans []ChoiceImprovementPlan + // The ID used to identify a pillar, for example, security. A pillar is identified // by its PillarReviewSummary$PillarId. PillarId *string @@ -178,6 +218,30 @@ type ImprovementSummary struct { noSmithyDocumentSerde } +// A lens return object. +type Lens struct { + + // The description of the lens. + Description *string + + // The ARN of a lens. + LensArn *string + + // The version of a lens. + LensVersion *string + + // The full name of the lens. + Name *string + + // The Amazon Web Services account ID that owns the lens. + Owner *string + + // The ID assigned to the share invitation. + ShareInvitationId *string + + noSmithyDocumentSerde +} + // A lens review of a question. type LensReview struct { @@ -185,6 +249,9 @@ type LensReview struct { // LensSummary$LensAlias. LensAlias *string + // The ARN for the lens. + LensArn *string + // The full name of the lens. LensName *string @@ -223,6 +290,9 @@ type LensReviewReport struct { // LensSummary$LensAlias. LensAlias *string + // The ARN for the lens. + LensArn *string + noSmithyDocumentSerde } @@ -233,6 +303,9 @@ type LensReviewSummary struct { // LensSummary$LensAlias. LensAlias *string + // The ARN for the lens. + LensArn *string + // The full name of the lens. LensName *string @@ -251,9 +324,28 @@ type LensReviewSummary struct { noSmithyDocumentSerde } +// A lens share summary return object. +type LensShareSummary struct { + + // The ID associated with the workload share. + ShareId *string + + // The Amazon Web Services account ID or IAM role with which the workload is + // shared. + SharedWith *string + + // The status of a workload share. + Status ShareStatus + + noSmithyDocumentSerde +} + // A lens summary of a lens. type LensSummary struct { + // The date and time recorded. + CreatedAt *time.Time + // The description of the lens. Description *string @@ -261,12 +353,27 @@ type LensSummary struct { // LensSummary$LensAlias. LensAlias *string + // The ARN of the lens. + LensArn *string + // The full name of the lens. LensName *string + // The status of the lens. + LensStatus LensStatus + + // The type of the lens. + LensType LensType + // The version of the lens. LensVersion *string + // An Amazon Web Services account ID. + Owner *string + + // The date and time recorded. + UpdatedAt *time.Time + noSmithyDocumentSerde } @@ -283,11 +390,16 @@ type LensUpgradeSummary struct { // LensSummary$LensAlias. LensAlias *string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ARN for the lens. + LensArn *string + + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. WorkloadId *string - // The name of the workload. The name must be unique within an account within a - // Region. Spaces and capitalization are ignored when checking for uniqueness. + // The name of the workload. The name must be unique within an account within an + // Amazon Web Services Region. Spaces and capitalization are ignored when checking + // for uniqueness. WorkloadName *string noSmithyDocumentSerde @@ -353,6 +465,9 @@ type PillarDifference struct { // by its PillarReviewSummary$PillarId. PillarId *string + // The name of the pillar. + PillarName *string + // List of question differences. QuestionDifferences []QuestionDifference @@ -396,10 +511,21 @@ type QuestionDifference struct { // The share invitation. type ShareInvitation struct { + // The alias of the lens, for example, serverless. Each lens is identified by its + // LensSummary$LensAlias. + LensAlias *string + + // The ARN for the lens. + LensArn *string + // The ID assigned to the share invitation. ShareInvitationId *string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The resource type of the share invitation. + ShareResourceType ShareResourceType + + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. WorkloadId *string noSmithyDocumentSerde @@ -408,23 +534,35 @@ type ShareInvitation struct { // A share invitation summary return object. type ShareInvitationSummary struct { + // The ARN for the lens. + LensArn *string + + // The full name of the lens. + LensName *string + // Permission granted on a workload share. PermissionType PermissionType // The ID assigned to the share invitation. ShareInvitationId *string - // An AWS account ID. + // The resource type of the share invitation. + ShareResourceType ShareResourceType + + // An Amazon Web Services account ID. SharedBy *string - // The AWS account ID or IAM role with which the workload is shared. + // The Amazon Web Services account ID or IAM role with which the workload is + // shared. SharedWith *string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. WorkloadId *string - // The name of the workload. The name must be unique within an account within a - // Region. Spaces and capitalization are ignored when checking for uniqueness. + // The name of the workload. The name must be unique within an account within an + // Amazon Web Services Region. Spaces and capitalization are ignored when checking + // for uniqueness. WorkloadName *string noSmithyDocumentSerde @@ -459,14 +597,14 @@ type VersionDifferences struct { // A workload return object. type Workload struct { - // The list of AWS account IDs associated with the workload. + // The list of Amazon Web Services account IDs associated with the workload. AccountIds []string // The URL of the architectural design for the workload. ArchitecturalDesign *string - // The list of AWS Regions associated with the workload, for example, us-east-2, or - // ca-central-1. + // The list of Amazon Web Services Regions associated with the workload, for + // example, us-east-2, or ca-central-1. AwsRegions []string // The description for the workload. @@ -556,13 +694,13 @@ type Workload struct { // LensSummary$LensAlias. Lenses []string - // The list of non-AWS Regions associated with the workload. + // The list of non-Amazon Web Services Regions associated with the workload. NonAwsRegions []string // The notes associated with the workload. Notes *string - // An AWS account ID. + // An Amazon Web Services account ID. Owner *string // The priorities of the pillars, which are used to order items in the improvement @@ -591,11 +729,13 @@ type Workload struct { // The ARN for the workload. WorkloadArn *string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. WorkloadId *string - // The name of the workload. The name must be unique within an account within a - // Region. Spaces and capitalization are ignored when checking for uniqueness. + // The name of the workload. The name must be unique within an account within an + // Amazon Web Services Region. Spaces and capitalization are ignored when checking + // for uniqueness. WorkloadName *string noSmithyDocumentSerde @@ -610,20 +750,23 @@ type WorkloadShare struct { // The ID associated with the workload share. ShareId *string - // An AWS account ID. + // An Amazon Web Services account ID. SharedBy *string - // The AWS account ID or IAM role with which the workload is shared. + // The Amazon Web Services account ID or IAM role with which the workload is + // shared. SharedWith *string // The status of a workload share. Status ShareStatus - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. WorkloadId *string - // The name of the workload. The name must be unique within an account within a - // Region. Spaces and capitalization are ignored when checking for uniqueness. + // The name of the workload. The name must be unique within an account within an + // Amazon Web Services Region. Spaces and capitalization are ignored when checking + // for uniqueness. WorkloadName *string noSmithyDocumentSerde @@ -638,7 +781,8 @@ type WorkloadShareSummary struct { // The ID associated with the workload share. ShareId *string - // The AWS account ID or IAM role with which the workload is shared. + // The Amazon Web Services account ID or IAM role with which the workload is + // shared. SharedWith *string // The status of a workload share. @@ -657,7 +801,7 @@ type WorkloadSummary struct { // LensSummary$LensAlias. Lenses []string - // An AWS account ID. + // An Amazon Web Services account ID. Owner *string // A map from risk names to the count of how questions have that rating. @@ -669,11 +813,13 @@ type WorkloadSummary struct { // The ARN for the workload. WorkloadArn *string - // The ID assigned to the workload. This ID is unique within an AWS Region. + // The ID assigned to the workload. This ID is unique within an Amazon Web Services + // Region. WorkloadId *string - // The name of the workload. The name must be unique within an account within a - // Region. Spaces and capitalization are ignored when checking for uniqueness. + // The name of the workload. The name must be unique within an account within an + // Amazon Web Services Region. Spaces and capitalization are ignored when checking + // for uniqueness. WorkloadName *string noSmithyDocumentSerde diff --git a/service/wellarchitected/validators.go b/service/wellarchitected/validators.go index 8d4fca7cbf2..3d77210414f 100644 --- a/service/wellarchitected/validators.go +++ b/service/wellarchitected/validators.go @@ -30,6 +30,46 @@ func (m *validateOpAssociateLenses) HandleInitialize(ctx context.Context, in mid return next.HandleInitialize(ctx, in) } +type validateOpCreateLensShare struct { +} + +func (*validateOpCreateLensShare) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateLensShare) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateLensShareInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateLensShareInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateLensVersion struct { +} + +func (*validateOpCreateLensVersion) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateLensVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateLensVersionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateLensVersionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateMilestone struct { } @@ -90,6 +130,46 @@ func (m *validateOpCreateWorkloadShare) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpDeleteLens struct { +} + +func (*validateOpDeleteLens) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteLens) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteLensInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteLensInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteLensShare struct { +} + +func (*validateOpDeleteLensShare) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteLensShare) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteLensShareInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteLensShareInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteWorkload struct { } @@ -150,6 +230,26 @@ func (m *validateOpDisassociateLenses) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpExportLens struct { +} + +func (*validateOpExportLens) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpExportLens) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ExportLensInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpExportLensInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetAnswer struct { } @@ -170,6 +270,26 @@ func (m *validateOpGetAnswer) HandleInitialize(ctx context.Context, in middlewar return next.HandleInitialize(ctx, in) } +type validateOpGetLens struct { +} + +func (*validateOpGetLens) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetLens) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetLensInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetLensInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetLensReview struct { } @@ -270,6 +390,26 @@ func (m *validateOpGetWorkload) HandleInitialize(ctx context.Context, in middlew return next.HandleInitialize(ctx, in) } +type validateOpImportLens struct { +} + +func (*validateOpImportLens) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpImportLens) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ImportLensInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpImportLensInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListAnswers struct { } @@ -330,6 +470,26 @@ func (m *validateOpListLensReviews) HandleInitialize(ctx context.Context, in mid return next.HandleInitialize(ctx, in) } +type validateOpListLensShares struct { +} + +func (*validateOpListLensShares) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListLensShares) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListLensSharesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListLensSharesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListMilestones struct { } @@ -554,6 +714,14 @@ func addOpAssociateLensesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAssociateLenses{}, middleware.After) } +func addOpCreateLensShareValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateLensShare{}, middleware.After) +} + +func addOpCreateLensVersionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateLensVersion{}, middleware.After) +} + func addOpCreateMilestoneValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateMilestone{}, middleware.After) } @@ -566,6 +734,14 @@ func addOpCreateWorkloadShareValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpCreateWorkloadShare{}, middleware.After) } +func addOpDeleteLensValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteLens{}, middleware.After) +} + +func addOpDeleteLensShareValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteLensShare{}, middleware.After) +} + func addOpDeleteWorkloadValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteWorkload{}, middleware.After) } @@ -578,10 +754,18 @@ func addOpDisassociateLensesValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpDisassociateLenses{}, middleware.After) } +func addOpExportLensValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpExportLens{}, middleware.After) +} + func addOpGetAnswerValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetAnswer{}, middleware.After) } +func addOpGetLensValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetLens{}, middleware.After) +} + func addOpGetLensReviewValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetLensReview{}, middleware.After) } @@ -602,6 +786,10 @@ func addOpGetWorkloadValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetWorkload{}, middleware.After) } +func addOpImportLensValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpImportLens{}, middleware.After) +} + func addOpListAnswersValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListAnswers{}, middleware.After) } @@ -614,6 +802,10 @@ func addOpListLensReviewsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListLensReviews{}, middleware.After) } +func addOpListLensSharesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListLensShares{}, middleware.After) +} + func addOpListMilestonesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListMilestones{}, middleware.After) } @@ -709,6 +901,48 @@ func validateOpAssociateLensesInput(v *AssociateLensesInput) error { } } +func validateOpCreateLensShareInput(v *CreateLensShareInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateLensShareInput"} + if v.LensAlias == nil { + invalidParams.Add(smithy.NewErrParamRequired("LensAlias")) + } + if v.SharedWith == nil { + invalidParams.Add(smithy.NewErrParamRequired("SharedWith")) + } + if v.ClientRequestToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientRequestToken")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateLensVersionInput(v *CreateLensVersionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateLensVersionInput"} + if v.LensAlias == nil { + invalidParams.Add(smithy.NewErrParamRequired("LensAlias")) + } + if v.LensVersion == nil { + invalidParams.Add(smithy.NewErrParamRequired("LensVersion")) + } + if v.ClientRequestToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientRequestToken")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateMilestoneInput(v *CreateMilestoneInput) error { if v == nil { return nil @@ -784,6 +1018,48 @@ func validateOpCreateWorkloadShareInput(v *CreateWorkloadShareInput) error { } } +func validateOpDeleteLensInput(v *DeleteLensInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteLensInput"} + if v.LensAlias == nil { + invalidParams.Add(smithy.NewErrParamRequired("LensAlias")) + } + if v.ClientRequestToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientRequestToken")) + } + if len(v.LensStatus) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("LensStatus")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteLensShareInput(v *DeleteLensShareInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteLensShareInput"} + if v.ShareId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ShareId")) + } + if v.LensAlias == nil { + invalidParams.Add(smithy.NewErrParamRequired("LensAlias")) + } + if v.ClientRequestToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientRequestToken")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteWorkloadInput(v *DeleteWorkloadInput) error { if v == nil { return nil @@ -841,6 +1117,21 @@ func validateOpDisassociateLensesInput(v *DisassociateLensesInput) error { } } +func validateOpExportLensInput(v *ExportLensInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ExportLensInput"} + if v.LensAlias == nil { + invalidParams.Add(smithy.NewErrParamRequired("LensAlias")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetAnswerInput(v *GetAnswerInput) error { if v == nil { return nil @@ -862,6 +1153,21 @@ func validateOpGetAnswerInput(v *GetAnswerInput) error { } } +func validateOpGetLensInput(v *GetLensInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetLensInput"} + if v.LensAlias == nil { + invalidParams.Add(smithy.NewErrParamRequired("LensAlias")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetLensReviewInput(v *GetLensReviewInput) error { if v == nil { return nil @@ -906,9 +1212,6 @@ func validateOpGetLensVersionDifferenceInput(v *GetLensVersionDifferenceInput) e if v.LensAlias == nil { invalidParams.Add(smithy.NewErrParamRequired("LensAlias")) } - if v.BaseLensVersion == nil { - invalidParams.Add(smithy.NewErrParamRequired("BaseLensVersion")) - } if invalidParams.Len() > 0 { return invalidParams } else { @@ -946,6 +1249,24 @@ func validateOpGetWorkloadInput(v *GetWorkloadInput) error { } } +func validateOpImportLensInput(v *ImportLensInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ImportLensInput"} + if v.JSONString == nil { + invalidParams.Add(smithy.NewErrParamRequired("JSONString")) + } + if v.ClientRequestToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientRequestToken")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListAnswersInput(v *ListAnswersInput) error { if v == nil { return nil @@ -997,6 +1318,21 @@ func validateOpListLensReviewsInput(v *ListLensReviewsInput) error { } } +func validateOpListLensSharesInput(v *ListLensSharesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListLensSharesInput"} + if v.LensAlias == nil { + invalidParams.Add(smithy.NewErrParamRequired("LensAlias")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListMilestonesInput(v *ListMilestonesInput) error { if v == nil { return nil diff --git a/service/workspaces/api_op_CreateUpdatedWorkspaceImage.go b/service/workspaces/api_op_CreateUpdatedWorkspaceImage.go index 64b25903d59..4c5cc4b8cbc 100644 --- a/service/workspaces/api_op_CreateUpdatedWorkspaceImage.go +++ b/service/workspaces/api_op_CreateUpdatedWorkspaceImage.go @@ -19,15 +19,15 @@ import ( // (https://docs.aws.amazon.com/workspaces/latest/api/API_DescribeWorkspaceImages.html). // // * -// Only Windows 10 WorkSpace images can be programmatically updated at this -// time. +// Only Windows 10, Windows Sever 2016, and Windows Server 2019 WorkSpace images +// can be programmatically updated at this time. // -// * Microsoft Windows updates and other application updates are not -// included in the update process. +// * Microsoft Windows updates and +// other application updates are not included in the update process. // -// * The source WorkSpace image is not deleted. -// You can delete the source image after you've verified your new updated image and -// created a new bundle. +// * The source +// WorkSpace image is not deleted. You can delete the source image after you've +// verified your new updated image and created a new bundle. func (c *Client) CreateUpdatedWorkspaceImage(ctx context.Context, params *CreateUpdatedWorkspaceImageInput, optFns ...func(*Options)) (*CreateUpdatedWorkspaceImageOutput, error) { if params == nil { params = &CreateUpdatedWorkspaceImageInput{}